Selaa lähdekoodia

Signed-off-by: 1004749546@qq.com <1004749546@qq.com>
报表bug修改

1004749546@qq.com 4 vuotta sitten
vanhempi
commit
b92a30e2a3
3 muutettua tiedostoa jossa 6 lisäystä ja 2 poistoa
  1. 1 0
      src/components/Echarts/bar.vue
  2. 3 1
      src/components/Echarts/line.vue
  3. 2 1
      src/views/Home.vue

+ 1 - 0
src/components/Echarts/bar.vue

@@ -59,6 +59,7 @@ export default {
             this.xZoomEnd = 80
           } else {
             this.isShowZoom = false
+            this.xZoomEnd = 100
           }
           if (nVal.length > 30) {
             this.xZoomEnd = 70

+ 3 - 1
src/components/Echarts/line.vue

@@ -51,7 +51,7 @@ export default {
   watch: {
     xAxisData: {
       handler (nVal, oVal) {
-        // console.log(nVal, 'nnnnnnnn')
+        console.log(nVal, 'nnnnnnnn')
         if (nVal) {
           // 根据x轴时间长度控制滚动条位置及显示状态 x轴长度大于25时,显示滚动条并且滚动条结束位置在80%
           if (nVal.length > 25) {
@@ -59,6 +59,7 @@ export default {
             this.xZoomEnd = 80
           } else {
             this.isShowZoom = false
+            this.xZoomEnd = 100
           }
           if (nVal.length > 30) {
             this.xZoomEnd = 70
@@ -106,6 +107,7 @@ export default {
       const legend = this.seriesData.map(_ => _.name)
       this.$nextTick(() => {
         const xAxisData = this.value ? Object.keys(this.value) : this.xAxisData
+        console.log(xAxisData, 'xAxisData')
         const seriesData = this.value ? Object.values(this.value) : this.seriesData
         const option = {
           color: [this.color],

+ 2 - 1
src/views/Home.vue

@@ -50,6 +50,7 @@
         <chart-line
           style="height: 300px;"
           color="#6C6FBE"
+          ref="chartLine"
           :yMax="1000"
           yUnit="台"
           :xAxisRotate="resize"
@@ -439,6 +440,7 @@ export default {
         const day = Number(itemDay[2])
         const time = month + '月' + day + '日'
         days.push(time)
+        // console.log(days, 'ddddd')
         kxData.push(item.KX)
         jxData.push(item.JX)
         dlxData.push(item.DLX)
@@ -447,7 +449,6 @@ export default {
       })
       this.XdaysData = days
       const washTypeData = [kxData, jxData, dlxData]
-      console.log(washTypeData, 'washTypeData')
       // 洗车类型柱状图表数据
       this.washTypeBarData.map((item, index) => {
         item.data = washTypeData[index]