Browse Source

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

csx 3 years ago
parent
commit
34a6f9191e
1 changed files with 143 additions and 117 deletions
  1. 143 117
      src/xt_pages/workforce/components/tableWeeks.vue

+ 143 - 117
src/xt_pages/workforce/components/tableWeeks.vue View File

88
                 </ul>
88
                 </ul>
89
             </div>
89
             </div>
90
         </div>
90
         </div>
91
-        <!--<el-table-->
92
-                <!--:row-style="{ color: '#303133' }"-->
93
-                <!--:data="summarySchData"-->
94
-                <!--border-->
95
-                <!--:header-cell-style="{-->
96
-        <!--backgroundColor: 'rgb(245, 247, 250)',-->
97
-        <!--color: '#606266'-->
98
-      <!--}"-->
99
-                <!--style="width: 100%"-->
100
-        <!--&gt;-->
101
-
102
-            <!--<el-table-column label="分区" min-width="70" align="center">-->
103
-                <!--<template slot-scope="scope">-->
104
-                    <!--{{ scope.row.zone.name }}-->
105
-                <!--</template>-->
106
-            <!--</el-table-column>-->
107
-
108
-            <!--<el-table-column label="透析模式" min-width="100" align="center">-->
109
-                <!--<template slot-scope="scope">-->
110
-                    <!--{{getModeDesc(scope.row.list)}}-->
111
-                <!--</template>-->
112
-            <!--</el-table-column>-->
113
-            <!--<el-table-column label="透析液" min-width="100" align="center">-->
114
-                <!--<template slot-scope="scope">-->
115
-                    <!--{{getDialysisLiquidDesc(scope.row.list)}}-->
116
-                <!--</template>-->
117
-            <!--</el-table-column>-->
118
-
119
-            <!--<el-table-column label="透析管路" min-width="100" align="center">-->
120
-                <!--<template slot-scope="scope">-->
121
-                    <!--{{getDialysisPipeDesc(scope.row.list)}}-->
122
-                <!--</template>-->
123
-            <!--</el-table-column>-->
124
-
125
-            <!--<el-table-column label="穿刺针" min-width="100" align="center">-->
126
-                <!--<template slot-scope="scope">-->
127
-                    <!--{{getPunctureNeedleDesc(scope.row.list)}}-->
128
-                <!--</template>-->
129
-            <!--</el-table-column>-->
130
-
131
-
132
-            <!--<el-table-column label="抗凝剂" min-width="100" align="center">-->
133
-                <!--<template slot-scope="scope">-->
134
-                    <!--{{getAnticoagulantDesc(scope.row.list)}}-->
135
-                <!--</template>-->
136
-            <!--</el-table-column>-->
137
-
138
-
139
-            <!--<el-table-column label="促红素" min-width="100" align="center">-->
140
-                <!--<template slot-scope="scope">-->
141
-                    <!--{{getEPODesc(scope.row.list)}}-->
142
-                <!--</template>-->
143
-            <!--</el-table-column>-->
144
-
145
-
146
-        <!--</el-table>-->
91
+        <el-table
92
+                :row-style="{ color: '#303133' }"
93
+                :data="summarySchData"
94
+                border
95
+                :header-cell-style="{
96
+        backgroundColor: 'rgb(245, 247, 250)',
97
+        color: '#606266'
98
+      }"
99
+                style="width: 100%"
100
+        >
101
+
102
+            <el-table-column label="分区" min-width="70" align="center">
103
+                <template slot-scope="scope">
104
+                    {{ scope.row.zone.name }}
105
+                </template>
106
+            </el-table-column>
107
+
108
+            <el-table-column label="透析模式" min-width="100" align="center">
109
+                <template slot-scope="scope">
110
+                    {{getModeDesc(scope.row.list)}}
111
+                </template>
112
+            </el-table-column>
113
+            <el-table-column label="透析液" min-width="100" align="center">
114
+                <template slot-scope="scope">
115
+                    {{getDialysisLiquidDesc(scope.row.list)}}
116
+                </template>
117
+            </el-table-column>
118
+
119
+            <el-table-column label="透析管路" min-width="100" align="center">
120
+                <template slot-scope="scope">
121
+                    {{getDialysisPipeDesc(scope.row.list)}}
122
+                </template>
123
+            </el-table-column>
124
+
125
+            <el-table-column label="穿刺针" min-width="100" align="center">
126
+                <template slot-scope="scope">
127
+                    {{getPunctureNeedleDesc(scope.row.list)}}
128
+                </template>
129
+            </el-table-column>
130
+
131
+
132
+            <el-table-column label="抗凝剂" min-width="100" align="center">
133
+                <template slot-scope="scope">
134
+                    {{getAnticoagulantDesc(scope.row.list)}}
135
+                </template>
136
+            </el-table-column>
137
+
138
+
139
+            <el-table-column label="促红素" min-width="100" align="center">
140
+                <template slot-scope="scope">
141
+                    {{getEPODesc(scope.row.list)}}
142
+                </template>
143
+            </el-table-column>
144
+
145
+
146
+        </el-table>
147
 
147
 
148
         <el-table
148
         <el-table
149
                 :row-style="{ color: '#303133' }"
149
                 :row-style="{ color: '#303133' }"
338
 </template>
338
 </template>
339
 
339
 
340
 <script>
340
 <script>
341
+  import { getDataConfig } from '@/utils/data'
342
+
341
   import {
343
   import {
342
     getAllZoneList,
344
     getAllZoneList,
343
     getRemindPrintList,
345
     getRemindPrintList,
444
         return this.$store.getters.treatment_mode[mode_id] != undefined ? this.$store.getters.treatment_mode[mode_id].name : ''
446
         return this.$store.getters.treatment_mode[mode_id] != undefined ? this.$store.getters.treatment_mode[mode_id].name : ''
445
 
447
 
446
       }, getDialysisLiquidName(id) {
448
       }, getDialysisLiquidName(id) {
449
+        let dialysate_formulation_options = getDataConfig(
450
+          'hemodialysis',
451
+          'dialysate_formulation'
452
+        )
447
         // return this.$store.getters.dialysate_formulation[mode_id] != undefined ? this.$store.getters.treatment_mode[mode_id].name: ""
453
         // return this.$store.getters.dialysate_formulation[mode_id] != undefined ? this.$store.getters.treatment_mode[mode_id].name: ""
448
-        for (let i = 0; i < this.$store.getters.dialysate_formulation.length; i++) {
449
-          if (id == this.$store.getters.dialysate_formulation[i].id && (this.$store.getters.dialysate_formulation[i].id == 2 || this.$store.getters.dialysate_formulation[i].id == 3)) {
450
-            return this.$store.getters.dialysate_formulation[i].name
454
+        for (let i = 0; i < dialysate_formulation_options.length; i++) {
455
+          if (id == dialysate_formulation_options[i].id) {
456
+            return dialysate_formulation_options[i].name
451
           }
457
           }
452
         }
458
         }
453
 
459
 
623
       getDialysisLiquidDesc(list) {
629
       getDialysisLiquidDesc(list) {
624
         let modes = []
630
         let modes = []
625
         for (let b = 0; b < list.length; b++) {
631
         for (let b = 0; b < list.length; b++) {
626
-          if (list[b].dialysissolution.dialysate_formulation == 2 || list[b].dialysissolution.dialysate_formulation == 3) {
627
-            let obj = {
628
-              id: list[b].dialysissolution.dialysate_formulation,
629
-              name: this.getDialysisLiquidName(list[b].dialysissolution.dialysate_formulation),
630
-              count: 0
632
+          let obj = {
633
+            id: list[b].dialysissolution.dialysate_formulation,
634
+            name: this.getDialysisLiquidName(list[b].dialysissolution.dialysate_formulation),
635
+            count: 0
631
 
636
 
632
-            }
633
-            modes.push(obj)
634
           }
637
           }
638
+          modes.push(obj)
639
+
635
         }
640
         }
641
+        let dialysate_formulation_options = getDataConfig(
642
+          'hemodialysis',
643
+          'dialysate_formulation'
644
+        )
636
         modes = this.uniqueDialysisFormulation(modes)
645
         modes = this.uniqueDialysisFormulation(modes)
637
         for (let i = 0; i < list.length; i++) {
646
         for (let i = 0; i < list.length; i++) {
638
-          switch (list[i].dialysissolution.dialysate_formulation) {
639
-            case 2:
640
-              for (let b = 0; b < modes.length; b++) {
641
-                if (modes[b].id == list[i].dialysissolution.dialysate_formulation) {
642
-                  modes[b].count = modes[b].count + 1
643
-                }
644
-              }
645
-              break
646
-            case 3:
647
-              for (let b = 0; b < modes.length; b++) {
648
-                if (modes[b].id == list[i].dialysissolution.dialysate_formulation) {
649
-                  modes[b].count = modes[b].count + 1
650
-                }
651
-              }
652
-              break
647
+          for (let c = 0; c < modes.length; c++) {
648
+            if (modes[c].id == list[i].dialysissolution.dialysate_formulation) {
649
+              modes[c].count = modes[c].count + 1
650
+            }
653
           }
651
           }
654
         }
652
         }
655
-
656
         let desc = ''
653
         let desc = ''
657
-        for (let i = 0; i < modes.length; i++) {
654
+        for (let b = 0; b < modes.length; b++) {
658
           if (desc.length == 0) {
655
           if (desc.length == 0) {
659
-            desc = modes[i].name + ': ' + modes[i].count + '次'
660
-
656
+            desc = modes[b].name + ': ' + modes[b].count + '次'
661
           } else {
657
           } else {
662
-
663
-            desc = desc + ' \n\r ' + modes[i].name + ': ' + modes[i].count + '次'
664
-
658
+            desc = desc + ' \n\r ' + modes[b].name + ': ' + modes[b].count + '次'
665
           }
659
           }
666
-
667
         }
660
         }
661
+
668
         return desc
662
         return desc
669
 
663
 
670
       },
664
       },
715
         }
709
         }
716
 
710
 
717
         return desc
711
         return desc
718
-      },
712
+      }
713
+      ,
719
       getPunctureNeedleDesc(list) {
714
       getPunctureNeedleDesc(list) {
720
 
715
 
721
         let punctureNeedle = []
716
         let punctureNeedle = []
760
         }
755
         }
761
 
756
 
762
         return desc
757
         return desc
763
-      },
758
+      }
759
+      ,
764
       getAnticoagulantDesc(list) {
760
       getAnticoagulantDesc(list) {
765
 
761
 
766
-      },
762
+      }
763
+      ,
767
       getEPODesc(list) {
764
       getEPODesc(list) {
768
         let EPO = []
765
         let EPO = []
769
         for (let b = 0; b < list.length; b++) {
766
         for (let b = 0; b < list.length; b++) {
806
 
803
 
807
         return desc
804
         return desc
808
 
805
 
809
-      },
806
+      }
807
+      ,
810
       printAction() {
808
       printAction() {
811
         this.$router.push({
809
         this.$router.push({
812
           path: '/schedule/remind/print?week_type=' + this.week_type + '&week_time=' + this.week_time + '&zone=' + this.zone
810
           path: '/schedule/remind/print?week_type=' + this.week_type + '&week_time=' + this.week_time + '&zone=' + this.zone
813
         })
811
         })
814
-      },
812
+      }
813
+      ,
815
       signPrint() {
814
       signPrint() {
816
         this.$router.push({
815
         this.$router.push({
817
           path: '/schedule/remind/print/setting?week_type=' + this.week_type + '&week_time=' + this.week_time + '&zone=' + this.zone + '&prestatus=' + this.pre_status
816
           path: '/schedule/remind/print/setting?week_type=' + this.week_type + '&week_time=' + this.week_time + '&zone=' + this.zone + '&prestatus=' + this.pre_status
818
         })
817
         })
819
-      },
818
+      }
819
+      ,
820
       compare(property) {
820
       compare(property) {
821
         return function(a, b) {
821
         return function(a, b) {
822
           var value1 = a[property]
822
           var value1 = a[property]
823
           var value2 = b[property]
823
           var value2 = b[property]
824
           return value1 - value2
824
           return value1 - value2
825
         }
825
         }
826
-      },
826
+      }
827
+      ,
827
       getScheduleWeekDay() {
828
       getScheduleWeekDay() {
828
 
829
 
829
         const params = {
830
         const params = {
848
             return false
849
             return false
849
           }
850
           }
850
         })
851
         })
851
-      }, uniqueZone(arr) {
852
+      }
853
+      ,
854
+      uniqueZone(arr) {
852
         const res = new Map()
855
         const res = new Map()
853
         return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1))
856
         return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1))
854
-      }, uniqueMode(arr) {
857
+      }
858
+      ,
859
+      uniqueMode(arr) {
855
         const res = new Map()
860
         const res = new Map()
856
         return arr.filter((arr) => !res.has(arr.mode_id) && res.set(arr.mode_id, 1))
861
         return arr.filter((arr) => !res.has(arr.mode_id) && res.set(arr.mode_id, 1))
857
-      }, uniqueDialysisPipe(arr) {
862
+      }
863
+      ,
864
+      uniqueDialysisPipe(arr) {
858
         const res = new Map()
865
         const res = new Map()
859
         return arr.filter((arr) => !res.has(arr.name) && res.set(arr.name, 1))
866
         return arr.filter((arr) => !res.has(arr.name) && res.set(arr.name, 1))
860
-      }, uniqueDialysisFormulation(arr) {
867
+      }
868
+      ,
869
+      uniqueDialysisFormulation(arr) {
861
         const res = new Map()
870
         const res = new Map()
862
         return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1))
871
         return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1))
863
-      },
872
+      }
873
+      ,
864
 
874
 
865
       getScheduleList() {
875
       getScheduleList() {
866
         const params = {
876
         const params = {
970
 
980
 
971
           }
981
           }
972
         })
982
         })
973
-      },
983
+      }
984
+      ,
974
 
985
 
975
       weekType(weekTime) {
986
       weekType(weekTime) {
976
         var theType = 2
987
         var theType = 2
992
             break
1003
             break
993
         }
1004
         }
994
         return theType
1005
         return theType
995
-      },
1006
+      }
1007
+      ,
996
       weekPath(week) {
1008
       weekPath(week) {
997
         var weekArr = {
1009
         var weekArr = {
998
           1: 'Monday',
1010
           1: 'Monday',
1007
           return ''
1019
           return ''
1008
         }
1020
         }
1009
         return weekArr[week]
1021
         return weekArr[week]
1010
-      },
1022
+      }
1023
+      ,
1011
       selectWeekType(type) {
1024
       selectWeekType(type) {
1012
         this.week_type = type
1025
         this.week_type = type
1013
         this.getScheduleList()
1026
         this.getScheduleList()
1014
-      },
1027
+      }
1028
+      ,
1015
 
1029
 
1016
       selectWeekTime(type) {
1030
       selectWeekTime(type) {
1017
         this.week_time = type
1031
         this.week_time = type
1018
         this.getScheduleList()
1032
         this.getScheduleList()
1019
-      },
1033
+      }
1034
+      ,
1020
       selectPreStatus(type) {
1035
       selectPreStatus(type) {
1021
         this.pre_status = type
1036
         this.pre_status = type
1022
         this.getScheduleList()
1037
         this.getScheduleList()
1023
-      },
1038
+      }
1039
+      ,
1024
       selectZoneList(type) {
1040
       selectZoneList(type) {
1025
         this.zone = type
1041
         this.zone = type
1026
         this.getScheduleList()
1042
         this.getScheduleList()
1027
-      },
1043
+      }
1044
+      ,
1028
       getSchedulesType: function(type) {
1045
       getSchedulesType: function(type) {
1029
         let type_name = ''
1046
         let type_name = ''
1030
         switch (type) {
1047
         switch (type) {
1039
             break
1056
             break
1040
         }
1057
         }
1041
         return type_name
1058
         return type_name
1042
-      },
1059
+      }
1060
+      ,
1043
       getAdvice: function(doctor_advice) {
1061
       getAdvice: function(doctor_advice) {
1044
 
1062
 
1045
         if (doctor_advice.length > 0) {
1063
         if (doctor_advice.length > 0) {
1121
         } else {
1139
         } else {
1122
           return ''
1140
           return ''
1123
         }
1141
         }
1124
-      },
1142
+      }
1143
+      ,
1125
       getAdviceOne: function(doctor_advice) {
1144
       getAdviceOne: function(doctor_advice) {
1126
 
1145
 
1127
         if (doctor_advice.length > 0) {
1146
         if (doctor_advice.length > 0) {
1169
         } else {
1188
         } else {
1170
           return ''
1189
           return ''
1171
         }
1190
         }
1172
-      },
1191
+      }
1192
+      ,
1173
       printActionSetting() {
1193
       printActionSetting() {
1174
         this.getlist()
1194
         this.getlist()
1175
         this.dialogVisible = true
1195
         this.dialogVisible = true
1176
 
1196
 
1177
-      },
1197
+      }
1198
+      ,
1178
       saveRemindPrint() {
1199
       saveRemindPrint() {
1179
         console.log('455555555', this.perfusion_apparatus)
1200
         console.log('455555555', this.perfusion_apparatus)
1180
 
1201
 
1277
             this.getlist()
1298
             this.getlist()
1278
           }
1299
           }
1279
         })
1300
         })
1280
-      },
1301
+      }
1302
+      ,
1281
       getlist() {
1303
       getlist() {
1282
         getRemindPrintList().then(response => {
1304
         getRemindPrintList().then(response => {
1283
           if (response.data.state == 1) {
1305
           if (response.data.state == 1) {
1359
             this.form.id = list.id
1381
             this.form.id = list.id
1360
           }
1382
           }
1361
         })
1383
         })
1362
-      },
1384
+      }
1385
+      ,
1363
       getAllZoneList() {
1386
       getAllZoneList() {
1364
         getAllZoneList().then(response => {
1387
         getAllZoneList().then(response => {
1365
           if (response.data.state == 1) {
1388
           if (response.data.state == 1) {
1368
 
1391
 
1369
           }
1392
           }
1370
         })
1393
         })
1371
-      },
1394
+      }
1395
+      ,
1372
       getDialysisDialyszerPerfusion(patient_id) {
1396
       getDialysisDialyszerPerfusion(patient_id) {
1373
         var name = ''
1397
         var name = ''
1374
         for (let i = 0; i < this.scheduleData.length; i++) {
1398
         for (let i = 0; i < this.scheduleData.length; i++) {
1380
           }
1404
           }
1381
         }
1405
         }
1382
         return name
1406
         return name
1383
-      },
1407
+      }
1408
+      ,
1384
       getDialysisDialyszerPerfusionOne(patient_id) {
1409
       getDialysisDialyszerPerfusionOne(patient_id) {
1385
         var name = ''
1410
         var name = ''
1386
         for (let i = 0; i < this.scheduleData.length; i++) {
1411
         for (let i = 0; i < this.scheduleData.length; i++) {
1398
     },
1423
     },
1399
     components: {
1424
     components: {
1400
       WeekItem
1425
       WeekItem
1401
-    },
1426
+    }
1427
+    ,
1402
     created() {
1428
     created() {
1403
       this.modeOptions = this.$store.getters.treatment_mode
1429
       this.modeOptions = this.$store.getters.treatment_mode
1404
       this.anticoagulants_confit = this.$store.getters.anticoagulants_confit
1430
       this.anticoagulants_confit = this.$store.getters.anticoagulants_confit