chenjun 3 жил өмнө
parent
commit
47a9c4a393

+ 9 - 14
src/views/accountGroupManagement/components/accountGroupEdit.vue

@@ -45,7 +45,8 @@
               :checkedKeys="[GroupUpid]"
               :nodekey="'GroupId'"
               :checkedIdList="checkedIdList"
-              @getCheckedData="getTreeData"
+              @getTreeData="getTreeData"
+              :type="true"
             />
           </div>
         </el-col>
@@ -86,7 +87,7 @@
               :nodekey="'GroupId'"
               :checkedKeys="[GroupUpid]"
               :checkedIdList="checkedIdList"
-              @getCheckedData="getTreeData"
+              @getTreeData="getTreeData"
             />
           </div>
         </el-col>
@@ -122,7 +123,7 @@
   </div>
 </template>
 <script>
-import Organization from "@/components/organization/index.vue";
+import Organization from "@/components/usergrouptree/index.vue";
 import Permissiontree from "@/components/permissiontree/index.vue";
 import Rulesofcompetency from "@/components/rulesofcompetency/index.vue";
 import rolelists from "@/components/rolelist/index.vue";
@@ -259,17 +260,11 @@ export default {
     //获取选中的树数据
     getTreeData(arr) {
       this.checkTrees = arr;
-      this.checkTrees.forEach((item) => {
-        if (item[0]) {
-          item.disabled = true;
-        }
-      });
-      let objArr = arr[arr.length - 1];
-      if (objArr.GroupId != -1) {
-        this.objID = objArr.GroupId + "";
-        this.queryRole();
-      } else {
-        this.RoleBox();
+      if(this.checkTrees.length==1){
+        let id = arr[0].GroupId
+        console.log(id)
+        this.GroupIds = [id]
+        // this.GroupIds = [arr[0].GroupId]
       }
     },