seimin 3 年之前
父节点
当前提交
aa867121b6
共有 4 个文件被更改,包括 31 次插入21 次删除
  1. 1 1
      main.js
  2. 2 2
      manifest.json
  3. 16 15
      pages/index/index.vue
  4. 12 3
      pages/search/search.vue

+ 1 - 1
main.js

@@ -12,7 +12,7 @@ import {
12
 Vue.prototype.$request = request
12
 Vue.prototype.$request = request
13
 
13
 
14
 Vue.config.productionTip = false
14
 Vue.config.productionTip = false
15
-console.info('v1.0.4')
15
+console.info('v1.0.5')
16
 
16
 
17
 App.mpType = 'app'
17
 App.mpType = 'app'
18
 
18
 

+ 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.4",
6
-    "versionCode" : 104,
5
+    "versionName" : "1.0.5",
6
+    "versionCode" : 105,
7
     "transformPx" : false,
7
     "transformPx" : false,
8
     "app-plus" : {
8
     "app-plus" : {
9
         /* 5+App特有相关 */
9
         /* 5+App特有相关 */

+ 16 - 15
pages/index/index.vue

@@ -119,31 +119,18 @@
119
       uni.$on('scancodedate', data => {
119
       uni.$on('scancodedate', data => {
120
         let code = data.code || '';
120
         let code = data.code || '';
121
         // 过滤
121
         // 过滤
122
-        if (code.startsWith('2#')) {
123
-          code = code.slice(2);
124
-        }
122
+        code = code.replace(/^2#/, '')
125
         uni.navigateTo({
123
         uni.navigateTo({
126
           url: `/pages/search/search?txt=${code}`,
124
           url: `/pages/search/search?txt=${code}`,
127
         })
125
         })
128
       })
126
       })
129
     },
127
     },
130
-    watch: {
131
-      // 首页搜索内容
132
-      searchText(newVal) {
133
-        if (newVal && this.flag) {
134
-          this.flag = false;
135
-          uni.navigateTo({
136
-            url: `/pages/search/search?txt=${newVal}`,
137
-          })
138
-        }
139
-      },
140
-    },
141
     data() {
128
     data() {
142
       return {
129
       return {
143
         isFocus: false,
130
         isFocus: false,
144
         reFresh: '',
131
         reFresh: '',
145
         openSpecimen: false, //标本的开通权限
132
         openSpecimen: false, //标本的开通权限
146
-        searchText: '', //首页搜索内容
133
+        searchText1: '', //首页搜索内容
147
         placeholderStyle: "color:#999;font-size:30rpx;line-height:66rpx;",
134
         placeholderStyle: "color:#999;font-size:30rpx;line-height:66rpx;",
148
         urgentNum: 0, //急标数量
135
         urgentNum: 0, //急标数量
149
         ordinaryNum: 0, //普标数量
136
         ordinaryNum: 0, //普标数量
@@ -163,6 +150,20 @@
163
         "deptDisplay",
150
         "deptDisplay",
164
         "specimenButton",
151
         "specimenButton",
165
       ]),
152
       ]),
153
+      searchText: {
154
+        get: function() {
155
+          return this.searchText1;
156
+        },
157
+        set: function(newVal) {
158
+          this.searchText1 = newVal.replace(/^2#/, '');
159
+          if (this.searchText1 && this.flag) {
160
+            this.flag = false;
161
+            uni.navigateTo({
162
+              url: `/pages/search/search?txt=${this.searchText1}`,
163
+            })
164
+          }
165
+        },
166
+      },
166
     },
167
     },
167
     methods: {
168
     methods: {
168
       ...mapMutations('other', [
169
       ...mapMutations('other', [

+ 12 - 3
pages/search/search.vue

@@ -120,7 +120,7 @@
120
         taskTypeList: [], //任务类型列表
120
         taskTypeList: [], //任务类型列表
121
         pickerTitle: "", //一键建单picker的title
121
         pickerTitle: "", //一键建单picker的title
122
         debounceInp: null,
122
         debounceInp: null,
123
-        keyword: "",
123
+        keyword1: "",
124
         searchList: {
124
         searchList: {
125
           patientList: [],
125
           patientList: [],
126
           specimenList: [],
126
           specimenList: [],
@@ -141,6 +141,14 @@
141
     computed: {
141
     computed: {
142
       ...mapState("login", ["loginInfo"]),
142
       ...mapState("login", ["loginInfo"]),
143
       ...mapState('other', ["deptDisplay"]),
143
       ...mapState('other', ["deptDisplay"]),
144
+      keyword: {
145
+        get: function() {
146
+          return this.keyword1;
147
+        },
148
+        set: function(newVal) {
149
+          this.keyword1 = newVal.replace(/^2#/, '');
150
+        },
151
+      },
144
     },
152
     },
145
     methods: {
153
     methods: {
146
       ...mapMutations('other', ['changeQucikCreateOrderType', 'clearPatientBuildData', 'changePatientBuildData']),
154
       ...mapMutations('other', ['changeQucikCreateOrderType', 'clearPatientBuildData', 'changePatientBuildData']),
@@ -167,6 +175,7 @@
167
       //监听输入
175
       //监听输入
168
       inputChange(event = '') {
176
       inputChange(event = '') {
169
         let keyWord = event.detail ? event.detail.value : event;
177
         let keyWord = event.detail ? event.detail.value : event;
178
+        keyWord = keyWord.replace(/^2#/, '');
170
         // 长度小于等于0,返回空数组
179
         // 长度小于等于0,返回空数组
171
         // 长度小于等于4,只搜索床号
180
         // 长度小于等于4,只搜索床号
172
         // 长度大于4,搜索患者住院号,患者二维码,标本码,检查单号
181
         // 长度大于4,搜索患者住院号,患者二维码,标本码,检查单号
@@ -206,7 +215,7 @@
206
       this.reachBottom();
215
       this.reachBottom();
207
     },
216
     },
208
     onPullDownRefresh() {
217
     onPullDownRefresh() {
209
-      this.inputChange(this.keyword)
218
+      this.inputChange(this.keyword);
210
     },
219
     },
211
     created() {
220
     created() {
212
       this.debounceInp = debounce(this.inputChange, 500);
221
       this.debounceInp = debounce(this.inputChange, 500);
@@ -217,7 +226,7 @@
217
     onLoad(queryParams) {
226
     onLoad(queryParams) {
218
       this.queryParams = queryParams;
227
       this.queryParams = queryParams;
219
       this.keyword = queryParams.txt;
228
       this.keyword = queryParams.txt;
220
-      this.inputChange(queryParams.txt);
229
+      this.inputChange(this.keyword);
221
     },
230
     },
222
     mounted() {
231
     mounted() {
223
       this.$refs.search.inputVal = this.queryParams.txt;
232
       this.$refs.search.inputVal = this.queryParams.txt;