Forráskód Böngészése

重点项目监控接口对接

zhbyyy 2 éve
szülő
commit
1ed06c7deb
2 módosított fájl, 71 hozzáadás és 79 törlés
  1. 69 77
      investmentPort/js/investHomeGroup.js
  2. 2 2
      investmentPort/js/request.js

+ 69 - 77
investmentPort/js/investHomeGroup.js

@@ -436,6 +436,8 @@ let app = new Vue({
           })
           this.storageRecordConfig.data = dataList
           this.storageRecordConfig = { ...this.storageRecordConfig }
+          center8 = dataList
+          console.log(center8,'????????')
           resolve(1);
         })
       });
@@ -646,43 +648,41 @@ let app = new Vue({
             common5[index] = item.mdnb_amount_sl
           })
           setTimeout(() => {
-            this.initChartLTip2()
-            this.initChartLTip3()
+            this.initChartLTip2('right')
+            this.initChartLTip3('right')
           })
           resolve(1);
         })
       });
     },
     // 右边穿透二级
-    rightPenetrateTwo (modelName, substraction, orgName, location) {
+    rightPenetrateTwo (modelName, substraction, orgName) {
       let that = this
-      if (location == 'right') {
-        return new Promise((resolve, err) => {
-          let value = {
-            access_token: this.access_token,
-            "request": {
-              isInsert: '0',
-              modelName,
-              substraction,
-              orgName
-            },
-            pageSize: 1000
-          }
-          post('/ierp/kapi/v2/mdnb/mdnb_xmkb/mdnb_manager_middle/getTwoLevelData', value).then(res => {
-            that.config6.data = []
-            res.data.forEach((item, index) => {
-              that.config6.data[index] = []
-              that.config6.data[index][0] = item.mdnb_project_name
-              that.config6.data[index][2] = item.mdnb_implement_org
-              that.config6.data[index][3] = item.mdnb_insdrutytype1
-              that.config6.data[index][4] = item.mdnb_insdrutytype2
-            })
-            that.config6 = { ...that.config6 }
-            that.projectListTipShow = true
-            resolve(1);
+      return new Promise((resolve, err) => {
+        let value = {
+          access_token: this.access_token,
+          "request": {
+            isInsert: '0',
+            modelName,
+            substraction,
+            orgName
+          },
+          pageSize: 1000
+        }
+        post('/ierp/kapi/v2/mdnb/mdnb_xmkb/mdnb_manager_middle/getTwoLevelData', value).then(res => {
+          that.config6.data = []
+          res.data.forEach((item, index) => {
+            that.config6.data[index] = []
+            that.config6.data[index][0] = item.mdnb_project_name
+            that.config6.data[index][2] = item.mdnb_implement_org
+            that.config6.data[index][3] = item.mdnb_insdrutytype1
+            that.config6.data[index][4] = item.mdnb_insdrutytype2
           })
-        });
-      }
+          that.config6 = { ...that.config6 }
+          that.projectListTipShow = true
+          resolve(1);
+        })
+      });
     },
     // 左边穿透一级
     leftPenetrateOne (mdnb_textfield11, mdnb_textfield13, mdnb_textfield16, mdnb_textfield23, typeNum) {
@@ -708,8 +708,8 @@ let app = new Vue({
               common5.push(item.mdnb_amountfield12)
             })
             setTimeout(() => {
-              this.initChartLTip2()
-              this.initChartLTip3()
+              this.initChartLTip2('left')
+              this.initChartLTip3('left')
             })
           } else if (typeNum == 1) {
 
@@ -751,7 +751,7 @@ let app = new Vue({
             resolve(1);
           })
         });
-      }else{
+      } else {
         that.projectListTipShow = true
       }
     },
@@ -835,8 +835,8 @@ let app = new Vue({
               }
             }
             setTimeout(() => {
-              this.initChartLTip2()
-              this.initChartLTip3()
+              this.initChartLTip2('center')
+              this.initChartLTip3('center')
             })
           }
           resolve(1);
@@ -862,7 +862,9 @@ let app = new Vue({
     // 去项目看板
     goLookBoard (e) {
       console.log(e, '?????')
+      // 当前页面打开
       // window.location.href = `http://192.168.2.111:8080/ierp/accessTokenLogin.do?access_token=${this.access_token}&redirect=http://192.168.2.111:8080/ierp/index.html?formId=mdnb_threetoproject&prj=PL_ZZGY_0_2023_000036`
+      // 新页面打开
       // window.open('http://192.168.2.111:8080/ierp/accessTokenLogin.do?access_token=${this.access_token}&redirect=http://192.168.2.111:8080/ierp/index.html?formId=mdnb_threetoproject&prj=PL_ZZGY_0_2023_000036')
       this.boardUrl = `http://192.168.2.111:8080/ierp/accessTokenLogin.do?access_token=${this.access_token}&redirect=http://192.168.2.111:8080/ierp/index.html?formId=mdnb_threetoproject&prj=PL_ZZGY_0_2023_000036`
       this.boardTipShow = true
@@ -906,7 +908,6 @@ let app = new Vue({
           this.centerPenetrateOne(type, param, 2)
         }
       } else {
-        console.log('没走了??')
         setTimeout(() => {
           this.initChartLTip2()
           this.initChartLTip3()
@@ -927,11 +928,11 @@ let app = new Vue({
         }
       } else {
         setTimeout(() => {
-          this.initChartLTip()
+          this.initChartLTip(location)
         })
       }
     },
-    initChartLTip () {
+    initChartLTip (location) {
       this.myChartTip1 = echarts.init(document.getElementById("echartSingleTip"));
       let option = {
         grid: {
@@ -1082,12 +1083,19 @@ let app = new Vue({
       })
       let that = this
       that.myChartTip1.on('click', function (param) {
-        that.projectListTipShow = true
-
+        if (that.versions) {
+          if (location == 'right') {
+            that.rightPenetrateTwo('', '', param.name)
+          } else if (location == 'left') {
+            that.leftPenetrateTwo()
+          }
+        } else {
+          that.projectListTipShow = true
+        }
       })
       that.myChartTip1.setOption(option);
     },
-    initChartLTip2 () {
+    initChartLTip2 (location) {
       this.myChartTip2 = echarts.init(document.getElementById("echartSingleTip2"));
       let option = {
         grid: {
@@ -1217,14 +1225,18 @@ let app = new Vue({
       let that = this
       that.myChartTip2.on('click', function (param) {
         if (that.versions) {
-          that.rightPenetrateTwo('', '', param.name, 'right')
+          if (location == 'right') {
+            that.rightPenetrateTwo('', '', param.name)
+          } else if (location == 'left') {
+            that.leftPenetrateTwo()
+          }
         } else {
           that.projectListTipShow = true
         }
       })
       that.myChartTip2.setOption(option);
     },
-    initChartLTip3 () {
+    initChartLTip3 (location) {
       this.myChartTip3 = echarts.init(document.getElementById("echartSingleTip3"));
       let option = {
         grid: {
@@ -1307,30 +1319,7 @@ let app = new Vue({
             },
           },
         },
-        series: [
-          // {
-          //   name: "2022年额度",
-          //   type: "bar",
-          //   data: [263.23, 402.18, 73.28, 144.80, 25.56, 8.23, 0, 12.97, 8.56, -1.72, 0, 0, 0, 76.90, 5.03, 9.14, 0, 0],
-          //   showBackground: false,
-          //   backgroundStyle: {
-          //     color: "#18416F",
-          //   },
-          //   barWidth: "10%",
-          //   itemStyle: {
-          //     barBorderRadius: [10, 10, 0, 0],
-          //     color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
-          //       {
-          //         offset: 0,
-          //         color: '#082550',
-          //       },
-          //       {
-          //         offset: 1,
-          //         color: '#69c0ff',
-          //       },
-          //     ]),
-          //   },
-          // },
+        series: [,
           {
             name: "2023年额度",
             type: "bar",
@@ -1356,7 +1345,6 @@ let app = new Vue({
           },
         ],
         legend: {
-          // data: ["2022年额度", "2023年额度"],
           data: ["2023年额度"],
           textStyle: {
             // 图列内容样式
@@ -1375,7 +1363,11 @@ let app = new Vue({
       let that = this
       that.myChartTip3.on('click', function (param) {
         if (that.versions) {
-          that.rightPenetrateTwo('', '', param.name, 'right')
+          if (location == 'right') {
+            that.rightPenetrateTwo('', '', param.name)
+          } else if (location == 'left') {
+            that.leftPenetrateTwo()
+          }
         } else {
           that.projectListTipShow = true
         }
@@ -1735,7 +1727,7 @@ let app = new Vue({
       let that = this
 
       var option = {
-        colors: ['#a79c57', '#cc8c29', '#034a39', '#383062', '#91a65f', '#e1d7da', '#b48494', '#85868b'],
+        colors: ['#497dad', '#a79c57', '#cc8c29', '#91a65f', '#383062', '#034a39', '#5783ab', '#5783ab'],
         chart: {
           type: 'pie',
           backgroundColor: 'rgba(0,0,0,0)',
@@ -1978,7 +1970,7 @@ let app = new Vue({
 
       let that = this
       var chart = Highcharts.chart('echartL3', {
-        colors: ['#a79c57', '#cc8c29', '#034a39', '#383062', '#91a65f', '#e1d7da', '#b48494', '#85868b'],
+        colors: ['#497dad', '#a79c57', '#cc8c29', '#91a65f', '#383062', '#034a39', '#5783ab', '#5783ab'],
         chart: {
           type: 'pie',
           backgroundColor: 'rgba(0,0,0,0)',
@@ -2401,7 +2393,7 @@ let app = new Vue({
       let that = this
 
       var option = {
-        colors: ['#a79c57', '#cc8c29', '#034a39', '#383062', '#91a65f', '#e1d7da', '#b48494', '#85868b'],
+        colors: ['#497dad', '#a79c57', '#cc8c29', '#91a65f', '#383062', '#034a39', '#5783ab', '#5783ab'],
         chart: {
           type: 'pie',
           backgroundColor: 'rgba(0,0,0,0)',
@@ -2611,7 +2603,7 @@ let app = new Vue({
       let that = this
 
       var option = {
-        colors: ['#a79c57', '#cc8c29', '#034a39', '#383062', '#91a65f', '#e1d7da', '#b48494', '#85868b'],
+        colors: ['#497dad', '#a79c57', '#cc8c29', '#91a65f', '#383062', '#034a39', '#5783ab', '#5783ab'],
         chart: {
           type: 'pie',
           backgroundColor: 'rgba(0,0,0,0)',
@@ -2821,7 +2813,7 @@ let app = new Vue({
       let that = this
 
       var option = {
-        colors: ['#a79c57', '#cc8c29', '#034a39', '#383062', '#91a65f', '#e1d7da', '#b48494', '#85868b'],
+        colors: ['#497dad', '#a79c57', '#cc8c29', '#91a65f', '#383062', '#034a39', '#5783ab', '#5783ab'],
         chart: {
           type: 'pie',
           backgroundColor: 'rgba(0,0,0,0)',
@@ -3032,7 +3024,7 @@ let app = new Vue({
       let that = this
 
       var option = {
-        colors: ['#a79c57', '#cc8c29', '#034a39', '#383062', '#91a65f', '#e1d7da', '#b48494', '#85868b'],
+        colors: ['#497dad', '#a79c57', '#cc8c29', '#91a65f', '#383062', '#034a39', '#5783ab', '#5783ab'],
         chart: {
           type: 'pie',
           backgroundColor: 'rgba(0,0,0,0)',
@@ -3700,7 +3692,7 @@ let app = new Vue({
       let that = this
 
       var option = {
-        colors: ['#a79c57', '#cc8c29', '#034a39', '#383062', '#91a65f', '#e1d7da', '#b48494', '#85868b'],
+        colors: ['#497dad', '#a79c57', '#cc8c29', '#91a65f', '#383062', '#034a39', '#5783ab', '#5783ab'],
         chart: {
           type: 'pie',
           backgroundColor: 'rgba(0,0,0,0)',
@@ -4607,7 +4599,7 @@ let app = new Vue({
           num: item.value,
           sliced: false,
           selected: false,
-          color: index == 0 ? '#a79c57' : '#cc8c29'
+          color: index == 0 ? '#497dad' : '#a79c57'
         }
         chartData.push(obj)
 
@@ -4839,7 +4831,7 @@ let app = new Vue({
     initProjectList () {
       let dataList = []
       center8.map(item => {
-        dataList.push([item.office, item.name, item.value + '亿'])
+        dataList.push([item[0], item[1], item[2] + '亿'])
       })
       this.storageRecordConfig2.data = dataList
       this.storageRecordConfig2 = { ...this.storageRecordConfig2 }

+ 2 - 2
investmentPort/js/request.js

@@ -3,8 +3,8 @@
  * 请求拦截、相应拦截、错误统一处理
  */
 const httpRequest = axios.create({
-  // baseURL: 'http://192.168.2.155:8080', // 李瑞投前
-  baseURL: 'http://192.168.2.111:8080', // 苏文投后
+  baseURL: 'http://192.168.2.155:8080', // 李瑞投前
+  // baseURL: 'http://192.168.2.111:8080', // 苏文投后
   // baseURL: 'http://192.168.2.147:8080', // 旭东中间大屏
   timeout: 3 * 60 * 1000, // 3分钟等待
   withCredentials: true, // 携带cookie