|
|
|
@ -1,9 +1,9 @@ |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<cpt-bread |
|
|
|
@tap="clickBreadItem" |
|
|
|
v-if="breadList.length > 1" |
|
|
|
:bread-list="breadList" |
|
|
|
v-if="breadList.length > 1" |
|
|
|
:bread-list="breadList" |
|
|
|
@tap="clickBreadItem" |
|
|
|
/> |
|
|
|
<div class="g-row"> |
|
|
|
<div class="g-left"> |
|
|
|
@ -41,7 +41,7 @@ |
|
|
|
<div class="item-info"> |
|
|
|
<div> |
|
|
|
<img |
|
|
|
src="~@/assets/images/shuju/renfang/index/per/qsn.png" |
|
|
|
src="~@/assets/images/shuju/renfang/index/per/qsn.png" |
|
|
|
/>低保人员 |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
@ -153,41 +153,41 @@ |
|
|
|
<div class="card-tabs"> |
|
|
|
<div |
|
|
|
:class="{ |
|
|
|
'z-on': searchModule.resultTab == '0', |
|
|
|
'z-on': searchModule.resultTab == 'all', |
|
|
|
}" |
|
|
|
@click="searchModule.resultTab = '0'" |
|
|
|
@click="searchModule.resultTab = 'all'" |
|
|
|
> |
|
|
|
全部 |
|
|
|
</div> |
|
|
|
<div |
|
|
|
:class="{ |
|
|
|
'z-on': searchModule.resultTab == '1', |
|
|
|
'z-on': searchModule.resultTab == 'resident', |
|
|
|
}" |
|
|
|
@click="searchModule.resultTab = '1'" |
|
|
|
@click="searchModule.resultTab = 'resident'" |
|
|
|
> |
|
|
|
居民 |
|
|
|
</div> |
|
|
|
<div |
|
|
|
:class="{ |
|
|
|
'z-on': searchModule.resultTab == '2', |
|
|
|
'z-on': searchModule.resultTab == 'quarter', |
|
|
|
}" |
|
|
|
@click="searchModule.resultTab = '2'" |
|
|
|
@click="searchModule.resultTab = 'quarter'" |
|
|
|
> |
|
|
|
小区 |
|
|
|
</div> |
|
|
|
<div |
|
|
|
:class="{ |
|
|
|
'z-on': searchModule.resultTab == '3', |
|
|
|
'z-on': searchModule.resultTab == 'build', |
|
|
|
}" |
|
|
|
@click="searchModule.resultTab = '3'" |
|
|
|
@click="searchModule.resultTab = 'build'" |
|
|
|
> |
|
|
|
楼栋 |
|
|
|
</div> |
|
|
|
<div |
|
|
|
:class="{ |
|
|
|
'z-on': searchModule.resultTab == '4', |
|
|
|
'z-on': searchModule.resultTab == 'home', |
|
|
|
}" |
|
|
|
@click="searchModule.resultTab = '4'" |
|
|
|
@click="searchModule.resultTab = 'home'" |
|
|
|
> |
|
|
|
房屋 |
|
|
|
</div> |
|
|
|
@ -355,7 +355,7 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<cpt-loading v-show="false" /> |
|
|
|
<cpt-loading v-show="false"/> |
|
|
|
</div> |
|
|
|
|
|
|
|
<resi-details |
|
|
|
@ -450,7 +450,7 @@ export default { |
|
|
|
searchModule: { |
|
|
|
displayedCard: false, |
|
|
|
keyword: "", |
|
|
|
resultTab: "0", // 0所有 1,居民;2,小区;3,楼栋;4,房屋 |
|
|
|
resultTab: "all", // 0所有 1,居民;2,小区;3,楼栋;4,房屋 |
|
|
|
result: [ |
|
|
|
// { |
|
|
|
// id: 1, |
|
|
|
@ -504,8 +504,8 @@ export default { |
|
|
|
const {agencyId} = this.$store.state.user; |
|
|
|
const url = "/actual/base/residentHouseMerge/communityOverview"; |
|
|
|
let params = { |
|
|
|
agencyId:this.orgId, |
|
|
|
orgId:this.orgId , |
|
|
|
agencyId: this.orgId, |
|
|
|
orgId: this.orgId, |
|
|
|
level: this.orgLevel, |
|
|
|
}; |
|
|
|
console.log(params); |
|
|
|
@ -571,7 +571,7 @@ export default { |
|
|
|
clickAgencyItem(item) { |
|
|
|
console.log(item); |
|
|
|
if (item.level === 'neighborHood') { |
|
|
|
this.$router.push('/homeDetails/index?id='+item.id) |
|
|
|
this.$router.push('/homeDetails/index?id=' + item.id) |
|
|
|
} else { |
|
|
|
this.toBread({ |
|
|
|
orgId: item.id, |
|
|
|
@ -608,36 +608,32 @@ export default { |
|
|
|
// 根据类别搜索 |
|
|
|
async handleSearch() { |
|
|
|
this.searchModule.result = []; |
|
|
|
const { searchModule } = this; |
|
|
|
|
|
|
|
const url = [ |
|
|
|
"search_all", |
|
|
|
"search_resident", |
|
|
|
"search_village", |
|
|
|
"search_building", |
|
|
|
"search_house", |
|
|
|
][searchModule.resultTab]; |
|
|
|
|
|
|
|
const {data, code, msg} = await requestPostBi( |
|
|
|
const {searchModule} = this; |
|
|
|
|
|
|
|
/* const url = [ |
|
|
|
"search_all", |
|
|
|
"search_resident", |
|
|
|
"search_village", |
|
|
|
"search_building", |
|
|
|
"search_house", |
|
|
|
][searchModule.resultTab];*/ |
|
|
|
let url = '/actual/base/peopleRoomOverview/getSearchResult' |
|
|
|
|
|
|
|
const {data, code, msg} = await requestPost( |
|
|
|
url, |
|
|
|
{ |
|
|
|
queryParam: { |
|
|
|
org_id: this.orgId, |
|
|
|
name: this.searchModule.keyword, |
|
|
|
}, |
|
|
|
org_id: this.orgId, |
|
|
|
content: this.searchModule.keyword, |
|
|
|
searchType: searchModule.resultTab |
|
|
|
}, |
|
|
|
{ |
|
|
|
// mockId: 60044224, |
|
|
|
// mockId: 60048067, |
|
|
|
} |
|
|
|
); |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
this.searchModule.result = data.map((item) => { |
|
|
|
let type = item.type || searchModule.resultTab; |
|
|
|
let type = item.type; |
|
|
|
let title = ""; |
|
|
|
let detailJson = {}; |
|
|
|
if (searchModule.resultTab == 0) { |
|
|
|
let detailJson = item.detail_json; |
|
|
|
// if (searchModule.resultTab == 0) { |
|
|
|
title = item.name; |
|
|
|
if (typeof item.detail_json == "string") { |
|
|
|
try { |
|
|
|
@ -646,14 +642,15 @@ export default { |
|
|
|
console.log(e); |
|
|
|
} |
|
|
|
} |
|
|
|
} else if (type == "1") { |
|
|
|
if (type == "1") { |
|
|
|
title = item.user_name; |
|
|
|
} else if (type == "2") { |
|
|
|
title = item.village_name; |
|
|
|
title = item.detail_json.village; |
|
|
|
} else if (type == "3") { |
|
|
|
title = item.village_name + "-" + item.building_name; |
|
|
|
console.log(item,'detailJson') |
|
|
|
title = detailJson.village + "-" + detailJson.building; |
|
|
|
} else if (type == "4") { |
|
|
|
title = item.building + "-" + item.unit + "-" + item.door; |
|
|
|
title = item.center_addre; |
|
|
|
} |
|
|
|
return { |
|
|
|
title, |
|
|
|
@ -661,7 +658,7 @@ export default { |
|
|
|
...item, |
|
|
|
...detailJson, |
|
|
|
}; |
|
|
|
}); |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
@ -671,13 +668,13 @@ export default { |
|
|
|
async getPerInfo() { |
|
|
|
const url = "/actual/base/resiCategory/categoryCountPartList"; |
|
|
|
let params = { |
|
|
|
orgId: this.orgId, |
|
|
|
agencyId: this.orgId, |
|
|
|
level: this.orgLevel, |
|
|
|
}; |
|
|
|
const { data, code, msg } = await requestGet( |
|
|
|
url, |
|
|
|
params |
|
|
|
orgId: this.orgId, |
|
|
|
agencyId: this.orgId, |
|
|
|
level: this.orgLevel, |
|
|
|
}; |
|
|
|
const {data, code, msg} = await requestGet( |
|
|
|
url, |
|
|
|
params |
|
|
|
); |
|
|
|
if (code === 0 && data) { |
|
|
|
// this.perInfo = { |
|
|
|
@ -686,23 +683,23 @@ export default { |
|
|
|
// }; |
|
|
|
const resiCount = data.resiCount; |
|
|
|
Object.keys(data.categoryList).forEach((key) => { |
|
|
|
const category = data.categoryList[key]; |
|
|
|
const categoryName = category.categoryName; |
|
|
|
const categoryCount = category.categoryCount; |
|
|
|
const radio = categoryCount/resiCount * 100; |
|
|
|
if(categoryName == "OLD_PEOPLE_FLAG"){ |
|
|
|
this.perInfo.OLD_PEOPLE_FLAG=radio.toFixed(2); |
|
|
|
}else if(categoryName == "PARTY_FLAG"){ |
|
|
|
this.perInfo.PARTY_FLAG=radio.toFixed(2); |
|
|
|
}else if(categoryName == "UNEMPLOYED_FLAG"){ |
|
|
|
this.perInfo.UNEMPLOYED_FLAG=radio.toFixed(2); |
|
|
|
}else if(categoryName == "VOLUNTEER_FLAG"){ |
|
|
|
this.perInfo.VOLUNTEER_FLAG=radio.toFixed(2); |
|
|
|
}else if(categoryName == "SUBSISTENCE_ALLOWANCE_FLAG"){ |
|
|
|
this.perInfo.SUBSISTENCE_ALLOWANCE_FLAG=radio.toFixed(2); |
|
|
|
}else if(categoryName == "SPECIAL_CROWD_FLAG"){ |
|
|
|
this.perInfo.SPECIAL_CROWD_FLAG=radio.toFixed(2); |
|
|
|
} |
|
|
|
const category = data.categoryList[key]; |
|
|
|
const categoryName = category.categoryName; |
|
|
|
const categoryCount = category.categoryCount; |
|
|
|
const radio = categoryCount / resiCount * 100; |
|
|
|
if (categoryName == "OLD_PEOPLE_FLAG") { |
|
|
|
this.perInfo.OLD_PEOPLE_FLAG = radio.toFixed(2); |
|
|
|
} else if (categoryName == "PARTY_FLAG") { |
|
|
|
this.perInfo.PARTY_FLAG = radio.toFixed(2); |
|
|
|
} else if (categoryName == "UNEMPLOYED_FLAG") { |
|
|
|
this.perInfo.UNEMPLOYED_FLAG = radio.toFixed(2); |
|
|
|
} else if (categoryName == "VOLUNTEER_FLAG") { |
|
|
|
this.perInfo.VOLUNTEER_FLAG = radio.toFixed(2); |
|
|
|
} else if (categoryName == "SUBSISTENCE_ALLOWANCE_FLAG") { |
|
|
|
this.perInfo.SUBSISTENCE_ALLOWANCE_FLAG = radio.toFixed(2); |
|
|
|
} else if (categoryName == "SPECIAL_CROWD_FLAG") { |
|
|
|
this.perInfo.SPECIAL_CROWD_FLAG = radio.toFixed(2); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
} else { |
|
|
|
@ -722,7 +719,7 @@ export default { |
|
|
|
// id: this.orgId, |
|
|
|
// level: "agency", |
|
|
|
}; |
|
|
|
const { data, code, msg } = await requestGet(url, params); |
|
|
|
const {data, code, msg} = await requestGet(url, params); |
|
|
|
if (code === 0) { |
|
|
|
if (data) { |
|
|
|
this.resiCategoryData = data.categoryList.map((item) => { |
|
|
|
@ -746,26 +743,26 @@ export default { |
|
|
|
const {agencyId} = this.$store.state.user; |
|
|
|
const url = "/actual/base/resiCategory/intelligentPredictioncategoryCountList"; |
|
|
|
let params = { |
|
|
|
agencyId:agencyId, |
|
|
|
orgId:this.orgId, |
|
|
|
agencyId: agencyId, |
|
|
|
orgId: this.orgId, |
|
|
|
level: this.orgLevel, |
|
|
|
}; |
|
|
|
const {data, code, msg} = await requestGet(url, params); |
|
|
|
if (code === 0) { |
|
|
|
this.resiCategoryForecastData = data.categoryList.map((item) => { |
|
|
|
return { |
|
|
|
code: item.categoryName, |
|
|
|
name: resiCategoryMap[item.categoryName] || "", |
|
|
|
count: item.categoryCountNext, |
|
|
|
// name:item.categoryCountName, |
|
|
|
per: parseInt( |
|
|
|
this.resiCategoryForecastData = data.categoryList.map((item) => { |
|
|
|
return { |
|
|
|
code: item.categoryName, |
|
|
|
name: resiCategoryMap[item.categoryName] || "", |
|
|
|
count: item.categoryCountNext, |
|
|
|
// name:item.categoryCountName, |
|
|
|
per: parseInt( |
|
|
|
(100 * item.categoryCount) / data.resiCount |
|
|
|
), |
|
|
|
// per: item.change_ratio, |
|
|
|
growth: item.change_ratio, |
|
|
|
growthAbs: Math.abs(item.categoryCountNext - item.categoryCount) |
|
|
|
}; |
|
|
|
}); |
|
|
|
), |
|
|
|
// per: item.change_ratio, |
|
|
|
growth: item.change_ratio, |
|
|
|
growthAbs: Math.abs(item.categoryCountNext - item.categoryCount) |
|
|
|
}; |
|
|
|
}); |
|
|
|
} else { |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
@ -780,7 +777,7 @@ export default { |
|
|
|
level: this.orgLevel, |
|
|
|
}; |
|
|
|
|
|
|
|
const { data, code, msg } = await requestPost(url, params); |
|
|
|
const {data, code, msg} = await requestPost(url, params); |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
this.orgData = data; |
|
|
|
@ -827,6 +824,7 @@ export default { |
|
|
|
.m-box { |
|
|
|
height: 323px; |
|
|
|
} |
|
|
|
|
|
|
|
.map-bottom { |
|
|
|
margin: 0 17px; |
|
|
|
} |
|
|
|
|