Преглед изворни кода

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

csx пре 4 година
родитељ
комит
ab47bb29cc

+ 1 - 0
config/dev.env.js Прегледај датотеку

8
   ENV_CONFIG: '"dev"',
8
   ENV_CONFIG: '"dev"',
9
   // BASE_API: '"http://new_mobile.xt.api.sgjyun.com"', // //http://api.xt.test.sgjyun.com http://112.74.16.180:9527,////'"http://localhost:9529"',
9
   // BASE_API: '"http://new_mobile.xt.api.sgjyun.com"', // //http://api.xt.test.sgjyun.com http://112.74.16.180:9527,////'"http://localhost:9529"',
10
   BASE_API:'"http://localhost:9531"',
10
   BASE_API:'"http://localhost:9531"',
11
+  // BASE_API:'"http://api.xt.test.sgjyun.com"',
11
   SSO_HOST: '"http://testsso.sgjyun.com"',
12
   SSO_HOST: '"http://testsso.sgjyun.com"',
12
   SRCM_HOST: '"http://test1.sgjyun.com"',
13
   SRCM_HOST: '"http://test1.sgjyun.com"',
13
   XT_HOST: '"http://xt.test.sgjyun.com"',
14
   XT_HOST: '"http://xt.test.sgjyun.com"',

+ 2 - 2
config/index.js Прегледај датотеку

17
     // can be overwritten by process.env.HOST
17
     // can be overwritten by process.env.HOST
18
     // if you want dev by ip, please set host: '0.0.0.0'
18
     // if you want dev by ip, please set host: '0.0.0.0'
19
 
19
 
20
-    // host: 'xt.test.sgjyun.com',
21
-    // host: 'xt.kuyicloud.com',
20
+    //  host: 'xt.test.sgjyun.com',
21
+    //  host: 'xt.kuyicloud.com',
22
     // host: 'xt.test.sgjyun.com',
22
     // host: 'xt.test.sgjyun.com',
23
     host:'localhost',
23
     host:'localhost',
24
     port: 9528, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
24
     port: 9528, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined

+ 6 - 4
src/api/common/common.js Прегледај датотеку

149
     startime: startime,
149
     startime: startime,
150
     endtime: endtime
150
     endtime: endtime
151
   }
151
   }
152
-
152
+  console.log('params', params)
153
   return request({
153
   return request({
154
     url: '/com/api/gettotallapsecount',
154
     url: '/com/api/gettotallapsecount',
155
     method: 'get',
155
     method: 'get',
174
     startime: startime,
174
     startime: startime,
175
     endtime: endtime
175
     endtime: endtime
176
   }
176
   }
177
+  console.log('传染病', params)
177
   return request({
178
   return request({
178
     url: '/com/api/gettoalinfectiouscount',
179
     url: '/com/api/gettoalinfectiouscount',
179
     method: 'get',
180
     method: 'get',
266
     limit: limit,
267
     limit: limit,
267
     page: page
268
     page: page
268
   }
269
   }
269
-  console.log('params', params)
270
+  // console.log('params', params)
270
   return request({
271
   return request({
271
     url: '/com/api/getprescriptionbyname',
272
     url: '/com/api/getprescriptionbyname',
272
     method: 'Get',
273
     method: 'Get',
282
   })
283
   })
283
 }
284
 }
284
 
285
 
285
-export function getInspectionTotalCount(startime, endtime) {
286
+export function getInspectionTotalCount(startime, endtime, patientid) {
286
   const params = {
287
   const params = {
287
     startime: startime,
288
     startime: startime,
288
-    endtime: endtime
289
+    endtime: endtime,
290
+    patientid: patientid
289
   }
291
   }
290
   return request({
292
   return request({
291
     url: '/com/api/getinspectiontotalcount',
293
     url: '/com/api/getinspectiontotalcount',

+ 33 - 33
src/xt_pages/qcd/basicInformationAnalysis.vue Прегледај датотеку

380
       this.listQuery.state = state;
380
       this.listQuery.state = state;
381
       //获取本月当前机构的透析模式
381
       //获取本月当前机构的透析模式
382
       const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
382
       const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
383
-    //  console.log("开始时间",startDate)
383
+      console.log("开始时间",startDate)
384
       const endDate = moment(new Date()).format('YYYY-MM-DD')
384
       const endDate = moment(new Date()).format('YYYY-MM-DD')
385
-     // console.log("结束时间",endDate)
385
+      console.log("结束时间",endDate)
386
       var now = new Date()
386
       var now = new Date()
387
       var nowMonth = now.getMonth(); //当前月
387
       var nowMonth = now.getMonth(); //当前月
388
       var nowYear = now.getFullYear(); //当前年
388
       var nowYear = now.getFullYear(); //当前年
399
        //统计透析总量
399
        //统计透析总量
400
         this.getDialysisModeType(startDate,endDate)
400
         this.getDialysisModeType(startDate,endDate)
401
         //统计转归状态
401
         //统计转归状态
402
-        this.getTotalLapseCount(timeStar,timeEnd)
402
+        this.getTotalLapseCount(startDate,endDate)
403
         //统计男女比例
403
         //统计男女比例
404
         this.getTotalSexCount(timeStar,timeEnd)
404
         this.getTotalSexCount(timeStar,timeEnd)
405
         //统计传染病
405
         //统计传染病
406
-        this.getTotalInfectiousCount(timeStar,timeEnd)
406
+        this.getTotalInfectiousCount(startDate,endDate)
407
         //统计年龄
407
         //统计年龄
408
         this.getTotalAgeCount(timeStar,timeEnd)
408
         this.getTotalAgeCount(timeStar,timeEnd)
409
         //统计透析年龄
409
         //统计透析年龄
412
       //近三月
412
       //近三月
413
       if(state == 1){
413
       if(state == 1){
414
         const startDate = moment().subtract('month', 3).format('YYYY-MM-DD')
414
         const startDate = moment().subtract('month', 3).format('YYYY-MM-DD')
415
-        console.log("三月前",startDate)
415
+        // console.log("三月前",startDate)
416
         var startunitx = Date.parse(startDate)/1000
416
         var startunitx = Date.parse(startDate)/1000
417
-        console.log("开始时间搓",startunitx)
417
+        // console.log("开始时间搓",startunitx)
418
         const endDate = moment(new Date()).format('YYYY-MM-DD')
418
         const endDate = moment(new Date()).format('YYYY-MM-DD')
419
-        console.log("结束时间",endDate)
419
+        // console.log("结束时间",endDate)
420
          var endunitx = Date.parse(endDate)/1000
420
          var endunitx = Date.parse(endDate)/1000
421
-        console.log("日期时间搓",endunitx)
421
+        // console.log("日期时间搓",endunitx)
422
          //统计透析总量
422
          //统计透析总量
423
         this.getDialysisModeType(startDate,endDate)
423
         this.getDialysisModeType(startDate,endDate)
424
          //统计转归状态
424
          //统计转归状态
425
-        this.getTotalLapseCount(startunitx,endunitx)
425
+        this.getTotalLapseCount(startDate,endDate)
426
         //统计男女比例
426
         //统计男女比例
427
         this.getTotalSexCount(startunitx,endunitx)
427
         this.getTotalSexCount(startunitx,endunitx)
428
         //统计传染病
428
         //统计传染病
429
-        this.getTotalInfectiousCount(startunitx,endunitx)
429
+        this.getTotalInfectiousCount(startDate,endDate)
430
         //统计年龄
430
         //统计年龄
431
         this.getTotalAgeCount(startunitx,endunitx)
431
         this.getTotalAgeCount(startunitx,endunitx)
432
         //统计透析年龄
432
         //统计透析年龄
436
      //近半年
436
      //近半年
437
      if(state == 2){
437
      if(state == 2){
438
         const startDate = moment().subtract('month', 6).format('YYYY-MM-DD')
438
         const startDate = moment().subtract('month', 6).format('YYYY-MM-DD')
439
-        console.log("6月前",startDate)
439
+        // console.log("6月前",startDate)
440
         var startunitx = Date.parse(startDate)/1000
440
         var startunitx = Date.parse(startDate)/1000
441
-        console.log("开始时间搓",startunitx)
441
+        // console.log("开始时间搓",startunitx)
442
         const endDate = moment(new Date()).format('YYYY-MM-DD')
442
         const endDate = moment(new Date()).format('YYYY-MM-DD')
443
-        console.log("结束时间",endDate)
443
+        // console.log("结束时间",endDate)
444
          var endunitx = Date.parse(endDate)/1000
444
          var endunitx = Date.parse(endDate)/1000
445
-        console.log("日期时间搓",endunitx)
445
+        // console.log("日期时间搓",endunitx)
446
          //统计透析总量
446
          //统计透析总量
447
         this.getDialysisModeType(startDate,endDate)
447
         this.getDialysisModeType(startDate,endDate)
448
          //统计转归状态
448
          //统计转归状态
449
-        this.getTotalLapseCount(startunitx,endunitx)
449
+        this.getTotalLapseCount(startDate,endDate)
450
         //统计男女比例
450
         //统计男女比例
451
         this.getTotalSexCount(startunitx,endunitx)
451
         this.getTotalSexCount(startunitx,endunitx)
452
         //统计传染病
452
         //统计传染病
453
-        this.getTotalInfectiousCount(startunitx,endunitx)
453
+        this.getTotalInfectiousCount(startDate,endDate)
454
         //统计年龄
454
         //统计年龄
455
         this.getTotalAgeCount(startunitx,endunitx)
455
         this.getTotalAgeCount(startunitx,endunitx)
456
         //统计透析年龄
456
         //统计透析年龄
460
      //近一年
460
      //近一年
461
      if(state == 3){
461
      if(state == 3){
462
         const startDate = moment().subtract('month', 12).format('YYYY-MM-DD')
462
         const startDate = moment().subtract('month', 12).format('YYYY-MM-DD')
463
-        console.log("6月前",startDate)
463
+        // console.log("6月前",startDate)
464
         var startunitx = Date.parse(startDate)/1000
464
         var startunitx = Date.parse(startDate)/1000
465
-        console.log("开始时间搓",startunitx)
465
+        // console.log("开始时间搓",startunitx)
466
         const endDate = moment(new Date()).format('YYYY-MM-DD')
466
         const endDate = moment(new Date()).format('YYYY-MM-DD')
467
-        console.log("结束时间",endDate)
467
+        // console.log("结束时间",endDate)
468
          var endunitx = Date.parse(endDate)/1000
468
          var endunitx = Date.parse(endDate)/1000
469
-        console.log("日期时间搓",endunitx)
469
+        // console.log("日期时间搓",endunitx)
470
          //统计透析总量
470
          //统计透析总量
471
         this.getDialysisModeType(startDate,endDate)
471
         this.getDialysisModeType(startDate,endDate)
472
          //统计转归状态
472
          //统计转归状态
473
-        this.getTotalLapseCount(startunitx,endunitx)
473
+        this.getTotalLapseCount(startDate,endDate)
474
         //统计男女比例
474
         //统计男女比例
475
         this.getTotalSexCount(startunitx,endunitx)
475
         this.getTotalSexCount(startunitx,endunitx)
476
         //统计传染病
476
         //统计传染病
477
-        this.getTotalInfectiousCount(startunitx,endunitx)
477
+        this.getTotalInfectiousCount(startDate,endDate)
478
         //统计年龄
478
         //统计年龄
479
         this.getTotalAgeCount(startunitx,endunitx)
479
         this.getTotalAgeCount(startunitx,endunitx)
480
         //统计透析年龄
480
         //统计透析年龄
489
          if(response.data.state == 1){
489
          if(response.data.state == 1){
490
           var modetype =  response.data.data.modetype
490
           var modetype =  response.data.data.modetype
491
             var total =  response.data.data.total
491
             var total =  response.data.data.total
492
-            console.log("total",total)
492
+            // console.log("total",total)
493
             this.total = total
493
             this.total = total
494
            this.modetype = modetype
494
            this.modetype = modetype
495
-           console.log("modetype",modetype)
495
+          //  console.log("modetype",modetype)
496
 
496
 
497
          }
497
          }
498
       })
498
       })
503
          if(response.data.state == 1){
503
          if(response.data.state == 1){
504
           var patients =  response.data.data.patients
504
           var patients =  response.data.data.patients
505
           this.rollOutTotal = patients.length
505
           this.rollOutTotal = patients.length
506
-          console.log("留治病人长度",patients.length)
506
+          // console.log("留治病人长度",patients.length)
507
           var patienttwo = response.data.data.patienttwo
507
           var patienttwo = response.data.data.patienttwo
508
           this.outTotal = patienttwo.length
508
           this.outTotal = patienttwo.length
509
-            console.log("转出长度", this.outTotal)
509
+            // console.log("转出长度", this.outTotal)
510
           var count = response.data.data.count
510
           var count = response.data.data.count
511
           this.patientCount = count
511
           this.patientCount = count
512
          }
512
          }
532
        getTotalInfectiousCount(timeStar,timeEnd).then(response=>{
532
        getTotalInfectiousCount(timeStar,timeEnd).then(response=>{
533
            if(response.data.state === 1){
533
            if(response.data.state === 1){
534
              this.InfectiousTotal = response.data.data.total
534
              this.InfectiousTotal = response.data.data.total
535
-             console.log("===",this.InfectiousTotal)
535
+            //  console.log("===",this.InfectiousTotal)
536
              var infectious = response.data.data.count
536
              var infectious = response.data.data.count
537
-             console.log("infectious",infectious)
537
+            //  console.log("infectious",infectious)
538
              var otherTotal = response.data.data.otherTotal
538
              var otherTotal = response.data.data.otherTotal
539
-             console.log("otherTotal",otherTotal)
539
+            //  console.log("otherTotal",otherTotal)
540
              this.otherTotal = otherTotal
540
              this.otherTotal = otherTotal
541
               var arr = [
541
               var arr = [
542
                 {count:0,disease_id:2},
542
                 {count:0,disease_id:2},
559
       getTotalAgeCount(timeStar,timeEnd).then(response=>{
559
       getTotalAgeCount(timeStar,timeEnd).then(response=>{
560
          if(response.data.state == 1){
560
          if(response.data.state == 1){
561
           var ageCount =  response.data.data.ageCount
561
           var ageCount =  response.data.data.ageCount
562
-          console.log("ageCount",ageCount)
562
+          // console.log("ageCount",ageCount)
563
           var arr = []
563
           var arr = []
564
           arr =  ageCount.sort(this.compare('age'))
564
           arr =  ageCount.sort(this.compare('age'))
565
           this.ageCount = arr
565
           this.ageCount = arr
595
       getTotalDialysisCount(timeStar,timeEnd).then(response=>{
595
       getTotalDialysisCount(timeStar,timeEnd).then(response=>{
596
          if(response.data.state == 1){
596
          if(response.data.state == 1){
597
            var dataage =  response.data.data.dataage
597
            var dataage =  response.data.data.dataage
598
-           console.log("dataage",dataage)
598
+          //  console.log("dataage",dataage)
599
            this.dialysisAge = dataage
599
            this.dialysisAge = dataage
600
 
600
 
601
          }
601
          }
605
   created() {
605
   created() {
606
         //获取本月当前机构的透析模式
606
         //获取本月当前机构的透析模式
607
       const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
607
       const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
608
-      console.log("开始时间",startDate)
608
+      // console.log("开始时间",startDate)
609
       const endDate = moment(new Date()).format('YYYY-MM-DD')
609
       const endDate = moment(new Date()).format('YYYY-MM-DD')
610
      // console.log("结束时间",endDate)
610
      // console.log("结束时间",endDate)
611
       var now = new Date()
611
       var now = new Date()
626
       //统计男女比例
626
       //统计男女比例
627
       this.getTotalSexCount(timeStar,timeEnd)
627
       this.getTotalSexCount(timeStar,timeEnd)
628
       //统计传染病
628
       //统计传染病
629
-      this.getTotalInfectiousCount(timeStar,timeEnd)
629
+      this.getTotalInfectiousCount(startDate,endDate)
630
       //统计年龄
630
       //统计年龄
631
       this.getTotalAgeCount(timeStar,timeEnd)
631
       this.getTotalAgeCount(timeStar,timeEnd)
632
       //统计透析年龄
632
       //统计透析年龄

+ 2 - 1
src/xt_pages/qcd/components/LineChart.vue Прегледај датотеку

247
         //   }
247
         //   }
248
         // ],
248
         // ],
249
         legend: this.chartOptions.legend,
249
         legend: this.chartOptions.legend,
250
-        series: this.chartOptions.series
250
+        series: this.chartOptions.series,
251
+        dataZoom: this.chartOptions.dataZoom,
251
       });
252
       });
252
     },
253
     },
253
     initChart() {
254
     initChart() {

+ 28 - 0
src/xt_pages/qcd/indicatorControlAnalysis/bloodPressureDetails.vue Прегледај датотеку

264
               }
264
               }
265
             }
265
             }
266
           }
266
           }
267
+        ],
268
+        dataZoom: [
269
+          {
270
+            // Y轴固定,让内容滚动
271
+            type: 'slider',
272
+            show: false,
273
+            xAxisIndex: [0],
274
+            start: 1,
275
+            end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
276
+            zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
277
+          },
278
+          {
279
+            type: 'inside',
280
+            xAxisIndex: [0],
281
+            start: 1,
282
+            end: 20,
283
+            zoomLock: true // 锁定区域禁止缩放
284
+          }
267
         ]
285
         ]
268
       },
286
       },
269
     };
287
     };
357
               this.chart.series[0].data.push(resp.data.data[i].systolic_blood_pressure)
375
               this.chart.series[0].data.push(resp.data.data[i].systolic_blood_pressure)
358
               this.chart.series[1].data.push(resp.data.data[i].diastolic_blood_pressure)
376
               this.chart.series[1].data.push(resp.data.data[i].diastolic_blood_pressure)
359
             }
377
             }
378
+            this.getArrLength(this.chart.xAxis.data)
360
           } else {
379
           } else {
361
           }
380
           }
362
         })
381
         })
408
     },
427
     },
409
     clickQuality(index) {
428
     clickQuality(index) {
410
       this.quality = index;
429
       this.quality = index;
430
+    },
431
+    getArrLength(result){
432
+      if(result.length > 10){
433
+        var dataZoom_end = (10/result.length)*100;
434
+        this.chart.dataZoom[0].end = dataZoom_end
435
+      }else{
436
+        var dataZoom_end = 100;
437
+        this.chart.dataZoom[0].end = dataZoom_end
438
+      }
411
     }
439
     }
412
   },created() {
440
   },created() {
413
     var date = new Date()
441
     var date = new Date()

+ 28 - 0
src/xt_pages/qcd/indicatorControlAnalysis/components/personal.vue Прегледај датотеку

354
                 }
354
                 }
355
               }
355
               }
356
             }
356
             }
357
+          ],
358
+          dataZoom: [
359
+            {
360
+              // Y轴固定,让内容滚动
361
+              type: 'slider',
362
+              show: false,
363
+              xAxisIndex: [0],
364
+              start: 1,
365
+              end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
366
+              zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
367
+            },
368
+            {
369
+              type: 'inside',
370
+              xAxisIndex: [0],
371
+              start: 1,
372
+              end: 20,
373
+              zoomLock: true // 锁定区域禁止缩放
374
+            }
357
           ]
375
           ]
358
         }
376
         }
359
 
377
 
610
                 this.options2.xAxis.data.push(resp.data.data[i].date)
628
                 this.options2.xAxis.data.push(resp.data.data[i].date)
611
                 this.options2.series[0].data.push(resp.data.data[i].value)
629
                 this.options2.series[0].data.push(resp.data.data[i].value)
612
               }
630
               }
631
+              this.getArrLength(this.options2.xAxis.data)
613
 
632
 
614
             } else {
633
             } else {
615
 
634
 
623
         // 把时间日期转成时间戳
642
         // 把时间日期转成时间戳
624
         return new Date(time).getTime() / 1000;
643
         return new Date(time).getTime() / 1000;
625
       },
644
       },
645
+      getArrLength(result){
646
+        if(result.length > 10){
647
+          var dataZoom_end = (10/result.length)*100;
648
+          this.options2.dataZoom[0].end = dataZoom_end
649
+        }else{
650
+          var dataZoom_end = 100;
651
+          this.options2.dataZoom[0].end = dataZoom_end
652
+        }
653
+      }
626
 
654
 
627
     }, created() {
655
     }, created() {
628
       var date = new Date()
656
       var date = new Date()

+ 28 - 0
src/xt_pages/qcd/indicatorControlAnalysis/monitor.vue Прегледај датотеку

399
                 }
399
                 }
400
               }
400
               }
401
             }
401
             }
402
+          ],
403
+          dataZoom: [
404
+            {
405
+              // Y轴固定,让内容滚动
406
+              type: 'slider',
407
+              show: false,
408
+              xAxisIndex: [0],
409
+              start: 1,
410
+              end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
411
+              zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
412
+            },
413
+            {
414
+              type: 'inside',
415
+              xAxisIndex: [0],
416
+              start: 1,
417
+              end: 20,
418
+              zoomLock: true // 锁定区域禁止缩放
419
+            }
402
           ]
420
           ]
403
         }
421
         }
404
 
422
 
521
                   this.chart.xAxis.data.push(resp.data.data[i].date)
539
                   this.chart.xAxis.data.push(resp.data.data[i].date)
522
                   this.chart.series[0].data.push(resp.data.data[i].value)
540
                   this.chart.series[0].data.push(resp.data.data[i].value)
523
                 }
541
                 }
542
+                this.getArrLength(this.chart.xAxis.data)
524
             } else {
543
             } else {
525
             }
544
             }
526
           })
545
           })
577
             }
596
             }
578
           }
597
           }
579
         })
598
         })
599
+      },
600
+      getArrLength(result){
601
+        if(result.length > 10){
602
+          var dataZoom_end = (10/result.length)*100;
603
+          this.chart.dataZoom[0].end = dataZoom_end
604
+        }else{
605
+          var dataZoom_end = 100;
606
+          this.chart.dataZoom[0].end = dataZoom_end
607
+        }
580
       }
608
       }
581
     }, created() {
609
     }, created() {
582
       var date = new Date()
610
       var date = new Date()

+ 47 - 4
src/xt_pages/qcd/indicatorControlAnalysis/process.vue Прегледај датотеку

97
             <div class="tableTitle">统计表</div>
97
             <div class="tableTitle">统计表</div>
98
             <div>
98
             <div>
99
               <el-table :data="tableData" v-loading="loading" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
99
               <el-table :data="tableData" v-loading="loading" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
100
-                <el-table-column fixed label="透析日期" align="center">
100
+                <el-table-column fixed width="110" label="透析日期" align="center">
101
                   <template slot-scope="scope">
101
                   <template slot-scope="scope">
102
                     {{scope.row.schedule_date | parseTime('{y}-{m}-{d}') }}
102
                     {{scope.row.schedule_date | parseTime('{y}-{m}-{d}') }}
103
                     <!--{{getTime(scope.row.schedule_date)}}-->
103
                     <!--{{getTime(scope.row.schedule_date)}}-->
235
                 </el-table-column>
235
                 </el-table-column>
236
 
236
 
237
 
237
 
238
-                <el-table-column width="100" label="透析时长" align="center">
238
+                <el-table-column width="110" label="透析时长" align="center">
239
                   <template slot-scope="scope">
239
                   <template slot-scope="scope">
240
                     {{
240
                     {{
241
                     scope.row.prescription.dialysis_duration_hour?scope.row.prescription.dialysis_duration_hour+'小时':''}}
241
                     scope.row.prescription.dialysis_duration_hour?scope.row.prescription.dialysis_duration_hour+'小时':''}}
252
                 </el-table-column>
252
                 </el-table-column>
253
 
253
 
254
 
254
 
255
-                <el-table-column width="100" label="抗凝剂" align="center">
255
+                <el-table-column width="110" label="抗凝剂" align="center">
256
                   <template slot-scope="scope">
256
                   <template slot-scope="scope">
257
                     {{GetAnticoagulantById( scope.row.prescription.anticoagulant)}}
257
                     {{GetAnticoagulantById( scope.row.prescription.anticoagulant)}}
258
                   </template>
258
                   </template>
423
                 }
423
                 }
424
               }
424
               }
425
             }
425
             }
426
+          ],
427
+          dataZoom: [
428
+            {
429
+              // Y轴固定,让内容滚动
430
+              type: 'slider',
431
+              show: false,
432
+              xAxisIndex: [0],
433
+              start: 1,
434
+              end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
435
+              zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
436
+            },
437
+            {
438
+              type: 'inside',
439
+              xAxisIndex: [0],
440
+              start: 1,
441
+              end: 20,
442
+              zoomLock: true // 锁定区域禁止缩放
443
+            }
426
           ]
444
           ]
427
         },
445
         },
428
         bar: {
446
         bar: {
591
       },
609
       },
592
       getModeName(mode_id) {
610
       getModeName(mode_id) {
593
         return this.$store.getters.treatment_mode[mode_id] != undefined ? this.$store.getters.treatment_mode[mode_id].name : ''
611
         return this.$store.getters.treatment_mode[mode_id] != undefined ? this.$store.getters.treatment_mode[mode_id].name : ''
594
-      }, GetDialysisProcessIndexTableData(params) {
612
+      }, 
613
+      GetDialysisProcessIndexTableData(params) {
595
         this.loading = true
614
         this.loading = true
596
         GetDialysisProcessIndexTableData(params)
615
         GetDialysisProcessIndexTableData(params)
597
           .then(rs => {
616
           .then(rs => {
598
             var resp = rs.data
617
             var resp = rs.data
618
+            console.log("resp=====",resp)
599
             if (resp.state == 1) {
619
             if (resp.state == 1) {
600
               this.loading = false
620
               this.loading = false
601
               this.tableData = []
621
               this.tableData = []
622
           GetDialysisProcessIndexChartData(params)
642
           GetDialysisProcessIndexChartData(params)
623
           .then(rs => {
643
           .then(rs => {
624
             var resp = rs.data
644
             var resp = rs.data
645
+            console.log("resp",resp)
625
             if (resp.state == 1) {
646
             if (resp.state == 1) {
626
               if (this.query.statistics_type != 9 && this.query.statistics_type != 10) {
647
               if (this.query.statistics_type != 9 && this.query.statistics_type != 10) {
627
                 for (let i = 0; i < resp.data.data.length; i++) {
648
                 for (let i = 0; i < resp.data.data.length; i++) {
628
                   this.chart.xAxis.data.push(resp.data.data[i].date)
649
                   this.chart.xAxis.data.push(resp.data.data[i].date)
629
                   this.chart.series[0].data.push(resp.data.data[i].value)
650
                   this.chart.series[0].data.push(resp.data.data[i].value)
630
                 }
651
                 }
652
+                this.getArrLength(this.chart.xAxis.data,1)
631
               } else {
653
               } else {
632
 
654
 
633
                 for (let i = 0; i < resp.data.data.length; i++) {
655
                 for (let i = 0; i < resp.data.data.length; i++) {
636
                   this.percent.push(resp.data.data[i].ratio)
658
                   this.percent.push(resp.data.data[i].ratio)
637
 
659
 
638
                 }
660
                 }
661
+                this.getArrLength(this.bar.xAxis.data,2)
639
               }
662
               }
640
             } else {
663
             } else {
641
             }
664
             }
697
           }
720
           }
698
         })
721
         })
699
 
722
 
723
+      },
724
+      getArrLength(result,type){
725
+        if(type == 1){
726
+          if(result.length > 10){
727
+            var dataZoom_end = (10/result.length)*100;
728
+            this.chart.dataZoom[0].end = dataZoom_end
729
+          }else{
730
+            var dataZoom_end = 100;
731
+            this.chart.dataZoom[0].end = dataZoom_end
732
+          }
733
+        }else if(type == 2){
734
+          if(result.length > 10){
735
+            var dataZoom_end = (10/result.length)*100;
736
+            this.bar.dataZoom[0].end = dataZoom_end
737
+          }else{
738
+            var dataZoom_end = 100;
739
+            this.bar.dataZoom[0].end = dataZoom_end
740
+          }
741
+        }
742
+        
700
       }
743
       }
701
     }, created() {
744
     }, created() {
702
       var date = new Date()
745
       var date = new Date()

+ 28 - 0
src/xt_pages/qcd/indicatorControlAnalysis/weightDetails.vue Прегледај датотеку

266
               }
266
               }
267
             }
267
             }
268
           },
268
           },
269
+        ],
270
+        dataZoom: [
271
+          {
272
+            // Y轴固定,让内容滚动
273
+            type: 'slider',
274
+            show: false,
275
+            xAxisIndex: [0],
276
+            start: 1,
277
+            end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
278
+            zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
279
+          },
280
+          {
281
+            type: 'inside',
282
+            xAxisIndex: [0],
283
+            start: 1,
284
+            end: 20,
285
+            zoomLock: true // 锁定区域禁止缩放
286
+          }
269
         ]
287
         ]
270
       },
288
       },
271
     };
289
     };
362
               this.chart.xAxis.data.push(resp.data.data[i].date)
380
               this.chart.xAxis.data.push(resp.data.data[i].date)
363
               this.chart.series[0].data.push(parseFloat(resp.data.data[i].value).toFixed(1))
381
               this.chart.series[0].data.push(parseFloat(resp.data.data[i].value).toFixed(1))
364
             }
382
             }
383
+            this.getArrLength(this.chart.xAxis.data)
365
           } else {
384
           } else {
366
           }
385
           }
367
         })
386
         })
410
         }
429
         }
411
       })
430
       })
412
     },
431
     },
432
+    getArrLength(result){
433
+      if(result.length > 10){
434
+        var dataZoom_end = (10/result.length)*100;
435
+        this.chart.dataZoom[0].end = dataZoom_end
436
+      }else{
437
+        var dataZoom_end = 100;
438
+        this.chart.dataZoom[0].end = dataZoom_end
439
+      }
440
+    }
413
   },created() {
441
   },created() {
414
     var date = new Date()
442
     var date = new Date()
415
     var year = date.getFullYear() //获取完整的年份(4位)
443
     var year = date.getFullYear() //获取完整的年份(4位)

+ 14 - 5
src/xt_pages/qcd/officesControlAnalysis/project.vue Прегледај датотеку

46
         <p class="pointTitle">指标正常范围值</p>
46
         <p class="pointTitle">指标正常范围值</p>
47
       </div>
47
       </div>
48
       <div class="cell clearfix newDisplay">
48
       <div class="cell clearfix newDisplay">
49
-        <span class="index" v-for="(item,index) in normdata" :key="index ">{{item.item_name}}({{item.min_range}}-{{item.large_range}})</span>
49
+        <span class="index" v-for="(item,index) in normdata" :key="index ">
50
+          <span v-if="item.range_type == 1">{{item.item_name}}({{item.min_range}}-{{item.large_range}})</span> 
51
+          <span v-if="item.range_type == 2">{{item.item_name}}({{item.range_value}})</span> 
52
+        </span>
50
       </div>
53
       </div>
51
     </div>
54
     </div>
52
   </div>
55
   </div>
106
       lapseto:0,
109
       lapseto:0,
107
       type:1,
110
       type:1,
108
       mode_type:"",
111
       mode_type:"",
112
+      range_type:"",
109
       chart: {
113
       chart: {
110
         title: {
114
         title: {
111
           text: "ECharts 入门示例"
115
           text: "ECharts 入门示例"
273
         //第四季度
277
         //第四季度
274
          const four_qurter_start = moment().month(9).startOf('month').format("YYYY-MM-DD")
278
          const four_qurter_start = moment().month(9).startOf('month').format("YYYY-MM-DD")
275
          const four_qurter_end = moment().month(11).endOf('month').format("YYYY-MM-DD")
279
          const four_qurter_end = moment().month(11).endOf('month').format("YYYY-MM-DD")
276
- 
277
-     
280
+         console.log("this.modetype",this.mode_type)
281
+         for(let i=0;i<this.normdata.length;i++){
282
+            if(this.normdata[i].inspection_minor == this.mode_type){
283
+               this.range_type = this.normdata[i].range_type
284
+            }
285
+         }
278
          const params = {
286
          const params = {
279
            lapseto:this.lapseto,
287
            lapseto:this.lapseto,
280
            itemtype:this.type,
288
            itemtype:this.type,
289
            three_qurter_end:three_qurter_end,
297
            three_qurter_end:three_qurter_end,
290
            four_qurter_start:four_qurter_start,
298
            four_qurter_start:four_qurter_start,
291
            four_qurter_end:four_qurter_end,
299
            four_qurter_end:four_qurter_end,
300
+           range_type:this.range_type
292
          }
301
          }
293
       getProjectList(params).then(response=>{
302
       getProjectList(params).then(response=>{
294
         if(response.data.state === 1){
303
         if(response.data.state === 1){
295
           var list = response.data.data.list
304
           var list = response.data.data.list
296
-      
305
+          console.log("list",list)
297
           var standList =  response.data.data.standList
306
           var standList =  response.data.data.standList
298
-         
307
+          console.log("standlist",standList)
299
           var newArr = [
308
           var newArr = [
300
             {Total:"第一季度",Count:1,NoCount: 0},
309
             {Total:"第一季度",Count:1,NoCount: 0},
301
             {Total:"第二季度",Count:1,NoCount: 0},
310
             {Total:"第二季度",Count:1,NoCount: 0},

+ 50 - 12
src/xt_pages/qcd/officesControlAnalysis/time.vue Прегледај датотеку

91
         <p class="pointTitle">指标正常范围值</p>
91
         <p class="pointTitle">指标正常范围值</p>
92
       </div>
92
       </div>
93
       <div class="cell clearfix newDisplay">
93
       <div class="cell clearfix newDisplay">
94
-         <span v-for="(item,index) in normData" :key="index" class="index">{{item.item_name}}({{item.min_range}}-{{item.large_range}})</span> 
94
+         <span v-for="(item,index) in normData" :key="index" class="index">
95
+           {{item.item_name}}
96
+           <span v-if="item.range_type == 1">({{item.min_range}}-{{item.large_range}})</span>
97
+           <span v-if="item.range_type == 2">({{item.range_value}})</span>
98
+        </span> 
95
       </div>
99
       </div>
96
     </div>
100
     </div>
97
   </div>
101
   </div>
266
             }
270
             }
267
           }
271
           }
268
         ],
272
         ],
273
+        dataZoom: [
274
+          {
275
+            // Y轴固定,让内容滚动
276
+            type: 'slider',
277
+            show: false,
278
+            xAxisIndex: [0],
279
+            start: 1,
280
+            end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
281
+            zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
282
+          },
283
+          {
284
+            type: 'inside',
285
+            xAxisIndex: [0],
286
+            start: 1,
287
+            end: 20,
288
+            zoomLock: true // 锁定区域禁止缩放
289
+          }
290
+        ]
269
       }
291
       }
270
     };
292
     };
271
   },
293
   },
310
         this.getlist()
332
         this.getlist()
311
       }
333
       }
312
     },
334
     },
313
-     getTimestamp(time) {
335
+    getTimestamp(time) {
314
       // 把时间日期转成时间戳
336
       // 把时间日期转成时间戳
315
       return new Date(time).getTime() / 1000;
337
       return new Date(time).getTime() / 1000;
316
     },
338
     },
456
       getNormData().then(response=>{
478
       getNormData().then(response=>{
457
          if(response.data.state === 1){
479
          if(response.data.state === 1){
458
            var normdata = response.data.data.normdata
480
            var normdata = response.data.data.normdata
481
+          //  console.log("指标正常范围",normdata)
459
            this.normData = normdata
482
            this.normData = normdata
460
            this.getlist()
483
            this.getlist()
461
          }
484
          }
568
       getFirstQuarter(params).then(response=>{
591
       getFirstQuarter(params).then(response=>{
569
          if(response.data.state === 1){
592
          if(response.data.state === 1){
570
             var count =  response.data.data.count
593
             var count =  response.data.data.count
571
-            console.log("count",count)  
594
+            // console.log("count",count) 
595
+            var countwo = response.data.data.countwo 
596
+            // console.log("countwo",countwo)
597
+            countwo.map(item=>{
598
+              count.push(item)
599
+            })
600
+          //  console.log("count",count)
572
             //获取已经配置的数据 
601
             //获取已经配置的数据 
573
             var arr=[]
602
             var arr=[]
574
             for(let i=0;i<count.length;i++){  
603
             for(let i=0;i<count.length;i++){  
578
                 }
607
                 }
579
               }
608
               }
580
             }
609
             }
581
-           console.log("arr",arr )
610
+          //  console.log("arr",arr )
582
            
611
            
583
             var arrtwo =  this.arrayDate(count,this.normData)
612
             var arrtwo =  this.arrayDate(count,this.normData)
584
             for(let i=0;i<arrtwo.length;i++){
613
             for(let i=0;i<arrtwo.length;i++){
590
             arrtwo.map(item => {
619
             arrtwo.map(item => {
591
               arr.push(item)
620
               arr.push(item)
592
             })
621
             })
593
-            // arr.sort(this.compare('sort'))    
622
+            arr.sort(this.compare('sort'))    
594
             for(const key in this.normData ){
623
             for(const key in this.normData ){
595
                this.modesData.xAxis.push(this.normData[key].item_name);
624
                this.modesData.xAxis.push(this.normData[key].item_name);
596
                 if(key in arr){
625
                 if(key in arr){
601
             }
630
             }
602
             this.chart.series[0].data = this.modesData.series
631
             this.chart.series[0].data = this.modesData.series
603
             this.chart.xAxis.data = this.modesData.xAxis
632
             this.chart.xAxis.data = this.modesData.xAxis
604
-    
633
+            this.getArrLength(this.chart.xAxis.data)
605
 
634
 
606
           
635
           
607
          }
636
          }
608
       })
637
       })
609
     },
638
     },
610
-   compare(property){
611
-        return function(a,b){
612
-            var value1 = a[property];
613
-            var value2 = b[property];
614
-            return value1 - value2;
615
-        }
639
+    compare(property){
640
+      return function(a,b){
641
+          var value1 = a[property];
642
+          var value2 = b[property];
643
+          return value1 - value2;
644
+      }
616
     },
645
     },
617
     arrayDate(array1,array2){
646
     arrayDate(array1,array2){
618
         var array1 = array1;
647
         var array1 = array1;
636
         }
665
         }
637
         return result;
666
         return result;
638
     },
667
     },
668
+    getArrLength(result){
669
+      if(result.length > 10){
670
+        var dataZoom_end = (10/result.length)*100;
671
+        this.chart.dataZoom[0].end = dataZoom_end
672
+      }else{
673
+        var dataZoom_end = 100;
674
+        this.chart.dataZoom[0].end = dataZoom_end
675
+      }
676
+    }
639
   },
677
   },
640
   created(){
678
   created(){
641
      //获取指标正常范围值
679
      //获取指标正常范围值

+ 2 - 1
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)}}
81
+                  <!-- {{getDialysisNo(scope.row.name)}} -->
82
+                  {{scope.row.dialysis_no}}
82
               </template>
83
               </template>
83
             </el-table-column>
84
             </el-table-column>
84
             <el-table-column
85
             <el-table-column

+ 84 - 20
src/xt_pages/qcd/statisticalConfiguration.vue Прегледај датотеку

74
                 </el-option>
74
                 </el-option>
75
             </el-select>
75
             </el-select>
76
           </el-form-item>
76
           </el-form-item>
77
-
78
-          <!-- <el-form-item label="质控范围" :label-width="formLabelWidth" required prop="large_range">
79
-            <el-input style="width:200px" v-model="form.min_range"></el-input>&nbsp;
80
-            -
81
-            <el-input style="width:200px" v-model="form.large_range"></el-input>
82
-          </el-form-item> -->
83
-          <div style="display:flex;">
77
+       
78
+            <el-form-item label="检验类型" :label-width="formLabelWidth" required prop="check_type">
79
+                    <el-radio
80
+                      :disabled = "true"
81
+                      v-model="form.check_type"
82
+                      v-for="item in radioType"
83
+                      :key="item.label"
84
+                      :label="item.value"
85
+                      :value="item.label"
86
+                      >{{ item.label }}</el-radio>
87
+            </el-form-item>  
88
+          <div style="display:flex;" v-show="showOne">
84
             <el-form-item label="质控范围" :label-width="formLabelWidth" required prop="min_range">
89
             <el-form-item label="质控范围" :label-width="formLabelWidth" required prop="min_range">
85
                 <el-input style="width:200px" v-model="form.min_range"></el-input>
90
                 <el-input style="width:200px" v-model="form.min_range"></el-input>
86
             </el-form-item>
91
             </el-form-item>
89
                 <el-input style="width:200px" v-model="form.large_range"></el-input>
94
                 <el-input style="width:200px" v-model="form.large_range"></el-input>
90
             </el-form-item>
95
             </el-form-item>
91
           </div>
96
           </div>
97
+          <div v-show="showTwo">
98
+            <el-form-item label="质控范围" :label-width="formLabelWidth" required prop="range_value">
99
+                <el-input style="width:200px" v-model="form.range_value"></el-input>
100
+            </el-form-item>
101
+          </div>
92
           <el-form-item label="排序" :label-width="formLabelWidth">
102
           <el-form-item label="排序" :label-width="formLabelWidth">
93
             <el-input style="width:200px" v-model="form.sort"></el-input>
103
             <el-input style="width:200px" v-model="form.sort"></el-input>
94
           </el-form-item>
104
           </el-form-item>
125
                 </el-option>
135
                 </el-option>
126
             </el-select>
136
             </el-select>
127
           </el-form-item>
137
           </el-form-item>
128
-          <!-- <el-form-item label="质控范围" :label-width="formLabelWidth" required prop="large_range">
129
-            <el-input style="width:200px" v-model="editform.min_range"></el-input>&nbsp;
130
-            -
131
-            <el-input style="width:200px" v-model="editform.large_range"></el-input>
132
-          </el-form-item> -->
133
-           <div style="display:flex;">
138
+          <el-form-item label="检验类型" :label-width="formLabelWidth" required prop="check_type">
139
+                <el-radio
140
+                  :disabled = "true"
141
+                   v-model="editform.check_type"
142
+                   v-for="item in radioType"
143
+                   :key="item.label"
144
+                   :label="item.value"
145
+                   :value="item.label"
146
+                  >{{ item.label }}
147
+                </el-radio>
148
+            </el-form-item> 
149
+           <div style="display:flex;" v-show="showOne">
134
             <el-form-item label="质控范围" :label-width="formLabelWidth" required prop="min_range">
150
             <el-form-item label="质控范围" :label-width="formLabelWidth" required prop="min_range">
135
                 <el-input style="width:200px" v-model="editform.min_range"></el-input>
151
                 <el-input style="width:200px" v-model="editform.min_range"></el-input>
136
             </el-form-item>
152
             </el-form-item>
138
             <el-form-item class='newFormItem' :label-width="formLabelWidth" required prop="large_range">
154
             <el-form-item class='newFormItem' :label-width="formLabelWidth" required prop="large_range">
139
                 <el-input style="width:200px" v-model="editform.large_range"></el-input>
155
                 <el-input style="width:200px" v-model="editform.large_range"></el-input>
140
             </el-form-item>
156
             </el-form-item>
157
+          </div>
158
+            <div v-show="showTwo">
159
+            <el-form-item label="质控范围" :label-width="formLabelWidth" required prop="range_value">
160
+                <el-input style="width:200px" v-model="editform.range_value"></el-input>
161
+            </el-form-item>
141
           </div>
162
           </div>
142
           <el-form-item label="排序" :label-width="formLabelWidth">
163
           <el-form-item label="排序" :label-width="formLabelWidth">
143
             <el-input style="width:200px" v-model="editform.sort"></el-input>
164
             <el-input style="width:200px" v-model="editform.sort"></el-input>
169
         { path: false, name: "统计配置" },
190
         { path: false, name: "统计配置" },
170
         { path: false, name: "质控达标统计配置" }
191
         { path: false, name: "质控达标统计配置" }
171
       ],
192
       ],
193
+     radioType: [
194
+        { value: 1, label: "数值范围" },
195
+        { value: 2, label: "选项" }
196
+      ],
172
       tabActiveName: "control",
197
       tabActiveName: "control",
173
       InspectionMajor:[],
198
       InspectionMajor:[],
174
       InspectionMinor:[],
199
       InspectionMinor:[],
183
         min_range: "",
208
         min_range: "",
184
         large_range: "",
209
         large_range: "",
185
         sort:"",
210
         sort:"",
211
+        check_type:"",
212
+        range_value:"",
186
       },
213
       },
187
       editform:{
214
       editform:{
188
          id:0,
215
          id:0,
191
          min_range: "",
218
          min_range: "",
192
          large_range: "",
219
          large_range: "",
193
          sort:"",
220
          sort:"",
221
+         check_type:"",
222
+         range_value:"",
194
       },
223
       },
195
       rules: {
224
       rules: {
196
         inspectionMajor: [{ required: true, message: "检查大项不能为空" }],
225
         inspectionMajor: [{ required: true, message: "检查大项不能为空" }],
197
         inspectionMinor: [{ required: true, message: "检查小项不能为空" }],
226
         inspectionMinor: [{ required: true, message: "检查小项不能为空" }],
198
         large_range:[{required:true,message:"质控范围不能为空"}],
227
         large_range:[{required:true,message:"质控范围不能为空"}],
199
-        min_range:[{required:true,message:"质控范围不能为空"}]
228
+        min_range:[{required:true,message:"质控范围不能为空"}],
229
+        check_type:[{required:true,message:"检验类型不能为空"}]
200
       },
230
       },
201
       page:1,
231
       page:1,
202
       limit:10,
232
       limit:10,
203
       total:0,
233
       total:0,
234
+      showOne:true,
235
+      showTwo:false,
204
     };
236
     };
205
   },
237
   },
206
   methods: {
238
   methods: {
216
       getConfigurationDetail(id).then(response=>{
248
       getConfigurationDetail(id).then(response=>{
217
          if(response.data.state == 1){
249
          if(response.data.state == 1){
218
            var configurationdetail = response.data.data.configurationdetail
250
            var configurationdetail = response.data.data.configurationdetail
219
-          console.log("详情",configurationdetail)
251
+           console.log("详情",configurationdetail)
220
            this.editform.id = configurationdetail.id
252
            this.editform.id = configurationdetail.id
221
            this.editform.inspectionMajor = configurationdetail.inspection_major
253
            this.editform.inspectionMajor = configurationdetail.inspection_major
222
            this.editform.inspectionMinor = configurationdetail.inspection_minor
254
            this.editform.inspectionMinor = configurationdetail.inspection_minor
255
+           this.editform.check_type = configurationdetail.range_type
256
+           this.editform.range_value = configurationdetail.range_value
257
+         if(configurationdetail.range_type == 1){
258
+              this.showOne = true
259
+              this.showTwo = false
260
+           }
261
+         if(configurationdetail.range_type == 2){
262
+             this.showOne = false
263
+             this.showTwo = true
264
+           }
265
+         if (configurationdetail.range_value == ""){
266
+             this.editform.range_value = "0"
267
+           }
223
            this.editform.large_range = configurationdetail.large_range
268
            this.editform.large_range = configurationdetail.large_range
224
            this.editform.min_range = configurationdetail.min_range
269
            this.editform.min_range = configurationdetail.min_range
225
-           if(configurationdetail.sort == 0){
270
+           
271
+         if(configurationdetail.sort == 0){
226
             this.editform.sort = ""
272
             this.editform.sort = ""
227
             return
273
             return
228
            }
274
            }
236
       getInspectionMajor().then(response=>{
282
       getInspectionMajor().then(response=>{
237
         if(response.data.state == 1){
283
         if(response.data.state == 1){
238
           var inspection =  response.data.data.inspection
284
           var inspection =  response.data.data.inspection
239
-          console.log("大项",inspection)
285
+          console.log("大项是什么",inspection)
240
           this.InspectionMajor = inspection
286
           this.InspectionMajor = inspection
241
          
287
          
242
         }
288
         }
268
        getInspectionRange(id).then(response=>{
314
        getInspectionRange(id).then(response=>{
269
          if(response.data.state == 1){
315
          if(response.data.state == 1){
270
            var inspectionRange =  response.data.data.inspectionRange
316
            var inspectionRange =  response.data.data.inspectionRange
271
-          console.log("inspectionRange",inspectionRange)
272
-           this.form.min_range = inspectionRange.range_min
273
-           this.form.large_range = inspectionRange.range_max
317
+           console.log("inspectionRange",inspectionRange)
318
+           if(inspectionRange.range_type == 1){
319
+             this.showOne = true
320
+             this.showTwo = false
321
+             this.form.check_type =  1
322
+             this.editform.check_type = 1
323
+             this.form.min_range = inspectionRange.range_min
324
+             this.form.large_range = inspectionRange.range_max
325
+             this.form.range_value  = "0"
326
+           }
327
+           if(inspectionRange.range_type == 2){
328
+             this.showOne = false
329
+             this.showTwo = true
330
+             this.form.check_type = 2
331
+             this.editform.check_type = 2
332
+             this.form.min_range = inspectionRange.range_min
333
+             this.form.large_range = inspectionRange.range_max
334
+             this.form.range_value = inspectionRange.range_value
335
+             this.editform.range_value = inspectionRange.range_value
336
+           }
337
+          
274
          }
338
          }
275
       })
339
       })
276
     },
340
     },

+ 10 - 8
src/xt_pages/qcd/treatmentControlAnalysis/components/CheckAll.vue Прегледај датотеку

72
             <template slot-scope="scope">{{ scope.row.name}}</template>
72
             <template slot-scope="scope">{{ scope.row.name}}</template>
73
          </el-table-column>
73
          </el-table-column>
74
          <el-table-column
74
          <el-table-column
75
-          :label="modeItem.project_name"
75
+          :label="modeItem.project_name+'('+modeItem.inspection_frequency+'天)'"
76
           property="number"
76
           property="number"
77
           align="center"
77
           align="center"
78
           min-width="110"
78
           min-width="110"
80
           :key="index"
80
           :key="index"
81
         >
81
         >
82
           <template slot-scope="scope">
82
           <template slot-scope="scope">
83
-              {{ scope.row.data[index].Count}}
83
+             <span v-if="Math.floor(90/modeItem.inspection_frequency) <= scope.row.data[index].Count" style="color:black">{{ scope.row.data[index].Count}}</span>
84
+              <span v-if="Math.floor(90/modeItem.inspection_frequency) > scope.row.data[index].Count" style="color:red">{{ scope.row.data[index].Count}}</span>
84
           </template>
85
           </template>
85
         </el-table-column>
86
         </el-table-column>
86
         </el-table>
87
         </el-table>
90
           @size-change="handleSizeChange"
91
           @size-change="handleSizeChange"
91
           @current-change="handleCurrentChange"
92
           @current-change="handleCurrentChange"
92
           :current-page="listQuery.page"
93
           :current-page="listQuery.page"
93
-          :page-sizes="[20, 40, 60, 80,100]"
94
+          :page-sizes="[10, 20, 30, 40,50]"
94
           :page-size="10"
95
           :page-size="10"
95
           background
96
           background
96
           style="margin-top:20px;"
97
           style="margin-top:20px;"
113
         start_time: "",
114
         start_time: "",
114
         end_time: "",
115
         end_time: "",
115
         page: 1,
116
         page: 1,
116
-        limit: 20
117
+        limit: 10
117
       },
118
       },
118
       value: "请选项",
119
       value: "请选项",
119
       tableData: [],
120
       tableData: [],
203
       getAllMajorInspection().then(response=>{
204
       getAllMajorInspection().then(response=>{
204
         if(response.data.state === 1){
205
         if(response.data.state === 1){
205
            var inspection = response.data.data.inspection
206
            var inspection = response.data.data.inspection
206
-        
207
+           console.log("inspection",inspection)
207
            var a=[];
208
            var a=[];
208
            for(let i=0;i<inspection.length;i++){
209
            for(let i=0;i<inspection.length;i++){
209
              a.push(inspection[i])
210
              a.push(inspection[i])
219
       })
220
       })
220
     },
221
     },
221
     getPatientList(){
222
     getPatientList(){
223
+        this.tableData = []
222
       getPatientList(this.listQuery.start_time,this.listQuery.end_time,this.listQuery.limit,this.listQuery.page).then(response=>{
224
       getPatientList(this.listQuery.start_time,this.listQuery.end_time,this.listQuery.limit,this.listQuery.page).then(response=>{
223
          if(response.data.state === 1){
225
          if(response.data.state === 1){
224
            var patientInfo = response.data.data.patientInfo
226
            var patientInfo = response.data.data.patientInfo
225
-          
227
+           console.log("patientInfo",patientInfo)
226
 
228
 
227
            var total = response.data.data.total
229
            var total = response.data.data.total
228
         
230
         
229
            this.total = total
231
            this.total = total
230
           var list = response.data.data.list
232
           var list = response.data.data.list
231
-       
233
+          console.log("counts",list)
232
           var dtd = []
234
           var dtd = []
233
           for(let i=0;i<list.length;i++){
235
           for(let i=0;i<list.length;i++){
234
               for(let j=0;j<this.tableName.length;j++){
236
               for(let j=0;j<this.tableName.length;j++){
261
               }
263
               }
262
               this.tableData.push({ name: key, data: dd[key]});
264
               this.tableData.push({ name: key, data: dd[key]});
263
             }
265
             }
264
-       
266
+            console.log("表哥",this.tableData)
265
             let projectArr = []
267
             let projectArr = []
266
           
268
           
267
             this.newArr.map(item => {
269
             this.newArr.map(item => {

+ 110 - 80
src/xt_pages/qcd/treatmentControlAnalysis/components/CheckPersonal.vue Прегледај датотеку

181
               }
181
               }
182
             }
182
             }
183
           }
183
           }
184
+        ],
185
+        dataZoom: [
186
+          {
187
+            // Y轴固定,让内容滚动
188
+            type: 'slider',
189
+            show: false,
190
+            xAxisIndex: [0],
191
+            start: 1,
192
+            end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
193
+            zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
194
+          },
195
+          {
196
+            type: 'inside',
197
+            xAxisIndex: [0],
198
+            start: 1,
199
+            end: 20,
200
+            zoomLock: true // 锁定区域禁止缩放
201
+          }
184
         ]
202
         ]
185
       },
203
       },
186
       pickerOptions: {
204
       pickerOptions: {
216
       } else {
234
       } else {
217
       }
235
       }
218
     },
236
     },
219
-   getTimestamp(time) {
237
+    getTimestamp(time) {
220
       // 把时间日期转成时间戳
238
       // 把时间日期转成时间戳
221
       return new Date(time).getTime() / 1000;
239
       return new Date(time).getTime() / 1000;
222
     },
240
     },
227
       })
245
       })
228
     },
246
     },
229
     getInspectionTotalCount(){
247
     getInspectionTotalCount(){
230
-          this.modesData.series = []
231
-          this.modesData.xAxis = []
248
+      this.modesData.series = []
249
+      this.modesData.xAxis = []
232
       getInspectionTotalCount(this.listQuery.start_time,this.listQuery.end_time).then(response=>{
250
       getInspectionTotalCount(this.listQuery.start_time,this.listQuery.end_time).then(response=>{
233
-          if(response.data.state === 1){
234
-            var Inspection = response.data.data.Inspection
235
-     
236
-            this.tableData = Inspection
237
-          
238
-            var counts = response.data.data.counts
239
-         
240
-            var arr = []
241
-            for(let i=0;i<Inspection.length;i++){
242
-               for(let j=0;j<counts.length;j++){
243
-                 if(Inspection[i].inspection_major == counts[j].ProjectId){
244
-                   arr.push(counts[j])
245
-                 }
246
-               }
251
+        if(response.data.state === 1){
252
+          var Inspection = response.data.data.Inspection
253
+    
254
+          this.tableData = Inspection
255
+        
256
+          var counts = response.data.data.counts
257
+        
258
+          var arr = []
259
+          for(let i=0;i<Inspection.length;i++){
260
+            for(let j=0;j<counts.length;j++){
261
+              if(Inspection[i].inspection_major == counts[j].ProjectId){
262
+                arr.push(counts[j])
263
+              }
247
             }
264
             }
265
+          }
266
+        
267
+          var arrtwo =  this.arrayDate(counts,this.normData)
248
           
268
           
249
-           var arrtwo =  this.arrayDate(counts,this.normData)
250
-            
251
-            var hash = {};
252
-            var i = 0;
253
-            var res = [];
254
-            arr.forEach(function(item) {
255
-             var ProjectName = item.ProjectName;
256
-             hash[ProjectName] ? res[hash[ProjectName] - 1].Count.push(item.Count) : hash[ProjectName] = ++i && res.push({
257
-                 Count: [item.Count],
258
-                 ProjectName: ProjectName,
259
-                 ProjectId: item.ProjectId,
260
-                 Sort:item.Sort,
261
-             })
262
-            });
263
-            
264
-            res.map(item => {
265
-             item.Count = eval(item.Count.join('+'))
266
-            })
267
-           
268
-            let arr1 = []
269
-            this.tableData.map(it => {
270
-              arr1.push(it.project_name)
269
+          var hash = {};
270
+          var i = 0;
271
+          var res = [];
272
+          arr.forEach(function(item) {
273
+            var ProjectName = item.ProjectName;
274
+            hash[ProjectName] ? res[hash[ProjectName] - 1].Count.push(item.Count) : hash[ProjectName] = ++i && res.push({
275
+                Count: [item.Count],
276
+                ProjectName: ProjectName,
277
+                ProjectId: item.ProjectId,
278
+                Sort:item.Sort,
271
             })
279
             })
280
+          });
281
+          
282
+          res.map(item => {
283
+            item.Count = eval(item.Count.join('+'))
284
+          })
285
+          
286
+          let arr1 = []
287
+          this.tableData.map(it => {
288
+            arr1.push(it.project_name)
289
+          })
272
 
290
 
273
-            arr1.forEach((item,index)=>{
274
-              if(!(res[index] && item ==res[index].ProjectName)){
275
-                res.splice(index,0,{Count:0, ProjectName: item, Sort: index+1})
276
-              }
277
-            })
278
-            res.map(item => {
279
-              this.modesData.series.push(parseInt(item.Count));
280
-            })
281
-             console.log("this=====",this.tableData)
282
-            for (const key in this.tableData) {
283
-              this.modesData.xAxis.push(this.tableData[key].project_name);
284
-               let time = new Date(this.listQuery.end_time) - new Date(this.listQuery.start_time)
285
-               let day = parseInt(time / (1000 * 60 * 60 * 24))
286
-              this.obj.push(Math.round(day / this.tableData[key].inspection_frequency))
291
+          arr1.forEach((item,index)=>{
292
+            if(!(res[index] && item ==res[index].ProjectName)){
293
+              res.splice(index,0,{Count:0, ProjectName: item, Sort: index+1})
287
             }
294
             }
288
-            
289
-            this.chart.series[0].data = this.modesData.series
290
-            this.chart.xAxis.data = this.modesData.xAxis
295
+          })
296
+          res.map(item => {
297
+            this.modesData.series.push(parseInt(item.Count));
298
+          })
299
+          console.log("this=====",this.tableData)
300
+          for (const key in this.tableData) {
301
+            this.modesData.xAxis.push(this.tableData[key].project_name);
302
+            let time = new Date(this.listQuery.end_time) - new Date(this.listQuery.start_time)
303
+            let day = parseInt(time / (1000 * 60 * 60 * 24))
304
+            this.obj.push(Math.round(day / this.tableData[key].inspection_frequency))
291
           }
305
           }
306
+          
307
+          this.chart.series[0].data = this.modesData.series
308
+          this.chart.xAxis.data = this.modesData.xAxis
309
+          this.getArrLength(this.chart.xAxis.data)
310
+        }
292
       })
311
       })
293
     },
312
     },
294
 
313
 
326
             }
345
             }
327
             this.chart.series[0].data = this.modesData.series
346
             this.chart.series[0].data = this.modesData.series
328
             this.chart.xAxis.data = this.modesData.xAxis
347
             this.chart.xAxis.data = this.modesData.xAxis
348
+            this.getArrLength(this.chart.xAxis.data)
329
           }
349
           }
330
        })
350
        })
331
     },
351
     },
362
             }
382
             }
363
             this.chart.series[0].data = this.modesData.series
383
             this.chart.series[0].data = this.modesData.series
364
             this.chart.xAxis.data = this.modesData.xAxis
384
             this.chart.xAxis.data = this.modesData.xAxis
385
+            this.getArrLength(this.chart.xAxis.data)
365
          }
386
          }
366
       })
387
       })
367
     },
388
     },
387
         }
408
         }
388
         return result;
409
         return result;
389
     },
410
     },
390
-     querySearchAsync(keyword, cb) {
391
-        let key = ''
392
-        if (keyword != undefined) {
393
-          key = keyword
411
+    querySearchAsync(keyword, cb) {
412
+      let key = ''
413
+      if (keyword != undefined) {
414
+        key = keyword
415
+      }
416
+      let searchArray = []
417
+      PostSearch(key).then(response => {
418
+        if (response.data.state == 1) {
419
+            searchArray = response.data.data.patient
420
+            console.log("searchArray",searchArray)
421
+          cb(searchArray)
422
+        } else {
423
+          cb([])
394
         }
424
         }
395
-        let searchArray = []
396
-        PostSearch(key).then(response => {
397
-          if (response.data.state == 1) {
398
-             searchArray = response.data.data.patient
399
-             console.log("searchArray",searchArray)
400
-            cb(searchArray)
401
-          } else {
402
-            cb([])
403
-          }
404
-        })
405
-      },
406
-   handleSelect(val) {
407
-        console.log("val",val)
408
-        this.listQuery.search = val.name
409
-        this.patient_id = val.id
410
-        this.onSearch()
411
-      },
425
+      })
426
+    },
427
+    handleSelect(val) {
428
+      console.log("val",val)
429
+      this.listQuery.search = val.name
430
+      this.patient_id = val.id
431
+      this.onSearch()
432
+    },
433
+    getArrLength(result){
434
+      if(result.length > 10){
435
+        var dataZoom_end = (10/result.length)*100;
436
+        this.chart.dataZoom[0].end = dataZoom_end
437
+      }else{
438
+        var dataZoom_end = 100;
439
+        this.chart.dataZoom[0].end = dataZoom_end
440
+      }
441
+    }
412
   },
442
   },
413
   created(){
443
   created(){
414
     var nowDate = new Date();
444
     var nowDate = new Date();
432
       "-" +
462
       "-" +
433
       (nowDay < 10 ? "0" + nowDay : nowDay);
463
       (nowDay < 10 ? "0" + nowDay : nowDay);
434
 
464
 
435
-   //获取该机构下的所有患者
436
-     this.getCurrentOrgPatients()
437
-   //获取检验检查项目
465
+    //获取该机构下的所有患者
466
+    this.getCurrentOrgPatients()
467
+    //获取检验检查项目
438
     this.getInspectionTotalCount()
468
     this.getInspectionTotalCount()
439
   }
469
   }
440
 };
470
 };

+ 24 - 3
src/xt_pages/qcd/treatmentControlAnalysis/components/TimePersonal.vue Прегледај датотеку

88
            </el-table-column>
88
            </el-table-column>
89
           <el-table-column prop="address" label="透析总次数" width="140">
89
           <el-table-column prop="address" label="透析总次数" width="140">
90
             <template slot-scope="scope">
90
             <template slot-scope="scope">
91
-                <span>{{ scope.row.total_dialysis + scope.row.user_sys_before_count }}</span>
91
+                <span>{{ getDialysisCount(scope.row.patient_id)}}</span>
92
               </template>
92
               </template>
93
           </el-table-column>
93
           </el-table-column>
94
         </el-table>
94
         </el-table>
124
         page: 1,
124
         page: 1,
125
         limit: 20
125
         limit: 20
126
       },
126
       },
127
+      DialysisCount:[],
127
       total:0,
128
       total:0,
128
       options: [],
129
       options: [],
129
       value: "请选项",
130
       value: "请选项",
195
            console.log("totallist",totallist)
196
            console.log("totallist",totallist)
196
           this.total = totallist  
197
           this.total = totallist  
197
           var prescriptionList = response.data.data.prescriptionList
198
           var prescriptionList = response.data.data.prescriptionList
199
+          console.log("prescriptionList",prescriptionList)
198
           this.getModeId(prescriptionList)
200
           this.getModeId(prescriptionList)
199
-          
201
+          var count = response.data.data.count
202
+          console.log("count",count)
203
+          this.DialysisCount = count
204
+          // for(let i=0;i<count.length;i++){
205
+          //  for(let j=0;j<prescriptionList.length;j++){
206
+          //    if(count[i].patient_id == prescriptionList[j].patient_id){
207
+          //         prescriptionList[j].count = count[i].Count
208
+          //    }
209
+          //  }
210
+          // }
211
+          // console.log("prescriptionList",prescriptionList)
200
           let dataInfo = {}
212
           let dataInfo = {}
201
           list.forEach((item, index) => {
213
           list.forEach((item, index) => {
202
             let { patient_id } = item
214
             let { patient_id } = item
213
             }
225
             }
214
           })
226
           })
215
           let list = Object.values(dataInfo)
227
           let list = Object.values(dataInfo)
216
-          //console.log("arr",list)    
228
+          console.log("arr",list)    
217
           list.map(item => {
229
           list.map(item => {
218
             for (let i = 0; i < prescriptionList.length; i++) {
230
             for (let i = 0; i < prescriptionList.length; i++) {
219
               if (item.patient_id === prescriptionList[i].patient_id) {
231
               if (item.patient_id === prescriptionList[i].patient_id) {
239
 				return age;
251
 				return age;
240
 			}
252
 			}
241
     },
253
     },
254
+    getDialysisCount(id){
255
+       var count = 0
256
+       for(let i=0;i<this.DialysisCount.length;i++){
257
+           if(id == this.DialysisCount[i].patient_id){
258
+              count = this.DialysisCount[i].Count
259
+           }
260
+       }
261
+       return count
262
+    },
242
     onSearch(){
263
     onSearch(){
243
       if(this.listQuery.search == "" || this.listQuery.search == null){
264
       if(this.listQuery.search == "" || this.listQuery.search == null){
244
          this.getDialysisList()
265
          this.getDialysisList()

+ 28 - 0
src/xt_pages/qcd/workAnalysis/doctor.vue Прегледај датотеку

251
               }
251
               }
252
             }
252
             }
253
           }
253
           }
254
+        ],
255
+        dataZoom: [
256
+          {
257
+            // Y轴固定,让内容滚动
258
+            type: 'slider',
259
+            show: false,
260
+            xAxisIndex: [0],
261
+            start: 1,
262
+            end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
263
+            zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
264
+          },
265
+          {
266
+            type: 'inside',
267
+            xAxisIndex: [0],
268
+            start: 1,
269
+            end: 20,
270
+            zoomLock: true // 锁定区域禁止缩放
271
+          }
254
         ]
272
         ]
255
       }
273
       }
256
     };
274
     };
358
 
376
 
359
               }
377
               }
360
             }
378
             }
379
+            this.getArrLength(this.bar.xAxis.data)
361
           } else {
380
           } else {
362
           }
381
           }
363
         })
382
         })
381
       if (this.activeName == "second") {
400
       if (this.activeName == "second") {
382
         this.$router.push({ path: "/qcd/workAnalysis/nurse" });
401
         this.$router.push({ path: "/qcd/workAnalysis/nurse" });
383
       }
402
       }
403
+    },
404
+    getArrLength(result){
405
+      if(result.length > 10){
406
+        var dataZoom_end = (10/result.length)*100;
407
+        this.bar.dataZoom[0].end = dataZoom_end
408
+      }else{
409
+        var dataZoom_end = 100;
410
+        this.bar.dataZoom[0].end = dataZoom_end
411
+      }
384
     }
412
     }
385
   },created(){
413
   },created(){
386
     var date = new Date()
414
     var date = new Date()

+ 28 - 0
src/xt_pages/qcd/workAnalysis/nurse.vue Прегледај датотеку

286
                 }
286
                 }
287
               }
287
               }
288
             }
288
             }
289
+          ],
290
+          dataZoom: [
291
+            {
292
+              // Y轴固定,让内容滚动
293
+              type: 'slider',
294
+              show: false,
295
+              xAxisIndex: [0],
296
+              start: 1,
297
+              end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
298
+              zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
299
+            },
300
+            {
301
+              type: 'inside',
302
+              xAxisIndex: [0],
303
+              start: 1,
304
+              end: 20,
305
+              zoomLock: true // 锁定区域禁止缩放
306
+            }
289
           ]
307
           ]
290
         }
308
         }
291
       };
309
       };
386
                   this.percent.push(resp.data.data[i].mission_ratio)
404
                   this.percent.push(resp.data.data[i].mission_ratio)
387
                 }
405
                 }
388
               }
406
               }
407
+              this.getArrLength(this.bar.xAxis.data)
389
 
408
 
390
             } else {
409
             } else {
391
             }
410
             }
410
         if (this.activeName == "first") {
429
         if (this.activeName == "first") {
411
           this.$router.push({ path: "/qcd/workAnalysis/doctor" });
430
           this.$router.push({ path: "/qcd/workAnalysis/doctor" });
412
         }
431
         }
432
+      },
433
+      getArrLength(result){
434
+        if(result.length > 10){
435
+          var dataZoom_end = (10/result.length)*100;
436
+          this.bar.dataZoom[0].end = dataZoom_end
437
+        }else{
438
+          var dataZoom_end = 100;
439
+          this.bar.dataZoom[0].end = dataZoom_end
440
+        }
413
       }
441
       }
414
     },created(){
442
     },created(){
415
       var date = new Date()
443
       var date = new Date()