See999 4 jaren geleden
bovenliggende
commit
af7230b61c

+ 2 - 1
src/xt_pages/qcd/components/LineChart.vue Bestand weergeven

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 Bestand weergeven

261
               }
261
               }
262
             }
262
             }
263
           }
263
           }
264
+        ],
265
+        dataZoom: [
266
+          {
267
+            // Y轴固定,让内容滚动
268
+            type: 'slider',
269
+            show: false,
270
+            xAxisIndex: [0],
271
+            start: 1,
272
+            end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
273
+            zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
274
+          },
275
+          {
276
+            type: 'inside',
277
+            xAxisIndex: [0],
278
+            start: 1,
279
+            end: 20,
280
+            zoomLock: true // 锁定区域禁止缩放
281
+          }
264
         ]
282
         ]
265
       },
283
       },
266
     };
284
     };
353
               this.chart.series[0].data.push(resp.data.data[i].systolic_blood_pressure)
371
               this.chart.series[0].data.push(resp.data.data[i].systolic_blood_pressure)
354
               this.chart.series[1].data.push(resp.data.data[i].diastolic_blood_pressure)
372
               this.chart.series[1].data.push(resp.data.data[i].diastolic_blood_pressure)
355
             }
373
             }
374
+            this.getArrLength(this.chart.xAxis.data)
356
           } else {
375
           } else {
357
           }
376
           }
358
         })
377
         })
404
     },
423
     },
405
     clickQuality(index) {
424
     clickQuality(index) {
406
       this.quality = index;
425
       this.quality = index;
426
+    },
427
+    getArrLength(result){
428
+      if(result.length > 10){
429
+        var dataZoom_end = (10/result.length)*100;
430
+        this.chart.dataZoom[0].end = dataZoom_end
431
+      }else{
432
+        var dataZoom_end = 100;
433
+        this.chart.dataZoom[0].end = dataZoom_end
434
+      }
407
     }
435
     }
408
   },created() {
436
   },created() {
409
     var date = new Date()
437
     var date = new Date()

+ 28 - 0
src/xt_pages/qcd/indicatorControlAnalysis/components/personal.vue Bestand weergeven

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

+ 28 - 0
src/xt_pages/qcd/indicatorControlAnalysis/monitor.vue Bestand weergeven

396
                 }
396
                 }
397
               }
397
               }
398
             }
398
             }
399
+          ],
400
+          dataZoom: [
401
+            {
402
+              // Y轴固定,让内容滚动
403
+              type: 'slider',
404
+              show: false,
405
+              xAxisIndex: [0],
406
+              start: 1,
407
+              end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
408
+              zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
409
+            },
410
+            {
411
+              type: 'inside',
412
+              xAxisIndex: [0],
413
+              start: 1,
414
+              end: 20,
415
+              zoomLock: true // 锁定区域禁止缩放
416
+            }
399
           ]
417
           ]
400
         }
418
         }
401
 
419
 
517
                   this.chart.xAxis.data.push(resp.data.data[i].date)
535
                   this.chart.xAxis.data.push(resp.data.data[i].date)
518
                   this.chart.series[0].data.push(resp.data.data[i].value)
536
                   this.chart.series[0].data.push(resp.data.data[i].value)
519
                 }
537
                 }
538
+                this.getArrLength(this.chart.xAxis.data)
520
             } else {
539
             } else {
521
             }
540
             }
522
           })
541
           })
571
             }
590
             }
572
           }
591
           }
573
         })
592
         })
593
+      },
594
+      getArrLength(result){
595
+        if(result.length > 10){
596
+          var dataZoom_end = (10/result.length)*100;
597
+          this.chart.dataZoom[0].end = dataZoom_end
598
+        }else{
599
+          var dataZoom_end = 100;
600
+          this.chart.dataZoom[0].end = dataZoom_end
601
+        }
574
       }
602
       }
575
     }, created() {
603
     }, created() {
576
       var date = new Date()
604
       var date = new Date()

+ 43 - 3
src/xt_pages/qcd/indicatorControlAnalysis/process.vue Bestand weergeven

94
             <div class="tableTitle">统计表</div>
94
             <div class="tableTitle">统计表</div>
95
             <div>
95
             <div>
96
               <el-table :data="tableData" v-loading="loading" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
96
               <el-table :data="tableData" v-loading="loading" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
97
-                <el-table-column fixed label="透析日期" align="center">
97
+                <el-table-column fixed width="110" label="透析日期" align="center">
98
                   <template slot-scope="scope">
98
                   <template slot-scope="scope">
99
                     {{scope.row.schedule_date | parseTime('{y}-{m}-{d}') }}
99
                     {{scope.row.schedule_date | parseTime('{y}-{m}-{d}') }}
100
                     <!--{{getTime(scope.row.schedule_date)}}-->
100
                     <!--{{getTime(scope.row.schedule_date)}}-->
232
                 </el-table-column>
232
                 </el-table-column>
233
 
233
 
234
 
234
 
235
-                <el-table-column width="100" label="透析时长" align="center">
235
+                <el-table-column width="110" label="透析时长" align="center">
236
                   <template slot-scope="scope">
236
                   <template slot-scope="scope">
237
                     {{
237
                     {{
238
                     scope.row.prescription.dialysis_duration_hour?scope.row.prescription.dialysis_duration_hour+'小时':''}}
238
                     scope.row.prescription.dialysis_duration_hour?scope.row.prescription.dialysis_duration_hour+'小时':''}}
249
                 </el-table-column>
249
                 </el-table-column>
250
 
250
 
251
 
251
 
252
-                <el-table-column width="100" label="抗凝剂" align="center">
252
+                <el-table-column width="110" label="抗凝剂" align="center">
253
                   <template slot-scope="scope">
253
                   <template slot-scope="scope">
254
                     {{GetAnticoagulantById( scope.row.prescription.anticoagulant)}}
254
                     {{GetAnticoagulantById( scope.row.prescription.anticoagulant)}}
255
                   </template>
255
                   </template>
419
                 }
419
                 }
420
               }
420
               }
421
             }
421
             }
422
+          ],
423
+          dataZoom: [
424
+            {
425
+              // Y轴固定,让内容滚动
426
+              type: 'slider',
427
+              show: false,
428
+              xAxisIndex: [0],
429
+              start: 1,
430
+              end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
431
+              zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
432
+            },
433
+            {
434
+              type: 'inside',
435
+              xAxisIndex: [0],
436
+              start: 1,
437
+              end: 20,
438
+              zoomLock: true // 锁定区域禁止缩放
439
+            }
422
           ]
440
           ]
423
         },
441
         },
424
         bar: {
442
         bar: {
623
                   this.chart.xAxis.data.push(resp.data.data[i].date)
641
                   this.chart.xAxis.data.push(resp.data.data[i].date)
624
                   this.chart.series[0].data.push(resp.data.data[i].value)
642
                   this.chart.series[0].data.push(resp.data.data[i].value)
625
                 }
643
                 }
644
+                this.getArrLength(this.chart.xAxis.data,1)
626
               } else {
645
               } else {
627
 
646
 
628
                 for (let i = 0; i < resp.data.data.length; i++) {
647
                 for (let i = 0; i < resp.data.data.length; i++) {
631
                   this.percent.push(resp.data.data[i].ratio)
650
                   this.percent.push(resp.data.data[i].ratio)
632
 
651
 
633
                 }
652
                 }
653
+                this.getArrLength(this.bar.xAxis.data,2)
634
               }
654
               }
635
             } else {
655
             } else {
636
             }
656
             }
689
           }
709
           }
690
         })
710
         })
691
 
711
 
712
+      },
713
+      getArrLength(result,type){
714
+        if(type == 1){
715
+          if(result.length > 10){
716
+            var dataZoom_end = (10/result.length)*100;
717
+            this.chart.dataZoom[0].end = dataZoom_end
718
+          }else{
719
+            var dataZoom_end = 100;
720
+            this.chart.dataZoom[0].end = dataZoom_end
721
+          }
722
+        }else if(type == 2){
723
+          if(result.length > 10){
724
+            var dataZoom_end = (10/result.length)*100;
725
+            this.bar.dataZoom[0].end = dataZoom_end
726
+          }else{
727
+            var dataZoom_end = 100;
728
+            this.bar.dataZoom[0].end = dataZoom_end
729
+          }
730
+        }
731
+        
692
       }
732
       }
693
     }, created() {
733
     }, created() {
694
       var date = new Date()
734
       var date = new Date()

+ 28 - 0
src/xt_pages/qcd/indicatorControlAnalysis/weightDetails.vue Bestand weergeven

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
     };
359
               this.chart.xAxis.data.push(resp.data.data[i].date)
377
               this.chart.xAxis.data.push(resp.data.data[i].date)
360
               this.chart.series[0].data.push(parseFloat(resp.data.data[i].value).toFixed(1))
378
               this.chart.series[0].data.push(parseFloat(resp.data.data[i].value).toFixed(1))
361
             }
379
             }
380
+            this.getArrLength(this.chart.xAxis.data)
362
           } else {
381
           } else {
363
           }
382
           }
364
         })
383
         })
405
         }
424
         }
406
       })
425
       })
407
     },
426
     },
427
+    getArrLength(result){
428
+      if(result.length > 10){
429
+        var dataZoom_end = (10/result.length)*100;
430
+        this.chart.dataZoom[0].end = dataZoom_end
431
+      }else{
432
+        var dataZoom_end = 100;
433
+        this.chart.dataZoom[0].end = dataZoom_end
434
+      }
435
+    }
408
   },created() {
436
   },created() {
409
     var date = new Date()
437
     var date = new Date()
410
     var year = date.getFullYear() //获取完整的年份(4位)
438
     var year = date.getFullYear() //获取完整的年份(4位)

+ 35 - 8
src/xt_pages/qcd/officesControlAnalysis/time.vue Bestand weergeven

266
             }
266
             }
267
           }
267
           }
268
         ],
268
         ],
269
+        dataZoom: [
270
+          {
271
+            // Y轴固定,让内容滚动
272
+            type: 'slider',
273
+            show: false,
274
+            xAxisIndex: [0],
275
+            start: 1,
276
+            end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
277
+            zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
278
+          },
279
+          {
280
+            type: 'inside',
281
+            xAxisIndex: [0],
282
+            start: 1,
283
+            end: 20,
284
+            zoomLock: true // 锁定区域禁止缩放
285
+          }
286
+        ]
269
       }
287
       }
270
     };
288
     };
271
   },
289
   },
310
         this.getlist()
328
         this.getlist()
311
       }
329
       }
312
     },
330
     },
313
-     getTimestamp(time) {
331
+    getTimestamp(time) {
314
       // 把时间日期转成时间戳
332
       // 把时间日期转成时间戳
315
       return new Date(time).getTime() / 1000;
333
       return new Date(time).getTime() / 1000;
316
     },
334
     },
601
             }
619
             }
602
             this.chart.series[0].data = this.modesData.series
620
             this.chart.series[0].data = this.modesData.series
603
             this.chart.xAxis.data = this.modesData.xAxis
621
             this.chart.xAxis.data = this.modesData.xAxis
604
-    
622
+            this.getArrLength(this.chart.xAxis.data)
605
 
623
 
606
           
624
           
607
          }
625
          }
608
       })
626
       })
609
     },
627
     },
610
-   compare(property){
611
-        return function(a,b){
612
-            var value1 = a[property];
613
-            var value2 = b[property];
614
-            return value1 - value2;
615
-        }
628
+    compare(property){
629
+      return function(a,b){
630
+          var value1 = a[property];
631
+          var value2 = b[property];
632
+          return value1 - value2;
633
+      }
616
     },
634
     },
617
     arrayDate(array1,array2){
635
     arrayDate(array1,array2){
618
         var array1 = array1;
636
         var array1 = array1;
636
         }
654
         }
637
         return result;
655
         return result;
638
     },
656
     },
657
+    getArrLength(result){
658
+      if(result.length > 10){
659
+        var dataZoom_end = (10/result.length)*100;
660
+        this.chart.dataZoom[0].end = dataZoom_end
661
+      }else{
662
+        var dataZoom_end = 100;
663
+        this.chart.dataZoom[0].end = dataZoom_end
664
+      }
665
+    }
639
   },
666
   },
640
   created(){
667
   created(){
641
      //获取指标正常范围值
668
      //获取指标正常范围值

+ 110 - 80
src/xt_pages/qcd/treatmentControlAnalysis/components/CheckPersonal.vue Bestand weergeven

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
 };

+ 28 - 0
src/xt_pages/qcd/workAnalysis/doctor.vue Bestand weergeven

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 Bestand weergeven

294
                 }
294
                 }
295
               }
295
               }
296
             }
296
             }
297
+          ],
298
+          dataZoom: [
299
+            {
300
+              // Y轴固定,让内容滚动
301
+              type: 'slider',
302
+              show: false,
303
+              xAxisIndex: [0],
304
+              start: 1,
305
+              end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
306
+              zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
307
+            },
308
+            {
309
+              type: 'inside',
310
+              xAxisIndex: [0],
311
+              start: 1,
312
+              end: 20,
313
+              zoomLock: true // 锁定区域禁止缩放
314
+            }
297
           ]
315
           ]
298
         }
316
         }
299
       };
317
       };
404
 
422
 
405
                 }
423
                 }
406
               }
424
               }
425
+              this.getArrLength(this.bar.xAxis.data)
407
 
426
 
408
             } else {
427
             } else {
409
             }
428
             }
428
         if (this.activeName == "first") {
447
         if (this.activeName == "first") {
429
           this.$router.push({ path: "/qcd/workAnalysis/doctor" });
448
           this.$router.push({ path: "/qcd/workAnalysis/doctor" });
430
         }
449
         }
450
+      },
451
+      getArrLength(result){
452
+        if(result.length > 10){
453
+          var dataZoom_end = (10/result.length)*100;
454
+          this.bar.dataZoom[0].end = dataZoom_end
455
+        }else{
456
+          var dataZoom_end = 100;
457
+          this.bar.dataZoom[0].end = dataZoom_end
458
+        }
431
       }
459
       }
432
     },created(){
460
     },created(){
433
       var date = new Date()
461
       var date = new Date()