|
@@ -2337,62 +2337,63 @@ export default {
|
2337
|
2337
|
type: "success",
|
2338
|
2338
|
message: "修改成功!"
|
2339
|
2339
|
});
|
2340
|
|
- var that = this;
|
2341
|
|
- var schedule = response.data.data.schedule;
|
2342
|
|
- this.scheduleZone.forEach(function(zone, index) {
|
2343
|
|
- if (
|
2344
|
|
- zone.zone_id == schedule.partition_id &&
|
2345
|
|
- zone.jihao_id == schedule.bed_id
|
2346
|
|
- ) {
|
2347
|
|
- var weekPath = that.weekPath(
|
2348
|
|
- schedule.schedule_week,
|
2349
|
|
- schedule.schedule_type
|
2350
|
|
- );
|
2351
|
|
- if (weekPath.length == 2) {
|
2352
|
|
- var weekPathKey = weekPath[0] + "_" + weekPath[1];
|
2353
|
|
- that.scheduleZone[index][weekPathKey] = {
|
2354
|
|
- schedule_id: schedule.id,
|
2355
|
|
- mode_id: schedule.mode_id,
|
2356
|
|
- patient_id: schedule.patient_id,
|
2357
|
|
- patient: that.currentData.patient,
|
2358
|
|
-
|
2359
|
|
-
|
2360
|
|
- dialysis_machine_name:schedule.dialysis_machine_name,
|
2361
|
|
-
|
2362
|
|
- patient_contagions: that.currentData.contagions,
|
2363
|
|
- mode_name:
|
2364
|
|
- typeof that.modeOptions[schedule.mode_id] === "undefined"
|
2365
|
|
- ? ""
|
2366
|
|
- : that.modeOptions[schedule.mode_id].name
|
2367
|
|
- };
|
2368
|
|
-
|
2369
|
|
- that.scheduleZone[index].total += 1;
|
2370
|
|
- }
|
2371
|
|
- }
|
2372
|
|
- if (
|
2373
|
|
- zone.zone_id == that.currentData.partition_id &&
|
2374
|
|
- zone.jihao_id == that.currentData.bed_id
|
2375
|
|
- ) {
|
2376
|
|
- var weekPath = that.weekPath(
|
2377
|
|
- that.currentData.schedule_week,
|
2378
|
|
- that.currentData.schedule_type
|
2379
|
|
- );
|
2380
|
|
- if (weekPath.length == 2) {
|
2381
|
|
- var weekPathKey = weekPath[0] + "_" + weekPath[1];
|
2382
|
|
- that.scheduleZone[index][weekPathKey] = {
|
2383
|
|
- schedule_id: 0,
|
2384
|
|
- mode_id: 0,
|
2385
|
|
- patient_id: 0,
|
2386
|
|
- patient: "",
|
2387
|
|
- mode_name: "",
|
2388
|
|
- dialysis_machine_name:"",
|
2389
|
|
- patient_contagions: []
|
2390
|
|
- };
|
2391
|
|
-
|
2392
|
|
- that.scheduleZone[index].total -= 1;
|
2393
|
|
- }
|
2394
|
|
- }
|
2395
|
|
- });
|
|
2340
|
+ this.getSchedules()
|
|
2341
|
+ // var that = this;
|
|
2342
|
+ // var schedule = response.data.data.schedule;
|
|
2343
|
+ // this.scheduleZone.forEach(function(zone, index) {
|
|
2344
|
+ // if (
|
|
2345
|
+ // zone.zone_id == schedule.partition_id &&
|
|
2346
|
+ // zone.jihao_id == schedule.bed_id
|
|
2347
|
+ // ) {
|
|
2348
|
+ // var weekPath = that.weekPath(
|
|
2349
|
+ // schedule.schedule_week,
|
|
2350
|
+ // schedule.schedule_type
|
|
2351
|
+ // );
|
|
2352
|
+ // if (weekPath.length == 2) {
|
|
2353
|
+ // var weekPathKey = weekPath[0] + "_" + weekPath[1];
|
|
2354
|
+ // that.scheduleZone[index][weekPathKey] = {
|
|
2355
|
+ // schedule_id: schedule.id,
|
|
2356
|
+ // mode_id: schedule.mode_id,
|
|
2357
|
+ // patient_id: schedule.patient_id,
|
|
2358
|
+ // patient: that.currentData.patient,
|
|
2359
|
+ //
|
|
2360
|
+ //
|
|
2361
|
+ // dialysis_machine_name:schedule.dialysis_machine_name,
|
|
2362
|
+ //
|
|
2363
|
+ // patient_contagions: that.currentData.contagions,
|
|
2364
|
+ // mode_name:
|
|
2365
|
+ // typeof that.modeOptions[schedule.mode_id] === "undefined"
|
|
2366
|
+ // ? ""
|
|
2367
|
+ // : that.modeOptions[schedule.mode_id].name
|
|
2368
|
+ // };
|
|
2369
|
+ //
|
|
2370
|
+ // that.scheduleZone[index].total += 1;
|
|
2371
|
+ // }
|
|
2372
|
+ // }
|
|
2373
|
+ // if (
|
|
2374
|
+ // zone.zone_id == that.currentData.partition_id &&
|
|
2375
|
+ // zone.jihao_id == that.currentData.bed_id
|
|
2376
|
+ // ) {
|
|
2377
|
+ // var weekPath = that.weekPath(
|
|
2378
|
+ // that.currentData.schedule_week,
|
|
2379
|
+ // that.currentData.schedule_type
|
|
2380
|
+ // );
|
|
2381
|
+ // if (weekPath.length == 2) {
|
|
2382
|
+ // var weekPathKey = weekPath[0] + "_" + weekPath[1];
|
|
2383
|
+ // that.scheduleZone[index][weekPathKey] = {
|
|
2384
|
+ // schedule_id: 0,
|
|
2385
|
+ // mode_id: 0,
|
|
2386
|
+ // patient_id: 0,
|
|
2387
|
+ // patient: "",
|
|
2388
|
+ // mode_name: "",
|
|
2389
|
+ // dialysis_machine_name:"",
|
|
2390
|
+ // patient_contagions: []
|
|
2391
|
+ // };
|
|
2392
|
+ //
|
|
2393
|
+ // that.scheduleZone[index].total -= 1;
|
|
2394
|
+ // }
|
|
2395
|
+ // }
|
|
2396
|
+ // });
|
2396
|
2397
|
this.$refs[formName].resetFields();
|
2397
|
2398
|
this.jhDialogVisible = false;
|
2398
|
2399
|
}
|
|
@@ -2523,11 +2524,12 @@ export default {
|
2523
|
2524
|
this.changeSchedule.bed_id = this.device_id;
|
2524
|
2525
|
for (let i = 0; i < this.origin_device_numbers.length; i++) {
|
2525
|
2526
|
if (this.origin_device_numbers[i].id == this.device_id) {
|
2526
|
|
- this.changeSchedule.partition_id = this.origin_device_numbers[
|
2527
|
|
- i
|
2528
|
|
- ].zone_id;
|
|
2527
|
+ this.changeSchedule.partition_id = this.origin_device_numbers[i].zone_id;
|
|
2528
|
+ console.log("123123123123",this.origin_device_numbers[i].zone_id)
|
|
2529
|
+
|
2529
|
2530
|
}
|
2530
|
2531
|
}
|
|
2532
|
+
|
2531
|
2533
|
console.log("23233232232",this.zones)
|
2532
|
2534
|
var zone_id = 0
|
2533
|
2535
|
for(let i=0;i<this.zones.length;i++){
|
|
@@ -2535,7 +2537,7 @@ export default {
|
2535
|
2537
|
zone_id = this.zones[i].id
|
2536
|
2538
|
}
|
2537
|
2539
|
}
|
2538
|
|
- this.changeSchedule.partition_id = zone_id
|
|
2540
|
+ this.changeSchedule.partition_id = this.zone_name
|
2539
|
2541
|
this.changeSchedule.change_action = "change_device";
|
2540
|
2542
|
this.changeScheduleActon(formName);
|
2541
|
2543
|
|
|
@@ -2722,6 +2724,7 @@ export default {
|
2722
|
2724
|
this.current_devices = [];
|
2723
|
2725
|
this.current_devices = devices;
|
2724
|
2726
|
this.device_id = ""
|
|
2727
|
+ this.zone_name = this.currentData.partition_id
|
2725
|
2728
|
}
|
2726
|
2729
|
});
|
2727
|
2730
|
// const params = {
|