Browse Source

更换房屋统计接口与居民统计接口

master
mk 1 year ago
parent
commit
c7373a5f66
  1. 23
      public/json/community-geo.json
  2. 10
      src/api/screen-content-right.js
  3. 2
      src/views/next/screen-content-left/red-party-build/org-structure.vue
  4. 55
      src/views/next/screen-content-map/index.vue
  5. 79
      src/views/next/screen-content-right/human-room-analysis/index.vue
  6. 2
      vue.config.js

23
public/json/community-geo.json

@ -6,6 +6,7 @@
"id": "1326111460941660161", "id": "1326111460941660161",
"communityId": "", "communityId": "",
"title": "龙桥村", "title": "龙桥村",
"ids":"",
"center": [ "center": [
116.365309, 116.365309,
36.292286 36.292286
@ -348,6 +349,7 @@
"properties": { "properties": {
"id": "1326111578096959490", "id": "1326111578096959490",
"communityId": "", "communityId": "",
"ids":"",
"title": "东孙庄村", "title": "东孙庄村",
"center": [ "center": [
116.364554, 116.364554,
@ -535,6 +537,7 @@
"properties": { "properties": {
"id": "1326111695084486657", "id": "1326111695084486657",
"communityId": "111111111111111f", "communityId": "111111111111111f",
"ids":"1532271777947037697",
"title": "西子顺村", "title": "西子顺村",
"center": [ "center": [
116.36317, 116.36317,
@ -1002,6 +1005,7 @@
"properties": { "properties": {
"id": "1326111784758706178", "id": "1326111784758706178",
"communityId": "", "communityId": "",
"ids":"1532271777947037697",
"title": "宋子顺村", "title": "宋子顺村",
"center": [ "center": [
116.372955, 116.372955,
@ -1540,6 +1544,7 @@
"properties": { "properties": {
"id": "1326112068184604674", "id": "1326112068184604674",
"communityId": "", "communityId": "",
"ids":"1532271777947037697",
"title": "大李子顺村", "title": "大李子顺村",
"center": [ "center": [
116.378919, 116.378919,
@ -1799,6 +1804,7 @@
"properties": { "properties": {
"id": "1326112148413251585", "id": "1326112148413251585",
"communityId": "", "communityId": "",
"ids":"",
"title": "毕海洋村", "title": "毕海洋村",
"center": [ "center": [
116.387306, 116.387306,
@ -2202,6 +2208,7 @@
"properties": { "properties": {
"id": "1326112288473645057", "id": "1326112288473645057",
"communityId": "", "communityId": "",
"ids":"1532271777947037697",
"title": "东子顺南村", "title": "东子顺南村",
"center": [ "center": [
116.401192, 116.401192,
@ -2541,6 +2548,7 @@
"properties": { "properties": {
"id": "1326112361689415682", "id": "1326112361689415682",
"communityId": "", "communityId": "",
"ids":"1532271777947037697",
"title": "东子顺北村", "title": "东子顺北村",
"center": [ "center": [
116.400912, 116.400912,
@ -2772,6 +2780,7 @@
"properties": { "properties": {
"id": "1326110808777719809", "id": "1326110808777719809",
"communityId": "111111111111111e", "communityId": "111111111111111e",
"ids":"1532271719425134593",
"title": "中土楼村", "title": "中土楼村",
"center": [ "center": [
116.413903, 116.413903,
@ -2991,6 +3000,7 @@
"properties": { "properties": {
"id": "1326110591705710594", "id": "1326110591705710594",
"communityId": "", "communityId": "",
"ids":"1532271719425134593",
"title": "北土楼村", "title": "北土楼村",
"center": [ "center": [
116.425049, 116.425049,
@ -3265,6 +3275,7 @@
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"id": "1415836442222948354", "id": "1415836442222948354",
"ids":"",
"communityId": "", "communityId": "",
"title": "山头村", "title": "山头村",
"center": [ "center": [
@ -3436,6 +3447,7 @@
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"id": "1326112874065592322", "id": "1326112874065592322",
"ids":"",
"communityId": "", "communityId": "",
"title": "前阮二村", "title": "前阮二村",
"center": [ "center": [
@ -3575,6 +3587,7 @@
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"id": "1326112528199090178", "id": "1326112528199090178",
"ids":"",
"communityId": "", "communityId": "",
"title": "上盆王村", "title": "上盆王村",
"center": [ "center": [
@ -3719,6 +3732,7 @@
"properties": { "properties": {
"id": "1326112663385702401", "id": "1326112663385702401",
"communityId": "", "communityId": "",
"ids":"",
"title": "下盆王村", "title": "下盆王村",
"center": [ "center": [
116.406901, 116.406901,
@ -3874,6 +3888,7 @@
"properties": { "properties": {
"id": "1326112752862789633", "id": "1326112752862789633",
"communityId": "", "communityId": "",
"ids":"",
"title": "前寨村", "title": "前寨村",
"center": [ "center": [
116.393848, 116.393848,
@ -4089,6 +4104,7 @@
"properties": { "properties": {
"id": "1326112968823308289", "id": "1326112968823308289",
"communityId": "111111111111111g", "communityId": "111111111111111g",
"ids":"",
"title": "后寨村", "title": "后寨村",
"center": [ "center": [
116.402806, 116.402806,
@ -4264,6 +4280,7 @@
"properties": { "properties": {
"id": "1326113048682856450", "id": "1326113048682856450",
"communityId": "", "communityId": "",
"ids":"",
"title": "凌庄村", "title": "凌庄村",
"center": [ "center": [
116.389753, 116.389753,
@ -4403,6 +4420,7 @@
"properties": { "properties": {
"id": "1252822417739382786", "id": "1252822417739382786",
"communityId": "111111111111111c", "communityId": "111111111111111c",
"ids":"1532261710926598145",
"title": "锦水园社区", "title": "锦水园社区",
"center": [ "center": [
116.435709, 116.435709,
@ -4475,6 +4493,7 @@
"id": "1252828177294721026", "id": "1252828177294721026",
"communityId": "111111111111111a", "communityId": "111111111111111a",
"title": "玫瑰苑社区", "title": "玫瑰苑社区",
"ids":"1532271313693331457",
"center": [ "center": [
116.420519, 116.420519,
36.274222 36.274222
@ -4553,6 +4572,7 @@
"properties": { "properties": {
"id": "1326111149745274881", "id": "1326111149745274881",
"communityId": "111111111111111d", "communityId": "111111111111111d",
"ids":"1532271394184998913",
"title": "锦祥园社区", "title": "锦祥园社区",
"center": [ "center": [
116.425272, 116.425272,
@ -4656,6 +4676,7 @@
"properties": { "properties": {
"id": "1326111230926028801", "id": "1326111230926028801",
"communityId": "", "communityId": "",
"ids":"",
"title": "堡子村", "title": "堡子村",
"center": [ "center": [
116.408777, 116.408777,
@ -4743,6 +4764,7 @@
"properties": { "properties": {
"id": "1230411296424361986", "id": "1230411296424361986",
"communityId": "111111111111111b", "communityId": "111111111111111b",
"ids":"1532261098494078977",
"title": "玫瑰湖社区", "title": "玫瑰湖社区",
"center": [ "center": [
116.427136, 116.427136,
@ -4842,6 +4864,7 @@
"properties": { "properties": {
"id": "1252828788241235970", "id": "1252828788241235970",
"communityId": "111111111111111d", "communityId": "111111111111111d",
"ids":"",
"title": "", "title": "",
"center": [ "center": [
116.425551, 116.425551,

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

@ -47,11 +47,12 @@ export function getAreaHumanClassifyList (params) {
} }
// 人房分析-居民分类人口统计-内网接口 替换上面接口 // 人房分析-居民分类人口统计-内网接口 替换上面接口
export function getResidentClassifyStatistics () { export function getResidentClassifyStatistics (data) {
return request({ return request({
baseURL: intranetApiUrl, baseURL: intranetApiUrl,
url: '/epmetuser/icresiuser/screenJinShui/resiTypeCensus', url: '/epmetuser/icresiuser/screenJinShui/resiTypeCensus',
method: 'POST' method: 'POST',
data
}) })
} }
@ -65,11 +66,12 @@ export function getAreaRoomClassifyList (params) {
} }
// 人房分析-房屋分类统计-内网接口 替换上面接口 // 人房分析-房屋分类统计-内网接口 替换上面接口
export function getHourseClassifyStatistics () { export function getHourseClassifyStatistics (data) {
return request({ return request({
baseURL: intranetApiUrl, baseURL: intranetApiUrl,
url: '/gov/org/house/screenJinShui/houseTypeList', url: '/gov/org/house/screenJinShui/houseTypeList',
method: 'POST' method: 'POST',
data
}) })
} }

2
src/views/next/screen-content-left/red-party-build/org-structure.vue

@ -29,7 +29,7 @@ export default {
return { return {
griderList: [ griderList: [
{ name: '娄西贤', position: '(网格指导员)' }, { name: '娄西贤', position: '(网格指导员)' },
{ name: '尹书国', position: '(网格长)' } { name: '郭泗柱', position: '(网格长)' }
], ],
orgList: [ orgList: [
{ {

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

@ -87,6 +87,7 @@
import AMapLocaClass from './AMapLocaClass' import AMapLocaClass from './AMapLocaClass'
import { getCommunityDistrict, getCommunityGeoPolygon, getCommunityGeoLine, getGridGeoPolygon, getMapStatistics, getGrid, getPageGridDataToal } 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 { getCommunityDetail } from 'api/screen-content-left'
import { getResidentClassifyStatistics ,getHourseClassifyStatistics} from 'api/screen-content-right'
import { mapGetters, mapActions } from 'vuex' import { mapGetters, mapActions } from 'vuex'
import Bus from 'utils/eventBus' import Bus from 'utils/eventBus'
import { numAnimation } from 'utils/common' import { numAnimation } from 'utils/common'
@ -150,6 +151,9 @@ export default {
mapLevel(val) { mapLevel(val) {
if (val) { if (val) {
this.getMapStatistics() this.getMapStatistics()
this.getResidentClassifyStatistics()
this.getHourseClassifyStatistics()
} }
} }
}, },
@ -171,6 +175,31 @@ export default {
showGlobalDialog: 'showGlobalDialog', showGlobalDialog: 'showGlobalDialog',
set_gridInfoDialog: "SET_GRIDINFODIALOG", set_gridInfoDialog: "SET_GRIDINFODIALOG",
}), }),
getResidentClassifyStatistics() {
let params = {
agencyId: this.communityId || '0'
}
getResidentClassifyStatistics(params).then(({ data: res }) => {
console.log('产品内网接口-获取居民分类统计数据地图', res)
numAnimation(this.statisticsList[0].value, res.count, this.statisticsList[0], 'value')
}).catch(err => {
console.error('产品内网接口-获取居民分类统计数据', err)
})
},
getHourseClassifyStatistics () {
let params = {
agencyId: this.communityId || '0'
}
getHourseClassifyStatistics(params).then(({ data: res }) => {
numAnimation(this.statisticsList[1].value, res.count, this.statisticsList[1], 'value')
}).catch(err => {
console.error('产品内网接口-获取房屋分类统计数据', err)
this.roomClassifyChart.hideLoading()
})
},
handelClickLook(houseId) { handelClickLook(houseId) {
this.houseId = houseId this.houseId = houseId
this.showHouseDetail = true this.showHouseDetail = true
@ -182,11 +211,13 @@ export default {
handelCLickBack() { handelCLickBack() {
this.mapBack = false this.mapBack = false
this.set_mapLevel('community') this.set_mapLevel('community')
this.set_communityId('') this.set_communityId('0')
Bus.$emit('drawCommunityPolygon') Bus.$emit('drawCommunityPolygon')
}, },
initMap() { initMap() {
this.getMapStatistics() this.getMapStatistics()
this.getResidentClassifyStatistics()
this.getHourseClassifyStatistics()
this.getPageGridDataToal() this.getPageGridDataToal()
/* eslint-disable */ /* eslint-disable */
Promise.all([ Promise.all([
@ -235,7 +266,6 @@ export default {
}, },
// //
getMapStatistics() { getMapStatistics() {
if (this.mapLevel === 'community' || (this.mapLevel === 'grid' && !this.communityId)) { if (this.mapLevel === 'community' || (this.mapLevel === 'grid' && !this.communityId)) {
const params = { const params = {
id: this.streetId id: this.streetId
@ -243,8 +273,8 @@ export default {
getMapStatistics(params).then(({ data: res }) => { getMapStatistics(params).then(({ data: res }) => {
console.log('获取地图中心上方统计数2', res) console.log('获取地图中心上方统计数2', res)
const { resiNum, houseNum, communityNum, gridNum, gridUserNum, partyMemberNum } = res const { resiNum, houseNum, communityNum, gridNum, gridUserNum, partyMemberNum } = res
numAnimation(this.statisticsList[0].value, resiNum, 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[1].value, houseNum, this.statisticsList[1], 'value')
// numAnimation(this.statisticsList[2].value, communityNum, this.statisticsList[2], 'value') // numAnimation(this.statisticsList[2].value, communityNum, this.statisticsList[2], 'value')
// numAnimation(this.statisticsList[3].value, gridNum, this.statisticsList[3], 'value') // numAnimation(this.statisticsList[3].value, gridNum, this.statisticsList[3], 'value')
numAnimation(this.statisticsList[4].value, gridUserNum, this.statisticsList[4], 'value') numAnimation(this.statisticsList[4].value, gridUserNum, this.statisticsList[4], 'value')
@ -260,8 +290,8 @@ export default {
console.log('获取地图中心上方统计数1', res) console.log('获取地图中心上方统计数1', res)
// resiNum // resiNum
const { resiNum, houseNum, gridNum, gridUserNum, partyMemberNum } = res const { resiNum, houseNum, gridNum, gridUserNum, partyMemberNum } = res
numAnimation(this.statisticsList[0].value, resiNum, 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[1].value, houseNum, this.statisticsList[1], 'value')
// numAnimation(this.statisticsList[2].value, 1, this.statisticsList[2], 'value') // numAnimation(this.statisticsList[2].value, 1, this.statisticsList[2], 'value')
// numAnimation(this.statisticsList[3].value, gridNum, this.statisticsList[3], 'value') // numAnimation(this.statisticsList[3].value, gridNum, this.statisticsList[3], 'value')
numAnimation(this.statisticsList[4].value, gridUserNum, this.statisticsList[4], 'value') numAnimation(this.statisticsList[4].value, gridUserNum, this.statisticsList[4], 'value')
@ -277,12 +307,14 @@ export default {
this.collapse = true this.collapse = true
}, },
// //
drowDownToGrid({ id, communityId, center }) { drowDownToGrid({ id, communityId, center,ids }) {
this.mapBack = true this.mapBack = true
this.getGridList(id) this.getGridList(id)
this.set_mapLevel('grid') this.set_mapLevel('grid')
this.set_communityId(communityId) this.set_communityId(ids || '0')
this.getMapStatistics() this.getMapStatistics()
this.getResidentClassifyStatistics()
this.getHourseClassifyStatistics()
Bus.$emit('drawGridPolygon', { communityId: id, center: center }) Bus.$emit('drawGridPolygon', { communityId: id, center: center })
}, },
getGridList(id) { getGridList(id) {
@ -338,6 +370,7 @@ export default {
Bus.$emit('drawGridPolygon') Bus.$emit('drawGridPolygon')
} }
}, },
// tab // tab
async chooseTab(item) { async chooseTab(item) {
// if (this.currentTab && (this.currentTab === tab.label)) { // if (this.currentTab && (this.currentTab === tab.label)) {
@ -353,7 +386,7 @@ export default {
// } else { // } else {
// Bus.$emit('clearMarker') // Bus.$emit('clearMarker')
// } // }
this.set_gridInfoDialog(true) this.set_gridInfoDialog(true)
Bus.$emit('emitgridInfoDialogData', { gridId: item.id || '1534561053840998402' }) Bus.$emit('emitgridInfoDialogData', { gridId: item.id || '1534561053840998402' })
@ -532,6 +565,7 @@ img {
cursor: pointer; cursor: pointer;
} }
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
.screen-content-map { .screen-content-map {
width: 100%; width: 100%;
@ -635,7 +669,8 @@ img {
bottom: 50%; bottom: 50%;
z-index: 20; z-index: 20;
color: #fff; color: #fff;
transform: translate(0,50%); transform: translate(0, 50%);
.tab-item { .tab-item {
width: fit-content; width: fit-content;
height: 36px; height: 36px;

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

@ -36,6 +36,8 @@
</template> </template>
<script> <script>
import axios from 'axios'
import { import {
getAreaRoomStackBarChartOption, getAreaRoomStackBarChartOption,
getAreaHumanStackBarChartOption, getAreaHumanStackBarChartOption,
@ -71,9 +73,10 @@ export default {
watch: { watch: {
communityId: { communityId: {
handler: function (val) { handler: function (val) {
console.log(val,'在这里变了'); // this.getAreaHumanClassifyList()
this.getAreaHumanClassifyList() // this.getAreaRoomClassifyList()
this.getAreaRoomClassifyList() this.getHourseClassifyStatistics()
this.getResidentClassifyStatistics()
}, },
} }
}, },
@ -342,36 +345,36 @@ export default {
}, },
// //
getAreaHumanClassifyList () { // getAreaHumanClassifyList () {
const params = { // const params = {
communityId: this.communityId || '111111111111111a' // communityId: this.communityId || '111111111111111a'
} // }
this.humanClassifyChart.clear() // this.humanClassifyChart.clear()
this.humanClassifyChart.showLoading('default', { // this.humanClassifyChart.showLoading('default', {
text: 'loading', // text: 'loading',
color: '#3be6cb', // color: '#3be6cb',
textColor: '#ffffff', // textColor: '#ffffff',
maskColor: 'transparent' // maskColor: 'transparent'
}) // })
getAreaHumanClassifyList(params).then(({ data: res }) => { // getAreaHumanClassifyList(params).then(({ data: res }) => {
console.log('获取居民分类统计数据', res) // console.log('', res)
const data = [] // const data = []
res.forEach(item => { // res.forEach(item => {
data.push({ name: item.label, value: parseFloat(item.value) }) // data.push({ name: item.label, value: parseFloat(item.value) })
}) // })
setTimeout(() => { // setTimeout(() => {
this.humanClassifyChart.hideLoading() // this.humanClassifyChart.hideLoading()
this.humanClassifyChart.setOption(getHumanTypeChartOption({ data, count: 1392 })) // this.humanClassifyChart.setOption(getHumanTypeChartOption({ data, count: 1392 }))
this.humanClassifyChart.on('click', () => { // this.humanClassifyChart.on('click', () => {
this.showGlobalDialog('') // this.showGlobalDialog('')
this.set_residentListVisible(true) // this.set_residentListVisible(true)
}) // })
}, 550) // }, 550)
}).catch(err => { // }).catch(err => {
console.error('获取居民分类统计数据', err) // console.error('', err)
this.humanClassifyChart.hideLoading() // this.humanClassifyChart.hideLoading()
}) // })
}, // },
// - // -
getResidentClassifyStatistics () { getResidentClassifyStatistics () {
this.humanClassifyChart.clear() this.humanClassifyChart.clear()
@ -381,7 +384,10 @@ export default {
textColor: '#ffffff', textColor: '#ffffff',
maskColor: 'transparent' maskColor: 'transparent'
}) })
getResidentClassifyStatistics().then(({ data: res }) => { let params = {
agencyId:this.communityId || '0'
}
getResidentClassifyStatistics(params).then(({ data: res }) => {
console.log('产品内网接口-获取居民分类统计数据', res) console.log('产品内网接口-获取居民分类统计数据', res)
const dict = { const dict = {
cj: '残疾', cj: '残疾',
@ -469,7 +475,10 @@ export default {
textColor: '#ffffff', textColor: '#ffffff',
maskColor: 'transparent' maskColor: 'transparent'
}) })
getHourseClassifyStatistics().then(({ data: res }) => { let params = {
agencyId: this.communityId || '0'
}
getHourseClassifyStatistics(params).then(({ data: res }) => {
console.log('产品内网接口-获取房屋分类统计数据', res) console.log('产品内网接口-获取房屋分类统计数据', res)
const dict = { const dict = {
bangong: '办公', bangong: '办公',

2
vue.config.js

@ -97,7 +97,7 @@ module.exports = {
devServer: { devServer: {
open: false, open: false,
host: '0.0.0.0', host: '0.0.0.0',
port: 9090, port: 9091,
proxy: { proxy: {
'/api': { '/api': {
target: 'http://127.0.0.1:10001/api/', target: 'http://127.0.0.1:10001/api/',

Loading…
Cancel
Save