seimin 3 lat temu
rodzic
commit
240ec5752e

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
2
     "name" : "医疗服务中心转运系统",
2
     "name" : "医疗服务中心转运系统",
3
     "appid" : "__UNI__FEB1B1E",
3
     "appid" : "__UNI__FEB1B1E",
4
     "description" : "医疗服务中心转运系统",
4
     "description" : "医疗服务中心转运系统",
5
-    "versionName" : "1.0.0",
6
-    "versionCode" : "100",
5
+    "versionName" : "1.0.1",
6
+    "versionCode" : 101,
7
     "transformPx" : false,
7
     "transformPx" : false,
8
     "app-plus" : {
8
     "app-plus" : {
9
         /* 5+App特有相关 */
9
         /* 5+App特有相关 */

+ 11 - 0
pages.json

@@ -140,6 +140,17 @@
140
         "enablePullDownRefresh": true
140
         "enablePullDownRefresh": true
141
       }
141
       }
142
 
142
 
143
+    }, {
144
+      "path": "pages/search/search",
145
+      "style": {
146
+        "h5": {
147
+          "titleNView": false
148
+        },
149
+        "navigationBarTitleText": "搜索",
150
+        "navigationBarBackgroundColor": "#2C2D31",
151
+        "enablePullDownRefresh": true
152
+      }
153
+
143
     }
154
     }
144
   ],
155
   ],
145
   "globalStyle": {
156
   "globalStyle": {

+ 11 - 1
pages/index/index.vue

@@ -5,7 +5,8 @@
5
       <!-- 头部搜索 -->
5
       <!-- 头部搜索 -->
6
       <view class="search">
6
       <view class="search">
7
         <view class="search_wrap">
7
         <view class="search_wrap">
8
-          <input focus placeholder="请输入标本编码/检查单号/请…" :placeholder-style="placeholderStyle" confirm-type="search" />
8
+          <input focus placeholder="请输入标本编码/检查单号/请…" :placeholder-style="placeholderStyle" confirm-type="search"
9
+            v-model="searchText" />
9
           <view class="searchBtn"> 搜索 </view>
10
           <view class="searchBtn"> 搜索 </view>
10
         </view>
11
         </view>
11
         <view class="icon-saoma">
12
         <view class="icon-saoma">
@@ -103,8 +104,17 @@
103
     ASSOCIATION_TYPES
104
     ASSOCIATION_TYPES
104
   } from "../../utils/enum.association_types.js";
105
   } from "../../utils/enum.association_types.js";
105
   export default {
106
   export default {
107
+    watch: {
108
+      // 首页搜索内容
109
+      searchText(newVal) {
110
+        uni.navigateTo({
111
+          url: `/pages/search/search?txt=${newVal}`
112
+        })
113
+      }
114
+    },
106
     data() {
115
     data() {
107
       return {
116
       return {
117
+        searchText: '', //首页搜索内容
108
         placeholderStyle: "color:#999;font-size:30rpx;line-height:66rpx;",
118
         placeholderStyle: "color:#999;font-size:30rpx;line-height:66rpx;",
109
         urgentNum: 0, //急标数量
119
         urgentNum: 0, //急标数量
110
         ordinaryNum: 0, //普标数量
120
         ordinaryNum: 0, //普标数量

+ 7 - 2
pages/patientBuild/patientBuild.vue

@@ -227,7 +227,12 @@
227
         }
227
         }
228
         //判断预约建单按钮
228
         //判断预约建单按钮
229
         console.log(this.patientBuildTrip)
229
         console.log(this.patientBuildTrip)
230
-        if (this.hasYYtimeChecks.length && this.patientTaskType.appointmentSwitch == 1) {
230
+        if (
231
+          (this.patientTaskType.associationType.value === this.ASSOCIATION_TYPES['患者陪检业务'] &&
232
+            this.hasYYtimeChecks.length && this.patientTaskType.appointmentSwitch == 1) ||
233
+          (this.patientTaskType.associationType.value === this.ASSOCIATION_TYPES['患者其他服务业务'] &&
234
+            this.patientTaskType.appointmentOtherSwitch == 1)
235
+        ) {
231
           //选中的检查数组都有预约时间并且允许预约建单
236
           //选中的检查数组都有预约时间并且允许预约建单
232
           this.isYYBuild = true;
237
           this.isYYBuild = true;
233
           this.allowUrgentChange(this.isUrgent);
238
           this.allowUrgentChange(this.isUrgent);
@@ -244,12 +249,12 @@
244
           this.timestamp = new Date().getTime();
249
           this.timestamp = new Date().getTime();
245
           this.yyInspectChange();
250
           this.yyInspectChange();
246
         }
251
         }
247
-
248
         // 底部按钮展示
252
         // 底部按钮展示
249
         this.showBtns(this.isYYBuild);
253
         this.showBtns(this.isYYBuild);
250
       },
254
       },
251
       // 底部按钮展示
255
       // 底部按钮展示
252
       showBtns(flag) {
256
       showBtns(flag) {
257
+        console.log(flag)
253
         if (flag) {
258
         if (flag) {
254
           //患者陪检业务或患者其他服务业务,并且预约建单开关打开的情况下
259
           //患者陪检业务或患者其他服务业务,并且预约建单开关打开的情况下
255
           this.btns = [{
260
           this.btns = [{

+ 96 - 0
pages/personalCenter/personalCenter.vue

@@ -29,6 +29,7 @@
29
     </view>
29
     </view>
30
     <view class="changeDept">
30
     <view class="changeDept">
31
       <button type="primary" @click="showDeptModel">切换科室</button>
31
       <button type="primary" @click="showDeptModel">切换科室</button>
32
+      <button type="primary" @click="checkUpdate">检测更新</button>
32
       <button type="primary" @click="changePwd">修改密码</button>
33
       <button type="primary" @click="changePwd">修改密码</button>
33
       <button type="primary" @click="logout">退出登录</button>
34
       <button type="primary" @click="logout">退出登录</button>
34
     </view>
35
     </view>
@@ -42,6 +43,7 @@
42
 </template>
43
 </template>
43
 
44
 
44
 <script>
45
 <script>
46
+  import config from "../../request/config.js";
45
   import {
47
   import {
46
     mapState,
48
     mapState,
47
     mapMutations
49
     mapMutations
@@ -49,6 +51,7 @@
49
   import {
51
   import {
50
     reqLogout2,
52
     reqLogout2,
51
     reqUppwd,
53
     reqUppwd,
54
+    reqFetchDataList,
52
   } from "../../request/api.js";
55
   } from "../../request/api.js";
53
   export default {
56
   export default {
54
     data() {
57
     data() {
@@ -220,6 +223,99 @@
220
           }, ],
223
           }, ],
221
         })
224
         })
222
       },
225
       },
226
+      // 检测更新
227
+      checkUpdate() {
228
+        uni.showLoading({
229
+          mask: true,
230
+          title: '加载中'
231
+        })
232
+        let postData = {
233
+          "idx": 0,
234
+          "sum": 1,
235
+          "systemConfiguration": {
236
+            "keyconfig": "pdaVersion"
237
+          }
238
+        };
239
+        reqFetchDataList('simple/data', 'systemConfiguration', postData)
240
+          .then((data) => {
241
+            uni.hideLoading();
242
+            if (data.status == 200) {
243
+              const version = data.list[0].valueconfig;
244
+              // #ifdef APP-PLUS
245
+              plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
246
+                console.log(wgtinfo.version); //应用版本号
247
+                if (wgtinfo.version === version) {
248
+                  this.$refs.seiminModel.show({
249
+                    skin: "toast",
250
+                    icon: "success",
251
+                    content: "您所使用的已是最新版本",
252
+                  });
253
+                } else {
254
+                  this.$refs.seiminModel.show({
255
+                    icon: 'warn',
256
+                    content: `发现新版本Version ${version}`,
257
+                    btns: [{},
258
+                      {
259
+                        name: '立即下载更新',
260
+                        click: () => {
261
+                          this.downloadUrl(`${config.pdaDownloadUrl}/pda-v${version}.apk`);
262
+                        }
263
+                      }
264
+                    ]
265
+                  });
266
+                }
267
+              })
268
+              // #endif
269
+              // #ifndef APP-PLUS
270
+              this.$refs.seiminModel.show({
271
+                skin: "toast",
272
+                icon: "error",
273
+                content: "当前不是APP端",
274
+              });
275
+              // #endif
276
+            } else {
277
+              this.$refs.seiminModel.show({
278
+                skin: "toast",
279
+                icon: "error",
280
+                content: data.error || "获取版本失败",
281
+              });
282
+            }
283
+          });
284
+      },
285
+      // 下载更新
286
+      downloadUrl(Url = '') {
287
+        uni.showLoading({
288
+          title: '更新中……',
289
+          mask: true,
290
+        })
291
+        const downloadTask = uni.downloadFile({ //执行下载
292
+          url: Url, //下载地址
293
+          timeout: 1000 * 30, //30秒超时时间
294
+          success: downloadResult => { //下载成功
295
+            console.log(downloadResult)
296
+            uni.hideLoading();
297
+            if (downloadResult.statusCode == 200) {
298
+              plus.runtime.install( //安装软件
299
+                downloadResult.tempFilePath, {
300
+                  force: true
301
+                },
302
+                function(res) {
303
+                  plus.runtime.restart();
304
+                }
305
+              );
306
+            }
307
+          },
308
+          fail: err => {
309
+            uni.hideLoading();
310
+            this.$refs.seiminModel.show({
311
+              skin: "toast",
312
+              icon: "error",
313
+              content: "更新失败",
314
+            });
315
+            console.log(err)
316
+          },
317
+        });
318
+      },
223
     }
319
     }
224
   }
320
   }
225
 </script>
321
 </script>

+ 22 - 0
pages/search/search.vue

@@ -0,0 +1,22 @@
1
+<template>
2
+  <view>
3
+
4
+  </view>
5
+</template>
6
+
7
+<script>
8
+  export default {
9
+    data() {
10
+      return {
11
+
12
+      };
13
+    },
14
+    onLoad() {
15
+
16
+    },
17
+  }
18
+</script>
19
+
20
+<style lang="scss">
21
+
22
+</style>

+ 3 - 2
request/config.js

@@ -5,15 +5,16 @@
5
  * @LastEditTime: 2022-04-02 14:29:15
5
  * @LastEditTime: 2022-04-02 14:29:15
6
  * @Description: 后端服务配置文件
6
  * @Description: 后端服务配置文件
7
  */
7
  */
8
+const host = 'http://192.168.3.108';
8
 //配置项
9
 //配置项
9
 const config = {
10
 const config = {
10
   baseUrl: "", // 后端服务地址
11
   baseUrl: "", // 后端服务地址
12
+  pdaDownloadUrl: `${host}/assets/downloads`, // PDA下载地址
11
 };
13
 };
12
 // 后端服务地址
14
 // 后端服务地址
13
 const baseUrls = {
15
 const baseUrls = {
14
   development: "http://192.168.3.108/service", //开发环境
16
   development: "http://192.168.3.108/service", //开发环境
15
-  // development: "http://localhost/service", //开发环境
16
-  production: "http://192.168.3.108/service", //生产环境
17
+  production: `${host}/service`, //生产环境
17
 };
18
 };
18
 config.baseUrl = baseUrls[process.env.NODE_ENV];
19
 config.baseUrl = baseUrls[process.env.NODE_ENV];
19
 export default config;
20
 export default config;