From 2c64f6eccb644301759c995d4316606a5b36a8d7 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Wed, 6 Apr 2022 11:39:40 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E7=A8=8B=E7=B1=BB=E5=88=A4=E5=88=86?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E7=9A=84=E6=96=B0=E5=A2=9E=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Program.vue | 78 +++++++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 40 deletions(-) diff --git a/src/views/Program.vue b/src/views/Program.vue index ee55ced..05302ff 100644 --- a/src/views/Program.vue +++ b/src/views/Program.vue @@ -58,7 +58,7 @@
批量删除 - 新增 + 新增
@@ -357,46 +357,44 @@ export default { } }, addRule() { // 新增规则 - if(!this.isAddRule) { - this.isAddRule = true; - // this.tableData.length && this.tableData.push({ruleOperation: 0, indexNo: ""}); - if (this.tableData.length > 0) { - this.tableData.push({ - ruleOperation: 0 - }, { - indexNo: this.tableData.length + 1, - isSubject: true, - isDisabled: false, // 不禁用 - isSave: false, // 未保存 - lcId: this.lcId, - resultOperation: 0, - ruleOperation: 0, - operationIds: "", - value1: "", - value2: "", - value3: "", - value4: "", - value5: "" - }); - } else { - this.tableData.push({ - indexNo: this.tableData.length + 1, - isSubject: true, - isDisabled: false, // 不禁用 - isSave: false, // 未保存 - lcId: this.lcId, - resultOperation: 0, - ruleOperation: 0, - operationIds: "", - value1: "", - value2: "", - value3: "", - value4: "", - value5: "" - }); - } - this.setIndex() + this.isAddRule = true; + // this.tableData.length && this.tableData.push({ruleOperation: 0, indexNo: ""}); + if (this.tableData.length > 0) { + this.tableData.push({ + ruleOperation: 0 + }, { + indexNo: this.tableData.length + 1, + isSubject: true, + isDisabled: false, // 不禁用 + isSave: false, // 未保存 + lcId: this.lcId, + resultOperation: 0, + ruleOperation: 0, + operationIds: "", + value1: "", + value2: "", + value3: "", + value4: "", + value5: "" + }); + } else { + this.tableData.push({ + indexNo: this.tableData.length + 1, + isSubject: true, + isDisabled: false, // 不禁用 + isSave: false, // 未保存 + lcId: this.lcId, + resultOperation: 0, + ruleOperation: 0, + operationIds: "", + value1: "", + value2: "", + value3: "", + value4: "", + value5: "" + }); } + this.setIndex() }, changeResult(row) { // (左右)结果运算符(0:且 1:或 默认0) row.resultOperation = row.resultOperation === 0 ? 1 : 0;