|
@@ -12,6 +12,7 @@
|
12
|
12
|
<td colspan="3">周五({{ weekTitle[4] }})</td>
|
13
|
13
|
<td colspan="3">周六({{ weekTitle[5] }})</td>
|
14
|
14
|
<td colspan="3">周日({{ weekTitle[6] }})</td>
|
|
15
|
+ <td colspan="3">总数</td>
|
15
|
16
|
</tr>
|
16
|
17
|
<tr>
|
17
|
18
|
<td>上午</td>
|
|
@@ -165,6 +166,7 @@
|
165
|
166
|
<div v-if="item.Sun_N.mode_name != 'HD'">{{ item.Sun_N.mode_name }}</div>
|
166
|
167
|
</span>
|
167
|
168
|
</td>
|
|
169
|
+ <td>{{item.total}}</td>
|
168
|
170
|
</tr>
|
169
|
171
|
</table>
|
170
|
172
|
</div>
|
|
@@ -173,7 +175,7 @@
|
173
|
175
|
|
174
|
176
|
|
175
|
177
|
<script>
|
176
|
|
-import {getSchedules,getWeekPanels} from "@/api/schedule";
|
|
178
|
+import {getSchedulesOne,getWeekPanelsOne,getPatientSheduleCount,getAllZones} from "@/api/schedule";
|
177
|
179
|
import print from 'print-js'
|
178
|
180
|
export default {
|
179
|
181
|
props:{
|
|
@@ -191,33 +193,65 @@ export default {
|
191
|
193
|
weekTitle:[],
|
192
|
194
|
scheduleZoneRow: [],
|
193
|
195
|
partitions: {},
|
|
196
|
+ theWeek: {
|
|
197
|
+ lastWeek: 0,
|
|
198
|
+ thisWeek: 0,
|
|
199
|
+ nextWeek: 0,
|
|
200
|
+ nextTwoWeek: 0
|
|
201
|
+ },
|
|
202
|
+ scheduleCountList:[],
|
|
203
|
+ total:0,
|
|
204
|
+ zones:[],
|
|
205
|
+ zoneIdList:[],
|
|
206
|
+ strArr:""
|
194
|
207
|
}
|
195
|
208
|
},
|
196
|
209
|
created(){
|
|
210
|
+ this.getAllZones()
|
197
|
211
|
this.modeOptions = this.$store.getters.treatment_mode;
|
198
|
|
- this.getWeekPanels()
|
|
212
|
+ this.partition_id = this.$route.query.partition_id
|
|
213
|
+
|
199
|
214
|
|
200
|
215
|
},
|
201
|
216
|
methods:{
|
|
217
|
+ getAllZones(){
|
|
218
|
+ getAllZones().then(response=>{
|
|
219
|
+ if(response.data.state == 1){
|
|
220
|
+ var zones = response.data.data.zones
|
|
221
|
+ for(let i=0;i<zones.length;i++){
|
|
222
|
+ this.zoneIdList.push(zones[i].id)
|
|
223
|
+ }
|
|
224
|
+ this.zones.push(...zones)
|
|
225
|
+ var strArr = this.zoneIdList.join(",")
|
|
226
|
+
|
|
227
|
+ this.strArr = strArr
|
|
228
|
+ this.getWeekPanels()
|
|
229
|
+ //统计患者排班数量
|
|
230
|
+ this.getPatientSheduleCount()
|
|
231
|
+ }
|
|
232
|
+ })
|
|
233
|
+ },
|
202
|
234
|
getWeekPanels() {
|
203
|
|
- // this.scheduleZoneRow = []
|
204
|
|
- // this.scheduleZone = []
|
205
|
|
- getWeekPanels(1,this.partition_id).then(response => {
|
|
235
|
+ this.scheduleZone = []
|
|
236
|
+ var partionStr = this.partition_id
|
|
237
|
+ var arr = this.zoneIdList.join(',')
|
|
238
|
+ var str = ""
|
|
239
|
+ if(partionStr == 0){
|
|
240
|
+ str = arr
|
|
241
|
+ }
|
|
242
|
+ if(partionStr != 0){
|
|
243
|
+ str = partionStr
|
|
244
|
+ }
|
|
245
|
+ getWeekPanelsOne(1,str).then(response => {
|
206
|
246
|
if (response.data.state == 0) {
|
207
|
247
|
return false
|
208
|
248
|
}
|
209
|
249
|
var partitions = response.data.data.partitions
|
210
|
250
|
console.log("分区",partitions)
|
211
|
|
- // this.theWeek.thisWeek = response.data.data.theWeek
|
212
|
|
- // this.theWeek.lastWeek = this.theWeek.thisWeek - 1
|
213
|
|
- // this.theWeek.nextWeek = this.theWeek.thisWeek + 1
|
214
|
|
- // this.theWeek.nextTwoWeek = this.theWeek.thisWeek + 2
|
215
|
|
- // 在控制变量改变的时候进行 强制渲染更新
|
216
|
|
- // let childrenRefs = this.$refs.elTabs.$children
|
217
|
|
- // this.$nextTick(() => {
|
218
|
|
- // childrenRefs.forEach(child => child.$forceUpdate())
|
219
|
|
- // })
|
220
|
|
-
|
|
251
|
+ this.theWeek.thisWeek = response.data.data.theWeek
|
|
252
|
+ this.theWeek.lastWeek = this.theWeek.thisWeek - 1
|
|
253
|
+ this.theWeek.nextWeek = this.theWeek.thisWeek + 1
|
|
254
|
+ this.theWeek.nextTwoWeek = this.theWeek.thisWeek + 2
|
221
|
255
|
var that = this
|
222
|
256
|
if (partitions.length > 0) {
|
223
|
257
|
partitions.forEach(function(partition) {
|
|
@@ -391,20 +425,39 @@ export default {
|
391
|
425
|
})
|
392
|
426
|
},
|
393
|
427
|
getSchedules() {
|
|
428
|
+ var theType = 2;
|
|
429
|
+ if(this.$route.query.weekTime == "lastWeek"){
|
|
430
|
+ theType = 1
|
|
431
|
+ }
|
|
432
|
+ if(this.$route.query.weekTime == "thisWeek"){
|
|
433
|
+ theType = 2
|
|
434
|
+ }
|
|
435
|
+ if(this.$route.query.weekTime == "nextWeek"){
|
|
436
|
+ theType = 3
|
|
437
|
+ }
|
|
438
|
+ if(this.$route.query.weekTime == "nextTwoWeek"){
|
|
439
|
+ theType = 4
|
|
440
|
+ }
|
|
441
|
+ var partionStr = this.partition_id
|
|
442
|
+ var arr = this.zoneIdList.join(',')
|
|
443
|
+ var str = ""
|
|
444
|
+ if(partionStr == 0){
|
|
445
|
+ str = arr
|
|
446
|
+ }
|
|
447
|
+ if(partionStr != 0){
|
|
448
|
+ str = partionStr
|
|
449
|
+ }
|
394
|
450
|
const params = {
|
395
|
|
- weekTime:this.theType,
|
396
|
|
- partition_id:this.partition_id,
|
|
451
|
+ weekTime:theType,
|
|
452
|
+ patitionid:str,
|
397
|
453
|
schedule_type:this.schedule_type,
|
398
|
454
|
}
|
399
|
|
- getSchedules(params).then(response => {
|
|
455
|
+ getSchedulesOne(params).then(response => {
|
400
|
456
|
if (response.data.state == 1) {
|
401
|
457
|
this.weekTitle = response.data.data.weekTitle;
|
402
|
458
|
this.weekDays = response.data.data.days;
|
403
|
459
|
this.toDay = response.data.data.today;
|
404
|
460
|
var theSchedules = response.data.data.schdules;
|
405
|
|
-
|
406
|
|
-
|
407
|
|
-
|
408
|
461
|
var that = this;
|
409
|
462
|
that.scheduleZone.forEach(function(zone, index) {
|
410
|
463
|
|
|
@@ -570,8 +623,149 @@ export default {
|
570
|
623
|
|
571
|
624
|
});
|
572
|
625
|
}
|
573
|
|
- console.log('that.scheduleZone',that.scheduleZone)
|
|
626
|
+
|
574
|
627
|
});
|
|
628
|
+ var newArr= [{"area":"总数","cut":0,"Fri_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Fri_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Fri_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Mon_A":{mode_id:0,mode_name:"",patient:"",patient_id:"1"},"Mon_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Mon_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sat_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sat_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sat_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sun_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sun_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sun_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Thurs_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Thurs_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Thurs_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Tue_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Tue_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Tue_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Wed_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Wed_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Wed_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"jihao_id":"","total":"","zone_id":"","zone_type":""}]
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+ for(let i=0;i<newArr.length;i++){
|
|
632
|
+ for(let j=0;j<this.scheduleCountList.length;j++){
|
|
633
|
+ newArr[i].cut = this.total
|
|
634
|
+ //礼拜一上午
|
|
635
|
+ if(this.scheduleCountList[j].schedule_week == 1 && this.scheduleCountList[j].schedule_type == 1){
|
|
636
|
+
|
|
637
|
+ newArr[i].Mon_M.patient = this.scheduleCountList[j].Count
|
|
638
|
+ }
|
|
639
|
+ //礼拜一下午
|
|
640
|
+ if(this.scheduleCountList[j].schedule_week == 1 && this.scheduleCountList[j].schedule_type == 2){
|
|
641
|
+
|
|
642
|
+ newArr[i].Mon_A.patient = this.scheduleCountList[j].Count
|
|
643
|
+ }
|
|
644
|
+
|
|
645
|
+ //礼拜一晚上
|
|
646
|
+ if(this.scheduleCountList[j].schedule_week == 1 && this.scheduleCountList[j].schedule_type == 3){
|
|
647
|
+
|
|
648
|
+ newArr[i].Mon_N.patient = this.scheduleCountList[j].Count
|
|
649
|
+ }
|
|
650
|
+
|
|
651
|
+ //礼拜二上午
|
|
652
|
+ if(this.scheduleCountList[j].schedule_week == 2 && this.scheduleCountList[j].schedule_type == 1){
|
|
653
|
+
|
|
654
|
+ newArr[i].Tue_M.patient = this.scheduleCountList[j].Count
|
|
655
|
+ }
|
|
656
|
+ //礼拜二下午
|
|
657
|
+ if(this.scheduleCountList[j].schedule_week == 2 && this.scheduleCountList[j].schedule_type == 2){
|
|
658
|
+
|
|
659
|
+ newArr[i].Tue_A.patient = this.scheduleCountList[j].Count
|
|
660
|
+ }
|
|
661
|
+
|
|
662
|
+ //礼拜二晚上
|
|
663
|
+ if(this.scheduleCountList[j].schedule_week == 2 && this.scheduleCountList[j].schedule_type == 3){
|
|
664
|
+
|
|
665
|
+ newArr[i].Tue_N.patient = this.scheduleCountList[j].Count
|
|
666
|
+ }
|
|
667
|
+
|
|
668
|
+ //礼拜三上午
|
|
669
|
+ if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 1){
|
|
670
|
+
|
|
671
|
+ newArr[i].Wed_M.patient = this.scheduleCountList[j].Count
|
|
672
|
+ }
|
|
673
|
+
|
|
674
|
+ //礼拜三下午
|
|
675
|
+ if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 2){
|
|
676
|
+
|
|
677
|
+ newArr[i].Wed_A.patient = this.scheduleCountList[j].Count
|
|
678
|
+ }
|
|
679
|
+
|
|
680
|
+ //礼拜三晚上
|
|
681
|
+ if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 2){
|
|
682
|
+
|
|
683
|
+ newArr[i].Wed_N.patient = this.scheduleCountList[j].Count
|
|
684
|
+ }
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
|
|
688
|
+ //礼拜四上午
|
|
689
|
+ if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 1){
|
|
690
|
+
|
|
691
|
+ newArr[i].Thurs_A.patient = this.scheduleCountList[j].Count
|
|
692
|
+ }
|
|
693
|
+
|
|
694
|
+ //礼拜四下午
|
|
695
|
+ if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 2){
|
|
696
|
+
|
|
697
|
+ newArr[i].Thurs_M.patient = this.scheduleCountList[j].Count
|
|
698
|
+ }
|
|
699
|
+
|
|
700
|
+ //礼拜四晚上
|
|
701
|
+ if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 2){
|
|
702
|
+
|
|
703
|
+ newArr[i].Thurs_N.patient = this.scheduleCountList[j].Count
|
|
704
|
+ }
|
|
705
|
+
|
|
706
|
+
|
|
707
|
+ //礼拜五上午
|
|
708
|
+ if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 1){
|
|
709
|
+
|
|
710
|
+ newArr[i].Fri_A.patient = this.scheduleCountList[j].Count
|
|
711
|
+ }
|
|
712
|
+
|
|
713
|
+ //礼拜五下午
|
|
714
|
+ if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 2){
|
|
715
|
+
|
|
716
|
+ newArr[i].Fri_M.patient = this.scheduleCountList[j].Count
|
|
717
|
+ }
|
|
718
|
+
|
|
719
|
+ //礼拜五晚上
|
|
720
|
+ if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 2){
|
|
721
|
+
|
|
722
|
+ newArr[i].Fri_N.patient = this.scheduleCountList[j].Count
|
|
723
|
+ }
|
|
724
|
+
|
|
725
|
+
|
|
726
|
+ //礼拜六上午
|
|
727
|
+ if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 1){
|
|
728
|
+
|
|
729
|
+ newArr[i].Sat_A.patient = this.scheduleCountList[j].Count
|
|
730
|
+ }
|
|
731
|
+
|
|
732
|
+ //礼拜六下午
|
|
733
|
+ if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 2){
|
|
734
|
+
|
|
735
|
+ newArr[i].Sat_M.patient = this.scheduleCountList[j].Count
|
|
736
|
+ }
|
|
737
|
+
|
|
738
|
+ //礼拜六晚上
|
|
739
|
+ if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 2){
|
|
740
|
+
|
|
741
|
+ newArr[i].Sat_N.patient = this.scheduleCountList[j].Count
|
|
742
|
+ }
|
|
743
|
+
|
|
744
|
+
|
|
745
|
+ //礼拜日上午
|
|
746
|
+ if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 1){
|
|
747
|
+
|
|
748
|
+ newArr[i].Sun_A.patient = this.scheduleCountList[j].Count
|
|
749
|
+ }
|
|
750
|
+
|
|
751
|
+ //礼拜日下午
|
|
752
|
+ if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 2){
|
|
753
|
+
|
|
754
|
+ newArr[i].Sun_M.patient = this.scheduleCountList[j].Count
|
|
755
|
+ }
|
|
756
|
+
|
|
757
|
+ //礼拜日晚上
|
|
758
|
+ if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 2){
|
|
759
|
+
|
|
760
|
+ newArr[i].Sun_N.patient = this.scheduleCountList[j].Count
|
|
761
|
+ }
|
|
762
|
+
|
|
763
|
+
|
|
764
|
+ }
|
|
765
|
+ }
|
|
766
|
+ console.log("newArr222222222",newArr)
|
|
767
|
+ that.scheduleZone.push(...newArr)
|
|
768
|
+ console.log('总数据77777777777',that.scheduleZone)
|
575
|
769
|
|
576
|
770
|
} else {
|
577
|
771
|
this.$message.error("网络错误");
|
|
@@ -609,6 +803,46 @@ export default {
|
609
|
803
|
scanStyles: false
|
610
|
804
|
})
|
611
|
805
|
},
|
|
806
|
+ getPatientSheduleCount(){
|
|
807
|
+ var theType = 2;
|
|
808
|
+ if(this.$route.query.weekTime == "lastWeek"){
|
|
809
|
+ theType = 1
|
|
810
|
+ }
|
|
811
|
+ if(this.$route.query.weekTime == "thisWeek"){
|
|
812
|
+ theType = 2
|
|
813
|
+ }
|
|
814
|
+ if(this.$route.query.weekTime == "nextWeek"){
|
|
815
|
+ theType = 3
|
|
816
|
+ }
|
|
817
|
+ if(this.$route.query.weekTime == "nextTwoWeek"){
|
|
818
|
+ theType = 4
|
|
819
|
+ }
|
|
820
|
+ var partionStr = this.partition_id
|
|
821
|
+ var arr = this.zoneIdList.join(',')
|
|
822
|
+ var str = ""
|
|
823
|
+ if(partionStr == 0){
|
|
824
|
+ str = arr
|
|
825
|
+ }
|
|
826
|
+ if(partionStr != 0){
|
|
827
|
+ str = partionStr.join(',')
|
|
828
|
+ }
|
|
829
|
+ var params = {
|
|
830
|
+ weekTime:theType,
|
|
831
|
+ partition_id:str,
|
|
832
|
+
|
|
833
|
+ }
|
|
834
|
+ getPatientSheduleCount(params).then(response=>{
|
|
835
|
+ if(response.data.state == 1){
|
|
836
|
+ var list = response.data.data.list
|
|
837
|
+ console.log("list22222",list)
|
|
838
|
+
|
|
839
|
+ this.scheduleCountList = list
|
|
840
|
+ var total = response.data.data.total
|
|
841
|
+ console.log("totalw222",total)
|
|
842
|
+ this.total = total
|
|
843
|
+ }
|
|
844
|
+ })
|
|
845
|
+ }
|
612
|
846
|
}
|
613
|
847
|
}
|
614
|
848
|
</script>
|