瀏覽代碼

bug修改

XMLWAN 4 年之前
父節點
當前提交
6bfdaad036

+ 2 - 0
src/api/common/common.js 查看文件

289
     endtime: endtime,
289
     endtime: endtime,
290
     patientid: patientid
290
     patientid: patientid
291
   }
291
   }
292
+  console.log('病人新项目', params)
292
   return request({
293
   return request({
293
     url: '/com/api/getinspectiontotalcount',
294
     url: '/com/api/getinspectiontotalcount',
294
     method: 'get',
295
     method: 'get',
302
     startime: startime,
303
     startime: startime,
303
     endtime: endtime
304
     endtime: endtime
304
   }
305
   }
306
+  console.log('params', params)
305
   return request({
307
   return request({
306
     url: '/com/api/getinspectionDetailById',
308
     url: '/com/api/getinspectionDetailById',
307
     method: 'get',
309
     method: 'get',

+ 1 - 0
src/xt_pages/qcd/indicatorControlAnalysis/patientInspectionDetail.vue 查看文件

2
   <div class="main-contain">
2
   <div class="main-contain">
3
     <div class="position">
3
     <div class="position">
4
       <bread-crumb :crumbs="crumbs"></bread-crumb>
4
       <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+      <el-button type="primary" @click="$router.back(-1)">返回</el-button>
5
     </div>
6
     </div>
6
     <div class="app-container">
7
     <div class="app-container">
7
       <div class="cell clearfix">
8
       <div class="cell clearfix">

+ 3 - 2
src/xt_pages/qcd/officesControlAnalysis/time.vue 查看文件

619
             arrtwo.map(item => {
619
             arrtwo.map(item => {
620
               arr.push(item)
620
               arr.push(item)
621
             })
621
             })
622
-            arr.sort(this.compare('sort'))    
622
+            arr.sort(this.compare('sort'))  
623
+            console.log("arr",arr)
623
             for(const key in this.normData ){
624
             for(const key in this.normData ){
624
                this.modesData.xAxis.push(this.normData[key].item_name);
625
                this.modesData.xAxis.push(this.normData[key].item_name);
625
                 if(key in arr){
626
                 if(key in arr){
631
             this.chart.series[0].data = this.modesData.series
632
             this.chart.series[0].data = this.modesData.series
632
             this.chart.xAxis.data = this.modesData.xAxis
633
             this.chart.xAxis.data = this.modesData.xAxis
633
             this.getArrLength(this.chart.xAxis.data)
634
             this.getArrLength(this.chart.xAxis.data)
634
-
635
+            console.log('====',this.modesData) 
635
           
636
           
636
          }
637
          }
637
       })
638
       })

+ 2 - 0
src/xt_pages/qcd/patientComplianceDetails.vue 查看文件

356
       })
356
       })
357
     },
357
     },
358
     getlist(){
358
     getlist(){
359
+        console.log("进来没有")
359
         this.modesData.series = []
360
         this.modesData.series = []
360
         this.modesData.xAxis = []
361
         this.modesData.xAxis = []
361
         const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
362
         const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
380
        GetQualityControl(params).then(response=>{
381
        GetQualityControl(params).then(response=>{
381
           if(response.data.state == 1){
382
           if(response.data.state == 1){
382
             var list = response.data.data.list
383
             var list = response.data.data.list
384
+            console.log("list",list)
383
             for(let i=0;i<list.length;i++){
385
             for(let i=0;i<list.length;i++){
384
               if(parseInt(list[i].inspect_value)>= parseInt(list[i].range_min) && parseInt(list[i].inspect_value)<= parseInt(list[i].range_max)){
386
               if(parseInt(list[i].inspect_value)>= parseInt(list[i].range_min) && parseInt(list[i].inspect_value)<= parseInt(list[i].range_max)){
385
                     this.isTrue = 1  
387
                     this.isTrue = 1  

+ 74 - 32
src/xt_pages/qcd/patientControlAnalysis.vue 查看文件

78
             <el-table-column fixed prop="name" label="姓名" width="100"></el-table-column>
78
             <el-table-column fixed prop="name" label="姓名" width="100"></el-table-column>
79
             <el-table-column label="透析号" width="80">
79
             <el-table-column label="透析号" width="80">
80
               <template slot-scope="scope">
80
               <template slot-scope="scope">
81
-                  <!-- {{getDialysisNo(scope.row.name)}} -->
82
                   {{scope.row.dialysis_no}}
81
                   {{scope.row.dialysis_no}}
83
               </template>
82
               </template>
84
             </el-table-column>
83
             </el-table-column>
91
               :key="index"
90
               :key="index"
92
             >
91
             >
93
             <template slot-scope="scope">
92
             <template slot-scope="scope">
94
-              <span v-if="scope.row.data[modeItem.item_name].inspect_value == ''">0</span>
95
-              <span v-if="scope.row.data[modeItem.item_name].inspect_value !=''&& (parseInt(scope.row.data[modeItem.item_name].inspect_value) < parseInt(scope.row.data[modeItem.item_name].range_min))">
93
+              <span v-if="scope.row.data[modeItem.item_name].range_type == 1 && scope.row.data[modeItem.item_name].inspect_value == ''">0</span>
94
+              <span v-if="scope.row.data[modeItem.item_name].range_type == 1 && scope.row.data[modeItem.item_name].inspect_value !=''&& (parseInt(scope.row.data[modeItem.item_name].inspect_value) < parseInt(scope.row.data[modeItem.item_name].range_min))">
96
                 <span >{{scope.row.data[modeItem.item_name].inspect_value}}</span><span style="color:#5B98FF;margin-left:5px;">↓</span>
95
                 <span >{{scope.row.data[modeItem.item_name].inspect_value}}</span><span style="color:#5B98FF;margin-left:5px;">↓</span>
97
               </span>
96
               </span>
98
-              <span v-if="scope.row.data[modeItem.item_name].inspect_value !=''&& (parseInt(scope.row.data[modeItem.item_name].inspect_value) > parseInt(scope.row.data[modeItem.item_name].range_max))">
97
+              <span v-if="scope.row.data[modeItem.item_name].range_type == 1 && scope.row.data[modeItem.item_name].inspect_value !=''&& (parseInt(scope.row.data[modeItem.item_name].inspect_value) > parseInt(scope.row.data[modeItem.item_name].range_max))">
99
                 <span>{{scope.row.data[modeItem.item_name].inspect_value}}</span><span style="color:#F56C6C;margin-left:5px;">↑</span>
98
                 <span>{{scope.row.data[modeItem.item_name].inspect_value}}</span><span style="color:#F56C6C;margin-left:5px;">↑</span>
100
               </span>
99
               </span>
101
-              <span v-if="scope.row.data[modeItem.item_name].inspect_value !=''&& (parseInt(scope.row.data[modeItem.item_name].inspect_value) >= parseInt(scope.row.data[modeItem.item_name].range_min))&& (parseInt(scope.row.data[modeItem.item_name].inspect_value) <= parseInt(scope.row.data[modeItem.item_name].range_max)) ">{{scope.row.data[modeItem.item_name].inspect_value}}</span>
100
+              <span v-if="scope.row.data[modeItem.item_name].range_type == 1 && scope.row.data[modeItem.item_name].inspect_value !=''&& (parseInt(scope.row.data[modeItem.item_name].inspect_value) >= parseInt(scope.row.data[modeItem.item_name].range_min))&& (parseInt(scope.row.data[modeItem.item_name].inspect_value) <= parseInt(scope.row.data[modeItem.item_name].range_max)) ">{{scope.row.data[modeItem.item_name].inspect_value}}</span>
101
+              <span v-if="scope.row.data[modeItem.item_name].range_type == 2 && scope.row.data[modeItem.item_name].inspect_value !=''">
102
+                <span v-if="scope.row.data[modeItem.item_name].range_value == scope.row.data[modeItem.item_name].inspect_value">
103
+                   <span style="color:#5B98FF;margin-left:5px;" >{{scope.row.data[modeItem.item_name].inspect_value}}</span>
104
+                </span>
105
+                 <span v-if="scope.row.data[modeItem.item_name].range_value != scope.row.data[modeItem.item_name].inspect_value">
106
+                   <span style="color:#F56C6C;margin-left:5px;" >{{scope.row.data[modeItem.item_name].inspect_value}}</span>
107
+                </span>
108
+              </span>
102
             </template>
109
             </template>
103
         </el-table-column>
110
         </el-table-column>
104
             <el-table-column fixed="right" label="操作" width="100">
111
             <el-table-column fixed="right" label="操作" width="100">
153
         start_time: "",
160
         start_time: "",
154
         end_time: "",
161
         end_time: "",
155
         page: 1,
162
         page: 1,
156
-        limit: 20
163
+        limit: 10
157
       },
164
       },
158
       total:0,
165
       total:0,
159
       lapstor:0,
166
       lapstor:0,
358
        getPatientContorlAnalysis(params).then(response=>{
365
        getPatientContorlAnalysis(params).then(response=>{
359
            if(response.data.state == 1){
366
            if(response.data.state == 1){
360
               var control = response.data.data.patientcontorDetail
367
               var control = response.data.data.patientcontorDetail
361
-              console.log("control",control)
368
+             console.log("control",control)
362
               let dataInfo = {}
369
               let dataInfo = {}
363
               control.forEach((item, index) => {
370
               control.forEach((item, index) => {
364
                 let { inspect_date } = item
371
                 let { inspect_date } = item
367
                     inspect_date,
374
                     inspect_date,
368
                     name: item.name,
375
                     name: item.name,
369
                     child: [],
376
                     child: [],
370
-                    patient_id: item.patient_id
371
-
377
+                    patient_id: item.patient_id,
378
+                    range_type:item.range_type,
379
+                    dialysis_no:item.dialysis_no
372
                   }
380
                   }
373
                 }
381
                 }
374
               })
382
               })
397
                     }
405
                     }
398
                   }
406
                   }
399
                 }
407
                 }
400
-                console.log("arrthree",arrthree)
408
+                // console.log("arrthree",arrthree)
401
                 var arrfour = this.arrayDate(arrthree, newarrtwo)
409
                 var arrfour = this.arrayDate(arrthree, newarrtwo)
402
                 arrfour.map(item => {
410
                 arrfour.map(item => {
403
                   item.item_name = ''
411
                   item.item_name = ''
413
                     dd[arrthree[index].inspect_date][arrthree[index].item_name] = arrthree[index]
421
                     dd[arrthree[index].inspect_date][arrthree[index].item_name] = arrthree[index]
414
                   }
422
                   }
415
                 }
423
                 }
416
-
417
                 this.tableData = []
424
                 this.tableData = []
418
 
425
 
419
                 for (const key in dd) {
426
                 for (const key in dd) {
422
                       dd[key][this.ObjectData[mkey].item_name] = {
429
                       dd[key][this.ObjectData[mkey].item_name] = {
423
                         item_name: this.ObjectData[mkey].item_name,
430
                         item_name: this.ObjectData[mkey].item_name,
424
                         name: mkey,
431
                         name: mkey,
425
-                        inspect_value: 0
432
+                        inspect_value: 0,
433
+                        range_type:this.ObjectData[mkey].range_type  
426
                       }
434
                       }
427
                     }
435
                     }
428
                   }
436
                   }
429
                   this.tableData.push({ name: key, data: dd[key]})
437
                   this.tableData.push({ name: key, data: dd[key]})
430
                 }
438
                 }
439
+                console.log("表哥===========",this.tableData)
431
               let dataInfotwo = {}
440
               let dataInfotwo = {}
432
               control.forEach((item, index) => {
441
               control.forEach((item, index) => {
433
                 let { inspect_date } = item
442
                 let { inspect_date } = item
435
                   dataInfotwo[inspect_date] = {
444
                   dataInfotwo[inspect_date] = {
436
                     inspect_date,
445
                     inspect_date,
437
                     name: item.name,
446
                     name: item.name,
447
+                    dialysis_no:item.dialysis_no
438
                   }
448
                   }
439
                 }
449
                 }
440
               })
450
               })
441
               let listtwo = Object.values(dataInfotwo)
451
               let listtwo = Object.values(dataInfotwo)
452
+              // console.log("listtwo",listtwo)
442
                 listtwo.map(item=>{
453
                 listtwo.map(item=>{
443
                   this.tableData.map(it=>{
454
                   this.tableData.map(it=>{
444
                     if(item.inspect_date == parseInt(it.name)){
455
                     if(item.inspect_date == parseInt(it.name)){
445
                       it.name = item.name
456
                       it.name = item.name
457
+                      it.dialysis_no = item.dialysis_no
446
                     }
458
                     }
447
                   })
459
                   })
448
                 })
460
                 })
480
             var total = response.data.data.total
492
             var total = response.data.data.total
481
             this.total = total
493
             this.total = total
482
             var control = response.data.data.control
494
             var control = response.data.data.control
495
+           var infectiousControl =  response.data.data.infectiousControl
496
+          //  console.log("infectiousContrl",infectiousControl)
497
+           infectiousControl.map(item=>{
498
+             control.push(item)
499
+           })
483
             // console.log("control",control)
500
             // console.log("control",control)
484
             var newArr = []
501
             var newArr = []
485
             // 分页
502
             // 分页
499
                 inspect_date,
516
                 inspect_date,
500
                 name: item.name,
517
                 name: item.name,
501
                 child: [],
518
                 child: [],
502
-                patient_id: item.patient_id
519
+                patient_id: item.patient_id,
520
+                range_type:item.range_type
503
               }
521
               }
504
             }
522
             }
505
           })
523
           })
557
                 name: item.name,
575
                 name: item.name,
558
                 inspect_value:item.inspect_value,
576
                 inspect_value:item.inspect_value,
559
                 id:item.id,
577
                 id:item.id,
560
-                inspect_date:item.inspect_date
578
+                inspect_date:item.inspect_date,
561
               }
579
               }
562
             }
580
             }
563
           })
581
           })
564
         let listtwo = Object.values(dataInfotwo)
582
         let listtwo = Object.values(dataInfotwo)
565
-        console.log("listtwo",listtwo)
583
+        // console.log("listtwo",listtwo)
566
           for (const key in dd) {
584
           for (const key in dd) {
567
             for (const mkey in this.ObjectData) {
585
             for (const mkey in this.ObjectData) {
568
               if (!(this.ObjectData[mkey].item_name in dd[key])) {
586
               if (!(this.ObjectData[mkey].item_name in dd[key])) {
569
                 dd[key][this.ObjectData[mkey].item_name] = {
587
                 dd[key][this.ObjectData[mkey].item_name] = {
570
                   item_name: this.ObjectData[mkey].item_name,
588
                   item_name: this.ObjectData[mkey].item_name,
571
                   name: mkey,
589
                   name: mkey,
572
-                  inspect_value: 0
590
+                  inspect_value: 0,
591
+                  range_type:this.ObjectData[mkey].range_type
573
                 }
592
                 }
574
               }
593
               }
575
             }
594
             }
593
                }
612
                }
594
              }
613
              }
595
           }
614
           }
596
-         console.log("表哥123",this.tableData)
615
+        //  console.log("表哥123",this.tableData)
597
          }
616
          }
598
       })
617
       })
599
     },
618
     },
628
        getCartogramlist(this.lapstor,this.listQuery.start_time,this.listQuery.end_time,this.limit,this.page).then(response=>{
647
        getCartogramlist(this.lapstor,this.listQuery.start_time,this.listQuery.end_time,this.limit,this.page).then(response=>{
629
            if(response.data.state == 1){
648
            if(response.data.state == 1){
630
               var cartogramlist =  response.data.data.cartogramlist
649
               var cartogramlist =  response.data.data.cartogramlist
631
-            //  console.log("cartogramlist",cartogramlist)
650
+              // console.log("cartogramlist",cartogramlist)
632
               var totaltwo =  response.data.data.total
651
               var totaltwo =  response.data.data.total
633
               // console.log("totaltwo",totaltwo)
652
               // console.log("totaltwo",totaltwo)
653
+              var infectiouscontrol =  response.data.data.infectiouscontrol
654
+              // console.log("infectiouscontrol",infectiouscontrol)
655
+              infectiouscontrol.map(item=>{
656
+                cartogramlist.push(item)
657
+              })
634
                var cart = []
658
                var cart = []
635
-               for(let i=0;i<cartogramlist.length;i++){
636
-                  if(cartogramlist[i].inspect_value != ''){
637
-                    cart.push(cartogramlist[i])
638
-                  }
639
-               }
659
+              //  console.log("已配置的选项",this.normData)
660
+              //过滤已经配置的选项
661
+              for(let i=0;i<cartogramlist.length;i++){
662
+                for(let j=0;j<this.normData.length;j++){
663
+                   if(cartogramlist[i].item_id == this.normData[j].inspection_minor){
664
+                        cart.push(cartogramlist[i])
665
+                   }
666
+                }
667
+              }
668
+            //  console.log("cart",cart)
669
+
670
+              //  for(let i=0;i<cartogramlist.length;i++){
671
+              //     if(cartogramlist[i].inspect_value != ''){
672
+              //       cart.push(cartogramlist[i])
673
+              //     }
674
+              //  }
640
               // console.log("cart",cart)
675
               // console.log("cart",cart)
641
                let dataInfo = {}
676
                let dataInfo = {}
642
                 cart.forEach((item, index) => {
677
                 cart.forEach((item, index) => {
643
-                  let { inspect_date } = item
644
-                  if (!dataInfo[inspect_date]) {
645
-                    dataInfo[inspect_date] = {
646
-                      inspect_date,
678
+                  let { patient_id } = item
679
+                  if (!dataInfo[patient_id]) {
680
+                    dataInfo[patient_id] = {
681
+                      patient_id,
647
                       name:item.name,
682
                       name:item.name,
648
                       child: [],
683
                       child: [],
649
-                      patient_id:item.patient_id,
684
+                      inspect_date:item.inspect_date,
650
                       total:0,
685
                       total:0,
651
                       count:0,
686
                       count:0,
687
+                      infectotal:0,
652
                     }
688
                     }
653
                   }
689
                   }
654
                 })
690
                 })
655
               let list = Object.values(dataInfo)
691
               let list = Object.values(dataInfo)
656
-              console.log("list",list)
692
+
657
 
693
 
658
               var arr = []
694
               var arr = []
659
               list.map(item=>{
695
               list.map(item=>{
665
               })
701
               })
666
 
702
 
667
 
703
 
668
-
704
+          //  console.log("list",list)
669
              list.map(item=>{
705
              list.map(item=>{
670
                 item.child.map(it=>{
706
                 item.child.map(it=>{
671
-                   if(parseInt(it.range_min)<=parseInt(it.inspect_value) && parseInt(it.inspect_value)<=parseInt(it.range_max)){
707
+                  //  console.log("长度",item.child.length)
708
+                  //  console.log("it",it)
709
+                   if(it.range_type == 1 && parseInt(it.range_min)<=parseInt(it.inspect_value) && parseInt(it.inspect_value)<=parseInt(it.range_max)){
672
                        item.total ++
710
                        item.total ++
673
                    }
711
                    }
712
+                   if(it.range_type == 2 && it.inspect_value == it.range_value){
713
+                      item.infectotal ++
714
+                   }
674
                 })
715
                 })
675
              })
716
              })
717
+            //  console.log("list",list)
676
              var standardTotal = 0
718
              var standardTotal = 0
677
 
719
 
678
              list.map(item=>{
720
              list.map(item=>{
679
-               if(item.total == item.child.length){
721
+               if((item.total +item.infectotal) == item.child.length){
680
                   item.count ++
722
                   item.count ++
681
                }
723
                }
682
              })
724
              })

+ 31 - 8
src/xt_pages/qcd/statisticalConfiguration.vue 查看文件

22
              <template slot-scope="scope">{{ scope.row.item_name }}</template>
22
              <template slot-scope="scope">{{ scope.row.item_name }}</template>
23
           </el-table-column>
23
           </el-table-column>
24
           <el-table-column prop="address" label="范围">
24
           <el-table-column prop="address" label="范围">
25
-             <template slot-scope="scope">{{ scope.row.min_range }} - {{scope.row.large_range}}</template>
25
+             <template slot-scope="scope">
26
+               <span v-if="scope.row.range_type == 1">
27
+                 {{ scope.row.min_range }} - {{scope.row.large_range}}
28
+                </span>
29
+                <span v-if="scope.row.range_type == 2">
30
+                   {{scope.row.range_value}}
31
+                </span>
32
+             </template>
26
           </el-table-column>
33
           </el-table-column>
27
            <el-table-column prop="address" label="单位">
34
            <el-table-column prop="address" label="单位">
28
               <template slot-scope="scope">{{ scope.row.unit }}</template>
35
               <template slot-scope="scope">{{ scope.row.unit }}</template>
75
             </el-select>
82
             </el-select>
76
           </el-form-item>
83
           </el-form-item>
77
        
84
        
78
-            <el-form-item label="检类型" :label-width="formLabelWidth" required prop="check_type">
85
+            <el-form-item label="检查结果类型" :label-width="formLabelWidth" required prop="check_type">
79
                     <el-radio
86
                     <el-radio
80
-                      :disabled = "true"
87
+                      @change="chageType"
81
                       v-model="form.check_type"
88
                       v-model="form.check_type"
82
                       v-for="item in radioType"
89
                       v-for="item in radioType"
83
                       :key="item.label"
90
                       :key="item.label"
135
                 </el-option>
142
                 </el-option>
136
             </el-select>
143
             </el-select>
137
           </el-form-item>
144
           </el-form-item>
138
-          <el-form-item label="检类型" :label-width="formLabelWidth" required prop="check_type">
145
+          <el-form-item label="检查结果类型" :label-width="formLabelWidth" required prop="check_type">
139
                 <el-radio
146
                 <el-radio
140
-                  :disabled = "true"
147
+                   @change = "chageType"
141
                    v-model="editform.check_type"
148
                    v-model="editform.check_type"
142
                    v-for="item in radioType"
149
                    v-for="item in radioType"
143
                    :key="item.label"
150
                    :key="item.label"
191
         { path: false, name: "质控达标统计配置" }
198
         { path: false, name: "质控达标统计配置" }
192
       ],
199
       ],
193
      radioType: [
200
      radioType: [
194
-        { value: 1, label: "数值范围" },
195
-        { value: 2, label: "选项" }
201
+        { value: 1, label: "数值类型" },
202
+        { value: 2, label: "非数值类型" }
196
       ],
203
       ],
197
       tabActiveName: "control",
204
       tabActiveName: "control",
198
       InspectionMajor:[],
205
       InspectionMajor:[],
226
         inspectionMinor: [{ required: true, message: "检查小项不能为空" }],
233
         inspectionMinor: [{ required: true, message: "检查小项不能为空" }],
227
         large_range:[{required:true,message:"质控范围不能为空"}],
234
         large_range:[{required:true,message:"质控范围不能为空"}],
228
         min_range:[{required:true,message:"质控范围不能为空"}],
235
         min_range:[{required:true,message:"质控范围不能为空"}],
229
-        check_type:[{required:true,message:"检验类型不能为空"}]
236
+        check_type:[{required:true,message:"检验类型不能为空"}],
237
+        range_value:[{required:true,message:"参考值不能为空"}]
230
       },
238
       },
231
       page:1,
239
       page:1,
232
       limit:10,
240
       limit:10,
290
     },
298
     },
291
     //获取小项
299
     //获取小项
292
     changeInspection(id){
300
     changeInspection(id){
301
+       this.form.inspectionMinor = ""
293
       getInspectionMinor(id).then(response=>{
302
       getInspectionMinor(id).then(response=>{
294
         if(response.data.state == 1){
303
         if(response.data.state == 1){
295
          var inspection =  response.data.data.inspection
304
          var inspection =  response.data.data.inspection
451
         }
460
         }
452
       })
461
       })
453
     },
462
     },
463
+    chageType(val){
464
+      if(val == 1){
465
+         this.showOne = true
466
+         this.showTwo = false
467
+         this.form.range_value = ""
468
+         this.editform.range_value = ""
469
+      }
470
+      if(val == 2){
471
+         this.showOne = false
472
+         this.showTwo = true
473
+         this.form.range_value = ""
474
+         this.editform.range_value = ""
475
+      }
476
+    }
454
   },
477
   },
455
   components: {
478
   components: {
456
     PieChart,
479
     PieChart,

+ 139 - 54
src/xt_pages/qcd/treatmentControlAnalysis/components/CheckPersonal.vue 查看文件

59
           height="500" :row-style="{ color: '#303133' }" 
59
           height="500" :row-style="{ color: '#303133' }" 
60
           :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
60
           :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
61
           highlight-current-row
61
           highlight-current-row
62
+           ref="singleTable"
62
           @current-change="handleChange"
63
           @current-change="handleChange"
63
           >
64
           >
64
            <el-table-column prop="dialysis_no" label="透析号" width="80">
65
            <el-table-column prop="dialysis_no" label="透析号" width="80">
91
   },
92
   },
92
   data() {
93
   data() {
93
     return {
94
     return {
95
+      patient_id:0,
94
       listQuery: {
96
       listQuery: {
95
         start_time: "",
97
         start_time: "",
96
         end_time: "",
98
         end_time: "",
242
     getCurrentOrgPatients(){
244
     getCurrentOrgPatients(){
243
       getCurrentOrgPatients().then(response=>{
245
       getCurrentOrgPatients().then(response=>{
244
          var patients = response.data.data.patients
246
          var patients = response.data.data.patients
247
+         for(let i=0;i<patients.length;i++){
248
+            this.$refs.singleTable.setCurrentRow(patients[0])
249
+            this.patient_id = patients[0].id
250
+         }
245
          this.patientsData = patients
251
          this.patientsData = patients
252
+          //获取检验检查项目
253
+         this.getInspectionTotalCount()
246
       })
254
       })
247
     },
255
     },
248
     getInspectionTotalCount(){
256
     getInspectionTotalCount(){
249
       this.modesData.series = []
257
       this.modesData.series = []
250
       this.modesData.xAxis = []
258
       this.modesData.xAxis = []
251
-      getInspectionTotalCount(this.listQuery.start_time,this.listQuery.end_time).then(response=>{
259
+      getInspectionTotalCount(this.listQuery.start_time,this.listQuery.end_time,this.patient_id).then(response=>{
252
         if(response.data.state === 1){
260
         if(response.data.state === 1){
253
           var Inspection = response.data.data.Inspection
261
           var Inspection = response.data.data.Inspection
254
     
262
     
265
             }
273
             }
266
           }
274
           }
267
         
275
         
268
-          var arrtwo =  this.arrayDate(counts,this.normData)
276
+          // var arrtwo =  this.arrayDate(counts,this.normData)
269
           
277
           
270
           var hash = {};
278
           var hash = {};
271
           var i = 0;
279
           var i = 0;
297
           res.map(item => {
305
           res.map(item => {
298
             this.modesData.series.push(parseInt(item.Count));
306
             this.modesData.series.push(parseInt(item.Count));
299
           })
307
           })
300
-          console.log("this=====",this.tableData)
308
+          // console.log("this=====",this.tableData)
301
           for (const key in this.tableData) {
309
           for (const key in this.tableData) {
302
             this.modesData.xAxis.push(this.tableData[key].project_name);
310
             this.modesData.xAxis.push(this.tableData[key].project_name);
303
             let time = new Date(this.listQuery.end_time) - new Date(this.listQuery.start_time)
311
             let time = new Date(this.listQuery.end_time) - new Date(this.listQuery.start_time)
319
        getInspectionDetailById(val.id,this.listQuery.start_time,this.listQuery.end_time).then(response=>{
327
        getInspectionDetailById(val.id,this.listQuery.start_time,this.listQuery.end_time).then(response=>{
320
           if(response.data.state === 1){
328
           if(response.data.state === 1){
321
             var patientdetail = response.data.data.patientdetail
329
             var patientdetail = response.data.data.patientdetail
322
-            console.log("patientdetail",patientdetail)
330
+            // console.log("patientdetail",patientdetail)
323
             var arr=[]
331
             var arr=[]
324
-            for(let i=0;i<this.tableData.length;i++){
325
-              for(let j=0;j<patientdetail.length;j++){
326
-                 if(this.tableData[i].inspection_major == patientdetail[j].ProjectId){
327
-                    arr.push(patientdetail[j])
328
-                 }
332
+
333
+          for(let i=0;i<this.tableData.length;i++){
334
+            for(let j=0;j<patientdetail.length;j++){
335
+              if(this.tableData[i].inspection_major == patientdetail[j].ProjectId){
336
+                arr.push(patientdetail[j])
329
               }
337
               }
330
             }
338
             }
331
-            
332
-           let time = new Date(this.listQuery.end_time) - new Date(this.listQuery.start_time)
333
-           let day = parseInt(time / (1000 * 60 * 60 * 24))
334
-           console.log("arr",arr)
335
-           console.log("tabledata",this.tableData)
336
-            for (const key in this.tableData) {
337
-              this.modesData.xAxis.push(this.tableData[key].project_name);
338
-              if (key in arr) {
339
-                this.modesData.series.push(parseInt(arr[key].Count));
340
-                this.obj.push(Math.round(day / arr[key].InspectionFrequency))
341
-                // batotal += parseInt(res[key].Count);
342
-              } else {
343
-                this.modesData.series.push(0);
344
-                this.obj.push(0)
345
-              }
339
+          }
340
+          // console.log('arr',arr)
341
+         
342
+          
343
+          var hash = {};
344
+          var i = 0;
345
+          var res = [];
346
+          arr.forEach(function(item) {
347
+            var ProjectName = item.ProjectName;
348
+            hash[ProjectName] ? res[hash[ProjectName] - 1].Count.push(item.Count) : hash[ProjectName] = ++i && res.push({
349
+                Count: [item.Count],
350
+                ProjectName: ProjectName,
351
+                ProjectId: item.ProjectId,
352
+                Sort:item.Sort,
353
+            })
354
+          });
355
+          
356
+          res.map(item => {
357
+            item.Count = eval(item.Count.join('+'))
358
+          })
359
+          
360
+          let arr1 = []
361
+          this.tableData.map(it => {
362
+            arr1.push(it.project_name)
363
+          })
364
+
365
+          arr1.forEach((item,index)=>{
366
+            if(!(res[index] && item ==res[index].ProjectName)){
367
+              res.splice(index,0,{Count:0, ProjectName: item, Sort: index+1})
346
             }
368
             }
347
-            this.chart.series[0].data = this.modesData.series
348
-            this.chart.xAxis.data = this.modesData.xAxis
349
-            this.getArrLength(this.chart.xAxis.data)
369
+          })
370
+          res.map(item => {
371
+            this.modesData.series.push(parseInt(item.Count));
372
+          })
373
+          // console.log("this=====",this.tableData)
374
+          for (const key in this.tableData) {
375
+            this.modesData.xAxis.push(this.tableData[key].project_name);
376
+            let time = new Date(this.listQuery.end_time) - new Date(this.listQuery.start_time)
377
+            let day = parseInt(time / (1000 * 60 * 60 * 24))
378
+            this.obj.push(Math.round(day / this.tableData[key].inspection_frequency))
379
+          }
380
+          
381
+          this.chart.series[0].data = this.modesData.series
382
+          this.chart.xAxis.data = this.modesData.xAxis
383
+          this.getArrLength(this.chart.xAxis.data)
384
+          //   for(let i=0;i<this.tableData.length;i++){
385
+          //     for(let j=0;j<patientdetail.length;j++){
386
+          //        if(this.tableData[i].inspection_major == patientdetail[j].ProjectId){
387
+          //           arr.push(patientdetail[j])
388
+          //        }
389
+          //     }
390
+          //   }
391
+            
392
+          //  let time = new Date(this.listQuery.end_time) - new Date(this.listQuery.start_time)
393
+          //  let day = parseInt(time / (1000 * 60 * 60 * 24))
394
+          //  console.log("tabledata",this.tableData)
395
+          //   for (const key in this.tableData) {
396
+          //     this.modesData.xAxis.push(this.tableData[key].project_name);
397
+          //     if (key in arr) {
398
+          //       this.modesData.series.push(parseInt(arr[key].Count));
399
+          //       this.obj.push(Math.round(day / arr[key].InspectionFrequency))
400
+          //     } else {
401
+          //       this.modesData.series.push(0);
402
+          //       this.obj.push(0)
403
+          //     }
404
+          //   }
405
+          //   this.chart.series[0].data = this.modesData.series
406
+          //   this.chart.xAxis.data = this.modesData.xAxis
407
+          //   this.getArrLength(this.chart.xAxis.data)
350
           }
408
           }
351
        })
409
        })
352
     },
410
     },
358
       getSearchPatientInfo(this.patient_id,this.listQuery.start_time,this.listQuery.end_time).then(response=>{
416
       getSearchPatientInfo(this.patient_id,this.listQuery.start_time,this.listQuery.end_time).then(response=>{
359
          if(response.data.state  === 1){
417
          if(response.data.state  === 1){
360
            var PatientsInfo = response.data.data.PatientsInfo
418
            var PatientsInfo = response.data.data.PatientsInfo
361
-           console.log("patientsInfo",PatientsInfo)
419
+          //  console.log("patientsInfo",PatientsInfo)
362
            var arr = []
420
            var arr = []
363
-           for(let i=0;i<this.tableData.length;i++){
364
-             for(let j=0;j<PatientsInfo.length;j++){
365
-                 if(this.tableData[i].inspection_major == PatientsInfo[j].ProjectId){
366
-                    arr.push(PatientsInfo[j])
367
-                 }
368
-             }
369
-           }
370
-           let time = new Date(this.listQuery.end_time) - new Date(this.listQuery.start_time)
371
-           let day = parseInt(time / (1000 * 60 * 60 * 24))
372
-       
373
-            for (const key in this.tableData) {
374
-              this.modesData.xAxis.push(this.tableData[key].project_name);
375
-              if (key in arr) {
376
-                this.modesData.series.push(parseInt(arr[key].Count));
377
-                this.obj.push(Math.round(day / arr[key].InspectionFrequency))
378
-                // batotal += parseInt(res[key].Count);
379
-              } else {
380
-                this.modesData.series.push(0);
381
-                this.obj.push(0)
421
+        
422
+          for(let i=0;i<this.tableData.length;i++){
423
+            for(let j=0;j<PatientsInfo.length;j++){
424
+              if(this.tableData[i].inspection_major == PatientsInfo[j].ProjectId){
425
+                arr.push(PatientsInfo[j])
382
               }
426
               }
383
             }
427
             }
384
-            this.chart.series[0].data = this.modesData.series
385
-            this.chart.xAxis.data = this.modesData.xAxis
386
-            this.getArrLength(this.chart.xAxis.data)
428
+          }
429
+          // console.log('arr',arr)
430
+         
431
+          
432
+          var hash = {};
433
+          var i = 0;
434
+          var res = [];
435
+          arr.forEach(function(item) {
436
+            var ProjectName = item.ProjectName;
437
+            hash[ProjectName] ? res[hash[ProjectName] - 1].Count.push(item.Count) : hash[ProjectName] = ++i && res.push({
438
+                Count: [item.Count],
439
+                ProjectName: ProjectName,
440
+                ProjectId: item.ProjectId,
441
+                Sort:item.Sort,
442
+            })
443
+          });
444
+          
445
+          res.map(item => {
446
+            item.Count = eval(item.Count.join('+'))
447
+          })
448
+          
449
+          let arr1 = []
450
+          this.tableData.map(it => {
451
+            arr1.push(it.project_name)
452
+          })
453
+
454
+          arr1.forEach((item,index)=>{
455
+            if(!(res[index] && item ==res[index].ProjectName)){
456
+              res.splice(index,0,{Count:0, ProjectName: item, Sort: index+1})
457
+            }
458
+          })
459
+          res.map(item => {
460
+            this.modesData.series.push(parseInt(item.Count));
461
+          })
462
+          // console.log("this=====",this.tableData)
463
+          for (const key in this.tableData) {
464
+            this.modesData.xAxis.push(this.tableData[key].project_name);
465
+            let time = new Date(this.listQuery.end_time) - new Date(this.listQuery.start_time)
466
+            let day = parseInt(time / (1000 * 60 * 60 * 24))
467
+            this.obj.push(Math.round(day / this.tableData[key].inspection_frequency))
468
+          }
469
+          
470
+          this.chart.series[0].data = this.modesData.series
471
+          this.chart.xAxis.data = this.modesData.xAxis
472
+          this.getArrLength(this.chart.xAxis.data)
387
          }
473
          }
388
       })
474
       })
389
     },
475
     },
418
       PostSearch(key).then(response => {
504
       PostSearch(key).then(response => {
419
         if (response.data.state == 1) {
505
         if (response.data.state == 1) {
420
             searchArray = response.data.data.patient
506
             searchArray = response.data.data.patient
421
-            console.log("searchArray",searchArray)
507
+            // console.log("searchArray",searchArray)
422
           cb(searchArray)
508
           cb(searchArray)
423
         } else {
509
         } else {
424
           cb([])
510
           cb([])
426
       })
512
       })
427
     },
513
     },
428
     handleSelect(val) {
514
     handleSelect(val) {
429
-      console.log("val",val)
515
+      // console.log("val",val)
430
       this.listQuery.search = val.name
516
       this.listQuery.search = val.name
431
       this.patient_id = val.id
517
       this.patient_id = val.id
432
       this.onSearch()
518
       this.onSearch()
465
 
551
 
466
     //获取该机构下的所有患者
552
     //获取该机构下的所有患者
467
     this.getCurrentOrgPatients()
553
     this.getCurrentOrgPatients()
468
-    //获取检验检查项目
469
-    this.getInspectionTotalCount()
554
+   
470
   }
555
   }
471
 };
556
 };
472
 </script>
557
 </script>

+ 7 - 7
src/xt_pages/qcd/treatmentControlAnalysis/components/TimePersonal.vue 查看文件

191
       getDialysisList(this.listQuery.start_time,this.listQuery.end_time,this.listQuery.page,this.listQuery.limit).then(response=>{
191
       getDialysisList(this.listQuery.start_time,this.listQuery.end_time,this.listQuery.page,this.listQuery.limit).then(response=>{
192
          if(response.data.state === 1){
192
          if(response.data.state === 1){
193
           var list = response.data.data.list
193
           var list = response.data.data.list
194
-          console.log("list",list)
194
+          // console.log("list",list)
195
           var totallist  =  response.data.data.totallist
195
           var totallist  =  response.data.data.totallist
196
-           console.log("totallist",totallist)
196
+          //  console.log("totallist",totallist)
197
           this.total = totallist  
197
           this.total = totallist  
198
           var prescriptionList = response.data.data.prescriptionList
198
           var prescriptionList = response.data.data.prescriptionList
199
-          console.log("prescriptionList",prescriptionList)
199
+          // console.log("prescriptionList",prescriptionList)
200
           this.getModeId(prescriptionList)
200
           this.getModeId(prescriptionList)
201
           var count = response.data.data.count
201
           var count = response.data.data.count
202
-          console.log("count",count)
202
+          // console.log("count",count)
203
           this.DialysisCount = count
203
           this.DialysisCount = count
204
           // for(let i=0;i<count.length;i++){
204
           // for(let i=0;i<count.length;i++){
205
           //  for(let j=0;j<prescriptionList.length;j++){
205
           //  for(let j=0;j<prescriptionList.length;j++){
225
             }
225
             }
226
           })
226
           })
227
           let list = Object.values(dataInfo)
227
           let list = Object.values(dataInfo)
228
-          console.log("arr",list)    
228
+          // console.log("arr",list)    
229
           list.map(item => {
229
           list.map(item => {
230
             for (let i = 0; i < prescriptionList.length; i++) {
230
             for (let i = 0; i < prescriptionList.length; i++) {
231
               if (item.patient_id === prescriptionList[i].patient_id) {
231
               if (item.patient_id === prescriptionList[i].patient_id) {
380
         PostSearch(key).then(response => {
380
         PostSearch(key).then(response => {
381
           if (response.data.state == 1) {
381
           if (response.data.state == 1) {
382
              searchArray = response.data.data.patient
382
              searchArray = response.data.data.patient
383
-             console.log("searchArray",searchArray)
383
+            //  console.log("searchArray",searchArray)
384
             cb(searchArray)
384
             cb(searchArray)
385
           } else {
385
           } else {
386
             cb([])
386
             cb([])
388
         })
388
         })
389
       },
389
       },
390
    handleSelect(val) {
390
    handleSelect(val) {
391
-        console.log("val",val)
391
+        // console.log("val",val)
392
         this.listQuery.search = val.name
392
         this.listQuery.search = val.name
393
         this.patient_id = val.id
393
         this.patient_id = val.id
394
         this.onSearch()
394
         this.onSearch()