chenrui 4 years ago
parent
commit
e46058eccd
1 changed files with 16 additions and 17 deletions
  1. 16 17
      src/views/reportData/stockIncomeReport/list.vue

+ 16 - 17
src/views/reportData/stockIncomeReport/list.vue

@@ -74,8 +74,8 @@ export default {
       const legend = []
       if (bit) {
         data.map(item => {
-    			 const p = `${item.name}: ${item.value}${bit}`
-    			 legend.push(p)
+          const p = `${item.name}: ${item.value}${bit}`
+          legend.push(p)
         })
       }
       const option = {
@@ -94,21 +94,21 @@ export default {
           formatter: `{b} : {d}%`
         },
         legend: {
-    		  orient: 'horizontal',
-    		  left: 'center',
-    		  bottom: '5',
-    		  padding: 5,
-    		  textStyle: {
-    		    color: '#abd7ff',
+          orient: 'horizontal',
+          left: 'center',
+          bottom: '5',
+          padding: 5,
+          textStyle: {
+            color: '#abd7ff',
             fontSize: 10
-    		  },
-    		  show: !!bit,
-    		  formatter: function (name) {
-    			  if (bit) {
+          },
+          show: !!bit,
+          formatter: function (name) {
+            if (bit) {
               const p = data.find(item => item.name == name)
               return name + (p ? (':' + p.value + bit) : '')
-    			  }
-    		  }
+            }
+          }
         },
         series: [{
           type: 'pie',
@@ -120,8 +120,7 @@ export default {
             normal: {
               formatter: params => {
                 return (
-                  '{name|' + params.name + '}{value|' +
-    										params.percent + '%' + '}'
+                  '{name|' + params.name + '}{value|' + params.percent + '%' + '}'
                 )
               },
               padding: [0, -70, 25, -70],
@@ -226,7 +225,7 @@ export default {
           })
         }
       })
-      const con5 = document.getElementById('con1')
+      const con1 = document.getElementById('con1')
       const chart1 = echarts.init(con1)
       const option = this.initPie(chart1, '', this.pieData)
       chart1.setOption(option)