فهرست منبع

投资大屏bug修改

zhbyyy 2 سال پیش
والد
کامیت
c0987983c0
2فایلهای تغییر یافته به همراه88 افزوده شده و 53 حذف شده
  1. 3 3
      investmentPort/investHome.html
  2. 85 50
      investmentPort/js/investHomeGroup.js

+ 3 - 3
investmentPort/investHome.html

@@ -363,7 +363,7 @@
                 <div class="pointer"
                   @click.stop="showChartLTipSingle('股权投资','center','keyIndicators','gqtzamount','','','','','tab','1',1,111)">
                   <p>股权投资</p>
-                  <p style="color:#40A9FF"><span>{{numFormat(center1[3])}}</span><span style="font-size: 25px;">个</span>
+                  <p style="color:#40A9FF"><span>{{numFormat(yuanChange(center1[3]))}}</span><span style="font-size: 25px;">亿</span>
                   </p>
                 </div>
               </div>
@@ -431,7 +431,7 @@
               <span class="text">重点项目监控</span>
             </div>
             <div class="content" style="border-radius: 15px;">
-              <dv-scroll-board :config="storageRecordConfig2" @click="goLookBoard($event,'center')" class="content" />
+              <dv-scroll-board :config="storageRecordConfig2" @click="goLookBoard($event,'center2')" class="content" />
             </div>
           </div>
         </div>
@@ -476,7 +476,7 @@
               <div class="pointer"
                 @click.stop="showChartLTipSingle('股权投资','center','keyIndicators','gqtzamount','','','','','tab','1',1,111)">
                 <p>股权投资</p>
-                <p style="color:#40A9FF"><span>{{numFormat(center1[3])}}</span><span style="font-size: 25px;">个</span>
+                  <p style="color:#40A9FF"><span>{{numFormat(yuanChange(center1[3]))}}</span><span style="font-size: 25px;">亿</span>
                 </p>
               </div>
             </div>

+ 85 - 50
investmentPort/js/investHomeGroup.js

@@ -2,9 +2,10 @@ let app = new Vue({
   el: '#app',
   data () {
     return {
+      centerOriginalConfig6: '',
       rightAdd: {},// 左边新增筛选参数
       projectNum: '', // 项目列表弹窗顶部类目筛选条件
-      centerType: false, // 中间3D饼图
+      centerType: true, // 中间3D饼图
       boardType: '', // 哪边的项目看板
       pullShow: false, // 选择年份弹窗
       pollList: [],
@@ -133,7 +134,7 @@ let app = new Vue({
     countYear () {
       this.year = new Date().getFullYear()
       for (i = 2022; true; i++) {
-        if (i == this.year) {
+        if (i == this.year + 3) {
           this.pollList.push(i)
           return
         } else {
@@ -192,12 +193,12 @@ let app = new Vue({
       this.pieTime5 && clearInterval(this.pieTime5);
       this.pieTime6 && clearInterval(this.pieTime6);
       this.left10Chart ? this.left10Chart.dispose() : ''
-      this.left1Chart ? (this.left1Chart.destroy(),this.left1Chart = '' ): ''
-      this.left2Chart ? (this.left2Chart.destroy(),this.left2Chart = '' ) : ''
-      this.left3Chart ? (this.left3Chart.destroy(),this.left3Chart = '' ) : ''
-      this.left4Chart ? (this.left4Chart.destroy(),this.left4Chart = '' ) : ''
-      this.left5Chart ? (this.left5Chart.destroy(),this.left5Chart = '' ) : ''
-      this.left6Chart ? (this.left6Chart.destroy(),this.left6Chart = '' ) : ''
+      this.left1Chart ? (this.left1Chart.destroy(), this.left1Chart = '') : ''
+      this.left2Chart ? (this.left2Chart.destroy(), this.left2Chart = '') : ''
+      this.left3Chart ? (this.left3Chart.destroy(), this.left3Chart = '') : ''
+      this.left4Chart ? (this.left4Chart.destroy(), this.left4Chart = '') : ''
+      this.left5Chart ? (this.left5Chart.destroy(), this.left5Chart = '') : ''
+      this.left6Chart ? (this.left6Chart.destroy(), this.left6Chart = '') : ''
       this.left7Chart ? this.left7Chart.dispose() : ''
       this.left8Chart ? this.left8Chart.dispose() : ''
       this.left9Chart ? this.left9Chart.dispose() : ''
@@ -234,7 +235,8 @@ let app = new Vue({
         "appId": "68dp",
         "appSecret": "9ErhY^O{n?@Pc#eb7HYX",
         "tenantid": "",
-        "accountId": "1635498801198269440",
+        // "accountId": "1635498801198269440",
+        "accountId": "1686324824621711360", // 新
         "language": "zh_CN"
       }
       post('/ierp/api/getAppToken.do', value).then(res => {
@@ -245,10 +247,12 @@ let app = new Vue({
     // 获取AccessToken
     getAccessToken () {
       let value = {
-        "user": "19900000001",                //登录用户手机号
+        // "user": "19900000001",                //登录用户手机号
+        "user": "15835113238",                // 新
         "apptoken": this.app_token,  //应用令牌
         "tenantid": "",                    //租户id
-        "accountId": "1635498801198269440",//数据中心id
+        // "accountId": "1635498801198269440",//数据中心id
+        "accountId": "1686324824621711360",// 新
         "usertype": "Mobile"
       }
       post('/ierp/api/login.do', value).then(res => {
@@ -330,6 +334,7 @@ let app = new Vue({
           pageSize: 1000
         }
         post('/ierp/kapi/v2/mdnb/mdnb_xmkb/mdnb_manager_preinvest/tqtzjhfx', value).then(res => {
+          console.log(res)
           if (res.data.rows.length > 0) {
             let dataList = res.data.rows[0]
             left4 = []
@@ -369,31 +374,52 @@ let app = new Vue({
           if (res.data.rows.length > 0) {
             let dataList = this.classify(res.data.rows[0].mdnb_entryentity, 'mdnb_textfield1')
             // 传统产业分析
-            if (dataList[0].data.length > left7.length || dataList[0].length == left7.length) {
-              for (let i = 0; i < left7.length; i++) {
-                left7[i].num = dataList[0].data[i].mdnb_integerfield13
-                left7[i].y = dataList[0].data[i].mdnb_amountfield8
-              }
-              this.initChartL5()
-            }
+            // if (dataList[0].data.length > left7.length || dataList[0].data.length == left7.length) {
+            //   for (let i = 0; i < left7.length; i++) {
+            //     left7[i].num = dataList[0].data[i].mdnb_integerfield13
+            //     left7[i].y = dataList[0].data[i].mdnb_amountfield8
+            //   }
+            //   this.initChartL5()
+            // }
+            dataList[0].data.forEach((item, i) => {
+              left7[i] = {}
+              left7[i].num = item.mdnb_integerfield13
+              left7[i].y = item.mdnb_amountfield8
+              left7[i].name = item.mdnb_textfield2
+            })
+            this.initChartL5()
             // 战略性新兴产业
-            if (dataList[1].data.length > left8.length || dataList[1].length == left8.length) {
-              for (let i = 0; i < left8.length; i++) {
-                left8[i].num = dataList[1].data[i].mdnb_integerfield13
-                left8[i].y = dataList[1].data[i].mdnb_amountfield8
-              }
-              this.initChartL6()
-            }
+            // if (dataList[1].data.length > left8.length || dataList[1].data.length == left8.length) {
+            //   for (let i = 0; i < left8.length; i++) {
+            //     left8[i].num = dataList[1].data[i].mdnb_integerfield13
+            //     left8[i].y = dataList[1].data[i].mdnb_amountfield8
+            //   }
+            //   this.initChartL6()
+            // }
+            dataList[1].data.forEach((item, i) => {
+              left8[i] = {}
+              left8[i].num = item.mdnb_integerfield13
+              left8[i].y = item.mdnb_amountfield8
+              left8[i].name = item.mdnb_textfield2
+            })
+            this.initChartL6()
             // 特色优势产业
-            if (dataList[2].data.length > left9.length || dataList[2].length == left9.length) {
-              for (let i = 0; i < left9.length; i++) {
-                left9[i].num = dataList[2].data[i].mdnb_integerfield13
-                left9[i].y = dataList[2].data[i].mdnb_amountfield8
-              }
-              this.initChartL7()
-            }
+            // if (dataList[2].data.length > left9.length || dataList[2].data.length == left9.length) {
+            //   for (let i = 0; i < left9.length; i++) {
+            //     left9[i].num = dataList[2].data[i].mdnb_integerfield13
+            //     left9[i].y = dataList[2].data[i].mdnb_amountfield8
+            //   }
+            //   this.initChartL7()
+            // }
+            dataList[2].data.forEach((item, i) => {
+              left9[i] = {}
+              left9[i].num = item.mdnb_integerfield13
+              left9[i].y = item.mdnb_amountfield8
+              left9[i].name = item.mdnb_textfield2
+            })
+            this.initChartL7()
             // 公共基础等产业
-            if (dataList[3].data.length > left10.length || dataList[3].length == left10.length) {
+            if (dataList[3].data.length > left10.length || dataList[3].data.length == left10.length) {
               for (let i = 0; i < left10.length; i++) {
                 left10[i].num = dataList[3].data[i].mdnb_integerfield13
                 left10[i].y = dataList[3].data[i].mdnb_amountfield8
@@ -679,6 +705,7 @@ let app = new Vue({
           presetYear: this.year
         }
         get('/ierp/kapi/v2/mdnb/mdnb_xmkb/presetdata/getKeyData', value).then(res => {
+          console.log(res.data, '???????????')
           // 头部指标
           if (!res.data) {
             return
@@ -693,6 +720,7 @@ let app = new Vue({
           center1[2] = res.data.keyIndicators.property
           center1[3] = res.data.keyIndicators.invest
           // 投资产业分布
+          console.log(res.data.distribution, '________')
           if (res.data.distribution.length != 0) {
             for (let i = 0; i < center2.length; i++) {
               center2[i].y = that.yuanChange(res.data.distribution[i].amount)
@@ -717,8 +745,9 @@ let app = new Vue({
           // 重点项目监控
           center8 = []
           this.originalConfig6 = res.data.projectMonitoring
+          this.centerOriginalConfig6 = res.data.projectMonitoring
           res.data.projectMonitoring.forEach((item, index) => {
-            center8.push({ value: item.amount, name: item.name, office: item.group })
+            center8.push({ value: item.amount, name: item.projectname, office: item.orgName })
           })
           // 中国地图
           centerChina = []
@@ -895,6 +924,7 @@ let app = new Vue({
               if (res.data.rows.length > 0) {
                 that.originalConfig6 = res.data.rows[0].mdnb_entryentity11
                 that.config6.data = []
+                console.log(this.projectNum,res.data.rows,'???????????')
                 if (this.projectNum == 211 || this.projectNum == 212) {
                   that.config6.header = ["所属集团", "项目名称", '投资主体', '项目类型', '项目性质', '已占用额度(万元)']
                   res.data.rows[0].mdnb_entryentity11.forEach((item, index) => {
@@ -1259,7 +1289,6 @@ let app = new Vue({
                 that.config6.data[index][6] = item.amount / 10000
               })
             } else if (this.projectNum == 118) {
-              console.log('走了这里了', 11181)
               that.config6.header = ["所属集团", "项目名称", "投资主体", "项目类型", "项目性质", "建设地点", "投资完成额 (万元)"]
               res.data.forEach((item, index) => {
                 that.config6.data[index] = []
@@ -1434,22 +1463,27 @@ let app = new Vue({
     },
     // 找项目编码
     findProjectCode (a, b, type) {
-      console.log(a, b, type)
+      console.log(a, b, type, this.originalConfig6)
       if (type == 'center') {
         let c = this.originalConfig6.find(item => {
-          return item.projectname == a && item.tzzt == b
+          return item.orgName == a && item.projectname == b
         })
         return c.projectno
       } else if (type == 'right') {
         let c = this.originalConfig6.find(item => {
-          return item.mdnb_project_name == a && item.mdnb_org == b
+          return item.mdnb_unitcompany == a && item.mdnb_project_name == b
         })
         return c.mdnb_projectnumber
       } else if (type == 'left') {
         let c = this.originalConfig6.find(item => {
-          return item.mdnb_textfield6 == a && item.mdnb_textfield8 == b
+          return item.mdnb_textfield7 == a && item.mdnb_textfield6 == b
         })
         return c.mdnb_textfield14
+      } else if (type == 'center2') {
+        let c = this.centerOriginalConfig6.find(item => {
+          return item.orgName == a && item.projectname == b
+        })
+        return c.projectno
       }
     },
     // 去项目看板
@@ -1459,7 +1493,7 @@ let app = new Vue({
         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)}`
       } else {
-        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[1], e.row[2], this.boardType)}`
+        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], f)}`
       }
       // this.findProjectCode(e.row[0],e.row[2])
       // 当前页面打开
@@ -3071,8 +3105,8 @@ let app = new Vue({
           align: 'right',//横向位置
           verticalAlign: 'middle', // 纵向位置
           layout: "vertical",//横排还是竖排
-          x: -110,
-          y: 50,
+          // x: -110,
+          // y: 50,
           symbolWidth: 50,
           itemDistance: 50,
           itemStyle: {
@@ -3283,8 +3317,8 @@ let app = new Vue({
           align: 'right',//横向位置
           verticalAlign: 'middle', // 纵向位置
           layout: "vertical",//横排还是竖排
-          x: -30,
-          y: 30,
+          // x: -30,
+          // y: 30,
           symbolWidth: 50,
           itemDistance: 50,
           itemStyle: {
@@ -3503,8 +3537,8 @@ let app = new Vue({
           align: 'right',//横向位置
           verticalAlign: 'middle', // 纵向位置
           layout: "vertical",//横排还是竖排
-          x: -50,
-          y: 30,
+          // x: -50,
+          // y: 30,
           symbolWidth: 50,
           itemDistance: 50,
           itemStyle: {
@@ -3713,8 +3747,8 @@ let app = new Vue({
           align: 'right',//横向位置
           verticalAlign: 'middle', // 纵向位置
           layout: "vertical",//横排还是竖排
-          x: -70,
-          y: 50,
+          // x: -70,
+          // y: 50,
           symbolWidth: 50,
           itemDistance: 50,
           itemStyle: {
@@ -3763,7 +3797,7 @@ let app = new Vue({
         series: [{
           type: 'pie',
           name: '占比',
-          //center: ['35%','50%'],
+          // center: ['35%','50%'],
           point: {
             events: {
               click: function (e) { //点击事件
@@ -4501,6 +4535,7 @@ let app = new Vue({
         let that = this
         that.center1Chart = echarts.init(this.$refs['echartC1'])
         data = center2
+        console.log(data, '??????????????????')
         arrName = getArrayValue(data, "name");
         arrValue = getArrayValue(data, "value");
         sumValue = eval(arrValue.join("+"));
@@ -5799,6 +5834,7 @@ let app = new Vue({
     },
     initProjectList () {
       let dataList = []
+      console.log(center8, '?????????')
       center8.map(item => {
         if (this.versions) {
           dataList.push([item.office, item.name, this.yuanChange(item.value) + '亿', item.typeno])
@@ -5806,7 +5842,6 @@ let app = new Vue({
           dataList.push([item.office, item.name, item.value + '亿'])
         }
       })
-
       this.storageRecordConfig2.data = dataList
       this.storageRecordConfig2 = { ...this.storageRecordConfig2 }
     },