From b9a0875540d2d30e2d1b57dd568016c97edf88c0 Mon Sep 17 00:00:00 2001 From: e <2432808546@qq.com> Date: Tue, 23 Nov 2021 18:11:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/myTree/src/tree.vue | 2 -- src/views/Transaction.vue | 55 ++++++++++++++++++++---------- 2 files changed, 37 insertions(+), 20 deletions(-) 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) },