Bladeren bron

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

See999 5 jaren geleden
bovenliggende
commit
282b8b4e68

+ 76 - 25
src/xt_pages/qcd/basicInformationAnalysis.vue Bestand weergeven

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

+ 28 - 2
src/xt_pages/user/inspection.vue Bestand weergeven

@@ -671,7 +671,6 @@ export default {
671 671
             var inspections = response.data.data.inspections;
672 672
             this.total = response.data.data.total;
673 673
             this.itemDate = response.data.data.date.split(" ")[0];
674
-            console.log("1111"+this.itemDate)
675 674
             this.inspections = response.data.data.inspections;
676 675
             if (inspections == null) {
677 676
               this.inspections = [];
@@ -680,28 +679,52 @@ export default {
680 679
             var inspectionsMap = {};
681 680
             this.inspectionsMap = {};
682 681
             for (var index in inspections) {
682
+              console.log(inspections[index])
683 683
               inspectionsMap[inspections[index].item_id] = inspections[index];
684
+
684 685
               this.inspectionsMap[inspections[index].item_id] =
685 686
                 inspections[index];
686 687
             }
687 688
             var items = this.project.inspection_reference;
689
+
690
+            console.log(items)
691
+            console.log(inspectionsMap)
692
+
693
+
694
+
688 695
             for (var index in items) {
696
+
689 697
               if (
690 698
                 items[index].id in inspectionsMap ||
691 699
                 items[index].item_id in inspectionsMap
692 700
               ) {
701
+
702
+
693 703
                 var item = {};
694 704
                 for (var key in items[index]) {
695 705
                   item[key] = items[index][key];
696 706
                 }
707
+                console.log(item.item_id);
708
+
697 709
                 if (item.item_id > 0) {
710
+                  console.log(item)
711
+                  console.log(items[index].item_id)
712
+                  console.log(inspectionsMap)
713
+
714
+                  console.log(inspectionsMap[parseInt(items[index].item_id)].inspect_value)
715
+
698 716
                   item.value =
699 717
                     inspectionsMap[items[index].item_id].inspect_value;
718
+
719
+
700 720
                 } else {
721
+
701 722
                   item.value = inspectionsMap[items[index].id].inspect_value;
702 723
                 }
724
+
703 725
                 item.value_direction = "";
704 726
                 if (item.range_type == 1) {
727
+
705 728
                   var value = parseFloat(item.value);
706 729
                   var range_min = parseFloat(item.range_min);
707 730
                   var range_max = parseFloat(item.range_max);
@@ -712,9 +735,12 @@ export default {
712 735
                   }
713 736
                 }
714 737
                 this.items.push(item);
738
+
715 739
               }
740
+
716 741
             }
717
-            console.log(this.items);
742
+
743
+
718 744
           }
719 745
         })
720 746
         .catch(v => {});

+ 4 - 2
src/xt_pages/workforce/appointment.vue Bestand weergeven

@@ -210,6 +210,8 @@
210 210
 
211 211
       },
212 212
       getWeekPanels() {
213
+        // this.scheduleZoneRow = []
214
+        // this.scheduleZone = []
213 215
         getWeekPanels(1).then(response => {
214 216
           if (response.data.state == 0) {
215 217
             return false
@@ -1516,12 +1518,12 @@
1516 1518
             break
1517 1519
 
1518 1520
           case '_6' :
1519
-            return this.days[4]
1521
+            return this.days[3]
1520 1522
 
1521 1523
             break
1522 1524
 
1523 1525
           case  '_7':
1524
-            return this.days[4]
1526
+            return this.days[3]
1525 1527
 
1526 1528
             break
1527 1529
 

+ 2 - 2
src/xt_pages/workforce/template.vue Bestand weergeven

@@ -1759,13 +1759,13 @@
1759 1759
             break
1760 1760
 
1761 1761
           case '_6' :
1762
-            return this.days[4]
1762
+            return this.days[3]
1763 1763
 
1764 1764
 
1765 1765
             break
1766 1766
 
1767 1767
           case  '_7':
1768
-            return this.days[4]
1768
+            return this.days[3]
1769 1769
 
1770 1770
 
1771 1771
             break