From 8f115311af95cb2fe0d7bee2d8a97dcbc059a263 Mon Sep 17 00:00:00 2001
From: feige <791364011@qq.com>
Date: 星期四, 22 八月 2024 10:59:03 +0800
Subject: [PATCH] 修改权限相关

---
 ruoyi-ui/src/views/doctor/index.vue |   79 ++++++++++++++++++++++++++++-----------
 1 files changed, 56 insertions(+), 23 deletions(-)

diff --git a/ruoyi-ui/src/views/doctor/index.vue b/ruoyi-ui/src/views/doctor/index.vue
index ddec3fd..3ec4f18 100644
--- a/ruoyi-ui/src/views/doctor/index.vue
+++ b/ruoyi-ui/src/views/doctor/index.vue
@@ -175,10 +175,6 @@
           >灞曠ず涓嬭浇鐨勫垎浜暟鎹�</el-button>
         </el-col>
 
-
-
-
-
         <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
       </el-row>
     </div>
@@ -573,6 +569,15 @@
             </el-table-column>
           </el-table>
 
+          <pagination
+            v-show="total1>0"
+            :total="total1"
+            :page.sync="queryParams2.pageNo"
+            :limit.sync="queryParams2.pageSize"
+            @pagination='fenYe'
+            style="background: #FEF7FC;"
+          />
+
     </el-dialog>
 
 
@@ -617,15 +622,16 @@
       queryParams1: {
         pageNum: 1,
         pageSize: 10,
-        identity:undefined,
-        nickName:undefined,
-        sex:undefined,
-        birth:undefined,
+      },
+      queryParams2: {
+        pageNo: 1,
+        pageSize: 10,
       },
       ids1: [],
       single1: true,
       multiple1: true,
       dateRange1: [],
+
 
       userId: undefined,
       // 閬僵灞�
@@ -642,6 +648,7 @@
       showSearch: true,
       // 鎬绘潯鏁�
       total: 0,
+      total1: 0,
       // 灏忓尰鐢熻〃鏍兼暟鎹�
       doctorList: [],
       typeList:[],
@@ -768,9 +775,22 @@
     this.getList1();
   },
   methods: {
+    // 鍒嗛〉
+    fenYe(){
+      // @pagination='ifNum === 1 ? selectValue : (ifNum === 2 ? whoShare : showData)'
+      if(this.ifNum === 1){
+        this.selectValue(this.selectWho)
+      }else if(this.ifNum === 2){
+        this.whoShare()
+      }else{
+        this.showData()
+      }
+    },
     // 鍏抽棴寮圭獥鍚�
     handleClose(){
       this.user = ''
+      this.queryParams2.pageNo = 1
+            this.total1 = 0
     },
     handleClose2(){
       this.$refs.table1.clearSelection()
@@ -792,8 +812,9 @@
         Message({ message: "鏀跺洖鎴愬姛", type: 'success' })
 
         const list2 = {"shareIds": [this.selectWho]}
-        shareToWho(list2).then(response => {
-          this.shareList1 = response.data
+        shareToWho(list2,this.queryParams2).then(response => {
+          this.shareList1 = response.data.data
+          this.total1 = response.data.total;
         })
       })
     },
@@ -803,8 +824,10 @@
       this.ifNum = 3
       this.open2 = true
       this.title2 = "涓嬭浇鐨勫垎浜暟鎹�";
-      showShareData().then(response => {
-        this.shareList1 = response
+      showShareData(this.queryParams2).then(response => {
+        this.shareList1 = response.data.data
+        this.total1 = response.data.total;
+        // console.log(response,'灞曠ず涓嬭浇鐨勫垎浜暟鎹睍绀轰笅杞界殑鍒嗕韩鏁版嵁')
       })
     },
     // 灞曠ず鍒嗕韩缁欐垜鐨勬暟鎹�
@@ -814,10 +837,11 @@
       this.open2 = true
       this.title2 = "鍒嗕韩缁欐垜鐨勬暟鎹�";
       // const list = {"shareId": this.userList}
-      const list = {"shareId": 111}
-      getWhoShare(list).then(response => {
-        const data = response.data
-        console.log(data,'灞曠ず鍒嗕韩缁欐垜鐨勬暟鎹睍绀哄垎浜粰鎴戠殑鏁版嵁s')
+      // const list = {"shareId": 111}
+      getWhoShare(this.queryParams2).then(response => {
+        const data = response.data.data
+        this.total1 = response.data.total
+        console.log(response,'灞曠ず鍒嗕韩缁欐垜鐨勬暟鎹睍绀哄垎浜粰鎴戠殑鏁版嵁s')
         for(let i in data){
           console.log(i,'灞曠ず鍒嗕韩缁欐垜鐨勬暟鎹睍绀哄垎浜粰鎴戠殑鏁版嵁')
           this.shareList1.push(data[i])
@@ -829,12 +853,18 @@
     selectValue(value){
       this.selectWho = value
       this.shareList1 = []
-      const list = {"shareIds": [value]}
-      shareToWho(list).then(response => {
-        this.loading2 = true;
-        this.shareList1 = response.data
-        this.loading2 = false;
-        // console.log(this.shareList1,'鍒嗕韩缁欒皝浜嗕粈涔堟暟鎹垎浜粰璋佷簡浠�涔堟暟鎹�')
+      const list = {"shareIds": [this.selectWho]}
+      shareToWho(list,this.queryParams2).then(response => {
+        // this.loading2 = true;
+        response.data.data.forEach(res=>{
+          if(res){
+            this.shareList1.push(res)
+          }
+        })
+        // this.shareList1 = response.data.data
+        this.total1 = response.data.total;
+        // this.loading2 = false;
+        console.log(response.data,'鍒嗕韩缁欒皝浜嗕粈涔堟暟鎹垎浜粰璋佷簡浠�涔堟暟鎹�')
       })
     },
     handleWho(){
@@ -846,7 +876,9 @@
 
     /** 鍒嗕韩鎿嶄綔 */
     handleShare(row) {
-      this.id1 = row.id
+      if(row.id){
+        this.id1 = [row.id]
+      }
       this.open1 = true;
       this.title1 = "鍒嗕韩";
     },
@@ -905,6 +937,7 @@
 
         this.getList();
         this.$modal.msgSuccess("鍒嗕韩鎴愬姛");
+        this.id1 = undefined
         this.open1 = false;
       }).catch(() => {});
     },

--
Gitblit v1.9.1