|
|
|
@ -245,9 +245,14 @@ |
|
|
|
src="~@/assets/images/shuju/main/card-title-bg-800.png" |
|
|
|
class="box-title-bg" |
|
|
|
/> |
|
|
|
<div class="box-title-txt">居民分类分析</div> |
|
|
|
<div class="box-title-txt" v-if="!displayedForecast">居民分类分析</div> |
|
|
|
<div class="box-title-txt" v-else>居民分类分析-智能预测</div> |
|
|
|
|
|
|
|
<div class="box-title-btn"> |
|
|
|
<div |
|
|
|
class="box-title-btn" |
|
|
|
v-if="!displayedForecast" |
|
|
|
@click="displayedForecast = true" |
|
|
|
> |
|
|
|
<img |
|
|
|
src="~@/assets/images/shuju/renfang/index/znyc.png" |
|
|
|
/> |
|
|
|
@ -256,9 +261,20 @@ |
|
|
|
src="~@/assets/images/shuju/renfang/index/i-hint.png" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div |
|
|
|
class="box-title-btn" |
|
|
|
v-else |
|
|
|
@click="displayedForecast = false" |
|
|
|
> |
|
|
|
<img |
|
|
|
src="~@/assets/images/shuju/main/back-on.png" |
|
|
|
/> |
|
|
|
<span style="color: #fff">返回</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="list"> |
|
|
|
<div class="list" v-if="!displayedForecast"> |
|
|
|
<div |
|
|
|
class="item" |
|
|
|
@click="toResiClassPage(item.type_id, item.name)" |
|
|
|
@ -288,6 +304,37 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="list" v-else> |
|
|
|
<div |
|
|
|
class="item" |
|
|
|
:key="item.code + index" |
|
|
|
v-for="(item, index) in resiCategoryForecastData" |
|
|
|
> |
|
|
|
<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.growth >= 0" |
|
|
|
src="~@/assets/images/shuju/renfang/index/up.png" |
|
|
|
/> |
|
|
|
<img |
|
|
|
v-else |
|
|
|
src="~@/assets/images/shuju/renfang/index/down.png" |
|
|
|
/> |
|
|
|
<b>{{ item.growthAbs }}</b> |
|
|
|
<span>人</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
@ -413,7 +460,9 @@ export default { |
|
|
|
}, |
|
|
|
], |
|
|
|
|
|
|
|
resiCategoryData: [], |
|
|
|
resiCategoryData: [], // 居民分类分析 |
|
|
|
resiCategoryForecastData: [], // 居民分类预测 |
|
|
|
displayedForecast: false, //显示居民分类分析 还是居民分类预测 |
|
|
|
|
|
|
|
searchModule: { |
|
|
|
displayedCard: false, |
|
|
|
@ -465,6 +514,7 @@ export default { |
|
|
|
// await this.getMapData(); |
|
|
|
// await this.getSubMapData(); |
|
|
|
this.getResiCategoryData(); |
|
|
|
this.getResiCategoryForecastData(); |
|
|
|
this.getPerInfo(); |
|
|
|
|
|
|
|
this.loading = true; |
|
|
|
@ -639,6 +689,39 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
//居民分类预测数据 |
|
|
|
async getResiCategoryForecastData() { |
|
|
|
console.log("=========================getResiCategoryForecastData"); |
|
|
|
const url = "resident_class_predict"; |
|
|
|
|
|
|
|
const { data, code, msg } = await requestPostBi( |
|
|
|
url, |
|
|
|
{ |
|
|
|
queryParam: { |
|
|
|
org_id: this.orgData.id, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
mockId: 60064667, |
|
|
|
} |
|
|
|
); |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
this.resiCategoryForecastData = data.map((item) => { |
|
|
|
return { |
|
|
|
code: item.resident_type, |
|
|
|
name: item.resident_type_name, |
|
|
|
count: item.resident_count, |
|
|
|
ratio: item.resident_ratio, |
|
|
|
growth: item.change_count, |
|
|
|
growthAbs: Math.abs(item.change_count), |
|
|
|
}; |
|
|
|
}); |
|
|
|
} else { |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
//获取地图上显示的组织数据 |
|
|
|
async getMapData() { |
|
|
|
console.log("=========================getMapData"); |
|
|
|
|