|
@@ -1,8 +1,18 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="110px">
|
|
|
- <el-form-item label="小区" prop="areaId">
|
|
|
- <el-select v-model="queryParams.areaId" placeholder="请选择小区" filterable @change="getBuildings">
|
|
|
+ <el-form-item label="行政区" prop="district">
|
|
|
+ <el-select v-model="queryParams.district" placeholder="请选择行政区" filterable @change="getAreas" >
|
|
|
+ <el-option
|
|
|
+ v-for="dict in dict.type.district"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="dict.label"
|
|
|
+ :value="dict.value"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="所属小区" prop="areaId">
|
|
|
+ <el-select v-model="queryParams.areaId" placeholder="请选择所属小区" filterable @change="getBuildings">
|
|
|
<el-option
|
|
|
v-for="obj in areas"
|
|
|
:key="obj.id"
|
|
@@ -11,8 +21,8 @@
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="楼栋" prop="buildingId">
|
|
|
- <el-select v-model="queryParams.buildingId" placeholder="请选择楼栋" filterable @change="getUnits">
|
|
|
+ <el-form-item label="所属楼宇" prop="buildingId">
|
|
|
+ <el-select v-model="queryParams.buildingId" placeholder="请选择所属楼宇" filterable @change="getUnits">
|
|
|
<el-option
|
|
|
v-for="obj in builds"
|
|
|
:key="obj.id"
|
|
@@ -21,8 +31,8 @@
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="单元" prop="unitId">
|
|
|
- <el-select v-model="queryParams.unitId" placeholder="请选择单元" filterable @change="getHouses">
|
|
|
+ <el-form-item label="所属单元" prop="unitId">
|
|
|
+ <el-select v-model="queryParams.unitId" placeholder="请选择所属单元" filterable @change="getHouses">
|
|
|
<el-option
|
|
|
v-for="obj in units"
|
|
|
:key="obj.id"
|
|
@@ -31,8 +41,8 @@
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="房间号" prop="houseId">
|
|
|
- <el-select v-model="queryParams.houseId" placeholder="请选择房间号" filterable>
|
|
|
+ <el-form-item label="所属房间" prop="houseId">
|
|
|
+ <el-select v-model="queryParams.houseId" placeholder="请选择所属房间" filterable>
|
|
|
<el-option
|
|
|
v-for="obj in houses"
|
|
|
:key="obj.id"
|
|
@@ -41,12 +51,34 @@
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="职工" prop="personBy">
|
|
|
+ <el-select v-model="queryParams.personBy" placeholder="请选择职工" filterable>
|
|
|
+ <el-option
|
|
|
+ v-for="obj in users"
|
|
|
+ :key="obj.userId"
|
|
|
+ :label="obj.nickName"
|
|
|
+ :value="obj.userId"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="施工时间" prop="times">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="queryParams.times"
|
|
|
+ size="small"
|
|
|
+ style="width: 240px"
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ type="daterange"
|
|
|
+ range-separator="-"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ :default-time="['00:00:00', '23:59:59']"
|
|
|
+ ></el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
-
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
@@ -95,8 +127,11 @@
|
|
|
|
|
|
<el-table v-loading="loading" :data="comprehensiveList" @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
- <!-- <el-table-column label="" align="center" prop="id" v-if="true"/>-->
|
|
|
- <el-table-column label="小区" align="center" prop="areaName" />
|
|
|
+ <el-table-column label="行政区" align="center" prop="district">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <dict-tag :options="dict.type.district" :value="scope.row.district"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column> <el-table-column label="小区" align="center" prop="areaName" />
|
|
|
<el-table-column label="楼栋" align="center" prop="buildingName" />
|
|
|
<el-table-column label="单元" align="center" prop="unitName" />
|
|
|
<el-table-column label="房间" align="center" prop="houseName" />
|
|
@@ -110,6 +145,11 @@
|
|
|
<dict-tag :options="dict.type.is_repair" :value="scope.row.isMaintenance"/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <!-- <el-table-column label="是否维修" align="center" prop="isMaintenance">-->
|
|
|
+ <!-- <template slot-scope="scope">-->
|
|
|
+ <!-- <dict-tag :options="dict.type.is_repair" :value="scope.row.isMaintenance"/>-->
|
|
|
+ <!-- </template>-->
|
|
|
+ <!-- </el-table-column>-->
|
|
|
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip/>
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
@@ -144,6 +184,18 @@
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="12">
|
|
|
+ <el-form-item label="行政区" prop="district">
|
|
|
+ <el-select v-model="form.district" placeholder="请选择行政区" filterable @change="getAreas" style="width: 100%;">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in dict.type.district"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="dict.label"
|
|
|
+ :value="dict.value"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
<el-form-item label="小区" prop="areaId">
|
|
|
<el-select v-model="form.areaId" placeholder="请选择小区" filterable @change="getBuildings1" style="width: 100%">
|
|
|
<el-option
|
|
@@ -155,6 +207,9 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20">
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="楼栋" prop="buildingId">
|
|
|
<el-select v-model="form.buildingId" placeholder="请选择楼栋" filterable @change="getUnits1" style="width: 100%">
|
|
@@ -167,8 +222,6 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="20">
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="单元" prop="unitId">
|
|
|
<el-select v-model="form.unitId" placeholder="请选择单元" filterable @change="getHouses1" style="width: 100%">
|
|
@@ -181,6 +234,9 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20">
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="房间号" prop="houseId">
|
|
|
<el-select v-model="form.houseId" placeholder="请选择房间号" filterable style="width: 100%">
|
|
@@ -248,10 +304,11 @@ import {getBuildings} from "@/api/zdsz/building";
|
|
|
import {getUnits} from "@/api/zdsz/unit";
|
|
|
import {getAreas} from "@/api/zdsz/area";
|
|
|
import {getHouses, listHouse} from "@/api/zdsz/house";
|
|
|
+import {listAll} from "@/api/system/user";
|
|
|
|
|
|
export default {
|
|
|
- name: "openrepair",
|
|
|
- dicts:['pass_check','is_repair'],
|
|
|
+ name: "opencheck",
|
|
|
+ dicts:['pass_check','is_repair','district'],
|
|
|
data() {
|
|
|
return {
|
|
|
// 按钮loading
|
|
@@ -276,11 +333,16 @@ export default {
|
|
|
open: false,
|
|
|
// 查询参数
|
|
|
queryParams: {
|
|
|
- pageNum: 1,
|
|
|
+ pageNum: 0,
|
|
|
pageSize: 10,
|
|
|
+ times: [],
|
|
|
areaId: undefined,
|
|
|
buildingId: undefined,
|
|
|
+ constructTime: undefined,
|
|
|
+ constructEndTime: undefined,
|
|
|
+ district: undefined,
|
|
|
unitId: undefined,
|
|
|
+ personBy: undefined,
|
|
|
houseId: undefined,
|
|
|
type: 3,
|
|
|
isQualified: undefined,
|
|
@@ -293,8 +355,12 @@ export default {
|
|
|
units: [],
|
|
|
rooms: [],
|
|
|
houses: [],
|
|
|
+ users: [],
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
+ district: [
|
|
|
+ { required: true, message: "行政区不能为空", trigger: "change" }
|
|
|
+ ],
|
|
|
areaId: [
|
|
|
{ required: true, message: "小区不能为空", trigger: "change" }
|
|
|
],
|
|
@@ -311,10 +377,10 @@ export default {
|
|
|
{ required: false, message: "类型不能为空", trigger: "change" }
|
|
|
],
|
|
|
isQualified: [
|
|
|
- { required: false, message: "安检是否合格不能为空", trigger: "blur" }
|
|
|
+ { required: true, message: "安检是否合格不能为空", trigger: "blur" }
|
|
|
],
|
|
|
isMaintenance: [
|
|
|
- { required: true, message: "是否维修不能为空", trigger: "blur" }
|
|
|
+ { required: false, message: "是否维修不能为空", trigger: "blur" }
|
|
|
],
|
|
|
remark: [
|
|
|
{ required: false, message: "备注不能为空", trigger: "blur" }
|
|
@@ -324,9 +390,14 @@ export default {
|
|
|
},
|
|
|
created() {
|
|
|
this.getList();
|
|
|
- this.getAreas();
|
|
|
+ this.getUsers();
|
|
|
},
|
|
|
methods: {
|
|
|
+ getUsers(){
|
|
|
+ listAll().then(res=>{
|
|
|
+ this.users=res.data
|
|
|
+ })
|
|
|
+ },
|
|
|
getUrl(url) {
|
|
|
this.form.picIds = this.$refs.obsImageUpload.fileList?this.$refs.obsImageUpload.fileList.map(e=>e.url):[];
|
|
|
},
|
|
@@ -340,6 +411,7 @@ export default {
|
|
|
this.builds = res.data
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
getUnits(id) {
|
|
|
this.houses = []
|
|
|
this.queryParams.unitId = undefined
|
|
@@ -348,17 +420,19 @@ export default {
|
|
|
this.units = res.data
|
|
|
})
|
|
|
},
|
|
|
- getAreas() {
|
|
|
+ getAreas(district) {
|
|
|
this.builds = []
|
|
|
this.units = []
|
|
|
this.houses = []
|
|
|
this.queryParams.buildingId = undefined
|
|
|
+ this.queryParams.areaId = undefined
|
|
|
this.queryParams.unitId = undefined
|
|
|
this.queryParams.houseId = undefined
|
|
|
this.form.buildingId = undefined
|
|
|
this.form.unitId = undefined
|
|
|
+ this.form.areaId = undefined
|
|
|
this.form.houseId = undefined
|
|
|
- getAreas().then(res => {
|
|
|
+ getAreas(district).then(res => {
|
|
|
this.areas = res.data;
|
|
|
});
|
|
|
},
|
|
@@ -403,43 +477,56 @@ export default {
|
|
|
this.loading = false;
|
|
|
});
|
|
|
},
|
|
|
- // 取消按钮
|
|
|
- cancel() {
|
|
|
- this.open = false;
|
|
|
- this.reset();
|
|
|
- this.houses = []
|
|
|
- this.units = []
|
|
|
- this.builds = []
|
|
|
- },
|
|
|
- // 表单重置
|
|
|
reset() {
|
|
|
this.form = {
|
|
|
id: undefined,
|
|
|
areaId: undefined,
|
|
|
buildingId: undefined,
|
|
|
unitId: undefined,
|
|
|
+ district: undefined,
|
|
|
houseId: undefined,
|
|
|
type: 3,
|
|
|
isQualified: undefined,
|
|
|
isMaintenance: undefined,
|
|
|
+ photo: undefined,
|
|
|
remark: undefined,
|
|
|
delFlag: 0,
|
|
|
- picIds: [],
|
|
|
createBy: undefined,
|
|
|
createTime: undefined,
|
|
|
updateBy: undefined,
|
|
|
+ picIds: [],
|
|
|
updateTime: undefined
|
|
|
};
|
|
|
this.resetForm("form");
|
|
|
},
|
|
|
+
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
|
- this.queryParams.pageNum = 1;
|
|
|
+ if (this.queryParams.times.length>0){
|
|
|
+ this.queryParams.constructTime=this.queryParams.times[0]
|
|
|
+ this.queryParams.constructEndTime=this.queryParams.times[1]
|
|
|
+ }
|
|
|
+ this.queryParams.pageNum = 0;
|
|
|
this.getList();
|
|
|
},
|
|
|
/** 重置按钮操作 */
|
|
|
resetQuery() {
|
|
|
- this.resetForm("queryForm");
|
|
|
+ this.queryParams= {
|
|
|
+ pageNum: 0,
|
|
|
+ pageSize: 10,
|
|
|
+ times: [],
|
|
|
+ areaId: undefined,
|
|
|
+ buildingId: undefined,
|
|
|
+ constructTime: undefined,
|
|
|
+ constructEndTime: undefined,
|
|
|
+ district: undefined,
|
|
|
+ unitId: undefined,
|
|
|
+ personBy: undefined,
|
|
|
+ houseId: undefined,
|
|
|
+ type: 3,
|
|
|
+ isQualified: undefined,
|
|
|
+ isMaintenance: undefined,
|
|
|
+ }
|
|
|
this.handleQuery();
|
|
|
},
|
|
|
// 多选框选中数据
|
|
@@ -456,6 +543,9 @@ export default {
|
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
+ getAreas(row.district).then(res => {
|
|
|
+ this.areas = res.data
|
|
|
+ });
|
|
|
getBuildings(row.areaId).then(res => {
|
|
|
this.builds = res.data
|
|
|
});
|