XMLWAN 4 anni fa
parent
commit
7435660f68

+ 20 - 86
src/xt_pages/qcd/patientControlAnalysis.vue Vedi File

@@ -289,12 +289,15 @@ export default {
289 289
   },
290 290
   methods: {
291 291
     handleSizeChange(limit){
292
+      this.tableData = []
292 293
       this.listQuery.limit = limit
294
+      
293 295
       this.getlist()
296
+
294 297
     },
295 298
     handleCurrentChange(page){
299
+      this.tableData = []  
296 300
       this.listQuery.page = page
297
-
298 301
       this.getlist()
299 302
     },
300 303
     changeTime() {
@@ -490,7 +493,7 @@ export default {
490 493
       getPatientsControl(this.lapstor,this.listQuery.start_time,this.listQuery.end_time,this.listQuery.page,this.listQuery.limit).then(response=>{
491 494
          if(response.data.state == 1){
492 495
            var patients = response.data.data.patients
493
-     
496
+            console.log("patients",patients)
494 497
             this.tablePatients = patients
495 498
             var total = response.data.data.total
496 499
             this.total = total
@@ -644,101 +647,32 @@ export default {
644 647
         }
645 648
         return result;
646 649
     },
647
-
650
+    //统计柱状图
648 651
     getCartogramlist(){
649 652
        getCartogramlist(this.lapstor,this.listQuery.start_time,this.listQuery.end_time,this.limit,this.page).then(response=>{
650 653
            if(response.data.state == 1){
651
-              var cartogramlist =  response.data.data.cartogramlist
652
-               console.log("cartogramlist",cartogramlist)
653
-              var totaltwo =  response.data.data.total
654
-              // console.log("totaltwo",totaltwo)
655
-              var infectiouscontrol =  response.data.data.infectiouscontrol
656
-              // console.log("infectiouscontrol",infectiouscontrol)
657
-              infectiouscontrol.map(item=>{
658
-                cartogramlist.push(item)
659
-              })
660
-               var cart = []
661
-              //  console.log("已配置的选项",this.normData)
662
-              //过滤已经配置的选项
663
-              for(let i=0;i<cartogramlist.length;i++){
664
-                for(let j=0;j<this.normData.length;j++){
665
-                   if(cartogramlist[i].item_id == this.normData[j].inspection_minor){
666
-                        cart.push(cartogramlist[i])
667
-                   }
668
-                }
669
-              }
670
-               let dataInfo = {}
671
-                cart.forEach((item, index) => {
672
-                  let { patient_id } = item
673
-                  if (!dataInfo[patient_id]) {
674
-                    dataInfo[patient_id] = {
675
-                      patient_id,
676
-                      name:item.name,
677
-                      child: [],
678
-                      inspect_date:item.inspect_date,
679
-                      total:0,
680
-                      count:0,
681
-                      infectotal:0,
682
-                    }
683
-                  }
684
-                })
685
-              let list = Object.values(dataInfo)
686
-
654
+             var total =  response.data.data.total
655
+             
656
+             var standtotal = response.data.data.standtotal
657
+         
658
+             var standtotalone = response.data.data.standtotalOne
687 659
 
688
-              var arr = []
689
-              list.map(item=>{
690
-                 for(let i=0;i<cart.length;i++){
691
-                    if(item.inspect_date == cart[i].inspect_date && item.patient_id == cart[i].patient_id){
692
-                        item.child.push(cart[i])
693
-                    }
694
-                 }
695
-              })
696
-
697
-
698
-          //  console.log("list",list)
699
-             list.map(item=>{
700
-                item.child.map(it=>{
701
-                  //  console.log("长度",item.child.length)
702
-                  //  console.log("it",it)
703
-                   if(it.range_type == 1 && parseInt(it.range_min)<=parseInt(it.inspect_value) && parseInt(it.inspect_value)<=parseInt(it.range_max)){
704
-                       item.total ++
705
-                   }
706
-                   if(it.range_type == 2 && it.inspect_value == it.range_value){
707
-                      item.infectotal ++
708
-                   }
709
-                })
710
-             })
711
-            //  console.log("list",list)
712
-             var standardTotal = 0
713
-
714
-             list.map(item=>{
715
-               if((item.total +item.infectotal) == item.child.length){
716
-                  item.count ++
717
-               }
718
-             })
719
-             list.map(item=>{
720
-               standardTotal += item.count
721
-             })
722
-             var totalCount = list.length
723
-            //  console.log("arr",list)
724
-            //  console.log("合格",standardTotal)
725
-            //  console.log("总人数",totalCount)
660
+          
726 661
              for(let i=0;i<this.dataCount.length;i++){
727
-                this.dataCount[0].count = standardTotal
728
-                this.dataCount[1].count =  totalCount - standardTotal
662
+                this.dataCount[0].count = standtotal + standtotalone
663
+                this.dataCount[1].count =  total -standtotal - standtotalone
729 664
                this.obj.push(this.dataCount[i].count)
730 665
              }
731 666
             // console.log("dataCount",this.dataCount)
732
-         for (let i = 0; i < this.dataName.length; i++) {
733
-            this.modesData.xAxis.push(this.dataName[i].name)
734
-
735
-          }
736
-          for (let i = 0; i < this.dataCount.length; i++) {
737
-              this.modesData.series.push(((this.dataCount[i].count / totalCount) * 100).toFixed(1))
667
+            for (let i = 0; i < this.dataName.length; i++) {
668
+                this.modesData.xAxis.push(this.dataName[i].name)
669
+              }
670
+            for (let i = 0; i < this.dataCount.length; i++) {
671
+                this.modesData.series.push(((this.dataCount[i].count / total) * 100).toFixed(1))
738 672
             }
739 673
             this.chart.series[0].data = this.modesData.series
740 674
             this.chart.xAxis.data = this.modesData.xAxis
741
-            //  console.log("this",this.modesData)
675
+           
742 676
            }
743 677
        })
744 678
     },

+ 13 - 6
src/xt_pages/qcd/statisticalConfiguration.vue Vedi File

@@ -256,10 +256,17 @@ export default {
256 256
       getConfigurationDetail(id).then(response=>{
257 257
          if(response.data.state == 1){
258 258
            var configurationdetail = response.data.data.configurationdetail
259
-          //  console.log("详情",configurationdetail)
259
+           console.log("详情",configurationdetail)
260
+           var id = response.data.data.vid
261
+           console.log("id",id)
262
+           if (id == 0) {
263
+              this.editform.inspectionMinor = configurationdetail.inspection_minor
264
+           }else{
265
+             this.editform.inspectionMinor = id
266
+           }
260 267
            this.editform.id = configurationdetail.id
261 268
            this.editform.inspectionMajor = configurationdetail.inspection_major
262
-           this.editform.inspectionMinor = configurationdetail.inspection_minor
269
+         
263 270
            this.editform.check_type = configurationdetail.range_type
264 271
            this.editform.range_value = configurationdetail.range_value
265 272
          if(configurationdetail.range_type == 1){
@@ -302,7 +309,7 @@ export default {
302 309
       getInspectionMinor(id).then(response=>{
303 310
         if(response.data.state == 1){
304 311
          var inspection =  response.data.data.inspection
305
-        //  console.log("小项",inspection)
312
+          // console.log("小项",inspection)
306 313
          this.InspectionMinor = inspection
307 314
         }
308 315
       })
@@ -392,7 +399,7 @@ export default {
392 399
               configurationlist[i].sort = ""
393 400
             }
394 401
           }
395
-          // console.log("列表",configurationlist)
402
+          console.log("列表",configurationlist)
396 403
           this.configuraData = configurationlist
397 404
           var total = response.data.data.total
398 405
          // console.log("total",total)
@@ -406,7 +413,7 @@ export default {
406 413
         if(response.data.state == 1){
407 414
           var minor =  response.data.data.minor
408 415
           this.InspectionMinorTwo = minor
409
-          console.log("minor",minor)
416
+          // console.log("minor",minor)
410 417
         }
411 418
       })
412 419
     },
@@ -490,7 +497,7 @@ export default {
490 497
     //获取表格里面的数据
491 498
     this.getConfigurationList()
492 499
     //获取所有小项的数据
493
-    this.getAllInspectionMinor()
500
+     this.getAllInspectionMinor()
494 501
     //获取排序值
495 502
     this.getLastSort()
496 503
    },