四个搜索处理

master
许宏杰 8 months ago
parent cbbc44f968
commit 55b3c74b68

@ -221,7 +221,7 @@ aside {
margin-top: 6.5vh !important;
}
.dialog-main {
min-height: 700px;
min-height: 650px;
display: flex;
flex-direction: column;
background: #031c3c;

@ -1,6 +1,6 @@
<template>
<div class="search-container">
<div class="option-rows">
<div class="option-rows" v-if="show_shequ_xiaoqu">
<el-select
@change="changeSelect($event, 'xiaoquList')"
v-model="queryParams.shequId"
@ -67,18 +67,18 @@
>
<el-option
v-for="item in buildingList"
:key="item.id"
:label="item.label"
:value="item.id"
:key="item.buildingId"
:label="item.buildingName"
:value="item.buildingId"
>
</el-option>
</el-select>
<el-select v-model="queryParams.houseid" placeholder="选择住户" clearable>
<el-option
v-for="item in houseList"
:key="item.id"
:label="item.label"
:value="item.id"
:key="item.houseId"
:label="item.houseName"
:value="item.houseId"
>
</el-option>
</el-select>
@ -220,7 +220,7 @@
<script>
import { getLog, exportLog } from "@/api/home/index.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 ColorCell from "@/components/ColorCell";
@ -228,7 +228,7 @@ export default {
// dicts: ["b_color_type"],
components: { ColorCell },
computed: {
...mapGetters(["leftColor", "rightTopColor", "queryParamsIndex"]),
...mapGetters(["leftColor", "rightTopColor", "queryParamsXiaoqu"]),
},
filters: {
filterType(target) {
@ -244,7 +244,7 @@ export default {
data() {
return {
loading: true,
show_shequ_xiaoqu: true,
currentIndex: 0,
credentialnoType: 0,
tabList: [
@ -315,8 +315,8 @@ export default {
],
};
},
mounted() {
this.queryParams.shequId = this.queryParamsIndex.shequId;
created() {
// this.queryParams.shequId = this.queryParamsIndex.shequId;
this.getDeptList();
},
@ -334,11 +334,18 @@ export default {
async getDeptList() {
let result = await treeselect();
this.deptList = result.data[0].children;
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) {
let list = [];
let index = this.objList.findIndex((item) => item.key == key);
if (index > -1) {
@ -347,7 +354,15 @@ export default {
list.map((item) => {
this.queryParams[item.value] = undefined;
});
if (key == "buildingList" || key == "houseList") {
let res = await getsszxBh({
deptId: this.queryParams.yuanid,
buildingId: this.queryParams.buildingId,
});
this[key] = res.data;
} else {
this[key] = handleTreeId(e, this.deptList);
}
},
/**

@ -224,7 +224,7 @@ export default {
},
data() {
return {
show_shequ_xiaoqu: false,
show_shequ_xiaoqu: true,
show_net: false,
loading: true,
currentIndex: 0,
@ -291,7 +291,7 @@ export default {
],
};
},
mounted() {
created() {
// this.show_shequ_xiaoqu = this.$auth.hasRoleOr(["admin", "leader"]); // -
// this.show_net = this.$auth.authRoleNet("network"); //

@ -1,6 +1,6 @@
<template>
<div class="search-container">
<div class="option-rows">
<div class="option-rows" v-if="show_shequ_xiaoqu">
<el-select
@change="changeSelect($event, 'xiaoquList')"
v-model="queryParams.shequId"
@ -67,18 +67,18 @@
>
<el-option
v-for="item in buildingList"
:key="item.id"
:label="item.label"
:value="item.id"
:key="item.buildingId"
:label="item.buildingName"
:value="item.buildingId"
>
</el-option>
</el-select>
<el-select v-model="queryParams.houseid" placeholder="选择住户" clearable>
<el-option
v-for="item in houseList"
:key="item.id"
:label="item.label"
:value="item.id"
:key="item.houseId"
:label="item.houseName"
:value="item.houseId"
>
</el-option>
</el-select>
@ -223,19 +223,24 @@ import {
} from "@/api/home/index.js"; //
import { addPerson } from "@/api/taicangpop/person";
import { handleTreeId } from "@/utils/findTreeId.js";
import { treeselect } from "@/api/system/dept"; //
import { treeselect, getsszxBh } from "@/api/system/dept"; //
import { mapGetters } from "vuex";
import ColorCell from "@/components/ColorCell";
export default {
dicts: ["b_color_type"],
components: { ColorCell },
computed: {
...mapGetters(["leftColor", "rightTopColor", "userId", "queryParamsIndex"]),
...mapGetters([
"leftColor",
"rightTopColor",
"userId",
"queryParamsXiaoqu",
]),
},
data() {
return {
loading: true,
show_shequ_xiaoqu: true,
currentIndex: 0,
credentialnoType: 0,
// tabList: [
@ -301,8 +306,8 @@ export default {
],
};
},
mounted() {
this.queryParams.shequId = this.queryParamsIndex.shequId;
created() {
// this.queryParams.shequId = this.queryParamsIndex.shequId;
this.getDeptList();
},
methods: {
@ -340,12 +345,18 @@ export default {
async getDeptList() {
let result = await treeselect();
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) {
let list = [];
let index = this.objList.findIndex((item) => item.key == key);
if (index > -1) {
@ -354,7 +365,15 @@ export default {
list.map((item) => {
this.queryParams[item.value] = undefined;
});
if (key == "buildingList" || key == "houseList") {
let res = await getsszxBh({
deptId: this.queryParams.yuanid,
buildingId: this.queryParams.buildingId,
});
this[key] = res.data;
} else {
this[key] = handleTreeId(e, this.deptList);
}
},
/**

@ -1,6 +1,6 @@
<template>
<div class="search-container">
<div class="option-rows">
<div class="option-rows" v-if="show_shequ_xiaoqu">
<el-select
@change="changeSelect($event, 'xiaoquList')"
v-model="queryParams.shequId"
@ -67,18 +67,18 @@
>
<el-option
v-for="item in buildingList"
:key="item.id"
:label="item.label"
:value="item.id"
:key="item.buildingId"
:label="item.buildingName"
:value="item.buildingId"
>
</el-option>
</el-select>
<el-select v-model="queryParams.houseid" placeholder="选择住户" clearable>
<el-option
v-for="item in houseList"
:key="item.id"
:label="item.label"
:value="item.id"
:key="item.houseId"
:label="item.houseName"
:value="item.houseId"
>
</el-option>
</el-select>
@ -215,7 +215,7 @@
<script>
import { getWarningList } from "@/api/home/index.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 ColorCell from "@/components/ColorCell";
import { exportyujing } from "@/api/home/index.js"; //
@ -223,12 +223,12 @@ export default {
dicts: ["b_color_type"],
components: { ColorCell },
computed: {
...mapGetters(["leftColor", "rightTopColor", "queryParamsIndex"]),
...mapGetters(["leftColor", "rightTopColor", "queryParamsXiaoqu"]),
},
data() {
return {
loading: true,
show_shequ_xiaoqu: true,
currentIndex: 0,
credentialnoType: 0,
tabList: [
@ -294,8 +294,7 @@ export default {
],
};
},
mounted() {
this.queryParams.shequId = this.queryParamsIndex.shequId;
created() {
this.getDeptList();
},
methods: {
@ -304,11 +303,18 @@ export default {
let result = await treeselect();
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) {
let list = [];
let index = this.objList.findIndex((item) => item.key == key);
if (index > -1) {
@ -317,7 +323,15 @@ export default {
list.map((item) => {
this.queryParams[item.value] = undefined;
});
if (key == "buildingList" || key == "houseList") {
let res = await getsszxBh({
deptId: this.queryParams.yuanid,
buildingId: this.queryParams.buildingId,
});
this[key] = res.data;
} else {
this[key] = handleTreeId(e, this.deptList);
}
},
/**

Loading…
Cancel
Save