浏览代码

统计配置开发

XMLWAN 4 年前
父节点
当前提交
0fa85ba92d
共有 1 个文件被更改,包括 114 次插入10 次删除
  1. 114 10
      src/xt_pages/qcd/treatmentControlAnalysis/components/TimePersonal.vue

+ 114 - 10
src/xt_pages/qcd/treatmentControlAnalysis/components/TimePersonal.vue 查看文件

54
           <el-table-column fixed prop="name" label="姓名" width="140">
54
           <el-table-column fixed prop="name" label="姓名" width="140">
55
             <!-- <template slot-scope="scope">{{ scope.row.name }}</template> -->
55
             <!-- <template slot-scope="scope">{{ scope.row.name }}</template> -->
56
           </el-table-column>
56
           </el-table-column>
57
-          <el-table-column prop="age" label="年龄" width="140">
58
-             <!-- <template slot-scope="scope">{{ scope.row.id_card_no }}</template> -->
57
+          <el-table-column  label="年龄" width="140">
58
+             <template slot-scope="scope">{{ getAge(scope.row.id_card_no) }}</template>
59
           </el-table-column>
59
           </el-table-column>
60
           <el-table-column prop="dialysis_no" label="透析号" width="140">
60
           <el-table-column prop="dialysis_no" label="透析号" width="140">
61
               <!-- <template slot-scope="scope">{{ scope.row.dialysis_no }}</template> -->
61
               <!-- <template slot-scope="scope">{{ scope.row.dialysis_no }}</template> -->
62
           </el-table-column>
62
           </el-table-column>
63
           <el-table-column prop="mode_id" label="透析模式">
63
           <el-table-column prop="mode_id" label="透析模式">
64
               <template slot-scope="scope">
64
               <template slot-scope="scope">
65
-                <span>{{ scope.row.mode_id.join("、") }}</span>
65
+                <!--<span>{{ scope.row.mode_id.join("、") }}</span>-->
66
+                <span>{{scope.row.patient_id}}</span>
66
               </template>
67
               </template>
67
            </el-table-column>
68
            </el-table-column>
68
-          <el-table-column prop="address" label="透析总次数" width="140"></el-table-column>
69
+          <el-table-column prop="address" label="透析总次数" width="140">
70
+            <template slot-scope="scope">
71
+                <span>{{ scope.row.total_dialysis + scope.row.user_sys_before_count }}</span>
72
+              </template>
73
+          </el-table-column>
69
         </el-table>
74
         </el-table>
70
 
75
 
71
         <el-pagination
76
         <el-pagination
104
       tableData: [],
109
       tableData: [],
105
       DialysisData: [],
110
       DialysisData: [],
106
       patientsData:[],
111
       patientsData:[],
112
+      prescriptionList:[],
107
     };
113
     };
108
   },
114
   },
109
   methods: {
115
   methods: {
181
               if(dialysislist[i].mode_id == 13){
187
               if(dialysislist[i].mode_id == 13){
182
                 dialysislist[i].mode_id = "CRRT"
188
                 dialysislist[i].mode_id = "CRRT"
183
               }
189
               }
184
-                if(dialysislist[i].mode_id == 14){
190
+             if(dialysislist[i].mode_id == 14){
185
                 dialysislist[i].mode_id = "腹水回输"
191
                 dialysislist[i].mode_id = "腹水回输"
186
               }
192
               }
187
               if(dialysislist[i].mode_id == 19){
193
               if(dialysislist[i].mode_id == 19){
199
                 patient_id: patient_id,
205
                 patient_id: patient_id,
200
                 dialysis_no: item.dialysis_no,
206
                 dialysis_no: item.dialysis_no,
201
                 name:item.name,
207
                 name:item.name,
202
-                age:item.id_card_no
208
+                age:item.id_card_no,
209
+                total_dialysis:item.total_dialysis,
210
+                user_sys_before_count:item.user_sys_before_count,
203
             })
211
             })
204
            });
212
            });
205
            res.map(item => {
213
            res.map(item => {
206
              item.age = this.getAge(item.age)
214
              item.age = this.getAge(item.age)
207
            })
215
            })
208
            console.log(res)
216
            console.log(res)
209
-           this.DialysisData = res
217
+           //this.DialysisData = res
210
  
218
  
211
             var total = response.data.data.total
219
             var total = response.data.data.total
212
-            console.log("total",total)
213
-            this.total = total
220
+            console.log("total",total) 
221
+           // this.total = total
222
+            
223
+            var list = response.data.data.list
224
+             for(let i=0;i<list.length;i++){
225
+              if(list[i].mode_id == 1){
226
+                list[i].mode_id = "HD"
227
+              }
228
+               if(list[i].mode_id == 2){
229
+                list[i].mode_id = "HDF"
230
+              }
231
+               if(list[i].mode_id == 3){
232
+                list[i].mode_id = "HD+HP"
233
+              }
234
+               if(list[i].mode_id == 4){
235
+                list[i].mode_id = "HP"
236
+              }
237
+               if(list[i].mode_id == 5){
238
+                list[i].mode_id = "HF"
239
+              }
240
+               if(list[i].mode_id == 6){
241
+                list[i].mode_id = "SCUF"
242
+              }
243
+               if(list[i].mode_id == 7){
244
+                list[i].mode_id = "IUF"
245
+              }
246
+               if(list[i].mode_id == 8){
247
+                list[i].mode_id = "HFHD"
248
+              }
249
+               if(list[i].mode_id == 9){
250
+                list[i].mode_id = "HFHD+HP"
251
+              }
252
+               if(list[i].mode_id == 10){
253
+                list[i].mode_id = "PHF"
254
+              }
255
+               if(list[i].mode_id == 11){
256
+                list[i].mode_id = "HFR"
257
+              }
258
+              if(list[i].mode_id == 12){
259
+                list[i].mode_id = "HDF+HP"
260
+              }
261
+              if(list[i].mode_id == 13){
262
+                list[i].mode_id = "CRRT"
263
+              }
264
+             if(list[i].mode_id == 14){
265
+                list[i].mode_id = "腹水回输"
266
+              }
267
+              if(list[i].mode_id == 19){
268
+                list[i].mode_id = "IUF+HD"
269
+              }
270
+           }
271
+            console.log("list",list)
272
+            
273
+            var totallist  =  response.data.data.totallist
274
+             console.log("totallist",totallist)
275
+            this.total = totallist  
276
+            var prescriptionList = response.data.data.prescriptionList
277
+            
278
+            console.log("prescriptionList",prescriptionList)
279
+            for(let i=0;i<this.prescriptionList.length;i++){
280
+             for(let j=0;j<list.length;j++){
281
+               if(this.prescriptionList[i].patient_id == list[j].patient_id){
282
+                  arr.push(this.prescriptionList[i])
283
+               }
284
+             }
285
+            }
286
+             let dataInfo = {}
287
+              list.forEach((item, index) => {
288
+                let { patient_id } = item
289
+                if (!dataInfo[patient_id]) {
290
+                  dataInfo[patient_id] = {
291
+                    patient_id,
292
+                    name:item.name,
293
+                    id_card_no:item.id_card_no,
294
+                    dialysis_no:item.dialysis_no,
295
+                    total_dialysis:item.total_dialysis,
296
+                    user_sys_before_count:item.user_sys_before_count,
297
+                    child: []
298
+                  }
299
+                }
300
+              })
301
+             let list = Object.values(dataInfo)
302
+            console.log("arr",list)    
303
+            list.map(item => {
304
+              for (let i = 0; i < prescriptionList.length; i++) {
305
+                if (
306
+                  item.patient_id === prescriptionList[i].patient_id
307
+                ) {
308
+                  item.child.push(prescriptionList[i])
309
+                }
310
+              }
311
+            })
312
+            console.log("list---",list)
313
+            this.DialysisData = list
214
          }
314
          }
215
       })
315
       })
216
     },
316
     },
227
 				return age;
327
 				return age;
228
 			}
328
 			}
229
     },
329
     },
230
-    onSearch(){}
330
+    onSearch(){},
331
+    unique(arr) {
332
+        const res = new Map();
333
+        return arr.filter((arr) => !res.has(arr.mode_id) && res.set(arr.mode_id, 1));
334
+      },
231
   },
335
   },
232
   created(){
336
   created(){
233
     var nowDate = new Date();
337
     var nowDate = new Date();