序号修复

master
jialong.yu 3 years ago
parent b1fd5ee8dc
commit 861861215a
  1. 18
      src/views/Program.vue
  2. 43
      src/views/Transaction.vue

@ -69,7 +69,11 @@
header-align="center"
:header-cell-style="headClass"
>
<el-table-column prop="id" type="index" label="序号" width="80"></el-table-column>
<el-table-column prop="id" type="index" label="序号" width="80">
<template slot-scope="scope">
{{ scope.row.isSubject && scope.row.index + 1 }}
</template>
</el-table-column>
<el-table-column label="编译器中正确答案" align="center">
<template slot-scope="scope" v-if="scope.row.isSubject">
<p class="p">字段一致性规则用户编辑器中至少出现如下语句</p>
@ -199,6 +203,13 @@ export default {
console.log(err)
});
},
//
setIndex() {
let i = 0
this.tableData.map(e => {
if (e.isSubject) e.index = i++
})
},
//
anewPosttingData(judgmentRule){
let length = judgmentRule.length;
@ -239,7 +250,7 @@ export default {
tempArr.push({ruleOperation: item.ruleOperation});
}
this.tableData = tempArr;
console.log(this.tableData)
this.setIndex()
});
},
handleBlur() { // /
@ -372,6 +383,7 @@ export default {
value5: ""
});
}
this.setIndex()
}
},
changeResult(row) { // (0 1 0)
@ -402,6 +414,7 @@ export default {
// this.tableData.splice(index, 1);
this.isAddRule = false;
}
this.setIndex()
},
handleDelete(index) { //
this.$confirm("此操作将永久删除该规则, 是否继续?", "提示", {
@ -417,6 +430,7 @@ export default {
}
this.itemkey = Math.random()
this.isAddRule = false;
this.setIndex()
}).catch(() => {})
},
//

@ -85,6 +85,9 @@
header-align="center"
>
<el-table-column prop="indexNo" type="index" label="序号" width="80">
<template slot-scope="scope">
{{ scope.row.isSubject && scope.row.index + 1 }}
</template>
</el-table-column>
<el-table-column label="流程类考核点">
<template slot-scope="scope" v-if="scope.row.isSubject">
@ -92,25 +95,12 @@
<div class="tree-con">
<div class="block1" :id="'divTree'+scope.$index">
<el-tree :data="scope.row.operationIData" :props="defaultProp" :default-expand-all="true"></el-tree>
<!-- <my-tree-->
<!-- :id="'depTree'+scope.$index"-->
<!-- class="action"-->
<!-- :ref="'tree-'+scope.$index"-->
<!-- :data="treeData"-->
<!-- :props="defaultProps"-->
<!-- default-expand-all-->
<!-- node-key="operationIds"-->
<!-- show-checkbox-->
<!-- @check-change="(data, checked, indeterminate) => {-->
<!-- handleCheckChange(data, checked, indeterminate, scope.row, scope.$index);-->
<!-- }"-->
<!-- ></my-tree>-->
</div>
<div v-show="scope.row.isDisabled" class="mask"></div>
</div>
</template>
</el-table-column>
<el-table-column label=" " width="150">
<el-table-column label=" " width="150" align="center">
<template slot-scope="scope">
<el-button
circle
@ -118,7 +108,6 @@
v-if="scope.row.isSubject"
:disabled="isView || scope.row.isDisabled"
@click="changeResult(scope.row)"
style="position: absolute; right: 55px"
>
{{ scope.row.resultOperation === 0 ? "且" : "或" }}
</el-button>
@ -446,6 +435,7 @@ export default {
// await this.getSubjectData(item.emptyOne, index);
}
});
this.setIndex()
this.loading = false
} else {
this.$message.warning(res.message);
@ -476,7 +466,7 @@ export default {
this.counts = this.counts+1
let list = []
if (this.SelectedObj.checkedNodes.length > 0){
for (var i=0;i<this.SelectedObj.checkedNodes.length;i++){
for (let i=0;i<this.SelectedObj.checkedNodes.length;i++){
if(this.SelectedObj.checkedNodes[i].children.length > 0){
}else{
@ -488,6 +478,7 @@ export default {
}
}
this.anewPosttingDatas(list)
let i = 0
this.tableData.forEach(async (item, index) => {
//
if (!item.type){
@ -512,6 +503,7 @@ export default {
item.operationIData.push(testObj)
}
});
this.setIndex()
this.configVisible = false
},
anewPosttingDatas(judgmentRuleList){
@ -823,15 +815,10 @@ export default {
addRules(){
this.configVisible = true;
let operationIds = []
console.log(this.treeData)
for (var i=0;i<this.tableData.length;i++){
if (this.tableData[i].operationIds){
operationIds.push(this.tableData[i].operationIds)
}
}
console.log(operationIds)
this.tableData.map((e, i) => {
e.operationIds && operationIds.push(e.operationIds)
})
this.$refs.tree.setCheckedKeys([]);
},
addRule() { //
this.changeArr.splice(0, this.changeArr.length)
@ -884,6 +871,13 @@ export default {
row.ruleOperation = row.ruleOperation === 0 ? 1 : 0;
this.tableData[index - 1].ruleOperation = row.ruleOperation;
},
//
setIndex() {
let i = 0
this.tableData.map(e => {
if (e.isSubject) e.index = i++
})
},
handleEdit(row) { //
this.judgePoints = true
this.tableDataCopy = deepCopy(this.tableData); //
@ -954,6 +948,7 @@ export default {
}
this.isAddRule = false;
}
this.setIndex()
},
handleDelete(row, index) { //
this.$confirm("此操作将永久删除该规则, 是否继续?", "提示", {

Loading…
Cancel
Save