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

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

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

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

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

2
vue.config.js

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

Loading…
Cancel
Save