瀏覽代碼

修改账号

zhaoke 2 年之前
父節點
當前提交
c91db5f7d0

+ 25 - 8
src/views/accountManagement/components/accountHome.vue

@@ -26,7 +26,7 @@
                     <div class="flex-wrap">
                       <div class="name">{{ account.user_name }}</div>
                       <div class="loger" @click="toEdit(account.user_id)" />
-                      <div @click="authAccount(account)" class="loger cap-auth"></div>
+                      <div v-is="['account_authorization_button']" @click="authAccount(account)" class="loger cap-auth"></div>
                     </div>
                     <div class="del" @click="deleteUser(account)">
                       <i class="el-icon-close" />
@@ -176,6 +176,8 @@ export default {
         label: "user_group_name",
       },
       options: [],
+      msgType: "all",
+      msgId: null,
     };
   },
   computed: {
@@ -257,11 +259,16 @@ export default {
     },
     //用户组点击
     handleNodeClick(data) {
+      this.accountArr = [];
       if (data.user_group_id != -1 && data.up_user_group_id != -2) {
         this.PageIndex = 1;
-        this.pages = 1;
-        this.getAccountData(data.user_group_id);
+        // this.pages = 1;
+        this.msgType = "cld";
+        this.msgId = data.user_group_id;
+        this.accountList();
+        //this.getAccountData(data.user_group_id);
       } else {
+        this.msgType = "all";
         this.clearSearchData();
       }
     },
@@ -269,6 +276,7 @@ export default {
       const res = await Query({
         id: DATACONTENT_ID.accountGroupDetailsId,
         dataContent: [id],
+        needPage: this.PageIndex,
       });
       if (res.code == 0) {
         const { listValues } = res.returnData;
@@ -424,11 +432,20 @@ export default {
     async accountList() {
       try {
         this.loading = true;
-        const result = await Query({
-          id: DATACONTENT_ID.accountTableId,
-          needPage: this.PageIndex,
-          dataContent: [this.searchInfo],
-        });
+        let result = null;
+        if (this.msgType == "all") {
+          result = await Query({
+            id: DATACONTENT_ID.accountTableId,
+            needPage: this.PageIndex,
+            dataContent: [this.searchInfo],
+          });
+        } else {
+          result = await Query({
+            id: DATACONTENT_ID.accountGroupDetailsId,
+            dataContent: [this.msgId],
+            needPage: this.PageIndex,
+          });
+        }
         if (result.code == 0) {
           this.loading = false;
           const newDatas = result.returnData.listValues;

+ 1 - 1
src/views/authorityManagement/components/authorityRoleHome.vue

@@ -32,7 +32,7 @@
                     <div class="msg flex-wrap">
                       <p :title="item.role_name" class="name">{{ item.role_name }}</p>
                       <div @click="editRole(item)" class="cap cap-edit"></div>
-                      <div @click="authRole(item)" class="cap cap-auth"></div>
+                      <div v-is="['role_authorization_button']" @click="authRole(item)" class="cap cap-auth"></div>
                     </div>
                   </div>
                   <div class="info-close">