From bfb2c6cc4ddb03fa32dc2345cfbe3dc3d90c9a18 Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期四, 22 二月 2024 10:14:07 +0800
Subject: [PATCH] 权限平台 联系人姓名相关bug修复

---
 src/views/unifiedManage/userLevel/index.vue |   65 ++++++++++++++++++++------------
 1 files changed, 41 insertions(+), 24 deletions(-)

diff --git a/src/views/unifiedManage/userLevel/index.vue b/src/views/unifiedManage/userLevel/index.vue
index 94d452e..ce5d583 100644
--- a/src/views/unifiedManage/userLevel/index.vue
+++ b/src/views/unifiedManage/userLevel/index.vue
@@ -59,19 +59,29 @@
         </div>
       </div>
     </div>
-    <div class="overSpread" v-show="isopen"></div>
     <!-- 娣诲姞/缂栬緫 -->
-    <AddUserLevel :isopen="isopen" @shutdown="shutdown" :editRow="editRow" />
+    <AddUserLevel v-if="editConfig.visible" :edit-common-config="editConfig" />
   </div>
 </template>
 
 <script>
 import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
 import AddUserLevel from "@/views/unifiedManage/userLevel/components/AddUserLevel"
-import { getListRole, getUserList, roleChange, deleteRole } from "@/api/unifiedManage/userLevel"
+import { getListRole, getUserList, roleChange, deleteRole, getTotal } from "@/api/unifiedManage/userLevel"
 export default {
   name: "UserLevel",
-  props: {},
+  props: {
+    isDetail: {
+      type: Boolean,
+      default: false
+    },
+    addConfig: {
+      type: Object,
+      default: () => {
+        return {}
+      }
+    }
+  },
   mixins: [pageMixin],
   components: { AddUserLevel },
   computed: {},
@@ -114,7 +124,6 @@
       ],
       showBottomCol: ["鐢ㄦ埛鍚�", "濮撳悕", "鎵嬫満鍙�", "宀椾綅鑱屽姟", "鐘舵��"],
       isopen: false,
-      editRow: {},
       editConfig: {
         visible: false,
         title: "鏂板缓",
@@ -133,6 +142,24 @@
     this.getData()
   },
   methods: {
+    // 鏁伴噺缁熻
+    overview() {
+      getTotal({
+        useType: 1
+      }).then((reply) => {
+        console.log(reply)
+        if (reply.code == 200) {
+          this.totalObject.value = reply.data.total
+          this.otherOptions.map((item) => {
+            if (item.label === "鍚敤") {
+              item.value = reply.data.use
+            } else if (item.label === "鍋滅敤") {
+              item.value = reply.data.ban
+            }
+          })
+        }
+      })
+    },
     // 瑙掕壊鍒楄〃
     async getData(val) {
       this.data.page = this.pagerOptions.currPage
@@ -148,7 +175,7 @@
         this.getUserList(row.id)
       }
       if (val !== "search") {
-        // this.overview();
+        this.overview()
       }
     },
     // 鐢ㄦ埛鍒楄〃
@@ -177,17 +204,15 @@
     },
     // 鏂板缓
     addBtnClick() {
-      // this.editConfig.title = "鏂板缓"
-      // this.editConfig.visible = true
-      // this.editConfig.infomation = {}
-      this.isopen = true
-      this.editRow = {}
+      this.editConfig.title = "鏂板缓"
+      this.editConfig.visible = true
+      this.editConfig.infomation = {}
     },
     // 鎼滅储
     searchClick(val) {
       this.data.keyword = val
       this.pagerOptions.currPage = 1
-      // this.getData();
+      this.getData("search")
     },
     // 鍋滅敤
     changeStatusClick(row) {
@@ -221,11 +246,9 @@
     // 缂栬緫
     handleClick(val) {
       console.log(val)
-      // this.editConfig.title = "缂栬緫"
-      // this.editConfig.infomation = { ...val }
-      // this.editConfig.visible = true
-      this.editRow = val
-      this.isopen = true
+      this.editConfig.title = "缂栬緫"
+      this.editConfig.infomation = { ...val }
+      this.editConfig.visible = true
     },
     // 鍒犻櫎绛夌骇
     delClick(row) {
@@ -248,17 +271,11 @@
         })
         .catch(() => {})
     },
-    shutdown() {
-      this.isopen = false
-      setTimeout(() => {
-        this.getData()
-      }, 200)
-    },
     // 琛岀偣鍑�
     tableRowClick(row) {
       console.log(row)
       this.selectRow = row
-      // this.getUserList(row.id);
+      this.getUserList(row.id)
     },
     // 绛夌骇鐘舵��
     getRoleStatus(val) {

--
Gitblit v1.8.0