Browse Source

地图右侧网格列表,网格详情调试,事件分析统计与数量更换接口

master
mk 2 years ago
parent
commit
809ea122ab
  1. 6
      public/json/grid-geo.json
  2. 24
      src/api/screen-content-center.js
  3. 2
      src/api/screen-content-right.js
  4. 17
      src/store/modules/dialog.js
  5. 2
      src/views/next/dialog-module/event-list/index.vue
  6. 217
      src/views/next/dialog-module/grid-info-dialog/index.vue
  7. 5
      src/views/next/index.vue
  8. 112
      src/views/next/screen-content-map/index.vue
  9. 2
      src/views/next/screen-content-map/map-dialog/grid-info-dialog.vue
  10. 5
      src/views/next/screen-content-right/human-room-analysis/index.vue

6
public/json/grid-geo.json

@ -1586,10 +1586,10 @@
"type": "Feature",
"properties": {
"id": "",
"gridId": "",
"gridId": "popipupyptprplp17",
"parentId": "1326111149745274881",
"productId": "1534134336596434946",
"title": "锦祥园社区第网格",
"title": "锦祥园社区第网格",
"center": {
"lng": 116.425272,
"lat": 36.263102
@ -1877,7 +1877,7 @@
"type": "Feature",
"properties": {
"id": "",
"gridId": "popipupyptprplp11",
"gridId": "popipupyptprplp16",
"parentId": "1252828788241235970",
"productId": "1534557671717830658",
"title": "锦祥园社区第一网格",

24
src/api/screen-content-center.js

@ -19,7 +19,6 @@ export function getCommunityGeoPolygon () {
method: 'GET'
})
}
// 获取geoJson格式社区线
export function getCommunityGeoLine () {
return request({
@ -29,7 +28,6 @@ export function getCommunityGeoLine () {
method: 'GET'
})
}
// 获取geoJson格式网格区划
export function getGridGeoPolygon () {
return request({
@ -71,6 +69,13 @@ export function getGridDetail ({ gridId }) {
method: 'GET'
})
}
export function getGridDetailS (params) {
return request({
url: `/screen/screengrid/detailByDeptId`,
method: 'GET',
params
})
}
// 以城找人
export function getCityFilterResi (params) {
return request({
@ -141,3 +146,18 @@ export function customDetail (id) {
method: 'GET',
})
}
export function getGrid (id) {
return request({
baseURL:intranetApiUrl,
url: `/sys/dept/screenJinShui/sublist/${id}`,
method: 'GET',
})
}
export function getPageGridDataToal (params) {
return request({
baseURL:intranetApiUrl,
url: `/events/item/screenJinShui/issueEventTotal`,
method: 'GET',
params
})
}

2
src/api/screen-content-right.js

@ -76,7 +76,7 @@ export function getHourseClassifyStatistics () {
// 事件分析-事件分析统计
export function getEventsAnalysisStatistics () {
return request({
url: '/screen/eventClassCensus/census',
url: '/events/issue/screenJinShui/census',
method: 'GET'
})
}

17
src/store/modules/dialog.js

@ -20,7 +20,8 @@ export default {
conflictMediationVisible: false, // 大弹窗-矛盾调解
directCommunicationVisible: false, // 小弹窗-一键直通
archiveQueryVisible: false, // 小弹窗-档案查询
oneClickServiceVisible: false // 小弹窗-一键服务除了一键直通、档案查询其他的模块
oneClickServiceVisible: false, // 小弹窗-一键服务除了一键直通、档案查询其他的模块
gridInfoDialog:false, // 小弹窗-网格信息弹窗
},
mutations: {
set_buildLeaderAttachVisible (state, visible) {
@ -85,6 +86,9 @@ export default {
},
set_oneClickServiceVisible (state, visible) {
state.oneClickServiceVisible = visible
},
set_gridInfoDialog(state, visible) {
state.gridInfoDialog = visible
}
},
actions: {
@ -151,6 +155,10 @@ export default {
SET_ONECLICKSERVICEVISIBLE (context, visible) {
context.commit('set_oneClickServiceVisible', visible)
},
SET_GRIDINFODIALOG(context, visible) {
context.commit('set_gridInfoDialog', visible)
},
// 确保当前只能显示最近点击的弹窗
showGlobalDialog (context, type) {
context.commit('set_buildLeaderAttachVisible', false)
@ -166,6 +174,8 @@ export default {
context.commit('set_directCommunicationVisible', false)
context.commit('set_archiveQueryVisible', false)
context.commit('set_oneClickServiceVisible', false)
context.commit('set_gridInfoDialog', false)
if (type === 'buildLeaderAttach') {
context.commit('set_buildLeaderAttachVisible', true)
} else if (type === 'communityDetail') {
@ -192,6 +202,8 @@ export default {
context.commit('set_archiveQueryVisible', true)
} else if (type === 'oneClickService') {
context.commit('set_oneClickServiceVisible', true)
} else if (type === 'oneClickService') {
context.commit('gridInfoDialog', true)
}
}
},
@ -216,6 +228,7 @@ export default {
conflictMediationVisible: state => state.conflictMediationVisible,
directCommunicationVisible: state => state.directCommunicationVisible,
archiveQueryVisible: state => state.archiveQueryVisible,
oneClickServiceVisible: state => state.oneClickServiceVisible
oneClickServiceVisible: state => state.oneClickServiceVisible,
gridInfoDialog:state => state.gridInfoDialog,
}
}

2
src/views/next/dialog-module/event-list/index.vue

@ -155,7 +155,7 @@ export default {
this.totalCount = res.total
this.eventList.forEach((item, index) => {
this.dataList.push(
[this.pageSize * (this.pageNo - 1) + index + 1, '玫瑰苑社区第一网格', item.issueContent, item.createdTime, '城市管理', item.nickName, '待回应', '']
[this.pageSize * (this.pageNo - 1) + index + 1, item.allDeptNames, item.issueContent, item.createdTime, item.categoryName, item.nickName,item.issueStatus, '']
)
})
}).catch(err => {

217
src/views/next/dialog-module/grid-info-dialog/index.vue

@ -0,0 +1,217 @@
<template>
<div class="event-list-modal" v-show="gridInfoDialog" @click="set_gridInfoDialog(false)">
<div class="grid-info-dialog">
<div class="title-container">
<div class="title-icon">
<img src="@/assets/images/grid-icon.png" alt="" />
</div>
<div class="title">网格详情</div>
</div>
<div class="detail-content">
<div class="content-item">
<div class="label">网格名称</div>
<div class="content">{{ gridInfo.name || '--' }}</div>
</div>
<div class="content-item">
<div class="label">网格长</div>
<div class="content">{{ gridInfo.leader || '--' }}</div>
</div>
<div class="content-item">
<div class="label">性别</div>
<div class="content">{{ gridInfo.sex || '--' }}</div>
</div>
<div class="content-item">
<div class="label">联系电话</div>
<div class="content">{{ gridInfo.mobile || '--' }}</div>
</div>
<div class="content-item">
<div class="label">家庭住址</div>
<div class="content">{{ gridInfo.address || '--' }}</div>
</div>
<div class="content-item">
<div class="label">房屋信息</div>
<div class="content">
<span class="look-detail" @click="lookDetail" v-show="productId">点击查看</span>
</div>
</div>
</div>
<!-- <div class="trigger"></div> -->
</div>
</div>
</template>
<script>
import Bus from 'utils/eventBus'
import { getGridDetailS, getGridGeoPolygon } from 'api/screen-content-center'
import { mapGetters, mapActions } from 'vuex'
export default {
name: 'grid-info-dialog',
data() {
return {
gridInfo: { name: null, leader: null, sex: null, mobile: null, address: null },
gridId: '',
productId:''
}
},
created() {
Bus.$off('emitgridInfoDialogData', this.emitgridInfoDialogData.bind(this))
Bus.$on('emitgridInfoDialogData', this.emitgridInfoDialogData.bind(this))
},
computed: {
...mapGetters(['gridInfoDialog'])
},
methods: {
...mapActions({
set_gridInfoDialog: "SET_GRIDINFODIALOG",
}),
getGridGeoPolygon() {
return new Promise((resolve, reject) => {
getGridGeoPolygon().then(data => {
resolve(data)
})
})
},
//
async emitgridInfoDialogData({ gridId }) {
this.gridId = gridId || ''
const params = {
deptId: gridId
}
let { data } = await getGridDetailS(params)
if (data) {
console.log(data.id);
this.gridInfo = data
let {features} = await this.getGridGeoPolygon()
console.log(features);
this.productId = features.filter(item => item.properties.gridId == data.id)[0].properties.productId || ''
} else {
console.log('获取网格详情失败');
}
// getGridDetailS(params).then(({ data: res }) => {
// if (res) {
// this.gridInfo = res
// }
// }).catch(err => {
// console.error('', err)
// })
},
//
lookDetail() {
Bus.$emit('showHourseInfoDialog', { gridId: this.productId })
}
}
}
</script>
<style lang="scss" scoped>
.event-list-modal {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
display: flex;
align-items: center;
justify-content: center;
z-index: 150;
.grid-info-dialog {
width: 408px;
height: 288px;
background: url("~@/assets/images/grid-dialog-bg.png") no-repeat;
background-size: 100% 100%;
position: relative;
.title-container {
width: 100%;
height: 48px;
display: flex;
align-items: flex-end;
box-sizing: border-box;
padding: 18px 0 0 26px;
.title-icon {
width: 20px;
height: 20px;
}
.title {
font-size: 18px;
font-weight: 900;
background: linear-gradient(0deg, #85e3f9 0%, #ffffff 60%, #ffffff 100%);
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
margin-left: 3px;
}
}
.detail-content {
width: 100%;
height: calc(100% - 30px - 18px - 30px);
box-sizing: border-box;
padding: 15px 30px 0 50px;
overflow-y: auto;
.content-item {
width: 100%;
display: flex;
.label {
width: 80px;
font-size: 16px;
font-family: "PingFang Regular";
font-weight: 900;
color: #b5d9ff;
line-height: 32px;
opacity: 0.76;
display: inline-block;
text-align: justify;
text-justify: distribute-all-lines;
text-align-last: justify;
position: relative;
margin-right: 20px;
&::after {
content: ":";
color: #b5d9ff;
position: absolute;
top: -1px;
right: -6px;
}
}
.content {
width: calc(100% - 100px);
font-size: 16px;
font-family: "PingFang Regular";
font-weight: 900;
color: #fff;
line-height: 26px;
padding: 3px 0;
.look-detail {
color: #ffd314;
cursor: pointer;
}
}
}
}
.trigger {
width: 0px;
height: 0px;
border: 10px solid transparent;
border-top: 10px solid #0885f1;
position: absolute;
bottom: -11px;
left: 30px;
z-index: 100;
}
}
}
</style>

5
src/views/next/index.vue

@ -34,6 +34,7 @@
<DirectCommunication />
<ArchiveQuery />
<OneClickService />
<GridInfoDialog/>
</div>
</template>
@ -65,6 +66,7 @@ import ConflictMediation from './dialog-module/conflict-mediation'
import DirectCommunication from './dialog-module/direct-communication'
import ArchiveQuery from './dialog-module/archive-query'
import OneClickService from './dialog-module/one-click-service'
import GridInfoDialog from './dialog-module/grid-info-dialog'
let width = 0
let height = 0
export default {
@ -103,7 +105,8 @@ export default {
ConflictMediation,
DirectCommunication,
ArchiveQuery,
OneClickService
OneClickService,
GridInfoDialog
},
beforeRouteEnter (to, from, next) {
if (window.location.search) {

112
src/views/next/screen-content-map/index.vue

@ -24,19 +24,14 @@
<div class="map-bottom-decoration"></div>
<div class="map-tab-list" v-if="mapLevel == 'grid' && mapTabList.length != 0">
<div
:class="['tab-item']"
v-for="(item, index) in mapTabList"
:key="index"
@click="chooseTab(item)"
>
<div :class="['tab-item']" v-for="(item, index) in mapTabList" :key="index" @click="chooseTab(item)">
<!-- <div class="icon">
<img
:src="currentTab === item.label ? item.selectIcon : item.icon"
alt="图标"
/>
</div> -->
{{ item.label }}
{{ item.name }}
</div>
</div>
@ -90,7 +85,7 @@
<script>
import AMapLocaClass from './AMapLocaClass'
import { getCommunityDistrict, getCommunityGeoPolygon, getCommunityGeoLine, getGridGeoPolygon, getMapStatistics } from 'api/screen-content-center'
import { getCommunityDistrict, getCommunityGeoPolygon, getCommunityGeoLine, getGridGeoPolygon, getMapStatistics, getGrid, getPageGridDataToal } from 'api/screen-content-center'
import { getCommunityDetail } from 'api/screen-content-left'
import { mapGetters, mapActions } from 'vuex'
import Bus from 'utils/eventBus'
@ -119,18 +114,12 @@ export default {
statisticsList: [
{ label: '居民', value: 0 },
{ label: '房屋', value: 0 },
{ label: '社区/管区', value: 0 },
{ label: '网格', value: 0 },
{ label: '议题', value: 0 },
{ label: '项目', value: 0 },
{ label: '网格员', value: 0 },
{ label: '党员', value: 0 }
],
mapTabList: [
// { icon: require('@/assets/images/red-cross-blue-icon.png'), label: '', selectIcon: require('@/assets/images/red-cross-yellow-icon.png') },
// { label: '' },
// { label: '' },
// { label: '' },
// { label: '' }
],
mapTabList: [],
currentTab: '',
searchOptionList: [
{ label: '以房找人', value: '1' },
@ -179,7 +168,8 @@ export default {
...mapActions({
set_mapLevel: 'SET_MAPLEVEL',
set_communityId: 'SET_COMMUNITYID',
showGlobalDialog: 'showGlobalDialog'
showGlobalDialog: 'showGlobalDialog',
set_gridInfoDialog: "SET_GRIDINFODIALOG",
}),
handelClickLook(houseId) {
this.houseId = houseId
@ -191,12 +181,13 @@ export default {
},
handelCLickBack() {
this.mapBack = false
this.initMap()
this.set_mapLevel('community')
this.set_communityId('111111111111111c')
this.set_communityId('')
Bus.$emit('drawCommunityPolygon')
},
initMap() {
this.getMapStatistics()
this.getPageGridDataToal()
/* eslint-disable */
Promise.all([
this.getCommunityDistrict(),
@ -219,6 +210,29 @@ export default {
this.show3D = false
this.initMap()
},
//
getPageGridDataToal() {
const currentDate = new Date();
const year = currentDate.getFullYear();
const month = (currentDate.getMonth() + 1).toString().padStart(2, '0'); // 01
const day = currentDate.getDate().toString().padStart(2, '0');
const formattedDate = `${year}-${month}-${day}`;
let parm = {
page: 1,
limit: 10,
category: '1',
startTime: '2023-12-26',
endTime: formattedDate,
}
getPageGridDataToal({ ...parm }).then(({ data: res }) => {
//
const { issuseCount, itemCount } = res
numAnimation(this.statisticsList[2].value, issuseCount, this.statisticsList[2], 'value')
numAnimation(this.statisticsList[3].value, itemCount, this.statisticsList[3], 'value')
}).catch(err => {
console.log(err);
})
},
//
getMapStatistics() {
@ -227,12 +241,12 @@ export default {
id: this.streetId
}
getMapStatistics(params).then(({ data: res }) => {
console.log('获取地图中心上方统计数', res)
console.log('获取地图中心上方统计数2', res)
const { resiNum, houseNum, communityNum, gridNum, gridUserNum, partyMemberNum } = res
numAnimation(this.statisticsList[0].value, localStorage.getItem('resiCount'), this.statisticsList[0], 'value')
numAnimation(this.statisticsList[0].value, resiNum, this.statisticsList[0], 'value')
numAnimation(this.statisticsList[1].value, houseNum, this.statisticsList[1], 'value')
numAnimation(this.statisticsList[2].value, communityNum, this.statisticsList[2], 'value')
numAnimation(this.statisticsList[3].value, gridNum, this.statisticsList[3], 'value')
// numAnimation(this.statisticsList[2].value, communityNum, this.statisticsList[2], 'value')
// numAnimation(this.statisticsList[3].value, gridNum, this.statisticsList[3], 'value')
numAnimation(this.statisticsList[4].value, gridUserNum, this.statisticsList[4], 'value')
numAnimation(this.statisticsList[5].value, partyMemberNum, this.statisticsList[5], 'value')
}).catch(err => {
@ -243,12 +257,13 @@ export default {
id: this.communityId
}
getCommunityDetail(params).then(({ data: res }) => {
console.log('获取地图中心上方统计数', res)
console.log('获取地图中心上方统计数1', res)
// resiNum
const { resiNum, houseNum, gridNum, gridUserNum, partyMemberNum } = res
numAnimation(this.statisticsList[0].value, resiNum, this.statisticsList[0], 'value')
numAnimation(this.statisticsList[1].value, houseNum, this.statisticsList[1], 'value')
numAnimation(this.statisticsList[2].value, 1, this.statisticsList[2], 'value')
numAnimation(this.statisticsList[3].value, gridNum, this.statisticsList[3], 'value')
// numAnimation(this.statisticsList[2].value, 1, this.statisticsList[2], 'value')
// numAnimation(this.statisticsList[3].value, gridNum, this.statisticsList[3], 'value')
numAnimation(this.statisticsList[4].value, gridUserNum, this.statisticsList[4], 'value')
numAnimation(this.statisticsList[5].value, partyMemberNum, this.statisticsList[5], 'value')
}).catch(err => {
@ -264,11 +279,19 @@ export default {
//
drowDownToGrid({ id, communityId, center }) {
this.mapBack = true
this.getGridList(id)
this.set_mapLevel('grid')
this.set_communityId(communityId)
this.getMapStatistics()
Bus.$emit('drawGridPolygon', { communityId: id, center: center })
},
getGridList(id) {
getGrid(id).then(res => {
this.mapTabList = res.data
}).catch(err => {
console.error('获取网格列表', err)
})
},
//
threeSearch() {
this.collapse = !this.collapse
@ -316,20 +339,24 @@ export default {
}
},
// tab
chooseTab(tab) {
if (this.currentTab && (this.currentTab === tab.label)) {
this.currentTab = ''
} else {
this.currentTab = tab.label
}
async chooseTab(item) {
// if (this.currentTab && (this.currentTab === tab.label)) {
// this.currentTab = ''
// } else {
// this.currentTab = tab.label
// }
if (this.currentTab === '红十字会') {
Bus.$emit('drawRedCrossMarker')
} else if (this.currentTab === '志愿者') {
Bus.$emit('drawVolunteerMarker')
} else {
Bus.$emit('clearMarker')
}
// if (this.currentTab === '') {
// Bus.$emit('drawRedCrossMarker')
// } else if (this.currentTab === '') {
// Bus.$emit('drawVolunteerMarker')
// } else {
// Bus.$emit('clearMarker')
// }
this.set_gridInfoDialog(true)
Bus.$emit('emitgridInfoDialogData', { gridId: item.id || '1534561053840998402' })
},
//
getCommunityDistrict() {
@ -608,8 +635,9 @@ img {
bottom: 50%;
z-index: 20;
color: #fff;
transform: translate(0,50%);
.tab-item {
width: 115px;
width: fit-content;
height: 36px;
background: rgba(8, 31, 57, 0.61);
border-radius: 2px;
@ -619,6 +647,7 @@ img {
// padding-left: 13px;
cursor: pointer;
justify-content: center;
// .icon {
// width: 20px;
// height: 20px;
@ -627,6 +656,7 @@ img {
color: #60d6e8 !important;
background: linear-gradient(to left, rgba(255, 255, 255, 0), #073277, rgba(255, 255, 255, 0));
}
.label {
font-size: 16px;
font-family: "PingFang Regular";

2
src/views/next/screen-content-map/map-dialog/grid-info-dialog.vue

@ -71,6 +71,8 @@ export default {
},
//
lookDetail () {
console.log('地图',this.gridId );
Bus.$emit('showHourseInfoDialog', { gridId: this.productId })
}
}

5
src/views/next/screen-content-right/human-room-analysis/index.vue

@ -71,9 +71,10 @@ export default {
watch: {
communityId: {
handler: function (val) {
console.log(val,'在这里变了');
this.getAreaHumanClassifyList()
this.getAreaRoomClassifyList()
}
},
}
},
methods: {
@ -403,14 +404,12 @@ export default {
unemployed: 'IS_UNEMPLOYED'
}
// const { cj, db, dbh, ensureHouse, mb, sd, special, unemployed, count } = res
const data = []
for (const key in dict) {
data.push({ name: dict[key], value: parseFloat(res[key]) || 0, type: dictType[key] })
}
setTimeout(() => {
this.humanClassifyChart.hideLoading()
localStorage.setItem('resiCount',res.count)
this.humanClassifyChart.setOption(getHumanTypeChartOption({ data, count: res.count }))
this.humanClassifyChart.on('click', e => {
this.showGlobalDialog('')

Loading…
Cancel
Save