Browse Source

修改人房小区跳转

feature
战立标 2 years ago
parent
commit
6905ff16ae
  1. 4
      src/views/dataBoard/cpts/homeDetails/index.vue
  2. 30
      src/views/dataBoard/renfang/cpts/map-right.vue
  3. 88
      src/views/dataBoard/renfang/index.vue

4
src/views/dataBoard/cpts/homeDetails/index.vue

@ -4,8 +4,8 @@
<bread-crumb
:list="[
{
path: '/dataBoard/overview/index',
name: '概览',
path: '/dataBoard/renfang/index',
name: '人房数据',
},
{
name: homeText ? homeText : '',

30
src/views/dataBoard/renfang/cpts/map-right.vue

@ -4,25 +4,10 @@
@click="isShow = !isShow">
<div :class="isShow?'':'hidden'" class="map-right-content">
<div class="title">
海伦路街道
{{orgData.name}}
</div>
<div class="map-list">
<div class="map-item">南昌路社区</div>
<div class="map-item">北岭山社区</div>
<div class="map-item">北岭山社区</div>
<div class="map-item">北岭山社区</div>
<div class="map-item">北岭山社区</div>
<div class="map-item">北岭山社区</div>
<div class="map-item">北岭山社区</div>
<div class="map-item">北岭山社区</div>
<div class="map-item">北岭山社区</div>
<div class="map-item">北岭山社区</div>
<div class="map-item">北岭山社区</div>
<div class="map-item">北岭山社区</div>
<div class="map-item">北岭山社区</div>
<div class="map-item">北岭山社区</div>
<div class="map-item">北岭山社区</div>
<div class="map-item">北岭山社区</div>
<div class="map-item" v-for="(item,index) in orgData.children" :key="index" @click="clickAgency(item)">{{item.name}}</div>
</div>
</div>
</div>
@ -31,10 +16,21 @@
<script>
export default {
name: "map-right",
props: {
orgData: {
type: Object,
default: () => {}
},
},
data() {
return {
isShow: true
}
},
methods: {
clickAgency(item) {
this.$emit('clickAgency', item)
}
}
}
</script>

88
src/views/dataBoard/renfang/index.vue

@ -1,9 +1,9 @@
<template>
<div>
<cpt-bread
@tap="clickBreadItem"
v-if="breadList.length > 1"
:bread-list="breadList"
@tap="clickBreadItem"
/>
<div class="g-row">
<div class="g-left">
@ -18,7 +18,7 @@
</div>
<div class="bgImg">
<Title text="图谱画像"/>
<jdtphx :id="orgId" />
<jdtphx :id="orgId" :current-level-data="{orgId:orgId, level:orgLevel}"/>
</div>
</div>
@ -111,7 +111,7 @@
@clickAgency="clickAgencyItem"
@clickDotBtn="handleClickDotBtn"
/>
<mapRight/>
<mapRight :orgData="orgData" @clickAgency="clickAgencyItem"/>
</div>
<div class="m-search">
@ -136,10 +136,10 @@
</div>
<input
type="text"
v-model="searchModule.keyword"
placeholder="搜索本组织及下级的居民、小区、楼栋、房屋"
type="text"
@keyup.enter="handleSearch"
v-model="searchModule.keyword"
/>
<div class="i-div"></div>
@ -194,12 +194,12 @@
</div>
</div>
<div class="card-list" v-if="searchModule.result.length > 0">
<div v-if="searchModule.result.length > 0" class="card-list">
<div
class="card-item"
v-for="(item, index) in searchModule.result"
:key="item.title + index"
class="card-item"
@click="handleClickSearchItem(item)"
v-for="(item, index) in searchModule.result"
>
<span>{{ item.title }}</span>
<img
@ -213,8 +213,8 @@
</div>
</div>
<div class="card-empty" v-else>
<img src="~@/assets/images/shuju/renfang/index/empty.png" />
<div v-else class="card-empty">
<img src="~@/assets/images/shuju/renfang/index/empty.png"/>
<span>没有找到搜索结果</span>
</div>
</div>
@ -294,17 +294,17 @@
</div>
</div>
<div class="empty" v-else>
<img src="~@/assets/images/shuju/renfang/index/empty.png" />
<div v-else class="empty">
<img src="~@/assets/images/shuju/renfang/index/empty.png"/>
</div>
</div>
<div v-else>
<div class="list" v-if="resiCategoryForecastData.length > 0">
<div v-if="resiCategoryForecastData.length > 0" class="list">
<div
@click="toResiClassPage('ai', item.code, item.name)"
class="item"
:key="item.code + index"
v-for="(item, index) in resiCategoryForecastData"
:key="item.code + index"
class="item"
@click="toResiClassPage('ai', item.code, item.name)"
>
<div>{{ ("0" + (index + 1)).substr(-2) }}.</div>
<div class="item-name">{{ item.name }}</div>
@ -331,8 +331,8 @@
</div>
</div>
<div class="empty" v-else>
<img src="~@/assets/images/shuju/renfang/index/empty.png" />
<div v-else class="empty">
<img src="~@/assets/images/shuju/renfang/index/empty.png"/>
</div>
</div>
</div>
@ -359,7 +359,7 @@
</div>-->
<div class="bgImg">
<Title text="信息采集统计"></Title>
<rfsjtj :currentLevelData="{orgId: orgId}"/>
<rfsjtj :currentLevelData="{orgId:orgId, level:orgLevel}"/>
</div>
<div class="bgImg">
<Title text="人口预警"></Title>
@ -369,7 +369,7 @@
'z-shrink':
orgLevel == 'district' ||
orgLevel == 'street' ||
orgLevel == 'city',
orgLevel == 'city'
}"
class="m-subbox m-rkyj"
>
@ -386,16 +386,16 @@
</div>
<resi-details
@close="popupShow = false"
:resi-id="displayedResiId"
:popupShow='popupShow'
v-if="popupShow"
:popupShow='popupShow'
:resi-id="displayedResiId"
@close="popupShow = false"
/>
<house-details
@close="displayedHouseId = ''"
:house-id="displayedHouseId"
v-if="displayedHouseId"
:house-id="displayedHouseId"
@close="displayedHouseId = ''"
/>
</div>
</template>
@ -493,7 +493,7 @@ export default {
pandectData: {},
popupShow:false
popupShow: false
};
},
@ -587,11 +587,16 @@ export default {
},
clickAgencyItem(item) {
console.log(item)
if (item.level === 'neighborHood') {
this.$router.push('/homeDetails/index?id='+item.id)
} else {
this.toBread({
orgId: item.id,
orgLevel: item.level,
meta: {title: item.name},
});
}
},
toBread(item) {
@ -689,7 +694,7 @@ export default {
orgId: this.orgId,
};
const { data, code, msg } = await requestGet(
const {data, code, msg} = await requestGet(
url,
params
);
@ -704,19 +709,19 @@ export default {
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 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);
}
});
@ -785,7 +790,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;
@ -828,6 +833,7 @@ export default {
background: url('@/assets/images/shuju/overview/box-bg.png') no-repeat;
background-size: 100% 100%;
}
.m-box {
height: 320px;
}

Loading…
Cancel
Save