From 6738d48087c2c89d136eaf2a494c61392e087b54 Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Tue, 21 Nov 2023 14:50:02 +0800
Subject: [PATCH] fix:表格滚动修改

---
 src/views/toCarryOutLegislativeReforms/summaryPage/components/reportTypeEcharts.vue |   81 ++++++++++++++++++++++------------------
 1 files changed, 44 insertions(+), 37 deletions(-)

diff --git a/src/views/toCarryOutLegislativeReforms/summaryPage/components/reportTypeEcharts.vue b/src/views/toCarryOutLegislativeReforms/summaryPage/components/reportTypeEcharts.vue
index a81c9a0..3521a45 100644
--- a/src/views/toCarryOutLegislativeReforms/summaryPage/components/reportTypeEcharts.vue
+++ b/src/views/toCarryOutLegislativeReforms/summaryPage/components/reportTypeEcharts.vue
@@ -36,7 +36,7 @@
     }
   },
   watch: {
-    'cylindricalityData': {
+    cylindricalityData: {
       handler(newVal) {
         console.log('newVal', newVal)
         this.seriesData = []
@@ -44,15 +44,18 @@
         const arr = []
 
         newVal.forEach(item => {
-          arr.push({
-            name: item.name,
-            type: 'bar',
-            barWidth: '40%',
-            data: [item.value]
-          })
+          arr.push(item.value)
           this.namelist.push(item.name)
         })
-        this.seriesData = arr
+        this.seriesData = [
+          {
+            type: 'bar',
+            barWidth: '40%',
+            data: arr
+          }
+        ]
+        console.log('this.seriesData', this.seriesData)
+        console.log('this.namelist', this.namelist)
         this.$nextTick(() => {
           this.initChart()
         })
@@ -110,37 +113,41 @@
             bottom: '3%',
             containLabel: true
           },
-          xAxis: [{
-            type: 'category',
-            data: this.namelist,
-            axisTick: {
-              show: false,
-              alignWithLabel: true
-            },
-            axisLine: {
-              show: false
-            },
-            axisLabel: {
-              color: '#989898'
-            }
-          }],
-          yAxis: [{
-            type: 'value',
-            axisTick: {
-              show: false
-            },
-            axisLine: {
-              show: false
-            },
-            splitLine: {
-              lineStyle: {
-                color: '#ebebeb'
+          xAxis: [
+            {
+              type: 'category',
+              data: this.namelist,
+              axisTick: {
+                show: false,
+                alignWithLabel: true
+              },
+              axisLine: {
+                show: false
+              },
+              axisLabel: {
+                color: '#989898'
               }
-            },
-            axisLabel: {
-              color: '#8c8c8c'
             }
-          }],
+          ],
+          yAxis: [
+            {
+              type: 'value',
+              axisTick: {
+                show: false
+              },
+              axisLine: {
+                show: false
+              },
+              splitLine: {
+                lineStyle: {
+                  color: '#ebebeb'
+                }
+              },
+              axisLabel: {
+                color: '#8c8c8c'
+              }
+            }
+          ],
           series: this.seriesData
         },
         true

--
Gitblit v1.8.0