|
@@ -25,16 +25,43 @@
|
25
|
25
|
<div class="field_panel">
|
26
|
26
|
<van-field v-model="date" class="field"></van-field>
|
27
|
27
|
</div>
|
|
28
|
+
|
28
|
29
|
</van-col>
|
|
30
|
+
|
|
31
|
+
|
29
|
32
|
</van-row>
|
30
|
33
|
<van-row class="row">
|
|
34
|
+
|
31
|
35
|
<van-col :span="9">
|
32
|
36
|
<span class="title">患者:</span>
|
33
|
37
|
<div class="field_panel">
|
34
|
|
- <van-field ref="patient_field" @focus="selectPatientAction" :value="patient_name" class="field"
|
35
|
|
- left-icon="arrow-down"></van-field>
|
|
38
|
+ <van-field ref="patient_field" @focus="selectPatientAction" :value="patient_name" class="field"
|
|
39
|
+ left-icon="arrow-down"></van-field>
|
|
40
|
+ </div>
|
|
41
|
+ </van-col>
|
|
42
|
+
|
|
43
|
+ <van-col :span="9">
|
|
44
|
+
|
|
45
|
+ <div class="field_panel">
|
|
46
|
+ <el-autocomplete
|
|
47
|
+ style="float: right"
|
|
48
|
+ popper-class="my-autocomplete"
|
|
49
|
+ v-model="value"
|
|
50
|
+ :fetch-suggestions="querySearchAsync"
|
|
51
|
+ :trigger-on-focus="false"
|
|
52
|
+ placeholder="请输入病人名字"
|
|
53
|
+ @select="handleSelect"
|
|
54
|
+ >
|
|
55
|
+ <i class="el-icon-search el-input__icon" slot="suffix"> </i>
|
|
56
|
+ <template slot-scope="{ item }">
|
|
57
|
+ <div class="name">{{ item.name }}</div>
|
|
58
|
+ </template>
|
|
59
|
+ </el-autocomplete>
|
36
|
60
|
</div>
|
37
|
61
|
</van-col>
|
|
62
|
+
|
|
63
|
+ </van-row>
|
|
64
|
+ <van-row class="row">
|
38
|
65
|
<van-col :span="9">
|
39
|
66
|
<span class="title">班次:</span>
|
40
|
67
|
<div class="field_panel">
|
|
@@ -42,8 +69,7 @@
|
42
|
69
|
left-icon="arrow-down"></van-field>
|
43
|
70
|
</div>
|
44
|
71
|
</van-col>
|
45
|
|
- </van-row>
|
46
|
|
- <van-row class="row">
|
|
72
|
+
|
47
|
73
|
<van-col :span="9">
|
48
|
74
|
<span class="title">治疗模式:</span>
|
49
|
75
|
<div class="field_panel">
|
|
@@ -88,7 +114,7 @@
|
88
|
114
|
<script>
|
89
|
115
|
import SideBar from '@/pages/layout/SideBar'
|
90
|
116
|
import {parseTime} from '@/utils'
|
91
|
|
- import {getUrgentScheduleInitData, postUrgentSchedule} from '@/api/dialysis'
|
|
117
|
+ import {getUrgentScheduleInitData, PostSearch, postUrgentSchedule} from '@/api/dialysis'
|
92
|
118
|
import {Dialog, Toast} from 'vant'
|
93
|
119
|
|
94
|
120
|
export default {
|
|
@@ -99,7 +125,7 @@
|
99
|
125
|
data () {
|
100
|
126
|
return {
|
101
|
127
|
loading: false,
|
102
|
|
-
|
|
128
|
+ value: '',
|
103
|
129
|
date: '2019-09-09',
|
104
|
130
|
patient_id: 0,
|
105
|
131
|
mode_id: 0,
|
|
@@ -196,10 +222,10 @@
|
196
|
222
|
this.modes = rs.data.data.modes
|
197
|
223
|
this.origin_device_numbers = rs.data.data.device_numbers
|
198
|
224
|
|
199
|
|
- for (let i = this.origin_schedules.length-1; i >= 0 ; i--) {
|
200
|
|
- for (let y = this.origin_device_numbers.length-1; y >=0 ; y--){
|
201
|
|
- if(this.origin_device_numbers[y].id == this.origin_schedules[i].bed_id){
|
202
|
|
- this.origin_device_numbers.splice(y,1)
|
|
225
|
+ for (let i = this.origin_schedules.length - 1; i >= 0; i--) {
|
|
226
|
+ for (let y = this.origin_device_numbers.length - 1; y >= 0; y--) {
|
|
227
|
+ if (this.origin_device_numbers[y].id == this.origin_schedules[i].bed_id) {
|
|
228
|
+ this.origin_device_numbers.splice(y, 1)
|
203
|
229
|
}
|
204
|
230
|
}
|
205
|
231
|
}
|
|
@@ -242,14 +268,26 @@
|
242
|
268
|
})
|
243
|
269
|
},
|
244
|
270
|
methods: {
|
245
|
|
- // getDeviceNumberNames: function(device_numbers) {
|
246
|
|
- // var names = []
|
247
|
|
- // for (let index = 0; index < device_numbers.length; index++) {
|
248
|
|
- // const device_number = device_numbers[index];
|
249
|
|
- // names.push(device_number.number)
|
250
|
|
- // }
|
251
|
|
- // return names
|
252
|
|
- // },
|
|
271
|
+ handleSelect (val) {
|
|
272
|
+ this.patient_name = val.name
|
|
273
|
+ this.patient_id = val.id
|
|
274
|
+ },
|
|
275
|
+ querySearchAsync (keyword, cb) {
|
|
276
|
+ let key = ''
|
|
277
|
+ if (keyword != undefined) {
|
|
278
|
+ key = keyword
|
|
279
|
+ }
|
|
280
|
+ let searchArray = []
|
|
281
|
+ PostSearch(key).then(response => {
|
|
282
|
+ if (response.data.state == 1) {
|
|
283
|
+ searchArray = response.data.data.patient
|
|
284
|
+ cb(searchArray)
|
|
285
|
+ } else {
|
|
286
|
+ this.$message.error(response.data.msg)
|
|
287
|
+ cb([])
|
|
288
|
+ }
|
|
289
|
+ })
|
|
290
|
+ },
|
253
|
291
|
|
254
|
292
|
selectPatientAction: function () {
|
255
|
293
|
this.$refs.patient_field.blur()
|
|
@@ -302,10 +340,10 @@
|
302
|
340
|
this.modes = rs.data.data.modes
|
303
|
341
|
this.origin_device_numbers = rs.data.data.device_numbers
|
304
|
342
|
|
305
|
|
- for (let i = this.origin_schedules.length-1; i >= 0 ; i--) {
|
306
|
|
- for (let y = this.origin_device_numbers.length-1; y >=0 ; y--){
|
307
|
|
- if(this.origin_device_numbers[y].id == this.origin_schedules[i].bed_id){
|
308
|
|
- this.origin_device_numbers.splice(y,1)
|
|
343
|
+ for (let i = this.origin_schedules.length - 1; i >= 0; i--) {
|
|
344
|
+ for (let y = this.origin_device_numbers.length - 1; y >= 0; y--) {
|
|
345
|
+ if (this.origin_device_numbers[y].id == this.origin_schedules[i].bed_id) {
|
|
346
|
+ this.origin_device_numbers.splice(y, 1)
|
309
|
347
|
}
|
310
|
348
|
}
|
311
|
349
|
}
|