Sfoglia il codice sorgente

柱状图修改对数增长

zhbyyy 2 anni fa
parent
commit
cfdcd2ae59
1 ha cambiato i file con 31 aggiunte e 13 eliminazioni
  1. 31 13
      investmentPort/js/investHomeGroup.js

+ 31 - 13
investmentPort/js/investHomeGroup.js

@@ -312,6 +312,7 @@ let app = new Vue({
           pageSize: 1000
         }
         post('/ierp/kapi/v2/mdnb/mdnb_xmkb/mdnb_manager_preinvest/tqqyedfx', value).then(res => {
+          console.log(res.data.rows, '企业额度分析')
           if (res.data.rows.length > 0) {
             let dataList = res.data.rows[0].entryentity
             left3 = [[], [], []]
@@ -378,6 +379,7 @@ let app = new Vue({
           pageSize: 1000
         }
         post('/ierp/kapi/v2/mdnb/mdnb_xmkb/mdnb_manager_preinvest/tqcebjfx', value).then(res => {
+          console.log(res.data, '产业布局分析')
           if (res.data.rows.length > 0) {
             let dataList = this.classify(res.data.rows[0].mdnb_entryentity, 'mdnb_textfield1')
             // 传统产业分析
@@ -551,7 +553,7 @@ let app = new Vue({
             left12 = []
             dataList2.forEach((item, index) => {
               left12[index] = [[], [], []]
-              for (let i = 0; i < 5; i++) {
+              for (let i = 0; i < item.data.length; i++) {
                 left12[index][0].push(item.data[i].mdnb_integerfield10)
                 left12[index][1].push(item.data[i].mdnb_integerfield12)
                 left12[index][2].push(item.data[i].mdnb_integerfield9)
@@ -678,9 +680,9 @@ let app = new Vue({
         }
         post('/ierp/kapi/v2/mdnb/mdnb_xmkb/mdnb_manager_middle/getUnitNoSolveDangerDate', value).then(res => {
           res.data.forEach((item, index) => {
-            right6[index].value = that.yuanChange(item.mdnb_height)
-            right6[index].value2 = that.yuanChange(item.mdnb_midle)
-            right6[index].value3 = that.yuanChange(item.mdnb_bottom)
+            right6[index].value = that.numFormat(item.mdnb_height)
+            right6[index].value2 = that.numFormat(item.mdnb_midle)
+            right6[index].value3 = that.numFormat(item.mdnb_bottom)
           })
           this.initChartR3()
           resolve(1);
@@ -888,6 +890,7 @@ let app = new Vue({
     // 左边穿透一级
     leftPenetrateOne (mdnb_textfield11, mdnb_textfield13, mdnb_textfield16, mdnb_textfield23, typeNum, type, param, typeCTwo, paramCTwo) {
       this.boardType = 'left'
+      let that = this
       return new Promise((resolve, err) => {
         let value = {
           access_token: this.access_token,
@@ -902,13 +905,14 @@ let app = new Vue({
           pageSize: 1000
         }
         post('/ierp/kapi/v2/mdnb/mdnb_xmkb/mdnb_manager_preinvest/yjct', value).then(res => {
+          console.log(res.data, '看看左边穿透')
           if (res.data.rows.length > 0) {
             if (typeNum == 2) {
               common4 = []
               common5 = []
               res.data.rows[0].mdnb_entryentity12.forEach((item, index) => {
                 common4.push(item.mdnb_integerfield18)
-                common5.push(item.mdnb_amountfield12)
+                common5.push(that.yuanChange(item.mdnb_amountfield12))
               })
               setTimeout(() => {
                 this.initChartLTip2('left', mdnb_textfield11, mdnb_textfield13, mdnb_textfield16, mdnb_textfield23, type, param, typeCTwo, paramCTwo)
@@ -917,7 +921,7 @@ let app = new Vue({
             } else if (typeNum == 1) {
               common3 = []
               res.data.rows[0].mdnb_entryentity12.forEach((item, index) => {
-                common3.push(item.mdnb_amountfield12)
+                common3.push(that.yuanChange(item.mdnb_amountfield12))
               })
               this.initChartLTip('left', mdnb_textfield11, mdnb_textfield13, mdnb_textfield16, mdnb_textfield23, type, param, typeCTwo, paramCTwo)
             }
@@ -1597,6 +1601,7 @@ let app = new Vue({
     },
     initChartLTip (location, mdnb_textfield11, mdnb_textfield13, mdnb_textfield16, mdnb_textfield23, typeCTwo, paramCTwo, portType) {
       this.myChartTip1 = echarts.init(document.getElementById("echartSingleTip"));
+      common3 = common3.map((item) => Number(item) + 1)
       let option = {
         grid: {
           top: 40,
@@ -1612,7 +1617,7 @@ let app = new Vue({
             type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
           },
           formatter: data => {
-            return `${data[0].name}</br>${data[0].seriesName}:${that.numFormat(data[0].value)}亿`
+            return `${data[0].name}</br>${data[0].seriesName}:${that.numFormat(data[0].value - 1)}亿`
           },
           textStyle: {
             color: '#FFF',     // 文字的颜色
@@ -1645,6 +1650,9 @@ let app = new Vue({
           },
         },
         yAxis: {
+          type: 'log',
+          min: 1,
+          logBase: 2,
           name: '亿',
           nameTextStyle: {//y轴上方单位的颜色
             color: '#fff',
@@ -1662,6 +1670,9 @@ let app = new Vue({
               color: "white",
               fontSize: '20'
             },
+            formatter: function (value) {
+              return value === 1 ? 0 : value
+            }
           },
           splitLine: {
             show: true,
@@ -1807,7 +1818,7 @@ let app = new Vue({
               color: "#fff",
               fontSize: '20',
               fontFamily: 'Microsoft YaHei'
-            },
+            }
           },
           splitLine: {
             show: true,
@@ -1888,6 +1899,7 @@ let app = new Vue({
     },
     initChartLTip3 (location, mdnb_textfield11, mdnb_textfield13, mdnb_textfield16, mdnb_textfield23, type, param, typeCTwo, paramCTwo, portType) {
       this.myChartTip3 = echarts.init(document.getElementById("echartSingleTip3"));
+      common5 = common5.map((item) => Number(item) + 1)
       let option = {
         grid: {
           top: 40,
@@ -1903,7 +1915,7 @@ let app = new Vue({
             type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
           },
           formatter: data => {
-            return `${data[0].name}</br>${data[0].seriesName}:${that.numFormat(data[0].value)}亿`
+            return `${data[0].name}</br>${data[0].seriesName}:${that.numFormat(data[0].value - 1)}亿`
           },
           textStyle: {
             color: '#FFF',     // 文字的颜色
@@ -1936,6 +1948,9 @@ let app = new Vue({
           },
         },
         yAxis: {
+          type: 'log',
+          min: 1,
+          logBase: 2,
           name: '亿',
           nameTextStyle: {//y轴上方单位的颜色
             color: '#fff',
@@ -1954,6 +1969,9 @@ let app = new Vue({
               fontSize: '20',
               fontFamily: 'Microsoft YaHei'
             },
+            formatter: function (value) {
+              return value === 1 ? 0 : value
+            }
           },
           splitLine: {
             show: true,
@@ -2852,7 +2870,7 @@ let app = new Vue({
         grid: {
           top: 45,
           right: 0,
-          left: 60,
+          left: 80,
           bottom: 80,
         },
         tooltip: {
@@ -5028,7 +5046,7 @@ let app = new Vue({
           // 补0
           return intPartFormat + '.' + floatPart + '0'
         } else {
-          floatPart = floatPart.slice(0,2)
+          floatPart = floatPart.slice(0, 2)
           return intPartFormat + '.' + floatPart
         }
       } else {
@@ -6347,7 +6365,7 @@ let app = new Vue({
       let option = {
         tooltip: {
           formatter: data => {
-            return `${data[0].name}<br /><span style="display:inline-block;border-radius:50%; width:7px;height:7px;background-color:${data[0].color.colorStops[0].color}"></span> ${data[0].seriesName}:${that.numFormat(data[0].value)}亿<br/><span style="display:inline-block;border-radius:50%; width:7px;height:7px;background-color:${data[1].color.colorStops[0].color}"></span> ${data[1].seriesName}:${that.numFormat(data[1].value)}亿<br/><span style="display:inline-block;border-radius:50%; width:7px;height:7px;background-color:${data[2].color.colorStops[0].color}"></span> ${data[2].seriesName}:${that.numFormat(data[2].value)}亿`
+            return `${data[0].name}<br /><span style="display:inline-block;border-radius:50%; width:7px;height:7px;background-color:${data[0].color.colorStops[0].color}"></span> ${data[0].seriesName}:${that.numFormat(data[0].value)}<br/><span style="display:inline-block;border-radius:50%; width:7px;height:7px;background-color:${data[1].color.colorStops[0].color}"></span> ${data[1].seriesName}:${that.numFormat(data[1].value)}<br/><span style="display:inline-block;border-radius:50%; width:7px;height:7px;background-color:${data[2].color.colorStops[0].color}"></span> ${data[2].seriesName}:${that.numFormat(data[2].value)}`
           },
           trigger: 'axis',
           axisPointer: {
@@ -6437,7 +6455,7 @@ let app = new Vue({
         yAxis: [
           {
             type: 'value',
-            name: '亿',
+            name: '',
             nameTextStyle: {
               color: 'rgba(255,255,255,0.6)',
             },