Explorar el Código

统计配置开发

XMLWAN hace 5 años
padre
commit
1b15e9363d
Se han modificado 1 ficheros con 76 adiciones y 25 borrados
  1. 76 25
      src/xt_pages/qcd/basicInformationAnalysis.vue

+ 76 - 25
src/xt_pages/qcd/basicInformationAnalysis.vue Ver fichero

72
               </div>
72
               </div>
73
               <div class="borderBox2">
73
               <div class="borderBox2">
74
                <div v-for="(item,i) in this.InfectiousList" :key="i">
74
                <div v-for="(item,i) in this.InfectiousList" :key="i">
75
-                  <p>{{item.disease_id}}:{{item.count}}人({{(item.count/InfectiousTotal*100).toFixed(1)}}%)</p>
76
-                  <el-progress :percentage="(item.count/InfectiousTotal*100).toFixed(1)"></el-progress>
75
+                 <span v-if="item.disease_id == 2">
76
+                    <p>乙肝:{{item.count}}人({{(item.count/InfectiousTotal*100).toFixed(1)}}%)</p>
77
+                    <el-progress :percentage="(item.count/InfectiousTotal*100).toFixed(1)"></el-progress>
78
+                  </span>
79
+                  <span v-if="item.disease_id == 3">
80
+                    <p>丙肝:{{item.count}}人({{(item.count/InfectiousTotal*100).toFixed(1)}}%)</p>
81
+                    <el-progress :percentage="(item.count/InfectiousTotal*100).toFixed(1)"></el-progress>
82
+                  </span>
83
+                   <span v-if="item.disease_id == 4">
84
+                    <p>艾滋病:{{item.count}}人({{(item.count/InfectiousTotal*100).toFixed(1)}}%)</p>
85
+                    <el-progress :percentage="(item.count/InfectiousTotal*100).toFixed(1)"></el-progress>
86
+                  </span>
87
+                  <span v-if="item.disease_id == 5">
88
+                    <p>肺结核:{{item.count}}人({{(item.count/InfectiousTotal*100).toFixed(1)}}%)</p>
89
+                    <el-progress :percentage="(item.count/InfectiousTotal*100).toFixed(1)"></el-progress>
90
+                  </span>
91
+                   <span v-if="item.disease_id == 6">
92
+                      <p>梅毒:{{item.count}}人({{(item.count/InfectiousTotal*100).toFixed(1)}}%)</p>
93
+                      <el-progress :percentage="(item.count/InfectiousTotal*100).toFixed(1)"></el-progress>
94
+                  </span>
95
+                    <span v-if="item.disease_id == 1">
96
+                      <p>其他:{{item.count + otherTotal}}人({{((item.count+otherTotal)/InfectiousTotal*100).toFixed(1)}}%)</p>
97
+                      <el-progress :percentage="((item.count+otherTotal)/InfectiousTotal*100).toFixed(1)"></el-progress>
98
+                  </span>
77
                 </div>
99
                 </div>
78
               </div>
100
               </div>
79
             </div>
101
             </div>
204
       InfectiousTotal:0,
226
       InfectiousTotal:0,
205
       ageCount:[],
227
       ageCount:[],
206
       ageTotal:0,
228
       ageTotal:0,
229
+      otherTotal:0,
207
     };
230
     };
208
   },
231
   },
209
   methods: {
232
   methods: {
299
          }
322
          }
300
       })
323
       })
301
     },
324
     },
325
+    //统计男女比例
302
     getTotalSexCount(timeStar,timeEnd){
326
     getTotalSexCount(timeStar,timeEnd){
303
       getTotalSexCount(timeStar,timeEnd).then(response=>{
327
       getTotalSexCount(timeStar,timeEnd).then(response=>{
304
         if(response.data.state === 1){
328
         if(response.data.state === 1){
305
           var total = response.data.data.total
329
           var total = response.data.data.total
330
+        //  console.log("总人数",total)
306
           this.totalGender = total
331
           this.totalGender = total
307
           var totalMan = response.data.data.totalSex
332
           var totalMan = response.data.data.totalSex
333
+       //  console.log("男人",totalMan)
308
           this.totalMan = totalMan
334
           this.totalMan = totalMan
309
           var totalWoman = total - totalMan
335
           var totalWoman = total - totalMan
310
           this.totalWoman = totalWoman
336
           this.totalWoman = totalWoman
317
            if(response.data.state === 1){
343
            if(response.data.state === 1){
318
              this.InfectiousTotal = response.data.data.total
344
              this.InfectiousTotal = response.data.data.total
319
              var infectious = response.data.data.count
345
              var infectious = response.data.data.count
320
-             for(let i=0;i<infectious.length;i++){
321
-               if(infectious[i].disease_id == 2){
322
-                 infectious[i].disease_id = "乙肝"
323
-               }
324
-               if(infectious[i].disease_id == 3){
325
-                 infectious[i].disease_id = "丙肝"
326
-               }
327
-               if(infectious[i].disease_id == 4){
328
-                 infectious[i].disease_id = "艾滋病"
329
-               }
330
-               if(infectious[i].disease_id == 5){
331
-                 infectious[i].disease_id = "肺结核"
332
-               }
333
-               if(infectious[i].disease_id == 6){
334
-                 infectious[i].disease_id = "梅毒"
335
-               }
336
-               this.InfectiousList = infectious
337
-             }
338
-             console.log("infectious-----------",infectious)
346
+             this.InfectiousList = infectious
347
+           // for(let i=0;i<infectious.length;i++){
348
+           //   if(infectious[i].disease_id == 1){
349
+           //      infectious[i].disease_id = "其他"
350
+            //   }
351
+            //   if(infectious[i].disease_id == 2){
352
+            //     infectious[i].disease_id = "乙肝"
353
+            //   }
354
+           //    if(infectious[i].disease_id == 3){
355
+            //     infectious[i].disease_id = "丙肝"
356
+           //    }
357
+            //   if(infectious[i].disease_id == 4){
358
+            //     infectious[i].disease_id = "艾滋病"
359
+            //   }
360
+            //   if(infectious[i].disease_id == 5){
361
+            //     infectious[i].disease_id = "肺结核"
362
+            //   }
363
+            //   if(infectious[i].disease_id == 6){
364
+            //     infectious[i].disease_id = "梅毒"
365
+            //   }
366
+               
367
+            // }
368
+             var otherTotal = response.data.data.otherTotal
369
+             this.otherTotal = otherTotal
370
+             // console.log("infectious-----------",otherTotal)
339
            }
371
            }
340
        })
372
        })
341
     },
373
     },
344
          if(response.data.state == 1){
376
          if(response.data.state == 1){
345
           var ageCount =  response.data.data.ageCount
377
           var ageCount =  response.data.data.ageCount
346
           this.ageCount = ageCount
378
           this.ageCount = ageCount
347
-          console.log("ageCount",ageCount)
379
+        //  console.log("ageCount",ageCount)
348
           this.ageTotal =  response.data.data.total
380
           this.ageTotal =  response.data.data.total
349
          // var two = response.data.data.two
381
          // var two = response.data.data.two
350
         //  console.log("two",two)
382
         //  console.log("two",two)
383
+       
351
          }
384
          }
352
       })
385
       })
353
     },
386
     },
387
+    //统计透析年龄
354
     getTotalDialysisCount(timeStar,timeEnd){
388
     getTotalDialysisCount(timeStar,timeEnd){
355
       getTotalDialysisCount(timeStar,timeEnd).then(response=>{
389
       getTotalDialysisCount(timeStar,timeEnd).then(response=>{
390
+         if(response.data.state == 1){
391
+           var patients = response.data.data.patients
392
+           var now = new Date()
393
+           var nowMonth = now.getMonth(); //当前月 
394
+           var nowYear = now.getFullYear(); //当前年 
395
+           var notime =  moment(new Date()).format('YYYY-MM-DD')
396
+           var nowdataunix =  Date.parse(notime)/1000
397
+           console.log("档期是---------------",nowdataunix)
398
+           for(let i=0;i<patients.length;i++){
399
+             if(patients[i].first_dialysis_date){
400
+             }
401
+           }
402
+           console.log("patients",patients)
403
+            var date =  new Date(1212508800)
404
+          console.log("date",date)
405
+          
406
+         }
356
       })
407
       })
357
     }
408
     }
358
   },
409
   },
361
       const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
412
       const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
362
       console.log("开始时间",startDate)
413
       console.log("开始时间",startDate)
363
       const endDate = moment(new Date()).format('YYYY-MM-DD')
414
       const endDate = moment(new Date()).format('YYYY-MM-DD')
364
-      console.log("结束时间",endDate) 
415
+     // console.log("结束时间",endDate) 
365
       var now = new Date()
416
       var now = new Date()
366
       var nowMonth = now.getMonth(); //当前月 
417
       var nowMonth = now.getMonth(); //当前月 
367
       var nowYear = now.getFullYear(); //当前年 
418
       var nowYear = now.getFullYear(); //当前年 
368
       //本月的开始时间
419
       //本月的开始时间
369
       var monthStartDate = new Date(nowYear, nowMonth, 1); 
420
       var monthStartDate = new Date(nowYear, nowMonth, 1); 
370
       var timeStar=Date.parse(monthStartDate)/1000;//s
421
       var timeStar=Date.parse(monthStartDate)/1000;//s
371
-      console.log("本月第一天",timeStar)
422
+     // console.log("本月第一天",timeStar)
372
       //本月的结束时间
423
       //本月的结束时间
373
       var monthEndDate = new Date(nowYear, nowMonth+1, 0);
424
       var monthEndDate = new Date(nowYear, nowMonth+1, 0);
374
       var timeEnd=Date.parse(monthEndDate)/1000-1;//s
425
       var timeEnd=Date.parse(monthEndDate)/1000-1;//s
375
-      console.log("本月最后一天",timeEnd)
426
+     // console.log("本月最后一天",timeEnd)
376
       //统计透析总量
427
       //统计透析总量
377
       this.getDialysisModeType(startDate,endDate)
428
       this.getDialysisModeType(startDate,endDate)
378
       //统计转归状态
429
       //统计转归状态