处理shequId = 100 问题

master
许宏杰 9 months ago
parent 664fa570ed
commit df0c9cda9f

@ -27,6 +27,7 @@ export function getDept(deptId) {
// 查询部门下拉树结构 // 查询部门下拉树结构
export function treeselect() { export function treeselect() {
return request({ return request({
// "/system/dept/tree",
url: "/system/dept/treeselect", url: "/system/dept/treeselect",
method: "get", method: "get",
}); });

@ -217,7 +217,7 @@ export default {
// dicts: ["b_color_type"], // dicts: ["b_color_type"],
components: { ColorCell }, components: { ColorCell },
computed: { computed: {
...mapGetters(["leftColor", "rightTopColor"]), ...mapGetters(["leftColor", "rightTopColor", "queryParamsIndex"]),
}, },
filters: { filters: {
filterType(target) { filterType(target) {
@ -305,6 +305,8 @@ export default {
}; };
}, },
mounted() { mounted() {
this.queryParams.shequId = this.queryParamsIndex.shequId;
this.getDeptList(); this.getDeptList();
}, },
methods: { methods: {

@ -197,7 +197,7 @@
</template> </template>
<script> <script>
import { getNetWorkId, inputSearch } from "@/api/home/index.js"; import { inputSearch } 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 } from "@/api/system/dept"; //
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
@ -207,7 +207,7 @@ export default {
dicts: ["b_color_type"], dicts: ["b_color_type"],
components: { ColorCell }, components: { ColorCell },
computed: { computed: {
...mapGetters(["leftColor", "rightTopColor"]), ...mapGetters(["leftColor", "rightTopColor", "queryParamsIndex"]),
}, },
data() { data() {
return { return {
@ -278,6 +278,8 @@ export default {
}; };
}, },
mounted() { mounted() {
this.queryParams.shequId = this.queryParamsIndex.shequId;
this.getDeptList(); this.getDeptList();
}, },
methods: { methods: {

@ -219,7 +219,7 @@ export default {
dicts: ["b_color_type"], dicts: ["b_color_type"],
components: { ColorCell }, components: { ColorCell },
computed: { computed: {
...mapGetters(["leftColor", "rightTopColor", "userId"]), ...mapGetters(["leftColor", "rightTopColor", "userId", "queryParamsIndex"]),
}, },
data() { data() {
return { return {
@ -291,6 +291,7 @@ export default {
}; };
}, },
mounted() { mounted() {
this.queryParams.shequId = this.queryParamsIndex.shequId;
this.getDeptList(); this.getDeptList();
}, },
methods: { methods: {

@ -212,7 +212,7 @@ export default {
dicts: ["b_color_type"], dicts: ["b_color_type"],
components: { ColorCell }, components: { ColorCell },
computed: { computed: {
...mapGetters(["leftColor", "rightTopColor"]), ...mapGetters(["leftColor", "rightTopColor", "queryParamsIndex"]),
}, },
data() { data() {
return { return {
@ -284,6 +284,7 @@ export default {
}; };
}, },
mounted() { mounted() {
this.queryParams.shequId = this.queryParamsIndex.shequId;
this.getDeptList(); this.getDeptList();
}, },
methods: { methods: {

@ -73,6 +73,12 @@ export const constantRoutes = [
name: "Index", name: "Index",
meta: { title: "首页", icon: "dashboard", affix: true }, meta: { title: "首页", icon: "dashboard", affix: true },
}, },
{
path: "/xiaoqu",
component: () => import("@/views/xiaoqu"),
name: "xiaoqu",
meta: { title: "小区", icon: "dashboard", affix: true },
},
{ {
path: "/user", path: "/user",
component: Layout, component: Layout,

@ -60,10 +60,7 @@ export default {
getPie() { getPie() {
let queryParams = { let queryParams = {
type: this.tabList[this.currentIndex].type, type: this.tabList[this.currentIndex].type,
shequId: shequId: this.queryParamsIndex.shequId,
this.queryParamsIndex.shequId == 100
? undefined
: this.queryParamsIndex.shequId,
}; };
this.$store.dispatch("GetPie", queryParams).then((res) => { this.$store.dispatch("GetPie", queryParams).then((res) => {
let percent = Math.trunc((this.pie.update / this.pie.total) * 100); let percent = Math.trunc((this.pie.update / this.pie.total) * 100);

@ -90,23 +90,23 @@ export default {
}, },
methods: { methods: {
handleChange(e) { handleChange(e) {
if (!e) return;
this.$store.dispatch("GetXiaoquInfo", e);
this.xiaoqu = "";
this.xiaoquList = this.communityList.filter(
(item) => item.dept_id == e
)[0].children;
if (e == 100) e = undefined;
this.$store.dispatch("GetYjtotal", { this.$store.dispatch("GetYjtotal", {
shequId: e == 100 ? undefined : e, shequId: e,
}); });
this.$store.commit("SET_QUERY_PARAMS", { shequId: e }); this.$store.commit("SET_QUERY_PARAMS", { shequId: e });
this.$store.dispatch("GetXiaoquInfo", e);
this.$store.dispatch("getThreeCell", { this.$store.dispatch("getThreeCell", {
shequId: e == 100 ? undefined : e, shequId: e,
}); });
this.$store.dispatch("GetcolorList", { this.$store.dispatch("GetcolorList", {
shequId: e == 100 ? undefined : e, shequId: e,
}); });
this.xiaoqu = "";
this.xiaoquList = this.communityList.filter(
(item) => item.dept_id == e
)[0].children;
}, },
getCommunity() { getCommunity() {

@ -0,0 +1,14 @@
<template>
<div class="pc-container"></div>
</template>
<script>
export default {};
</script>
<style lang="scss" scoped>
.pc-container {
height: 100%;
border: 1px solid red;
}
</style>
Loading…
Cancel
Save