|
|
@ -1,6 +1,6 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div class="search-container">
|
|
|
|
<div class="search-container">
|
|
|
|
<div class="option-rows" v-show="show_shequ_xiaoqu">
|
|
|
|
<div class="option-rows" v-if="show_shequ_xiaoqu">
|
|
|
|
<el-select
|
|
|
|
<el-select
|
|
|
|
@change="changeSelect($event, 'xiaoquList')"
|
|
|
|
@change="changeSelect($event, 'xiaoquList')"
|
|
|
|
v-model="queryParams.shequId"
|
|
|
|
v-model="queryParams.shequId"
|
|
|
@ -32,7 +32,6 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="option-rows">
|
|
|
|
<div class="option-rows">
|
|
|
|
<el-select
|
|
|
|
<el-select
|
|
|
|
v-show="show_net || show_shequ_xiaoqu"
|
|
|
|
|
|
|
|
v-model="queryParams.parentid"
|
|
|
|
v-model="queryParams.parentid"
|
|
|
|
placeholder="选择网格"
|
|
|
|
placeholder="选择网格"
|
|
|
|
@change="changeSelect($event, 'yuanList')"
|
|
|
|
@change="changeSelect($event, 'yuanList')"
|
|
|
@ -68,18 +67,18 @@
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<el-option
|
|
|
|
<el-option
|
|
|
|
v-for="item in buildingList"
|
|
|
|
v-for="item in buildingList"
|
|
|
|
:key="item.id"
|
|
|
|
:key="item.buildingId"
|
|
|
|
:label="item.label"
|
|
|
|
:label="item.buildingName"
|
|
|
|
:value="item.id"
|
|
|
|
:value="item.buildingId"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
</el-option>
|
|
|
|
</el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
<el-select v-model="queryParams.houseid" placeholder="选择住户" clearable>
|
|
|
|
<el-select v-model="queryParams.houseid" placeholder="选择住户" clearable>
|
|
|
|
<el-option
|
|
|
|
<el-option
|
|
|
|
v-for="item in houseList"
|
|
|
|
v-for="item in houseList"
|
|
|
|
:key="item.id"
|
|
|
|
:key="item.houseId"
|
|
|
|
:label="item.label"
|
|
|
|
:label="item.houseName"
|
|
|
|
:value="item.id"
|
|
|
|
:value="item.houseId"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
</el-option>
|
|
|
|
</el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
@ -212,7 +211,7 @@
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { inputSearch2 } from "@/api/home/index.js";
|
|
|
|
import { inputSearch2 } from "@/api/home/index.js";
|
|
|
|
import { handleTreeId } from "@/utils/findTreeId.js";
|
|
|
|
import { handleTreeId } from "@/utils/findTreeId.js";
|
|
|
|
import { treeselect } from "@/api/system/dept"; //部门
|
|
|
|
import { treeselect, getsszxBh } from "@/api/system/dept"; //部门
|
|
|
|
import { mapGetters } from "vuex";
|
|
|
|
import { mapGetters } from "vuex";
|
|
|
|
import ColorCell from "@/components/ColorCell";
|
|
|
|
import ColorCell from "@/components/ColorCell";
|
|
|
|
import { exportSearch } from "@/api/home/index.js"; //预警
|
|
|
|
import { exportSearch } from "@/api/home/index.js"; //预警
|
|
|
@ -221,7 +220,7 @@ export default {
|
|
|
|
dicts: ["b_color_type"],
|
|
|
|
dicts: ["b_color_type"],
|
|
|
|
components: { ColorCell },
|
|
|
|
components: { ColorCell },
|
|
|
|
computed: {
|
|
|
|
computed: {
|
|
|
|
...mapGetters(["leftColor", "rightTopColor", "queryParamsIndex"]),
|
|
|
|
...mapGetters(["leftColor", "rightTopColor", "queryParamsXiaoqu"]),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
@ -293,12 +292,12 @@ export default {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
mounted() {
|
|
|
|
this.show_shequ_xiaoqu = this.$auth.hasRoleOr(["admin", "leader"]); //超级管理员 - 领导
|
|
|
|
// this.show_shequ_xiaoqu = this.$auth.hasRoleOr(["admin", "leader"]); //超级管理员 - 领导
|
|
|
|
// this.show_net = this.$auth.authRoleNet("network"); //网格员
|
|
|
|
// this.show_net = this.$auth.authRoleNet("network"); //网格员
|
|
|
|
|
|
|
|
|
|
|
|
// console.log(this.show_shequ_xiaoqu, this.show_net);
|
|
|
|
// console.log(this.show_shequ_xiaoqu, this.show_net);
|
|
|
|
|
|
|
|
|
|
|
|
this.queryParams.shequId = this.queryParamsIndex.shequId;
|
|
|
|
// this.queryParams.shequId = this.queryParamsIndex.shequId;
|
|
|
|
this.getDeptList();
|
|
|
|
this.getDeptList();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
@ -306,12 +305,20 @@ export default {
|
|
|
|
async getDeptList() {
|
|
|
|
async getDeptList() {
|
|
|
|
let result = await treeselect();
|
|
|
|
let result = await treeselect();
|
|
|
|
this.deptList = result.data[0].children;
|
|
|
|
this.deptList = result.data[0].children;
|
|
|
|
console.log(result);
|
|
|
|
|
|
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
|
|
|
if (this.$route.path == "/xiaoqu") {
|
|
|
|
|
|
|
|
this.queryParams.xiaoquId = this.queryParamsXiaoqu.xiaoquId;
|
|
|
|
|
|
|
|
this.changeSelect(this.queryParams.xiaoquId, "netList");
|
|
|
|
|
|
|
|
this.show_shequ_xiaoqu = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 级联筛选
|
|
|
|
* 级联筛选
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
changeSelect(e, key) {
|
|
|
|
async changeSelect(e, key) {
|
|
|
|
|
|
|
|
console.log(key);
|
|
|
|
let list = [];
|
|
|
|
let list = [];
|
|
|
|
let index = this.objList.findIndex((item) => item.key == key);
|
|
|
|
let index = this.objList.findIndex((item) => item.key == key);
|
|
|
|
if (index > -1) {
|
|
|
|
if (index > -1) {
|
|
|
@ -321,8 +328,12 @@ export default {
|
|
|
|
this.queryParams[item.value] = undefined;
|
|
|
|
this.queryParams[item.value] = undefined;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
if (key == "houseList") {
|
|
|
|
if (key == "buildingList" || key == "houseList") {
|
|
|
|
// this.getHouse(e)
|
|
|
|
let res = await getsszxBh({
|
|
|
|
|
|
|
|
deptId: this.queryParams.yuanid,
|
|
|
|
|
|
|
|
buildingId: this.queryParams.buildingId,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
this[key] = res.data;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this[key] = handleTreeId(e, this.deptList);
|
|
|
|
this[key] = handleTreeId(e, this.deptList);
|
|
|
|
}
|
|
|
|
}
|
|
|
|