编程类判分系统的新增去掉限制

master V2.3.0
yujialong 3 years ago
parent 1958915fc5
commit 2c64f6eccb
  1. 78
      src/views/Program.vue

@ -58,7 +58,7 @@
</div>
<div>
<el-button v-if="!isView" type="primary" size="mini" @click="batchDel">批量删除</el-button>
<el-button v-if="!isView" :disabled="isAddRule" type="primary" size="mini" @click="addRule">新增</el-button>
<el-button v-if="!isView" type="primary" size="mini" @click="addRule">新增</el-button>
</div>
</div>
@ -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;

Loading…
Cancel
Save