From 48846dab1d7748fe4a55b84c9a32f542bb9b1856 Mon Sep 17 00:00:00 2001
From: yz3456 <2753272399@qq.com>
Date: 星期五, 05 七月 2024 08:27:03 +0800
Subject: [PATCH] 修改了user和doctor模块

---
 ruoyi-ui/src/views/self/show.vue         |    6 +-
 ruoyi-ui/src/api/doctor/index.js         |    3 
 ruoyi-ui/src/views/system/user/index.vue |   39 +++++++++++-
 ruoyi-ui/src/api/system/user.js          |   11 +++
 ruoyi-ui/src/views/doctor/index.vue      |   82 ++++++++++++++-------------
 5 files changed, 91 insertions(+), 50 deletions(-)

diff --git a/ruoyi-ui/src/api/doctor/index.js b/ruoyi-ui/src/api/doctor/index.js
index 275411e..35c373a 100644
--- a/ruoyi-ui/src/api/doctor/index.js
+++ b/ruoyi-ui/src/api/doctor/index.js
@@ -96,10 +96,11 @@
   })
 }
 // 鏌ョ湅璋佸垎浜簡鏁版嵁
-export function getWhoShare() {
+export function getWhoShare(data) {
   return request({
     url: '/ZfDoctorShare/getInfoByShareId',
     method: 'get',
+    data: data
   })
 }
 // 涓嬭浇鍒嗕韩鐨勬暟鎹�
diff --git a/ruoyi-ui/src/api/system/user.js b/ruoyi-ui/src/api/system/user.js
index a995b21..654559b 100644
--- a/ruoyi-ui/src/api/system/user.js
+++ b/ruoyi-ui/src/api/system/user.js
@@ -217,4 +217,13 @@
 	  url:'/self/user/uidAndUJd/'+uid+'/'+tpfid,
 	  method: 'get'
 	})
-}
\ No newline at end of file
+}
+//淇敼鏃堕�夋嫨閰嶅伓
+export function updatePO(tpfid,sex)
+{
+  return request({
+    url:'/self/user/uidAndUJd/' + tpfid + '/' + sex,
+    method: 'get'
+  })
+}
+//鏂板鏃堕�夋嫨閰嶅伓
diff --git a/ruoyi-ui/src/views/doctor/index.vue b/ruoyi-ui/src/views/doctor/index.vue
index 1be08fa..3a76111 100644
--- a/ruoyi-ui/src/views/doctor/index.vue
+++ b/ruoyi-ui/src/views/doctor/index.vue
@@ -606,26 +606,38 @@
       // shareList2: [],
       userOptions:[],
       user:undefined,
+      userList:[],
       ifNum:undefined,
       selectWho:undefined,
+      title1: "",
+      title2: "",
+      loading1: false,
+      loading2: false,
+      // 鏌ヨ鍙傛暟1
+      queryParams1: {
+        pageNum: 1,
+        pageSize: 10,
+        identity:undefined,
+        nickName:undefined,
+        sex:undefined,
+        birth:undefined,
+      },
+      ids1: [],
+      single1: true,
+      multiple1: true,
+      dateRange1: [],
 
       userId: undefined,
       // 閬僵灞�
       disabled: false,
-
       loading: true,
-      loading1: false,
-      loading2: false,
       formData:[],
       // 閫変腑鏁扮粍
       ids: [],
-      ids1: [],
       // 闈炲崟涓鐢�
       single: true,
-      single1: true,
       // 闈炲涓鐢�
       multiple: true,
-      multiple1: true,
       // 鏄剧ず鎼滅储鏉′欢
       showSearch: true,
       // 鎬绘潯鏁�
@@ -635,8 +647,7 @@
       typeList:[],
       // 寮瑰嚭灞傛爣棰�
       title: "",
-      title1: "",
-      title2: "",
+
       // 鏄惁鏄剧ず寮瑰嚭灞�
       open: false,
       // 鏄惁鏄剧ず寮瑰嚭灞傦紙鏁版嵁鏉冮檺锛�
@@ -647,7 +658,7 @@
       deptNodeAll: false,
       // 鏃ユ湡鑼冨洿
       dateRange: [],
-      dateRange1: [],
+
       // 鏁版嵁鑼冨洿閫夐」
       fot:['.bmp','.jpg','.jpeg','.png','.tif','.gif','.pcx','.tga','.exif','.fpx',
         '.svg','.psd','.cdr','.pcd','.dxf','.ufo','.eps','.ai','.aw','.WMF','.webp','.apng'],
@@ -690,15 +701,7 @@
         effect:undefined,
 
       },
-      // 鏌ヨ鍙傛暟1
-      queryParams1: {
-        pageNum: 1,
-        pageSize: 10,
-        identity:undefined,
-        nickName:undefined,
-        sex:undefined,
-        birth:undefined,
-      },
+
       // searchVal:"",
 
       // 琛ㄥ崟鍙傛暟
@@ -761,6 +764,7 @@
     this.getList();
     this.getTypeOptions();
     this.getInfo();
+
     this.getList1();
   },
   methods: {
@@ -801,7 +805,6 @@
       this.title2 = "涓嬭浇鐨勫垎浜暟鎹�";
       showShareData().then(response => {
         this.shareList1 = response
-        // console.log(this.shareList1,'showShareDatashowShareData')
       })
     },
     // 灞曠ず鍒嗕韩缁欐垜鐨勬暟鎹�
@@ -810,12 +813,15 @@
       this.ifNum = 2
       this.open2 = true
       this.title2 = "鍒嗕韩缁欐垜鐨勬暟鎹�";
-      getWhoShare().then(response => {
+      // const list = {"shareId": this.userList}
+      const list = {"shareId": 111}
+      getWhoShare(list).then(response => {
         const data = response.data
+        // console.log(data,'灞曠ず鍒嗕韩缁欐垜鐨勬暟鎹睍绀哄垎浜粰鎴戠殑鏁版嵁')
         for(let i in data){
+          console.log(i,'灞曠ず鍒嗕韩缁欐垜鐨勬暟鎹睍绀哄垎浜粰鎴戠殑鏁版嵁')
           this.shareList1.push(data[i])
         }
-
       })
     },
 
@@ -828,9 +834,8 @@
         this.loading2 = true;
         this.shareList1 = response.data
         this.loading2 = false;
-        console.log(this.shareList1,'鍒嗕韩缁欒皝浜嗕粈涔堟暟鎹垎浜粰璋佷簡浠�涔堟暟鎹�')
+        // console.log(this.shareList1,'鍒嗕韩缁欒皝浜嗕粈涔堟暟鎹垎浜粰璋佷簡浠�涔堟暟鎹�')
       })
-      // console.log(value)
     },
     handleWho(){
       this.ifNum = 1
@@ -841,7 +846,6 @@
 
     /** 鍒嗕韩鎿嶄綔 */
     handleShare(row) {
-      // this.getList1();
       this.id1 = row.id
       this.open1 = true;
       this.title1 = "鍒嗕韩";
@@ -849,8 +853,6 @@
     // 澶氶�夋閫変腑鏁版嵁
     handleSelectionChange1(selection) {
       this.ids1 = selection.map(item => item.userId)
-      // console.log(selection)
-      // console.log(this.ids1,'ids1ids1ids1ids1')
       this.single1 = selection.length!=1
       this.multiple1 = !selection.length
     },
@@ -862,15 +864,20 @@
       // this.single1 = selection.length!=1
       // this.multiple1 = !selection.length
     },
+    getRowId1(row)
+    {
+      return row.id
+    },
+    getRowId2(row)
+    {
+      return row.id
+    },
     getList1() {
           this.loading1 = true;
           this.queryParams1.happenStartTime = this.dateRange1.length > 0 && this.dateRange1[0]
           this.queryParams1.happenEndTime = this.dateRange1.length > 0 && this.dateRange1[1]
           listUserAll(this.queryParams1).then(response => {
               this.listRoot = response.data.data;
-              // console.log(this.listRoot,'listrootlistroot')
-              // this.total1 = response.data.total;
-
               const kon = {}
               this.listRoot.forEach(element => {
                 kon[element['nickName']] = element['userId']
@@ -878,9 +885,10 @@
               for(let i in kon){
                 this.userOptions.push({label: i,value: kon[i]})
               }
-              // console.log(this.userOptions,'userListuserListuserListuserListuserList')
-
-
+              for(let i in this.userOptions){
+                this.userList.push(this.userOptions[i].value)
+              }
+              console.log(this.userList,'userListuserListuserList')
               this.loading1 = false;
             }
           );
@@ -900,6 +908,7 @@
         this.open1 = false;
       }).catch(() => {});
     },
+    // ------------------------------------------------------------------
 
     getInfo(){
           console.log('-----------------')
@@ -1022,14 +1031,7 @@
     {
       return row.id
     },
-    getRowId1(row)
-    {
-      return row.id
-    },
-    getRowId2(row)
-    {
-      return row.id
-    },
+
     // 鍙栨秷鎸夐挳锛堟暟鎹潈闄愶級
     cancelDataScope() {
       this.openDataScope = false;
diff --git a/ruoyi-ui/src/views/self/show.vue b/ruoyi-ui/src/views/self/show.vue
index 3fcf0ce..92a39be 100644
--- a/ruoyi-ui/src/views/self/show.vue
+++ b/ruoyi-ui/src/views/self/show.vue
@@ -154,7 +154,7 @@
             plain
             icon="el-icon-download"
             size="mini"
-            @click="handleExportTemplatem"
+            @click="handleExportTemplate"
             v-hasPermi="['family:note:export']"
           >瀵煎叆妯℃澘涓嬭浇</el-button>
         </el-col>
@@ -1732,10 +1732,10 @@
       }
     },
 
-    handleExportTemplatem(){
+    handleExportTemplate(){
       this.download('/zSelfNote/model', {
 
-      }, `zSelfNote${new Date().getTime()}.xlsx`)
+      }, `zSelfNote_${new Date().getTime()}.xlsx`)
     },
     /** 瀵煎叆鎿嶄綔*/
     handleEnportm(params){
diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue
index 2a2c68a..2084858 100644
--- a/ruoyi-ui/src/views/system/user/index.vue
+++ b/ruoyi-ui/src/views/system/user/index.vue
@@ -179,7 +179,7 @@
     </el-row>
 
     <!-- 娣诲姞鎴栦慨鏀圭敤鎴烽厤缃璇濇 -->
-    <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
+    <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body @close="handleClose">
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-row>
           <el-col :span="12">
@@ -357,7 +357,7 @@
 import { getIndividual,getInfoByFid,
 getAllInfo,listUser, getUser, delUser,
  updateUserInfo,addUser, updateUser, getAllFamilys,resetUserPwd,
- changeUserStatus, deptTreeSelect ,updateFM} from "@/api/system/user";
+ changeUserStatus, deptTreeSelect ,updateFM, updatePO} from "@/api/system/user";
 import { getToken } from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -368,6 +368,10 @@
   components: { Treeselect },
   data() {
     return {
+      // 淇敼閰嶅伓鏃剁殑鐢ㄦ埛id鍜宻ex
+      sex:'',
+      pOID:'',
+      a:undefined,
       // 閬僵灞�
       loading: true,
       //瑙掕壊淇濆瓨
@@ -413,6 +417,7 @@
       motherInfo:[],
       fathorInfo:[],
       allInfo:[],
+      allInfo2:[],
       faid: 0,
       maid: 0,
       form: {},
@@ -533,8 +538,27 @@
 
     },
     // 鑾峰彇鎬у埆
-    getSex(){
-
+    getSex(value){
+      if(value != undefined){
+        this.sex = value
+      }
+      // alert(this.sex)
+      const tpfid = this.pOID
+      // 鏂板a=1,淇敼a=2
+      if(this.a == 1){
+        alert('鏂板a=1')
+      }else{
+        updatePO(tpfid,this.sex).then(response =>{
+          this.allInfo2 = response.data
+          console.log(this.allInfo2,'淇敼a=2')
+        })
+      }
+      // console.log(sex,'sexsexsex')
+    },
+    // 鍏抽棴寮圭獥鍚�
+    handleClose(){
+      this.pOID = ''
+      // alert(this.pOID)
     },
 
 	hanldeLoop(){
@@ -634,7 +658,7 @@
     getAllIn(){
       getAllInfo().then(response => {
         this.allInfo = response.data;
-        console.log(response.data)
+        console.log(response.data,'allInfoallInfoallInfoallInfo')
 		for(var i = 0; i < this.allInfo.length; i++)
 		{
 			//alert(this.allInfo[i].sex == 1)
@@ -762,6 +786,7 @@
     },
     /** 鏂板鎸夐挳鎿嶄綔 */
     handleAdd() {
+      this.a = 1
       this.reset();
       getUser().then(response => {
         this.postOptions = response.posts;
@@ -778,6 +803,10 @@
     },
     /** 淇敼鎸夐挳鎿嶄綔 */
     handleUpdate(row) {
+      this.a = 2
+      this.pOID = row.userId
+      this.sex = row.sex
+      this.getSex();
       this.reset();
       const userId = row.userId || this.ids;
 	  this.cuid= row.userId || this.ids;

--
Gitblit v1.9.1