Browse Source

代码的优化与完善

seimin 3 years ago
parent
commit
2e38a1e7f7

+ 1 - 1
App.vue

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

+ 11 - 5
components/seiminFooterNav/seiminFooterNav.vue

@@ -76,7 +76,7 @@
76
       goto(menu) {
76
       goto(menu) {
77
         if (menu.name === "二维码") {
77
         if (menu.name === "二维码") {
78
           this.$refs.seiminModel.show({
78
           this.$refs.seiminModel.show({
79
-            title:'科室二维码',
79
+            title: '科室二维码',
80
             skin: 'qrcode',
80
             skin: 'qrcode',
81
             btns: [{
81
             btns: [{
82
               name: "知道了",
82
               name: "知道了",
@@ -84,9 +84,15 @@
84
             }, ]
84
             }, ]
85
           });
85
           });
86
         } else {
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
     z-index: 9;
117
     z-index: 9;
112
     background-color: #fff;
118
     background-color: #fff;
113
     padding: 0 60rpx;
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
     @include flex(space-between, center);
121
     @include flex(space-between, center);
116
 
122
 
117
     .seiminFooterNav_item {
123
     .seiminFooterNav_item {

+ 1 - 15
package-lock.json

@@ -13,8 +13,7 @@
13
         "crypto-js": "^4.1.1",
13
         "crypto-js": "^4.1.1",
14
         "date-fns": "^2.28.0",
14
         "date-fns": "^2.28.0",
15
         "lodash": "^4.17.21",
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
     "node_modules/animate.css": {
19
     "node_modules/animate.css": {
@@ -47,14 +46,6 @@
47
       "engines": {
46
       "engines": {
48
         "node": "*"
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
   "dependencies": {
51
   "dependencies": {
@@ -82,11 +73,6 @@
82
       "version": "2.29.3",
73
       "version": "2.29.3",
83
       "resolved": "https://registry.npmmirror.com/moment/-/moment-2.29.3.tgz",
74
       "resolved": "https://registry.npmmirror.com/moment/-/moment-2.29.3.tgz",
84
       "integrity": "sha512-c6YRvhEo//6T2Jz/vVtYzqBzwvPT95JBQ+smCytzf7c50oMZRsR/a4w88aD34I+/QVSfnoAnSBFPJHItlOMJVw=="
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
     "crypto-js": "^4.1.1",
18
     "crypto-js": "^4.1.1",
19
     "date-fns": "^2.28.0",
19
     "date-fns": "^2.28.0",
20
     "lodash": "^4.17.21",
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
 </template>
41
 </template>
42
 
42
 
43
 <script>
43
 <script>
44
+  import {
45
+    backPress
46
+  } from '../../utils/index.js';
44
   import cloneDeep from 'lodash/cloneDeep';
47
   import cloneDeep from 'lodash/cloneDeep';
45
   import {
48
   import {
46
     mapState,
49
     mapState,
@@ -50,8 +53,12 @@
50
     ASSOCIATION_TYPES
53
     ASSOCIATION_TYPES
51
   } from "../../utils/enum.association_types.js";
54
   } from "../../utils/enum.association_types.js";
52
   export default {
55
   export default {
56
+    onBackPress() {
57
+      backPress();
58
+    },
53
     data() {
59
     data() {
54
       return {
60
       return {
61
+        reFresh: '',
55
         ASSOCIATION_TYPES,
62
         ASSOCIATION_TYPES,
56
         qcoHeight: 0,
63
         qcoHeight: 0,
57
         // 关联检查有多个科室,但是开关设置是不允许,是否展示提示文字
64
         // 关联检查有多个科室,但是开关设置是不允许,是否展示提示文字

+ 7 - 0
pages/detail/detail.vue

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

+ 21 - 11
pages/index/index.vue

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

+ 7 - 0
pages/orderDetail/orderDetail.vue

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

+ 7 - 0
pages/orderList/orderList.vue

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

+ 9 - 2
pages/patientBuild/patientBuild.vue

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

+ 3 - 2
pages/patientBuildConfirm/patientBuildConfirm.vue

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

+ 13 - 5
pages/patientDetail/patientDetail.vue

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

+ 18 - 2
pages/patientList/patientList.vue

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

+ 8 - 1
pages/personalCenter/personalCenter.vue

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

+ 14 - 7
pages/quickCreateOrder/quickCreateOrder.vue

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

+ 32 - 4
pages/search/search.vue

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

+ 11 - 4
pages/searchDept/searchDept.vue

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

+ 7 - 0
pages/specimenList/specimenList.vue

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

+ 0 - 5
store/modules/other.js

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

+ 7 - 6
store/modules/system.js

@@ -25,17 +25,18 @@ const actions = {
25
   }, args) {
25
   }, args) {
26
     const excludeArr = ['updateTipsForNurses']; //无需缓存的keyconfig
26
     const excludeArr = ['updateTipsForNurses']; //无需缓存的keyconfig
27
     const keyconfig = args.systemConfiguration.keyconfig;
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
       return await Promise.resolve(state.systemInfo[keyconfig]);
30
       return await Promise.resolve(state.systemInfo[keyconfig]);
32
     } else {
31
     } else {
33
       let result = await reqFetchDataList('simple/data', 'systemConfiguration', args);
32
       let result = await reqFetchDataList('simple/data', 'systemConfiguration', args);
34
       if (result.status == 200) {
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
       return result;
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
+};