See999 4 년 전
부모
커밋
af7230b61c

+ 2 - 1
src/xt_pages/qcd/components/LineChart.vue 파일 보기

@@ -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 파일 보기

@@ -261,6 +261,24 @@ export default {
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,6 +371,7 @@ export default {
353 371
               this.chart.series[0].data.push(resp.data.data[i].systolic_blood_pressure)
354 372
               this.chart.series[1].data.push(resp.data.data[i].diastolic_blood_pressure)
355 373
             }
374
+            this.getArrLength(this.chart.xAxis.data)
356 375
           } else {
357 376
           }
358 377
         })
@@ -404,6 +423,15 @@ export default {
404 423
     },
405 424
     clickQuality(index) {
406 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 436
   },created() {
409 437
     var date = new Date()

+ 28 - 0
src/xt_pages/qcd/indicatorControlAnalysis/components/personal.vue 파일 보기

@@ -352,6 +352,24 @@
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,6 +624,7 @@
606 624
                 this.options2.xAxis.data.push(resp.data.data[i].date)
607 625
                 this.options2.series[0].data.push(resp.data.data[i].value)
608 626
               }
627
+              this.getArrLength(this.options2.xAxis.data)
609 628
 
610 629
             } else {
611 630
 
@@ -619,6 +638,15 @@
619 638
         // 把时间日期转成时间戳
620 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 651
     }, created() {
624 652
       var date = new Date()

+ 28 - 0
src/xt_pages/qcd/indicatorControlAnalysis/monitor.vue 파일 보기

@@ -396,6 +396,24 @@
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,6 +535,7 @@
517 535
                   this.chart.xAxis.data.push(resp.data.data[i].date)
518 536
                   this.chart.series[0].data.push(resp.data.data[i].value)
519 537
                 }
538
+                this.getArrLength(this.chart.xAxis.data)
520 539
             } else {
521 540
             }
522 541
           })
@@ -571,6 +590,15 @@
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 603
     }, created() {
576 604
       var date = new Date()

+ 43 - 3
src/xt_pages/qcd/indicatorControlAnalysis/process.vue 파일 보기

@@ -94,7 +94,7 @@
94 94
             <div class="tableTitle">统计表</div>
95 95
             <div>
96 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 98
                   <template slot-scope="scope">
99 99
                     {{scope.row.schedule_date | parseTime('{y}-{m}-{d}') }}
100 100
                     <!--{{getTime(scope.row.schedule_date)}}-->
@@ -232,7 +232,7 @@
232 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 236
                   <template slot-scope="scope">
237 237
                     {{
238 238
                     scope.row.prescription.dialysis_duration_hour?scope.row.prescription.dialysis_duration_hour+'小时':''}}
@@ -249,7 +249,7 @@
249 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 253
                   <template slot-scope="scope">
254 254
                     {{GetAnticoagulantById( scope.row.prescription.anticoagulant)}}
255 255
                   </template>
@@ -419,6 +419,24 @@
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 442
         bar: {
@@ -623,6 +641,7 @@
623 641
                   this.chart.xAxis.data.push(resp.data.data[i].date)
624 642
                   this.chart.series[0].data.push(resp.data.data[i].value)
625 643
                 }
644
+                this.getArrLength(this.chart.xAxis.data,1)
626 645
               } else {
627 646
 
628 647
                 for (let i = 0; i < resp.data.data.length; i++) {
@@ -631,6 +650,7 @@
631 650
                   this.percent.push(resp.data.data[i].ratio)
632 651
 
633 652
                 }
653
+                this.getArrLength(this.bar.xAxis.data,2)
634 654
               }
635 655
             } else {
636 656
             }
@@ -689,6 +709,26 @@
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 733
     }, created() {
694 734
       var date = new Date()

+ 28 - 0
src/xt_pages/qcd/indicatorControlAnalysis/weightDetails.vue 파일 보기

@@ -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
     };
@@ -359,6 +377,7 @@ export default {
359 377
               this.chart.xAxis.data.push(resp.data.data[i].date)
360 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 381
           } else {
363 382
           }
364 383
         })
@@ -405,6 +424,15 @@ export default {
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 436
   },created() {
409 437
     var date = new Date()
410 438
     var year = date.getFullYear() //获取完整的年份(4位)

+ 35 - 8
src/xt_pages/qcd/officesControlAnalysis/time.vue 파일 보기

@@ -266,6 +266,24 @@ export default {
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,7 +328,7 @@ export default {
310 328
         this.getlist()
311 329
       }
312 330
     },
313
-     getTimestamp(time) {
331
+    getTimestamp(time) {
314 332
       // 把时间日期转成时间戳
315 333
       return new Date(time).getTime() / 1000;
316 334
     },
@@ -601,18 +619,18 @@ export default {
601 619
             }
602 620
             this.chart.series[0].data = this.modesData.series
603 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 635
     arrayDate(array1,array2){
618 636
         var array1 = array1;
@@ -636,6 +654,15 @@ export default {
636 654
         }
637 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 667
   created(){
641 668
      //获取指标正常范围值

+ 110 - 80
src/xt_pages/qcd/treatmentControlAnalysis/components/CheckPersonal.vue 파일 보기

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

+ 28 - 0
src/xt_pages/qcd/workAnalysis/doctor.vue 파일 보기

@@ -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 파일 보기

@@ -294,6 +294,24 @@
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,6 +422,7 @@
404 422
 
405 423
                 }
406 424
               }
425
+              this.getArrLength(this.bar.xAxis.data)
407 426
 
408 427
             } else {
409 428
             }
@@ -428,6 +447,15 @@
428 447
         if (this.activeName == "first") {
429 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 460
     },created(){
433 461
       var date = new Date()