Browse Source

新增组件及页面

liuqiwen 4 years ago
parent
commit
54407b480b
2 changed files with 14 additions and 7 deletions
  1. 7 3
      dgtis-ui/src/views/dashboard/BarChart3.vue
  2. 7 4
      dgtis-ui/src/views/index.vue

+ 7 - 3
dgtis-ui/src/views/dashboard/BarChart3.vue

@@ -86,7 +86,7 @@
             axisPointer: { // 坐标轴指示器,坐标轴触发有效
               type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
             },
-            formatter:'{b}<br />{a0}: {c0}万<br />{a1}: {c1}'
+            formatter:'{b}<br />{a0}: {c0}万<br />{a1}: {c1}'
           },
           color:that.data.color,
           legend: {
@@ -122,7 +122,7 @@
           yAxis: [
             {
               type: 'value',
-              name: that.data.yAxisName,
+              name: that.data.yAxisNameL,
               nameTextStyle:{
                 color:'#333',
                 fontSize: 10,
@@ -146,7 +146,11 @@
             },
             {
               type: 'value',
-              name: '',
+              name: that.data.yAxisNameR,
+              nameTextStyle:{
+                color:'#333',
+                fontSize: 10,
+              },
               axisTick: {
                 show: false
               },

+ 7 - 4
dgtis-ui/src/views/index.vue

@@ -265,7 +265,8 @@
         },
         // 险种类别
         barChartData:{
-          yAxisName:'单位:万',
+          yAxisNameL:'单位:万',
+          yAxisNameR:'单位:元',
           color:['#028FF3','#F29700'],
           xAxisData:[],
           seriesData:[]
@@ -484,9 +485,11 @@
             riskcode().then(response => {
                     console.log(response);
                     response.data.seriesData.forEach((item,index) => {
-                      item.data.forEach((num,i) => {
-                        item.data[i] = ((num-0)/10000).toFixed(2);
-                      })
+                      if(item.name == '客户数量'){
+                        item.data.forEach((num,i) => {
+                          item.data[i] = ((num-0)/10000).toFixed(2);
+                        })
+                      }
                     })
                     that.barChartData.xAxisData =  response.data.xaxisData;
                     that.barChartData.seriesData =  response.data.seriesData;