From 07f02ccd840bdd85fcba37e4e774987e41e2df16 Mon Sep 17 00:00:00 2001
From: guanqb <18720758508@163.com>
Date: Fri, 03 Feb 2023 16:26:43 +0800
Subject: [PATCH] 社区展示登录派出所默认小区数据
---
src/api/dept/index.js | 11 +++++++++++
src/views/house/index.vue | 25 ++++++++++++++++++-------
2 files changed, 29 insertions(+), 7 deletions(-)
diff --git a/src/api/dept/index.js b/src/api/dept/index.js
index a7ed8be..89e4cb7 100644
--- a/src/api/dept/index.js
+++ b/src/api/dept/index.js
@@ -196,6 +196,17 @@
})
}
+// 派出所默认展示小区
+export const getPoliceSationVillageInfo = (deptId) => {
+ return request({
+ url: `/api/villageInfo/villageInfo/details`,
+ method: 'get',
+ params: {
+ deptId
+ }
+ })
+}
+
// 户籍人口、重点人口信息
export const getVillagePersonStatisticInfoByBuildId = (buildId) => {
return request({
diff --git a/src/views/house/index.vue b/src/views/house/index.vue
index ea0754b..7681135 100644
--- a/src/views/house/index.vue
+++ b/src/views/house/index.vue
@@ -661,7 +661,7 @@
getSearchExtensively, getHouses, getSearchExtensivelyBgAoiDeepdata,
getPoliceStationLazyTree, getPoliceStationTrees, getVillageInfo,
getVillagePersonStatisticInfoByBuildId, getVillagePersonInfo,
- getResidentialQuartersInfo, getAoiByBgId
+ getResidentialQuartersInfo, getAoiByBgId, getPoliceSationVillageInfo
} from '@/api/dept/index.js'
import { getAlarmList } from "@/api/home/index.js"
@@ -768,6 +768,8 @@
created () {
+
+
// 首页跳转社区包含参数
if (this.$route.query.id) {
this.getVillageInfo(this.$route.query.id)
@@ -778,11 +780,21 @@
// 使用首页传过来的小区id获取停车场出入口商场和 小区名称类型地址数据
this.getSearchExtensivelyBgAoiDeepdata('ebf48ecaa1fd436fa3d40c4600aa051f', '361100', this.$route.query.id, '1|3')
} else {
- //直接进入社区 默认获取万达广场的责任民警及所属辖区
- this.getVillageInfo('644A2C4049024A3C8C76D96EEE4366FD')
- // 大搜之搜索面详细数据(停车场出入口商场)--默认万达华府
- this.getSearchExtensivelyBgAoiDeepdata('ebf48ecaa1fd436fa3d40c4600aa051f', '361100', '644A2C4049024A3C8C76D96EEE4366FD', '1|3')
- this.getResidentialQuartersInfo('6E513C5E5D1611EAB6183C15FB00027B', '361102')
+ console.log(this.userInfo.dept_id, 56789)
+ // 获得对应派出所默认展示小区
+ getPoliceSationVillageInfo(this.userInfo.dept_id).then(res => {
+ let villageId = res.data.data.aoiId
+ console.log(9999999, villageId)
+ //直接进入社区 默认获取万达广场的责任民警及所属辖区
+ // this.getVillageInfo('644A2C4049024A3C8C76D96EEE4366FD')
+ this.getVillageInfo(villageId)
+ // 大搜之搜索面详细数据(停车场出入口商场)--默认万达华府
+ // this.getSearchExtensivelyBgAoiDeepdata('ebf48ecaa1fd436fa3d40c4600aa051f', '361100', '644A2C4049024A3C8C76D96EEE4366FD', '1|3')
+ this.getSearchExtensivelyBgAoiDeepdata('ebf48ecaa1fd436fa3d40c4600aa051f', '361100', villageId, '1|3')
+ // this.getResidentialQuartersInfo('6E513C5E5D1611EAB6183C15FB00027B', '361102')
+ this.getResidentialQuartersInfo(villageId, '361102')
+ })
+
}
window.addEventListener('resize', this.setTableHeight)
@@ -790,7 +802,6 @@
mounted () {
this.$parent.$parent.resize('400px', true)
- console.log(this.userInfo.dept_id, 56789)
this.$nextTick(() => {
this.searchHouse = this.$route.query.searchName
--
Gitblit v1.9.3