|
@@ -1,22 +1,370 @@
|
1
|
1
|
<template>
|
2
|
|
- <view>
|
3
|
|
-
|
|
2
|
+ <view class="search">
|
|
3
|
+ <view class="search-box">
|
|
4
|
+ <seiminSearch class="mSearch-input-box" :mode="2" button="inside" placeholder="请输入标本编码/检查单号/患者编码"
|
|
5
|
+ @input="debounceInp" v-model="keyword" ref="search"></seiminSearch>
|
|
6
|
+ </view>
|
|
7
|
+ <view class="search-keyword">
|
|
8
|
+ <!-- 患者 -->
|
|
9
|
+ <view class="head" v-if="searchList.patientList.length">患者</view>
|
|
10
|
+ <view class="orderList_listItem" v-for="search in searchList.patientList" :key="search.id"
|
|
11
|
+ @click="toDetail(search,'patient')">
|
|
12
|
+ <view class="orderList_listItem_header">
|
|
13
|
+ <view class="orderList_listItem_header_title">
|
|
14
|
+ <block v-if="search.illnessState">
|
|
15
|
+ <view class="associationType_icon red" v-if="search.illnessState.value === '2'">危</view>
|
|
16
|
+ <view class="associationType_icon red" v-else-if="search.illnessState.value === '3'">重</view>
|
|
17
|
+ </block>
|
|
18
|
+ <block v-if="search.careLevel">
|
|
19
|
+ <view class="associationType_icon red" v-if="search.careLevel.value === '0'">特</view>
|
|
20
|
+ <view class="associationType_icon red" v-else-if="search.careLevel.value === '1'">1</view>
|
|
21
|
+ <view class="associationType_icon green" v-else-if="search.careLevel.value === '2'">2</view>
|
|
22
|
+ <view class="associationType_icon green" v-else-if="search.careLevel.value === '3'">3</view>
|
|
23
|
+ </block>
|
|
24
|
+ <view class="taskNameAndWorkerName">
|
|
25
|
+ <text class="workerName">{{search.patientName || '暂无'}}</text>
|
|
26
|
+ </view>
|
|
27
|
+ </view>
|
|
28
|
+ <text class="orderList_listItem_header_more">{{search.bedNum }}床</text>
|
|
29
|
+ </view>
|
|
30
|
+ <view class="orderList_listItem_item">
|
|
31
|
+ <view class="orderList_listItem_item_content">
|
|
32
|
+ <text class="orderList_listItem_item_name">{{search.residenceNo || '暂无'}}</text>
|
|
33
|
+ <text class="orderList_listItem_item_time">待检{{search.watingCount}}</text>
|
|
34
|
+ </view>
|
|
35
|
+ </view>
|
|
36
|
+ </view>
|
|
37
|
+ <!-- 标本 -->
|
|
38
|
+ <view class="head" v-if="searchList.specimenList.length">标本</view>
|
|
39
|
+ <view class="orderList_listItem" v-for="search in searchList.specimenList" :key="search.id"
|
|
40
|
+ @click="toDetail(search,'specimen')">
|
|
41
|
+ <view class="orderList_listItem_header">
|
|
42
|
+ <view class="orderList_listItem_header_title">
|
|
43
|
+ <view class="taskNameAndWorkerName">
|
|
44
|
+ <text class="workerName">{{search.specimenDesc || '暂无'}}</text>
|
|
45
|
+ </view>
|
|
46
|
+ </view>
|
|
47
|
+ <text class="orderList_listItem_header_more">{{search.scode || '暂无' }}</text>
|
|
48
|
+ </view>
|
|
49
|
+ <view class="orderList_listItem_item">
|
|
50
|
+ <view class="orderList_listItem_item_content">
|
|
51
|
+ <text class="orderList_listItem_item_name">{{search.patientName || '暂无'}}
|
|
52
|
+ <block v-if="search.bedNum">({{search.bedNum}}床)</block>
|
|
53
|
+ </text>
|
|
54
|
+ <text class="orderList_listItem_item_time">{{search.speState?search.speState.name:'暂无'}}</text>
|
|
55
|
+ </view>
|
|
56
|
+ </view>
|
|
57
|
+ </view>
|
|
58
|
+ <!-- 检查 -->
|
|
59
|
+ <view class="head" v-if="searchList.inspectList.length">检查</view>
|
|
60
|
+ <view class="orderList_listItem" v-for="search in searchList.inspectList" :key="search.id"
|
|
61
|
+ @click="toDetail(search,'inspect')">
|
|
62
|
+ <view class="orderList_listItem_header">
|
|
63
|
+ <view class="orderList_listItem_header_title">
|
|
64
|
+ <view class="taskNameAndWorkerName">
|
|
65
|
+ <text class="workerName">{{search.inspectName || '暂无'}}</text>
|
|
66
|
+ </view>
|
|
67
|
+ </view>
|
|
68
|
+ <text class="orderList_listItem_header_more">{{search.bedNum }}床</text>
|
|
69
|
+ </view>
|
|
70
|
+ <view class="orderList_listItem_item">
|
|
71
|
+ <view class="orderList_listItem_item_content no">
|
|
72
|
+ <view class="no_item">
|
|
73
|
+ <text class="orderList_listItem_item_name">{{search.inspectCode || '暂无'}}</text>
|
|
74
|
+ <text class="orderList_listItem_item_time"></text>
|
|
75
|
+ </view>
|
|
76
|
+ <view class="no_item">
|
|
77
|
+ <text class="orderList_listItem_item_name">{{search.patientName || '暂无'}}
|
|
78
|
+ <block v-if="search.bedNum">({{search.bedNum}}床)</block>
|
|
79
|
+ </text>
|
|
80
|
+ <text class="orderList_listItem_item_time">{{search.yyTime||'暂无'}}</text>
|
|
81
|
+ </view>
|
|
82
|
+ </view>
|
|
83
|
+ </view>
|
|
84
|
+ </view>
|
|
85
|
+ </view>
|
|
86
|
+ <seiminModel ref="seiminModel"></seiminModel>
|
4
|
87
|
</view>
|
5
|
88
|
</template>
|
6
|
89
|
|
7
|
90
|
<script>
|
|
91
|
+ import {
|
|
92
|
+ debounce
|
|
93
|
+ } from 'lodash/function';
|
|
94
|
+ import {
|
|
95
|
+ reqSmartScan,
|
|
96
|
+ } from "../../request/api.js";
|
|
97
|
+ import {
|
|
98
|
+ mapState,
|
|
99
|
+ mapMutations,
|
|
100
|
+ } from "vuex";
|
|
101
|
+ import {
|
|
102
|
+ ASSOCIATION_TYPES
|
|
103
|
+ } from '../../utils/enum.association_types.js';
|
8
|
104
|
export default {
|
9
|
105
|
data() {
|
10
|
106
|
return {
|
11
|
|
-
|
|
107
|
+ queryParams: {}, //路由参数
|
|
108
|
+ ASSOCIATION_TYPES,
|
|
109
|
+ checkedShowMsg: {}, //当前选中的任务类型的buildtrip信息
|
|
110
|
+ selectedPatient: {}, //当前选中的患者
|
|
111
|
+ taskTypeListResource: [], //任务类型列表(请求的原始数据)
|
|
112
|
+ taskTypeList: [], //任务类型列表
|
|
113
|
+ pickerTitle: "", //一键建单picker的title
|
|
114
|
+ debounceInp: null,
|
|
115
|
+ keyword: "",
|
|
116
|
+ searchList: {
|
|
117
|
+ patientList: [],
|
|
118
|
+ specimenList: [],
|
|
119
|
+ inspectList: [],
|
|
120
|
+ },
|
12
|
121
|
};
|
13
|
122
|
},
|
14
|
|
- onLoad() {
|
15
|
|
-
|
|
123
|
+ computed: {
|
|
124
|
+ ...mapState("login", ["loginInfo"]),
|
|
125
|
+ ...mapState('other', ["deptDisplay"]),
|
16
|
126
|
},
|
17
|
|
- }
|
|
127
|
+ methods: {
|
|
128
|
+ ...mapMutations('other', ['changeQucikCreateOrderType', 'clearPatientBuildData', 'changePatientBuildData']),
|
|
129
|
+ // 跳转患者详情
|
|
130
|
+ toDetail(search, type) {
|
|
131
|
+ switch (type) {
|
|
132
|
+ case 'patient':
|
|
133
|
+ uni.navigateTo({
|
|
134
|
+ url: `/pages/patientDetail/patientDetail?patientCode=${search.patientCode}&patientName=${search.patientName}`
|
|
135
|
+ })
|
|
136
|
+ break;
|
|
137
|
+ case 'specimen':
|
|
138
|
+ uni.navigateTo({
|
|
139
|
+ url: `/pages/detail/detail?id=${search.id}&associationType=specimen&scode=${search.scode}`
|
|
140
|
+ })
|
|
141
|
+ break;
|
|
142
|
+ case 'inspect':
|
|
143
|
+ uni.navigateTo({
|
|
144
|
+ url: `/pages/detail/detail?id=${search.id}&associationType=inspect`
|
|
145
|
+ })
|
|
146
|
+ break;
|
|
147
|
+ }
|
|
148
|
+ },
|
|
149
|
+ //监听输入
|
|
150
|
+ inputChange(event = '') {
|
|
151
|
+ let keyWord = event.detail ? event.detail.value : event;
|
|
152
|
+ // 长度小于等于0,返回首页
|
|
153
|
+ // 长度小于等于4,只搜索床号
|
|
154
|
+ // 长度大于4,搜索患者住院号,患者二维码,标本码,检查单号
|
|
155
|
+ if (!keyWord.length) {
|
|
156
|
+ uni.navigateTo({
|
|
157
|
+ url: '/pages/index/index'
|
|
158
|
+ })
|
|
159
|
+ return;
|
|
160
|
+ }
|
|
161
|
+ let postData = {
|
|
162
|
+ deptId: this.loginInfo.user.dept.id,
|
|
163
|
+ code: keyWord
|
|
164
|
+ };
|
|
165
|
+ uni.showLoading({
|
|
166
|
+ title: "加载中",
|
|
167
|
+ mask: true,
|
|
168
|
+ });
|
|
169
|
+ reqSmartScan(postData).then((res) => {
|
|
170
|
+ uni.hideLoading();
|
|
171
|
+ uni.stopPullDownRefresh();
|
|
172
|
+ if (res.state == 200) {
|
|
173
|
+ Object.assign(this.searchList, res.data);
|
|
174
|
+ console.log(this.searchList)
|
|
175
|
+ } else {
|
|
176
|
+ this.$refs.seiminModel.show({
|
|
177
|
+ skin: "toast",
|
|
178
|
+ icon: "error",
|
|
179
|
+ content: res.msg || "获取数据失败",
|
|
180
|
+ });
|
|
181
|
+ throw new Error(res.msg || "获取数据失败");
|
|
182
|
+ }
|
|
183
|
+ });
|
|
184
|
+ },
|
|
185
|
+ },
|
|
186
|
+ onReachBottom() {
|
|
187
|
+ this.reachBottom();
|
|
188
|
+ },
|
|
189
|
+ onPullDownRefresh() {
|
|
190
|
+ this.inputChange(this.keyword)
|
|
191
|
+ },
|
|
192
|
+ created() {
|
|
193
|
+ this.debounceInp = debounce(this.inputChange, 500);
|
|
194
|
+ },
|
|
195
|
+ beforeDestroy() {
|
|
196
|
+ this.debounceInp.cancel()
|
|
197
|
+ },
|
|
198
|
+ onLoad(queryParams) {
|
|
199
|
+ this.queryParams = queryParams;
|
|
200
|
+ this.keyword = queryParams.txt;
|
|
201
|
+ this.inputChange(queryParams.txt);
|
|
202
|
+ },
|
|
203
|
+ mounted() {
|
|
204
|
+ this.$refs.search.inputVal = this.queryParams.txt;
|
|
205
|
+ }
|
|
206
|
+ };
|
18
|
207
|
</script>
|
|
208
|
+<style lang="scss" scoped>
|
|
209
|
+ .search {
|
|
210
|
+ padding-bottom: 108rpx;
|
|
211
|
+
|
|
212
|
+ .search-box {
|
|
213
|
+ background-color: rgb(242, 242, 242);
|
|
214
|
+ padding: 15rpx 2.5%;
|
|
215
|
+ position: fixed;
|
|
216
|
+ z-index: 99;
|
|
217
|
+ width: 100%;
|
|
218
|
+ @include flex(space-between);
|
|
219
|
+
|
|
220
|
+ .mSearch-input-box {
|
|
221
|
+ width: 100%;
|
|
222
|
+ }
|
|
223
|
+
|
|
224
|
+ .input-box {
|
|
225
|
+ width: 85%;
|
|
226
|
+ flex-shrink: 1;
|
|
227
|
+ @include flex(center, center);
|
|
228
|
+
|
|
229
|
+ &>input {
|
|
230
|
+ width: 100%;
|
|
231
|
+ height: 60rpx;
|
|
232
|
+ font-size: 32rpx;
|
|
233
|
+ border: 0;
|
|
234
|
+ border-radius: 60rpx;
|
|
235
|
+ appearance: none;
|
|
236
|
+ padding: 0 3%;
|
|
237
|
+ margin: 0;
|
|
238
|
+ background-color: #ffffff;
|
|
239
|
+ }
|
|
240
|
+ }
|
|
241
|
+
|
|
242
|
+ .search-btn {
|
|
243
|
+ width: 15%;
|
|
244
|
+ margin: 0 0 0 2%;
|
|
245
|
+ flex-shrink: 0;
|
|
246
|
+ font-size: 28rpx;
|
|
247
|
+ color: #fff;
|
|
248
|
+ background: linear-gradient(to right, #ff9801, #ff570a);
|
|
249
|
+ border-radius: 60rpx;
|
|
250
|
+ @include flex(center, center);
|
|
251
|
+ }
|
|
252
|
+ }
|
|
253
|
+
|
|
254
|
+ .search-keyword {
|
|
255
|
+ padding: 88rpx 24rpx 0;
|
|
256
|
+
|
|
257
|
+ .head {
|
|
258
|
+ font-weight: bold;
|
|
259
|
+ }
|
19
|
260
|
|
20
|
|
-<style lang="scss">
|
|
261
|
+ // 列表项
|
|
262
|
+ .orderList_listItem {
|
|
263
|
+ width: 702rpx;
|
|
264
|
+ min-height: 232rpx;
|
|
265
|
+ background-color: #fff;
|
|
266
|
+ position: relative;
|
|
267
|
+ margin-top: 8rpx;
|
|
268
|
+ border-radius: 8rpx;
|
|
269
|
+ padding: 0 24rpx;
|
|
270
|
+ font-size: 32rpx;
|
|
271
|
+ @include border;
|
|
272
|
+ @include semicircle(#F9FAFB, 82rpx);
|
|
273
|
+ @include flex(flex-start, stretch, column);
|
21
|
274
|
|
|
275
|
+ .orderList_listItem_header {
|
|
276
|
+ height: 86rpx;
|
|
277
|
+ @include border($directive:bottom, $style:dashed);
|
|
278
|
+ @include flex(space-between, center);
|
|
279
|
+
|
|
280
|
+ .orderList_listItem_header_title {
|
|
281
|
+ color: #333;
|
|
282
|
+ flex: 1;
|
|
283
|
+ @include flex(flex-start, center);
|
|
284
|
+
|
|
285
|
+ .associationType_icon {
|
|
286
|
+ width: 48rpx;
|
|
287
|
+ height: 48rpx;
|
|
288
|
+ border-radius: 50%;
|
|
289
|
+ font-size: 24rpx;
|
|
290
|
+ margin-right: 8rpx;
|
|
291
|
+ @include border($color:#39b199);
|
|
292
|
+ @include flex(center, center);
|
|
293
|
+
|
|
294
|
+ &.green {
|
|
295
|
+ color: $defaultColor;
|
|
296
|
+ border: 1px solid $defaultColor;
|
|
297
|
+ background-color: rgba(73, 184, 86, 0.1);
|
|
298
|
+ }
|
|
299
|
+
|
|
300
|
+ &.red {
|
|
301
|
+ color: #FF3B53;
|
|
302
|
+ border: 1px solid #FF3B53;
|
|
303
|
+ background-color: #FFE8EB;
|
|
304
|
+ }
|
|
305
|
+ }
|
|
306
|
+
|
|
307
|
+ .taskNameAndWorkerName {
|
|
308
|
+ flex: 1;
|
|
309
|
+ @include flex;
|
|
310
|
+
|
|
311
|
+ .taskName {
|
|
312
|
+ max-width: 10em;
|
|
313
|
+ @include clamp;
|
|
314
|
+ }
|
|
315
|
+
|
|
316
|
+ .workerName {
|
|
317
|
+ flex: 1;
|
|
318
|
+ @include clamp;
|
|
319
|
+ }
|
|
320
|
+ }
|
|
321
|
+ }
|
|
322
|
+
|
|
323
|
+ .orderList_listItem_header_more {
|
|
324
|
+ color: #333;
|
|
325
|
+ font-weight: bold;
|
|
326
|
+ @include clamp;
|
|
327
|
+ }
|
|
328
|
+ }
|
|
329
|
+
|
|
330
|
+ .orderList_listItem_item {
|
|
331
|
+ height: 88rpx;
|
|
332
|
+ color: #333;
|
|
333
|
+ font-size: 30rpx;
|
|
334
|
+ flex: 1;
|
|
335
|
+ @include border(bottom);
|
|
336
|
+ @include flex(flex-start, stretch, column);
|
|
337
|
+
|
|
338
|
+ &:last-of-type {
|
|
339
|
+ border-bottom: none;
|
|
340
|
+ }
|
|
341
|
+
|
|
342
|
+ .orderList_listItem_item_content {
|
|
343
|
+ min-height: 143rpx;
|
|
344
|
+ flex: 1;
|
|
345
|
+ @include flex(space-between, center);
|
|
346
|
+
|
|
347
|
+ &.no {
|
|
348
|
+ @include flex($flexDirection: column);
|
|
349
|
+
|
|
350
|
+ .no_item {
|
|
351
|
+ height: 50%;
|
|
352
|
+ @include flex(space-between, center);
|
|
353
|
+ }
|
|
354
|
+ }
|
|
355
|
+
|
|
356
|
+ .orderList_listItem_item_name {
|
|
357
|
+ font-size: 34rpx;
|
|
358
|
+ }
|
|
359
|
+
|
|
360
|
+ .orderList_listItem_item_time {
|
|
361
|
+ color: #333;
|
|
362
|
+ font-size: 34rpx;
|
|
363
|
+ font-weight: bold;
|
|
364
|
+ }
|
|
365
|
+ }
|
|
366
|
+ }
|
|
367
|
+ }
|
|
368
|
+ }
|
|
369
|
+ }
|
22
|
370
|
</style>
|