Procházet zdrojové kódy

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

See999 před 5 roky
rodič
revize
282b8b4e68

+ 76 - 25
src/xt_pages/qcd/basicInformationAnalysis.vue Zobrazit soubor

70
               </div>
70
               </div>
71
               <div class="borderBox2">
71
               <div class="borderBox2">
72
                <div v-for="(item,i) in this.InfectiousList" :key="i">
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
                 </div>
97
                 </div>
76
               </div>
98
               </div>
77
             </div>
99
             </div>
202
       InfectiousTotal:0,
224
       InfectiousTotal:0,
203
       ageCount:[],
225
       ageCount:[],
204
       ageTotal:0,
226
       ageTotal:0,
227
+      otherTotal:0,
205
     };
228
     };
206
   },
229
   },
207
   methods: {
230
   methods: {
297
          }
320
          }
298
       })
321
       })
299
     },
322
     },
323
+    //统计男女比例
300
     getTotalSexCount(timeStar,timeEnd){
324
     getTotalSexCount(timeStar,timeEnd){
301
       getTotalSexCount(timeStar,timeEnd).then(response=>{
325
       getTotalSexCount(timeStar,timeEnd).then(response=>{
302
         if(response.data.state === 1){
326
         if(response.data.state === 1){
303
           var total = response.data.data.total
327
           var total = response.data.data.total
328
+        //  console.log("总人数",total)
304
           this.totalGender = total
329
           this.totalGender = total
305
           var totalMan = response.data.data.totalSex
330
           var totalMan = response.data.data.totalSex
331
+       //  console.log("男人",totalMan)
306
           this.totalMan = totalMan
332
           this.totalMan = totalMan
307
           var totalWoman = total - totalMan
333
           var totalWoman = total - totalMan
308
           this.totalWoman = totalWoman
334
           this.totalWoman = totalWoman
315
            if(response.data.state === 1){
341
            if(response.data.state === 1){
316
              this.InfectiousTotal = response.data.data.total
342
              this.InfectiousTotal = response.data.data.total
317
              var infectious = response.data.data.count
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
          if(response.data.state == 1){
374
          if(response.data.state == 1){
343
           var ageCount =  response.data.data.ageCount
375
           var ageCount =  response.data.data.ageCount
344
           this.ageCount = ageCount
376
           this.ageCount = ageCount
345
-          console.log("ageCount",ageCount)
377
+        //  console.log("ageCount",ageCount)
346
           this.ageTotal =  response.data.data.total
378
           this.ageTotal =  response.data.data.total
347
          // var two = response.data.data.two
379
          // var two = response.data.data.two
348
         //  console.log("two",two)
380
         //  console.log("two",two)
381
+       
349
          }
382
          }
350
       })
383
       })
351
     },
384
     },
385
+    //统计透析年龄
352
     getTotalDialysisCount(timeStar,timeEnd){
386
     getTotalDialysisCount(timeStar,timeEnd){
353
       getTotalDialysisCount(timeStar,timeEnd).then(response=>{
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
       const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
410
       const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
360
       console.log("开始时间",startDate)
411
       console.log("开始时间",startDate)
361
       const endDate = moment(new Date()).format('YYYY-MM-DD')
412
       const endDate = moment(new Date()).format('YYYY-MM-DD')
362
-      console.log("结束时间",endDate) 
413
+     // console.log("结束时间",endDate) 
363
       var now = new Date()
414
       var now = new Date()
364
       var nowMonth = now.getMonth(); //当前月 
415
       var nowMonth = now.getMonth(); //当前月 
365
       var nowYear = now.getFullYear(); //当前年 
416
       var nowYear = now.getFullYear(); //当前年 
366
       //本月的开始时间
417
       //本月的开始时间
367
       var monthStartDate = new Date(nowYear, nowMonth, 1); 
418
       var monthStartDate = new Date(nowYear, nowMonth, 1); 
368
       var timeStar=Date.parse(monthStartDate)/1000;//s
419
       var timeStar=Date.parse(monthStartDate)/1000;//s
369
-      console.log("本月第一天",timeStar)
420
+     // console.log("本月第一天",timeStar)
370
       //本月的结束时间
421
       //本月的结束时间
371
       var monthEndDate = new Date(nowYear, nowMonth+1, 0);
422
       var monthEndDate = new Date(nowYear, nowMonth+1, 0);
372
       var timeEnd=Date.parse(monthEndDate)/1000-1;//s
423
       var timeEnd=Date.parse(monthEndDate)/1000-1;//s
373
-      console.log("本月最后一天",timeEnd)
424
+     // console.log("本月最后一天",timeEnd)
374
       //统计透析总量
425
       //统计透析总量
375
       this.getDialysisModeType(startDate,endDate)
426
       this.getDialysisModeType(startDate,endDate)
376
       //统计转归状态
427
       //统计转归状态

+ 28 - 2
src/xt_pages/user/inspection.vue Zobrazit soubor

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

+ 4 - 2
src/xt_pages/workforce/appointment.vue Zobrazit soubor

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

+ 2 - 2
src/xt_pages/workforce/template.vue Zobrazit soubor

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