|
@@ -69,7 +69,9 @@
|
69
|
69
|
<div class="tableTitle">统计表</div>
|
70
|
70
|
<div>
|
71
|
71
|
<el-button type="primary" @click="exportList">按透析记录导出</el-button>
|
72
|
|
- <el-button type="primary" @click="exportListOne">按排班导出</el-button>
|
|
72
|
+ <el-button type="primary" @click="exportListOne" v-if="org_id!=10558">按排班导出</el-button>
|
|
73
|
+
|
|
74
|
+ <el-button type="primary" @click="exportListTwo" v-if="org_id == 10558">按排班导出</el-button>
|
73
|
75
|
</div>
|
74
|
76
|
|
75
|
77
|
<el-table :data="DialysisData" style="width: 100%" border :row-style="{ color: '#303133' }"
|
|
@@ -147,6 +149,8 @@ export default {
|
147
|
149
|
patient_id:0,
|
148
|
150
|
modeIdCount:[],
|
149
|
151
|
scheduleCount:[],
|
|
152
|
+ scheduleList:[],
|
|
153
|
+ org_id:0,
|
150
|
154
|
};
|
151
|
155
|
},
|
152
|
156
|
methods: {
|
|
@@ -209,7 +213,40 @@ export default {
|
209
|
213
|
console.log("modeidcount=====",modeIdCount)
|
210
|
214
|
|
211
|
215
|
|
212
|
|
-
|
|
216
|
+ var scheduleList = response.data.data.scheduleList
|
|
217
|
+ console.log("scheduleList",scheduleList)
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+ if(scheduleList.length!=null && scheduleList.length>0){
|
|
221
|
+ let dataInfo = {}
|
|
222
|
+ scheduleList.forEach((item, index) => {
|
|
223
|
+ let { patient_id } = item
|
|
224
|
+ if (!dataInfo[patient_id]) {
|
|
225
|
+ dataInfo[patient_id] = {
|
|
226
|
+ patient_id,
|
|
227
|
+ name:item.name,
|
|
228
|
+ id_card_no:item.id_card_no,
|
|
229
|
+ dialysis_no:item.dialysis_no,
|
|
230
|
+ total_dialysis:item.total_dialysis,
|
|
231
|
+ user_sys_before_count:item.user_sys_before_count,
|
|
232
|
+ mode_id: []
|
|
233
|
+ }
|
|
234
|
+ }
|
|
235
|
+ })
|
|
236
|
+ let list = Object.values(dataInfo)
|
|
237
|
+ list.map(item => {
|
|
238
|
+ for (let i = 0; i < list.length; i++) {
|
|
239
|
+ if (item.patient_id === list[i].patient_id) {
|
|
240
|
+ item.mode_id.push(list[i].mode_id)
|
|
241
|
+ }
|
|
242
|
+ }
|
|
243
|
+ })
|
|
244
|
+
|
|
245
|
+ console.log("listowowowoowowowow",list)
|
|
246
|
+
|
|
247
|
+ this.scheduleList = []
|
|
248
|
+ this.scheduleList = list
|
|
249
|
+ }
|
213
|
250
|
|
214
|
251
|
for(let i=0;i<modeIdCount.length;i++){
|
215
|
252
|
if(modeIdCount[i].mode_id == 1){
|
|
@@ -438,7 +475,7 @@ export default {
|
438
|
475
|
}
|
439
|
476
|
}
|
440
|
477
|
})
|
441
|
|
- // console.log("list---",list)
|
|
478
|
+
|
442
|
479
|
this.DialysisData = list
|
443
|
480
|
}
|
444
|
481
|
})
|
|
@@ -746,6 +783,55 @@ export default {
|
746
|
783
|
})
|
747
|
784
|
},
|
748
|
785
|
|
|
786
|
+
|
|
787
|
+ exportListTwo(){
|
|
788
|
+ for(let i=0;i<this.scheduleList.length;i++){
|
|
789
|
+ this.scheduleList[i].index = i+1
|
|
790
|
+ this.scheduleList[i].HD = this.getScheduleHdModeIdCount(this.scheduleList[i].patient_id,"HD")
|
|
791
|
+ this.scheduleList[i].HDF = this.getScheduleHdModeIdCount(this.scheduleList[i].patient_id,"HDF")
|
|
792
|
+ this.scheduleList[i].HDHP = this.getScheduleHdModeIdCount(this.scheduleList[i].patient_id,"HD+HP")
|
|
793
|
+ this.scheduleList[i].HP = this.getScheduleHdModeIdCount(this.scheduleList[i].patient_id,"HP")
|
|
794
|
+ this.scheduleList[i].HF = this.getScheduleHdModeIdCount(this.scheduleList[i].patient_id,"HF")
|
|
795
|
+ this.scheduleList[i].SCUF = this.getScheduleHdModeIdCount(this.scheduleList[i].patient_id,"SCUF")
|
|
796
|
+ this.scheduleList[i].IUF = this.getScheduleHdModeIdCount(this.scheduleList[i].patient_id,"IUF")
|
|
797
|
+ this.scheduleList[i].HFHD = this.getScheduleHdModeIdCount(this.scheduleList[i].patient_id,"HFHD")
|
|
798
|
+ this.scheduleList[i].HFHDHP = this.getScheduleHdModeIdCount(this.scheduleList[i].patient_id,"HFHD+HP")
|
|
799
|
+ this.scheduleList[i].HDFHP = this.getScheduleHdModeIdCount(this.scheduleList[i].patient_id,"HDF+HP")
|
|
800
|
+ this.scheduleList[i].CRRT = this.getScheduleHdModeIdCount(this.scheduleList[i].patient_id,"CRRT")
|
|
801
|
+ this.scheduleList[i].OTR = this.getScheduleHdModeIdCount(this.scheduleList[i].patient_id,"腹水回输")
|
|
802
|
+
|
|
803
|
+ this.scheduleList[i].IUFHD = this.getScheduleHdModeIdCount(this.scheduleList[i].patient_id,"IUF+HD")
|
|
804
|
+ this.scheduleList[i].UF = this.getScheduleHdModeIdCount(this.scheduleList[i].patient_id,"UF")
|
|
805
|
+ this.scheduleList[i].HDPlus = this.getScheduleHdModeIdCount(this.scheduleList[i].patient_id,"HD+")
|
|
806
|
+ this.scheduleList[i].IHDF = this.getScheduleHdModeIdCount(this.scheduleList[i].patient_id,"I-HDF")
|
|
807
|
+ this.scheduleList[i].HDGT = this.getScheduleHdModeIdCount(this.scheduleList[i].patient_id,"HD高通")
|
|
808
|
+ this.scheduleList[i].CVVH = this.getScheduleHdModeIdCount(this.scheduleList[i].patient_id,"CVVH")
|
|
809
|
+ this.scheduleList[i].CVVHD = this.getScheduleHdModeIdCount(this.scheduleList[i].patient_id,"CVVHD")
|
|
810
|
+ this.scheduleList[i].CVVHDF = this.getScheduleHdModeIdCount(this.scheduleList[i].patient_id,"CVVHDF")
|
|
811
|
+ this.scheduleList[i].PE = this.getScheduleHdModeIdCount(this.scheduleList[i].patient_id,"PE")
|
|
812
|
+ this.scheduleList[i].XUEHP = this.getScheduleHdModeIdCount(this.scheduleList[i].patient_id,"血浆胆红素吸附+HP")
|
|
813
|
+ this.scheduleList[i].HPD = this.getScheduleHdModeIdCount(this.scheduleList[i].patient_id,"HPD")
|
|
814
|
+ this.scheduleList[i].HDP = this.getScheduleHdModeIdCount(this.scheduleList[i].patient_id,"HDP")
|
|
815
|
+
|
|
816
|
+ this.scheduleList[i].age = this.getAge(this.scheduleList[i].id_card_no)
|
|
817
|
+ this.scheduleList[i].total_count = this.getScheduleDialysisCount(this.scheduleList[i].patient_id)
|
|
818
|
+ }
|
|
819
|
+ console.log("hhh2323323232",this.scheduleList)
|
|
820
|
+ import('@/vendor/Export2Excel').then(excel => {
|
|
821
|
+ const tHeader = ['序号','姓名', '年龄', '透析号','HD','HDF','HD+HP','HP','HF','SCUF','IUF','HFHD','HFHD+HP','HFR','HDF+HP','CRRT','腹水回输','IUF+HD','UF','HD+','I-HDF','HD高通','CVVH','CVVHD','CVVHDF','PE','血浆胆红素吸附+HP','HPD','HDP','总数']
|
|
822
|
+ const filterVal = ['index','name', 'age', 'dialysis_no','HD','HDF','HDHP','HP','HF','SCUF','IUF','HFHD','HFHDHP','HFR','HDFHP','CRRT','OTR','IUF+HD','UF','HD+','I-HDF','HDGT','CVVH','CVVHD','CVVHDF','PE','XUEHP','HPD','HDP','total_count']
|
|
823
|
+
|
|
824
|
+ const data = this.formatJson(filterVal, this.scheduleList)
|
|
825
|
+
|
|
826
|
+ excel.export_json_to_excel({
|
|
827
|
+ header: tHeader,
|
|
828
|
+ data,
|
|
829
|
+ filename: '透析详情'
|
|
830
|
+ })
|
|
831
|
+ this.downloadLoading = false
|
|
832
|
+ })
|
|
833
|
+ },
|
|
834
|
+
|
749
|
835
|
formatJson(filterVal, jsonData) {
|
750
|
836
|
return jsonData.map(v =>
|
751
|
837
|
filterVal.map(j => {
|
|
@@ -793,6 +879,7 @@ export default {
|
793
|
879
|
|
794
|
880
|
},
|
795
|
881
|
created(){
|
|
882
|
+ this.org_id = this.$store.getters.xt_user.org.id
|
796
|
883
|
var nowDate = new Date();
|
797
|
884
|
var nowYear = nowDate.getFullYear();
|
798
|
885
|
var nowMonth = nowDate.getMonth() + 1;
|
|
@@ -803,7 +890,7 @@ export default {
|
803
|
890
|
(nowMonth < 10 ? "0" + nowMonth : nowMonth) +
|
804
|
891
|
"-" +
|
805
|
892
|
(nowDay < 10 ? "0" + nowDay : nowDay);
|
806
|
|
- nowDate.setMonth(nowDate.getMonth() - 3);
|
|
893
|
+ nowDate.setMonth(nowDate.getMonth() - 1);
|
807
|
894
|
nowYear = nowDate.getFullYear();
|
808
|
895
|
nowMonth = nowDate.getMonth() + 1;
|
809
|
896
|
nowDay = nowDate.getDate();
|