|
@@ -100,6 +100,7 @@
|
100
|
100
|
zone_beds: [], // 该排班的区里的床位
|
101
|
101
|
creator: 0,
|
102
|
102
|
template_id: 0,
|
|
103
|
+ temp_device_numbers:[],
|
103
|
104
|
blood_drawing:100,
|
104
|
105
|
schedual_type:0,
|
105
|
106
|
schedules_type: [
|
|
@@ -136,7 +137,15 @@
|
136
|
137
|
},
|
137
|
138
|
}, mounted () {
|
138
|
139
|
|
|
140
|
+
|
|
141
|
+ },
|
|
142
|
+ created () {
|
|
143
|
+ this.temp_device_numbers = this.device_numbers
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
139
|
147
|
if (this.record.id == 0) {
|
|
148
|
+ this.start_time_str = parseTime(this.start_time, '{y}-{m}-{d} {h}:{i}') + ':00'
|
140
|
149
|
let now = new Date()
|
141
|
150
|
let hour = now.getHours()
|
142
|
151
|
|
|
@@ -151,19 +160,17 @@
|
151
|
160
|
}else if(hour >= 18){
|
152
|
161
|
this.schedual_type = 3
|
153
|
162
|
}
|
154
|
|
- this.start_time_str = parseTime(this.start_time, '{y}-{m}-{d} {h}:{i}') + ':00'
|
155
|
163
|
} else {
|
156
|
164
|
if (this.record.start_time == 0) {
|
157
|
165
|
this.start_time_str = parseTime(this.start_time, '{y}-{m}-{d} {h}:{i}') + ':00'
|
158
|
166
|
this.schedual_type = this.record.schedual_type
|
|
167
|
+
|
159
|
168
|
} else {
|
160
|
169
|
this.start_time_str = parseTime(this.record.start_time, '{y}-{m}-{d} {h}:{i}') + ':00'
|
161
|
170
|
this.schedual_type = this.record.schedual_type
|
162
|
171
|
|
163
|
172
|
}
|
164
|
173
|
}
|
165
|
|
- },
|
166
|
|
- created () {
|
167
|
174
|
|
168
|
175
|
|
169
|
176
|
this.GetSchedualNumber()
|
|
@@ -200,11 +207,11 @@
|
200
|
207
|
// }
|
201
|
208
|
// this.zone_beds = beds
|
202
|
209
|
|
203
|
|
- for (let index = 0; index < this.device_numbers.length; index++) {
|
204
|
|
- const device_number = this.device_numbers[index]
|
205
|
|
- this.device_numbers[index]['number'] = device_number['zone_name']+'-'+device_number['number']
|
|
210
|
+ for (let index = 0; index < this.temp_device_numbers.length; index++) {
|
|
211
|
+ const device_number = this.temp_device_numbers[index]
|
|
212
|
+ this.temp_device_numbers[index]['number'] = device_number['zone_name']+'-'+device_number['number']
|
206
|
213
|
}
|
207
|
|
- this.zone_beds = this.device_numbers
|
|
214
|
+ this.zone_beds = this.temp_device_numbers
|
208
|
215
|
|
209
|
216
|
if (this.record.id > 0) {
|
210
|
217
|
for (let i = 0; i < this.special_premission.length; i++) {
|
|
@@ -255,12 +262,12 @@
|
255
|
262
|
Toast.fail(response.data.msg)
|
256
|
263
|
return false
|
257
|
264
|
} else {
|
258
|
|
- t.device_numbers = response.data.data.number
|
259
|
|
- for (let index = 0; index < t.device_numbers.length; index++) {
|
260
|
|
- const device_number = t.device_numbers[index]
|
261
|
|
- t.device_numbers[index]['number'] = device_number['zone_name']+'-'+device_number['number']
|
|
265
|
+ t.temp_device_numbers = response.data.data.number
|
|
266
|
+ for (let index = 0; index < t.temp_device_numbers.length; index++) {
|
|
267
|
+ const device_number = t.temp_device_numbers[index]
|
|
268
|
+ t.temp_device_numbers[index]['number'] = device_number['zone_name']+'-'+device_number['number']
|
262
|
269
|
}
|
263
|
|
- t.zone_beds = t.device_numbers
|
|
270
|
+ t.zone_beds = t.temp_device_numbers
|
264
|
271
|
t.bed_id = t.zone_beds[0].id
|
265
|
272
|
}
|
266
|
273
|
})
|
|
@@ -283,12 +290,12 @@
|
283
|
290
|
return false
|
284
|
291
|
} else {
|
285
|
292
|
t.zone_beds = []
|
286
|
|
- t.device_numbers = response.data.data.number
|
287
|
|
- for (let index = 0; index < t.device_numbers.length; index++) {
|
288
|
|
- const device_number = t.device_numbers[index]
|
289
|
|
- t.device_numbers[index]['number'] = device_number['zone_name']+'-'+device_number['number']
|
|
293
|
+ t.temp_device_numbers = response.data.data.number
|
|
294
|
+ for (let index = 0; index < t.temp_device_numbers.length; index++) {
|
|
295
|
+ const device_number = t.temp_device_numbers[index]
|
|
296
|
+ t.temp_device_numbers[index]['number'] = device_number['zone_name']+'-'+device_number['number']
|
290
|
297
|
}
|
291
|
|
- t.zone_beds = t.device_numbers
|
|
298
|
+ t.zone_beds = t.temp_device_numbers
|
292
|
299
|
t.bed_id = t.zone_beds[0].id
|
293
|
300
|
|
294
|
301
|
|
|
@@ -307,12 +314,12 @@
|
307
|
314
|
Toast.fail(response.data.msg)
|
308
|
315
|
return false
|
309
|
316
|
} else {
|
310
|
|
- this.device_numbers = response.data.data.number
|
311
|
|
- for (let index = 0; index < this.device_numbers.length; index++) {
|
312
|
|
- const device_number = this.device_numbers[index]
|
313
|
|
- this.device_numbers[index]['number'] = device_number['zone_name']+'-'+device_number['number']
|
|
317
|
+ this.temp_device_numbers = response.data.data.number
|
|
318
|
+ for (let index = 0; index < this.temp_device_numbers.length; index++) {
|
|
319
|
+ const device_number = this.temp_device_numbers[index]
|
|
320
|
+ this.temp_device_numbers[index]['number'] = device_number['zone_name']+'-'+device_number['number']
|
314
|
321
|
}
|
315
|
|
- this.zone_beds = this.device_numbers
|
|
322
|
+ this.zone_beds = this.temp_device_numbers
|
316
|
323
|
}
|
317
|
324
|
})
|
318
|
325
|
},
|