|
@@ -116,23 +116,23 @@
|
116
|
116
|
</template>
|
117
|
117
|
|
118
|
118
|
<script>
|
119
|
|
-import PatientBox from "./PatientBox";
|
120
|
|
-import { Popover } from "vux";
|
121
|
|
-import { Datetime } from "vux";
|
122
|
|
-import { parseTime } from "@/utils/index";
|
123
|
|
-import { getDialysisScheduals } from "@/api/dialysis";
|
124
|
|
-import { Toast } from "vant";
|
125
|
|
-import $ from "jquery";
|
|
119
|
+import PatientBox from './PatientBox'
|
|
120
|
+import { Popover } from 'vux'
|
|
121
|
+import { Datetime } from 'vux'
|
|
122
|
+import { parseTime } from '@/utils/index'
|
|
123
|
+import { getDialysisScheduals } from '@/api/dialysis'
|
|
124
|
+import { Toast } from 'vant'
|
|
125
|
+import $ from 'jquery'
|
126
|
126
|
|
127
|
127
|
export default {
|
128
|
|
- name: "DialysisArea",
|
|
128
|
+ name: 'DialysisArea',
|
129
|
129
|
components: {
|
130
|
130
|
PatientBox,
|
131
|
131
|
Popover,
|
132
|
132
|
Datetime
|
133
|
133
|
},
|
134
|
|
- inject: ["reload"],
|
135
|
|
- data() {
|
|
134
|
+ inject: ['reload'],
|
|
135
|
+ data () {
|
136
|
136
|
return {
|
137
|
137
|
loading: false,
|
138
|
138
|
user_id: 0,
|
|
@@ -141,83 +141,83 @@ export default {
|
141
|
141
|
ismypatient: this.$store.getters.app.dialysis_area.ismypatient,
|
142
|
142
|
selected_date: this.$store.getters.app.dialysis_area.schedule_date, // new Date(),
|
143
|
143
|
schedual_types: [
|
144
|
|
- { value: 0, text: "全部班", select: true },
|
145
|
|
- { value: 1, text: "上午", select: false },
|
146
|
|
- { value: 2, text: "下午", select: false },
|
147
|
|
- { value: 3, text: "晚上", select: false }
|
|
144
|
+ { value: 0, text: '全部班', select: true },
|
|
145
|
+ { value: 1, text: '上午', select: false },
|
|
146
|
+ { value: 2, text: '下午', select: false },
|
|
147
|
+ { value: 3, text: '晚上', select: false }
|
148
|
148
|
],
|
149
|
149
|
schedual_type_selected: this.$store.getters.app.dialysis_area
|
150
|
150
|
.schedule_type_select_index,
|
151
|
151
|
|
152
|
152
|
zone_selected: this.$store.getters.app.dialysis_area.zone_select_index,
|
153
|
|
- zones: [{ value: 0, text: "全部分区", select: true }],
|
|
153
|
+ zones: [{ value: 0, text: '全部分区', select: true }],
|
154
|
154
|
dialysis_scheduals: [],
|
155
|
155
|
|
156
|
156
|
zone_options_visible: false,
|
157
|
157
|
sch_type_options_visible: false,
|
158
|
158
|
newMypatient: 0
|
159
|
|
- };
|
|
159
|
+ }
|
160
|
160
|
},
|
161
|
161
|
props: {
|
162
|
162
|
search_keyword: {
|
163
|
163
|
type: String,
|
164
|
|
- default: ""
|
|
164
|
+ default: ''
|
165
|
165
|
}
|
166
|
166
|
},
|
167
|
167
|
computed: {
|
168
|
|
- selected_date_str: function() {
|
169
|
|
- return parseTime(this.selected_date, "{y}-{m}-{d}");
|
|
168
|
+ selected_date_str: function () {
|
|
169
|
+ return parseTime(this.selected_date, '{y}-{m}-{d}')
|
170
|
170
|
},
|
171
|
171
|
|
172
|
|
- filtedScheduals: function() {
|
|
172
|
+ filtedScheduals: function () {
|
173
|
173
|
if (this.dialysis_scheduals.length == 0) {
|
174
|
|
- return [];
|
|
174
|
+ return []
|
175
|
175
|
}
|
176
|
176
|
|
177
|
|
- var search_keyword = this.search_keyword;
|
|
177
|
+ var search_keyword = this.search_keyword
|
178
|
178
|
if (search_keyword.length > 0) {
|
179
|
|
- var schedules = [];
|
|
179
|
+ var schedules = []
|
180
|
180
|
for (let o_i = 0; o_i < this.dialysis_scheduals.length; o_i++) {
|
181
|
|
- const scheduleInfo = this.dialysis_scheduals[o_i];
|
182
|
|
- var originSchedules = scheduleInfo.scheduals;
|
|
181
|
+ const scheduleInfo = this.dialysis_scheduals[o_i]
|
|
182
|
+ var originSchedules = scheduleInfo.scheduals
|
183
|
183
|
if (originSchedules.length == 0) {
|
184
|
|
- continue;
|
|
184
|
+ continue
|
185
|
185
|
}
|
186
|
|
- var filtedSchedules = [];
|
|
186
|
+ var filtedSchedules = []
|
187
|
187
|
for (let s_i = 0; s_i < originSchedules.length; s_i++) {
|
188
|
|
- const schedule = originSchedules[s_i];
|
|
188
|
+ const schedule = originSchedules[s_i]
|
189
|
189
|
if (
|
190
|
190
|
schedule.patient.name.indexOf(search_keyword) != -1 ||
|
191
|
191
|
schedule.patient.dialysis_no.indexOf(search_keyword) != -1
|
192
|
192
|
) {
|
193
|
|
- filtedSchedules.push(schedule);
|
194
|
|
- break;
|
|
193
|
+ filtedSchedules.push(schedule)
|
|
194
|
+ break
|
195
|
195
|
}
|
196
|
196
|
}
|
197
|
197
|
if (filtedSchedules.length > 0) {
|
198
|
198
|
schedules.push({
|
199
|
199
|
zone_name: scheduleInfo.zone_name,
|
200
|
200
|
scheduals: filtedSchedules
|
201
|
|
- });
|
|
201
|
+ })
|
202
|
202
|
}
|
203
|
203
|
}
|
204
|
|
- return schedules;
|
|
204
|
+ return schedules
|
205
|
205
|
}
|
206
|
206
|
if (this.ismypatient) {
|
207
|
|
- var zone_selected = this.zone_selected;
|
208
|
|
- var timetype_selected = this.schedual_type_selected;
|
|
207
|
+ var zone_selected = this.zone_selected
|
|
208
|
+ var timetype_selected = this.schedual_type_selected
|
209
|
209
|
var zone_name =
|
210
|
|
- zone_selected == 0 ? "" : this.zones[zone_selected].text;
|
211
|
|
- var schedules = [];
|
|
210
|
+ zone_selected == 0 ? '' : this.zones[zone_selected].text
|
|
211
|
+ var schedules = []
|
212
|
212
|
for (let o_i = 0; o_i < this.dialysis_scheduals.length; o_i++) {
|
213
|
|
- const scheduleInfo = this.dialysis_scheduals[o_i];
|
214
|
|
- var originSchedules = scheduleInfo.scheduals;
|
|
213
|
+ const scheduleInfo = this.dialysis_scheduals[o_i]
|
|
214
|
+ var originSchedules = scheduleInfo.scheduals
|
215
|
215
|
if (originSchedules.length == 0) {
|
216
|
|
- continue;
|
|
216
|
+ continue
|
217
|
217
|
}
|
218
|
|
- var filtedSchedules = [];
|
|
218
|
+ var filtedSchedules = []
|
219
|
219
|
for (let s_i = 0; s_i < originSchedules.length; s_i++) {
|
220
|
|
- const schedule = originSchedules[s_i];
|
|
220
|
+ const schedule = originSchedules[s_i]
|
221
|
221
|
if (schedule.dialysis_order.start_nurse == this.user_id) {
|
222
|
222
|
if (
|
223
|
223
|
zone_name.length == 0 ||
|
|
@@ -228,7 +228,7 @@ export default {
|
228
|
228
|
timetype_selected == 0 ||
|
229
|
229
|
schedule.schedule_type == timetype_selected
|
230
|
230
|
) {
|
231
|
|
- filtedSchedules.push(schedule);
|
|
231
|
+ filtedSchedules.push(schedule)
|
232
|
232
|
}
|
233
|
233
|
}
|
234
|
234
|
// break;
|
|
@@ -238,32 +238,32 @@ export default {
|
238
|
238
|
schedules.push({
|
239
|
239
|
zone_name: scheduleInfo.zone_name,
|
240
|
240
|
scheduals: filtedSchedules
|
241
|
|
- });
|
|
241
|
+ })
|
242
|
242
|
}
|
243
|
243
|
}
|
244
|
|
- return schedules;
|
|
244
|
+ return schedules
|
245
|
245
|
}
|
246
|
246
|
|
247
|
|
- var zone_selected = this.zone_selected;
|
248
|
|
- var timetype_selected = this.schedual_type_selected;
|
|
247
|
+ var zone_selected = this.zone_selected
|
|
248
|
+ var timetype_selected = this.schedual_type_selected
|
249
|
249
|
if (
|
250
|
250
|
(zone_selected == 0 && timetype_selected == 0) ||
|
251
|
251
|
this.zones.length <= 1
|
252
|
252
|
) {
|
253
|
|
- return this.dialysis_scheduals;
|
|
253
|
+ return this.dialysis_scheduals
|
254
|
254
|
}
|
255
|
255
|
|
256
|
|
- var zone_name = zone_selected == 0 ? "" : this.zones[zone_selected].text;
|
257
|
|
- var schedules = [];
|
|
256
|
+ var zone_name = zone_selected == 0 ? '' : this.zones[zone_selected].text
|
|
257
|
+ var schedules = []
|
258
|
258
|
for (let o_i = 0; o_i < this.dialysis_scheduals.length; o_i++) {
|
259
|
|
- const scheduleInfo = this.dialysis_scheduals[o_i];
|
260
|
|
- var originSchedules = scheduleInfo.scheduals;
|
261
|
|
- var filtedSchedules = [];
|
|
259
|
+ const scheduleInfo = this.dialysis_scheduals[o_i]
|
|
260
|
+ var originSchedules = scheduleInfo.scheduals
|
|
261
|
+ var filtedSchedules = []
|
262
|
262
|
for (let s_i = 0; s_i < originSchedules.length; s_i++) {
|
263
|
|
- const schedule = originSchedules[s_i];
|
|
263
|
+ const schedule = originSchedules[s_i]
|
264
|
264
|
if (this.ismypatient) {
|
265
|
265
|
if (schedule.dialysis_order.creator == this.user_id) {
|
266
|
|
- filtedSchedules.push(schedule);
|
|
266
|
+ filtedSchedules.push(schedule)
|
267
|
267
|
}
|
268
|
268
|
} else {
|
269
|
269
|
if (
|
|
@@ -275,7 +275,7 @@ export default {
|
275
|
275
|
timetype_selected == 0 ||
|
276
|
276
|
schedule.schedule_type == timetype_selected
|
277
|
277
|
) {
|
278
|
|
- filtedSchedules.push(schedule);
|
|
278
|
+ filtedSchedules.push(schedule)
|
279
|
279
|
}
|
280
|
280
|
}
|
281
|
281
|
}
|
|
@@ -284,238 +284,243 @@ export default {
|
284
|
284
|
schedules.push({
|
285
|
285
|
zone_name: scheduleInfo.zone_name,
|
286
|
286
|
scheduals: filtedSchedules
|
287
|
|
- });
|
|
287
|
+ })
|
288
|
288
|
}
|
289
|
289
|
}
|
290
|
|
- this.ismypatient = false;
|
291
|
|
- return schedules;
|
|
290
|
+ this.ismypatient = false
|
|
291
|
+ return schedules
|
292
|
292
|
}
|
293
|
293
|
},
|
294
|
294
|
|
295
|
|
- created() {
|
296
|
|
- this.user_id = this.$store.getters.user.user.id;
|
|
295
|
+ created () {
|
|
296
|
+ this.user_id = this.$store.getters.user.user.id
|
297
|
297
|
|
298
|
|
- var storedata = this.$store.getters.scheduals;
|
299
|
|
- var scheduals = storedata.scheduals;
|
|
298
|
+ var storedata = this.$store.getters.scheduals
|
|
299
|
+ var scheduals = storedata.scheduals
|
300
|
300
|
if (Object.keys(storedata).length > 0) {
|
301
|
|
- var zoneMap = {};
|
302
|
|
- var schedualMap = {};
|
|
301
|
+ var zoneMap = {}
|
|
302
|
+ var schedualMap = {}
|
303
|
303
|
for (let index = 0; index < scheduals.length; index++) {
|
304
|
|
- const schedual = scheduals[index];
|
|
304
|
+ const schedual = scheduals[index]
|
305
|
305
|
if (schedual.dialysis_order == null) {
|
306
|
|
- continue;
|
|
306
|
+ continue
|
307
|
307
|
}
|
308
|
308
|
if (schedualMap[schedual.device_number.zone.name] == null) {
|
309
|
|
- schedualMap[schedual.device_number.zone.name] = [];
|
|
309
|
+ schedualMap[schedual.device_number.zone.name] = []
|
310
|
310
|
}
|
311
|
|
- schedualMap[schedual.device_number.zone.name].push(schedual);
|
|
311
|
+ schedualMap[schedual.device_number.zone.name].push(schedual)
|
312
|
312
|
if (zoneMap[schedual.device_number.zone.name] == null) {
|
313
|
313
|
zoneMap[schedual.device_number.zone.name] =
|
314
|
|
- schedual.device_number.zone;
|
|
314
|
+ schedual.device_number.zone
|
315
|
315
|
}
|
316
|
316
|
}
|
317
|
317
|
|
318
|
|
- var zones = [];
|
319
|
|
- zones.push({ value: 0, text: "全部分区" });
|
|
318
|
+ var zones = []
|
|
319
|
+ zones.push({ value: 0, text: '全部分区' })
|
320
|
320
|
for (var zoneName in zoneMap) {
|
321
|
|
- zones.push({ value: zoneMap[zoneName].id, text: zoneName });
|
|
321
|
+ zones.push({ value: zoneMap[zoneName].id, text: zoneName })
|
322
|
322
|
}
|
323
|
323
|
|
324
|
|
- zones = zones.sort(function(a, b) {
|
325
|
|
- return a.value > b.value;
|
326
|
|
- });
|
327
|
|
- this.zones = zones;
|
|
324
|
+ zones = zones.sort(function (a, b) {
|
|
325
|
+ return a.value > b.value
|
|
326
|
+ })
|
|
327
|
+ this.zones = zones
|
328
|
328
|
|
329
|
|
- var dialysis_scheduals = [];
|
|
329
|
+ var dialysis_scheduals = []
|
330
|
330
|
for (let index = 0; index < zones.length; index++) {
|
331
|
|
- const zone = zones[index];
|
332
|
|
- var scheduals = schedualMap[zone.text];
|
|
331
|
+ const zone = zones[index]
|
|
332
|
+ var scheduals = schedualMap[zone.text]
|
333
|
333
|
if (scheduals == null) {
|
334
|
|
- continue;
|
|
334
|
+ continue
|
335
|
335
|
}
|
336
|
336
|
dialysis_scheduals.push({
|
337
|
337
|
zone_name: zone.text,
|
338
|
338
|
scheduals: scheduals
|
339
|
|
- });
|
|
339
|
+ })
|
340
|
340
|
}
|
341
|
|
- this.dialysis_scheduals = dialysis_scheduals;
|
|
341
|
+ this.dialysis_scheduals = dialysis_scheduals
|
342
|
342
|
} else {
|
343
|
|
- this.requestDialysisScheduals();
|
|
343
|
+ this.requestDialysisScheduals()
|
344
|
344
|
}
|
345
|
345
|
},
|
346
|
|
- mounted() {
|
|
346
|
+ mounted () {
|
347
|
347
|
this.timer = window.setInterval(() => {
|
348
|
|
- setTimeout(this.requestDialysisScheduals(), 0);
|
349
|
|
- }, 120000);
|
|
348
|
+ setTimeout(this.requestDialysisScheduals(), 0)
|
|
349
|
+ }, 120000)
|
350
|
350
|
},
|
351
|
|
- beforeDestroy() {
|
352
|
|
- clearInterval(this.timer);
|
353
|
|
- this.timer = null;
|
|
351
|
+ beforeDestroy () {
|
|
352
|
+ clearInterval(this.timer)
|
|
353
|
+ this.timer = null
|
354
|
354
|
},
|
355
|
355
|
methods: {
|
356
|
|
- clearPatient() {
|
357
|
|
- this.search_keyword = "";
|
358
|
|
- this.ismypatient = false;
|
359
|
|
- this.$emit("clear_search_keyword");
|
360
|
|
- this.$store.dispatch("SaveDialysisAreaSelectIndexs", {
|
|
356
|
+ clearPatient () {
|
|
357
|
+ this.search_keyword = ''
|
|
358
|
+ this.ismypatient = false
|
|
359
|
+ this.$emit('clear_search_keyword')
|
|
360
|
+ this.$store.dispatch('SaveDialysisAreaSelectIndexs', {
|
361
|
361
|
zone: this.zone_selected,
|
362
|
362
|
schedule_type: this.schedual_type_selected,
|
363
|
363
|
schedule_date: this.selected_date,
|
364
|
364
|
ismypatient: this.ismypatient
|
365
|
|
- });
|
|
365
|
+ })
|
366
|
366
|
},
|
367
|
|
- mypatient() {
|
368
|
|
- this.search_keyword = "";
|
369
|
|
- this.ismypatient = true;
|
370
|
|
- this.$emit("clear_search_keyword");
|
371
|
|
- this.$store.dispatch("SaveDialysisAreaSelectIndexs", {
|
|
367
|
+ mypatient () {
|
|
368
|
+ this.search_keyword = ''
|
|
369
|
+ this.ismypatient = true
|
|
370
|
+ this.$emit('clear_search_keyword')
|
|
371
|
+ this.$store.dispatch('SaveDialysisAreaSelectIndexs', {
|
372
|
372
|
zone: this.zone_selected,
|
373
|
373
|
schedule_type: this.schedual_type_selected,
|
374
|
374
|
schedule_date: this.selected_date,
|
375
|
375
|
ismypatient: this.ismypatient
|
376
|
|
- });
|
377
|
|
- this.newMypatient = 1;
|
|
376
|
+ })
|
|
377
|
+ this.newMypatient = 1
|
378
|
378
|
},
|
379
|
|
- reloads: function() {
|
380
|
|
- this.reload();
|
|
379
|
+ reloads: function () {
|
|
380
|
+ this.reload()
|
381
|
381
|
},
|
382
|
|
- handletimeType: function(index) {
|
|
382
|
+ handletimeType: function (index) {
|
383
|
383
|
if (!this.ismypatient) {
|
384
|
|
- this.ismypatient = false;
|
|
384
|
+ this.ismypatient = false
|
385
|
385
|
}
|
386
|
|
- this.sch_type_options_visible = false;
|
387
|
|
- this.schedual_type_selected = index;
|
388
|
|
- this.$emit("clear_search_keyword");
|
389
|
|
- this.$store.dispatch("SaveDialysisAreaSelectIndexs", {
|
|
386
|
+ this.sch_type_options_visible = false
|
|
387
|
+ this.schedual_type_selected = index
|
|
388
|
+ this.$emit('clear_search_keyword')
|
|
389
|
+ this.$store.dispatch('SaveDialysisAreaSelectIndexs', {
|
390
|
390
|
zone: this.zone_selected,
|
391
|
391
|
schedule_type: this.schedual_type_selected,
|
392
|
392
|
schedule_date: this.selected_date,
|
393
|
393
|
ismypatient: this.ismypatient
|
394
|
|
- });
|
|
394
|
+ })
|
395
|
395
|
},
|
396
|
|
- handleZoneChange: function(index) {
|
397
|
|
- this.ismypatient = false;
|
398
|
|
- this.zone_options_visible = false;
|
399
|
|
- this.zone_selected = index;
|
400
|
|
- this.$emit("clear_search_keyword");
|
401
|
|
- this.$store.dispatch("SaveDialysisAreaSelectIndexs", {
|
|
396
|
+ handleZoneChange: function (index) {
|
|
397
|
+ this.ismypatient = false
|
|
398
|
+ this.zone_options_visible = false
|
|
399
|
+ this.zone_selected = index
|
|
400
|
+ this.$emit('clear_search_keyword')
|
|
401
|
+ this.$store.dispatch('SaveDialysisAreaSelectIndexs', {
|
402
|
402
|
zone: this.zone_selected,
|
403
|
403
|
schedule_type: this.schedual_type_selected,
|
404
|
404
|
schedule_date: this.selected_date,
|
405
|
405
|
ismypatient: this.ismypatient
|
406
|
|
- });
|
407
|
|
- this.newMypatient = 0;
|
|
406
|
+ })
|
|
407
|
+ this.newMypatient = 0
|
408
|
408
|
},
|
409
|
|
- handleScheduleDateChange: function(date) {
|
|
409
|
+ handleScheduleDateChange: function (date) {
|
410
|
410
|
if (!this.ismypatient) {
|
411
|
|
- this.ismypatient = false;
|
|
411
|
+ this.ismypatient = false
|
412
|
412
|
}
|
413
|
|
- this.zone_selected = 0;
|
414
|
|
- this.schedual_type_selected = 0;
|
415
|
|
- this.$emit("clear_search_keyword");
|
416
|
|
- this.$store.dispatch("SaveDialysisAreaSelectIndexs", {
|
|
413
|
+ this.zone_selected = 0
|
|
414
|
+ this.schedual_type_selected = 0
|
|
415
|
+ this.$emit('clear_search_keyword')
|
|
416
|
+ this.$store.dispatch('SaveDialysisAreaSelectIndexs', {
|
417
|
417
|
zone: this.zone_selected,
|
418
|
418
|
schedule_type: this.schedual_type_selected,
|
419
|
419
|
schedule_date: this.selected_date,
|
420
|
420
|
ismypatient: this.ismypatient
|
421
|
|
- });
|
422
|
|
- this.requestDialysisScheduals();
|
|
421
|
+ })
|
|
422
|
+ this.requestDialysisScheduals()
|
423
|
423
|
},
|
424
|
424
|
|
425
|
|
- requestDialysisScheduals() {
|
|
425
|
+ requestDialysisScheduals () {
|
426
|
426
|
// this.$toast.loading({forbidClick: true, duration: 0})
|
427
|
427
|
// this.loading = true;
|
428
|
|
- var type = 0;
|
|
428
|
+ var type = 0
|
429
|
429
|
getDialysisScheduals({ type: type, date: this.selected_date_str })
|
430
|
430
|
.then(rs => {
|
431
|
|
- this.networkStates = true;
|
432
|
|
- var resp = rs.data;
|
|
431
|
+ this.networkStates = true
|
|
432
|
+ var resp = rs.data
|
433
|
433
|
if (resp.state == 1) {
|
434
|
|
- this.loading = false;
|
|
434
|
+ this.loading = false
|
435
|
435
|
|
436
|
436
|
// console.log(resp.data)
|
437
|
|
- var scheduals = resp.data.scheduals;
|
438
|
|
- this.$store.dispatch("SetScheduals", { scheduals: scheduals });
|
439
|
|
- var zoneMap = {};
|
440
|
|
- var schedualMap = {};
|
|
437
|
+ var scheduals = resp.data.scheduals
|
|
438
|
+ this.$store.dispatch('SetScheduals', { scheduals: scheduals })
|
|
439
|
+ this.$store.dispatch('SetWaitScheduals', { waitscheduals: scheduals })
|
|
440
|
+ this.$emit('refWaitingArea')
|
|
441
|
+ var zoneMap = {}
|
|
442
|
+ var schedualMap = {}
|
441
|
443
|
for (let index = 0; index < scheduals.length; index++) {
|
442
|
|
- const schedual = scheduals[index];
|
|
444
|
+ const schedual = scheduals[index]
|
443
|
445
|
if (schedual.dialysis_order == null) {
|
444
|
|
- continue;
|
|
446
|
+ continue
|
445
|
447
|
}
|
446
|
448
|
if (schedualMap[schedual.device_number.zone.name] == null) {
|
447
|
|
- schedualMap[schedual.device_number.zone.name] = [];
|
|
449
|
+ schedualMap[schedual.device_number.zone.name] = []
|
448
|
450
|
}
|
449
|
|
- schedualMap[schedual.device_number.zone.name].push(schedual);
|
|
451
|
+ schedualMap[schedual.device_number.zone.name].push(schedual)
|
450
|
452
|
if (zoneMap[schedual.device_number.zone.name] == null) {
|
451
|
453
|
zoneMap[schedual.device_number.zone.name] =
|
452
|
|
- schedual.device_number.zone;
|
|
454
|
+ schedual.device_number.zone
|
453
|
455
|
}
|
454
|
456
|
}
|
455
|
457
|
|
456
|
|
- var zones = [];
|
457
|
|
- zones.push({ value: 0, text: "全部分区" });
|
|
458
|
+ var zones = []
|
|
459
|
+ zones.push({ value: 0, text: '全部分区' })
|
458
|
460
|
for (var zoneName in zoneMap) {
|
459
|
|
- zones.push({ value: zoneMap[zoneName].id, text: zoneName });
|
|
461
|
+ zones.push({ value: zoneMap[zoneName].id, text: zoneName })
|
460
|
462
|
}
|
461
|
463
|
|
462
|
|
- zones = zones.sort(function(a, b) {
|
463
|
|
- return a.value > b.value;
|
464
|
|
- });
|
465
|
|
- this.zones = zones;
|
|
464
|
+ zones = zones.sort(function (a, b) {
|
|
465
|
+ return a.value > b.value
|
|
466
|
+ })
|
|
467
|
+ this.zones = zones
|
466
|
468
|
|
467
|
|
- var dialysis_scheduals = [];
|
|
469
|
+ // eslint-disable-next-line camelcase
|
|
470
|
+ var dialysis_scheduals = []
|
468
|
471
|
for (let index = 0; index < zones.length; index++) {
|
469
|
|
- const zone = zones[index];
|
470
|
|
- var scheduals = schedualMap[zone.text];
|
|
472
|
+ const zone = zones[index]
|
|
473
|
+ // eslint-disable-next-line no-redeclare
|
|
474
|
+ var scheduals = schedualMap[zone.text]
|
471
|
475
|
if (scheduals == null) {
|
472
|
|
- continue;
|
|
476
|
+ continue
|
473
|
477
|
}
|
474
|
478
|
dialysis_scheduals.push({
|
475
|
479
|
zone_name: zone.text,
|
476
|
480
|
scheduals: scheduals
|
477
|
|
- });
|
|
481
|
+ })
|
478
|
482
|
}
|
479
|
|
- this.dialysis_scheduals = dialysis_scheduals;
|
|
483
|
+ // eslint-disable-next-line camelcase
|
|
484
|
+ this.dialysis_scheduals = dialysis_scheduals
|
480
|
485
|
} else {
|
481
|
|
- this.loading = false;
|
|
486
|
+ this.loading = false
|
482
|
487
|
|
483
|
488
|
this.$toast({
|
484
|
489
|
message: resp.msg
|
485
|
|
- });
|
|
490
|
+ })
|
486
|
491
|
}
|
487
|
492
|
})
|
488
|
493
|
.catch(error => {
|
489
|
|
- this.loading = false;
|
|
494
|
+ this.loading = false
|
490
|
495
|
|
491
|
496
|
// 超时之后在这里捕抓错误信息.
|
492
|
497
|
if (error.response) {
|
493
|
|
- this.networkStates = false;
|
|
498
|
+ this.networkStates = false
|
494
|
499
|
|
495
|
|
- console.log("error.response");
|
496
|
|
- console.log(error.response);
|
|
500
|
+ console.log('error.response')
|
|
501
|
+ console.log(error.response)
|
497
|
502
|
} else if (error.request) {
|
498
|
|
- this.networkStates = false;
|
|
503
|
+ this.networkStates = false
|
499
|
504
|
|
500
|
505
|
// if(error.request.readyState == 4 && error.request.status == 0){
|
501
|
506
|
// //我在这里重新请求
|
502
|
507
|
// this.networkStates = false
|
503
|
508
|
// }
|
504
|
509
|
} else {
|
505
|
|
- this.networkStates = false;
|
|
510
|
+ this.networkStates = false
|
506
|
511
|
}
|
507
|
|
- });
|
|
512
|
+ })
|
508
|
513
|
},
|
509
|
|
- openPicker() {
|
510
|
|
- this.$refs.picker.open();
|
511
|
|
- this.newMypatient = 0;
|
|
514
|
+ openPicker () {
|
|
515
|
+ this.$refs.picker.open()
|
|
516
|
+ this.newMypatient = 0
|
512
|
517
|
}
|
513
|
518
|
// getMyPatient () {
|
514
|
519
|
// console.log('这是啥', this.zone_options_visible)
|
515
|
520
|
// console.log('日期', this.selected_date)
|
516
|
521
|
// }
|
517
|
522
|
}
|
518
|
|
-};
|
|
523
|
+}
|
519
|
524
|
</script>
|
520
|
525
|
|
521
|
526
|
<style style="stylesheet/scss" lang="scss" scoped>
|