浏览代码

经营中心

XMLWAN 4 年前
父节点
当前提交
e899c32b3b

文件差异内容过多而无法显示
+ 884 - 80
src/xt_pages/qcd/officesControlAnalysis/project.vue


+ 121 - 25
src/xt_pages/qcd/officesControlAnalysis/time.vue 查看文件

96
       </div>
96
       </div>
97
       <div class="cell clearfix newDisplay">
97
       <div class="cell clearfix newDisplay">
98
          <span v-for="(item,index) in normData" :key="index" class="index">
98
          <span v-for="(item,index) in normData" :key="index" class="index">
99
-           {{item.item_name}}
100
-           <span v-if="item.range_type == 1">({{item.min_range}}-{{item.large_range}})</span>
101
-           <span v-if="item.range_type == 2">({{item.range_value}})</span>
99
+           <span v-if="item.is_status == 1">{{item.item_name}}</span> 
100
+           <span v-if="item.is_status == 0 && item.inspection_major == 0  && item.inspection_minor == -1">收缩压</span>
101
+            <span v-if="item.is_status == 0 && item.inspection_major == 0  && item.inspection_minor == -2">舒张压</span>
102
+           <span v-if="item.range_type == 1 && item.is_status == 1">({{item.min_range}}-{{item.large_range}})</span>
103
+           <span v-if="item.range_type == 2 && item.is_status == 1">({{item.range_value}})</span>
104
+          <span v-if="item.range_type == 0 && item.is_status == 0">({{item.min_range}}-{{item.large_range}})</span>
102
         </span> 
105
         </span> 
103
       </div>
106
       </div>
104
     </div>
107
     </div>
126
           return time.getTime() > Date.now() || time.getTime() < threeMonths;;
129
           return time.getTime() > Date.now() || time.getTime() < threeMonths;;
127
         }
130
         }
128
       },  
131
       },  
132
+      sortOne:0,
133
+      sortTwo:0,
129
       modetype:0,
134
       modetype:0,
130
       startime:"",
135
       startime:"",
131
       endtime:"",
136
       endtime:"",
140
         { path: false, name: "按时间分组" }
145
         { path: false, name: "按时间分组" }
141
       ],
146
       ],
142
       normData:[],
147
       normData:[],
148
+      newArrData:[],
143
       listQuery: {
149
       listQuery: {
144
         start_time: "",
150
         start_time: "",
145
         end_time: "",
151
         end_time: "",
292
             zoomLock: true // 锁定区域禁止缩放
298
             zoomLock: true // 锁定区域禁止缩放
293
           }
299
           }
294
         ]
300
         ]
295
-      }
301
+      },
302
+      syslarge:0,
303
+      sysmin:0,
304
+      dialarge:0,
305
+      diamin:0,
296
     };
306
     };
297
   },
307
   },
298
   methods: {
308
   methods: {
345
       this.listQuery.state = state;
355
       this.listQuery.state = state;
346
     },
356
     },
347
     chooseType(val) {
357
     chooseType(val) {
358
+       this.modesData.series = []
359
+       this.modesData.xAxis = []
348
       this.type = val;
360
       this.type = val;
349
-      if(val == "按月份统计对比"){
350
-         this.modetype = 0
351
-        
361
+      if(val == "按月份统计对比"){ 
362
+         this.modetype = 1
363
+         this.monthType = 0
364
+         this.getlist() 
352
       }
365
       }
353
        if(val == "按季度统计对比"){
366
        if(val == "按季度统计对比"){
354
-         this.modetype = 1
355
-         
367
+         this.modetype = 0
368
+         this.getlist()
356
       }
369
       }
357
       if(val == "自定义"){
370
       if(val == "自定义"){
358
         this.modetype = 2
371
         this.modetype = 2
372
+        
359
       }
373
       }
360
      
374
      
361
     },
375
     },
481
     getNormData(){
495
     getNormData(){
482
       getNormData().then(response=>{
496
       getNormData().then(response=>{
483
          if(response.data.state === 1){
497
          if(response.data.state === 1){
498
+           var newArr = []
484
            var normdata = response.data.data.normdata
499
            var normdata = response.data.data.normdata
500
+           newArr  = normdata
485
           //  console.log("指标正常范围",normdata)
501
           //  console.log("指标正常范围",normdata)
486
-           this.normData = normdata
502
+           var bloodpressure = response.data.data.bloodPressure
503
+          console.log("bloodPressure",bloodpressure)
504
+           for(let i=0;i<bloodpressure.length;i++){
505
+              if(bloodpressure[i].inspection_major == 0 && bloodpressure[i].inspection_minor == -1 && bloodpressure[i].is_status == 0){
506
+                 bloodpressure[i].item_name = "收缩压"
507
+                 this.sortOne = bloodpressure[i].sort
508
+                 this.syslarge = parseInt(bloodpressure[i].large_range)
509
+                 this.sysmin = parseInt(bloodpressure[i].min_range)
510
+              }
511
+               if(bloodpressure[i].inspection_major == 0 && bloodpressure[i].inspection_minor == -2 && bloodpressure[i].is_status == 0){
512
+                 bloodpressure[i].item_name = "舒张压"
513
+                 this.sortTwo = bloodpressure[i].sort
514
+                 this.dialarge = parseInt(bloodpressure[i].large_range)
515
+                 this.diamin = parseInt(bloodpressure[i].min_range)
516
+              }
517
+           }
518
+
519
+          //  console.log("血压数据",bloodpressure)
520
+           bloodpressure.map(item=>{
521
+             newArr.push(item)
522
+           })
523
+           var newarr  =  newArr.sort((a,b)=>{ return a.sort-b.sort})
524
+          // console.log("normdata",newarr)
525
+           this.normData = newarr
487
            this.getlist()
526
            this.getlist()
488
          }
527
          }
489
       })
528
       })
595
       getFirstQuarter(params).then(response=>{
634
       getFirstQuarter(params).then(response=>{
596
          if(response.data.state === 1){
635
          if(response.data.state === 1){
597
             var count =  response.data.data.count
636
             var count =  response.data.data.count
598
-          //  console.log("count",count) 
637
+    
599
             var countwo = response.data.data.countwo 
638
             var countwo = response.data.data.countwo 
600
-          //  console.log("countwo",countwo)
639
+           
640
+            var systolicTotal =  response.data.data.systolicTotal
641
+            console.log("systolictotal",systolicTotal)
642
+            var sysstandTotal = 0
643
+            var systolic = response.data.data.systolic
644
+           console.log("systolic",systolic)
645
+            var sysarr = []
646
+            for(let i=0;i<systolic.length;i++){
647
+              if(systolic[i].systolic_blood_pressure >= this.sysmin && systolic[i].systolic_blood_pressure<=this.syslarge){
648
+                  sysarr.push(systolic[i])
649
+              }
650
+            } 
651
+            sysstandTotal = sysarr.length
652
+           console.log("sysarr",sysarr)
653
+
654
+            var diastotal =  response.data.data.diastotal
655
+            var diasstandtotal = 0
656
+          
657
+            var diastolic = response.data.data.diastolic
658
+            // console.log("diastolic",diastolic)
659
+            var diaArr=[]
660
+            for(let i=0;i<diastolic.length;i++){
661
+             if(diastolic[i].diastolic_blood_pressure>=this.diamin && diastolic[i].diastolic_blood_pressure<=this.dialarge){
662
+                  diaArr.push(diastolic[i])
663
+             }
664
+            }
665
+            // console.log("diaArr",diaArr)
666
+            diasstandtotal = diaArr.length
667
+            var normData = response.data.data.normData
668
+          
669
+            var newArr = [
670
+              {item_id:0,Total:0,Count:0,sort:0},
671
+              {item_id:0,Total:0,Count:0,sort:0}
672
+            ]
673
+     
674
+            for(let i=0;i<newArr.length;i++){
675
+               if(sysstandTotal == 0){
676
+                  newArr[0].Total = 1
677
+                  newArr[0].Count = sysstandTotal
678
+                  newArr[0].sort = this.sortOne
679
+
680
+               }else{
681
+                newArr[0].Total = systolicTotal
682
+                newArr[0].Count = sysstandTotal
683
+                newArr[0].sort = this.sortOne
684
+               }
685
+               if(diasstandtotal == 0){
686
+                  newArr[1].Total = 1
687
+                  newArr[1].Count = diasstandtotal
688
+                  newArr[1].sort = this.sortTwo
689
+               }else{
690
+                newArr[1].Total = diastotal
691
+                newArr[1].Count = diasstandtotal
692
+                newArr[1].sort = this.sortTwo
693
+               }
694
+            }
695
+ 
601
             countwo.map(item=>{
696
             countwo.map(item=>{
602
               count.push(item)
697
               count.push(item)
603
             })
698
             })
604
-          //  console.log("count",count)
699
+         
605
             //获取已经配置的数据 
700
             //获取已经配置的数据 
606
             var arr=[]
701
             var arr=[]
607
             for(let i=0;i<count.length;i++){  
702
             for(let i=0;i<count.length;i++){  
608
-               for(let j=0;j<this.normData.length;j++){
609
-                if(count[i].item_id == this.normData[j].inspection_minor){
703
+               for(let j=0;j<normData.length;j++){
704
+                if(count[i].item_id == normData[j].inspection_minor){
610
                      arr.push(count[i])
705
                      arr.push(count[i])
611
                 }
706
                 }
612
               }
707
               }
613
             }
708
             }
614
-          //  console.log("arr",arr )
709
+      
710
+           
711
+            var arrtwo =  this.arrayDate(count,normData)
615
            
712
            
616
-            var arrtwo =  this.arrayDate(count,this.normData)
617
             for(let i=0;i<arrtwo.length;i++){
713
             for(let i=0;i<arrtwo.length;i++){
618
                 this.$set(arrtwo[i], 'Count', 0)
714
                 this.$set(arrtwo[i], 'Count', 0)
619
               }
715
               }
623
             arrtwo.map(item => {
719
             arrtwo.map(item => {
624
               arr.push(item)
720
               arr.push(item)
625
             })
721
             })
626
-            // console.log("arr",arr)
627
-             arr.sort(this.compare('sort'))  
628
-            // arr.sort((a,b)=>{
629
-            //     return projectArr.indexOf(a.ProjectName)-projectArr.indexOf(b.ProjectName);
630
-            //   });
631
-            // console.log("arr",arr)
722
+          
723
+            newArr.map(item=>{
724
+              arr.push(item)
725
+            }) 
726
+            arr.sort(this.compare('sort'))  
727
+            
728
+
632
             for(const key in this.normData ){
729
             for(const key in this.normData ){
633
                this.modesData.xAxis.push(this.normData[key].item_name);
730
                this.modesData.xAxis.push(this.normData[key].item_name);
634
                 if(key in arr){
731
                 if(key in arr){
640
             this.chart.series[0].data = this.modesData.series
737
             this.chart.series[0].data = this.modesData.series
641
             this.chart.xAxis.data = this.modesData.xAxis
738
             this.chart.xAxis.data = this.modesData.xAxis
642
             this.getArrLength(this.chart.xAxis.data)
739
             this.getArrLength(this.chart.xAxis.data)
643
-            // console.log('====',this.modesData) 
644
           
740
           
645
          }
741
          }
646
       })
742
       })
654
     },
750
     },
655
     arrayDate(array1,array2){
751
     arrayDate(array1,array2){
656
         var array1 = array1;
752
         var array1 = array1;
657
-        var array2 = this.normData;
753
+        var array2 = array2;
658
         var result = [];
754
         var result = [];
659
         for(var i = 0; i < array2.length; i++){
755
         for(var i = 0; i < array2.length; i++){
660
             var obj = array2[i];
756
             var obj = array2[i];

+ 62 - 8
src/xt_pages/qcd/patientComplianceDetails.vue 查看文件

102
                   @click="clickQuality(index,item.inspection_minor)"
102
                   @click="clickQuality(index,item.inspection_minor)"
103
                 >
103
                 >
104
                   <p>{{ item.item_name }}</p>
104
                   <p>{{ item.item_name }}</p>
105
-                   <span v-if="isTrue == 1"><i class="iconfont icon-gou gou"></i></span>
106
-                   <span v-if="isTrue == 0"><i class="iconfont icon-gantanhao gth"></i></span>
105
+                   <span v-if="item.range_type == 1 && getvlist(item.inspection_minor)!=0"><span v-if="parseInt(item.min_range)<=getvlist(item.inspection_minor) && getvlist(item.inspection_minor)<=parseInt(item.large_range) "><i class="iconfont icon-gou gou"></i></span></span>
106
+                   <span v-if="item.range_type == 1 && getvlist(item.inspection_minor)!=0"><span v-if="parseInt(item.min_range)>getvlist(item.inspection_minor) || getvlist(item.inspection_minor)>parseInt(item.large_range)"><i class="iconfont icon-gantanhao gth"></i></span></span> 
107
+                   <span v-if="item.range_type == 1 && getvlist(item.inspection_minor)==0"></span>
108
+                   <span v-if="item.range_type == 2 && getvlistwo(item.inspection_minor)!=''"><span v-if="getvlistwo(item.inspection_minor)==item.range_value"><i class="iconfont icon-gou gou"></i></span></span>
109
+                   <span v-if="item.range_type == 2 && getvlistwo(item.inspection_minor)!=''"><span v-if="getvlistwo(item.inspection_minor)!=item.range_value"><i class="iconfont icon-gantanhao gth"></i></span></span>
110
+                   <span v-if="item.range_type == 2 && getvlistwo(item.inspection_minor)==''"></span>
107
                 </div>
111
                 </div>
108
               </div>
112
               </div>
109
             </div>
113
             </div>
133
 import LineChart1 from '../qcd/components/LineChart1'
137
 import LineChart1 from '../qcd/components/LineChart1'
134
 import { uParseTime } from "@/utils/tools";
138
 import { uParseTime } from "@/utils/tools";
135
  import { PostSearch} from '@/api/patient'
139
  import { PostSearch} from '@/api/patient'
136
-import { getCurrentOrgPatients,GetQualityControl,getNormData,getPatientComplianceDetail } from "@/api/common/common"
140
+import { getCurrentOrgPatients,GetQualityControl,getNormData,getPatientComplianceDetail,getIdSlist } from "@/api/common/common"
137
 export default {
141
 export default {
138
   components: {
142
   components: {
139
     LineChart,
143
     LineChart,
418
       },
422
       },
419
       inspect_date:0,
423
       inspect_date:0,
420
       monthActive:0,
424
       monthActive:0,
421
-      otherData:[]
425
+      otherData:[],
426
+      vlist:[],
427
+      ids:[],
422
     };
428
     };
423
   },
429
   },
424
   methods: {
430
   methods: {
441
         var monthEndDate = moment().endOf('month').format('YYYY-MM-DD HH:mm:ss');
447
         var monthEndDate = moment().endOf('month').format('YYYY-MM-DD HH:mm:ss');
442
         this.endtime =Date.parse(monthEndDate)/1000-1;//s
448
         this.endtime =Date.parse(monthEndDate)/1000-1;//s
443
          this.getlistDetail()
449
          this.getlistDetail()
450
+         this.getIdSlist()
444
       }
451
       }
445
 
452
 
446
       //近三月
453
       //近三月
457
         this.endtime = Date.parse(endDate)/1000
464
         this.endtime = Date.parse(endDate)/1000
458
     
465
     
459
         this.getlistDetail()
466
         this.getlistDetail()
467
+         this.getIdSlist()
460
       }
468
       }
461
     
469
     
462
 
470
 
471
         const endDate = moment(new Date()).format('YYYY-MM-DD')
479
         const endDate = moment(new Date()).format('YYYY-MM-DD')
472
         this.endtime = Date.parse(endDate)/1000
480
         this.endtime = Date.parse(endDate)/1000
473
         this.getlistDetail()
481
         this.getlistDetail()
482
+         this.getIdSlist()
474
       }
483
       }
475
 
484
 
476
       //近一年
485
       //近一年
483
         const endDate = moment(new Date()).format('YYYY-MM-DD')
492
         const endDate = moment(new Date()).format('YYYY-MM-DD')
484
         this.endtime = Date.parse(endDate)/1000
493
         this.endtime = Date.parse(endDate)/1000
485
         this.getlistDetail()
494
         this.getlistDetail()
495
+         this.getIdSlist()
486
       }
496
       }
487
 
497
 
488
 
498
 
549
      this.patientid = val.id
559
      this.patientid = val.id
550
      this.patient_name = val.name
560
      this.patient_name = val.name
551
       this.getlistDetail()
561
       this.getlistDetail()
562
+      this.getIdSlist()
552
     },
563
     },
553
    getCurrentOrgPatients(){
564
    getCurrentOrgPatients(){
554
       getCurrentOrgPatients().then(response=>{
565
       getCurrentOrgPatients().then(response=>{
567
     getNormData(){
578
     getNormData(){
568
       getNormData().then(response=>{
579
       getNormData().then(response=>{
569
          var normdata = response.data.data.normdata
580
          var normdata = response.data.data.normdata
570
-         console.log("normdata",normdata)
581
+        //  console.log("normdata",normdata)
571
           for(let i=0;i<normdata.length;i++){
582
           for(let i=0;i<normdata.length;i++){
572
             this.item_id = normdata[0].inspection_minor
583
             this.item_id = normdata[0].inspection_minor
573
             this.itemName = normdata[0].item_name + "("+normdata[0].min_range + "-"+normdata[0].large_range +")"+normdata[0].unit
584
             this.itemName = normdata[0].item_name + "("+normdata[0].min_range + "-"+normdata[0].large_range +")"+normdata[0].unit
585
+            this.ids.push(normdata[i].inspection_minor)
574
           }
586
           }
587
+          // console.log("ids",this.ids)
575
           this.normData = normdata
588
           this.normData = normdata
576
           this.getlist()
589
           this.getlist()
590
+          this.getIdSlist()
577
       })
591
       })
578
     },
592
     },
579
     getlist(){
593
     getlist(){
603
        GetQualityControl(params).then(response=>{
617
        GetQualityControl(params).then(response=>{
604
           if(response.data.state == 1){
618
           if(response.data.state == 1){
605
             var list = response.data.data.list
619
             var list = response.data.data.list
606
-            console.log("list是什么",list)
620
+            // console.log("list是什么",list)
607
             for(let i=0;i<list.length;i++){
621
             for(let i=0;i<list.length;i++){
608
               if(parseInt(list[i].inspect_value)>= parseInt(list[i].range_min) && parseInt(list[i].inspect_value)<= parseInt(list[i].range_max)){
622
               if(parseInt(list[i].inspect_value)>= parseInt(list[i].range_min) && parseInt(list[i].inspect_value)<= parseInt(list[i].range_max)){
609
                     this.isTrue = 1  
623
                     this.isTrue = 1  
665
             endtime:this.endtime,
679
             endtime:this.endtime,
666
             itemid:this.item_id,
680
             itemid:this.item_id,
667
           }
681
           }
668
-        console.log("params",params)
682
+        // console.log("params",params)
669
        getPatientComplianceDetail(params).then(response=>{
683
        getPatientComplianceDetail(params).then(response=>{
670
             if(response.data.state == 1){
684
             if(response.data.state == 1){
671
               var list =  response.data.data.list
685
               var list =  response.data.data.list
722
         })
736
         })
723
       },
737
       },
724
      handleSelect(val) {
738
      handleSelect(val) {
725
-        console.log("val",val)
739
+        // console.log("val",val)
726
         this.listQuery.search = val.name
740
         this.listQuery.search = val.name
727
         this.patientid = val.id
741
         this.patientid = val.id
728
         for(let i=0;i<this.patientsData.length;i++){
742
         for(let i=0;i<this.patientsData.length;i++){
751
           }
765
           }
752
         }
766
         }
753
 
767
 
768
+      },
769
+      getIdSlist(){
770
+          var ids = []
771
+          ids = this.ids
772
+          this.vlist = []
773
+        getIdSlist({ids:ids},this.patientid).then(response=>{
774
+          if(response.data.state == 1){
775
+            const vlist =  response.data.data.vlist
776
+            console.log("vlist",vlist)
777
+            this.vlist = vlist
778
+          }
779
+        })
780
+      },
781
+      getvlist(id){
782
+        var itemvalue = 0
783
+        for(let i=0;i<this.vlist.length;i++){
784
+          if(id == this.vlist[i].item_id){
785
+             if(this.vlist[i].inspect_type == 1 &&this.vlist[i].inspect_value!=''){
786
+               itemvalue = parseInt(this.vlist[i].inspect_value)
787
+             }else{
788
+               itemvalue = 0
789
+             }
790
+             
791
+          }
792
+        }
793
+        return itemvalue
794
+      },
795
+      getvlistwo(id){
796
+        var itemvalue = ''
797
+        for(let i=0;i<this.vlist.length;i++){
798
+           if(id == this.vlist[i].item_id){
799
+              if(this.vlist[i].inspect_type ==2 && this.vlist[i].inspect_value!=''){
800
+                itemvalue = this.vlist[i].inspect_value
801
+              }else{
802
+                itemvalue = ''
803
+              }
804
+              
805
+            }
806
+        }
807
+        return itemvalue
754
       }
808
       }
755
   },
809
   },
756
 
810
 

+ 131 - 19
src/xt_pages/qcd/statisticalConfiguration.vue 查看文件

16
       <div class="configTable">
16
       <div class="configTable">
17
         <el-table :data="configuraData" border style="width: 100%" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
17
         <el-table :data="configuraData" border style="width: 100%" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
18
           <el-table-column prop="date" label="检验检查大项" width="180">
18
           <el-table-column prop="date" label="检验检查大项" width="180">
19
-              <template slot-scope="scope">{{ scope.row.project_name }}</template>
19
+              <template slot-scope="scope">
20
+                <span v-if="scope.row.is_status == 1">{{ scope.row.project_name }}</span> 
21
+                <span v-if="scope.row.is_status == 0 && scope.row.inspection_major == 0">血压</span> 
22
+              </template>
20
           </el-table-column>
23
           </el-table-column>
21
           <el-table-column prop="name" label="检查小项" width="300">
24
           <el-table-column prop="name" label="检查小项" width="300">
22
-             <template slot-scope="scope">{{ scope.row.item_name }}</template>
25
+             <template slot-scope="scope">
26
+               <span v-if="scope.row.is_status == 1">{{ scope.row.item_name }}</span>
27
+               <span v-if="scope.row.is_status == 0 && scope.row.inspection_minor == -1">收缩压</span>
28
+               <span v-if="scope.row.is_status == 0 && scope.row.inspection_minor == -2">舒张压</span>
29
+             </template>
23
           </el-table-column>
30
           </el-table-column>
24
           <el-table-column prop="address" label="范围">
31
           <el-table-column prop="address" label="范围">
25
              <template slot-scope="scope">
32
              <template slot-scope="scope">
26
-               <span v-if="scope.row.range_type == 1">
33
+               <span v-if="scope.row.range_type == 1 && scope.row.is_status == 1">
27
                  {{ scope.row.min_range }} - {{scope.row.large_range}}
34
                  {{ scope.row.min_range }} - {{scope.row.large_range}}
28
                 </span>
35
                 </span>
29
-                <span v-if="scope.row.range_type == 2">
36
+                <span v-if="scope.row.range_type == 2 && scope.row.is_status == 1 ">
30
                    {{scope.row.range_value}}
37
                    {{scope.row.range_value}}
31
                 </span>
38
                 </span>
39
+                <span v-if="scope.row.is_status == 0">{{ scope.row.min_range }} - {{scope.row.large_range}}</span>
32
              </template>
40
              </template>
33
           </el-table-column>
41
           </el-table-column>
34
            <el-table-column prop="address" label="单位">
42
            <el-table-column prop="address" label="单位">
35
-              <template slot-scope="scope">{{ scope.row.unit }}</template>
43
+              <template slot-scope="scope">
44
+                <span v-if="scope.row.is_status == 1">
45
+                    {{ scope.row.unit }}
46
+                </span>
47
+                <span v-if="scope.row.is_status == 0">
48
+                   mmHg
49
+                </span>
50
+              </template>
36
             </el-table-column>
51
             </el-table-column>
37
             <el-table-column prop="address" label="排序">
52
             <el-table-column prop="address" label="排序">
38
                 <template slot-scope="scope">{{ scope.row.sort }}</template>
53
                 <template slot-scope="scope">{{ scope.row.sort }}</template>
39
             </el-table-column>
54
             </el-table-column>
40
           <el-table-column label="操作" width="180">
55
           <el-table-column label="操作" width="180">
41
             <template slot-scope="scope">
56
             <template slot-scope="scope">
42
-              <el-button size="mini" type="primary" @click="handleEdit(scope.row.id)">编辑</el-button>
43
-              <el-button size="mini" type="danger" @click="handleDelete(scope.row.id,scope.$index)">删除</el-button>
57
+              <span v-if="scope.row.is_status ==1">
58
+                <el-button size="mini" type="primary" @click="handleEdit(scope.row.id)">编辑</el-button>
59
+                <el-button size="mini" type="danger" @click="handleDelete(scope.row.id,scope.$index)">删除</el-button>
60
+              </span>
61
+              <span v-if="scope.row.is_status == 0">
62
+                 <el-button size="mini" type="primary" @click="handleEditTwo(scope.row.id)">编辑</el-button>
63
+                 <el-button size="mini" type="danger" :disabled ="true">删除</el-button>
64
+              </span>
44
             </template>
65
             </template>
45
           </el-table-column>
66
           </el-table-column>
46
         </el-table>
67
         </el-table>
48
           <el-pagination
69
           <el-pagination
49
               @size-change="handleSizeChange"
70
               @size-change="handleSizeChange"
50
               @current-change="handleCurrentChange"
71
               @current-change="handleCurrentChange"
51
-              :page-sizes="[10, 20, 30, 100]"
52
-              :page-size="10"
72
+              :page-sizes="[12, 20, 30, 100]"
73
+              :page-size="12"
53
               background
74
               background
54
               style="margin-top:20px;float: right"
75
               style="margin-top:20px;float: right"
55
               layout="total, sizes, prev, pager, next, jumper"
76
               layout="total, sizes, prev, pager, next, jumper"
176
           <el-button type="primary" @click="EditConfiguration('editform')">保 存</el-button>
197
           <el-button type="primary" @click="EditConfiguration('editform')">保 存</el-button>
177
         </div>
198
         </div>
178
       </el-dialog>
199
       </el-dialog>
200
+
201
+
202
+      <el-dialog title="编辑" :visible.sync="editDialogtwo">
203
+        <el-form :model="editform" ref="editform" :rules="rules">
204
+          <el-form-item label="检查大项:" :label-width="formLabelWidth" required prop="inspectionMajor">
205
+              <el-input v-model="editform.inspectionMajor" style="width:200px" :disabled="true"></el-input>
206
+          </el-form-item>
207
+          <el-form-item label="检查小项:" :label-width="formLabelWidth" required prop="inspectionMinor">
208
+             <el-input v-model="editform.inspectionMinor" style="width:200px" :disabled="true"></el-input>
209
+          </el-form-item>
210
+          <div style="display:flex;">
211
+            <el-form-item label="质控范围:" :label-width="formLabelWidth" required prop="min_range">
212
+                <el-input style="width:200px" v-model="editform.min_range"></el-input>
213
+            </el-form-item>
214
+            <span style="margin-top:10px">-</span>
215
+            <el-form-item class='newFormItem' :label-width="formLabelWidth" required prop="large_range">
216
+                <el-input style="width:200px" v-model="editform.large_range"></el-input>
217
+            </el-form-item>
218
+          </div>
219
+          <el-form-item label="排序:" :label-width="formLabelWidth">
220
+            <el-input style="width:200px" v-model="editform.sort"></el-input>
221
+          </el-form-item>
222
+        </el-form>
223
+        <div slot="footer" class="dialog-footer">
224
+          <el-button @click="editDialogtwo = false">取 消</el-button>
225
+          <el-button type="primary" @click="EditBloodPrussre('editform')">保 存</el-button>
226
+        </div>
227
+      </el-dialog>
179
     </div>
228
     </div>
180
   </div>
229
   </div>
181
 </template>
230
 </template>
187
 import PieChart from "../qcd/components/BarChart";
236
 import PieChart from "../qcd/components/BarChart";
188
 import { uParseTime } from "@/utils/tools";
237
 import { uParseTime } from "@/utils/tools";
189
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
238
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
190
-import { getInspectionMajor,getInspectionMinor,getInspectionRange,saveConfiguration,getConfigurationList,getConfigurationDetail,getAllInspectionMinor,UpdateConfiguration,DeleteConfiguration,getLastSort }from "@/api/common/common";
239
+import { getInspectionMajor,getInspectionMinor,getInspectionRange,saveConfiguration,getConfigurationList,getConfigurationDetail,getAllInspectionMinor,UpdateConfiguration,DeleteConfiguration,getLastSort,getBloodPressureDetail,UpdateBloodPrussre }from "@/api/common/common";
191
 export default {
240
 export default {
192
   name: "dialysisTotal",
241
   name: "dialysisTotal",
193
   data() {
242
   data() {
208
       configuraData: [],
257
       configuraData: [],
209
       newDialog: false,
258
       newDialog: false,
210
       editDialog: false,
259
       editDialog: false,
260
+      editDialogtwo:false,
211
       formLabelWidth: "120px",
261
       formLabelWidth: "120px",
212
       form: {
262
       form: {
213
         inspectionMajor: "",
263
         inspectionMajor: "",
256
       getConfigurationDetail(id).then(response=>{
306
       getConfigurationDetail(id).then(response=>{
257
          if(response.data.state == 1){
307
          if(response.data.state == 1){
258
            var configurationdetail = response.data.data.configurationdetail
308
            var configurationdetail = response.data.data.configurationdetail
259
-           console.log("详情",configurationdetail)
309
+ 
260
            var id = response.data.data.vid
310
            var id = response.data.data.vid
261
-           console.log("id",id)
311
+      
262
            if (id == 0) {
312
            if (id == 0) {
263
               this.editform.inspectionMinor = configurationdetail.inspection_minor
313
               this.editform.inspectionMinor = configurationdetail.inspection_minor
264
            }else{
314
            }else{
291
          }
341
          }
292
       })
342
       })
293
     },
343
     },
344
+
345
+    handleEditTwo(id){
346
+       this.editDialogtwo = true
347
+       getBloodPressureDetail(id).then(response=>{
348
+          if(response.data.state == 1){
349
+            var blooddetail =   response.data.data.blooddetail
350
+            if(blooddetail.inspection_major == 0){
351
+              this.editform.inspectionMajor = "血压"
352
+            }
353
+            if(blooddetail.inspection_minor == -1){
354
+              this.editform.inspectionMinor  = "收缩压"
355
+            }
356
+            if(blooddetail.inspection_minor == -2){
357
+              this.editform.inspectionMinor  = "舒张压"
358
+            }
359
+            this.editform.id = blooddetail.id
360
+            this.editform.large_range = blooddetail.large_range
361
+            this.editform.min_range = blooddetail.min_range
362
+            this.editform.sort = blooddetail.sort
363
+          }
364
+       })
365
+    },
294
     
366
     
295
     //获取大项数据来源
367
     //获取大项数据来源
296
     getInspectionMajor(){
368
     getInspectionMajor(){
297
       getInspectionMajor().then(response=>{
369
       getInspectionMajor().then(response=>{
298
         if(response.data.state == 1){
370
         if(response.data.state == 1){
299
           var inspection =  response.data.data.inspection
371
           var inspection =  response.data.data.inspection
300
-           console.log("大项是什么",inspection)
372
+
301
           this.InspectionMajor = inspection
373
           this.InspectionMajor = inspection
302
          
374
          
303
         }
375
         }
309
       getInspectionMinor(id).then(response=>{
381
       getInspectionMinor(id).then(response=>{
310
         if(response.data.state == 1){
382
         if(response.data.state == 1){
311
          var inspection =  response.data.data.inspection
383
          var inspection =  response.data.data.inspection
312
-          // console.log("小项",inspection)
313
          this.InspectionMinor = inspection
384
          this.InspectionMinor = inspection
314
         }
385
         }
315
       })
386
       })
320
        getInspectionMinor(id).then(response=>{
391
        getInspectionMinor(id).then(response=>{
321
         if(response.data.state == 1){
392
         if(response.data.state == 1){
322
          var inspection =  response.data.data.inspection
393
          var inspection =  response.data.data.inspection
323
-        // console.log("小项",inspection)
394
+  
324
          this.InspectionMinorTwo = inspection
395
          this.InspectionMinorTwo = inspection
325
         }
396
         }
326
       })
397
       })
330
        getInspectionRange(id).then(response=>{
401
        getInspectionRange(id).then(response=>{
331
          if(response.data.state == 1){
402
          if(response.data.state == 1){
332
            var inspectionRange =  response.data.data.inspectionRange
403
            var inspectionRange =  response.data.data.inspectionRange
333
-          //  console.log("inspectionRange",inspectionRange)
404
+      
334
            if(inspectionRange.range_type == 1){
405
            if(inspectionRange.range_type == 1){
335
              this.showOne = true
406
              this.showOne = true
336
              this.showTwo = false
407
              this.showTwo = false
394
       getConfigurationList(this.limit,this.page).then(response=>{
465
       getConfigurationList(this.limit,this.page).then(response=>{
395
         if(response.data.state === 1){
466
         if(response.data.state === 1){
396
           var configurationlist = response.data.data.configurationlist
467
           var configurationlist = response.data.data.configurationlist
468
+          // console.log("configurationlist",configurationlist)
469
+          if(this.page == 1){
470
+             var pressure = response.data.data.pressure
471
+            //  console.log("pressure",pressure)
472
+             pressure.map(item=>{
473
+             configurationlist.push(item)
474
+            })
475
+          }
476
+        
397
           for(let i=0;i<configurationlist.length;i++){
477
           for(let i=0;i<configurationlist.length;i++){
398
             if(configurationlist[i].sort === 0){
478
             if(configurationlist[i].sort === 0){
399
               configurationlist[i].sort = ""
479
               configurationlist[i].sort = ""
400
             }
480
             }
401
           }
481
           }
402
-          console.log("列表",configurationlist)
482
+
483
+          var newarr  =   configurationlist.sort((a,b)=>{ return a.sort-b.sort})
484
+          // console.log("排序",newarr)
403
           this.configuraData = configurationlist
485
           this.configuraData = configurationlist
404
           var total = response.data.data.total
486
           var total = response.data.data.total
405
-         // console.log("total",total)
406
-          this.total = total
487
+          // console.log("total",total)
488
+          this.total = total+2
407
         }
489
         }
408
       })
490
       })
409
     },
491
     },
485
          this.form.range_value = ""
567
          this.form.range_value = ""
486
          this.editform.range_value = ""
568
          this.editform.range_value = ""
487
       }
569
       }
570
+    },
571
+    EditBloodPrussre(formName){
572
+       if(this.editform.sort == ""){
573
+         this.editform.sort = 0
574
+       }
575
+       if(this.editform.sort!=""){
576
+        var sorts =  this.editform.sort
577
+        var sort = parseInt(sorts)
578
+        this.editform.sort = sort
579
+       }
580
+      if(this.editform.inspectionMajor == "血压"){
581
+            this.editform.inspectionMajor = 0
582
+        }
583
+      if(this.editform.inspectionMinor == "收缩压"){
584
+            this.editform.inspectionMinor = -1
585
+        }
586
+      if(this.editform.inspectionMinor == "舒张压"){
587
+           this.editform.inspectionMinor = -2
588
+        }
589
+
590
+       this.$refs[formName].validate(valid=>{
591
+          UpdateBloodPrussre(this.editform.id,this.editform).then(response=>{
592
+             if(response.data.state == 1){
593
+              var standard =  response.data.data.standard
594
+              this.editDialogtwo = false
595
+              this.getConfigurationList()
596
+              this.$message.success("修改成功")
597
+             }
598
+          })
599
+       })
488
     }
600
     }
489
   },
601
   },
490
   components: {
602
   components: {