zhongxiaoyu 3 жил өмнө
parent
commit
1a2f60f962

+ 3 - 2
src/views/accountGroupManagement/components/accountGroupEdit.vue

@@ -211,11 +211,11 @@ export default {
     const { OpenRole } = obj
     this.openRole = OpenRole
     this.accountGroupTreeCheckedTemp = [this.GroupUpId]
-    this.groupIds.push(this.GroupUpId)
     this.queryIds.push(this.GroupUpId)
     this.doesGroupExist && (this.GroupId = Number(this.$route.query.GroupId))
   },
   mounted() {
+    this.groupIds.push(this.GroupUpId)
     if (this.doesGroupExist) {
       this.getGroupDetails()
     } else {
@@ -281,13 +281,14 @@ export default {
         console.log(arr)
         const GroupIds = arr.map(item => item.GroupId)
         this.accountGroupTreeCheckedTemp = GroupIds
-        // this.roleType = 'roleByUpId'
+        this.roleType = 'roleByUpId'
         this.groupIds = GroupIds
         this.queryType = 'group'
         this.queryIds = GroupIds
       } else {
         this.accountGroupTreeCheckedTemp = [-1]
         // this.roleType = 'onlyRole'
+        this.groupIds = []
         this.queryType = 'all'
       }
     },

+ 3 - 2
src/views/accountManagement/components/accountEdit.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: Badguy
  * @Date: 2022-02-15 11:37:42
- * @LastEditTime: 2022-03-02 11:09:58
+ * @LastEditTime: 2022-03-10 18:34:30
  * @LastEditors: your name
  * @Description: 编辑账号
  * have a nice day!
@@ -335,7 +335,8 @@ export default {
         this.queryIds = GroupIds
       } else {
         this.accountGroupTreeCheckedTemp = [-1]
-        this.roleType = 'onlyRole'
+        // this.roleType = 'onlyRole'
+        this.groupIds = []
         this.queryType = 'all'
       }
     },