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) { // 新增判分点