瀏覽代碼

Merge branch '20230223_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20230223_pc_vue_new_branch

test_user 2 年之前
父節點
當前提交
f176dbec8a

+ 12 - 1
src/router/modules/workforce.js 查看文件

166
       title: 'scheduleTablePrintTwo',
166
       title: 'scheduleTablePrintTwo',
167
       noCache: true
167
       noCache: true
168
     }
168
     }
169
-  }
169
+  },
170
+  // {
171
+  //   path: '/historyWeekTable',
172
+  //   component: () => import('@/xt_pages/workforce/historyWeekTable'),
173
+  //   name: 'historyWeekTable',
174
+  //   hidden: true,
175
+  //   is_menu: false,
176
+  //   meta: {
177
+  //     title: 'historyWeekTable',
178
+  //     noCache: true
179
+  //   }
180
+  // }
170
   ]
181
   ]
171
 }
182
 }

+ 50 - 20
src/xt_pages/workforce/appointment.vue 查看文件

102
         >
102
         >
103
         </el-date-picker>
103
         </el-date-picker>
104
       </div>
104
       </div>
105
-      <el-tabs v-model="activeName" :tab-position="tabPosition" ref="elTabs">
105
+      <el-tabs v-model="activeName" :tab-position="tabPosition" ref="elTabs" @tab-click="handleClick">
106
+        <el-tab-pane name="historyWeek">
107
+          <span slot="label"><i class="el-icon-date"></i> 历史周期 ({{ theWeek.historyWeek }}) </span>
108
+        </el-tab-pane>
106
         <el-tab-pane name="lastWeek">
109
         <el-tab-pane name="lastWeek">
107
           <span slot="label"><i class="el-icon-date"></i> 上周 ({{ theWeek.lastWeek }})</span>
110
           <span slot="label"><i class="el-icon-date"></i> 上周 ({{ theWeek.lastWeek }})</span>
108
         </el-tab-pane>
111
         </el-tab-pane>
116
           <span slot="label"><i class="el-icon-date"></i> 下下周 ({{ theWeek.nextTwoWeek }})</span>
119
           <span slot="label"><i class="el-icon-date"></i> 下下周 ({{ theWeek.nextTwoWeek }})</span>
117
         </el-tab-pane>
120
         </el-tab-pane>
118
       </el-tabs>
121
       </el-tabs>
119
-
120
-      <table-data ref="tableData"  :week-time="activeName" :partitions-prop="partitions"
121
-                  :schedule-zone-row-prop="scheduleZoneRow"
122
-                  :schedule-zone-prop="scheduleZone" title="" @event1="changePartition"
123
-                  @event2="changeSchedule" v-if="!is_edit" @event3="changeWeekDay">
124
-      </table-data>
125
-
126
-      <edit-table-data ref="edittableData"  :week-time="activeName" :partitions-prop="partitions"
122
+      <div v-if="!is_edit">
123
+        <table-data ref="tableData"  :week-time="activeName" :partitions-prop="partitions"
124
+                    :schedule-zone-row-prop="scheduleZoneRow"
125
+                    :schedule-zone-prop="scheduleZone" title="" @event1="changePartition"
126
+                    @event2="changeSchedule"  @event3="changeWeekDay" v-show="showtableOne">
127
+        </table-data>
128
+      </div>
129
+       <edit-table-data ref="edittableData"  :week-time="activeName" :partitions-prop="partitions"
127
                         :schedule-zone-row-prop="scheduleZoneRow" :schedule-zone-prop="scheduleZone"
130
                         :schedule-zone-row-prop="scheduleZoneRow" :schedule-zone-prop="scheduleZone"
128
                          title="" @event1="changePartition"
131
                          title="" @event1="changePartition"
129
                          @event2="changeSchedule" v-if="is_edit" @event3="changeWeekDay">
132
                          @event2="changeSchedule" v-if="is_edit" @event3="changeWeekDay">
169
         </div>
172
         </div>
170
       </div>
173
       </div>
171
         </edit-table-data>
174
         </edit-table-data>
172
-
175
+       
176
+        <HistoryWeekTable v-show="showtable" ref="tableDataZero"  :week-time="activeName" partitions-prop="partitions"
177
+                  :schedule-zone-row-prop="scheduleZoneRow"
178
+                  :schedule-zone-prop="scheduleZone" title="" @event1="changePartition"
179
+                  @event2="changeSchedule"  @event3="changeWeekDay">
180
+          </HistoryWeekTable>
173
       <el-dialog title="复制排班" width="600px" :visible.sync="newVisible">
181
       <el-dialog title="复制排班" width="600px" :visible.sync="newVisible">
174
         <el-form :model="form" ref="form" label-width="90px" :rules="rules">
182
         <el-form :model="form" ref="form" label-width="90px" :rules="rules">
175
           <el-form-item label="周次:">
183
           <el-form-item label="周次:">
220
 import {generateLog} from '@/api/config'
228
 import {generateLog} from '@/api/config'
221
 import {uParseTime} from '@/utils/tools'
229
 import {uParseTime} from '@/utils/tools'
222
 import EditTableData from "./components/editTableData";
230
 import EditTableData from "./components/editTableData";
223
-
231
+import HistoryWeekTable from './components/historyWeekTable'
224
 export default {
232
 export default {
225
   name: 'appointment',
233
   name: 'appointment',
226
   data() {
234
   data() {
259
       scheduleZone: [],
267
       scheduleZone: [],
260
       days: [],
268
       days: [],
261
       logs: [],
269
       logs: [],
270
+      showtable:false,
271
+      showtableOne:true,
262
       is_edit: false,
272
       is_edit: false,
263
       schedulingTableVisible:false,//全屏
273
       schedulingTableVisible:false,//全屏
264
       scheduleZoneRow: [],
274
       scheduleZoneRow: [],
268
       isExistRepeatVisible: false,
278
       isExistRepeatVisible: false,
269
       exportVisible: false,
279
       exportVisible: false,
270
       exportLogVisible: false,
280
       exportLogVisible: false,
281
+      // 周期
271
       theWeek: {
282
       theWeek: {
283
+        historyWeek:0,
272
         lastWeek: 0,
284
         lastWeek: 0,
273
         thisWeek: 0,
285
         thisWeek: 0,
274
         nextWeek: 0,
286
         nextWeek: 0,
275
         nextTwoWeek: 0
287
         nextTwoWeek: 0
276
       },
288
       },
289
+      
277
       tableList: [],
290
       tableList: [],
278
       weekTime: "",
291
       weekTime: "",
279
       schedule_type: 0,
292
       schedule_type: 0,
313
     tableData,
326
     tableData,
314
     BreadCrumb,
327
     BreadCrumb,
315
     UploadExcel,
328
     UploadExcel,
316
-
329
+    HistoryWeekTable
317
   },
330
   },
318
   methods: {
331
   methods: {
332
+    handleClick(e,tab){
333
+      if(e.name == 'historyWeek'){
334
+        this.showtable=true
335
+        this.showtableOne=false
336
+        this.$nextTick(() => {
337
+          this.$refs.tableDataZero.getgetSchedules()
338
+        })
339
+        console.log('12343545',this.$refs.tableDataZero);
340
+      }else{
341
+        this.showtable=false
342
+        this.showtableOne=true
343
+      }
344
+
345
+      // if(e.name == 'thisWeek'){
346
+      //    this.$refs.tableData.getWeekPanels()
347
+      // }
348
+      // console.log(getgetSchedules);
349
+    },
319
     dragstart(event, item) {
350
     dragstart(event, item) {
320
       // console.log('start的索引',item.moveIndex)
351
       // console.log('start的索引',item.moveIndex)
321
       // 开始移动的时候将移动的索引值+图片的url存储下来
352
       // 开始移动的时候将移动的索引值+图片的url存储下来
404
           return false
435
           return false
405
         }
436
         }
406
         var partitions = response.data.data.partitions
437
         var partitions = response.data.data.partitions
407
-        // console.log("分区",partitions)
438
+        console.log("分区",response.data.data)
408
         this.theWeek.thisWeek = response.data.data.theWeek
439
         this.theWeek.thisWeek = response.data.data.theWeek
409
         this.theWeek.lastWeek = response.data.data.theLastWeek
440
         this.theWeek.lastWeek = response.data.data.theLastWeek
410
         this.theWeek.nextWeek = response.data.data.theNextWeek
441
         this.theWeek.nextWeek = response.data.data.theNextWeek
411
         this.theWeek.nextTwoWeek = response.data.data.theNextSecWeek
442
         this.theWeek.nextTwoWeek = response.data.data.theNextSecWeek
443
+        // this.theWeek.historyWeek = response.data.data.theWeek - 2
412
         // 在控制变量改变的时候进行 强制渲染更新
444
         // 在控制变量改变的时候进行 强制渲染更新
413
         let childrenRefs = this.$refs.elTabs.$children
445
         let childrenRefs = this.$refs.elTabs.$children
414
         this.$nextTick(() => {
446
         this.$nextTick(() => {
679
 
711
 
680
         }
712
         }
681
         // console.log("111111111")
713
         // console.log("111111111")
682
-        // console.log(that.scheduleZone)
714
+         console.log(that.scheduleZone)
683
       })
715
       })
684
     },
716
     },
685
     changeSch(val){
717
     changeSch(val){
870
       } else if (this.activeName == 'nextTwoWeek') {
902
       } else if (this.activeName == 'nextTwoWeek') {
871
         date = date + 14 * 24 * 60 * 60 * 1000
903
         date = date + 14 * 24 * 60 * 60 * 1000
872
       }
904
       }
873
-
874
-      if (this.templateObj.template_id == 0 || this.templateObj.template_id == 1) {
905
+      if (this.templateObj.template_id == 1) {
875
         this.$router.push({path: '/workforce/schedule/print', query: {date: date}})
906
         this.$router.push({path: '/workforce/schedule/print', query: {date: date}})
876
       }
907
       }
877
       if (this.templateObj.template_id == 2) {
908
       if (this.templateObj.template_id == 2) {
880
       if (this.templateObj.template_id == 3) {
911
       if (this.templateObj.template_id == 3) {
881
         this.$router.push({path: '/scheduleTablePrintOne?partition_id=' + this.partition_id + "&weekTime=" + this.activeName+"&week_date="+this.week_date})
912
         this.$router.push({path: '/scheduleTablePrintOne?partition_id=' + this.partition_id + "&weekTime=" + this.activeName+"&week_date="+this.week_date})
882
       }
913
       }
883
-
884
       if(this.templateObj.template_id == 4){
914
       if(this.templateObj.template_id == 4){
885
         this.$router.push({path: '/scheduleTablePrintTwo?partition_id=' + this.partition_id + "&weekTime=" + this.activeName+"&week_date="+this.week_date})
915
         this.$router.push({path: '/scheduleTablePrintTwo?partition_id=' + this.partition_id + "&weekTime=" + this.activeName+"&week_date="+this.week_date})
886
       }
916
       }
2335
 
2365
 
2336
       return next_monday
2366
       return next_monday
2337
     },
2367
     },
2338
-
2368
+    // 
2339
     getThreeWeekList() {
2369
     getThreeWeekList() {
2340
       var params = {
2370
       var params = {
2341
         start_time: this.start_time,
2371
         start_time: this.start_time,
2862
     },
2892
     },
2863
 
2893
 
2864
     changeWeek(val) {
2894
     changeWeek(val) {
2865
-
2866
       this.start_time = ""
2895
       this.start_time = ""
2867
       this.end_time = ""
2896
       this.end_time = ""
2868
       this.newDay = []
2897
       this.newDay = []
3041
     },
3070
     },
3042
     getlist() {
3071
     getlist() {
3043
       getScheduleTemplate().then(response => {
3072
       getScheduleTemplate().then(response => {
3073
+        
3044
         if (response.data.state == 1) {
3074
         if (response.data.state == 1) {
3045
           var template = response.data.data.template
3075
           var template = response.data.data.template
3046
-
3076
+          console.log('12243254',response.data.data);
3047
           this.templateObj = template
3077
           this.templateObj = template
3048
         }
3078
         }
3049
       })
3079
       })

+ 14 - 4
src/xt_pages/workforce/components/ScheduleItem.vue 查看文件

3
     <div >
3
     <div >
4
 
4
 
5
             <div>
5
             <div>
6
-                <span :class='modeColor(scheduleDetail.mode_name)'>{{scheduleDetail.patient}}</span><br/>
7
-                <span v-if="scheduleDetail.mode_name.length>0" :class='modeColor(scheduleDetail.mode_name)'>({{scheduleDetail.mode_name}})</span>
8
-                <br/><span v-if="schedulFlag">{{scheduleDetail.dialysis_machine_name}}</span>
6
+                <span :class='modeColor(scheduleDetail.mode_name)'>{{scheduleDetail.patient}}</span>
7
+                <template v-if="schedulMode">
8
+                  <br/>
9
+                  <span v-if="scheduleDetail.mode_name.length>0"  :class='modeColor(scheduleDetail.mode_name)' >{{'('+scheduleDetail.mode_name+')'}}</span>
10
+                </template>
11
+                <template v-if="schedulFlag">
12
+                  <br/><span >{{scheduleDetail.dialysis_machine_name}}</span>
13
+                </template>
14
+                
9
             </div>
15
             </div>
10
     </div>
16
     </div>
11
 </template>
17
 </template>
29
       schedulFlag:{
35
       schedulFlag:{
30
         type:Boolean,
36
         type:Boolean,
31
         default:false
37
         default:false
38
+      },
39
+      schedulMode:{
40
+        type:Boolean,
41
+        default:true
32
       }
42
       }
33
   },
43
   },
34
   data() {
44
   data() {
35
     return {
45
     return {
36
-
46
+      
37
     }
47
     }
38
   },
48
   },
39
 
49
 

文件差異過大導致無法顯示
+ 3237 - 0
src/xt_pages/workforce/components/historyWeekTable.vue


文件差異過大導致無法顯示
+ 1329 - 1386
src/xt_pages/workforce/components/tableData.vue


+ 53 - 30
src/xt_pages/workforce/components/template_table.vue 查看文件

143
                       icon="el-icon-close"
143
                       icon="el-icon-close"
144
                       circle
144
                       circle
145
                       @click.stop="
145
                       @click.stop="
146
-                        deletePatientMode(scope.row['1_1'], '1_1', scope.row)
147
-                      "
146
+                        deletePatientMode(scope.row['1_1'], '1_1', scope.row)"
147
+                        v-show="cur_drag_info.patient_id== 0 ? false : true"
148
                     ></el-button>
148
                     ></el-button>
149
                   </div>
149
                   </div>
150
                   <div
150
                   <div
182
                       @click.stop="
182
                       @click.stop="
183
                         deletePatientMode(scope.row['1_2'], '1_2', scope.row)
183
                         deletePatientMode(scope.row['1_2'], '1_2', scope.row)
184
                       "
184
                       "
185
+                      v-show="cur_drag_info.patient_id== 0 ? false : true"
185
                     ></el-button>
186
                     ></el-button>
186
                   </div>
187
                   </div>
187
                   <div
188
                   <div
219
                       @click.stop="
220
                       @click.stop="
220
                         deletePatientMode(scope.row['1_3'], '1_3', scope.row)
221
                         deletePatientMode(scope.row['1_3'], '1_3', scope.row)
221
                       "
222
                       "
223
+                      v-show="cur_drag_info.patient_id== 0 ? false : true"
222
                     ></el-button>
224
                     ></el-button>
223
                   </div>
225
                   </div>
224
                   <div
226
                   <div
259
                       @click.stop="
261
                       @click.stop="
260
                         deletePatientMode(scope.row['2_1'], '2_1', scope.row)
262
                         deletePatientMode(scope.row['2_1'], '2_1', scope.row)
261
                       "
263
                       "
264
+                      v-show="cur_drag_info.patient_id== 0 ? false : true"
262
                     ></el-button>
265
                     ></el-button>
263
                   </div>
266
                   </div>
264
                   <div
267
                   <div
295
                       @click.stop="
298
                       @click.stop="
296
                         deletePatientMode(scope.row['2_2'], '2_2', scope.row)
299
                         deletePatientMode(scope.row['2_2'], '2_2', scope.row)
297
                       "
300
                       "
301
+                      v-show="cur_drag_info.patient_id== 0 ? false : true"
298
                     ></el-button>
302
                     ></el-button>
299
                   </div>
303
                   </div>
300
                   <div
304
                   <div
332
                       @click.stop="
336
                       @click.stop="
333
                         deletePatientMode(scope.row['2_3'], '2_3', scope.row)
337
                         deletePatientMode(scope.row['2_3'], '2_3', scope.row)
334
                       "
338
                       "
339
+                      v-show="cur_drag_info.patient_id== 0 ? false : true"
335
                     ></el-button>
340
                     ></el-button>
336
                   </div>
341
                   </div>
337
                   <div
342
                   <div
372
                       @click.stop="
377
                       @click.stop="
373
                         deletePatientMode(scope.row['3_1'], '3_1', scope.row)
378
                         deletePatientMode(scope.row['3_1'], '3_1', scope.row)
374
                       "
379
                       "
380
+                      v-show="cur_drag_info.patient_id== 0 ? false : true"
375
                     ></el-button>
381
                     ></el-button>
376
                   </div>
382
                   </div>
377
                   <div
383
                   <div
409
                       @click.stop="
415
                       @click.stop="
410
                         deletePatientMode(scope.row['3_2'], '3_2', scope.row)
416
                         deletePatientMode(scope.row['3_2'], '3_2', scope.row)
411
                       "
417
                       "
418
+                      v-show="cur_drag_info.patient_id== 0 ? false : true"
412
                     ></el-button>
419
                     ></el-button>
413
                   </div>
420
                   </div>
414
                   <div
421
                   <div
446
                       @click.stop="
453
                       @click.stop="
447
                         deletePatientMode(scope.row['3_3'], '3_3', scope.row)
454
                         deletePatientMode(scope.row['3_3'], '3_3', scope.row)
448
                       "
455
                       "
456
+                      v-show="cur_drag_info.patient_id== 0 ? false : true"
449
                     ></el-button>
457
                     ></el-button>
450
                   </div>
458
                   </div>
451
                   <div
459
                   <div
486
                       @click.stop="
494
                       @click.stop="
487
                         deletePatientMode(scope.row['4_1'], '4_1', scope.row)
495
                         deletePatientMode(scope.row['4_1'], '4_1', scope.row)
488
                       "
496
                       "
497
+                      v-show="cur_drag_info.patient_id== 0 ? false : true"
489
                     ></el-button>
498
                     ></el-button>
490
                   </div>
499
                   </div>
491
                   <div
500
                   <div
523
                       @click.stop="
532
                       @click.stop="
524
                         deletePatientMode(scope.row['4_2'], '4_2', scope.row)
533
                         deletePatientMode(scope.row['4_2'], '4_2', scope.row)
525
                       "
534
                       "
535
+                      v-show="cur_drag_info.patient_id== 0 ? false : true"
526
                     ></el-button>
536
                     ></el-button>
527
                   </div>
537
                   </div>
528
                   <div
538
                   <div
560
                       @click.stop="
570
                       @click.stop="
561
                         deletePatientMode(scope.row['4_3'], '4_3', scope.row)
571
                         deletePatientMode(scope.row['4_3'], '4_3', scope.row)
562
                       "
572
                       "
573
+                      v-show="cur_drag_info.patient_id== 0 ? false : true"
563
                     ></el-button>
574
                     ></el-button>
564
                   </div>
575
                   </div>
565
                   <div
576
                   <div
600
                       @click.stop="
611
                       @click.stop="
601
                         deletePatientMode(scope.row['5_1'], '5_1', scope.row)
612
                         deletePatientMode(scope.row['5_1'], '5_1', scope.row)
602
                       "
613
                       "
614
+                      v-show="cur_drag_info.patient_id== 0 ? false : true"
603
                     ></el-button>
615
                     ></el-button>
604
                   </div>
616
                   </div>
605
                   <div
617
                   <div
637
                       @click.stop="
649
                       @click.stop="
638
                         deletePatientMode(scope.row['5_2'], '5_2', scope.row)
650
                         deletePatientMode(scope.row['5_2'], '5_2', scope.row)
639
                       "
651
                       "
652
+                      v-show="cur_drag_info.patient_id== 0 ? false : true"
640
                     ></el-button>
653
                     ></el-button>
641
                   </div>
654
                   </div>
642
                   <div
655
                   <div
674
                       @click.stop="
687
                       @click.stop="
675
                         deletePatientMode(scope.row['5_3'], '5_3', scope.row)
688
                         deletePatientMode(scope.row['5_3'], '5_3', scope.row)
676
                       "
689
                       "
690
+                      v-show="cur_drag_info.patient_id== 0 ? false : true"
677
                     ></el-button>
691
                     ></el-button>
678
                   </div>
692
                   </div>
679
                   <div
693
                   <div
714
                       @click.stop="
728
                       @click.stop="
715
                         deletePatientMode(scope.row['6_1'], '6_1', scope.row)
729
                         deletePatientMode(scope.row['6_1'], '6_1', scope.row)
716
                       "
730
                       "
731
+                      v-show="cur_drag_info.patient_id== 0 ? false : true"
717
                     ></el-button>
732
                     ></el-button>
718
                   </div>
733
                   </div>
719
                   <div
734
                   <div
751
                       @click.stop="
766
                       @click.stop="
752
                         deletePatientMode(scope.row['6_2'], '6_2', scope.row)
767
                         deletePatientMode(scope.row['6_2'], '6_2', scope.row)
753
                       "
768
                       "
769
+                      v-show="cur_drag_info.patient_id== 0 ? false : true"
754
                     ></el-button>
770
                     ></el-button>
755
                   </div>
771
                   </div>
756
                   <div
772
                   <div
788
                       @click.stop="
804
                       @click.stop="
789
                         deletePatientMode(scope.row['6_3'], '6_3', scope.row)
805
                         deletePatientMode(scope.row['6_3'], '6_3', scope.row)
790
                       "
806
                       "
807
+                      v-show="cur_drag_info.patient_id== 0 ? false : true"
791
                     ></el-button>
808
                     ></el-button>
792
                   </div>
809
                   </div>
793
                   <div
810
                   <div
831
                       icon="el-icon-close"
848
                       icon="el-icon-close"
832
                       circle
849
                       circle
833
                       @click.stop="
850
                       @click.stop="
834
-                        deletePatientMode(scope.row['7_1'], '7_1', scope.row)
835
-                      "
851
+                        deletePatientMode(scope.row['7_1'], '7_1', scope.row) "
852
+                        v-show="cur_drag_info.patient_id== 0 ? false : true"
836
                     ></el-button>
853
                     ></el-button>
837
                   </div>
854
                   </div>
838
                   <div
855
                   <div
873
                       icon="el-icon-close"
890
                       icon="el-icon-close"
874
                       circle
891
                       circle
875
                       @click.stop="
892
                       @click.stop="
876
-                        deletePatientMode(scope.row['7_2'], '7_2', scope.row)
877
-                      "
893
+                        deletePatientMode(scope.row['7_2'], '7_2', scope.row) "
894
+                      v-show="cur_drag_info.patient_id== 0 ? false : true"
878
                     ></el-button>
895
                     ></el-button>
879
                   </div>
896
                   </div>
880
                   <div
897
                   <div
915
                       icon="el-icon-close"
932
                       icon="el-icon-close"
916
                       circle
933
                       circle
917
                       @click.stop="
934
                       @click.stop="
918
-                        deletePatientMode(scope.row['7_3'], '7_3', scope.row)
919
-                      "
935
+                        deletePatientMode(scope.row['7_3'], '7_3', scope.row)"
936
+                      v-show="cur_drag_info.patient_id== 0 ? false : true"
920
                     ></el-button>
937
                     ></el-button>
921
                   </div>
938
                   </div>
922
                   <div
939
                   <div
1756
     // 拖拽
1773
     // 拖拽
1757
     drop(e, day, index, name, row) {
1774
     drop(e, day, index, name, row) {
1758
       e.preventDefault();
1775
       e.preventDefault();
1759
-      console.log(row)
1760
-
1776
+      console.log('11111111',row)
1761
       for (var key in row) {
1777
       for (var key in row) {
1762
         if (key == day) {
1778
         if (key == day) {
1763
           let info = {};
1779
           let info = {};
1772
           var weekday = weekday_timetype[0];
1788
           var weekday = weekday_timetype[0];
1773
           var time_type = weekday_timetype[1];
1789
           var time_type = weekday_timetype[1];
1774
 
1790
 
1775
-
1776
           this.cur_temp_info.schedule_week = weekday
1791
           this.cur_temp_info.schedule_week = weekday
1777
           this.cur_temp_info.schedule_type = time_type
1792
           this.cur_temp_info.schedule_type = time_type
1778
           this.cur_temp_info.patient_id = info.pid
1793
           this.cur_temp_info.patient_id = info.pid
1779
           this.cur_temp_info.id = row.id
1794
           this.cur_temp_info.id = row.id
1780
 
1795
 
1781
-
1782
           if (info.pid > 0 || info.treat_mode_id > 0 ) {
1796
           if (info.pid > 0 || info.treat_mode_id > 0 ) {
1783
             if (this.cur_drag_obj == 2){
1797
             if (this.cur_drag_obj == 2){
1784
-              console.log("1111222222")
1785
-              this.tipDialogVisible = true
1798
+             
1799
+              if(info.pid != this.cur_drag_info.patient_id){
1800
+                console.log('1234132412',info.pid,this.cur_drag_info.patient_id);
1801
+                this.tipDialogVisible = true
1802
+              }
1803
+                // this.tipDialogVisible = false
1786
             }else{
1804
             }else{
1787
               this.$message.error("当前机号已有排班2");
1805
               this.$message.error("当前机号已有排班2");
1788
               return;
1806
               return;
1791
           } else {
1809
           } else {
1792
             //當前類型是表格内的拖拽,如果是同一天内的表格拖拽到空床位則先刪除原先排版,后在將排班弄到空床位
1810
             //當前類型是表格内的拖拽,如果是同一天内的表格拖拽到空床位則先刪除原先排版,后在將排班弄到空床位
1793
             if(this.cur_drag_obj == 2){
1811
             if(this.cur_drag_obj == 2){
1794
-
1795
               if (this.cur_drag_info.schedule_week == weekday){
1812
               if (this.cur_drag_info.schedule_week == weekday){
1796
                 //删除原来的排班,新增一个新的排班
1813
                 //删除原来的排班,新增一个新的排班
1797
-
1798
                 let params={
1814
                 let params={
1799
                   template_id:this.template.id,
1815
                   template_id:this.template.id,
1800
                   week_type_one:this.cur_drag_info.schedule_week,
1816
                   week_type_one:this.cur_drag_info.schedule_week,
2611
         this.cur_drag_info.patient_name = info.name;
2627
         this.cur_drag_info.patient_name = info.name;
2612
         this.cur_drag_info.patient_id = info.pid;
2628
         this.cur_drag_info.patient_id = info.pid;
2613
         this.cur_drag_info.id = row.id;
2629
         this.cur_drag_info.id = row.id;
2614
-      }
2630
+      }else{
2631
+        this.cur_drag_obj = 2
2632
+        this.cur_drag_info.schedule_type ='';
2633
+        this.cur_drag_info.partition_id = '';
2634
+        this.cur_drag_info.schedule_week = '';
2635
+        this.cur_drag_info.mode_id = '';
2636
+        this.cur_drag_info.mode_name = '';
2637
+        this.cur_drag_info.patient_name = '';
2638
+        this.cur_drag_info.patient_id = 0;
2639
+        this.cur_drag_info.id = 0;
2615
 
2640
 
2616
-    },
2641
+      }
2642
+        
2643
+        console.log('this.cur_drag_info的数据',this.cur_drag_info);
2644
+      },
2617
     allowDrop(e) {
2645
     allowDrop(e) {
2618
       e.preventDefault();
2646
       e.preventDefault();
2619
     },
2647
     },
2732
       }
2760
       }
2733
       return "";
2761
       return "";
2734
     },
2762
     },
2735
-    // handleScroll: function() {
2736
-    //     var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
2737
-    //     console.log(scrollTop)
2738
-    //     if (scrollTop >= 150) {
2739
-    //         this.fixed_style = "background-color: red; position: fixed; top: 0px; left: 190px; right: 150px; z-index: 99;"
2740
-    //     } else {
2741
-    //         this.fixed_style = ""
2742
-    //     }
2743
-    // },
2763
+    
2744
     makeDeviceNumbers: function (device_numbers) {
2764
     makeDeviceNumbers: function (device_numbers) {
2745
       this.all_zones = [];
2765
       this.all_zones = [];
2746
       this.devices = [];
2766
       this.devices = [];
2827
 
2847
 
2828
           // this.getSchedules();
2848
           // this.getSchedules();
2829
           this.all_template = response.data.data.items
2849
           this.all_template = response.data.data.items
2850
+          console.log('替换数据',response.data.data);
2830
           this.$emit("setTemplate",response.data.data.items)
2851
           this.$emit("setTemplate",response.data.data.items)
2831
           if(this.active_name == 'first'){
2852
           if(this.active_name == 'first'){
2832
             this.GetTemplate(response.data.data.items[0])
2853
             this.GetTemplate(response.data.data.items[0])
3762
       this.$nextTick(() => {
3783
       this.$nextTick(() => {
3763
         this.$refs.table.doLayout();
3784
         this.$refs.table.doLayout();
3764
       });
3785
       });
3765
-      if(this.$store.getters.xt_user.template_info.org_id == 9671 || this.$store.getters.xt_user.template_info.org_id == 0 || this.$store.getters.xt_user.template_info.org_id == 3877 || this.$store.getters.xt_user.template_info.org_id == 10340){
3786
+      // if(this.$store.getters.xt_user.template_info.org_id == 9671 || this.$store.getters.xt_user.template_info.org_id == 0 || this.$store.getters.xt_user.template_info.org_id == 3877 || this.$store.getters.xt_user.template_info.org_id == 10340){
3766
           //表格某列全部数据
3787
           //表格某列全部数据
3767
         var Mon_M = []
3788
         var Mon_M = []
3768
         var Mon_A = []
3789
         var Mon_A = []
4373
           result.push(str);
4394
           result.push(str);
4374
       }
4395
       }
4375
       sums[22]="总人数:"+ sums[22] +"\n"+result
4396
       sums[22]="总人数:"+ sums[22] +"\n"+result
4376
-      }
4397
+      // }
4377
 
4398
 
4378
       return sums;
4399
       return sums;
4379
     },
4400
     },
4380
-    // 右侧表格的回调
4401
+    // 右侧表格的回调
4381
     cellClass({row,column, rowIndex, columnIndex}){
4402
     cellClass({row,column, rowIndex, columnIndex}){
4382
       // console.log('cellClass数据',row);
4403
       // console.log('cellClass数据',row);
4383
       if(columnIndex==1&&row.zone.type==2){
4404
       if(columnIndex==1&&row.zone.type==2){
4393
           }
4414
           }
4394
       }
4415
       }
4395
     },
4416
     },
4417
+    // 右侧表格的行回调
4396
     rowClass({row,column, rowIndex, columnIndex}){
4418
     rowClass({row,column, rowIndex, columnIndex}){
4397
       if (row.zone.type == 1) {
4419
       if (row.zone.type == 1) {
4398
         return "table-row-new-class schedule-table-row ";
4420
         return "table-row-new-class schedule-table-row ";
4406
         return 'highlight';
4428
         return 'highlight';
4407
       }
4429
       }
4408
     },
4430
     },
4431
+    // 左侧表格的透析回调
4409
     modeclass({row,column, rowIndex, columnIndex}){
4432
     modeclass({row,column, rowIndex, columnIndex}){
4410
       if(this.cur_info.mode_id == row.id){
4433
       if(this.cur_info.mode_id == row.id){
4411
         return 'highlight';
4434
         return 'highlight';