Browse Source

修改为code传参

zhbyyy 2 năm trước cách đây
mục cha
commit
1b5cb6eaa1
2 tập tin đã thay đổi với 32 bổ sung19 xóa
  1. 30 17
      investmentPort/js/investHomeGroup.js
  2. 2 2
      investmentPort/js/request.js

+ 30 - 17
investmentPort/js/investHomeGroup.js

@@ -5,6 +5,7 @@ let app = new Vue({
       boardUrl: '', // 跳转路径
       boardTipShow: false, // 项目看板弹窗专用
       lineCommonCompany: [], //双柱状图弹窗上面的折线图x轴
+      commonCompanyAll:[], // 公司包括编码
       changeLine: true,
       versions: false,
       app_token: '',
@@ -200,22 +201,24 @@ let app = new Vue({
           access_token: this.access_token,
         }
         get('/ierp/kapi/v2/mdnb/mdnb_xmkb/mdnb_manager_middle/getOrgName', value).then(res => {
+          this.commonCompanyAll = res.data
           commonCompany = res.data.map(item => item.simplename)
+          console.log(res.data, '????????')
           // 左边
-          this.getDate1()
-          this.getDate2()
-          this.getDate3()
-          this.getDate4()
-          this.getDate5()
-          this.getDate6()
+          // this.getDate1()
+          // this.getDate2()
+          // this.getDate3()
+          // this.getDate4()
+          // this.getDate5()
+          // this.getDate6()
 
           // 右边
-          // this.getDate7()
-          // this.getDate8()
-          // this.getDate9()
-          // this.getDate10()
-          // // this.getDate11() // 右下A
-          // this.getDate12()  // 右下B
+          this.getDate7()
+          this.getDate8()
+          this.getDate9()
+          this.getDate10()
+          // this.getDate11() // 右下A
+          this.getDate12()  // 右下B
 
           // 中间
           // this.getDate14()
@@ -437,7 +440,6 @@ let app = new Vue({
           this.storageRecordConfig.data = dataList
           this.storageRecordConfig = { ...this.storageRecordConfig }
           center8 = dataList
-          console.log(center8,'????????')
           resolve(1);
         })
       });
@@ -859,9 +861,16 @@ let app = new Vue({
         this.initChinaChart()
       });
     },
+    // 找编码
+    findCode (code) {
+      let a = this.commonCompanyAll.find((item,index)=>{
+        return  item.simplename ==code   
+      })
+      // return a.item.number.slice(0,4) == code
+      return a.number.slice(0,4)
+    },
     // 去项目看板
     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`
       // 新页面打开
@@ -1226,7 +1235,7 @@ let app = new Vue({
       that.myChartTip2.on('click', function (param) {
         if (that.versions) {
           if (location == 'right') {
-            that.rightPenetrateTwo('', '', param.name)
+            that.rightPenetrateTwo('', '', that.findCode(param.name))
           } else if (location == 'left') {
             that.leftPenetrateTwo()
           }
@@ -1364,7 +1373,7 @@ let app = new Vue({
       that.myChartTip3.on('click', function (param) {
         if (that.versions) {
           if (location == 'right') {
-            that.rightPenetrateTwo('', '', param.name)
+            that.rightPenetrateTwo('', '', that.findCode(param.name))
           } else if (location == 'left') {
             that.leftPenetrateTwo()
           }
@@ -4831,7 +4840,11 @@ let app = new Vue({
     initProjectList () {
       let dataList = []
       center8.map(item => {
-        dataList.push([item[0], item[1], item[2] + '亿'])
+        if (this.version) {
+          dataList.push([item[0], item[1], item[2] + '亿'])
+        } else {
+          dataList.push([item.office, item.name, item.value + '亿'])
+        }
       })
       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