seimin 19 hours ago
parent
commit
2e90be7140

+ 18 - 12
pages/mypage/mypage.vue

@@ -7,7 +7,7 @@
7
 						<view>
7
 						<view>
8
 							您好,{{ userData.name }}
8
 							您好,{{ userData.name }}
9
 						</view>
9
 						</view>
10
-						<view>{{userData.currentHospital.hosName}}</view>
10
+						<view v-if="userData.currentHospital">{{userData.currentHospital.hosName}}</view>
11
 						</view>
11
 						</view>
12
 			  <!--  <button v-show="!userData.online" class="changeHospital" size="mini" type="default" @click="changeHospital">
12
 			  <!--  <button v-show="!userData.online" class="changeHospital" size="mini" type="default" @click="changeHospital">
13
 			      切换院区
13
 			      切换院区
@@ -284,7 +284,7 @@
284
           type: "off",
284
           type: "off",
285
           customWorking: "off",
285
           customWorking: "off",
286
           classId: uni.getStorageSync("setDeptConfg").classesId,
286
           classId: uni.getStorageSync("setDeptConfg").classesId,
287
-        }).then((res) => {
287
+        }).then(async (res) => {
288
           uni.hideLoading();
288
           uni.hideLoading();
289
           if (res.status == 200) {
289
           if (res.status == 200) {
290
             let obj = uni.getStorageSync("userData");
290
             let obj = uni.getStorageSync("userData");
@@ -299,7 +299,7 @@
299
               uni.removeStorageSync("manager"); //清空选择的分组组长,初始化
299
               uni.removeStorageSync("manager"); //清空选择的分组组长,初始化
300
             }
300
             }
301
             uni.setStorageSync("userData", obj);
301
             uni.setStorageSync("userData", obj);
302
-            this.getCurrentUser();
302
+            await this.getCurrentUser();
303
             this.getTabData();
303
             this.getTabData();
304
           } else {
304
           } else {
305
             uni.showToast({
305
             uni.showToast({
@@ -333,7 +333,7 @@
333
                 post("/auth/onOrOffLine", {
333
                 post("/auth/onOrOffLine", {
334
                   type: "off",
334
                   type: "off",
335
                   classId: uni.getStorageSync("setDeptConfg").classesId,
335
                   classId: uni.getStorageSync("setDeptConfg").classesId,
336
-                }).then((res) => {
336
+                }).then(async (res) => {
337
                   uni.hideLoading();
337
                   uni.hideLoading();
338
                   if (res.status == 200) {
338
                   if (res.status == 200) {
339
                     if (uni.getStorageSync("setDeptConfg")) {
339
                     if (uni.getStorageSync("setDeptConfg")) {
@@ -348,7 +348,7 @@
348
                     let obj = uni.getStorageSync("userData");
348
                     let obj = uni.getStorageSync("userData");
349
                     obj.user.online = false;
349
                     obj.user.online = false;
350
                     uni.setStorageSync("userData", obj);
350
                     uni.setStorageSync("userData", obj);
351
-                    this.getCurrentUser();
351
+                    await this.getCurrentUser();
352
                     this.getTabData();
352
                     this.getTabData();
353
                   } else {
353
                   } else {
354
                     uni.showToast({
354
                     uni.showToast({
@@ -504,16 +504,22 @@
504
         this.getTabData();
504
         this.getTabData();
505
       },
505
       },
506
       // 获取当前用户信息
506
       // 获取当前用户信息
507
-      getCurrentUser() {
508
-        if (uni.getStorageSync("userData")) {
509
-          this.userData = uni.getStorageSync("userData").user;
510
-        } else {
511
-          this.userData = {};
507
+      async getCurrentUser() {
508
+        let res = await get("/user/data/getCurrentUser");
509
+        if (res.status == 200) {
510
+          let obj = uni.getStorageSync("userData");
511
+          this.userData = obj.user = res.data || {};
512
+          uni.setStorageSync("userData", obj);
513
+        }else{
514
+          uni.showToast({
515
+            icon: "none",
516
+            title: res.msg || "接口获取数据失败!",
517
+          });
512
         }
518
         }
513
       },
519
       },
514
     },
520
     },
515
-    onLoad(options) {
516
-      this.getCurrentUser();
521
+    async onLoad(options) {
522
+      await this.getCurrentUser();
517
       //#ifdef H5
523
       //#ifdef H5
518
       if (options.login == 1) {
524
       if (options.login == 1) {
519
         uni.redirectTo({
525
         uni.redirectTo({

+ 8 - 2
pages/patientInspectLog/patientInspectLogDetail.vue

@@ -120,8 +120,8 @@
120
       </template>
120
       </template>
121
     </scroll-view>
121
     </scroll-view>
122
     <view class="foot_common_btns">
122
     <view class="foot_common_btns">
123
-      <button @click="toList()" type="default" class="primaryButton btn gray">返回</button>
124
-      <button v-if="dataInfo.patientInspectLogData.state && dataInfo.patientInspectLogData.state.value === '4'" @click="tagClick(dataInfo.patientInspectLogData)" type="default" class="primaryButton btn">标记回科</button>
123
+      <button @click="goBack()" type="default" class="primaryButton btn gray">返回</button>
124
+      <button v-if="dataInfo.from == 'patientInpectLogList' && dataInfo.patientInspectLogData.state && dataInfo.patientInspectLogData.state.value === '4'" @click="tagClick(dataInfo.patientInspectLogData)" type="default" class="primaryButton btn">标记回科</button>
125
     </view>
125
     </view>
126
     <!-- 弹窗 -->
126
     <!-- 弹窗 -->
127
     <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content" @ok="ok" @cancel="cancel" @know="know" :operate="models.operate"></showModel>
127
     <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content" @ok="ok" @cancel="cancel" @know="know" :operate="models.operate"></showModel>
@@ -149,6 +149,7 @@
149
           patientInspectLogData: {},//闭环对象
149
           patientInspectLogData: {},//闭环对象
150
           valueList: [],//检查信息
150
           valueList: [],//检查信息
151
           logList: [],//流程图
151
           logList: [],//流程图
152
+          from: '',//跳转来源
152
          }
153
          }
153
       }
154
       }
154
     },
155
     },
@@ -286,6 +287,10 @@
286
          }
287
          }
287
        })
288
        })
288
       },
289
       },
290
+      // 返回
291
+      goBack() {
292
+        uni.navigateBack();
293
+      },
289
       // 返回列表
294
       // 返回列表
290
       toList(){
295
       toList(){
291
        uni.reLaunch({
296
        uni.reLaunch({
@@ -294,6 +299,7 @@
294
       }
299
       }
295
     },
300
     },
296
     onLoad(options){
301
     onLoad(options){
302
+      this.dataInfo.from = options.from;
297
       this.dataInfo.patientInspectLogId = options.patientInspectLogId;
303
       this.dataInfo.patientInspectLogId = options.patientInspectLogId;
298
       this.getDetail();
304
       this.getDetail();
299
     }
305
     }

+ 2 - 2
pages/patientInspectLog/patientInspectLogList.vue

@@ -150,7 +150,7 @@
150
               let patientInspectLog = undefined;
150
               let patientInspectLog = undefined;
151
               patientInspectLog = list[0];
151
               patientInspectLog = list[0];
152
               uni.navigateTo({
152
               uni.navigateTo({
153
-                url: `/pages/patientInspectLog/patientInspectLogDetail?patientInspectLogId=${patientInspectLog.id}`
153
+                url: `/pages/patientInspectLog/patientInspectLogDetail?patientInspectLogId=${patientInspectLog.id}&from=patientInpectLogList`
154
               })
154
               })
155
             }else{
155
             }else{
156
               uni.showToast({
156
               uni.showToast({
@@ -251,7 +251,7 @@
251
       // 详情
251
       // 详情
252
       toDetail(data){
252
       toDetail(data){
253
         uni.navigateTo({
253
         uni.navigateTo({
254
-          url: `/pages/patientInspectLog/patientInspectLogDetail?patientInspectLogId=${data.id}`
254
+          url: `/pages/patientInspectLog/patientInspectLogDetail?patientInspectLogId=${data.id}&from=patientInpectLogList`
255
         })
255
         })
256
       },
256
       },
257
       // 标记回科
257
       // 标记回科

+ 3 - 2
pages/stationaryPatient/stationaryPatient.vue

@@ -29,7 +29,7 @@
29
 
29
 
30
         <view class="body_item_foot" v-if="stationaryTransfer || stationaryReturn">
30
         <view class="body_item_foot" v-if="stationaryTransfer || stationaryReturn">
31
           <view class="btns pt0">
31
           <view class="btns pt0">
32
-            <button @click.stop="stationaryTransferFun(data)" type="default" class="primaryButton btn" v-if="stationaryTransfer">转派</button>
32
+            <button @click.stop="stationaryTransferFun(data)" type="default" class="primaryButton btn" v-if="stationaryTransfer && data.reAssign == 1">转派</button>
33
             <button @click.stop="stationaryReturnFun(data)" type="default" class="primaryButton btn" v-if="stationaryReturn">发起回科</button>
33
             <button @click.stop="stationaryReturnFun(data)" type="default" class="primaryButton btn" v-if="stationaryReturn">发起回科</button>
34
           </view>
34
           </view>
35
         </view>
35
         </view>
@@ -118,6 +118,7 @@
118
               "hosId": this.hosId,
118
               "hosId": this.hosId,
119
               "cascadeSignDept": +this.options.dutyDeptId,
119
               "cascadeSignDept": +this.options.dutyDeptId,
120
               "patientKey": this.keyword || undefined,
120
               "patientKey": this.keyword || undefined,
121
+              "reAssign": 1, //是否可以转派
121
             }
122
             }
122
         }
123
         }
123
         
124
         
@@ -149,7 +150,7 @@
149
       // 转派
150
       // 转派
150
       stationaryTransferFun(data){
151
       stationaryTransferFun(data){
151
         uni.navigateTo({
152
         uni.navigateTo({
152
-          url: "/pages/transferWorkOrder/transferWorkOrderUser?selectPatientList=1",
153
+          url: `/pages/transferWorkOrder/transferWorkOrderUser?selectPatientId=${data.patientId}`,
153
         });
154
         });
154
       },
155
       },
155
       // 发起回科
156
       // 发起回科

+ 6 - 2
pages/transferWorkOrder/transferWorkOrderPatient.vue

@@ -146,8 +146,12 @@
146
           uni.hideLoading();
146
           uni.hideLoading();
147
           if (result.status == 200) {
147
           if (result.status == 200) {
148
             let list = result.list || [];
148
             let list = result.list || [];
149
-            if(isInit && this.options.selectPatientList == 1){
150
-              list.forEach(v => (v.checked = true))
149
+            if(isInit && this.options.selectPatientId){
150
+              list.forEach(v => {
151
+                if(v.id == this.options.selectPatientId){
152
+                  v.checked = true;
153
+                }
154
+              })
151
             }
155
             }
152
             this.list = list;
156
             this.list = list;
153
           } else {
157
           } else {

+ 2 - 2
pages/transferWorkOrder/transferWorkOrderUser.vue

@@ -85,7 +85,7 @@
85
             if (result.state == 200 || result.state == 201) {
85
             if (result.state == 200 || result.state == 201) {
86
               if(Object.prototype.toString.call(userHandoverCode) === '[object Object]' && userHandoverCode.name){
86
               if(Object.prototype.toString.call(userHandoverCode) === '[object Object]' && userHandoverCode.name){
87
                 uni.redirectTo({
87
                 uni.redirectTo({
88
-                  url: `/pages/transferWorkOrder/transferWorkOrderPatient?userId=${userHandoverCode.id}&userName=${userHandoverCode.name}&userAccount=${userHandoverCode.account}&selectPatientList=${this.options.selectPatientList}`,
88
+                  url: `/pages/transferWorkOrder/transferWorkOrderPatient?userId=${userHandoverCode.id}&userName=${userHandoverCode.name}&userAccount=${userHandoverCode.account}&selectPatientId=${this.options.selectPatientId}`,
89
                 });
89
                 });
90
               }else{
90
               }else{
91
                 uni.showToast({
91
                 uni.showToast({
@@ -112,7 +112,7 @@
112
         // uni.setStorageSync('transferWorkOrderUserList', userList);
112
         // uni.setStorageSync('transferWorkOrderUserList', userList);
113
         
113
         
114
         uni.redirectTo({
114
         uni.redirectTo({
115
-          url: `/pages/transferWorkOrder/transferWorkOrderPatient?userId=${user.id}&userName=${user.name}&userAccount=${user.account}&selectPatientList=${this.options.selectPatientList}`,
115
+          url: `/pages/transferWorkOrder/transferWorkOrderPatient?userId=${user.id}&userName=${user.name}&userAccount=${user.account}&selectPatientId=${this.options.selectPatientId}`,
116
         });
116
         });
117
       },
117
       },
118
       handleSearch: debounce(function(keyword) {
118
       handleSearch: debounce(function(keyword) {