From 3fb67521fb06e85d14b9ff20a92e032278b7ecc3 Mon Sep 17 00:00:00 2001 From: e <2432808546@qq.com> Date: Tue, 21 Dec 2021 17:13:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A4=E6=96=AD=E5=AD=97=E6=AE=B5=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Program.vue | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/views/Program.vue b/src/views/Program.vue index 7d78fa0..3dcff48 100644 --- a/src/views/Program.vue +++ b/src/views/Program.vue @@ -281,13 +281,13 @@ export default { return; } else { for (let i = 0; i < this.tableData.length; i++) { - if (!this.tableData[i].required) { + if (this.tableData[i].isSubject && !this.tableData[i].required) { this.$message.warning(`第${i + 1}项,规则要求不能为空`); return; - } else if (!this.tableData[i].result) { + } else if (this.tableData[i].isSubject && !this.tableData[i].result) { this.$message.warning(`第${i + 1}项,规则结果不能为空`); return; - } else if (!this.tableData[i].isSave) { + } else if (this.tableData[i].isSubject && !this.tableData[i].isSave) { this.$message.warning(`第${i + 1}项,未保存`); return; } @@ -295,14 +295,17 @@ export default { } let tempArr = []; this.tableData.forEach(i => { - let obj = { - id: i.id ? i.id : "", - bcId: i.bcId, - required: i.required, - result: i.result, - resultOperation: i.resultOperation - }; - tempArr.push(obj) + if (i.isSubject) { + let obj = { + id: i.id ? i.id : "", + bcId: i.bcId, + required: i.required, + result: i.result, + resultOperation: i.resultOperation, + ruleOperation: i.ruleOperation + }; + tempArr.push(obj) + } }); this.formData.bcJudgmentRuleList = tempArr; if (this.isAdd) { // 新增判分点