|
@@ -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{
|