From 3e7a17ace0b44926e138c534492dc63dba0c14d8 Mon Sep 17 00:00:00 2001 From: zxy Date: Wed, 22 Apr 2026 09:46:34 +0800 Subject: [PATCH] =?UTF-8?q?fix(machineparam):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=9C=BA=E5=8F=B0=E5=8F=82=E6=95=B0=E9=A1=B5=E9=9D=A2=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=B1=95=E7=A4=BA=E5=92=8C=E7=BC=96=E8=BE=91=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=20=E3=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/jnpf/service/impl/MachineParamServiceImpl.java | 2 +- .../jnpf-web/src/views/example/machineparam/detail.vue | 4 +++- .../jnpf-web/src/views/example/machineparam/form.vue | 8 ++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/jnpf-java-boot/jnpf-example/jnpf-example-biz/src/main/java/jnpf/service/impl/MachineParamServiceImpl.java b/jnpf-java-boot/jnpf-example/jnpf-example-biz/src/main/java/jnpf/service/impl/MachineParamServiceImpl.java index e3c5e20..82f2e02 100644 --- a/jnpf-java-boot/jnpf-example/jnpf-example-biz/src/main/java/jnpf/service/impl/MachineParamServiceImpl.java +++ b/jnpf-java-boot/jnpf-example/jnpf-example-biz/src/main/java/jnpf/service/impl/MachineParamServiceImpl.java @@ -55,7 +55,7 @@ public class MachineParamServiceImpl extends ServiceImpl page = new Page<>(machineParamPagination.getCurrentPage(), machineParamPagination.getPageSize()); diff --git a/jnpf-java-boot/jnpf-web/src/views/example/machineparam/detail.vue b/jnpf-java-boot/jnpf-web/src/views/example/machineparam/detail.vue index 933fa27..655ec9a 100644 --- a/jnpf-java-boot/jnpf-web/src/views/example/machineparam/detail.vue +++ b/jnpf-java-boot/jnpf-web/src/views/example/machineparam/detail.vue @@ -177,6 +177,8 @@ export default { this.materialOptions = res.data.map(item => ({ label: item.matName, value: String(item.id), + matCode: item.matCode || '', + matName: item.matName || '', })) }) }, @@ -214,7 +216,7 @@ export default { }, getMaterialName(matCode) { const item = this.materialOptions.find(opt => opt.value === matCode) - return item ? item.label : '' + return item ? `${item.matCode}-${item.matName}` : '' }, getEnabledStatusName(status) { const item = this.enabledStatusOptions.find(opt => opt.id === status) diff --git a/jnpf-java-boot/jnpf-web/src/views/example/machineparam/form.vue b/jnpf-java-boot/jnpf-web/src/views/example/machineparam/form.vue index 448f82e..0313f07 100644 --- a/jnpf-java-boot/jnpf-web/src/views/example/machineparam/form.vue +++ b/jnpf-java-boot/jnpf-web/src/views/example/machineparam/form.vue @@ -209,6 +209,7 @@ export default { this.dataForm.id = id || ''; this.dialogVisible = true; this.loading = true; + this.machineOptions = []; // 每次编辑前清空机台列表 this.$nextTick(() => { if (this.$refs.formRef) { this.$refs.formRef.resetFields(); @@ -228,6 +229,13 @@ export default { matCode: String(data.matCode || ''), enabledStatus: String(data.enabledStatus || '1'), }; + + // 编辑时,如果有工序ID,加载对应的机台列表 + if (data.procId) { + this.dataForm.procId = data.procId; + this.loadMachineList(data.procId); + } + // 回显工艺参数列表 if (data.detailList && Array.isArray(data.detailList)) { this.paramList = data.detailList.map(item => {