XMLWAN 4 lat temu
rodzic
commit
e899c32b3b

Plik diff jest za duży
+ 884 - 80
src/xt_pages/qcd/officesControlAnalysis/project.vue


+ 121 - 25
src/xt_pages/qcd/officesControlAnalysis/time.vue Wyświetl plik

@@ -96,9 +96,12 @@
96 96
       </div>
97 97
       <div class="cell clearfix newDisplay">
98 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 105
         </span> 
103 106
       </div>
104 107
     </div>
@@ -126,6 +129,8 @@ export default {
126 129
           return time.getTime() > Date.now() || time.getTime() < threeMonths;;
127 130
         }
128 131
       },  
132
+      sortOne:0,
133
+      sortTwo:0,
129 134
       modetype:0,
130 135
       startime:"",
131 136
       endtime:"",
@@ -140,6 +145,7 @@ export default {
140 145
         { path: false, name: "按时间分组" }
141 146
       ],
142 147
       normData:[],
148
+      newArrData:[],
143 149
       listQuery: {
144 150
         start_time: "",
145 151
         end_time: "",
@@ -292,7 +298,11 @@ export default {
292 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 308
   methods: {
@@ -345,17 +355,21 @@ export default {
345 355
       this.listQuery.state = state;
346 356
     },
347 357
     chooseType(val) {
358
+       this.modesData.series = []
359
+       this.modesData.xAxis = []
348 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 366
        if(val == "按季度统计对比"){
354
-         this.modetype = 1
355
-         
367
+         this.modetype = 0
368
+         this.getlist()
356 369
       }
357 370
       if(val == "自定义"){
358 371
         this.modetype = 2
372
+        
359 373
       }
360 374
      
361 375
     },
@@ -481,9 +495,34 @@ export default {
481 495
     getNormData(){
482 496
       getNormData().then(response=>{
483 497
          if(response.data.state === 1){
498
+           var newArr = []
484 499
            var normdata = response.data.data.normdata
500
+           newArr  = normdata
485 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 526
            this.getlist()
488 527
          }
489 528
       })
@@ -595,25 +634,82 @@ export default {
595 634
       getFirstQuarter(params).then(response=>{
596 635
          if(response.data.state === 1){
597 636
             var count =  response.data.data.count
598
-          //  console.log("count",count) 
637
+    
599 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 696
             countwo.map(item=>{
602 697
               count.push(item)
603 698
             })
604
-          //  console.log("count",count)
699
+         
605 700
             //获取已经配置的数据 
606 701
             var arr=[]
607 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 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 713
             for(let i=0;i<arrtwo.length;i++){
618 714
                 this.$set(arrtwo[i], 'Count', 0)
619 715
               }
@@ -623,12 +719,13 @@ export default {
623 719
             arrtwo.map(item => {
624 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 729
             for(const key in this.normData ){
633 730
                this.modesData.xAxis.push(this.normData[key].item_name);
634 731
                 if(key in arr){
@@ -640,7 +737,6 @@ export default {
640 737
             this.chart.series[0].data = this.modesData.series
641 738
             this.chart.xAxis.data = this.modesData.xAxis
642 739
             this.getArrLength(this.chart.xAxis.data)
643
-            // console.log('====',this.modesData) 
644 740
           
645 741
          }
646 742
       })
@@ -654,7 +750,7 @@ export default {
654 750
     },
655 751
     arrayDate(array1,array2){
656 752
         var array1 = array1;
657
-        var array2 = this.normData;
753
+        var array2 = array2;
658 754
         var result = [];
659 755
         for(var i = 0; i < array2.length; i++){
660 756
             var obj = array2[i];

+ 62 - 8
src/xt_pages/qcd/patientComplianceDetails.vue Wyświetl plik

@@ -102,8 +102,12 @@
102 102
                   @click="clickQuality(index,item.inspection_minor)"
103 103
                 >
104 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 111
                 </div>
108 112
               </div>
109 113
             </div>
@@ -133,7 +137,7 @@ import LineChart from "../qcd/components/LineChart";
133 137
 import LineChart1 from '../qcd/components/LineChart1'
134 138
 import { uParseTime } from "@/utils/tools";
135 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 141
 export default {
138 142
   components: {
139 143
     LineChart,
@@ -418,7 +422,9 @@ export default {
418 422
       },
419 423
       inspect_date:0,
420 424
       monthActive:0,
421
-      otherData:[]
425
+      otherData:[],
426
+      vlist:[],
427
+      ids:[],
422 428
     };
423 429
   },
424 430
   methods: {
@@ -441,6 +447,7 @@ export default {
441 447
         var monthEndDate = moment().endOf('month').format('YYYY-MM-DD HH:mm:ss');
442 448
         this.endtime =Date.parse(monthEndDate)/1000-1;//s
443 449
          this.getlistDetail()
450
+         this.getIdSlist()
444 451
       }
445 452
 
446 453
       //近三月
@@ -457,6 +464,7 @@ export default {
457 464
         this.endtime = Date.parse(endDate)/1000
458 465
     
459 466
         this.getlistDetail()
467
+         this.getIdSlist()
460 468
       }
461 469
     
462 470
 
@@ -471,6 +479,7 @@ export default {
471 479
         const endDate = moment(new Date()).format('YYYY-MM-DD')
472 480
         this.endtime = Date.parse(endDate)/1000
473 481
         this.getlistDetail()
482
+         this.getIdSlist()
474 483
       }
475 484
 
476 485
       //近一年
@@ -483,6 +492,7 @@ export default {
483 492
         const endDate = moment(new Date()).format('YYYY-MM-DD')
484 493
         this.endtime = Date.parse(endDate)/1000
485 494
         this.getlistDetail()
495
+         this.getIdSlist()
486 496
       }
487 497
 
488 498
 
@@ -549,6 +559,7 @@ export default {
549 559
      this.patientid = val.id
550 560
      this.patient_name = val.name
551 561
       this.getlistDetail()
562
+      this.getIdSlist()
552 563
     },
553 564
    getCurrentOrgPatients(){
554 565
       getCurrentOrgPatients().then(response=>{
@@ -567,13 +578,16 @@ export default {
567 578
     getNormData(){
568 579
       getNormData().then(response=>{
569 580
          var normdata = response.data.data.normdata
570
-         console.log("normdata",normdata)
581
+        //  console.log("normdata",normdata)
571 582
           for(let i=0;i<normdata.length;i++){
572 583
             this.item_id = normdata[0].inspection_minor
573 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 588
           this.normData = normdata
576 589
           this.getlist()
590
+          this.getIdSlist()
577 591
       })
578 592
     },
579 593
     getlist(){
@@ -603,7 +617,7 @@ export default {
603 617
        GetQualityControl(params).then(response=>{
604 618
           if(response.data.state == 1){
605 619
             var list = response.data.data.list
606
-            console.log("list是什么",list)
620
+            // console.log("list是什么",list)
607 621
             for(let i=0;i<list.length;i++){
608 622
               if(parseInt(list[i].inspect_value)>= parseInt(list[i].range_min) && parseInt(list[i].inspect_value)<= parseInt(list[i].range_max)){
609 623
                     this.isTrue = 1  
@@ -665,7 +679,7 @@ export default {
665 679
             endtime:this.endtime,
666 680
             itemid:this.item_id,
667 681
           }
668
-        console.log("params",params)
682
+        // console.log("params",params)
669 683
        getPatientComplianceDetail(params).then(response=>{
670 684
             if(response.data.state == 1){
671 685
               var list =  response.data.data.list
@@ -722,7 +736,7 @@ export default {
722 736
         })
723 737
       },
724 738
      handleSelect(val) {
725
-        console.log("val",val)
739
+        // console.log("val",val)
726 740
         this.listQuery.search = val.name
727 741
         this.patientid = val.id
728 742
         for(let i=0;i<this.patientsData.length;i++){
@@ -751,6 +765,46 @@ export default {
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 Wyświetl plik

@@ -16,31 +16,52 @@
16 16
       <div class="configTable">
17 17
         <el-table :data="configuraData" border style="width: 100%" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
18 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 23
           </el-table-column>
21 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 30
           </el-table-column>
24 31
           <el-table-column prop="address" label="范围">
25 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 34
                  {{ scope.row.min_range }} - {{scope.row.large_range}}
28 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 37
                    {{scope.row.range_value}}
31 38
                 </span>
39
+                <span v-if="scope.row.is_status == 0">{{ scope.row.min_range }} - {{scope.row.large_range}}</span>
32 40
              </template>
33 41
           </el-table-column>
34 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 51
             </el-table-column>
37 52
             <el-table-column prop="address" label="排序">
38 53
                 <template slot-scope="scope">{{ scope.row.sort }}</template>
39 54
             </el-table-column>
40 55
           <el-table-column label="操作" width="180">
41 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 65
             </template>
45 66
           </el-table-column>
46 67
         </el-table>
@@ -48,8 +69,8 @@
48 69
           <el-pagination
49 70
               @size-change="handleSizeChange"
50 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 74
               background
54 75
               style="margin-top:20px;float: right"
55 76
               layout="total, sizes, prev, pager, next, jumper"
@@ -176,6 +197,34 @@
176 197
           <el-button type="primary" @click="EditConfiguration('editform')">保 存</el-button>
177 198
         </div>
178 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 228
     </div>
180 229
   </div>
181 230
 </template>
@@ -187,7 +236,7 @@ import { GetOICData } from "@/api/qcd";
187 236
 import PieChart from "../qcd/components/BarChart";
188 237
 import { uParseTime } from "@/utils/tools";
189 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 240
 export default {
192 241
   name: "dialysisTotal",
193 242
   data() {
@@ -208,6 +257,7 @@ export default {
208 257
       configuraData: [],
209 258
       newDialog: false,
210 259
       editDialog: false,
260
+      editDialogtwo:false,
211 261
       formLabelWidth: "120px",
212 262
       form: {
213 263
         inspectionMajor: "",
@@ -256,9 +306,9 @@ export default {
256 306
       getConfigurationDetail(id).then(response=>{
257 307
          if(response.data.state == 1){
258 308
            var configurationdetail = response.data.data.configurationdetail
259
-           console.log("详情",configurationdetail)
309
+ 
260 310
            var id = response.data.data.vid
261
-           console.log("id",id)
311
+      
262 312
            if (id == 0) {
263 313
               this.editform.inspectionMinor = configurationdetail.inspection_minor
264 314
            }else{
@@ -291,13 +341,35 @@ export default {
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 368
     getInspectionMajor(){
297 369
       getInspectionMajor().then(response=>{
298 370
         if(response.data.state == 1){
299 371
           var inspection =  response.data.data.inspection
300
-           console.log("大项是什么",inspection)
372
+
301 373
           this.InspectionMajor = inspection
302 374
          
303 375
         }
@@ -309,7 +381,6 @@ export default {
309 381
       getInspectionMinor(id).then(response=>{
310 382
         if(response.data.state == 1){
311 383
          var inspection =  response.data.data.inspection
312
-          // console.log("小项",inspection)
313 384
          this.InspectionMinor = inspection
314 385
         }
315 386
       })
@@ -320,7 +391,7 @@ export default {
320 391
        getInspectionMinor(id).then(response=>{
321 392
         if(response.data.state == 1){
322 393
          var inspection =  response.data.data.inspection
323
-        // console.log("小项",inspection)
394
+  
324 395
          this.InspectionMinorTwo = inspection
325 396
         }
326 397
       })
@@ -330,7 +401,7 @@ export default {
330 401
        getInspectionRange(id).then(response=>{
331 402
          if(response.data.state == 1){
332 403
            var inspectionRange =  response.data.data.inspectionRange
333
-          //  console.log("inspectionRange",inspectionRange)
404
+      
334 405
            if(inspectionRange.range_type == 1){
335 406
              this.showOne = true
336 407
              this.showTwo = false
@@ -394,16 +465,27 @@ export default {
394 465
       getConfigurationList(this.limit,this.page).then(response=>{
395 466
         if(response.data.state === 1){
396 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 477
           for(let i=0;i<configurationlist.length;i++){
398 478
             if(configurationlist[i].sort === 0){
399 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 485
           this.configuraData = configurationlist
404 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,6 +567,36 @@ export default {
485 567
          this.form.range_value = ""
486 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 602
   components: {