py项目增加上下且或判断

master
e 3 years ago
parent e09cd40788
commit 0bcbf95952
  1. 9
      src/views/Program.vue

@ -84,13 +84,14 @@
<el-table-column label=" " width="150">
<template slot-scope="scope">
<el-button
circle
type="primary"
v-if="scope.row.isSubject"
:disabled="isView || scope.row.isDisabled"
type="primary" circle
@click="changeResult(scope.row)"
style="position: absolute; right: 55px"
>
{{ scope.row.withOr === 0 ? '且' : '或' }}
{{ scope.row.resultOperation === 0 ? '且' : '或' }}
</el-button>
<el-button v-else type="primary" circle @click="changeRule(scope.row, scope.$index)">
{{ scope.row.ruleOperation === 0 ? "且" : "或" }}
@ -299,7 +300,7 @@ export default {
bcId: i.bcId,
required: i.required,
result: i.result,
withOr: i.withOr
resultOperation: i.resultOperation
};
tempArr.push(obj)
});
@ -370,7 +371,7 @@ export default {
}
},
changeResult(row) { // (0 1 0)
row.withOr = row.withOr === 0 ? 1 : 0;
row.resultOperation = row.resultOperation === 0 ? 1 : 0;
},
changeRule(row, index) { // (0 1 0)
row.ruleOperation = row.ruleOperation === 0 ? 1 : 0;

Loading…
Cancel
Save