Pārlūkot izejas kodu

可视化统计

wangtong 1 gadu atpakaļ
vecāks
revīzija
1a548b217e

+ 6 - 0
src/api/zdsz/overhead.js

@@ -29,3 +29,9 @@ export function getEnginSpecificationsList(materId) {
      params: {materId:materId}
   })
 }
+export function getsumStatus(materId) {
+  return request({
+    url: `/zdsz/engineeringCivil/getsumStatus?enginCycle=${materId}`,
+    method: 'get',
+  })
+}

+ 6 - 0
src/router/index.js

@@ -186,6 +186,12 @@ export const dynamicRoutes = [
         component: () => import('@/views/zdsz/enginee/material/progres_visual/index'),
         name: 'progres_visual',
         meta: { title: '可视化进度'}
+      },
+      {
+        path: '/echarts_statistics',
+        component: () => import('@/views/zdsz/enginee/material/echarts_statistics/index'),
+        name: 'echarts_statistics',
+        meta: { title: '可视化统计'}
       }
     ]
   }

+ 295 - 0
src/views/zdsz/enginee/material/echarts_statistics/index.vue

@@ -0,0 +1,295 @@
+
+<template>
+  <div class="MaterialStatistics_Contain">
+    <el-radio-group v-model="currentMenu" style="margin-bottom: 20px;" @input="toModule">
+      <el-radio-button label="0">用料统计</el-radio-button>
+      <el-radio-button label="1">进度统计</el-radio-button>
+      <el-radio-button label="2">可视化统计</el-radio-button>
+      <el-radio-button label="3">可视化进度</el-radio-button>
+    </el-radio-group>
+    <!--        <div class="topContain">-->
+    <div style="width: 100%;height: 100%;display: flex;">
+      <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form-item label="工程周期" prop="enginCycle">
+      <el-select v-model="queryParams.enginCycle" filterable clearable placeholder="请选择规格"
+                 @change="getsumStatus(queryParams.enginCycle)"
+      >
+        <el-option
+          v-for="dict in dict.type.engin_cycle"
+          :key="dict.value"
+          :label="dict.label"
+          :value="dict.value"
+        />
+      </el-select>
+    </el-form-item>
+      </el-form>
+  </div>
+    <div style="height: 800px;width: 1700px">
+<div id="main" style="height: 100%;width: 100%"></div>
+      </div>
+  </div>
+</template>
+
+<script>
+import * as echarts from 'echarts';
+import {getsumStatus} from "@/api/zdsz/overhead";
+export default {
+  name:'EchartsStatistics',
+  dicts:['engin_cycle'],
+  data(){
+    return {
+      currentMenu:2,   // 0:用料管理 1:进度统计 2:可视化进度
+      showSearch:true,
+      queryParams:{enginCycle:'0'},
+      option:{
+      backgroundColor: '#feffff',
+        title: {
+      text: '',
+        left: 'center',
+        top: 20,
+        textStyle: {
+        color: '#ccc'
+      }
+    },
+      tooltip: {
+        trigger: 'item'
+      },
+      visualMap: {
+        show: false,
+          min: 80,
+          max: 600,
+          inRange: {
+          colorLightness: [0, 1]
+        }
+      },
+      series: [
+        {
+          name: 'Access From',
+          type: 'pie',
+          radius: '55%',
+          center: ['50%', '50%'],
+          data: [
+            { value: 335, name: 'Direct' },
+            { value: 310, name: 'Email' },
+            { value: 274, name: 'Union Ads' },
+            { value: 235, name: 'Video Ads' },
+            { value: 400, name: 'Search Engine' }
+          ],
+          roseType: 'radius',
+          label: {
+            color: 'rgba(255, 255, 255, 0.3)'
+          },
+          labelLine: {
+            lineStyle: {
+              color: 'rgba(255, 255, 255, 0.3)'
+            },
+            smooth: 0.2,
+            length: 10,
+            length2: 20
+          },
+          itemStyle: {
+            color: '#e81610',
+            shadowBlur: 200,
+            shadowColor: 'rgba(241,9,9,0.5)'
+          },
+          animationType: 'scale',
+          animationEasing: 'elasticOut',
+          animationDelay: function (idx) {
+            return Math.random() * 200;
+          }
+        }
+      ]
+    }
+    }
+  },
+  mounted(){
+  this.getsumStatus(0)
+  },
+  methods: {
+    getsumStatus(val)
+    {
+      getsumStatus(val).then(res=>{
+        let data=[{
+          value: parseInt(res.data.done),name:'完工数量'
+        },{
+          value: parseInt(res.data.notstart),name:'未开工数量'
+        },{
+          value: parseInt(res.data.willDone),name:'未完工数量'
+        }
+        ]
+        let  option={
+          backgroundColor: '#feffff',
+          title: {
+            text: '',
+            left: 'center',
+            top: 20,
+            textStyle: {
+              color: '#dc0e0e'
+            }
+          },
+          tooltip: {
+            trigger: 'item'
+          },
+          visualMap: {
+            show: false,
+            min: 0,
+            max: 800000,
+            inRange: {
+              colorLightness: [0, 1]
+            }
+          },
+          series: [
+            {
+              name: '',
+              type: 'pie',
+              radius: '55%',
+              center: ['50%', '50%'],
+              data: data.sort(function (a, b) {
+                return a.value - b.value;
+              }),
+              roseType: 'radius',
+              label: {
+                color: 'rgb(1,11,17)'
+              },
+              labelLine: {
+                lineStyle: {
+                  color: 'rgb(32,155,229)'
+                },
+                smooth: 0.2,
+                length: 10,
+                length2: 20
+              },
+              itemStyle: {
+                color: '#98201d',
+                shadowBlur: 200,
+                shadowColor: 'rgb(254,255,255)'
+              },
+              animationType: 'scale',
+              animationEasing: 'elasticOut',
+              animationDelay: function (idx) {
+          return Math.random() * 200;
+        }
+      }
+      ]
+      }
+        this.initmian(option)
+      })
+    },
+    initmian(option)
+    {
+      console.log(option)
+      var chartDom = document.getElementById('main');
+      var myChart = echarts.init(chartDom);
+      myChart.clear()
+      myChart.setOption(option,true)
+    },
+    toModule(){
+      console.log(this.$router)
+      const currentPage = this.currentMenu == 0 ? 'material_statistics' : this.currentMenu == 1 ? 'progres_statistics' :this.currentMenu == 2 ? 'echarts_statistics': 'progres_visual'
+      this.$router.push({
+        path:`/${currentPage}`
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.tags-view-container{
+  display: none;
+}
+.MaterialStatistics_Contain{
+  width: 100%;
+  height: 100%;
+  padding: 1%;
+  .topContain{
+    display: flex;
+    justify-content: space-between;
+    width: 100%;
+    height: 40px;
+
+    ::v-deep .projectSelect{
+      width: 16%;
+      .el-input__inner{
+        // font-size: 15px;
+        // height: 40px ;
+        // background-color: #1890FF;
+        background: linear-gradient(to right, #2197F2, #0BB0DE);
+        color: #fff;
+      }
+    }
+
+    ::v-deep .districtSelect{
+      width: 200px;
+    }
+    ::v-deep .communitySelect{
+      margin-left: 2%;
+      width: 200px;
+    }
+    ::v-deep .projectSelect:not(:nth-child(1)){
+      margin-left: 1%;
+    }
+    ::v-deep .projectSelect:nth-child(3){
+      width: 10%;
+    }
+    ::v-deep .projectSelect:nth-child(4){
+      width: 10%;
+    }
+    .projectDropDown{
+      background-color: #1890FF;
+      .el-select-dropdown__item{
+        background-color: #1890FF;
+        color: #fff;
+      }
+      ::v-deep .el-select-dropdown__list {
+        padding-top: 0 !important;
+        padding-bottom: 0;
+      }
+    }
+    .projectDropDown >ul{
+      padding-top: 0 ;
+      padding-bottom: 0;
+    }
+  }
+  .materialStatisticsTable{
+    margin-top: 1%;
+    border: 2px solid #000066 !important;
+
+  }
+  .materialStatisticsTable::before{
+    background-color:#000066 ;
+  }
+  .materialStatisticsTable::after{
+    background-color:#000066 ;
+  }
+}
+</style>
+
+<style lang="scss" scoped>
+.customTable{
+  .el-table__header-wrapper th{
+    background-color: #199ED8;
+  }
+  .el-table--border th.el-table__cell{
+    border: 2px solid #000066 !important;
+  }
+  .el-table__empty-block{
+    background-color: #199ED8;
+  }
+  .el-table__empty-text{
+    color: #000066;
+  }
+  .el-table__cell{
+    background-color: #199ED8 ;
+    border: 2px solid #000066 !important;
+  }
+  .el-table__cell >div{
+    text-align: center;
+  }
+  .el-button{
+    background-color: #169BD5;
+    color: #fff;
+  }
+}
+
+</style>

+ 10 - 8
src/views/zdsz/enginee/material/material_statistics/index.vue

@@ -4,7 +4,8 @@
         <el-radio-group v-model="currentMenu" style="margin-bottom: 20px;" @input="toModule">
             <el-radio-button label="0">用料统计</el-radio-button>
             <el-radio-button label="1">进度统计</el-radio-button>
-            <el-radio-button label="2">可视化进度</el-radio-button>
+          <el-radio-button label="2">可视化统计</el-radio-button>
+          <el-radio-button label="3">可视化进度</el-radio-button>
         </el-radio-group>
 <!--        <div class="topContain">-->
             <div style="width: 100%;height: 100%;display: flex;">
@@ -333,13 +334,14 @@ export default {
         tableRowClassName(){
             return "background:#199ED8;border: 2px solid #000066"
         },
-        toModule(){
-            console.log(this.$router)
-            const currentPage = this.currentMenu == 0 ? 'material_statistics' : this.currentMenu == 1 ? 'progres_statistics' : 'progres_visual'
-            this.$router.push({
-                path:`/${currentPage}`
-            })
-        }
+      toModule(){
+        console.log(this.$router)
+        const currentPage = this.currentMenu == 0 ? 'material_statistics' : this.currentMenu == 1 ? 'progres_statistics' :this.currentMenu == 2 ? 'echarts_statistics': 'progres_visual'
+        this.$router.push({
+          path:`/${currentPage}`
+        })
+      }
+
     }
 }
 </script>

+ 9 - 8
src/views/zdsz/enginee/material/progres_statistics/progres_statistics.vue

@@ -5,7 +5,8 @@
         <el-radio-group v-model="currentMenu" style="margin-bottom: 20px;" @input="toModule">
             <el-radio-button label="0">用料统计</el-radio-button>
             <el-radio-button label="1">进度统计</el-radio-button>
-            <el-radio-button label="2">可视化进度</el-radio-button>
+          <el-radio-button label="2">可视化统计</el-radio-button>
+          <el-radio-button label="3">可视化进度</el-radio-button>
         </el-radio-group>
         <div class="topContain">
           <el-form :model="queryParams" ref="queryForm" size="small" :inline="true"  v-show="showSearch" label-width="68px">
@@ -221,14 +222,14 @@ export default {
         tableRowClassName(){
             return "background:#FFFFFF;border: 1px solid #000066"
         },
-        toModule(){
-            console.log(this.$router)
-            const currentPage = this.currentMenu == 0 ? 'material_statistics' : this.currentMenu == 1 ? 'progres_statistics' : 'progres_visual'
-            this.$router.push({
-                path:`/${currentPage}`
-            })
-        }
+    toModule(){
+      console.log(this.$router)
+      const currentPage = this.currentMenu == 0 ? 'material_statistics' : this.currentMenu == 1 ? 'progres_statistics' :this.currentMenu == 2 ? 'echarts_statistics': 'progres_visual'
+      this.$router.push({
+        path:`/${currentPage}`
+      })
     }
+  }
 }
 </script>
 

+ 38 - 37
src/views/zdsz/enginee/material/progres_visual/index.vue

@@ -1,9 +1,9 @@
 
- <!-- 
+ <!--
     *@description: 可视化进度
     *@author: yh Fu
     *@date: 2023-12-25 13:27:19
-    *@version: V1.0.5 
+    *@version: V1.0.5
     -->
 
 <template>
@@ -11,15 +11,16 @@
         <el-radio-group v-model="currentMenu" style="margin-bottom: 20px;" @input="toModule">
             <el-radio-button label="0">用料统计</el-radio-button>
             <el-radio-button label="1">进度统计</el-radio-button>
-            <el-radio-button label="2">可视化进度</el-radio-button>
+          <el-radio-button label="2">可视化统计</el-radio-button>
+          <el-radio-button label="3">可视化进度</el-radio-button>
         </el-radio-group>
         <div class="topContain">
             <div style="width: 100%;height: 100%;">
-                <el-select 
-                    v-model="currentCommunity" 
+                <el-select
+                    v-model="currentCommunity"
                     placeholder="请选择行政区"
-                    class="projectSelect" 
-                    popper-class="projectDropDown" 
+                    class="projectSelect"
+                    popper-class="projectDropDown"
                     :popper-append-to-body="false"
                     >
                     <el-option
@@ -29,11 +30,11 @@
                         :value="e.value">
                     </el-option>
                 </el-select>
-                <el-select 
-                    v-model="currentCommunity" 
+                <el-select
+                    v-model="currentCommunity"
                     placeholder="请选择小区"
-                    class="projectSelect" 
-                    popper-class="projectDropDown" 
+                    class="projectSelect"
+                    popper-class="projectDropDown"
                     :popper-append-to-body="false"
                     >
                     <el-option
@@ -43,11 +44,11 @@
                         :value="e.value">
                     </el-option>
                 </el-select>
-                <el-select 
-                    v-model="currentType" 
-                    placeholder="请选择工程类型" 
-                    class="projectSelect" 
-                    popper-class="projectDropDown" 
+                <el-select
+                    v-model="currentType"
+                    placeholder="请选择工程类型"
+                    class="projectSelect"
+                    popper-class="projectDropDown"
                     :popper-append-to-body="false"
                     >
                     <el-option
@@ -59,8 +60,8 @@
                 </el-select>
                 <el-date-picker
                     v-model="currentDate"
-                    class="projectSelect" 
-                    popper-class="projectDropDown" 
+                    class="projectSelect"
+                    popper-class="projectDropDown"
                     :popper-append-to-body="false"
                     type="date"
                     placeholder="选择日期">
@@ -69,19 +70,19 @@
             <el-button class="searchBtn">查询</el-button>
             <el-button class="searchBtn">导出</el-button>
             <div class="unitStatus">
-                <div 
+                <div
                     v-for="(e,idx) in unitStatusOption"
                     :key="idx"
                     :style="`background-color:${e.color};width: 22%;height: 35px;position: absolute;right:${idx*130}px;box-shadow:0 5px 5px 0 #CDCDCD`"
                     >
-                    <div 
+                    <div
                         style="position: relative;left: 107%;width: 116%;top: 20%;"
                         >
                         {{ e.label }}
                     </div>
                 </div>
             </div>
-        </div>   
+        </div>
         <!-- 房间集合 -->
         <ConstructionDetails/>
     </div>
@@ -96,12 +97,12 @@ export default {
     },
     data(){
         return {
-            currentMenu:2,   // 0:用料管理 1:进度统计 2:可视化进度
+            currentMenu:3,   // 0:用料管理 1:进度统计 2:可视化进度
             typeOptions:[
                 {
                     value: '0',
                     label: '市政工程'
-                }, 
+                },
                 {
                     value: '1',
                     label: '工业工程'
@@ -109,11 +110,11 @@ export default {
                 {
                     value: '2',
                     label: '民用工程'
-                }, 
+                },
                 {
                     value: '3',
                     label: '危险作业'
-                }, 
+                },
                 {
                     value: '4',
                     label: '顶管工程'
@@ -127,7 +128,7 @@ export default {
                 {
                     value: '0',
                     label: '领秀世家'
-                }, 
+                },
                 {
                     value: '1',
                     label: '上东府里'
@@ -135,11 +136,11 @@ export default {
                 {
                     value: '2',
                     label: '清华园'
-                }, 
+                },
                 {
                     value: '3',
                     label: '万科蓝山'
-                }, 
+                },
                 {
                     value: '4',
                     label: '龙腾香格里'
@@ -164,13 +165,13 @@ export default {
         }
     },
     methods:{
-        toModule(){
-            console.log(this.$router)
-            const currentPage = this.currentMenu == 0 ? 'material_statistics' : this.currentMenu == 1 ? 'progres_statistics' : 'progres_visual'
-            this.$router.push({
-                path:`/${currentPage}`
-            })
-        }
+      toModule(){
+        console.log(this.$router)
+        const currentPage = this.currentMenu == 0 ? 'material_statistics' : this.currentMenu == 1 ? 'progres_statistics' :this.currentMenu == 2 ? 'echarts_statistics': 'progres_visual'
+        this.$router.push({
+          path:`/${currentPage}`
+        })
+      }
     }
 }
 </script>
@@ -180,7 +181,7 @@ export default {
     width: 100%;
     height: 100%;
     padding: 1%;
-    .topContain{  
+    .topContain{
         display: flex;
         justify-content: space-between;
         width: 60%;
@@ -220,4 +221,4 @@ export default {
         }
     }
 }
-</style>
+</style>