From 9502c24eee261fa0d0b69ca21f60a72befe160b8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=AE=B8=E5=AE=8F=E6=9D=B0?= <1943105267@qq.com>
Date: Mon, 28 Oct 2024 14:37:57 +0800
Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E9=A1=B5=E9=9D=A2=E9=87=8D?=
=?UTF-8?q?=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/assets/styles/index.scss | 6 ++--
src/components/NavigationBar/index.vue | 7 +++--
src/store/getters.js | 1 +
src/store/modules/xiaoqu.js | 19 +++++++-----
src/views/components/xiaoqu/building.vue | 6 ++--
src/views/components/xiaoqu/house.vue | 5 +++-
src/views/components/xiaoqu/map/index.vue | 1 +
src/views/components/xiaoqu/mapSearchBox.vue | 31 ++++++++++++++++++--
src/views/xiaoqu.vue | 30 +++++++++++++------
9 files changed, 78 insertions(+), 28 deletions(-)
diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss
index 28a0fac..c7a5577 100644
--- a/src/assets/styles/index.scss
+++ b/src/assets/styles/index.scss
@@ -203,9 +203,6 @@ aside {
color: #fff;
}
- .el-badge__content.is-fixed {
- z-index: 10;
- }
.el-dialog {
background: transparent;
}
@@ -249,6 +246,9 @@ aside {
justify-content: center;
}
}
+.el-badge__content.is-fixed {
+ z-index: 500 !important;
+}
.taicang-dialog-small {
width: 850px !important;
.dialog-main {
diff --git a/src/components/NavigationBar/index.vue b/src/components/NavigationBar/index.vue
index 1392d5c..04228df 100644
--- a/src/components/NavigationBar/index.vue
+++ b/src/components/NavigationBar/index.vue
@@ -19,7 +19,7 @@
{{ subTitle }}
-
+
state.xiaoqu.houseItem,
refreshBuild: (state) => state.xiaoqu.refreshBuild,
personNum: (state) => state.xiaoqu.personNum,
+ resetBtn: (state) => state.xiaoqu.reset,
};
export default getters;
diff --git a/src/store/modules/xiaoqu.js b/src/store/modules/xiaoqu.js
index e277922..8987fe8 100644
--- a/src/store/modules/xiaoqu.js
+++ b/src/store/modules/xiaoqu.js
@@ -1,26 +1,25 @@
import { listDept } from "@/api/system/dept.js";
import { listBuilding } from "@/api/taicangpop/building.js";
+
const xiaoqu = {
state: {
//页面接口参数
queryParmas: {},
- mapParmas: {
- sd: false,
- networkName: undefined,
- },
+ mapParmas: {},
netWorkintroduce: {},
panel: {},
houseItem: {},
refreshBuild: 1,
- personNum: {
- zz: 0,
- cz: 0,
- },
+ personNum: {},
+ reset: false,
},
mutations: {
SET_PERSON_NUM: (state, data) => {
state.personNum = data;
},
+ SET_RESET: (state, boole) => {
+ state.reset = boole;
+ },
SET_REFRESH: (state, refresh) => {
state.refreshBuild = refresh;
},
@@ -87,6 +86,10 @@ const xiaoqu = {
isx: undefined,
isj: undefined,
};
+ state.mapParmas = {
+ sd: false,
+ networkName: undefined,
+ };
state.houseItem = {};
state.refreshBuild = 1;
state.personNum = {
diff --git a/src/views/components/xiaoqu/building.vue b/src/views/components/xiaoqu/building.vue
index 5d29109..e600770 100644
--- a/src/views/components/xiaoqu/building.vue
+++ b/src/views/components/xiaoqu/building.vue
@@ -216,7 +216,7 @@ export default {
.building-house-container {
padding-top: 85px;
position: relative;
- //min-width: 135px;
+ min-width: 300px;
// max-width: 700px;
// overflow-x: auto;
// overflow-y: hidden;
@@ -226,8 +226,8 @@ export default {
background-size: cover;
.building-name {
position: absolute;
- left: 100px;
- top: 25px;
+ left: 90px;
+ top: 30px;
min-width: 170px;
height: 32px;
text-align: center;
diff --git a/src/views/components/xiaoqu/house.vue b/src/views/components/xiaoqu/house.vue
index f78f37b..cfa93f1 100644
--- a/src/views/components/xiaoqu/house.vue
+++ b/src/views/components/xiaoqu/house.vue
@@ -437,7 +437,10 @@ export default {
watch: {
houseItem: {
handler(val) {
- if (!val.id) return;
+ if (!val.id) {
+ this.show = false;
+ return;
+ }
this.getPersonList();
},
deep: true,
diff --git a/src/views/components/xiaoqu/map/index.vue b/src/views/components/xiaoqu/map/index.vue
index c46dcf3..99a6f12 100644
--- a/src/views/components/xiaoqu/map/index.vue
+++ b/src/views/components/xiaoqu/map/index.vue
@@ -20,6 +20,7 @@ export default {
computed: {
...mapGetters(["mapParmas"]),
},
+
data() {
const basePathUrl = window.basePathUrl || "";
return {
diff --git a/src/views/components/xiaoqu/mapSearchBox.vue b/src/views/components/xiaoqu/mapSearchBox.vue
index e538405..837871f 100644
--- a/src/views/components/xiaoqu/mapSearchBox.vue
+++ b/src/views/components/xiaoqu/mapSearchBox.vue
@@ -42,7 +42,11 @@
-
+
@@ -51,6 +52,7 @@ import {
building,
house,
} from "@/views/components/index.js";
+import { set } from "nprogress";
export default {
data() {
return {};
@@ -74,17 +76,27 @@ export default {
...mapGetters(["xiaoquIntroduce", "queryParamsXiaoqu"]),
},
created() {
- this.$store.commit("RESET_QUERY"); //重置参数
- let id = this.$route.query.xiaoquId;
- this.$store.commit("CHANGE_QUERY", { xiaoquId: parseInt(id) }); //存储全局参数
- this.$store.commit("SET_QUERY_PARAMS", {
- xiaoquId: parseInt(id),
- });
- this.$store.dispatch("GetYjtotal", {
- xiaoquId: id,
- }); //预警总数
+ this.pageCreated();
},
methods: {
+ pageCreated() {
+ this.$store.commit("RESET_QUERY"); //重置参数
+ let id = this.$route.query.xiaoquId;
+ this.$store.commit("CHANGE_QUERY", { xiaoquId: parseInt(id) }); //存储全局参数
+ this.$store.commit("SET_QUERY_PARAMS", {
+ xiaoquId: parseInt(id),
+ });
+ this.$store.dispatch("GetYjtotal", {
+ xiaoquId: id,
+ }); //预警总数
+ },
+ clickReset() {
+ this.$store.commit("SET_RESET", true);
+ this.pageCreated();
+ setTimeout(() => {
+ this.$store.commit("SET_RESET", false);
+ }, 1500);
+ },
filterTitle() {
return !this.queryParamsXiaoqu.parentid &&
!this.queryParamsXiaoqu.buildingId