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. 97
      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,54 +385,14 @@ export default {
lcJudgmentPoint: judgmentPoint,
lcJudgmentRuleList: judgmentRuleList
};
//
let length = judgmentRuleList.length;
let tempArr = [];
console.log(judgmentRuleList)
judgmentRuleList.forEach((item, index) => {
let obj = {
...item,
isSubject: true,
isDisabled: true, //
isSave: true //
};
//(1 2 3 4 5)
if (item.type == 1 || item.type == 2) {
obj.subjectId = Number(item.emptyOne);
obj.value1 = item.itemId;
} else if (item.type == 3) {
obj.subjectId = Number(item.emptyOne);
obj.value1 = item.emptyTwo;
} else if (item.type == 4) {
// id
if (item.emptyOne === "无限制") {
obj.value1 = item.emptyOne;
obj.value2 = "";
} else {
obj.value1 = item.emptyOne.substring(0, item.emptyOne.indexOf(","));
obj.value2 = item.emptyOne.substring(item.emptyOne.indexOf(",") + 1, item.emptyOne.length);
}
obj.value3 = item.emptyTwo;
} else if (item.type == 5) {
obj.subjectId = Number(item.emptyOne);
obj.value2 = item.emptyTwo[0];
obj.value3 = item.emptyTwo.substring(1, item.emptyTwo.indexOf("~"));
obj.value4 = item.emptyTwo.substring(item.emptyTwo.indexOf("~") + 1, item.emptyTwo.length - 1);
obj.value5 = item.emptyTwo[item.emptyTwo.length - 1];
}
tempArr.push(obj);
if (length > 1 && index !== (length - 1)) {
tempArr.push({ruleOperation: item.ruleOperation});
}
this.tableData = tempArr;
});
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,
@ -448,6 +408,48 @@ export default {
console.log(err);
});
},
//
anewPosttingData(judgmentRuleList){
let length = judgmentRuleList.length;
let tempArr = [];
judgmentRuleList.forEach((item, index) => {
let obj = {
...item,
isSubject: true,
isDisabled: true, //
isSave: true //
};
//(1 2 3 4 5)
if (item.type == 1 || item.type == 2) {
obj.subjectId = Number(item.emptyOne);
obj.value1 = item.itemId;
} else if (item.type == 3) {
obj.subjectId = Number(item.emptyOne);
obj.value1 = item.emptyTwo;
} else if (item.type == 4) {
// id
if (item.emptyOne === "无限制") {
obj.value1 = item.emptyOne;
obj.value2 = "";
} else {
obj.value1 = item.emptyOne.substring(0, item.emptyOne.indexOf(","));
obj.value2 = item.emptyOne.substring(item.emptyOne.indexOf(",") + 1, item.emptyOne.length);
}
obj.value3 = item.emptyTwo;
} else if (item.type == 5) {
obj.subjectId = Number(item.emptyOne);
obj.value2 = item.emptyTwo[0];
obj.value3 = item.emptyTwo.substring(1, item.emptyTwo.indexOf("~"));
obj.value4 = item.emptyTwo.substring(item.emptyTwo.indexOf("~") + 1, item.emptyTwo.length - 1);
obj.value5 = item.emptyTwo[item.emptyTwo.length - 1];
}
tempArr.push(obj);
if (length > 1 && index !== (length - 1)) {
tempArr.push({ruleOperation: item.ruleOperation});
}
this.tableData = tempArr;
});
},
getSubjectData(subjectId, index) { //
this.$get(`${this.api.getSubjectInfo}?subject_id=${subjectId}`).then(res => {
if (res.status === 200) {
@ -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