Browse Source

代码的优化与完善

seimin 2 years ago
parent
commit
2e38a1e7f7

+ 1 - 1
App.vue

@@ -14,7 +14,7 @@
14 14
       console.log("App Hide");
15 15
     },
16 16
     onPageNotFound(res) {
17
-      wx.reLaunch({
17
+      uni.navigateTo({
18 18
         url: '/pages/login/login',
19 19
       })
20 20
     },

+ 11 - 5
components/seiminFooterNav/seiminFooterNav.vue

@@ -76,7 +76,7 @@
76 76
       goto(menu) {
77 77
         if (menu.name === "二维码") {
78 78
           this.$refs.seiminModel.show({
79
-            title:'科室二维码',
79
+            title: '科室二维码',
80 80
             skin: 'qrcode',
81 81
             btns: [{
82 82
               name: "知道了",
@@ -84,9 +84,15 @@
84 84
             }, ]
85 85
           });
86 86
         } else {
87
-          uni.reLaunch({
88
-            url: menu.link,
89
-          });
87
+          if (this.curRoute === menu.link) {
88
+            uni.redirectTo({
89
+              url: menu.link,
90
+            });
91
+          } else {
92
+            uni.navigateTo({
93
+              url: menu.link,
94
+            });
95
+          }
90 96
         }
91 97
       },
92 98
       // 高亮当前菜单
@@ -111,7 +117,7 @@
111 117
     z-index: 9;
112 118
     background-color: #fff;
113 119
     padding: 0 60rpx;
114
-    @include border(top,rgba(0, 0, 0, 0.1));
120
+    @include border(top, rgba(0, 0, 0, 0.1));
115 121
     @include flex(space-between, center);
116 122
 
117 123
     .seiminFooterNav_item {

+ 1 - 15
package-lock.json

@@ -13,8 +13,7 @@
13 13
         "crypto-js": "^4.1.1",
14 14
         "date-fns": "^2.28.0",
15 15
         "lodash": "^4.17.21",
16
-        "moment": "^2.29.3",
17
-        "uuid": "^8.3.2"
16
+        "moment": "^2.29.3"
18 17
       }
19 18
     },
20 19
     "node_modules/animate.css": {
@@ -47,14 +46,6 @@
47 46
       "engines": {
48 47
         "node": "*"
49 48
       }
50
-    },
51
-    "node_modules/uuid": {
52
-      "version": "8.3.2",
53
-      "resolved": "https://registry.npmmirror.com/uuid/-/uuid-8.3.2.tgz",
54
-      "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
55
-      "bin": {
56
-        "uuid": "dist/bin/uuid"
57
-      }
58 49
     }
59 50
   },
60 51
   "dependencies": {
@@ -82,11 +73,6 @@
82 73
       "version": "2.29.3",
83 74
       "resolved": "https://registry.npmmirror.com/moment/-/moment-2.29.3.tgz",
84 75
       "integrity": "sha512-c6YRvhEo//6T2Jz/vVtYzqBzwvPT95JBQ+smCytzf7c50oMZRsR/a4w88aD34I+/QVSfnoAnSBFPJHItlOMJVw=="
85
-    },
86
-    "uuid": {
87
-      "version": "8.3.2",
88
-      "resolved": "https://registry.npmmirror.com/uuid/-/uuid-8.3.2.tgz",
89
-      "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="
90 76
     }
91 77
   }
92 78
 }

+ 1 - 2
package.json

@@ -18,7 +18,6 @@
18 18
     "crypto-js": "^4.1.1",
19 19
     "date-fns": "^2.28.0",
20 20
     "lodash": "^4.17.21",
21
-    "moment": "^2.29.3",
22
-    "uuid": "^8.3.2"
21
+    "moment": "^2.29.3"
23 22
   }
24 23
 }

+ 7 - 0
pages/appointmentInspect/appointmentInspect.vue

@@ -41,6 +41,9 @@
41 41
 </template>
42 42
 
43 43
 <script>
44
+  import {
45
+    backPress
46
+  } from '../../utils/index.js';
44 47
   import cloneDeep from 'lodash/cloneDeep';
45 48
   import {
46 49
     mapState,
@@ -50,8 +53,12 @@
50 53
     ASSOCIATION_TYPES
51 54
   } from "../../utils/enum.association_types.js";
52 55
   export default {
56
+    onBackPress() {
57
+      backPress();
58
+    },
53 59
     data() {
54 60
       return {
61
+        reFresh: '',
55 62
         ASSOCIATION_TYPES,
56 63
         qcoHeight: 0,
57 64
         // 关联检查有多个科室,但是开关设置是不允许,是否展示提示文字

+ 7 - 0
pages/detail/detail.vue

@@ -137,6 +137,9 @@
137 137
 
138 138
 <script>
139 139
   import {
140
+    backPress
141
+  } from '../../utils/index.js';
142
+  import {
140 143
     debounce
141 144
   } from 'lodash/function';
142 145
   import {
@@ -160,8 +163,12 @@
160 163
     showJiaji,
161 164
   } from "../../utils/index.js";
162 165
   export default {
166
+    onBackPress() {
167
+      backPress();
168
+    },
163 169
     data() {
164 170
       return {
171
+        reFresh: '',
165 172
         logList: [], //过程信息列表
166 173
         debouncedChangeTab: null,
167 174
         // 路由传参

+ 21 - 11
pages/index/index.vue

@@ -5,7 +5,7 @@
5 5
       <!-- 头部搜索 -->
6 6
       <view class="search">
7 7
         <view class="search_wrap">
8
-          <input :key="time" focus placeholder="请输入标本编码/检查单号/患…" :placeholder-style="placeholderStyle"
8
+          <input :focus="isFocus" @blur="blur" placeholder="请输入标本编码/检查单号/患…" :placeholder-style="placeholderStyle"
9 9
             confirm-type="search" v-model="searchText" />
10 10
           <view class="searchBtn"> 搜索 </view>
11 11
         </view>
@@ -88,8 +88,9 @@
88 88
 
89 89
 <script>
90 90
   import {
91
-    v4 as uuidv4
92
-  } from 'uuid';
91
+    backPress,
92
+    getCurrentPagesSeiminAll
93
+  } from '../../utils/index.js';
93 94
   import {
94 95
     mapState,
95 96
     mapMutations,
@@ -107,25 +108,32 @@
107 108
     ASSOCIATION_TYPES
108 109
   } from "../../utils/enum.association_types.js";
109 110
   export default {
111
+    onBackPress() {
112
+      backPress();
113
+    },
110 114
     onShow() {
111 115
       this.flag = true;
112
-      this.searchText = '';
113
-      this.time = uuidv4();
114 116
     },
115 117
     watch: {
116 118
       // 首页搜索内容
117 119
       searchText(newVal) {
118 120
         if (newVal && this.flag) {
119 121
           this.flag = false;
120
-          uni.reLaunch({
122
+          uni.navigateTo({
121 123
             url: `/pages/search/search?txt=${newVal}`,
122 124
           })
123 125
         }
126
+      },
127
+      reFresh() {
128
+        uni.redirectTo({
129
+          url: `${getCurrentPagesSeiminAll()}`,
130
+        })
124 131
       }
125 132
     },
126 133
     data() {
127 134
       return {
128
-        time: uuidv4(),
135
+        isFocus: true,
136
+        reFresh: '',
129 137
         openSpecimen: false, //标本的开通权限
130 138
         searchText: '', //首页搜索内容
131 139
         placeholderStyle: "color:#999;font-size:30rpx;line-height:66rpx;",
@@ -137,6 +145,7 @@
137 145
         pickerTitle: "", //选择院区picker的title
138 146
         specimenTaskTypeId: undefined, //标本任务类型id
139 147
         flag: true, //是否可以跳转
148
+        updateTipsForNurses: '', //护士端更新提示
140 149
       };
141 150
     },
142 151
     computed: {
@@ -145,7 +154,6 @@
145 154
         "isShowSeiminModel",
146 155
         "deptDisplay",
147 156
         "specimenButton",
148
-        "updateTipsForNurses",
149 157
       ]),
150 158
     },
151 159
     methods: {
@@ -153,12 +161,14 @@
153 161
         "changeSeiminModel",
154 162
         "changeQucikCreateOrderType",
155 163
         "changeDeptDisplay",
156
-        "changeUpdateTipsForNurses",
157 164
         "changeSpecimenButton",
158 165
         "changeNurseDeptSwitchTip",
159 166
         "changeSearchDeptParams",
160 167
       ]),
161 168
       ...mapActions('system', ["vxSystem"]),
169
+      blur() {
170
+        this.isFocus = false;
171
+      },
162 172
       // 前往标本列表
163 173
       gotoSpecimenList(type) {
164 174
         uni.navigateTo({
@@ -364,7 +374,7 @@
364 374
             });
365 375
             throw new Error('无法获取到【护士端更新提示】配置,请前往配置');
366 376
           }
367
-          this.changeUpdateTipsForNurses(res.list[0].valueconfig);
377
+          this.updateTipsForNurses = res.list[0].valueconfig;
368 378
         } else {
369 379
           this.$refs.seiminModel.show({
370 380
             skin: "toast",
@@ -487,7 +497,7 @@
487 497
               flex: 2,
488 498
               click: () => {
489 499
                 this.$refs.seiminModel.close();
490
-                this.time = uuidv4();
500
+                this.isFocus = true;
491 501
               }
492 502
             },
493 503
             {

+ 2 - 1
pages/login/login.vue

@@ -40,6 +40,7 @@
40 40
 	export default {
41 41
 		data() {
42 42
 			return {
43
+        reFresh: '',
43 44
 				username: "", //用户名
44 45
 				password: "", //密码
45 46
 				savePassword: false, //是否记住密码
@@ -121,7 +122,7 @@
121 122
 						}
122 123
 						// 跳转到首页(isShowSeiminModel,是否显示切换科室弹窗)
123 124
             this.changeSeiminModel(true);
124
-						uni.reLaunch({
125
+						uni.navigateTo({
125 126
 							url: "/pages/index/index",
126 127
 						});
127 128
 					} else {

+ 7 - 0
pages/orderDetail/orderDetail.vue

@@ -317,6 +317,9 @@
317 317
 
318 318
 <script>
319 319
   import {
320
+    backPress
321
+  } from '../../utils/index.js';
322
+  import {
320 323
     debounce
321 324
   } from 'lodash/function';
322 325
   import {
@@ -339,8 +342,12 @@
339 342
     showJiaji,
340 343
   } from "../../utils/index.js";
341 344
   export default {
345
+    onBackPress() {
346
+      backPress();
347
+    },
342 348
     data() {
343 349
       return {
350
+        reFresh: '',
344 351
         debouncedChangeTab: null,
345 352
         // 路由传参
346 353
         queryParams: {},

+ 7 - 0
pages/orderList/orderList.vue

@@ -92,6 +92,9 @@
92 92
 
93 93
 <script>
94 94
   import {
95
+    backPress
96
+  } from '../../utils/index.js';
97
+  import {
95 98
     mapState,
96 99
     mapActions
97 100
   } from "vuex";
@@ -112,8 +115,12 @@
112 115
   } from "../../utils/index.js";
113 116
   export default {
114 117
     name: 'orderList',
118
+    onBackPress() {
119
+      backPress();
120
+    },
115 121
     data() {
116 122
       return {
123
+        reFresh: '',
117 124
         // 工单状态
118 125
         GDSTATE: GDSTATE,
119 126
         // 当前筛选的工单状态

+ 9 - 2
pages/patientBuild/patientBuild.vue

@@ -35,6 +35,9 @@
35 35
 </template>
36 36
 
37 37
 <script>
38
+  import {
39
+    backPress
40
+  } from '../../utils/index.js';
38 41
   import cloneDeep from 'lodash/cloneDeep';
39 42
   import {
40 43
     mapState,
@@ -44,8 +47,12 @@
44 47
     ASSOCIATION_TYPES
45 48
   } from "../../utils/enum.association_types.js";
46 49
   export default {
50
+    onBackPress() {
51
+      backPress();
52
+    },
47 53
     data() {
48 54
       return {
55
+        reFresh: '',
49 56
         ASSOCIATION_TYPES,
50 57
         // 时间戳
51 58
         timestamp: new Date().getTime(),
@@ -171,7 +178,7 @@
171 178
       },
172 179
       // 是否加急
173 180
       allowUrgentChange(isUrgent) {
174
-        console.log(isUrgent,this.isYYBuild)
181
+        console.log(isUrgent, this.isYYBuild)
175 182
         if (this.isYYBuild) {
176 183
           this.isYYBuild = !isUrgent;
177 184
           if (!this.isYYBuild) {
@@ -256,7 +263,7 @@
256 263
       },
257 264
       // 底部按钮展示
258 265
       showBtns(flag) {
259
-        console.log(flag,this.isYYBuild)
266
+        console.log(flag, this.isYYBuild)
260 267
         if (flag && this.isYYBuild) {
261 268
           //患者陪检业务或患者其他服务业务,并且预约建单开关打开的情况下
262 269
           this.btns = [{

+ 3 - 2
pages/patientBuildConfirm/patientBuildConfirm.vue

@@ -68,6 +68,7 @@
68 68
   export default {
69 69
     data() {
70 70
       return {
71
+        reFresh: '',
71 72
         ASSOCIATION_TYPES,
72 73
         SOURCEID,
73 74
         // 中间科室名称
@@ -138,7 +139,7 @@
138 139
                       content: "您申请的工单已建单成功,工作人员会尽快处理!",
139 140
                       btns:[{
140 141
                         click:()=>{
141
-                          uni.reLaunch({
142
+                          uni.navigateTo({
142 143
                             url: '/pages/patientList/patientList'
143 144
                           })
144 145
                         }
@@ -246,7 +247,7 @@
246 247
                 content: "您申请的工单已建单成功,工作人员会尽快处理!",
247 248
                 btns:[{
248 249
                   click:()=>{
249
-                    uni.reLaunch({
250
+                    uni.navigateTo({
250 251
                       url: '/pages/patientList/patientList'
251 252
                     })
252 253
                   }

+ 13 - 5
pages/patientDetail/patientDetail.vue

@@ -59,7 +59,8 @@
59 59
                 <uni-th align="center" width="71">科室</uni-th>
60 60
               </uni-tr>
61 61
               <!-- 表格数据行 -->
62
-              <uni-tr v-for="data in info.specimens" :key="data.id" @click.native="toDetail(data.id,'specimen',data.scode)">
62
+              <uni-tr v-for="data in info.specimens" :key="data.id"
63
+                @click.native="toDetail(data.id,'specimen',data.scode)">
63 64
                 <uni-td align="center">{{data.stype?data.stype.name:'暂无'}}</uni-td>
64 65
                 <uni-td align="center">{{data.scode || '暂无'}}</uni-td>
65 66
                 <uni-td align="center">{{data.speState?data.speState.name:'暂无'}}</uni-td>
@@ -130,6 +131,9 @@
130 131
 
131 132
 <script>
132 133
   import {
134
+    backPress
135
+  } from '../../utils/index.js';
136
+  import {
133 137
     debounce
134 138
   } from 'lodash/function';
135 139
   import {
@@ -154,8 +158,12 @@
154 158
     showJiaji,
155 159
   } from "../../utils/index.js";
156 160
   export default {
161
+    onBackPress() {
162
+      backPress();
163
+    },
157 164
     data() {
158 165
       return {
166
+        reFresh: '',
159 167
         checkedShowMsg: {}, //当前选中的任务类型的buildtrip信息
160 168
         pickerTitle: "", //一键建单picker的title
161 169
         taskTypeListResource: [], //任务类型列表(请求的原始数据)
@@ -190,7 +198,7 @@
190 198
           name: "回到列表",
191 199
           type: "default",
192 200
           click: () => {
193
-            uni.reLaunch({
201
+            uni.navigateTo({
194 202
               url: "/pages/patientList/patientList",
195 203
             });
196 204
           },
@@ -354,12 +362,12 @@
354 362
         this.changeTab(1);
355 363
       },
356 364
       // 跳转详情
357
-      toDetail(id, associationType,scode) {
358
-        if(scode){
365
+      toDetail(id, associationType, scode) {
366
+        if (scode) {
359 367
           uni.navigateTo({
360 368
             url: `/pages/detail/detail?id=${id}&associationType=${associationType}&scode=${scode}`
361 369
           })
362
-        }else{
370
+        } else {
363 371
           uni.navigateTo({
364 372
             url: `/pages/detail/detail?id=${id}&associationType=${associationType}`
365 373
           })

+ 18 - 2
pages/patientList/patientList.vue

@@ -30,7 +30,8 @@
30 30
             <text class="orderList_listItem_item_time">待检{{patient.watingCount}}</text>
31 31
           </view>
32 32
           <view class="orderList_listItem_item_btns">
33
-            <button type="primary" class="btn" @click.stop="toDetail(patient.patientCode,patient.patientName)">患者详情</button>
33
+            <button type="primary" class="btn"
34
+              @click.stop="toDetail(patient.patientCode,patient.patientName)">患者详情</button>
34 35
             <button type="primary" class="btn" @click.stop="buildOrder(patient)">一键建单</button>
35 36
           </view>
36 37
         </view>
@@ -47,6 +48,10 @@
47 48
 
48 49
 <script>
49 50
   import {
51
+    backPress,
52
+    getCurrentPagesSeiminAll
53
+  } from '../../utils/index.js';
54
+  import {
50 55
     debounce
51 56
   } from 'lodash/function';
52 57
   import {
@@ -62,8 +67,12 @@
62 67
     ASSOCIATION_TYPES
63 68
   } from '../../utils/enum.association_types.js';
64 69
   export default {
70
+    onBackPress() {
71
+      backPress();
72
+    },
65 73
     data() {
66 74
       return {
75
+        reFresh: '',
67 76
         ASSOCIATION_TYPES,
68 77
         checkedShowMsg: {}, //当前选中的任务类型的buildtrip信息
69 78
         selectedPatient: {}, //当前选中的患者
@@ -77,6 +86,13 @@
77 86
         idx: 0, //页码
78 87
       };
79 88
     },
89
+    watch: {
90
+      reFresh() {
91
+        uni.redirectTo({
92
+          url: `${getCurrentPagesSeiminAll()}`,
93
+        })
94
+      }
95
+    },
80 96
     computed: {
81 97
       ...mapState("login", ["loginInfo"]),
82 98
       ...mapState('other', ["deptDisplay"]),
@@ -224,7 +240,7 @@
224 240
         })
225 241
       },
226 242
       // 跳转患者详情
227
-      toDetail(patientCode,patientName) {
243
+      toDetail(patientCode, patientName) {
228 244
         uni.navigateTo({
229 245
           url: `/pages/patientDetail/patientDetail?patientCode=${patientCode}&patientName=${patientName}`
230 246
         })

+ 8 - 1
pages/personalCenter/personalCenter.vue

@@ -43,6 +43,9 @@
43 43
 </template>
44 44
 
45 45
 <script>
46
+  import {
47
+    backPress
48
+  } from '../../utils/index.js';
46 49
   import config from "../../request/config.js";
47 50
   import {
48 51
     mapState,
@@ -54,8 +57,12 @@
54 57
     reqFetchDataList,
55 58
   } from "../../request/api.js";
56 59
   export default {
60
+    onBackPress() {
61
+      backPress();
62
+    },
57 63
     data() {
58 64
       return {
65
+        reFresh: '',
59 66
         hospitalList: [], //当前用户权限中的院区列表
60 67
         pickerTitle: "", //选择院区picker的title
61 68
       };
@@ -303,7 +310,7 @@
303 310
                   plus.runtime.restart();
304 311
                 }
305 312
               );
306
-            }else{
313
+            } else {
307 314
               this.$refs.seiminModel.show({
308 315
                 skin: "toast",
309 316
                 icon: "error",

+ 14 - 7
pages/quickCreateOrder/quickCreateOrder.vue

@@ -73,6 +73,9 @@
73 73
 </template>
74 74
 
75 75
 <script>
76
+  import {
77
+    backPress
78
+  } from '../../utils/index.js';
76 79
   import cloneDeep from 'lodash/cloneDeep';
77 80
   import {
78 81
     mapState,
@@ -90,8 +93,12 @@
90 93
     DEPARTMENT_STRATEGY
91 94
   } from "../../utils/enum.departmentStrategy.js";
92 95
   export default {
96
+    onBackPress() {
97
+      backPress();
98
+    },
93 99
     data() {
94 100
       return {
101
+        reFresh: '',
95 102
         DEPARTMENT_STRATEGY,
96 103
         //患者建单信息展示
97 104
         patientMsg: '',
@@ -148,7 +155,7 @@
148 155
               name: "返回列表",
149 156
               type: "default",
150 157
               click: () => {
151
-                uni.reLaunch({
158
+                uni.navigateTo({
152 159
                   url: '/pages/patientList/patientList'
153 160
                 })
154 161
               },
@@ -175,7 +182,7 @@
175 182
             name: "返回列表",
176 183
             type: "default",
177 184
             click: () => {
178
-              uni.reLaunch({
185
+              uni.navigateTo({
179 186
                 url: '/pages/patientList/patientList'
180 187
               })
181 188
             },
@@ -192,8 +199,8 @@
192 199
           this.remarksFocus = true;
193 200
         });
194 201
         this.workOrderRemark += customRemark;
195
-        console.log(this.workOrderRemark.replace(/\s/g,''))
196
-        this.workOrderRemark = this.workOrderRemark.replace(/\s/g,'').slice(0,100);
202
+        console.log(this.workOrderRemark.replace(/\s/g, ''))
203
+        this.workOrderRemark = this.workOrderRemark.replace(/\s/g, '').slice(0, 100);
197 204
       },
198 205
       //获取所有数据
199 206
       getData(qucikCreateOrderType, qucikCreateOrderTypeId) {
@@ -393,7 +400,7 @@
393 400
                 textColor: "#49B856",
394 401
                 flex: 1,
395 402
                 click() {
396
-                  uni.reLaunch({
403
+                  uni.navigateTo({
397 404
                     url: "/pages/index/index",
398 405
                   });
399 406
                 },
@@ -490,7 +497,7 @@
490 497
           name: "返回列表",
491 498
           type: "default",
492 499
           click: () => {
493
-            uni.reLaunch({
500
+            uni.navigateTo({
494 501
               url: '/pages/patientList/patientList'
495 502
             })
496 503
           },
@@ -500,7 +507,7 @@
500 507
             name: "回到首页",
501 508
             type: "default",
502 509
             click: () => {
503
-              uni.reLaunch({
510
+              uni.navigateTo({
504 511
                 url: "/pages/index/index",
505 512
               });
506 513
             },

+ 32 - 4
pages/search/search.vue

@@ -83,12 +83,17 @@
83 83
         </view>
84 84
       </view>
85 85
     </view>
86
+    <seiminFooterBtn :btns="btns"></seiminFooterBtn>
86 87
     <seiminModel ref="seiminModel"></seiminModel>
87 88
   </view>
88 89
 </template>
89 90
 
90 91
 <script>
91 92
   import {
93
+    backPress,
94
+    getCurrentPagesSeiminAll
95
+  } from '../../utils/index.js';
96
+  import {
92 97
     debounce
93 98
   } from 'lodash/function';
94 99
   import {
@@ -102,8 +107,19 @@
102 107
     ASSOCIATION_TYPES
103 108
   } from '../../utils/enum.association_types.js';
104 109
   export default {
110
+    onBackPress() {
111
+      backPress();
112
+    },
113
+    watch: {
114
+      reFresh() {
115
+        uni.redirectTo({
116
+          url: `${getCurrentPagesSeiminAll()}`,
117
+        })
118
+      }
119
+    },
105 120
     data() {
106 121
       return {
122
+        reFresh: '',
107 123
         queryParams: {}, //路由参数
108 124
         ASSOCIATION_TYPES,
109 125
         checkedShowMsg: {}, //当前选中的任务类型的buildtrip信息
@@ -118,6 +134,16 @@
118 134
           specimenList: [],
119 135
           inspectList: [],
120 136
         },
137
+        //底部按钮
138
+        btns: [{
139
+          name: "返回首页",
140
+          type: "default",
141
+          click: () => {
142
+            uni.navigateTo({
143
+              url: '/pages/index/index'
144
+            })
145
+          },
146
+        }],
121 147
       };
122 148
     },
123 149
     computed: {
@@ -149,13 +175,15 @@
149 175
       //监听输入
150 176
       inputChange(event = '') {
151 177
         let keyWord = event.detail ? event.detail.value : event;
152
-        // 长度小于等于0,返回首页
178
+        // 长度小于等于0,返回空数组
153 179
         // 长度小于等于4,只搜索床号
154 180
         // 长度大于4,搜索患者住院号,患者二维码,标本码,检查单号
155 181
         if (!keyWord.length) {
156
-          uni.reLaunch({
157
-            url: '/pages/index/index'
158
-          })
182
+          this.searchList = {
183
+            patientList: [],
184
+            specimenList: [],
185
+            inspectList: [],
186
+          }
159 187
           return;
160 188
         }
161 189
         let postData = {

+ 11 - 4
pages/searchDept/searchDept.vue

@@ -1,8 +1,8 @@
1 1
 <template>
2 2
   <view class="content">
3 3
     <view class="search-box">
4
-      <seiminSearch class="mSearch-input-box" :mode="2" button="inside" placeholder="输入科室名称支持拼音检索" @search="doSearch(false)"
5
-        @input="changeInp" @confirm="doSearch(false)" v-model="keyword"></seiminSearch>
4
+      <seiminSearch class="mSearch-input-box" :mode="2" button="inside" placeholder="输入科室名称支持拼音检索"
5
+        @search="doSearch(false)" @input="changeInp" @confirm="doSearch(false)" v-model="keyword"></seiminSearch>
6 6
     </view>
7 7
     <view class="search-keyword">
8 8
       <scroll-view class="keyword-list-box" v-show="isShowKeywordList" scroll-y>
@@ -38,6 +38,9 @@
38 38
 
39 39
 <script>
40 40
   import {
41
+    backPress
42
+  } from '../../utils/index.js';
43
+  import {
41 44
     reqFetchDataList,
42 45
     reqChangeHospital,
43 46
     reqUpdData,
@@ -51,8 +54,12 @@
51 54
     DEPARTMENT_STRATEGY
52 55
   } from "../../utils/enum.departmentStrategy.js";
53 56
   export default {
57
+    onBackPress() {
58
+      backPress();
59
+    },
54 60
     data() {
55 61
       return {
62
+        reFresh: '',
56 63
         DEPARTMENT_STRATEGY,
57 64
         keyword: "",
58 65
         oldKeywordList: [],
@@ -371,7 +378,7 @@
371 378
                     click: (e) => {
372 379
                       this.changeLoginInfo(res.data);
373 380
                       this.changeSeiminModel(true);
374
-                      uni.reLaunch({
381
+                      uni.navigateTo({
375 382
                         url: this.searchDeptParams.backUrl,
376 383
                       });
377 384
                     },
@@ -399,7 +406,7 @@
399 406
       },
400 407
       // 快捷建单选择起点科室或选择终点科室
401 408
       selectDept_startOrEnd_qucikCreateOrder() {
402
-        uni.reLaunch({
409
+        uni.navigateTo({
403 410
           url: this.searchDeptParams.backUrl,
404 411
         });
405 412
       },

+ 7 - 0
pages/specimenList/specimenList.vue

@@ -47,14 +47,21 @@
47 47
 
48 48
 <script>
49 49
   import {
50
+    backPress
51
+  } from '../../utils/index.js';
52
+  import {
50 53
     mapState,
51 54
   } from "vuex";
52 55
   import {
53 56
     reqGetSpecimenWorkOrderDetails,
54 57
   } from "../../request/api.js";
55 58
   export default {
59
+    onBackPress() {
60
+      backPress();
61
+    },
56 62
     data() {
57 63
       return {
64
+        reFresh: '',
58 65
         speList: [], //标本列表
59 66
         pickerList: [], //picker列表
60 67
         type: '', //打开picker的类型,急或普查

+ 0 - 5
store/modules/other.js

@@ -9,7 +9,6 @@ const stateReset = {
9 9
   patientTaskType: '', //患者建单的任务类型
10 10
   selectedPatient: {}, //患者建单的选中的患者
11 11
   deptDisplay: 1, //护士端科室显示选择(名称还是别名)1是名称,2是别名
12
-  updateTipsForNurses: "", //护士端更新提示
13 12
   specimenButton: "", //标本按钮文字
14 13
   //护士科室切换提示自动关闭设置
15 14
   // (1)	当用户设置为正数时,用户必须查看此窗体指定秒数。
@@ -54,10 +53,6 @@ const mutations = {
54 53
   changeDeptDisplay(state, args) {
55 54
     state.deptDisplay = args;
56 55
   },
57
-  //护士端更新提示
58
-  changeUpdateTipsForNurses(state, args) {
59
-    state.updateTipsForNurses = args;
60
-  },
61 56
   //标本按钮文字
62 57
   changeSpecimenButton(state, args) {
63 58
     state.specimenButton = args;

+ 7 - 6
store/modules/system.js

@@ -25,17 +25,18 @@ const actions = {
25 25
   }, args) {
26 26
     const excludeArr = ['updateTipsForNurses']; //无需缓存的keyconfig
27 27
     const keyconfig = args.systemConfiguration.keyconfig;
28
-    if (state.systemInfo[keyconfig] && !excludeArr.includes(args.systemConfiguration
29
-        .keyconfig)) {
28
+    if (state.systemInfo[keyconfig]) {
30 29
       //如果存在
31 30
       return await Promise.resolve(state.systemInfo[keyconfig]);
32 31
     } else {
33 32
       let result = await reqFetchDataList('simple/data', 'systemConfiguration', args);
34 33
       if (result.status == 200) {
35
-        commit("vxSystem", {
36
-          key: keyconfig,
37
-          data: result
38
-        });
34
+        if (!excludeArr.includes(keyconfig)) {
35
+          commit("vxSystem", {
36
+            key: keyconfig,
37
+            data: result
38
+          });
39
+        }
39 40
       }
40 41
       return result;
41 42
     }

+ 14 - 0
utils/index.js

@@ -285,3 +285,17 @@ export function showJiaji(id, callBack) {
285 285
     ]
286 286
   });
287 287
 };
288
+
289
+// 返回上一页
290
+export const backPress = function() {
291
+	let pages = getCurrentPages() //页面栈
292
+	let prePage = pages[pages.length - 2] //上一页
293
+	prePage.$vm.reFresh = Math.random() //触发上一页监听器
294
+}
295
+
296
+// 获取页面栈,默认0是当前页面栈,包含参数
297
+export function getCurrentPagesSeiminAll(num = 0) {
298
+  let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
299
+  let curRoute = routes[routes.length - 1 - num].$page.fullPath // 获取当前页面路由,也就是最后一个打开的页面路由
300
+  return curRoute;
301
+};