From dc9e2278cc9210c636d2f4e726f9d409ff1e5c17 Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Mon, 15 Aug 2022 20:22:02 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E5=9B=9E=E6=98=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/gridScoreRules.vue | 30 ++++++------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/packages/conv/creditScore/AppGridMemberScore/components/gridScoreRules.vue b/packages/conv/creditScore/AppGridMemberScore/components/gridScoreRules.vue index 5613e205..4114fe6e 100644 --- a/packages/conv/creditScore/AppGridMemberScore/components/gridScoreRules.vue +++ b/packages/conv/creditScore/AppGridMemberScore/components/gridScoreRules.vue @@ -107,7 +107,7 @@
@@ -299,9 +299,6 @@ export default { this.getList(); }, onConfirm() { - // if(this.form.ruleType==1 && !this.form.ladderRule.length) { - // return this.$message.error('请添加规则') - // } this.$refs.DialogForm.validate((valid) => { if (valid) { let formData = this.$copy(this.form); @@ -424,14 +421,6 @@ export default { .post(`/app/appgirdinfo/listAll3`, null, null) .then((res) => { if (res.code == 0) { - // res.data.forEach((item)=>{ - // const isChecked = this.girdInfoList.find((checkedId)=>{ - // return item.id === checkedId - // }) - // if(isChecked) item.checkType = true - // }) - // console.log(res.data) - this.treeObj.treeList = this.girdToTree(res.data); this.girdInfoList.map((e) => { this.treeObj.checkedKeys.push(e.id); @@ -439,7 +428,7 @@ export default { this.$nextTick(() => { this.currCheckedKeys = this.girdInfoList; this.$nextTick(() => { - this.$refs.tree?.getCheckedKeys(this.currCheckedKeys); + this.$refs.tree?.setCheckedKeys(this.currCheckedKeys); }); }); } @@ -447,14 +436,13 @@ export default { }, onCheckChange(e) { - // this.$nextTick(() => { - // this.$refs.tree.getCheckedKeys().forEach(v => { - // this.$refs.tree.setChecked(v, false) - // }) - // this.$refs.tree.setChecked(e.id, true) - // }) - // console.log(e); - this.$refs.tree.setChecked(e.id, true); + this.girdInfoList.forEach((v) => { + if(v == e.id) { + this.$refs.tree.setChecked(e.id, false); + } else { + this.$refs.tree.setChecked(e.id, true); + } + }) }, }, computed: {