Pārlūkot izejas kodu

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

csx 4 gadus atpakaļ
vecāks
revīzija
ab47bb29cc

+ 1 - 0
config/dev.env.js Parādīt failu

@@ -8,6 +8,7 @@ module.exports = {
8 8
   ENV_CONFIG: '"dev"',
9 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 10
   BASE_API:'"http://localhost:9531"',
11
+  // BASE_API:'"http://api.xt.test.sgjyun.com"',
11 12
   SSO_HOST: '"http://testsso.sgjyun.com"',
12 13
   SRCM_HOST: '"http://test1.sgjyun.com"',
13 14
   XT_HOST: '"http://xt.test.sgjyun.com"',

+ 2 - 2
config/index.js Parādīt failu

@@ -17,8 +17,8 @@ module.exports = {
17 17
     // can be overwritten by process.env.HOST
18 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 22
     // host: 'xt.test.sgjyun.com',
23 23
     host:'localhost',
24 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 Parādīt failu

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

+ 33 - 33
src/xt_pages/qcd/basicInformationAnalysis.vue Parādīt failu

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

+ 2 - 1
src/xt_pages/qcd/components/LineChart.vue Parādīt failu

@@ -247,7 +247,8 @@ export default {
247 247
         //   }
248 248
         // ],
249 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 254
     initChart() {

+ 28 - 0
src/xt_pages/qcd/indicatorControlAnalysis/bloodPressureDetails.vue Parādīt failu

@@ -264,6 +264,24 @@ export default {
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,6 +375,7 @@ export default {
357 375
               this.chart.series[0].data.push(resp.data.data[i].systolic_blood_pressure)
358 376
               this.chart.series[1].data.push(resp.data.data[i].diastolic_blood_pressure)
359 377
             }
378
+            this.getArrLength(this.chart.xAxis.data)
360 379
           } else {
361 380
           }
362 381
         })
@@ -408,6 +427,15 @@ export default {
408 427
     },
409 428
     clickQuality(index) {
410 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 440
   },created() {
413 441
     var date = new Date()

+ 28 - 0
src/xt_pages/qcd/indicatorControlAnalysis/components/personal.vue Parādīt failu

@@ -354,6 +354,24 @@
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,6 +628,7 @@
610 628
                 this.options2.xAxis.data.push(resp.data.data[i].date)
611 629
                 this.options2.series[0].data.push(resp.data.data[i].value)
612 630
               }
631
+              this.getArrLength(this.options2.xAxis.data)
613 632
 
614 633
             } else {
615 634
 
@@ -623,6 +642,15 @@
623 642
         // 把时间日期转成时间戳
624 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 655
     }, created() {
628 656
       var date = new Date()

+ 28 - 0
src/xt_pages/qcd/indicatorControlAnalysis/monitor.vue Parādīt failu

@@ -399,6 +399,24 @@
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,6 +539,7 @@
521 539
                   this.chart.xAxis.data.push(resp.data.data[i].date)
522 540
                   this.chart.series[0].data.push(resp.data.data[i].value)
523 541
                 }
542
+                this.getArrLength(this.chart.xAxis.data)
524 543
             } else {
525 544
             }
526 545
           })
@@ -577,6 +596,15 @@
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 609
     }, created() {
582 610
       var date = new Date()

+ 47 - 4
src/xt_pages/qcd/indicatorControlAnalysis/process.vue Parādīt failu

@@ -97,7 +97,7 @@
97 97
             <div class="tableTitle">统计表</div>
98 98
             <div>
99 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 101
                   <template slot-scope="scope">
102 102
                     {{scope.row.schedule_date | parseTime('{y}-{m}-{d}') }}
103 103
                     <!--{{getTime(scope.row.schedule_date)}}-->
@@ -235,7 +235,7 @@
235 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 239
                   <template slot-scope="scope">
240 240
                     {{
241 241
                     scope.row.prescription.dialysis_duration_hour?scope.row.prescription.dialysis_duration_hour+'小时':''}}
@@ -252,7 +252,7 @@
252 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 256
                   <template slot-scope="scope">
257 257
                     {{GetAnticoagulantById( scope.row.prescription.anticoagulant)}}
258 258
                   </template>
@@ -423,6 +423,24 @@
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 446
         bar: {
@@ -591,11 +609,13 @@
591 609
       },
592 610
       getModeName(mode_id) {
593 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 614
         this.loading = true
596 615
         GetDialysisProcessIndexTableData(params)
597 616
           .then(rs => {
598 617
             var resp = rs.data
618
+            console.log("resp=====",resp)
599 619
             if (resp.state == 1) {
600 620
               this.loading = false
601 621
               this.tableData = []
@@ -622,12 +642,14 @@
622 642
           GetDialysisProcessIndexChartData(params)
623 643
           .then(rs => {
624 644
             var resp = rs.data
645
+            console.log("resp",resp)
625 646
             if (resp.state == 1) {
626 647
               if (this.query.statistics_type != 9 && this.query.statistics_type != 10) {
627 648
                 for (let i = 0; i < resp.data.data.length; i++) {
628 649
                   this.chart.xAxis.data.push(resp.data.data[i].date)
629 650
                   this.chart.series[0].data.push(resp.data.data[i].value)
630 651
                 }
652
+                this.getArrLength(this.chart.xAxis.data,1)
631 653
               } else {
632 654
 
633 655
                 for (let i = 0; i < resp.data.data.length; i++) {
@@ -636,6 +658,7 @@
636 658
                   this.percent.push(resp.data.data[i].ratio)
637 659
 
638 660
                 }
661
+                this.getArrLength(this.bar.xAxis.data,2)
639 662
               }
640 663
             } else {
641 664
             }
@@ -697,6 +720,26 @@
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 744
     }, created() {
702 745
       var date = new Date()

+ 28 - 0
src/xt_pages/qcd/indicatorControlAnalysis/weightDetails.vue Parādīt failu

@@ -266,6 +266,24 @@ export default {
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,6 +380,7 @@ export default {
362 380
               this.chart.xAxis.data.push(resp.data.data[i].date)
363 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 384
           } else {
366 385
           }
367 386
         })
@@ -410,6 +429,15 @@ export default {
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 441
   },created() {
414 442
     var date = new Date()
415 443
     var year = date.getFullYear() //获取完整的年份(4位)

+ 14 - 5
src/xt_pages/qcd/officesControlAnalysis/project.vue Parādīt failu

@@ -46,7 +46,10 @@
46 46
         <p class="pointTitle">指标正常范围值</p>
47 47
       </div>
48 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 53
       </div>
51 54
     </div>
52 55
   </div>
@@ -106,6 +109,7 @@ export default {
106 109
       lapseto:0,
107 110
       type:1,
108 111
       mode_type:"",
112
+      range_type:"",
109 113
       chart: {
110 114
         title: {
111 115
           text: "ECharts 入门示例"
@@ -273,8 +277,12 @@ export default {
273 277
         //第四季度
274 278
          const four_qurter_start = moment().month(9).startOf('month').format("YYYY-MM-DD")
275 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 286
          const params = {
279 287
            lapseto:this.lapseto,
280 288
            itemtype:this.type,
@@ -289,13 +297,14 @@ export default {
289 297
            three_qurter_end:three_qurter_end,
290 298
            four_qurter_start:four_qurter_start,
291 299
            four_qurter_end:four_qurter_end,
300
+           range_type:this.range_type
292 301
          }
293 302
       getProjectList(params).then(response=>{
294 303
         if(response.data.state === 1){
295 304
           var list = response.data.data.list
296
-      
305
+          console.log("list",list)
297 306
           var standList =  response.data.data.standList
298
-         
307
+          console.log("standlist",standList)
299 308
           var newArr = [
300 309
             {Total:"第一季度",Count:1,NoCount: 0},
301 310
             {Total:"第二季度",Count:1,NoCount: 0},

+ 50 - 12
src/xt_pages/qcd/officesControlAnalysis/time.vue Parādīt failu

@@ -91,7 +91,11 @@
91 91
         <p class="pointTitle">指标正常范围值</p>
92 92
       </div>
93 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 99
       </div>
96 100
     </div>
97 101
   </div>
@@ -266,6 +270,24 @@ export default {
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,7 +332,7 @@ export default {
310 332
         this.getlist()
311 333
       }
312 334
     },
313
-     getTimestamp(time) {
335
+    getTimestamp(time) {
314 336
       // 把时间日期转成时间戳
315 337
       return new Date(time).getTime() / 1000;
316 338
     },
@@ -456,6 +478,7 @@ export default {
456 478
       getNormData().then(response=>{
457 479
          if(response.data.state === 1){
458 480
            var normdata = response.data.data.normdata
481
+          //  console.log("指标正常范围",normdata)
459 482
            this.normData = normdata
460 483
            this.getlist()
461 484
          }
@@ -568,7 +591,13 @@ export default {
568 591
       getFirstQuarter(params).then(response=>{
569 592
          if(response.data.state === 1){
570 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 602
             var arr=[]
574 603
             for(let i=0;i<count.length;i++){  
@@ -578,7 +607,7 @@ export default {
578 607
                 }
579 608
               }
580 609
             }
581
-           console.log("arr",arr )
610
+          //  console.log("arr",arr )
582 611
            
583 612
             var arrtwo =  this.arrayDate(count,this.normData)
584 613
             for(let i=0;i<arrtwo.length;i++){
@@ -590,7 +619,7 @@ export default {
590 619
             arrtwo.map(item => {
591 620
               arr.push(item)
592 621
             })
593
-            // arr.sort(this.compare('sort'))    
622
+            arr.sort(this.compare('sort'))    
594 623
             for(const key in this.normData ){
595 624
                this.modesData.xAxis.push(this.normData[key].item_name);
596 625
                 if(key in arr){
@@ -601,18 +630,18 @@ export default {
601 630
             }
602 631
             this.chart.series[0].data = this.modesData.series
603 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 646
     arrayDate(array1,array2){
618 647
         var array1 = array1;
@@ -636,6 +665,15 @@ export default {
636 665
         }
637 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 678
   created(){
641 679
      //获取指标正常范围值

+ 2 - 1
src/xt_pages/qcd/patientControlAnalysis.vue Parādīt failu

@@ -78,7 +78,8 @@
78 78
             <el-table-column fixed prop="name" label="姓名" width="100"></el-table-column>
79 79
             <el-table-column label="透析号" width="80">
80 80
               <template slot-scope="scope">
81
-                  {{getDialysisNo(scope.row.name)}}
81
+                  <!-- {{getDialysisNo(scope.row.name)}} -->
82
+                  {{scope.row.dialysis_no}}
82 83
               </template>
83 84
             </el-table-column>
84 85
             <el-table-column

+ 84 - 20
src/xt_pages/qcd/statisticalConfiguration.vue Parādīt failu

@@ -74,13 +74,18 @@
74 74
                 </el-option>
75 75
             </el-select>
76 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 89
             <el-form-item label="质控范围" :label-width="formLabelWidth" required prop="min_range">
85 90
                 <el-input style="width:200px" v-model="form.min_range"></el-input>
86 91
             </el-form-item>
@@ -89,6 +94,11 @@
89 94
                 <el-input style="width:200px" v-model="form.large_range"></el-input>
90 95
             </el-form-item>
91 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 102
           <el-form-item label="排序" :label-width="formLabelWidth">
93 103
             <el-input style="width:200px" v-model="form.sort"></el-input>
94 104
           </el-form-item>
@@ -125,12 +135,18 @@
125 135
                 </el-option>
126 136
             </el-select>
127 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 150
             <el-form-item label="质控范围" :label-width="formLabelWidth" required prop="min_range">
135 151
                 <el-input style="width:200px" v-model="editform.min_range"></el-input>
136 152
             </el-form-item>
@@ -138,6 +154,11 @@
138 154
             <el-form-item class='newFormItem' :label-width="formLabelWidth" required prop="large_range">
139 155
                 <el-input style="width:200px" v-model="editform.large_range"></el-input>
140 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 162
           </div>
142 163
           <el-form-item label="排序" :label-width="formLabelWidth">
143 164
             <el-input style="width:200px" v-model="editform.sort"></el-input>
@@ -169,6 +190,10 @@ export default {
169 190
         { path: false, name: "统计配置" },
170 191
         { path: false, name: "质控达标统计配置" }
171 192
       ],
193
+     radioType: [
194
+        { value: 1, label: "数值范围" },
195
+        { value: 2, label: "选项" }
196
+      ],
172 197
       tabActiveName: "control",
173 198
       InspectionMajor:[],
174 199
       InspectionMinor:[],
@@ -183,6 +208,8 @@ export default {
183 208
         min_range: "",
184 209
         large_range: "",
185 210
         sort:"",
211
+        check_type:"",
212
+        range_value:"",
186 213
       },
187 214
       editform:{
188 215
          id:0,
@@ -191,16 +218,21 @@ export default {
191 218
          min_range: "",
192 219
          large_range: "",
193 220
          sort:"",
221
+         check_type:"",
222
+         range_value:"",
194 223
       },
195 224
       rules: {
196 225
         inspectionMajor: [{ required: true, message: "检查大项不能为空" }],
197 226
         inspectionMinor: [{ required: true, message: "检查小项不能为空" }],
198 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 231
       page:1,
202 232
       limit:10,
203 233
       total:0,
234
+      showOne:true,
235
+      showTwo:false,
204 236
     };
205 237
   },
206 238
   methods: {
@@ -216,13 +248,27 @@ export default {
216 248
       getConfigurationDetail(id).then(response=>{
217 249
          if(response.data.state == 1){
218 250
            var configurationdetail = response.data.data.configurationdetail
219
-          console.log("详情",configurationdetail)
251
+           console.log("详情",configurationdetail)
220 252
            this.editform.id = configurationdetail.id
221 253
            this.editform.inspectionMajor = configurationdetail.inspection_major
222 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 268
            this.editform.large_range = configurationdetail.large_range
224 269
            this.editform.min_range = configurationdetail.min_range
225
-           if(configurationdetail.sort == 0){
270
+           
271
+         if(configurationdetail.sort == 0){
226 272
             this.editform.sort = ""
227 273
             return
228 274
            }
@@ -236,7 +282,7 @@ export default {
236 282
       getInspectionMajor().then(response=>{
237 283
         if(response.data.state == 1){
238 284
           var inspection =  response.data.data.inspection
239
-          console.log("大项",inspection)
285
+          console.log("大项是什么",inspection)
240 286
           this.InspectionMajor = inspection
241 287
          
242 288
         }
@@ -268,9 +314,27 @@ export default {
268 314
        getInspectionRange(id).then(response=>{
269 315
          if(response.data.state == 1){
270 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 Parādīt failu

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

+ 110 - 80
src/xt_pages/qcd/treatmentControlAnalysis/components/CheckPersonal.vue Parādīt failu

@@ -181,6 +181,24 @@ export default {
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 204
       pickerOptions: {
@@ -216,7 +234,7 @@ export default {
216 234
       } else {
217 235
       }
218 236
     },
219
-   getTimestamp(time) {
237
+    getTimestamp(time) {
220 238
       // 把时间日期转成时间戳
221 239
       return new Date(time).getTime() / 1000;
222 240
     },
@@ -227,68 +245,69 @@ export default {
227 245
       })
228 246
     },
229 247
     getInspectionTotalCount(){
230
-          this.modesData.series = []
231
-          this.modesData.xAxis = []
248
+      this.modesData.series = []
249
+      this.modesData.xAxis = []
232 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,6 +345,7 @@ export default {
326 345
             }
327 346
             this.chart.series[0].data = this.modesData.series
328 347
             this.chart.xAxis.data = this.modesData.xAxis
348
+            this.getArrLength(this.chart.xAxis.data)
329 349
           }
330 350
        })
331 351
     },
@@ -362,6 +382,7 @@ export default {
362 382
             }
363 383
             this.chart.series[0].data = this.modesData.series
364 384
             this.chart.xAxis.data = this.modesData.xAxis
385
+            this.getArrLength(this.chart.xAxis.data)
365 386
          }
366 387
       })
367 388
     },
@@ -387,28 +408,37 @@ export default {
387 408
         }
388 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 443
   created(){
414 444
     var nowDate = new Date();
@@ -432,9 +462,9 @@ export default {
432 462
       "-" +
433 463
       (nowDay < 10 ? "0" + nowDay : nowDay);
434 464
 
435
-   //获取该机构下的所有患者
436
-     this.getCurrentOrgPatients()
437
-   //获取检验检查项目
465
+    //获取该机构下的所有患者
466
+    this.getCurrentOrgPatients()
467
+    //获取检验检查项目
438 468
     this.getInspectionTotalCount()
439 469
   }
440 470
 };

+ 24 - 3
src/xt_pages/qcd/treatmentControlAnalysis/components/TimePersonal.vue Parādīt failu

@@ -88,7 +88,7 @@
88 88
            </el-table-column>
89 89
           <el-table-column prop="address" label="透析总次数" width="140">
90 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 92
               </template>
93 93
           </el-table-column>
94 94
         </el-table>
@@ -124,6 +124,7 @@ export default {
124 124
         page: 1,
125 125
         limit: 20
126 126
       },
127
+      DialysisCount:[],
127 128
       total:0,
128 129
       options: [],
129 130
       value: "请选项",
@@ -195,8 +196,19 @@ export default {
195 196
            console.log("totallist",totallist)
196 197
           this.total = totallist  
197 198
           var prescriptionList = response.data.data.prescriptionList
199
+          console.log("prescriptionList",prescriptionList)
198 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 212
           let dataInfo = {}
201 213
           list.forEach((item, index) => {
202 214
             let { patient_id } = item
@@ -213,7 +225,7 @@ export default {
213 225
             }
214 226
           })
215 227
           let list = Object.values(dataInfo)
216
-          //console.log("arr",list)    
228
+          console.log("arr",list)    
217 229
           list.map(item => {
218 230
             for (let i = 0; i < prescriptionList.length; i++) {
219 231
               if (item.patient_id === prescriptionList[i].patient_id) {
@@ -239,6 +251,15 @@ export default {
239 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 263
     onSearch(){
243 264
       if(this.listQuery.search == "" || this.listQuery.search == null){
244 265
          this.getDialysisList()

+ 28 - 0
src/xt_pages/qcd/workAnalysis/doctor.vue Parādīt failu

@@ -251,6 +251,24 @@ export default {
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,6 +376,7 @@ export default {
358 376
 
359 377
               }
360 378
             }
379
+            this.getArrLength(this.bar.xAxis.data)
361 380
           } else {
362 381
           }
363 382
         })
@@ -381,6 +400,15 @@ export default {
381 400
       if (this.activeName == "second") {
382 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 413
   },created(){
386 414
     var date = new Date()

+ 28 - 0
src/xt_pages/qcd/workAnalysis/nurse.vue Parādīt failu

@@ -286,6 +286,24 @@
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,6 +404,7 @@
386 404
                   this.percent.push(resp.data.data[i].mission_ratio)
387 405
                 }
388 406
               }
407
+              this.getArrLength(this.bar.xAxis.data)
389 408
 
390 409
             } else {
391 410
             }
@@ -410,6 +429,15 @@
410 429
         if (this.activeName == "first") {
411 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 442
     },created(){
415 443
       var date = new Date()