epmet pc工作端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

867 lines
26 KiB

3 years ago
<template>
2 years ago
<div>
<cpt-bread
v-if="breadList.length > 1"
:bread-list="breadList"
@tap="clickBreadItem"
2 years ago
/>
<div class="g-row">
<div class="g-left">
<div class="bgImg">
<Title text="房屋概览"/>
<fwgl ref="fwgl" :orgId="orgId"></fwgl>
2 years ago
</div>
<div class="bgImg">
<Title text="居民概览"/>
<jmgl ref="jmgl" :orgId="orgId"></jmgl>
</div>
<div class="bgImg">
<Title text="图谱画像"/>
2 years ago
<jdtphx :id="orgId" :current-level-data="{orgId:orgId, orgLevel:orgLevel}"/>
2 years ago
</div>
</div>
<div class="g-center">
<div class="m-map">
<div class="m-per">
<div class="item" @click="jumpPath('normal', 'aged', '老年人')">
<div class="item-info">
<div>
<img
src="~@/assets/images/shuju/renfang/index/per/lnr.png"
2 years ago
/>
</div>
<div>
<b>{{ perInfo.OLD_PEOPLE_FLAG }}</b>
2 years ago
%
</div>
</div>
</div>
<div class="item" @click="jumpPath('normal', 'aged', '低保人员')">
<div class="item-info">
<div>
<img
src="~@/assets/images/shuju/renfang/index/per/qsn.png"
2 years ago
/>
</div>
<div>
<b class="blue">{{ perInfo.SUBSISTENCE_ALLOWANCE_FLAG }}</b>
2 years ago
%
</div>
</div>
</div>
<div class="item" @click="jumpPath('normal', 'aged', '失业人员')">
2 years ago
<div class="item-info">
<div>
<img
src="~@/assets/images/shuju/renfang/index/per/syry.png"
2 years ago
/>
2 years ago
</div>
<div>
<b class="blue">{{ perInfo.UNEMPLOYED_FLAG }}</b>
2 years ago
%
</div>
</div>
</div>
<div class="item" @click="jumpPath('normal', 'aged', '党员')">
<div class="item-info">
<div>
<img
2 years ago
src="~@/assets/images/shuju/renfang/index/per/dy.png"
2 years ago
/>
</div>
<div>
<b class="orange">{{ perInfo.PARTY_FLAG }}</b>
2 years ago
%
</div>
</div>
</div>
2 years ago
<div class="item" @click="jumpPath('normal', 'aged', '志愿者')">
2 years ago
<div class="item-info">
<div>
<img
2 years ago
src="~@/assets/images/shuju/renfang/index/per/zyz.png"
/>
2 years ago
</div>
<div>
<b class="red">{{ perInfo.VOLUNTEER_FLAG }}</b>
2 years ago
%
</div>
</div>
</div>
<div class="item" @click="jumpPath('normal', 'aged', '特殊人群')">
2 years ago
<div class="item-info">
<div>
<img
src="~@/assets/images/shuju/renfang/index/per/tsrq.png"
2 years ago
/>
2 years ago
</div>
<div>
<b>{{ perInfo.SPECIAL_CROWD_FLAG }}</b>
2 years ago
%
</div>
</div>
</div>
</div>
<grid-map
ref="map"
:srcGridData="orgData"
@clickAgency="clickAgencyItem"
@clickDotBtn="handleClickDotBtn"
2 years ago
/>
<mapRight :orgData="orgData" @clickAgency="clickAgencyItem"/>
2 years ago
</div>
<div class="m-search">
<div class="btn" @click="searchModule.displayedCard = true">
<img alt="" class="border" src="@/assets/images/renfang/search_border.png">
<img alt="" class="icon" src="@/assets/images/renfang/search_icon.png">
2 years ago
</div>
<div v-show="searchModule.displayedCard" class="card">
2 years ago
<div class="card-input">
<div class="card-btn" @click="handleSearch">
<img
src="~@/assets/images/shuju/renfang/index/search/search.png"
2 years ago
/>
</div>
<input
v-model="searchModule.keyword"
placeholder="搜索本组织及下级的居民、小区、楼栋、房屋"
type="text"
@keyup.enter="handleSearch"
2 years ago
/>
<div class="i-div"></div>
<div class="card-btn" @click="searchModule.displayedCard = false">
<img
src="~@/assets/images/shuju/renfang/index/search/close.png"
2 years ago
/>
</div>
</div>
<div class="card-show">
<div class="card-tabs">
<div
:class="{
'z-on': searchModule.resultTab == 'all',
2 years ago
}"
@click="searchModule.resultTab = 'all'"
2 years ago
>
全部
</div>
<div
:class="{
'z-on': searchModule.resultTab == 'resident',
2 years ago
}"
@click="searchModule.resultTab = 'resident'"
2 years ago
>
居民
</div>
<div
:class="{
'z-on': searchModule.resultTab == 'quarter',
2 years ago
}"
@click="searchModule.resultTab = 'quarter'"
2 years ago
>
小区
</div>
<div
:class="{
'z-on': searchModule.resultTab == 'build',
2 years ago
}"
@click="searchModule.resultTab = 'build'"
2 years ago
>
楼栋
</div>
<div
:class="{
'z-on': searchModule.resultTab == 'home',
2 years ago
}"
@click="searchModule.resultTab = 'home'"
2 years ago
>
房屋
</div>
</div>
<div v-if="searchModule.result.length > 0" class="card-list">
2 years ago
<div
v-for="(item, index) in searchModule.result"
:key="item.title + index"
class="card-item"
@click="handleClickSearchItem(item)"
2 years ago
>
<span>{{ item.title }}</span>
<img
class="i-arrow"
src="~@/assets/images/shuju/renfang/index/search/arrow.png"
2 years ago
/>
<img
class="i-arrow z-on"
src="~@/assets/images/shuju/renfang/index/search/arrow-on.png"
2 years ago
/>
</div>
</div>
<div v-else class="card-empty">
<img src="~@/assets/images/shuju/renfang/index/empty.png"/>
2 years ago
<span>没有找到搜索结果</span>
</div>
</div>
</div>
</div>
<div class="bgImg m-box m-cate map-bottom">
2 years ago
<div class="box-title">
<Title v-if="!displayedForecast" text="居民分类统计">
<template>
<div
class="box-title-btn"
2 years ago
@click="displayedForecast = true"
>
<img src="~@/assets/images/shuju/renfang/index/znyc.png"/>
2 years ago
<span>智能预测</span>
<el-tooltip placement="top">
<div slot="content">
根据智能分类设置规则预测来年育龄妇女老年人空巢老人独居老人分别有多少人
</div>
<img src="~@/assets/images/shuju/renfang/index/i-hint.png"/>
2 years ago
</el-tooltip>
</div>
</template>
</Title>
<Title v-else text="居民分类统计-智能预测">
<template>
<div
class="box-title-btn"
@click="displayedForecast = false"
>
<img src="~@/assets/images/shuju/renfang/index/znyc.png"/>
<span>居民分类统计</span>
</div>
</template>
</Title>
2 years ago
</div>
<div v-if="!displayedForecast">
<div v-if="resiCategoryData.length > 0" class="list">
2 years ago
<div
v-for="(item, index) in resiCategoryData"
:key="item.code + index"
class="item"
@click="toResiClassPage('normal', item.code, item.name)"
2 years ago
>
<div>{{ ("0" + (index + 1)).substr(-2) }}.</div>
<div class="item-name">{{ item.name }}</div>
<div class="item-count">
<b>{{ item.count }}</b>
</div>
<div class="item-progress">
<b :style="{ width: item.ratio + '%' }"></b>
</div>
<div class="item-per">
<span>较上月</span>
<template v-if="item.growth !== 0">
<img
v-if="item.growth > 0"
src="~@/assets/images/shuju/renfang/index/up.png"
/>
<img
v-else
src="~@/assets/images/shuju/renfang/index/down.png"
/>
</template>
<span v-else style="width: 20px"></span>
2 years ago
<b>{{ item.growthAbs }}</b>
<span></span>
</div>
</div>
</div>
<div v-else class="empty">
<img src="~@/assets/images/shuju/renfang/index/empty.png"/>
2 years ago
</div>
</div>
<div v-else>
<div v-if="resiCategoryForecastData.length > 0" class="list">
2 years ago
<div
v-for="(item, index) in resiCategoryForecastData"
:key="item.code + index"
class="item"
@click="toResiClassPage('ai', item.code, item.name)"
2 years ago
>
<div>{{ ("0" + (index + 1)).substr(-2) }}.</div>
<div class="item-name">{{ item.name }}</div>
<div class="item-count">
<b>{{ item.count }}</b>
</div>
<div class="item-progress">
<b :style="{ width: item.ratio + '%' }"></b>
</div>
<div class="item-per">
<span>较上一年</span>
<img
v-if="item.isTop"
src="~@/assets/images/shuju/renfang/index/up.png"
2 years ago
/>
<img
v-else
src="~@/assets/images/shuju/renfang/index/down.png"
2 years ago
/>
<b>{{ item.growthAbs }}</b>
<span></span>
</div>
</div>
</div>
<div v-else class="empty">
<img src="~@/assets/images/shuju/renfang/index/empty.png"/>
2 years ago
</div>
</div>
</div>
</div>
<div class="g-right">
<div class="bgImg">
<Title text="信息采集统计"></Title>
2 years ago
<rfsjtj :currentLevelData="{orgId:orgId, orgLevel:orgLevel}"/>
2 years ago
</div>
<div class="bgImg">
<Title text="人口预警"></Title>
2 years ago
<div
:class="{
2 years ago
'z-shrink':
orgLevel == 'district' ||
orgLevel == 'street' ||
orgLevel == 'city'
2 years ago
}"
class="m-subbox m-rkyj"
2 years ago
>
<rkyj :orgId="orgId"/>
2 years ago
</div>
</div>
<div class="bgImg">
<Title text="人口分析"></Title>
2 years ago
<rkfx :orgId="orgId" :orgType="orgLevel" @handelClickRkfxPei="handelClickRkfxPei"/>
2 years ago
</div>
</div>
<cpt-loading v-show="false"/>
2 years ago
</div>
<resi-details
v-if="popupShow"
:popupShow='popupShow'
:resi-id="displayedResiId"
@close="popupShow = false"
2 years ago
/>
<house-details
v-if="displayedHouseId"
:house-id="displayedHouseId"
@close="displayedHouseId = ''"
2 years ago
/>
</div>
3 years ago
</template>
<script>
import gridMap from "@/views/dataBoard/cpts/map/index";
3 years ago
import fwgl from "@/views/dataBoard/renfang/cpts/fwgl";
import jmgl from "@/views/dataBoard/renfang/cpts/jmgl";
import rkfx from "@/views/dataBoard/renfang/cpts/rkfx";
import rkyj from "@/views/dataBoard/renfang/cpts/rkyj";
import szsq from "@/views/dataBoard/renfang/cpts/szsq";
2 years ago
import mapRight from "@/views/dataBoard/renfang/cpts/map-right.vue";
import cptBread from "@/views/dataBoard/renfang/cpts/bread";
3 years ago
import cptLoading from "@/views/dataBoard/cpts/loading";
import houseDetails from "@/views/dataBoard/cpts/house-details";
import resiDetails from "@/views/dataBoard/cpts/resi-details";
import {requestPostBi} from "@/js/dai/request-bipass";
import {requestPost} from "@/js/dai/request";
3 years ago
import getQueryPara from "dai-js/modules/getQueryPara";
import {requestGet} from "@/js/dai/request";
import resiCategoryMap from "@/views/business/resi-category-map.js";
import Title from "@/views/dataBoard/satisfactionEval/components/Title/index.vue";
import rfsjtj from "@/views/dataBoard/overview/components/rfsjtj.vue";
import jdtphx from "@/views/dataBoard/overview/components/jdtphx.vue";
3 years ago
function iniGetPerInfo() {
2 years ago
return {
OLD_PEOPLE_FLAG: "--",
PARTY_FLAG: "--",
UNEMPLOYED_FLAG: "--",
VOLUNTEER_FLAG: "--",
SUBSISTENCE_ALLOWANCE_FLAG: "--",
SPECIAL_CROWD_FLAG: "--",
2 years ago
};
}
3 years ago
export default {
2 years ago
name: "renfang",
components: {
Title,
2 years ago
gridMap,
fwgl,
jmgl,
rkfx,
rkyj,
szsq,
cptLoading,
cptBread,
houseDetails,
resiDetails,
mapRight,
rfsjtj,
jdtphx
2 years ago
},
data() {
return {
loading: false,
orgData: {
children: [],
}, //当前组织对象
orgId: "",
orgLevel: "",
breadList: [
{
orgId: "",
orgLevel: "",
meta: {title: "人房总览"},
2 years ago
},
],
resiCategoryData: [], // 居民分类分析
resiCategoryForecastData: [], // 居民分类预测
displayedForecast: false, //显示居民分类分析 还是居民分类预测
searchModule: {
displayedCard: false,
keyword: "",
resultTab: "all", // 0所有 1,居民;2,小区;3,楼栋;4,房屋
2 years ago
result: [
// {
// id: 1,
// title: "四季景园",
// },
],
},
perInfo: iniGetPerInfo(),
displayedResiId: "",
displayedHouseId: "",
2 years ago
pandectData: {},
popupShow: false
2 years ago
};
},
mounted() {
const queryOrgId = getQueryPara("orgId");
const queryOrgLevel = getQueryPara("orgLevel");
this.init(queryOrgId, queryOrgLevel);
},
watch: {},
methods: {
async init(queryOrgId, queryOrgLevel) {
if (queryOrgId) {
this.orgId = queryOrgId;
this.orgLevel = queryOrgLevel || "agency";
} else {
this.orgId = this.$store.state.user.agencyId;
this.orgLevel = "agency";
}
//加载组织数据
this.loading = false;
// await this.loadOrgData();
await this.getMapData();
this.getResiCategoryData();
this.getPerInfo();
2 years ago
this.getPandectData()
await this.getResiCategoryForecastData();
2 years ago
this.loading = true;
2 years ago
},
//加载组织数据
async getPandectData() {
2 years ago
const {agencyId} = this.$store.state.user;
2 years ago
const url = "/actual/base/residentHouseMerge/communityOverview";
let params = {
agencyId: this.orgId,
orgId: this.orgId,
2 years ago
level: this.orgLevel,
2 years ago
};
2 years ago
console.log(params);
2 years ago
const {data, code, msg} = await requestGet(url, params);
if (code === 0) {
if (data) {
this.$nextTick(() => {
this.$refs['fwgl'].pandectData = data
this.$refs['jmgl'].pandectData = data
}
2 years ago
)
}
} else {
this.$message.error(msg);
}
2 years ago
},
jumpPath(pageType, type_id = "", type_name) {
2 years ago
this.$router.push({
path: "/dataBoard/renfang/visualizing",
query: {
org_id: this.orgId,
type_id,
type_name,
pageType,
},
});
},
2 years ago
toResiClassPage(pageType, type_id = "", type_name) {
if (type_id) {
this.$router.push({
path: "/dataBoard/renfang/resi-class",
query: {
org_id: this.orgId,
type_id,
type_name,
pageType,
},
});
} else {
this.$message.error("该人员暂无居民信息!");
}
2 years ago
},
handleClickDotBtn(type, info) {
if (type == "watch-resi") {
this.$router.push({
path: "/dataBoard/renfang/resident",
query: {
user_id: info.user_id,
},
});
// this.displayedResiId = info.user_id;
// this.popupShow = true
2 years ago
} else if (type == "watch-house") {
this.displayedHouseId = info.house_id;
}
},
clickBreadItem({item}) {
2 years ago
this.toBread(item);
},
clickAgencyItem(item) {
console.log(item);
if (item.level === 'neighborHood') {
this.$router.push('/homeDetails/index?id=' + item.id)
} else {
this.toBread({
orgId: item.id,
2 years ago
orgLevel: item.level,
meta: {title: item.name},
});
}
2 years ago
},
toBread(item) {
const {orgId} = item;
const {breadList} = this;
2 years ago
let index = breadList.findIndex((val) => val.orgId === orgId);
if (index >= 0) {
this.breadList = breadList.slice(0, index + 1);
} else {
breadList.push(item);
this.breadList = breadList;
}
this.init(item.orgId, item.orgLevel);
},
// 点击搜索结果条目,在地图上显示点和详情弹窗
handleClickSearchItem(item) {
if (!item.longitude) {
return this.$message.error("请先设置坐标");
}
this.$refs.map.setDotMarker(item, [
parseFloat(item.longitude),
parseFloat(item.latitude),
]);
},
// 根据类别搜索
async handleSearch() {
this.searchModule.result = [];
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,
{
org_id: this.orgId,
content: this.searchModule.keyword,
searchType: searchModule.resultTab
2 years ago
},
);
if (code === 0) {
this.searchModule.result = data.map((item) => {
let type = item.type;
2 years ago
let title = "";
let detailJson = item.detail_json;
// if (searchModule.resultTab == 0) {
title = item.name;
if (typeof item.detail_json == "string") {
try {
detailJson = JSON.parse(item.detail_json);
} catch (e) {
console.log(e);
2 years ago
}
}
if (type == "1") {
2 years ago
title = item.user_name;
} else if (type == "2") {
title = detailJson.village;
2 years ago
} else if (type == "3") {
console.log(item, 'detailJson')
title = detailJson.village + "-" + detailJson.building;
2 years ago
} else if (type == "4") {
title = item.center_addre;
2 years ago
}
return {
title,
type,
...item,
...detailJson,
};
})
2 years ago
} else {
this.$message.error(msg);
}
},
//地图上居民分类百分比数据 ps:感觉有点重复显示
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
2 years ago
);
if (code === 0 && data) {
// this.perInfo = {
// ...iniGetPerInfo(),
// ...data[0],
// };
const resiCount = data.resiCount;
Object.keys(data.categoryList).forEach((key) => {
const category = data.categoryList[key];
const categoryName = category.categoryName;
const categoryCount = category.categoryCount;
2 years ago
const radio = categoryCount?categoryCount / resiCount * 100:categoryCount;
console.log(radio, categoryCount,
resiCount, 'radioradioradio')
if (categoryName == "OLD_PEOPLE_FLAG") {
2 years ago
this.perInfo.OLD_PEOPLE_FLAG = radio || radio === 0 ? radio.toFixed(2) : '--';
} else if (categoryName == "PARTY_FLAG") {
2 years ago
this.perInfo.PARTY_FLAG = radio || radio === 0 ? radio.toFixed(2) : '--';
} else if (categoryName == "UNEMPLOYED_FLAG") {
2 years ago
this.perInfo.UNEMPLOYED_FLAG = radio || radio === 0 ? radio.toFixed(2) : '--';
} else if (categoryName == "VOLUNTEER_FLAG") {
2 years ago
this.perInfo.VOLUNTEER_FLAG = radio || radio === 0 ? radio.toFixed(2) : '--';
} else if (categoryName == "SUBSISTENCE_ALLOWANCE_FLAG") {
2 years ago
this.perInfo.SUBSISTENCE_ALLOWANCE_FLAG = radio || radio === 0 ? radio.toFixed(2) : '--';
} else if (categoryName == "SPECIAL_CROWD_FLAG") {
2 years ago
this.perInfo.SPECIAL_CROWD_FLAG = radio || radio === 0 ? radio.toFixed(2) : '--';
}
});
2 years ago
} else {
this.$message.error(msg);
}
},
//居民分类分析数据
async getResiCategoryData() {
const {agencyId} = this.$store.state.user;
console.log(agencyId);
const url = "/actual/base/resiCategory/categoryCountList";
let params = {
agencyId: agencyId,
orgId: this.orgId,
level: this.orgLevel,
// id: this.orgId,
// level: "agency",
};
const {data, code, msg} = await requestGet(url, params);
2 years ago
if (code === 0) {
if (data) {
this.resiCategoryData = data.categoryList.map((item) => {
return {
code: item.categoryName,
name: resiCategoryMap[item.categoryName] || "",
count: item.categoryCount,
ratio: ((100 * item.categoryCount) / data.resiCount).toFixed(0),
growth: item.growth,
growthAbs: item.growth === 0 ? 0 : Math.abs(item.growth),
};
});
}
2 years ago
} else {
this.$message.error(msg);
}
},
//居民分类预测数据
async getResiCategoryForecastData() {
const {agencyId} = this.$store.state.user;
const url = "/actual/base/resiCategory/intelligentPredictioncategoryCountList";
let params = {
agencyId: agencyId,
orgId: this.orgId,
level: this.orgLevel,
};
const {data, code, msg} = await requestGet(url, params);
2 years ago
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(
(100 * item.categoryCount) / data.resiCount
),
// per: item.change_ratio,
growth: item.change_ratio,
growthAbs: Math.abs(item.categoryCountNext - item.categoryCount)
};
});
2 years ago
} else {
this.$message.error(msg);
}
},
//获取地图上显示的组织数据
async getMapData() {
const url = "/gov/org/agency/maporg";
let params = {
orgId: this.orgId,
level: this.orgLevel,
};
2 years ago
const {data, code, msg} = await requestPost(url, params);
2 years ago
if (code === 0) {
this.orgData = data;
this.orgId = this.orgId;
// this.orgLevel = this.orgData.level;
2 years ago
} else {
this.$message.error(msg);
}
},
//加载组织数据
async loadOrgData() {
const url = "/gov/org/agency/maporg";
let params = {
orgId: this.orgId,
level: this.orgLevel,
};
const {data, code, msg} = await requestPost(url, params);
2 years ago
if (code === 0) {
this.orgData = data;
this.orgId = this.orgId;
this.orgLevel = this.orgData.level;
} else {
this.$message.error(msg);
}
},
handelClickRkfxPei(val) {
console.log(val);
},
},
3 years ago
};
</script>
<style lang="scss" scoped>
@import "@/assets/scss/dataBoard/renfang/index.scss";
3 years ago
.bgImg {
margin-bottom: 7px;
background: url('@/assets/images/shuju/overview/box-bg.png') no-repeat;
background-size: 100% 100%;
}
3 years ago
.m-box {
height: 323px;
}
.map-bottom {
margin: 0 17px;
}
2 years ago
.m-search {
top: 595px !important;
2 years ago
.btn {
position: relative;
width: 56px;
height: 56px;
margin-left: 12px;
2 years ago
.border {
position: absolute;
top: 0;
left: 0;
//animation-iteration-count: infinite;
2 years ago
width: 56px;
height: 56px;
animation: autobiography 2s infinite;
animation-timing-function: linear;
}
2 years ago
.icon {
width: 56px;
height: 56px;
}
}
}
@keyframes autobiography {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
</style>