Sfoglia il codice sorgente

工程 接口联调 ( 小区集合 && 楼栋集合 && 单元集合 )

付宇航 1 anno fa
parent
commit
539d7096f2

+ 25 - 0
src/api/zdsz/enginee.js

@@ -0,0 +1,25 @@
+import request from '@/utils/request'
+
+// 查询小区集合
+export function getAreaList({district}) {
+    return request({
+        url: `/zdsz/area/getAreaList?district=${district}`,
+        method: 'get',
+    })
+}
+
+// 查询楼栋集合
+export function getBuildingList({areaId}) {
+    return request({
+        url: `/zdsz/building/getBuildingList?areaId=${areaId}`,
+        method: 'get',
+    })
+}
+
+// 查询单元集合
+export function getUnitList({buildingId}) {
+    return request({
+        url: `/zdsz/unit/getUnitList?buildingId=${buildingId}`,
+        method: 'get',
+    })
+}

+ 2 - 2
src/settings.js

@@ -17,7 +17,7 @@ module.exports = {
   /**
    * 是否显示 tagsView
    */
-  tagsView: true,
+  tagsView: false,
 
   /**
    * 是否固定头部
@@ -27,7 +27,7 @@ module.exports = {
   /**
    * 是否显示logo
    */
-  sidebarLogo: true,
+  sidebarLogo: false,
 
   /**
    * 是否显示动态标题

+ 5 - 0
src/views/zdsz/enginee/industry/industry_statistics/index.vue

@@ -0,0 +1,5 @@
+<template>
+    <div>
+        工业工程
+    </div>
+</template>

+ 129 - 36
src/views/zdsz/enginee/material/material_statistics/index.vue

@@ -14,33 +14,69 @@
             <el-radio-button label="2">可视化进度</el-radio-button>
         </el-radio-group>
         <div class="topContain">
-            <div style="width: 100%;height: 100%;">
-                <el-select 
-                    v-model="currentCommunity" 
+            <div style="width: 100%;height: 100%;display: flex;">
+                <div>
+                    <el-select 
+                    v-model="currentDistrict" 
                     placeholder="请选择行政区"
-                    class="projectSelect" 
+                    class="projectSelect districtSelect" 
                     popper-class="projectDropDown" 
                     :popper-append-to-body="false"
+                    @change="districtHasChanged"
                     >
                     <el-option
-                        v-for="e in communityOptions"
+                        v-for="e in dict.type.district"
                         :key="e.value"
                         :label="e.label"
                         :value="e.value">
                     </el-option>
                 </el-select>
+                </div>
+                <div>
+                    <el-select 
+                        v-model="currentCommunity" 
+                        placeholder="请选择小区"
+                        class="projectSelect communitySelect" 
+                        popper-class="projectDropDown" 
+                        :popper-append-to-body="false"
+                        @change="communityHasChanged"
+                        >
+                        <el-option
+                            v-for="e in communityOptions"
+                            :key="e.id"
+                            :label="e.name"
+                            :value="e.id">
+                        </el-option>
+                    </el-select>
+
+                </div>
                 <el-select 
-                    v-model="currentCommunity" 
-                    placeholder="请选择小区"
+                    v-model="currentBuilding" 
+                    placeholder="请选择楼栋"
                     class="projectSelect" 
+                    @change="buildingHasChanged"
                     popper-class="projectDropDown" 
                     :popper-append-to-body="false"
                     >
                     <el-option
-                        v-for="e in communityOptions"
-                        :key="e.value"
-                        :label="e.label"
-                        :value="e.value">
+                        v-for="e in buildingOptions"
+                        :key="e.id"
+                        :label="e.name"
+                        :value="e.id">
+                    </el-option>
+                </el-select>
+                <el-select 
+                    v-model="currentUnit" 
+                    placeholder="请选择单元"
+                    class="projectSelect" 
+                    popper-class="projectDropDown" 
+                    :popper-append-to-body="false"
+                    >
+                    <el-option
+                        v-for="e in unitOptions"
+                        :key="e.id"
+                        :label="e.name"
+                        :value="e.id">
                     </el-option>
                 </el-select>
                 <el-select 
@@ -75,33 +111,41 @@
                 v-hasPermi="['zdsz:visual_house:export']"
                 >导出</el-button>
         </div>    
-        <el-table
-            class="materialStatisticsTable"
-            :data="tableData"
-            header-cell-style="background-color:#199ED8;border: 2px solid #000066"
-            border
-            :cell-style="tableRowClassName"
-            style="width: 100%">
-            <el-table-column
-            prop="date"
-            width="250"
-            label=""
-            >
-            </el-table-column>
-            <el-table-column
-            prop="name"
-            label="预计用料"
-            >
-            </el-table-column>
-            <el-table-column
-            prop="address"
-            label="实际用料">
-            </el-table-column>
-        </el-table>
+        <div style="width: 100%; height: 100%;">
+            <el-table
+                class="materialStatisticsTable"
+                :data="tableData"
+                header-cell-style="background-color:#199ED8;border: 2px solid #000066"
+                border
+                :cell-style="tableRowClassName"
+                style="width: 100%">
+                <el-table-column
+                prop="date"
+                width="250"
+                label=""
+                >
+                </el-table-column>
+                <el-table-column
+                prop="name"
+                label="预计用料"
+                >
+                </el-table-column>
+                <el-table-column
+                prop="address"
+                label="实际用料">
+                </el-table-column>
+            </el-table>
+        </div>
+        
     </div>
 </template>
 
 <script>
+import {
+    getAreaList,                            // 获取当前小区集合
+    getBuildingList,                        // 获取当前楼栋集合
+    getUnitList,                            // 获取当前单元集合
+} from '@/api/zdsz/enginee'
 export default {
     name:'MaterialStatistics',
     dicts:['district'],
@@ -157,8 +201,13 @@ export default {
                     label: '龙腾香格里'
                 },
             ],
+            buildingOptions:[],         // 楼栋集合
+            unitOptions:[],             // 单元集合
             currentType:null,
-            currentCommunity:null,
+            currentDistrict:null,       // 当前行政区
+            currentCommunity:null,      // 当前小区
+            currentBuilding:null,       // 当前楼宇
+            currentUnit:null,           // 当前单元
             tableData: [
                 {
                     date: '规格',
@@ -183,6 +232,27 @@ export default {
         console.log(this.dict)
     },
     methods:{
+        // 当前所选行政区发生改变 查询当前小区集合
+        districtHasChanged(district){
+            this.currentCommunity = null
+            getAreaList({district}).then(res => {
+                this.communityOptions = res.data
+            })
+        },
+        // 当前所选小区发生改变 查询当前楼栋集合
+        communityHasChanged(areaId){
+            this.currentBuilding = null
+            getBuildingList({areaId}).then(res => {
+                this.buildingOptions = res.data
+            })
+        },
+        buildingHasChanged(buildingId){
+            this.currentUnit = null
+            getUnitList({buildingId}).then(res => {
+                console.log(res)
+                this.unitOptions = res.data
+            })
+        },
         /** 导出按钮操作 */
         handleExport() {
             this.download('zdsz/visual_house/export', {
@@ -215,17 +285,40 @@ export default {
         display: flex;
         justify-content: space-between;
         width: 100%;
+        // height: 40px;
         .searchBtn{
+            // height: 100%;
             width: 11%;
             background-color: #1890FF;
             color: #fff;
         }
         ::v-deep .projectSelect{
+            width: 16%;
             .el-input__inner{
-                background-color: #1890FF;
+                // 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{

+ 16 - 5
src/views/zdsz/enginee/material/progres_statistics/progres_statistics.vue

@@ -154,31 +154,42 @@ export default {
         width: 38%;
         .searchBtn{
             width: 11%;
-            background-color: #1890FF;
+            background: linear-gradient(to right , #2197F2, #0BB0DE);
             color: #fff;
         }
         ::v-deep .projectSelect{
             .el-input__inner{
-                background-color: #1890FF;
+                 background: linear-gradient(to right , #2197F2, #0BB0DE);
                 color: #fff;
             }
         }
         .projectDropDown{
-            background-color: #1890FF;
+            background: linear-gradient(to right , #2197F2, #0BB0DE);
             .el-select-dropdown__item{
-                background-color: #1890FF;
+                background: linear-gradient(to right , #2197F2, #0BB0DE);
                 color: #fff;
             }
             ::v-deep .el-select-dropdown__list {
                 padding-top: 0 !important;
                 padding-bottom: 0;
             }
+
         }
     }
     .materialStatisticsTable{
         margin-top: 1%;
         border: 2px solid #000066 !important;
-
+        cursor: pointer;
+        ::v-deep .el-table__row{
+            background-color: #2F4280;
+        }
+        ::v-deep tbody tr:hover>td { 
+            transform: translateX(8px) translateY(-8px);
+            z-index: 100;
+            box-shadow: 10px 10px 10px 10px #182652;
+            background-color: #30478E;
+            color: #fff;
+        }	
     }
     .materialStatisticsTable::before{
         background-color:#000066 ;