Browse Source

Merge branch 'test' into 02/24resetMain

mo 4 years ago
parent
commit
cc03142362

File diff suppressed because it is too large
+ 0 - 0
dist/index.html


+ 1 - 1
dist/static/css/chunk-00d0e220.11d02d17.css → dist/static/css/chunk-3221000e.824a5e1c.css

@@ -1 +1 @@
-[data-v-67661593] .el-input-group__append{width:88px}.feeInput[data-v-67661593] .el-input__inner{width:120px!important}/deep/.avatar-uploader .el-upload,/deep/.upload-demo .el-upload{border-radius:6px;cursor:pointer;position:relative;overflow:hidden}.avatar-uploader .el-upload:hover{border-color:#409eff}.avatar-uploader-icon{border:1px dashed #d9d9d9;font-size:28px;color:#8c939d;width:120px;height:120px;line-height:120px;text-align:center}.avatar{width:120px;height:120px;display:block}.ivu-upload{display:none}.tree[data-v-f7d67d3a]{min-width:630px}
+[data-v-67661593] .el-input-group__append{width:88px}.feeInput[data-v-67661593] .el-input__inner{width:120px!important}/deep/.avatar-uploader .el-upload,/deep/.upload-demo .el-upload{border-radius:6px;cursor:pointer;position:relative;overflow:hidden}.avatar-uploader .el-upload:hover{border-color:#409eff}.avatar-uploader-icon{border:1px dashed #d9d9d9;font-size:28px;color:#8c939d;width:120px;height:120px;line-height:120px;text-align:center}.avatar{width:120px;height:120px;display:block}.ivu-upload{display:none}.tree[data-v-1c5351fd]{min-width:630px}

File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.48d22476.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-00d0e220.dd83bc90.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-3221000e.7dd807b2.js


+ 0 - 0
dist/static/js/chunk-68051099.c93e762e.js → dist/static/js/chunk-68051099.af885b48.js


+ 16 - 15
src/views/categroyManager/productSystem/memberSet.vue

@@ -215,7 +215,7 @@
               node-key="id"
               @check="onTreeCheck"
               :filter-node-method="filterNode"
-              ref="tree"
+              ref="trees"
               highlight-current
               :default-checked-keys="checkList"
               :props="defaultProps"
@@ -313,7 +313,7 @@ export default {
         icon: "",
         into: "",
       }),
-        this.$refs.tree.setCheckedNodes([]);
+        this.$refs.trees.setCheckedNodes([]);
       this.onTreeCheck();
       this.$refs[ruleForm].resetFields();
     },
@@ -346,8 +346,8 @@ export default {
     onSubmit() {
       this.$refs.ruleForm.validate(async (flag) => {
         if (flag) {
-          let tempIds = this.$refs.tree.getCheckedKeys();
-          let halfIds = this.$refs.tree.getHalfCheckedKeys();
+          let tempIds = this.$refs.trees.getCheckedKeys();
+          let halfIds = this.$refs.trees.getHalfCheckedKeys();
           let allIds = [...tempIds, ...halfIds];
           if (this.pageType == "update") {
             try {
@@ -379,13 +379,13 @@ export default {
       if (val) {
         // 先去掉半选
         this.isIndeterminate = false;
-        this.$refs.tree.setCheckedNodes(this.treeData);
+        this.$refs.trees.setCheckedNodes(this.treeData);
       } else {
-        this.$refs.tree.setCheckedNodes([]);
+        this.$refs.trees.setCheckedNodes([]);
       }
     },
     onTreeCheck() {
-      let checkTree = this.$refs.tree.getCheckedKeys();
+      let checkTree = this.$refs.trees.getCheckedKeys();
       this.checkAll = checkTree.length >= this.slideCount;
       this.isIndeterminate =
         checkTree.length > 0 && checkTree.length < this.slideCount;
@@ -395,12 +395,12 @@ export default {
       return data.label.indexOf(value) !== -1;
     },
     seachRoles() {
-      this.$refs.tree.filter(this.seachRoleValue);
+      this.$refs.trees.filter(this.seachRoleValue);
     },
     onReSetRole() {
       this.seachRoleValue = "";
       // this.data = this.setTableData(this.silderList);
-      this.$refs.tree.filter(this.seachRoleValue);
+      this.$refs.trees.filter(this.seachRoleValue);
       // console.log(this.data);
     },
     setTableData(result, disabled) {
@@ -426,6 +426,7 @@ export default {
       return list;
     },
     async resetMember(row, type) {
+       this.branchStatus = true;
     await  this.resetTree(row);
       if (type) {
         this.title = "修改会员等级";
@@ -440,7 +441,7 @@ export default {
         this.slideCount = 0;
         this.treeData = await this.setTableData(this.silderList, this.addDisabled);
       }
-      this.branchStatus = true;
+
     },
     //递归获取到所有的为子级的ID
     getParent(checkIds, data) {
@@ -474,20 +475,20 @@ export default {
         this.form = { ...res.data };
 
         this.checkAll =
-          res.data.memberPrivilegesItemIdList.length >= this.slideCount;
+          res.data.memberPrivilegesItemIdList?.length >= this.slideCount || false;
         // 反写树的值
         this.isIndeterminate =
-          res.data.memberPrivilegesItemIdList.length > 0 &&
-          res.data.memberPrivilegesItemIdList.length < this.slideCount;
+          res.data.memberPrivilegesItemIdList?.length > 0 &&
+          res.data.memberPrivilegesItemIdList?.length < this.slideCount;
 
         this.checkList = res.data.memberPrivilegesItemIdList;
         let tSplice = this.getParent(
-          res.data.memberPrivilegesItemIdList,
+          res.data.memberPrivilegesItemIdList||[],
           this.treeData
         );
         this.checkList = tSplice;
         this.$nextTick(() => {
-          this.$refs.tree.setCheckedKeys(this.checkList);
+          this.$refs.trees.setCheckedKeys(this.checkList);
         });
       } catch (e) {
         console.log(e);

Some files were not shown because too many files changed in this diff