master
e 3 years ago
parent 3d16464f13
commit 0336e798e9
  1. 5
      src/components/myTree/src/tree.vue
  2. 1
      src/components/quill/index.vue
  3. 53
      src/views/Transaction.vue

@ -13,10 +13,12 @@
v-for="child in root.childNodes"
:node="child"
:props="props"
highlight-current
:render-after-expand="renderAfterExpand"
:show-checkbox="showCheckbox"
:key="getNodeKey(child)"
:render-content="renderContent"
node-key="orgCode"
@node-expand="handleNodeExpand">
</el-tree-node>
<div class="el-tree__empty-block" v-if="isEmpty">
@ -135,8 +137,10 @@
children: {
set(value) {
this.data = value;
console.log(this.data)
},
get() {
console.log(this.data)
return this.data;
}
},
@ -484,6 +488,7 @@
},
mounted() {
console.log(this.data)
this.initTabIndex();
this.$el.addEventListener('keydown', this.handleKeydown);
},

@ -148,7 +148,6 @@
});
// quill
this.Quill.on('text-change', (delta, oldDelta, source) => {
console.log(this.Quill)
this.$emit('on-text-change', delta, oldDelta, source);
});
this.Quill.on('selection-change', (range, oldRange, source) => {

@ -385,11 +385,33 @@ export default {
lcJudgmentPoint: judgmentPoint,
lcJudgmentRuleList: judgmentRuleList
};
this.anewPosttingData(judgmentRuleList)
this.tableData.forEach(async (item, index) => {
//
if (item.operationIds) {
this.$nextTick(() => {
this.$refs[`tree-${index}`].setCheckedKeys([item.operationIds]);
// this.scrollToDepTree(item.operationIds)
});
}
// id,
if (item.isSubject && item.type && item.type != 4 && item.emptyOne) {
await this.getSubjectData(item.emptyOne, index);
}
});
} else {
this.$message.warning(res.message);
}
}).catch(err => {
console.log(err);
});
},
//
anewPosttingData(judgmentRuleList){
let length = judgmentRuleList.length;
let tempArr = [];
console.log(judgmentRuleList)
judgmentRuleList.forEach((item, index) => {
let obj = {
...item,
@ -427,26 +449,6 @@ export default {
}
this.tableData = tempArr;
});
this.tableData.forEach(async (item, index) => {
//
if (item.operationIds) {
this.$nextTick(() => {
this.$refs[`tree-${index}`].setCheckedKeys([item.operationIds]);
});
}
// id,
if (item.isSubject && item.type && item.type != 4 && item.emptyOne) {
await this.getSubjectData(item.emptyOne, index);
}
});
} else {
this.$message.warning(res.message);
}
}).catch(err => {
console.log(err);
});
},
getSubjectData(subjectId, index) { //
this.$get(`${this.api.getSubjectInfo}?subject_id=${subjectId}`).then(res => {
@ -488,7 +490,7 @@ export default {
if (res.status === 200 && res.list) {
if (res.list.length) {
this.treeData = this.toTreeId(res.list, res.list[0].parentId);
console.log(this.treeData)
// console.log(this.treeData)
}
} else {
this.$message.warning(res.message);
@ -630,6 +632,8 @@ export default {
this.isAddRule = true;
// this.tableData.length && this.tableData.push({ruleOperation: 0, indexNo: ""});
this.tableData.push({
ruleOperation: 0
},{
indexNo: this.tableData.length +1,
isSubject: true,
isDisabled: false, //
@ -645,6 +649,7 @@ export default {
value5: ""
});
console.log(this.tableData)
// anewPosttingData(judgmentRuleList)
},
changeResult(row) { // (0 1 0)
row.resultOperation = row.resultOperation === 0 ? 1 : 0;
@ -713,7 +718,7 @@ export default {
this.$refs[`tree-${index}`].setCheckedKeys([this.tableData[index].operationIds]);
}
} else {
this.tableData.splice(index, 1);
this.tableData.splice(index-1, 2);
// index ? this.tableData.splice(index - 1, 1) : this.tableData.splice(0, 1);
this.isAddRule = false;
}
@ -728,7 +733,7 @@ export default {
// if(index+1 == this.tableData.length){
// index = index-1
// }
this.tableData.splice(index,1);
this.tableData.splice(index,2);
index ? this.tableData.splice(index - 1, 1) : this.tableData.splice(0, 1);
this.itemkey = Math.random()
this.tableData.forEach(async (item, index) => {

Loading…
Cancel
Save