diff --git a/src/components/myTree/src/tree.vue b/src/components/myTree/src/tree.vue index 5b53bbf..44cf9f4 100644 --- a/src/components/myTree/src/tree.vue +++ b/src/components/myTree/src/tree.vue @@ -137,10 +137,8 @@ children: { set(value) { this.data = value; - console.log(this.data) }, get() { - console.log(this.data) return this.data; } }, diff --git a/src/views/Transaction.vue b/src/views/Transaction.vue index 8546fb9..6284db3 100644 --- a/src/views/Transaction.vue +++ b/src/views/Transaction.vue @@ -392,6 +392,7 @@ export default { this.$nextTick(() => { this.$refs[`tree-${index}`].setCheckedKeys([item.operationIds]); + // this.$refs.tree.setCurrentKey(item.operationIds) // this.scrollToDepTree(item.operationIds) }); } @@ -583,6 +584,7 @@ export default { if (i.type == 1 || i.type == 2) { obj.emptyOne = i.subjectId ? i.subjectId.toString() : ""; obj.itemId = i.value1 ? i.value1.toString() : ""; + obj.emptyTwo = i.value1 ? i.value1.toString() : ""; } else if (i.type == 3) { obj.emptyOne = i.subjectId ? i.subjectId.toString() : ""; obj.emptyTwo = i.value1; @@ -615,7 +617,6 @@ export default { console.log(err); }); } else if (this.isEdit) { // 编辑判分点 - console.log(this.formData) this.$post(this.api.updateJudgmentPoint, this.formData).then(res => { if (res.status === 200) { this.$message.success("更新判分点成功"); @@ -631,23 +632,41 @@ export default { addRule() { // 新增规则 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, // 不禁用 - isSave: false, // 未保存 - lcId: this.lcId, - resultOperation: 0, - ruleOperation: 0, - operationIds: "", - value1: "", - value2: "", - value3: "", - value4: "", - value5: "" - }); + 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: "" + }); + } console.log(this.tableData) // anewPosttingData(judgmentRuleList) },