Browse Source

测试bug修改

bls-dan 2 years ago
parent
commit
902cf477ff

+ 31 - 49
src/pages/views/home/components/LineAnalysis.vue

@@ -480,7 +480,7 @@ const rightContent: Ref<any> = ref({
       bottom: '25%',
       top: '20%'
     },
-    tooltip: { show: true },
+    tooltip: { trigger: 'axis', show: true },
     legend: {
       show: true,
       left: 'center',
@@ -534,11 +534,8 @@ const rightContent: Ref<any> = ref({
         show: true,
         formatter: '{value} km',
         margin: 10,
-        textStyle: {
-          color: '#fff',
-          fontSize: 18
-
-        }
+        color: '#fff',
+        fontSize: 18
       },
       axisTick: {
         show: false
@@ -550,14 +547,9 @@ const rightContent: Ref<any> = ref({
       type: 'line',
       smooth: true,
       symbolSize: 0,
-      itemStyle: {
-        normal: {
-          // color: '#4293FD',
-          lineStyle: {
-            // color: '#4293FD',
-            width: 2
-          }
-        }
+      lineStyle: {
+        // color: '#4293FD',
+        width: 2
       },
       data: [ 120, 132, 101, 134, 90, 230, 210, 182, 191, 234, 290, 330 ]
     },
@@ -567,12 +559,9 @@ const rightContent: Ref<any> = ref({
       smooth: true,
       symbolSize: 0,
       itemStyle: {
-        normal: {
+        lineStyle: {
           // color: '#23D0C4',
-          lineStyle: {
-            // color: '#23D0C4',
-            width: 2
-          }
+          width: 2
         }
       },
       data: [ 220, 182, 191, 234, 290, 330, 310, 201, 154, 190, 330, 410 ]
@@ -583,12 +572,9 @@ const rightContent: Ref<any> = ref({
       smooth: true,
       symbolSize: 0,
       itemStyle: {
-        normal: {
+        lineStyle: {
           // color: '#23D0C4',
-          lineStyle: {
-            // color: '#23D0C4',
-            width: 2
-          }
+          width: 2
         }
       },
       data: [ 220, 182, 191, 234, 290, 330, 310, 201, 154, 190, 330, 410 ]
@@ -692,31 +678,27 @@ const rightContent: Ref<any> = ref({
         name: '客流量',
         type: 'bar',
         silent: true,
-        itemStyle: {
-          normal: {
-            color: new graphic.LinearGradient(
-              0,
-              0,
-              0,
-              1,
-              [
-                {
-                  offset: 0,
-                  color: '#FFD35D'// 0% 处的颜色
-                },
-                {
-                  offset: 0.5,
-                  color: '#7ec2f382'// 0% 处的颜色
-                },
-                {
-                  offset: 1,
-                  color: '#1890ff21' // 100% 处的颜色
-                }
-              ],
-              false
-            )
-          }
-        },
+        color: new graphic.LinearGradient(
+          0,
+          0,
+          0,
+          1,
+          [
+            {
+              offset: 0,
+              color: '#FFD35D'// 0% 处的颜色
+            },
+            {
+              offset: 0.5,
+              color: '#7ec2f382'// 0% 处的颜色
+            },
+            {
+              offset: 1,
+              color: '#1890ff21' // 100% 处的颜色
+            }
+          ],
+          false
+        ),
         barWidth: 30,
         data: [ 200, 108, 200, 40, 210, 100, 200, 108, 200, 40, 210, 100 ]
       }

+ 20 - 10
src/pages/views/home/components/StationManagement.vue

@@ -172,7 +172,7 @@
                 </div>
                 <n-progress
                   type="line"
-                  :percentage="(chargingStatistics.chargingNum / chargingStatistics.totalChargingNum * 100).toFixed(2)"
+                  :percentage="+(chargingStatistics.chargingNum / chargingStatistics.totalChargingNum * 100).toFixed(2)"
                   :show-indicator="false"
                   :indicator-placement="'inside'"
                   processing
@@ -188,7 +188,7 @@
                 </div>
                 <n-progress
                   type="line"
-                  :percentage="(chargingStatistics.electricityNum / chargingStatistics.totalElectricityNum * 100).toFixed(2)"
+                  :percentage="+(chargingStatistics.electricityNum / chargingStatistics.totalElectricityNum * 100).toFixed(2)"
                   :show-indicator="false"
                   :indicator-placement="'inside'"
                   processing
@@ -237,7 +237,7 @@ const leftTitle: Ref<any[]> = ref([ {
   option: {
     color: [ 'rgb(86,137,239)', 'rgb(85,206,160)', 'rgb(88,107,141)', 'rgb(234,181,23)' ],
     tooltip: {
-      trigger: 'item'
+      formatter: '{b}: {c}个 ,占比: {d}%'
     },
     legend: {
       orient: 'horizontal',
@@ -271,7 +271,7 @@ const leftTitle: Ref<any[]> = ref([ {
   option: {
     color: [ 'rgb(86,137,239)', 'rgb(85,206,160)', 'rgb(88,107,141)', 'rgb(234,181,23)' ],
     tooltip: {
-      trigger: 'item'
+      formatter: '{b}: {c}个 ,占比: {d}%'
     },
     legend: {
       orient: 'horizontal',
@@ -305,7 +305,7 @@ const leftTitle: Ref<any[]> = ref([ {
   option: {
     color: [ 'rgb(86,137,239)', 'rgb(85,206,160)', 'rgb(88,107,141)', 'rgb(234,181,23)' ],
     tooltip: {
-      trigger: 'item'
+      formatter: '{b}: {c}个 ,占比: {d}%'
     },
     legend: {
       orient: 'horizontal',
@@ -339,6 +339,7 @@ const leftTitle: Ref<any[]> = ref([ {
   option: {
     tooltip: {
       trigger: 'axis',
+      formatter: '{b} <br/>数量: {c}个',
       axisPointer: {
         type: 'shadow'
       }
@@ -455,12 +456,12 @@ const region = ref({
       }
     },
     series: {
-      name: '量',
+      name: '客流量',
       type: 'bar',
       barMaxWidth: '40',
       itemStyle: {
         color: 'rgb(86,137,239)',
-        barBorderRadius: [ 0, 20, 20, 0 ]
+        borderRadius: [ 0, 20, 20, 0 ]
       },
       label: {
         show: true,
@@ -473,8 +474,15 @@ const region = ref({
 })
 
 const powerChart = ref({
+  grid: {
+    left: '3%',
+    right: '6%',
+    bottom: '20%',
+    containLabel: true
+  },
   tooltip: {
-    trigger: 'axis'
+    trigger: 'axis',
+    formatter: '今日{b} <br/>充电量: {c}kw·h'
   },
   xAxis: {
     type: 'category',
@@ -495,7 +503,7 @@ const powerChart = ref({
     },
     axisLabel: {
       color: '#fff',
-
+      formatter: '{value} kw·h',
       fontSize: 16
     }
   },
@@ -528,7 +536,9 @@ const powerChart = ref({
 const airportChart = ref({
   color: [ 'rgb(86,137,239)', 'rgb(85,206,160)', 'rgb(88,107,141)', 'rgb(234,181,23)' ],
   tooltip: {
-    trigger: 'item'
+    trigger: 'item',
+    formatter: '{b}: {c}个 ,占比: {d}%'
+
   },
   legend: {
     orient: 'horizontal',