Przeglądaj źródła

3月27日杨青

杨青 2 lat temu
rodzic
commit
ebe867bf49

+ 2 - 2
src/xt_pages/workforce/appointment.vue Wyświetl plik

135
           <!-- <bread-crumb :crumbs="crumbs"></bread-crumb> -->
135
           <!-- <bread-crumb :crumbs="crumbs"></bread-crumb> -->
136
           <div>
136
           <div>
137
             <el-tabs v-model="activeName" :tab-position="tabPosition" ref="elTabs">
137
             <el-tabs v-model="activeName" :tab-position="tabPosition" ref="elTabs">
138
-          <!-- <el-tab-pane name="lastWeek">
138
+          <el-tab-pane name="lastWeek">
139
             <span slot="label"><i class="el-icon-date"></i> 上周 ({{ theWeek.lastWeek }})</span>
139
             <span slot="label"><i class="el-icon-date"></i> 上周 ({{ theWeek.lastWeek }})</span>
140
-          </el-tab-pane> -->
140
+          </el-tab-pane>
141
           <el-tab-pane name="thisWeek">
141
           <el-tab-pane name="thisWeek">
142
             <span slot="label"><i class="el-icon-date"></i> 本周 ({{ theWeek.thisWeek }})</span>
142
             <span slot="label"><i class="el-icon-date"></i> 本周 ({{ theWeek.thisWeek }})</span>
143
           </el-tab-pane>
143
           </el-tab-pane>

+ 24 - 10
src/xt_pages/workforce/components/editTableData.vue Wyświetl plik

1860
       modes: [],
1860
       modes: [],
1861
       patientList: [],
1861
       patientList: [],
1862
       all_patients: [],
1862
       all_patients: [],
1863
-
1863
+      systemDate:'',
1864
       mode_select: [
1864
       mode_select: [
1865
         {
1865
         {
1866
           value: "1",
1866
           value: "1",
3220
     },
3220
     },
3221
     // 删除某一单元格内的患者透析排班
3221
     // 删除某一单元格内的患者透析排班
3222
     deletePatientMode(row) {
3222
     deletePatientMode(row) {
3223
-        if (row.schedule_id > 0) {
3224
-          console.log('22222222');
3223
+      console.log('12345566',this.cur_drag_info, this.systemDate);
3224
+        if (row.schedule_id > 0 && this.cur_drag_info.schedule_date >= this.systemDate) {
3225
+          console.log('22222222',this.cur_drag_info.schedule_date >= this.systemDate);
3225
           this.CancelSchedule(row.schedule_id);
3226
           this.CancelSchedule(row.schedule_id);
3226
         }
3227
         }
3227
         console.log('deletePatientMode',row);
3228
         console.log('deletePatientMode',row);
3289
             id : row[key].schedule_id,
3290
             id : row[key].schedule_id,
3290
             partition_type : row.zone_type,
3291
             partition_type : row.zone_type,
3291
           }
3292
           }
3292
-          console.log('this.currentData的数据',this.currentData);
3293
+          // let nowDate = new Date();
3294
+          // let date = {
3295
+          //       year: nowDate.getFullYear(),
3296
+          //       month: nowDate.getMonth() + 1,
3297
+          //       date: nowDate.getDate(),
3298
+          //     }
3299
+          //   let Month=date.month<10 ? '0'+ date.month :  date.month
3300
+          //   let Dateday= date.date<10 ? '0'+date.date : date.date
3301
+          //   this.systemDate = date.year + '-'+ Month + '-'+ Dateday;
3302
+          // console.log('this.currentData的数据',this.currentData);
3303
+          // console.log('this.cur_drag_info的数据',this.cur_drag_info);
3304
+          // console.log('123453545',this.systemDate);
3293
           // 当表格有数据
3305
           // 当表格有数据
3294
           if ( row[key].mode_id > 0 || row[key].patient_id > 0) {
3306
           if ( row[key].mode_id > 0 || row[key].patient_id > 0) {
3295
             // 且是表格数据拖拽
3307
             // 且是表格数据拖拽
3296
             if (this.cur_drag_obj == 2){
3308
             if (this.cur_drag_obj == 2){
3297
-              if(row[key].patient_id != this.cur_drag_info.patient_id){
3298
-                console.log('row[key].patient_id',row[key].patient_id,
3299
-                     'this.cur_drag_info.partition_id',this.cur_drag_info.patient_id);
3300
-                this.tipDialogVisible = true
3301
-              }else{
3309
+              if (row[key].patient_id != this.cur_drag_info.patient_id ) {
3310
+                if( this.currentData.schedule_date >= this.systemDate ){
3311
+                  this.tipDialogVisible = true
3312
+                }
3313
+              } else {
3302
                 this.tipDialogVisible = false
3314
                 this.tipDialogVisible = false
3303
               }
3315
               }
3304
             }else{
3316
             }else{
3692
           ) {
3704
           ) {
3693
             return "hover-td schedule-table-cell-disable";
3705
             return "hover-td schedule-table-cell-disable";
3694
           } else {
3706
           } else {
3695
-            return "schedule-table-cell-disable";
3707
+            return "";
3696
           }
3708
           }
3697
         }
3709
         }
3698
       }
3710
       }
5700
       day = "0" + day;
5712
       day = "0" + day;
5701
     }
5713
     }
5702
     var nowDate = year + "-" + month + "-" + day;
5714
     var nowDate = year + "-" + month + "-" + day;
5715
+    this.systemDate=nowDate
5716
+    console.log('当前时间',nowDate);
5703
     var date = new Date(nowDate + " 00:00:00");
5717
     var date = new Date(nowDate + " 00:00:00");
5704
 
5718
 
5705
     this.now_time = date.getTime() / 1000;
5719
     this.now_time = date.getTime() / 1000;

+ 3 - 1
src/xt_pages/workforce/components/historyWeekTable.vue Wyświetl plik

1126
             // return "schedule-table-cell-disable";
1126
             // return "schedule-table-cell-disable";
1127
           }else {
1127
           }else {
1128
             if(row[column.property].patient_id > 0 && row[column.property].patient_id == this.patient_id_hover){
1128
             if(row[column.property].patient_id > 0 && row[column.property].patient_id == this.patient_id_hover){
1129
-              return 'hover-td'
1129
+              return 'hover-td '
1130
             }else {
1130
             }else {
1131
               return ''
1131
               return ''
1132
             }
1132
             }
1133
           }
1133
           }
1134
+        }else if(this.weekTime == "historyWeek"){
1135
+          return 'schedule-table-cell-disable'
1134
         }
1136
         }
1135
       }
1137
       }
1136
       return "";
1138
       return "";

+ 4 - 37
src/xt_pages/workforce/components/tableData.vue Wyświetl plik

528
                 v-model="changeSchedule.bed_id"
528
                 v-model="changeSchedule.bed_id"
529
                 placeholder="请选择"
529
                 placeholder="请选择"
530
                 style="width: 100%"
530
                 style="width: 100%"
531
-               
532
             >
531
             >
533
             <!--  @change="changeScheduledialyzer" -->
532
             <!--  @change="changeScheduledialyzer" -->
534
               <el-option
533
               <el-option
749
       },
748
       },
750
 
749
 
751
       tiaozhengclass: "tiaozhengclass",
750
       tiaozhengclass: "tiaozhengclass",
751
+      // 调整机号表单验证
752
       changeRules: {
752
       changeRules: {
753
         mode_id: [{ required: true, message: "请选择模式", trigger: "blur" }],
753
         mode_id: [{ required: true, message: "请选择模式", trigger: "blur" }],
754
         schedule_type: [
754
         schedule_type: [
755
           { required: true, message: "请选择班次", trigger: "blur" }
755
           { required: true, message: "请选择班次", trigger: "blur" }
756
         ],
756
         ],
757
         partition_id: [
757
         partition_id: [
758
-          { required: true, message: "请选择病房", trigger: "blur" }
758
+          { required: true, message: "请选择分区", trigger: "blur" }
759
         ],
759
         ],
760
         bed_id: [{ required: true, message: "请选择透析机", trigger: "blur" }]
760
         bed_id: [{ required: true, message: "请选择透析机", trigger: "blur" }]
761
       },
761
       },
1274
             // return "schedule-table-cell-disable";
1274
             // return "schedule-table-cell-disable";
1275
           }else {
1275
           }else {
1276
             if(row[column.property].patient_id > 0 && row[column.property].patient_id == this.patient_id_hover){
1276
             if(row[column.property].patient_id > 0 && row[column.property].patient_id == this.patient_id_hover){
1277
-              return 'hover-td'
1277
+              return 'hover-td '
1278
             }else {
1278
             }else {
1279
               return ''
1279
               return ''
1280
             }
1280
             }
2531
               break
2531
               break
2532
             }
2532
             }
2533
           }
2533
           }
2534
-
2535
-          // 可能
2536
-          // 患者有传染病,与选择的机器类型(传染病)不匹配
2537
-          // 患者没有传染病,但机器是某个传染病的专用透析器
2538
-          // 机器的透析模式与患者不匹配
2539
-
2540
-          // if (this.currentData.contagions.length > 0) {
2541
-          //   var cflag = false
2542
-          //   for (var index in this.currentData.contagions) {
2543
-          //     if (this.currentData.contagions[index].disease_id == this.changeSchedule.partition_type) {
2544
-          //       cflag = true
2545
-          //     }
2546
-          //   }
2547
-          //   if (!cflag) {
2548
-          //     this.$confirm('此患者有传染病,与此透析机不匹配,确定在此排班吗?', '提示', { confirmButtonText: '确 定', cancelButtonText: '取 消', type: 'warning' })
2549
-          //       .then(() => {
2550
-          //
2551
-          //       }).catch(() => {
2552
-          //       })
2553
-          //   } else {
2554
-          //     this.changeSchedule.change_action = 'change_device'
2555
-          //     this.changeScheduleActon(formName)
2556
-          //   }
2557
-          // } else if (this.changeSchedule.partition_type > 1) {
2558
-          //   this.$confirm('此患者没有传染病,与此透析机不匹配,确定在此排班吗?', '提示', { confirmButtonText: '确 定', cancelButtonText: '取 消', type: 'warning' })
2559
-          //     .then(() => {
2560
-          //       this.changeSchedule.change_action = 'change_device'
2561
-          //       this.changeScheduleActon(formName)
2562
-          //     }).catch(() => {
2563
-          //     })
2564
-          // } else {
2565
-          //   this.changeSchedule.change_action = 'change_device'
2566
-          //   this.changeScheduleActon(formName)
2567
-          // }
2568
         }
2534
         }
2569
       })
2535
       })
2536
+      // this.$refs.changeSchedule.resetFields()
2570
     },
2537
     },
2571
     //  搜索弹窗操作调整模式确认按钮
2538
     //  搜索弹窗操作调整模式确认按钮
2572
     submitMode(formName) {
2539
     submitMode(formName) {