From 1e2025c118e0b45064a6cd37569eee57df5ce71a Mon Sep 17 00:00:00 2001 From: zhangdi <15053473693@163.com> Date: Thu, 5 Feb 2026 11:56:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E8=89=BA=E6=A8=A1=E6=9D=BF=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/addTemplateDialog.vue | 33 ++++++++++++++----- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/src/views/processManagement/components/addTemplateDialog.vue b/src/views/processManagement/components/addTemplateDialog.vue index 8091205..6c941cf 100644 --- a/src/views/processManagement/components/addTemplateDialog.vue +++ b/src/views/processManagement/components/addTemplateDialog.vue @@ -615,15 +615,30 @@ export default { }, // 插入一行 addTable() { - this.ruleForm.tableData.push({ - processNo: this.getProcessNo(this.ruleForm.tableData), - processCode: null, - processName: null, - craftCode: null, - workHours: null, - proDes: null, - isMain: null, - }); + this.tempId++; + if (this.activeName == '1') { + this.ruleForm.tableData.push({ + _tempId: this.tempId, // 临时唯一标识 + id: null, + processNo: this.getProcessNo(this.ruleForm.tableData), + }); + } + if (this.activeName == '2') { + this.ruleForm.tableData2.push({ + _tempId: this.tempId, // 临时唯一标识 + id: null, + trialNo: this.getProcessNo(this.ruleForm.tableData2), + }); + } + // this.ruleForm.tableData.push({ + // processNo: this.getProcessNo(this.ruleForm.tableData), + // processCode: null, + // processName: null, + // craftCode: null, + // workHours: null, + // proDes: null, + // isMain: null, + // }); }, // 删除一行 delTable(row, index) {