Browse Source

修复 全选问题

1
mo 3 years ago
parent
commit
c9814a9ffc
1 changed files with 7 additions and 3 deletions
  1. 7 3
      src/views/categroyManager/productSystem/memberSet.vue

+ 7 - 3
src/views/categroyManager/productSystem/memberSet.vue

@@ -338,7 +338,7 @@ export default {
       this.title = "新增会员等级";
       this.addDisabled = false;
       this.pageType = "create";
-      this.getNewTree()
+      this.getNewTree();
       this.slideCount = 0;
       this.treeData = this.setTableData(this.silderList, this.addDisabled);
       this.branchStatus = true;
@@ -469,7 +469,7 @@ export default {
     },
     async resetTree(row) {
       try {
-        this.getNewTree();
+       this.treeData = await this.getNewTree()
         const res = await getmemberRankDetail({ memberRankSettingId: row.id });
         this.form = { ...res.data };
 
@@ -486,6 +486,9 @@ export default {
           this.treeData
         );
         this.checkList = tSplice;
+        this.$nextTick(() => {
+          this.$refs.tree.setCheckedKeys(this.checkList);
+        });
       } catch (e) {
         console.log(e);
       }
@@ -495,8 +498,9 @@ export default {
         const resTree = await getMemberPrivilegesItem();
         this.silderList = resTree.data;
         this.slideCount = 0;
-        this.treeData = this.setTableData(resTree.data);
+         return this.setTableData(resTree.data)
       } catch {}
+
     },
   },
 };