소스 검색

修复uat环境而三级穿透路径问题

zhbyyy 2 년 전
부모
커밋
71f4cc1145
2개의 변경된 파일31개의 추가작업 그리고 43개의 파일을 삭제
  1. 1 1
      investmentPort/investHome.html
  2. 30 42
      investmentPort/js/investHomeGroup.js

+ 1 - 1
investmentPort/investHome.html

@@ -525,7 +525,7 @@
           <div>
             <div class="tip2-list">
               <div>
-                <span>2022年度合并报表净利润</span>
+                <span>{{year}}年度合并报表净利润</span>
                 <span style="color:#69c0ff"><span
                     style="font-size: 20px;font-weight: bold;font-size: 40px;">{{numFormat(yuanChange(common1[0]))}}</span>亿</span>
               </div>

+ 30 - 42
investmentPort/js/investHomeGroup.js

@@ -2,6 +2,7 @@ let app = new Vue({
   el: '#app',
   data () {
     return {
+      goUrl: '',
       env: 'prd',
       fling: false, //水球光泽
       centerOriginalConfig6: '',
@@ -134,6 +135,7 @@ let app = new Vue({
         obj.model == 'A' || obj.model == 'a' ? this.mockData = false : this.mockData = true
       }
       obj.env && (this.env = obj.env)
+      this.goUrl = (obj.env == 'SIT' || obj.env == 'sit') ? '172.21.3.68:8081' : (obj.env == 'UAT' || obj.env == 'uat') ? '172.21.3.149:8081' : '172.21.3.149:8081'
       this.comeIn()
     },
     // 计算展示的年份
@@ -233,10 +235,11 @@ let app = new Vue({
     },
     // 获取token
     getAppToken () {
+      let value = {}
       // dev环境
       if (this.env == 'sit' || this.env == 'SIT') {
         // SIT环境
-        let value = {
+        value = {
           "appId": "68dp",
           "appSecret": "9ErhY^O{n?@Pc#eb7HYX",
           "tenantid": "",
@@ -244,13 +247,9 @@ let app = new Vue({
           "accountId": "1686324824621711360", // 新
           "language": "zh_CN"
         }
-        post('/ierp/api/getAppToken.do', value).then(res => {
-          this.app_token = res.data.app_token
-          this.getAccessToken()
-        })
       } else if (this.env == 'uat' || this.env == 'UAT') {
         // UAT环境
-        let value = {
+        value = {
           "appId": "68dp",
           "appSecret": "9ErhY^O{n?@Pc#eb7HYX",
           "tenantid": "",
@@ -258,13 +257,9 @@ let app = new Vue({
           "accountId": "1591303792463183872", // 新
           "language": "zh_CN"
         }
-        post('/ierp/api/getAppToken.do', value).then(res => {
-          this.app_token = res.data.app_token
-          this.getAccessToken()
-        })
       } else {
         // prd环境
-        let value = {
+        value = {
           "appId": "68dp",
           "appSecret": "9ErhY^O{n?@Pc#eb7HYX",
           "tenantid": "",
@@ -272,17 +267,18 @@ let app = new Vue({
           "accountId": "1591303792463183872", // 新
           "language": "zh_CN"
         }
-        post('/ierp/api/getAppToken.do', value).then(res => {
-          this.app_token = res.data.app_token
-          this.getAccessToken()
-        })
       }
+      post('/ierp/api/getAppToken.do', value).then(res => {
+        this.app_token = res.data.app_token
+        this.getAccessToken()
+      })
     },
     // 获取AccessToken
     getAccessToken () {
+      let value = {}
       if (this.env == 'sit' || this.env == 'SIT') {
         // SIT环境
-        let value = {
+        value = {
           // "user": "19900000001",                //登录用户手机号
           "user": "15835113238",                // 新
           "apptoken": this.app_token,  //应用令牌
@@ -291,13 +287,9 @@ let app = new Vue({
           "accountId": "1686324824621711360",// 新
           "usertype": "Mobile"
         }
-        post('/ierp/api/login.do', value).then(res => {
-          this.access_token = res.data.access_token
-          this.getOrg()
-        })
       } else if (this.env == 'uat' || this.env == 'UAT') {
         // UAT环境
-        let value = {
+        value = {
           // "user": "19900000001",                //登录用户手机号
           "user": "15835113238",                // 新
           "apptoken": this.app_token,  //应用令牌
@@ -306,13 +298,9 @@ let app = new Vue({
           "accountId": "1591303792463183872",// 新
           "usertype": "Mobile"
         }
-        post('/ierp/api/login.do', value).then(res => {
-          this.access_token = res.data.access_token
-          this.getOrg()
-        })
       } else {
         // PRD环境
-        let value = {
+        value = {
           // "user": "19900000001",                //登录用户手机号
           "user": "15835113238",                // 新
           "apptoken": this.app_token,  //应用令牌
@@ -321,11 +309,11 @@ let app = new Vue({
           "accountId": "1591303792463183872",// 新
           "usertype": "Mobile"
         }
-        post('/ierp/api/login.do', value).then(res => {
-          this.access_token = res.data.access_token
-          this.getOrg()
-        })
       }
+      post('/ierp/api/login.do', value).then(res => {
+        this.access_token = res.data.access_token
+        this.getOrg()
+      })
     },
     // 获取组织架构列表
     getOrg () {
@@ -849,6 +837,7 @@ let app = new Vue({
     },
     // 右边穿透一级
     rightPenetrateOne () {
+      let that = this
       this.boardType = 'right'
       return new Promise((resolve, err) => {
         let value = {
@@ -862,7 +851,7 @@ let app = new Vue({
         post('/ierp/kapi/v2/mdnb/mdnb_xmkb/mdnb_manager_middle/getOneLevelData', value).then(res => {
           res.data.forEach((item, index) => {
             common4[index] = item.mdnb_projects
-            common5[index] = item.mdnb_amount_sl
+            common5[index] = that.yuanChange(item.mdnb_amount_sl)
           })
           setTimeout(() => {
             this.initChartLTip2('right')
@@ -1579,7 +1568,7 @@ let app = new Vue({
       if (f) {
         this.boardType = f
       }
-      this.boardUrl = `http://172.21.3.68:8081/ierp/accessTokenLogin.do?access_token=${this.access_token}&redirect=http://172.21.3.68:8081/ierp/index.html?formId=mdnb_threetoproject&prj=${this.findProjectCode(e.row[0], e.row[1], this.boardType)}`
+      this.boardUrl = `http://${this.goUrl}/ierp/accessTokenLogin.do?access_token=${this.access_token}&redirect=http://${this.goUrl}/ierp/index.html?formId=mdnb_threetoproject&prj=${this.findProjectCode(e.row[0], e.row[1], this.boardType)}`
       // this.findProjectCode(e.row[0],e.row[2])
       // 当前页面打开
       // 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`
@@ -1824,7 +1813,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 this.changeLine ? `${data[0].name}</br>${data[0].seriesName}:${that.numFormat(data[0].value)}个` : `${data[0].name}</br>${data[0].seriesName}:${that.numFormat(data[0].value)}亿`
           },
           textStyle: {
             color: '#FFF',     // 文字的颜色
@@ -1839,7 +1828,7 @@ let app = new Vue({
           },
           // x轴的字体颜色
           axisLabel: {
-            rotate: 40,
+            rotate: this.changeLine ? 40 : 20,
             textStyle: {
               color: "white",
               fontSize: '20',
@@ -1857,7 +1846,7 @@ let app = new Vue({
           },
         },
         yAxis: {
-          name: '个',
+          name: this.changeLine ? '个' : '亿',
           nameTextStyle: {//y轴上方单位的颜色
             color: '#fff',
             fontSize: '20',
@@ -1895,7 +1884,7 @@ let app = new Vue({
         },
         series: [
           {
-            name: "总数量",
+            name: this.changeLine ? "总数量" : '总额度',
             type: this.changeLine ? "bar" : 'line',
             data: common4,
             showBackground: false,
@@ -1921,7 +1910,7 @@ let app = new Vue({
         ],
         legend: {
           // data: ["2022年额度", "2023年额度"],
-          data: ["总数量"],
+          data: this.changeLine ? ["总数量"] : ["总额度"],
           textStyle: {
             // 图列内容样式
             color: "#fff", // 字体颜色
@@ -3097,7 +3086,6 @@ let app = new Vue({
           common1[5] = findData.mdnb_amountfield25
           common2[0] = findData.mdnb_decimalfield6
         }
-        console.log(common2[0], '看看百分比')
         setTimeout(() => {
           that.initChartBall()
         });
@@ -3174,7 +3162,7 @@ let app = new Vue({
           align: 'right',//横向位置
           verticalAlign: 'middle', // 纵向位置
           layout: "vertical",//横排还是竖排
-          // x: -110,
+          x: -30,
           // y: 50,
           symbolWidth: 50,
           itemDistance: 50,
@@ -3386,7 +3374,7 @@ let app = new Vue({
           align: 'right',//横向位置
           verticalAlign: 'middle', // 纵向位置
           layout: "vertical",//横排还是竖排
-          // x: -30,
+          x: 12,
           // y: 30,
           symbolWidth: 50,
           itemDistance: 50,
@@ -3606,7 +3594,7 @@ let app = new Vue({
           align: 'right',//横向位置
           verticalAlign: 'middle', // 纵向位置
           layout: "vertical",//横排还是竖排
-          // x: -50,
+          x: -50,
           // y: 30,
           symbolWidth: 50,
           itemDistance: 50,
@@ -3816,7 +3804,7 @@ let app = new Vue({
           align: 'right',//横向位置
           verticalAlign: 'middle', // 纵向位置
           layout: "vertical",//横排还是竖排
-          // x: -70,
+          x: -70,
           // y: 50,
           symbolWidth: 50,
           itemDistance: 50,