|
@@ -2848,7 +2848,7 @@ export default {
|
2848
|
2848
|
this.getSchedules()
|
2849
|
2849
|
},
|
2850
|
2850
|
// 选择周次
|
2851
|
|
- getSchedules(){
|
|
2851
|
+ start(){
|
2852
|
2852
|
var thisweek = {};
|
2853
|
2853
|
var date = new Date();
|
2854
|
2854
|
// 本周一的日期
|
|
@@ -2863,13 +2863,21 @@ export default {
|
2863
|
2863
|
var date = new Date();
|
2864
|
2864
|
// 上上周一的日期
|
2865
|
2865
|
date.setDate(date.getDate()-14 - date.getDay() + 1);
|
2866
|
|
- this.lastweek.start_day = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate() ;
|
|
2866
|
+ var month=(date.getMonth() + 1)<10 ? "0"+(date.getMonth()+1):(date.getMonth()+1)
|
|
2867
|
+ var day=(date.getDate())<10 ? "0"+(date.getDate()):(date.getDate())
|
|
2868
|
+ console.log('wqertwetwe',month);
|
|
2869
|
+ this.start_time = date.getFullYear() + "-" + month + "-" + day;
|
2867
|
2870
|
|
2868
|
2871
|
// 上上周日的日期
|
2869
|
2872
|
date.setDate(date.getDate() + 6);
|
2870
|
|
- this.lastweek.end_day = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate();
|
|
2873
|
+ var month=(date.getMonth() + 1)<10 ? "0"+(date.getMonth()+1):(date.getMonth()+1)
|
|
2874
|
+ var day=(date.getDate())<10 ? "0"+(date.getDate()):(date.getDate())
|
|
2875
|
+ this.end_time = date.getFullYear() + "-" + month + "-" + day;
|
2871
|
2876
|
console.log('1234566',this.lastweek.start_day,this.lastweek.end_day);
|
2872
|
|
-
|
|
2877
|
+ this.getSchedules()
|
|
2878
|
+ },
|
|
2879
|
+ getSchedules(){
|
|
2880
|
+
|
2873
|
2881
|
var partionStr = this.partition_id
|
2874
|
2882
|
var arr = this.zoneIdList.join(',')
|
2875
|
2883
|
var str = ""
|
|
@@ -2881,10 +2889,10 @@ export default {
|
2881
|
2889
|
}
|
2882
|
2890
|
const params = {
|
2883
|
2891
|
is_before:1,
|
2884
|
|
- // start_time: this.start_time || this.lastweek.start_day + " 00:00:00",
|
2885
|
|
- // end_time:this.end_time || this.lastweek.end_day + ' 23:59:59',
|
2886
|
|
- start_time: this.lastweek.start_day + " 00:00:00",
|
2887
|
|
- end_time: this.lastweek.end_day + ' 23:59:59',
|
|
2892
|
+ start_time: this.start_time + " 00:00:00",
|
|
2893
|
+ end_time:this.end_time + ' 23:59:59',
|
|
2894
|
+ // start_time: this.lastweek.start_day + " 00:00:00",
|
|
2895
|
+ // end_time: this.lastweek.end_day + ' 23:59:59',
|
2888
|
2896
|
weekTime: this.theType,
|
2889
|
2897
|
patitionid: str,
|
2890
|
2898
|
schedule_type: this.schedule_type,
|
|
@@ -3138,295 +3146,6 @@ export default {
|
3138
|
3146
|
}
|
3139
|
3147
|
});
|
3140
|
3148
|
},
|
3141
|
|
- // getSchedulesOnes(){
|
3142
|
|
- // var thisweek = {};
|
3143
|
|
- // var date = new Date();
|
3144
|
|
- // // 本周一的日期
|
3145
|
|
- // date.setDate(date.getDate() - date.getDay() + 1);
|
3146
|
|
- // thisweek.start_day = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate() ;
|
3147
|
|
-
|
3148
|
|
- // // 本周日的日期
|
3149
|
|
- // date.setDate(date.getDate() + 6);
|
3150
|
|
- // thisweek.end_day = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate();
|
3151
|
|
- // console.log('asdfgdsafg',thisweek.start_day,thisweek.end_day);
|
3152
|
|
-
|
3153
|
|
- // var lastweek = {};
|
3154
|
|
- // var date = new Date();
|
3155
|
|
- // // 上上周一的日期
|
3156
|
|
- // date.setDate(date.getDate()-14 - date.getDay() + 1);
|
3157
|
|
- // lastweek.start_day = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate() ;
|
3158
|
|
-
|
3159
|
|
- // // 上上周日的日期
|
3160
|
|
- // date.setDate(date.getDate() + 6);
|
3161
|
|
- // lastweek.end_day = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate();
|
3162
|
|
- // console.log('1234566',lastweek.start_day,lastweek.end_day);
|
3163
|
|
-
|
3164
|
|
- // var partionStr = this.partition_id
|
3165
|
|
- // var arr = this.zoneIdList.join(',')
|
3166
|
|
- // var str = ""
|
3167
|
|
- // if (partionStr == 0) {
|
3168
|
|
- // str = arr
|
3169
|
|
- // }
|
3170
|
|
- // if (partionStr != 0) {
|
3171
|
|
- // str = partionStr.join(',')
|
3172
|
|
- // }
|
3173
|
|
- // const params = {
|
3174
|
|
- // is_before:1,
|
3175
|
|
- // start_time: lastweek.start_day + " 00:00:00",
|
3176
|
|
- // end_time:lastweek.end_day + ' 23:59:59',
|
3177
|
|
- // weekTime: this.theType,
|
3178
|
|
- // patitionid: str,
|
3179
|
|
- // schedule_type: this.schedule_type,
|
3180
|
|
- // }
|
3181
|
|
-
|
3182
|
|
- // getSchedulesOne(params).then(response => {
|
3183
|
|
- // if (response.data.state == 1) {
|
3184
|
|
- // this.weekTitle = response.data.data.weekTitle;
|
3185
|
|
-
|
3186
|
|
- // this.weekDays = response.data.data.days;
|
3187
|
|
- // this.toDay = response.data.data.today;
|
3188
|
|
- // var theSchedules = response.data.data.schdules;
|
3189
|
|
- // var schedulesGroup = response.data.data.schedulesGroup
|
3190
|
|
- // this.schedulesGroup = schedulesGroup
|
3191
|
|
-
|
3192
|
|
- // var that = this;
|
3193
|
|
-
|
3194
|
|
- // this.scheduleZone.forEach(function (zone, index) {
|
3195
|
|
-
|
3196
|
|
- // that.scheduleZone[index].Mon_M = {
|
3197
|
|
- // mode_id: 0,
|
3198
|
|
- // mode_name: "",
|
3199
|
|
- // patient_id: 0,
|
3200
|
|
- // patient: "",
|
3201
|
|
- // dialysis_machine_name: "",
|
3202
|
|
- // schedule_date: "",
|
3203
|
|
- // Count: 0,
|
3204
|
|
- // };
|
3205
|
|
- // that.scheduleZone[index].Mon_A = {
|
3206
|
|
- // mode_id: 0,
|
3207
|
|
- // mode_name: "",
|
3208
|
|
- // patient_id: 0,
|
3209
|
|
- // patient: "",
|
3210
|
|
- // dialysis_machine_name: "",
|
3211
|
|
- // schedule_date: "",
|
3212
|
|
- // Count: 0,
|
3213
|
|
- // };
|
3214
|
|
- // that.scheduleZone[index].Mon_N = {
|
3215
|
|
- // mode_id: 0,
|
3216
|
|
- // mode_name: "",
|
3217
|
|
- // patient_id: 0,
|
3218
|
|
- // patient: "",
|
3219
|
|
- // dialysis_machine_name: "",
|
3220
|
|
- // schedule_date: "",
|
3221
|
|
- // Count: 0,
|
3222
|
|
- // };
|
3223
|
|
- // that.scheduleZone[index].Tue_M = {
|
3224
|
|
- // mode_id: 0,
|
3225
|
|
- // mode_name: "",
|
3226
|
|
- // patient_id: 0,
|
3227
|
|
- // patient: "",
|
3228
|
|
- // dialysis_machine_name: "",
|
3229
|
|
- // schedule_date: "",
|
3230
|
|
- // Count: 0,
|
3231
|
|
- // };
|
3232
|
|
- // that.scheduleZone[index].Tue_A = {
|
3233
|
|
- // mode_id: 0,
|
3234
|
|
- // mode_name: "",
|
3235
|
|
- // patient_id: 0,
|
3236
|
|
- // patient: "",
|
3237
|
|
- // dialysis_machine_name: "",
|
3238
|
|
- // schedule_date: "",
|
3239
|
|
- // Count: 0,
|
3240
|
|
- // };
|
3241
|
|
- // that.scheduleZone[index].Tue_N = {
|
3242
|
|
- // mode_id: 0,
|
3243
|
|
- // mode_name: "",
|
3244
|
|
- // patient_id: 0,
|
3245
|
|
- // patient: "",
|
3246
|
|
- // dialysis_machine_name: "",
|
3247
|
|
- // schedule_date: "",
|
3248
|
|
- // Count: 0,
|
3249
|
|
- // };
|
3250
|
|
- // that.scheduleZone[index].Wed_M = {
|
3251
|
|
- // mode_id: 0,
|
3252
|
|
- // mode_name: "",
|
3253
|
|
- // patient_id: 0,
|
3254
|
|
- // patient: "",
|
3255
|
|
- // dialysis_machine_name: "",
|
3256
|
|
- // schedule_date: "",
|
3257
|
|
- // Count: 0,
|
3258
|
|
- // };
|
3259
|
|
- // that.scheduleZone[index].Wed_A = {
|
3260
|
|
- // mode_id: 0,
|
3261
|
|
- // mode_name: "",
|
3262
|
|
- // patient_id: 0,
|
3263
|
|
- // patient: "",
|
3264
|
|
- // dialysis_machine_name: "",
|
3265
|
|
- // schedule_date: "",
|
3266
|
|
- // Count: 0,
|
3267
|
|
- // };
|
3268
|
|
- // that.scheduleZone[index].Wed_N = {
|
3269
|
|
- // mode_id: 0,
|
3270
|
|
- // mode_name: "",
|
3271
|
|
- // patient_id: 0,
|
3272
|
|
- // patient: "",
|
3273
|
|
- // dialysis_machine_name: "",
|
3274
|
|
- // schedule_date: "",
|
3275
|
|
- // Count: 0,
|
3276
|
|
-
|
3277
|
|
- // };
|
3278
|
|
- // that.scheduleZone[index].Thurs_M = {
|
3279
|
|
- // mode_id: 0,
|
3280
|
|
- // mode_name: "",
|
3281
|
|
- // patient_id: 0,
|
3282
|
|
- // patient: "",
|
3283
|
|
- // dialysis_machine_name: "",
|
3284
|
|
- // schedule_date: "",
|
3285
|
|
- // Count: 0,
|
3286
|
|
- // };
|
3287
|
|
- // that.scheduleZone[index].Thurs_A = {
|
3288
|
|
- // mode_id: 0,
|
3289
|
|
- // mode_name: "",
|
3290
|
|
- // patient_id: 0,
|
3291
|
|
- // patient: "",
|
3292
|
|
- // dialysis_machine_name: "",
|
3293
|
|
- // schedule_date: "",
|
3294
|
|
- // Count: 0,
|
3295
|
|
- // };
|
3296
|
|
- // that.scheduleZone[index].Thurs_N = {
|
3297
|
|
- // mode_id: 0,
|
3298
|
|
- // mode_name: "",
|
3299
|
|
- // patient_id: 0,
|
3300
|
|
- // patient: "",
|
3301
|
|
- // dialysis_machine_name: "",
|
3302
|
|
- // schedule_date: "",
|
3303
|
|
- // Count: 0,
|
3304
|
|
- // };
|
3305
|
|
- // that.scheduleZone[index].Fri_M = {
|
3306
|
|
- // mode_id: 0,
|
3307
|
|
- // mode_name: "",
|
3308
|
|
- // patient_id: 0,
|
3309
|
|
- // patient: "",
|
3310
|
|
- // dialysis_machine_name: "",
|
3311
|
|
- // schedule_date: "",
|
3312
|
|
- // Count: 0,
|
3313
|
|
- // };
|
3314
|
|
- // that.scheduleZone[index].Fri_A = {
|
3315
|
|
- // mode_id: 0,
|
3316
|
|
- // mode_name: "",
|
3317
|
|
- // patient_id: 0,
|
3318
|
|
- // patient: "",
|
3319
|
|
- // dialysis_machine_name: "",
|
3320
|
|
- // schedule_date: "",
|
3321
|
|
- // Count: 0,
|
3322
|
|
- // };
|
3323
|
|
- // that.scheduleZone[index].Fri_N = {
|
3324
|
|
- // mode_id: 0,
|
3325
|
|
- // mode_name: "",
|
3326
|
|
- // patient_id: 0,
|
3327
|
|
- // patient: "",
|
3328
|
|
- // dialysis_machine_name: "",
|
3329
|
|
- // schedule_date: "",
|
3330
|
|
- // Count: 0,
|
3331
|
|
- // };
|
3332
|
|
- // that.scheduleZone[index].Sat_M = {
|
3333
|
|
- // mode_id: 0,
|
3334
|
|
- // mode_name: "",
|
3335
|
|
- // patient_id: 0,
|
3336
|
|
- // patient: "",
|
3337
|
|
- // dialysis_machine_name: "",
|
3338
|
|
- // schedule_date: "",
|
3339
|
|
- // Count: 0,
|
3340
|
|
- // };
|
3341
|
|
- // that.scheduleZone[index].Sat_A = {
|
3342
|
|
- // mode_id: 0,
|
3343
|
|
- // mode_name: "",
|
3344
|
|
- // patient_id: 0,
|
3345
|
|
- // patient: "",
|
3346
|
|
- // dialysis_machine_name: "",
|
3347
|
|
- // schedule_date: "",
|
3348
|
|
- // Count: 0,
|
3349
|
|
- // };
|
3350
|
|
- // that.scheduleZone[index].Sat_N = {
|
3351
|
|
- // mode_id: 0,
|
3352
|
|
- // mode_name: "",
|
3353
|
|
- // patient_id: 0,
|
3354
|
|
- // patient: "",
|
3355
|
|
- // dialysis_machine_name: "",
|
3356
|
|
- // schedule_date: "",
|
3357
|
|
- // Count: 0,
|
3358
|
|
- // };
|
3359
|
|
- // that.scheduleZone[index].Sun_A = {
|
3360
|
|
- // mode_id: 0,
|
3361
|
|
- // mode_name: "",
|
3362
|
|
- // patient_id: 0,
|
3363
|
|
- // patient: "",
|
3364
|
|
- // dialysis_machine_name: "",
|
3365
|
|
- // schedule_date: "",
|
3366
|
|
- // Count: 0,
|
3367
|
|
- // };
|
3368
|
|
- // that.scheduleZone[index].Sun_N = {
|
3369
|
|
- // mode_id: 0,
|
3370
|
|
- // mode_name: "",
|
3371
|
|
- // patient_id: 0,
|
3372
|
|
- // patient: "",
|
3373
|
|
- // dialysis_machine_name: "",
|
3374
|
|
- // schedule_date: "",
|
3375
|
|
- // Count: 0,
|
3376
|
|
- // };
|
3377
|
|
- // that.scheduleZone[index].Sun_M = {
|
3378
|
|
- // mode_id: 0,
|
3379
|
|
- // mode_name: "",
|
3380
|
|
- // patient_id: 0,
|
3381
|
|
- // patient: "",
|
3382
|
|
- // dialysis_machine_name: "",
|
3383
|
|
- // schedule_date: "",
|
3384
|
|
- // Count: 0,
|
3385
|
|
- // };
|
3386
|
|
-
|
3387
|
|
- // that.scheduleZone[index].total = 0;
|
3388
|
|
-
|
3389
|
|
- // if (response.data.data.schdules.length > 0) {
|
3390
|
|
- // theSchedules.forEach(function (schedule, sindex) {
|
3391
|
|
-
|
3392
|
|
- // if (zone.jihao_id == schedule.bed_id) {
|
3393
|
|
-
|
3394
|
|
- // var weekPath = that.weekPath(
|
3395
|
|
- // schedule.schedule_week,
|
3396
|
|
- // schedule.schedule_type
|
3397
|
|
- // );
|
3398
|
|
-
|
3399
|
|
- // if (weekPath.length == 2) {
|
3400
|
|
-
|
3401
|
|
-
|
3402
|
|
- // var weekPathKey = weekPath[0] + "_" + weekPath[1];
|
3403
|
|
- // that.scheduleZone[index][weekPathKey] = {
|
3404
|
|
- // schedule_id: schedule.id,
|
3405
|
|
- // mode_id: schedule.mode_id,
|
3406
|
|
- // patient_id: schedule.patient_id,
|
3407
|
|
- // patient: schedule.patient,
|
3408
|
|
- // dialysis_machine_name: schedule.dialysis_machine_name,
|
3409
|
|
- // patient_contagions: schedule.patient_contagions,
|
3410
|
|
- // schedule_date: schedule.schedule_date,
|
3411
|
|
- // mode_name: typeof that.modeOptions[schedule.mode_id] === "undefined" ? "" : that.modeOptions[schedule.mode_id].name
|
3412
|
|
- // };
|
3413
|
|
- // that.scheduleZone[index].total += 1;
|
3414
|
|
-
|
3415
|
|
- // }
|
3416
|
|
- // }
|
3417
|
|
- // });
|
3418
|
|
- // }
|
3419
|
|
-
|
3420
|
|
- // });
|
3421
|
|
-
|
3422
|
|
- // this.source_scheduleZone = this.scheduleZone
|
3423
|
|
- // console.log("默认aaaa", this.scheduleZone)
|
3424
|
|
- // } else {
|
3425
|
|
- // this.$message.error("网络错误");
|
3426
|
|
- // return false;
|
3427
|
|
- // }
|
3428
|
|
- // });
|
3429
|
|
- // },
|
3430
|
3149
|
},
|
3431
|
3150
|
components: {
|
3432
|
3151
|
ScheduleItem
|