xieqy 1 year ago
parent
commit
0152ec8d0f

+ 1 - 1
src/settings.js

@@ -48,5 +48,5 @@ module.exports = {
   settings: true,
 
   // 系统名称
-  sysTitle: '三峡发展智慧EPC综合决策分析平台'
+  sysTitle: '智慧EPC综合决策分析平台'
 }

+ 1 - 1
src/views/groupPage/components/BarChart/ComRankingBarChart.vue

@@ -115,7 +115,7 @@ export default {
         },
         series: [
           {
-            name: '2011',
+            // name: '2011',
             type: 'bar',
             barWidth: 8,
             label: {

+ 3 - 1
src/views/groupPage/components/BarChart/ComSplitBarChart.vue

@@ -16,7 +16,9 @@ export default {
   watch: {
     chartData: {
       handler(n, o) {
-        this.initialChart()
+        this.$nextTick(() => {
+          this.initialChart()
+        })
       }
     }
   },

+ 7 - 3
src/views/groupPage/components/OthersChart/ComThreeDimensionsChart.vue

@@ -29,7 +29,10 @@ export default {
   mounted() {
     //图表大小自适应
     window.addEventListener('resize', () => {
-      this.initialChart()
+      // this.initialChart()
+      if (this.myChart) {
+        this.myChart.resize()
+      }
     })
   },
   methods: {
@@ -52,7 +55,7 @@ export default {
           textValue: Number(this.chartData[0].value),
           unit: this.chartData[0].unit,
           itemStyle: {
-            color: '#3FCDFF'
+            color: '#12CA90'
           }
         },
         {
@@ -61,7 +64,7 @@ export default {
           textValue: Number(this.chartData[1].value),
           unit: this.chartData[0].unit,
           itemStyle: {
-            color: '#12CA90'
+            color: '#FEC630'
           }
         }
       ]
@@ -256,6 +259,7 @@ export default {
           //     data: legendData
           // },
           tooltip: {
+            confine: true,
             formatter: (params) => {
               if (params.seriesName !== 'mouseoutSeries') {
                 return `${

+ 11 - 12
src/views/groupPage/districtPageModules/projectPanoramic/ProjectProgressNew.vue

@@ -207,17 +207,6 @@ export default class ProjectProgress extends Vue {
     }
     //获取施工状态
     this.getBuildStatusData()
-    //周报统计
-    const weekCountData = await getWeekCountData({ code: this.projectCode })
-    const wcd = weekCountData.result
-    if (!wcd) return
-    const { year_finish_ratio, year_finish, year_plan, contruct_content } = wcd || {}
-    this.contructContent = contruct_content
-    this.complishPercent = year_finish_ratio
-    this.staList = [
-      { name: '本年完成产值', value: +year_finish, unit: '万元' },
-      { name: '年度产值计划', value: +year_plan, unit: '万元' }
-    ]
     //获取投资以及结算信息
     const res = await getEpcjstzgldetailList({ projectParentCode: this.projectCode })
     if (res.code == 1 && res.result && res.result.length != 0) {
@@ -237,7 +226,17 @@ export default class ProjectProgress extends Vue {
       ]
       this.investPercent = roundFun(settleMoney / 1000 / investPlan, 2)
     }
-
+    //周报统计
+    const weekCountData = await getWeekCountData({ code: this.projectCode })
+    const wcd = weekCountData.result
+    if (!wcd) return
+    const { year_finish_ratio, year_finish, year_plan, contruct_content } = wcd || {}
+    this.contructContent = contruct_content
+    this.complishPercent = year_finish_ratio
+    this.staList = [
+      { name: '本年完成产值', value: +year_finish, unit: '万元' },
+      { name: '年度产值计划', value: +year_plan, unit: '万元' }
+    ]
     let staff = [],
       devices = []
     for (const key in wcd) {

+ 1 - 1
src/views/groupPage/districtPageModules/statisticalAnalysis/investModule/ContractStatistics.vue

@@ -109,7 +109,7 @@ export default class ContractStatistics extends Vue {
     })
     this.settleYearMoney = roundFun(amount, 2)
     this.totalSettleAmount = roundFun(totalAmount, 2)
-    this.percent = roundFun(this.settleYearMoney / 1000 / this.investYearMoney, 2)
+    this.percent = roundFun(this.settleYearMoney / 10000 / this.investYearMoney, 2)
     //
     let legendData = [],
       totalSta = [],

+ 63 - 11
src/views/groupPage/districtPageModules/statisticalAnalysis/investModule/MonthlyStatistics.vue

@@ -11,7 +11,16 @@
           <div class="icon"></div>
           <span class="site-info">月度投资结算统计</span>
           <!-- <div class="dateRange">{{ beginTime }}~{{ endTime }}</div> -->
-          <div class="dateRange">{{ currentTime }}</div>
+          <!-- <div class="dateRange">{{ currentTime }}</div> -->
+          <div class="dateRange">
+            <el-date-picker
+              v-model="currentTime"
+              size="mini"
+              type="month"
+              value-format="yyyy-MM"
+              placeholder="选择月"
+            ></el-date-picker>
+          </div>
         </div>
       </div>
       <div class="content-info">
@@ -27,7 +36,8 @@
         </div>
         <!--  -->
         <div class="barchart-content">
-          <ComSplitBarChart :chartData="chartData" />
+          <ComSplitBarChart :chartData="chartData" v-show="chartData" />
+          <el-empty v-if="!chartData" :image-size="80" style="flex: 1" description="暂无数据"></el-empty>
         </div>
         <!--  -->
         <div class="piechart-content">
@@ -36,7 +46,8 @@
             <span class="item-name">各类型费用饼图统计</span>
           </div>
           <div class="pc-chartContent">
-            <ComExpenseTypeChart :chartData="chartData" />
+            <ComExpenseTypeChart :chartData="chartData" v-show="chartData" />
+            <el-empty v-if="!chartData" :image-size="80" style="flex: 1" description="暂无数据"></el-empty>
           </div>
         </div>
       </div>
@@ -47,10 +58,11 @@
 <script lang="ts">
 import moment from 'moment'
 import { Vue, Component, Prop, Watch } from 'vue-property-decorator'
-import { getImgFiles, getEpcQbsDetailPage } from '../../../apis'
+import { getImgFiles, getEpcQbsDetailPage, getEpcjsyddetailList } from '../../../apis'
 import request from '@/utils/request'
 import ComSplitBarChart from '@/views/groupPage/components/BarChart/ComSplitBarChart.vue'
 import ComExpenseTypeChart from '@/views/groupPage/components/PieChart/ComExpenseTypeChart.vue'
+import { roundFun } from '@/views/groupPage/util'
 const legendNameList = [
   { key: 'lx_cost', name: '建设期利息' },
   { key: 'one_cost', name: '一类费用' },
@@ -69,7 +81,7 @@ export default class MonthlyStatistics extends Vue {
   @Prop({ type: Array, default: () => {} }) dataInfo!: any
   beginTime = moment(new Date().setDate(new Date().getDate() - 6)).format('YYYY.MM.DD')
   endTime = moment(new Date()).format('YYYY.MM.DD')
-  currentTime = moment(new Date()).format('YYYY年MM月')
+  currentTime = moment(new Date()).format('YYYY-MM')
 
   chartData = null
   totalMoney = 0
@@ -78,24 +90,55 @@ export default class MonthlyStatistics extends Vue {
   }
   @Watch('dataInfo')
   onChangMehod() {
-    this.getData()
+    // this.getData()
+  }
+  @Watch('currentTime', { immediate: true })
+  onTimeChange(val) {
+    this.fetchData()
   }
-  getData() {
-    const investInfo = this.dataInfo[0]
+  async fetchData() {
+    if (!this.currentTime) {
+      this.chartData = null
+      this.totalMoney = 0
+      return
+    }
+    const res = await getEpcjsyddetailList({ dataOwner: this.projectCode, yearMonth: this.currentTime })
+    if (res.code != 1 || !res.result || res.result.length == 0) {
+      this.chartData = null
+      this.totalMoney = 0
+      return
+    }
+    const investInfo = res.result[0]
     let infoData = [],
       amount = 0
     Object.keys(investInfo).forEach((key) => {
-      if (key.includes('_month')) {
+      if (key.includes('_month') && key != 'cost_month_count') {
         infoData.push({
           name: (legendNameList.find((i) => i.key == key.substring(0, key.lastIndexOf('_'))) || {}).name,
-          value: investInfo[key]
+          value: roundFun(investInfo[key], 2)
         })
         amount += +investInfo[key]
       }
     })
-    this.totalMoney = amount
+    this.totalMoney = roundFun(amount, 2)
     this.chartData = infoData
   }
+  // getData() {
+  //   const investInfo = this.dataInfo[0]
+  //   let infoData = [],
+  //     amount = 0
+  //   Object.keys(investInfo).forEach((key) => {
+  //     if (key.includes('_month')) {
+  //       infoData.push({
+  //         name: (legendNameList.find((i) => i.key == key.substring(0, key.lastIndexOf('_'))) || {}).name,
+  //         value: investInfo[key]
+  //       })
+  //       amount += +investInfo[key]
+  //     }
+  //   })
+  //   this.totalMoney = amount
+  //   this.chartData = infoData
+  // }
 }
 </script>
 
@@ -149,6 +192,15 @@ export default class MonthlyStatistics extends Vue {
         font-weight: 400;
         color: #ffffff;
         margin-right: 0.052083rem; /* 10/192 */
+        width: 0.78125rem /* 150/192 */;
+        // margin-top: -0.03125rem /* 6/192 */;
+        display: flex;
+        align-items: center;
+        >>> .el-input__inner {
+          background-color: transparent;
+          border: 1px solid rgba(73, 158, 277, 1);
+          color: #fff;
+        }
       }
     }
   }

+ 2 - 2
src/views/groupPage/districtPageModules/statisticalAnalysis/securityModule/RiskAndSecurityNew.vue

@@ -31,7 +31,7 @@
           </div>
         </div>
         <div class="rectificationStatistic">
-          <div class="title">
+          <div class="title" style="justify-content: space-between">
             <div style="display: flex; align-items: center">
               <div class="icon"></div>
               <span class="item-name">近7天隐患创建情况</span>
@@ -165,6 +165,7 @@ export default class RiskAndSecurityNew extends Vue {
   tableScroll() {
     const that = this
     const area = this.$refs.scrollContent as any
+    if (!area) return
     // 拿到元素后,对元素进行定时增加距离顶部距离,实现滚动效果(此配置为每100毫秒移动1像素)
     area.scrollTop = 0
     function scrollUp() {
@@ -296,7 +297,6 @@ export default class RiskAndSecurityNew extends Vue {
       width: 100%;
       display: flex;
       align-items: center;
-      justify-content: space-between;
       .icon {
         height: 0.072917rem /* 14/192 */;
         width: 0.078125rem /* 15/192 */;

+ 52 - 32
src/views/groupPage/groupPageModules/ContractInfo.vue

@@ -20,32 +20,44 @@
             <!-- <span class="item-info">{{ ProjectTotal }},{{ TotalValue }}</span> -->
             <span class="item-info">三峡发展承揽项目{{ ProjectTotal }}个,总合同金额{{ TotalValue }}亿元</span>
           </div>
-          <div class="content">
+          <div class="content topContent">
             <div class="chart-container">
               <!-- <div class="chart-title">完成占比:{{ complishPercent }}%</div> -->
               <div class="chart-title">本年产值完成占比:{{ complishPercent }}%</div>
               <ComThreeDimensionsChart v-on="{ fontSize }" :chartData="staList" />
               <!-- 底座背景 -->
               <div class="bg" :style="{ 'background-image': `url('${url}')` }"></div>
-              <div class="invest-title">
-                <span>累计结算{{ allCost }}亿元</span><span>本年度累计结算{{ yearCost }}亿元</span>
-              </div>
             </div>
             <div class="dataInfo">
               <div
                 class="data-item"
                 v-for="(item, index) of staList"
                 :key="item.name"
-                :style="index === 0 ? 'background: rgba(11, 122, 192,0.16)' : 'background: rgba(8, 178, 114,0.16)'"
+                :style="'background: rgba(11, 122, 192,0.16)'"
               >
-                <div class="data-value" :title="item.value + item.unit">{{ item.value }}{{ item.unit }}</div>
+                <!--:style="index === 0 ? 'background: rgba(11, 122, 192,0.16)' : 'background: rgba(8, 178, 114,0.16)'" -->
+                <div
+                  class="data-value"
+                  :style="index === 0 ? 'color:#FFD02C' : 'color:#11F0AA'"
+                  :title="item.value + item.unit"
+                >
+                  {{ item.value }}{{ item.unit }}
+                </div>
                 <div class="data-wrap">
-                  <div class="pointSymbol" :style="index === 0 ? 'background:#2BA7FF' : 'background:#13D28A'"></div>
+                  <!-- <div class="pointSymbol" :style="index === 0 ? 'background:#2BA7FF' : 'background:#13D28A'"></div> -->
                   <div class="data-title">{{ item.name }}</div>
                 </div>
               </div>
             </div>
           </div>
+          <div class="invest-title">
+            <span
+              >累计结算:<i>{{ allCost }}亿元</i></span
+            >
+            <span
+              >本年度累计结算:<i>{{ yearCost }}亿元</i></span
+            >
+          </div>
         </div>
         <div class="content-item">
           <div class="title">
@@ -305,10 +317,10 @@ export default {
       this.latestData.month = []
       const res = await getEpcMonthCountData({ name: this.code })
       let { legendData, seriesDatas, xaxis } = res.result
-      this.latestData.month = xaxis.map((item) => this.getMonth(item))
+      this.latestData.month = xaxis.map((item) => item).reverse()
       seriesDatas.forEach((item) => {
-        if (item.name == '收入') this.latestData.income = item.seriesData
-        if (item.name == '支出') this.latestData.spending = item.seriesData
+        if (item.name == '收入') this.latestData.income = item.seriesData.reverse()
+        if (item.name == '支出') this.latestData.spending = item.seriesData.reverse()
         // if (item.name == '利润') this.latestData.profits = item.seriesData
       })
     },
@@ -456,7 +468,7 @@ export default {
             font-size: 0.083333rem /* 16/192 */;
             font-family: Source Han Sans CN;
             font-weight: bold;
-            top: 0.104167rem /* 20/192 */;
+            top: 0.125rem /* 24/192 */;
             color: #ffffff;
           }
           .bg {
@@ -465,38 +477,21 @@ export default {
           }
           .bg {
             position: absolute;
-            // top: 0.614583rem /* 118/192 */;
-            top: 15%;
-            left: 0.041667rem /* 8/192 */;
+            top: -0.020833rem /* 4/192 */;
+            left: 0.09375rem /* 18/192 */;
             z-index: -1;
-            width: 0.9375rem /* 180/192 */;
+            width: 0.833333rem /* 160/192 */;
             height: 0.807292rem /* 155/192 */;
             background: no-repeat center;
             // background-image: url('~@/views/groupPage/images/底座样式.png');
             background-size: 100% 100%;
           }
-          .invest-title {
-            position: absolute;
-            bottom: 0;
-            font-size: 0.083333rem /* 16/192 */;
-            font-family: Source Han Sans CN;
-            font-weight: bold;
-            color: #ffffff;
-            display: flex;
-            flex-flow: column;
-            justify-content: center;
-            align-items: center;
-            left: 0.15625rem; /* 30/192 */
-            span {
-              white-space: nowrap;
-            }
-          }
         }
         .dataInfo {
           width: 50%;
           display: flex;
           flex-flow: column;
-          justify-content: space-around;
+          justify-content: center;
           font-family: Source Han Sans CN;
           .data-item {
             display: flex;
@@ -531,8 +526,33 @@ export default {
               color: #ffffff;
             }
           }
+          .data-item:first-child {
+            margin-bottom: 0.052083rem /* 10/192 */;
+          }
         }
       }
+      .invest-title {
+        background: rgba(13, 120, 195, 0.16);
+        width: 100%;
+        height: calc(100% - 1.067708rem /* 205/192 */);
+        font-size: 0.083333rem /* 16/192 */;
+        font-family: Source Han Sans CN;
+        font-weight: bold;
+        color: #ffffff;
+        display: flex;
+        justify-content: space-around;
+        align-items: center;
+        span {
+          white-space: nowrap;
+          i {
+            font-weight: bold;
+            color: #2ba7ff;
+          }
+        }
+      }
+      .topContent {
+        height: 0.833333rem /* 160/192 */ !important;
+      }
       .epc {
         background: rgba(14, 167, 255, 0.08);
         margin-top: 0.15625rem /* 30/192 */;