zhbyyy 2 anos atrás
pai
commit
342cbad847
1 arquivos alterados com 94 adições e 63 exclusões
  1. 94 63
      investmentPort/js/investHomeGroup.js

+ 94 - 63
investmentPort/js/investHomeGroup.js

@@ -6,7 +6,7 @@ let app = new Vue({
       boardTipShow: false, // 项目看板弹窗专用
       lineCommonCompany: [], //双柱状图弹窗上面的折线图x轴
       changeLine: true,
-      versions: true,
+      versions: false,
       app_token: '',
       centerShow: false, // 中间内容显示
       echartR4Chart: '',// 倒数第二个专用
@@ -654,9 +654,9 @@ let app = new Vue({
       });
     },
     // 右边穿透二级
-    rightPenetrateTwo (modelName, substraction, orgName,location) {
+    rightPenetrateTwo (modelName, substraction, orgName, location) {
       let that = this
-      if(location == 'right'){
+      if (location == 'right') {
         return new Promise((resolve, err) => {
           let value = {
             access_token: this.access_token,
@@ -685,7 +685,7 @@ let app = new Vue({
       }
     },
     // 左边穿透一级
-    leftPenetrateOne (mdnb_textfield11, mdnb_textfield13, mdnb_textfield16, mdnb_textfield23,typeNum) {
+    leftPenetrateOne (mdnb_textfield11, mdnb_textfield13, mdnb_textfield16, mdnb_textfield23, typeNum) {
       return new Promise((resolve, err) => {
         let value = {
           access_token: this.access_token,
@@ -700,7 +700,7 @@ let app = new Vue({
           pageSize: 1000
         }
         post('/ierp/kapi/v2/mdnb/mdnb_xmkb/mdnb_manager_preinvest/yjct', value).then(res => {
-          if(typeNum == 2){
+          if (typeNum == 2) {
             common4 = []
             common5 = []
             res.data.rows[0].mdnb_entryentity12.forEach((item, index) => {
@@ -711,7 +711,7 @@ let app = new Vue({
               this.initChartLTip2()
               this.initChartLTip3()
             })
-          }else if(typeNum == 1){
+          } else if (typeNum == 1) {
 
           }
           resolve(1);
@@ -722,34 +722,38 @@ let app = new Vue({
     leftPenetrateTwo (mdnb_textfield12, mdnb_textfield19, mdnb_textfield15, mdnb_textfield17, mdnb_textfield20) {
       let that = this
       console.log(mdnb_textfield12, mdnb_textfield19, mdnb_textfield15, mdnb_textfield17, mdnb_textfield20)
-      return new Promise((resolve, err) => {
-        let value = {
-          access_token: this.access_token,
-          "data": {
-            mdnb_combofield: 'A',
-            mdnb_datefield: '2022-03-03',
-            mdnb_textfield12,
-            mdnb_textfield19,
-            mdnb_textfield15,
-            mdnb_textfield17,
-            mdnb_textfield20
-          },
-          pageSize: 1000
-        }
-        post('/ierp/kapi/v2/mdnb/mdnb_xmkb/mdnb_manager_preinvest/ejct', value).then(res => {
-          console.log(res, '看看啥情况')
-          // 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);
-        })
-      });
+      if (that.versions) {
+        return new Promise((resolve, err) => {
+          let value = {
+            access_token: this.access_token,
+            "data": {
+              mdnb_combofield: 'A',
+              mdnb_datefield: '2022-03-03',
+              mdnb_textfield12,
+              mdnb_textfield19,
+              mdnb_textfield15,
+              mdnb_textfield17,
+              mdnb_textfield20
+            },
+            pageSize: 1000
+          }
+          post('/ierp/kapi/v2/mdnb/mdnb_xmkb/mdnb_manager_preinvest/ejct', value).then(res => {
+            console.log(res, '看看啥情况')
+            // 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);
+          })
+        });
+      }else{
+        that.projectListTipShow = true
+      }
     },
     // 中间穿透一级                 一个柱状图还是两个
     centerPenetrateOne (type, param, typeNum) {
@@ -891,34 +895,41 @@ let app = new Vue({
       this.titleName = e
       this.closeTap()
       this.echartDoubleTipShow = true
-      if (location == 'right') {
-        this.rightPenetrateOne()
-      }
-      if (location == 'left') {
-        this.leftPenetrateOne(mdnb_textfield11, mdnb_textfield13, mdnb_textfield16, mdnb_textfield23,2)
-      }
-      if (location == 'center') {
-        this.centerPenetrateOne(type, param, 2)
+      if (this.versions) {
+        if (location == 'right') {
+          this.rightPenetrateOne()
+        }
+        if (location == 'left') {
+          this.leftPenetrateOne(mdnb_textfield11, mdnb_textfield13, mdnb_textfield16, mdnb_textfield23, 2)
+        }
+        if (location == 'center') {
+          this.centerPenetrateOne(type, param, 2)
+        }
+      } else {
+        console.log('没走了??')
+        setTimeout(() => {
+          this.initChartLTip2()
+          this.initChartLTip3()
+        })
       }
-      setTimeout(() => {
-        this.initChartLTip2()
-        this.initChartLTip3()
-      })
     },
     // 单个柱状图的弹窗
-    showChartLTipSingle (e, location, type, param,mdnb_textfield11, mdnb_textfield13, mdnb_textfield16, mdnb_textfield23) {
+    showChartLTipSingle (e, location, type, param, mdnb_textfield11, mdnb_textfield13, mdnb_textfield16, mdnb_textfield23) {
       this.closeTap()
       this.titleName = e
       this.echartSingleTipShow = true
-      if (location == 'center') {
-        this.centerPenetrateOne(type, param, 1)
-      }
-      if (location == 'left') {
-        this.leftPenetrateOne(mdnb_textfield11, mdnb_textfield13, mdnb_textfield16, mdnb_textfield23,1)
+      if (this.versions) {
+        if (location == 'center') {
+          this.centerPenetrateOne(type, param, 1)
+        }
+        if (location == 'left') {
+          this.leftPenetrateOne(mdnb_textfield11, mdnb_textfield13, mdnb_textfield16, mdnb_textfield23, 1)
+        }
+      } else {
+        setTimeout(() => {
+          this.initChartLTip()
+        })
       }
-      setTimeout(() => {
-        this.initChartLTip()
-      })
     },
     initChartLTip () {
       this.myChartTip1 = echarts.init(document.getElementById("echartSingleTip"));
@@ -1205,7 +1216,11 @@ let app = new Vue({
       })
       let that = this
       that.myChartTip2.on('click', function (param) {
-        that.rightPenetrateTwo('', '', param.name,'right')
+        if (that.versions) {
+          that.rightPenetrateTwo('', '', param.name, 'right')
+        } else {
+          that.projectListTipShow = true
+        }
       })
       that.myChartTip2.setOption(option);
     },
@@ -1359,7 +1374,11 @@ let app = new Vue({
       })
       let that = this
       that.myChartTip3.on('click', function (param) {
-        that.rightPenetrateTwo('', '', param.name,'right')
+        if (that.versions) {
+          that.rightPenetrateTwo('', '', param.name, 'right')
+        } else {
+          that.projectListTipShow = true
+        }
       })
       that.myChartTip3.setOption(option);
     },
@@ -3513,7 +3532,7 @@ let app = new Vue({
       }
       let that = this
       myChart.on('click', function (param) {
-        that.showChartLTipDouble(param.name, 'left', '项目阶段分析', '固定资产进度分布', param.name,param.seriesName )
+        that.showChartLTipDouble(param.name, 'left', '项目阶段分析', '固定资产进度分布', param.name, param.seriesName)
       })
       myChart.setOption(option)
       tools.loopShowTooltip(myChart, option, {
@@ -3664,7 +3683,7 @@ let app = new Vue({
       }
       let that = this
       myChart.on('click', function (param) {
-        that.showChartLTipDouble(param.name, 'left', '项目阶段分析', '股权类进度分布', param.name,param.seriesName )
+        that.showChartLTipDouble(param.name, 'left', '项目阶段分析', '股权类进度分布', param.name, param.seriesName)
       })
       myChart.setOption(option)
       tools.loopShowTooltip(myChart, option, {
@@ -4235,7 +4254,7 @@ let app = new Vue({
       let that = this
       this.mapChart.on('click', function (params) {
         if (params.name == '太原市') {
-          // that.showChartLTipDouble(params.name, 'center', '', '', '', '', '', 'investmentMap', '山西省')
+          that.showChartLTipDouble(params.name, 'center', '', '', '', '', '', 'investmentMap', '山西省')
         }
       })
       tools.loopShowTooltip(this.mapChart, option, {
@@ -5079,7 +5098,11 @@ let app = new Vue({
         ],
       }
       myChart.on('click', function (param) {
-        that.rightPenetrateTwo(2, '', param.name,'right')
+        if (that.versions) {
+          that.rightPenetrateTwo(2, '', param.name, 'right')
+        } else {
+          that.projectListTipShow = true
+        }
       })
       myChart.setOption(option)
       tools.loopShowTooltip(myChart, option, {
@@ -5278,7 +5301,11 @@ let app = new Vue({
         ]
       }
       myChart.on('click', function (param) {
-        that.rightPenetrateTwo(1, param.seriesName == '正偏差' ? 1 : param.seriesName == '容差' ? 2 : 3, param.name,'right')
+        if (that.versions) {
+          that.rightPenetrateTwo(1, param.seriesName == '正偏差' ? 1 : param.seriesName == '容差' ? 2 : 3, param.name, 'right')
+        } else {
+          that.projectListTipShow = true
+        }
       })
       myChart.setOption(option)
       tools.loopShowTooltip(myChart, option, {
@@ -5511,7 +5538,11 @@ let app = new Vue({
         ],
       }
       myChart.on('click', function (param) {
-        that.rightPenetrateTwo('', '', param.name,'right')
+        if (that.versions) {
+          that.rightPenetrateTwo('', '', param.name, 'right')
+        } else {
+          that.projectListTipShow = true
+        }
       })
       myChart.setOption(option)
       tools.loopShowTooltip(myChart, option, {