seimin 15 hours ago
parent
commit
2e90be7140

+ 18 - 12
pages/mypage/mypage.vue

@@ -7,7 +7,7 @@
7 7
 						<view>
8 8
 							您好,{{ userData.name }}
9 9
 						</view>
10
-						<view>{{userData.currentHospital.hosName}}</view>
10
+						<view v-if="userData.currentHospital">{{userData.currentHospital.hosName}}</view>
11 11
 						</view>
12 12
 			  <!--  <button v-show="!userData.online" class="changeHospital" size="mini" type="default" @click="changeHospital">
13 13
 			      切换院区
@@ -284,7 +284,7 @@
284 284
           type: "off",
285 285
           customWorking: "off",
286 286
           classId: uni.getStorageSync("setDeptConfg").classesId,
287
-        }).then((res) => {
287
+        }).then(async (res) => {
288 288
           uni.hideLoading();
289 289
           if (res.status == 200) {
290 290
             let obj = uni.getStorageSync("userData");
@@ -299,7 +299,7 @@
299 299
               uni.removeStorageSync("manager"); //清空选择的分组组长,初始化
300 300
             }
301 301
             uni.setStorageSync("userData", obj);
302
-            this.getCurrentUser();
302
+            await this.getCurrentUser();
303 303
             this.getTabData();
304 304
           } else {
305 305
             uni.showToast({
@@ -333,7 +333,7 @@
333 333
                 post("/auth/onOrOffLine", {
334 334
                   type: "off",
335 335
                   classId: uni.getStorageSync("setDeptConfg").classesId,
336
-                }).then((res) => {
336
+                }).then(async (res) => {
337 337
                   uni.hideLoading();
338 338
                   if (res.status == 200) {
339 339
                     if (uni.getStorageSync("setDeptConfg")) {
@@ -348,7 +348,7 @@
348 348
                     let obj = uni.getStorageSync("userData");
349 349
                     obj.user.online = false;
350 350
                     uni.setStorageSync("userData", obj);
351
-                    this.getCurrentUser();
351
+                    await this.getCurrentUser();
352 352
                     this.getTabData();
353 353
                   } else {
354 354
                     uni.showToast({
@@ -504,16 +504,22 @@
504 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 523
       //#ifdef H5
518 524
       if (options.login == 1) {
519 525
         uni.redirectTo({

+ 8 - 2
pages/patientInspectLog/patientInspectLogDetail.vue

@@ -120,8 +120,8 @@
120 120
       </template>
121 121
     </scroll-view>
122 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 125
     </view>
126 126
     <!-- 弹窗 -->
127 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 149
           patientInspectLogData: {},//闭环对象
150 150
           valueList: [],//检查信息
151 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 295
       toList(){
291 296
        uni.reLaunch({
@@ -294,6 +299,7 @@
294 299
       }
295 300
     },
296 301
     onLoad(options){
302
+      this.dataInfo.from = options.from;
297 303
       this.dataInfo.patientInspectLogId = options.patientInspectLogId;
298 304
       this.getDetail();
299 305
     }

+ 2 - 2
pages/patientInspectLog/patientInspectLogList.vue

@@ -150,7 +150,7 @@
150 150
               let patientInspectLog = undefined;
151 151
               patientInspectLog = list[0];
152 152
               uni.navigateTo({
153
-                url: `/pages/patientInspectLog/patientInspectLogDetail?patientInspectLogId=${patientInspectLog.id}`
153
+                url: `/pages/patientInspectLog/patientInspectLogDetail?patientInspectLogId=${patientInspectLog.id}&from=patientInpectLogList`
154 154
               })
155 155
             }else{
156 156
               uni.showToast({
@@ -251,7 +251,7 @@
251 251
       // 详情
252 252
       toDetail(data){
253 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 30
         <view class="body_item_foot" v-if="stationaryTransfer || stationaryReturn">
31 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 33
             <button @click.stop="stationaryReturnFun(data)" type="default" class="primaryButton btn" v-if="stationaryReturn">发起回科</button>
34 34
           </view>
35 35
         </view>
@@ -118,6 +118,7 @@
118 118
               "hosId": this.hosId,
119 119
               "cascadeSignDept": +this.options.dutyDeptId,
120 120
               "patientKey": this.keyword || undefined,
121
+              "reAssign": 1, //是否可以转派
121 122
             }
122 123
         }
123 124
         
@@ -149,7 +150,7 @@
149 150
       // 转派
150 151
       stationaryTransferFun(data){
151 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 146
           uni.hideLoading();
147 147
           if (result.status == 200) {
148 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 156
             this.list = list;
153 157
           } else {

+ 2 - 2
pages/transferWorkOrder/transferWorkOrderUser.vue

@@ -85,7 +85,7 @@
85 85
             if (result.state == 200 || result.state == 201) {
86 86
               if(Object.prototype.toString.call(userHandoverCode) === '[object Object]' && userHandoverCode.name){
87 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 90
               }else{
91 91
                 uni.showToast({
@@ -112,7 +112,7 @@
112 112
         // uni.setStorageSync('transferWorkOrderUserList', userList);
113 113
         
114 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 118
       handleSearch: debounce(function(keyword) {