ソースを参照

统计配置开发

XMLWAN 4 年 前
コミット
1b15e9363d
共有1 個のファイルを変更した76 個の追加25 個の削除を含む
  1. 76 25
      src/xt_pages/qcd/basicInformationAnalysis.vue

+ 76 - 25
src/xt_pages/qcd/basicInformationAnalysis.vue ファイルの表示

@@ -72,8 +72,30 @@
72 72
               </div>
73 73
               <div class="borderBox2">
74 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 99
                 </div>
78 100
               </div>
79 101
             </div>
@@ -204,6 +226,7 @@ export default {
204 226
       InfectiousTotal:0,
205 227
       ageCount:[],
206 228
       ageTotal:0,
229
+      otherTotal:0,
207 230
     };
208 231
   },
209 232
   methods: {
@@ -299,12 +322,15 @@ export default {
299 322
          }
300 323
       })
301 324
     },
325
+    //统计男女比例
302 326
     getTotalSexCount(timeStar,timeEnd){
303 327
       getTotalSexCount(timeStar,timeEnd).then(response=>{
304 328
         if(response.data.state === 1){
305 329
           var total = response.data.data.total
330
+        //  console.log("总人数",total)
306 331
           this.totalGender = total
307 332
           var totalMan = response.data.data.totalSex
333
+       //  console.log("男人",totalMan)
308 334
           this.totalMan = totalMan
309 335
           var totalWoman = total - totalMan
310 336
           this.totalWoman = totalWoman
@@ -317,25 +343,31 @@ export default {
317 343
            if(response.data.state === 1){
318 344
              this.InfectiousTotal = response.data.data.total
319 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,15 +376,34 @@ export default {
344 376
          if(response.data.state == 1){
345 377
           var ageCount =  response.data.data.ageCount
346 378
           this.ageCount = ageCount
347
-          console.log("ageCount",ageCount)
379
+        //  console.log("ageCount",ageCount)
348 380
           this.ageTotal =  response.data.data.total
349 381
          // var two = response.data.data.two
350 382
         //  console.log("two",two)
383
+       
351 384
          }
352 385
       })
353 386
     },
387
+    //统计透析年龄
354 388
     getTotalDialysisCount(timeStar,timeEnd){
355 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,18 +412,18 @@ export default {
361 412
       const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
362 413
       console.log("开始时间",startDate)
363 414
       const endDate = moment(new Date()).format('YYYY-MM-DD')
364
-      console.log("结束时间",endDate) 
415
+     // console.log("结束时间",endDate) 
365 416
       var now = new Date()
366 417
       var nowMonth = now.getMonth(); //当前月 
367 418
       var nowYear = now.getFullYear(); //当前年 
368 419
       //本月的开始时间
369 420
       var monthStartDate = new Date(nowYear, nowMonth, 1); 
370 421
       var timeStar=Date.parse(monthStartDate)/1000;//s
371
-      console.log("本月第一天",timeStar)
422
+     // console.log("本月第一天",timeStar)
372 423
       //本月的结束时间
373 424
       var monthEndDate = new Date(nowYear, nowMonth+1, 0);
374 425
       var timeEnd=Date.parse(monthEndDate)/1000-1;//s
375
-      console.log("本月最后一天",timeEnd)
426
+     // console.log("本月最后一天",timeEnd)
376 427
       //统计透析总量
377 428
       this.getDialysisModeType(startDate,endDate)
378 429
       //统计转归状态