Browse Source

右轴单位修改

hbchen 1 year ago
parent
commit
d1be1f6015
1 changed files with 33 additions and 18 deletions
  1. 33 18
      src/views/financialStatistics/businessIncome.vue

+ 33 - 18
src/views/financialStatistics/businessIncome.vue

@@ -88,22 +88,6 @@
       }
     }
     chartOptions.value.yAxis[0].splitNumber=8
-    chartOptions.value.yAxis[1]={
-      alignTicks:true,
-      axisLabel:{
-        color:'#999',
-        formatter:(value)=>{
-          // 防止失真
-          return Math.round(value*10000)/10000
-        }
-      },
-      splitLine:{
-        lineStyle:{
-          type:'dashed'
-        }
-      },
-      splitNumber:8
-    }
       
     // 数据配置
     chartOptions.value.series=[
@@ -113,13 +97,28 @@
   }
   
   const getList=()=>{
-    console.log(searchParams);
     loading.list=true
     getIncomeChartData(searchParams).then(res=>{
 
-      console.log(chartOptions.value.series[1],'chartOptions.value');
       if(searchParams.company_type == 3){
         // 未续约
+        chartOptions.value.yAxis[1]={
+          name:'万元',
+          type: 'value',
+          nameGap:20,
+          splitNumber:10,
+          alignTicks:true,
+          nameTextStyle:{
+            align:'left',
+            color:'#999'
+          },
+          axisLabel:{
+            color:'#999',
+            formatter:(value)=>{
+              return Math.round(value*100)/1000000
+            }
+          }
+        }
         if(searchParams.list_param==0){
           // 月度
           chartOptions.value.series=[
@@ -132,6 +131,22 @@
           ]
         }
       }else{
+        chartOptions.value.yAxis[1]={
+          alignTicks:true,
+          axisLabel:{
+            color:'#999',
+            formatter:(value)=>{
+              // 防止失真
+              return Math.round(value*10000)/10000
+            }
+          },
+          splitLine:{
+            lineStyle:{
+              type:'dashed'
+            }
+          },
+          splitNumber:8
+        }
         chartOptions.value.series=[
           barSeriesSetting,
           lineSeriesSetting