Ver código fonte

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

csx 3 anos atrás
pai
commit
34a6f9191e
1 arquivos alterados com 143 adições e 117 exclusões
  1. 143 117
      src/xt_pages/workforce/components/tableWeeks.vue

+ 143 - 117
src/xt_pages/workforce/components/tableWeeks.vue Ver arquivo

@@ -88,62 +88,62 @@
88 88
                 </ul>
89 89
             </div>
90 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 148
         <el-table
149 149
                 :row-style="{ color: '#303133' }"
@@ -338,6 +338,8 @@
338 338
 </template>
339 339
 
340 340
 <script>
341
+  import { getDataConfig } from '@/utils/data'
342
+
341 343
   import {
342 344
     getAllZoneList,
343 345
     getRemindPrintList,
@@ -444,10 +446,14 @@
444 446
         return this.$store.getters.treatment_mode[mode_id] != undefined ? this.$store.getters.treatment_mode[mode_id].name : ''
445 447
 
446 448
       }, getDialysisLiquidName(id) {
449
+        let dialysate_formulation_options = getDataConfig(
450
+          'hemodialysis',
451
+          'dialysate_formulation'
452
+        )
447 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,48 +629,36 @@
623 629
       getDialysisLiquidDesc(list) {
624 630
         let modes = []
625 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 645
         modes = this.uniqueDialysisFormulation(modes)
637 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 653
         let desc = ''
657
-        for (let i = 0; i < modes.length; i++) {
654
+        for (let b = 0; b < modes.length; b++) {
658 655
           if (desc.length == 0) {
659
-            desc = modes[i].name + ': ' + modes[i].count + '次'
660
-
656
+            desc = modes[b].name + ': ' + modes[b].count + '次'
661 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 662
         return desc
669 663
 
670 664
       },
@@ -715,7 +709,8 @@
715 709
         }
716 710
 
717 711
         return desc
718
-      },
712
+      }
713
+      ,
719 714
       getPunctureNeedleDesc(list) {
720 715
 
721 716
         let punctureNeedle = []
@@ -760,10 +755,12 @@
760 755
         }
761 756
 
762 757
         return desc
763
-      },
758
+      }
759
+      ,
764 760
       getAnticoagulantDesc(list) {
765 761
 
766
-      },
762
+      }
763
+      ,
767 764
       getEPODesc(list) {
768 765
         let EPO = []
769 766
         for (let b = 0; b < list.length; b++) {
@@ -806,24 +803,28 @@
806 803
 
807 804
         return desc
808 805
 
809
-      },
806
+      }
807
+      ,
810 808
       printAction() {
811 809
         this.$router.push({
812 810
           path: '/schedule/remind/print?week_type=' + this.week_type + '&week_time=' + this.week_time + '&zone=' + this.zone
813 811
         })
814
-      },
812
+      }
813
+      ,
815 814
       signPrint() {
816 815
         this.$router.push({
817 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 820
       compare(property) {
821 821
         return function(a, b) {
822 822
           var value1 = a[property]
823 823
           var value2 = b[property]
824 824
           return value1 - value2
825 825
         }
826
-      },
826
+      }
827
+      ,
827 828
       getScheduleWeekDay() {
828 829
 
829 830
         const params = {
@@ -848,19 +849,28 @@
848 849
             return false
849 850
           }
850 851
         })
851
-      }, uniqueZone(arr) {
852
+      }
853
+      ,
854
+      uniqueZone(arr) {
852 855
         const res = new Map()
853 856
         return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1))
854
-      }, uniqueMode(arr) {
857
+      }
858
+      ,
859
+      uniqueMode(arr) {
855 860
         const res = new Map()
856 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 865
         const res = new Map()
859 866
         return arr.filter((arr) => !res.has(arr.name) && res.set(arr.name, 1))
860
-      }, uniqueDialysisFormulation(arr) {
867
+      }
868
+      ,
869
+      uniqueDialysisFormulation(arr) {
861 870
         const res = new Map()
862 871
         return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1))
863
-      },
872
+      }
873
+      ,
864 874
 
865 875
       getScheduleList() {
866 876
         const params = {
@@ -970,7 +980,8 @@
970 980
 
971 981
           }
972 982
         })
973
-      },
983
+      }
984
+      ,
974 985
 
975 986
       weekType(weekTime) {
976 987
         var theType = 2
@@ -992,7 +1003,8 @@
992 1003
             break
993 1004
         }
994 1005
         return theType
995
-      },
1006
+      }
1007
+      ,
996 1008
       weekPath(week) {
997 1009
         var weekArr = {
998 1010
           1: 'Monday',
@@ -1007,24 +1019,29 @@
1007 1019
           return ''
1008 1020
         }
1009 1021
         return weekArr[week]
1010
-      },
1022
+      }
1023
+      ,
1011 1024
       selectWeekType(type) {
1012 1025
         this.week_type = type
1013 1026
         this.getScheduleList()
1014
-      },
1027
+      }
1028
+      ,
1015 1029
 
1016 1030
       selectWeekTime(type) {
1017 1031
         this.week_time = type
1018 1032
         this.getScheduleList()
1019
-      },
1033
+      }
1034
+      ,
1020 1035
       selectPreStatus(type) {
1021 1036
         this.pre_status = type
1022 1037
         this.getScheduleList()
1023
-      },
1038
+      }
1039
+      ,
1024 1040
       selectZoneList(type) {
1025 1041
         this.zone = type
1026 1042
         this.getScheduleList()
1027
-      },
1043
+      }
1044
+      ,
1028 1045
       getSchedulesType: function(type) {
1029 1046
         let type_name = ''
1030 1047
         switch (type) {
@@ -1039,7 +1056,8 @@
1039 1056
             break
1040 1057
         }
1041 1058
         return type_name
1042
-      },
1059
+      }
1060
+      ,
1043 1061
       getAdvice: function(doctor_advice) {
1044 1062
 
1045 1063
         if (doctor_advice.length > 0) {
@@ -1121,7 +1139,8 @@
1121 1139
         } else {
1122 1140
           return ''
1123 1141
         }
1124
-      },
1142
+      }
1143
+      ,
1125 1144
       getAdviceOne: function(doctor_advice) {
1126 1145
 
1127 1146
         if (doctor_advice.length > 0) {
@@ -1169,12 +1188,14 @@
1169 1188
         } else {
1170 1189
           return ''
1171 1190
         }
1172
-      },
1191
+      }
1192
+      ,
1173 1193
       printActionSetting() {
1174 1194
         this.getlist()
1175 1195
         this.dialogVisible = true
1176 1196
 
1177
-      },
1197
+      }
1198
+      ,
1178 1199
       saveRemindPrint() {
1179 1200
         console.log('455555555', this.perfusion_apparatus)
1180 1201
 
@@ -1277,7 +1298,8 @@
1277 1298
             this.getlist()
1278 1299
           }
1279 1300
         })
1280
-      },
1301
+      }
1302
+      ,
1281 1303
       getlist() {
1282 1304
         getRemindPrintList().then(response => {
1283 1305
           if (response.data.state == 1) {
@@ -1359,7 +1381,8 @@
1359 1381
             this.form.id = list.id
1360 1382
           }
1361 1383
         })
1362
-      },
1384
+      }
1385
+      ,
1363 1386
       getAllZoneList() {
1364 1387
         getAllZoneList().then(response => {
1365 1388
           if (response.data.state == 1) {
@@ -1368,7 +1391,8 @@
1368 1391
 
1369 1392
           }
1370 1393
         })
1371
-      },
1394
+      }
1395
+      ,
1372 1396
       getDialysisDialyszerPerfusion(patient_id) {
1373 1397
         var name = ''
1374 1398
         for (let i = 0; i < this.scheduleData.length; i++) {
@@ -1380,7 +1404,8 @@
1380 1404
           }
1381 1405
         }
1382 1406
         return name
1383
-      },
1407
+      }
1408
+      ,
1384 1409
       getDialysisDialyszerPerfusionOne(patient_id) {
1385 1410
         var name = ''
1386 1411
         for (let i = 0; i < this.scheduleData.length; i++) {
@@ -1398,7 +1423,8 @@
1398 1423
     },
1399 1424
     components: {
1400 1425
       WeekItem
1401
-    },
1426
+    }
1427
+    ,
1402 1428
     created() {
1403 1429
       this.modeOptions = this.$store.getters.treatment_mode
1404 1430
       this.anticoagulants_confit = this.$store.getters.anticoagulants_confit