|
@@ -502,10 +502,10 @@
|
502
|
502
|
@change="changePartition"
|
503
|
503
|
>
|
504
|
504
|
<el-option
|
505
|
|
- v-for="item in zones"
|
506
|
|
- :key="item"
|
507
|
|
- :label="item"
|
508
|
|
- :value="item"
|
|
505
|
+ v-for="(item, index) in zones"
|
|
506
|
+ :key="index"
|
|
507
|
+ :label="item.name"
|
|
508
|
+ :value="item.id"
|
509
|
509
|
>
|
510
|
510
|
</el-option>
|
511
|
511
|
</el-select>
|
|
@@ -2337,63 +2337,62 @@ export default {
|
2337
|
2337
|
type: "success",
|
2338
|
2338
|
message: "修改成功!"
|
2339
|
2339
|
});
|
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
|
|
- // });
|
|
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
|
+ });
|
2397
|
2396
|
this.$refs[formName].resetFields();
|
2398
|
2397
|
this.jhDialogVisible = false;
|
2399
|
2398
|
}
|
|
@@ -2517,7 +2516,7 @@ export default {
|
2517
|
2516
|
this.changeSchedule.schedule_type
|
2518
|
2517
|
);
|
2519
|
2518
|
if (weekPath.length != 2) {
|
2520
|
|
- this.$message.error('数据异常');
|
|
2519
|
+ this.$message.error("数据异常");
|
2521
|
2520
|
return false;
|
2522
|
2521
|
}
|
2523
|
2522
|
|
|
@@ -3168,6 +3167,7 @@ export default {
|
3168
|
3167
|
schedule_date: this.currentData.schedule_date,
|
3169
|
3168
|
patient_id: this.currentData.patient_id,
|
3170
|
3169
|
};
|
|
3170
|
+
|
3171
|
3171
|
//进行网络请求,获取空排班机位
|
3172
|
3172
|
getSmartDevices(params).then((response) => {
|
3173
|
3173
|
if (response.data.state == 0) {
|
|
@@ -3186,9 +3186,7 @@ export default {
|
3186
|
3186
|
// }
|
3187
|
3187
|
// this.zone_names=devices[0];
|
3188
|
3188
|
this.zone_name = (devices[0].zone_name)
|
3189
|
|
- console.log("hhahhahah",this.zone_name)
|
3190
|
3189
|
this.device_id = devices[0].id
|
3191
|
|
- console.log('zone_namess的数据',this.zone_names);
|
3192
|
3190
|
}
|
3193
|
3191
|
});
|
3194
|
3192
|
|