特殊人群
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
<div class="tab-list">
|
<div class="tab-list">
|
||||||
<div :class="index == tabIndex ? 'tab-item active' : 'tab-item'" v-for="(item, index) in tabList" :key="index" @click="tabClick(index)">{{ item.text }}<span></span></div>
|
<div :class="index == tabIndex ? 'tab-item active' : 'tab-item'" v-for="(item, index) in tabList" :key="index" @click="tabClick(index)">{{ item.text }}<span></span></div>
|
||||||
</div>
|
</div>
|
||||||
<component ref='list' :is="tabList[tabIndex].component" class="component" />
|
<component ref='list' :is="tabList[tabIndex].component" :areaId="areaId" class="component" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ export default {
|
|||||||
this.refreshList()
|
this.refreshList()
|
||||||
},
|
},
|
||||||
refreshList() {
|
refreshList() {
|
||||||
// this.$nextTick(() => this.$refs.list.getData())
|
this.$nextTick(() => this.$refs.list.getData())
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
|||||||
@@ -1,17 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="resident">
|
<div class="resident">
|
||||||
<div class="resident_num">
|
<div class="resident_num">
|
||||||
<div class="num_item">
|
<div class="num_item" v-for="(item,index) in cardArray" :key="index">
|
||||||
<p class="num_item_name">居民总数</p>
|
<p class="num_item_name">{{ item }}</p>
|
||||||
<p class="num_item_data">2036</p>
|
<p class="num_item_data">{{ Number(data[item]).toLocaleString('en-US') }}</p>
|
||||||
</div>
|
|
||||||
<div class="num_item">
|
|
||||||
<p class="num_item_name">居民总数</p>
|
|
||||||
<p class="num_item_data">2036</p>
|
|
||||||
</div>
|
|
||||||
<div class="num_item">
|
|
||||||
<p class="num_item_name">居民总数</p>
|
|
||||||
<p class="num_item_data">2036</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -19,7 +11,8 @@
|
|||||||
<div class="specialPeople">
|
<div class="specialPeople">
|
||||||
<h3>特殊人群</h3>
|
<h3>特殊人群</h3>
|
||||||
<div class="specialBox">
|
<div class="specialBox">
|
||||||
<div id="specialEcharts"></div>
|
<div id="specialEcharts" v-if="specialFlag"></div>
|
||||||
|
<AiEmpty style="padding-top: 10px;" description="暂无数据" v-else></AiEmpty>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 年龄分布 -->
|
<!-- 年龄分布 -->
|
||||||
@@ -33,22 +26,31 @@
|
|||||||
<div class="ageProportion">
|
<div class="ageProportion">
|
||||||
<h3>男女比例</h3>
|
<h3>男女比例</h3>
|
||||||
<div class="proportionBox">
|
<div class="proportionBox">
|
||||||
<div id="proportionEcharts"></div>
|
<div id="proportionEcharts" v-if="sexFlag"></div>
|
||||||
|
<AiEmpty style="padding-top: 10px;" description="暂无数据" v-else></AiEmpty>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import * as echarts from 'echarts';
|
import echarts from 'echarts';
|
||||||
export default {
|
export default {
|
||||||
name: "resident",
|
name: "resident",
|
||||||
|
props: ['areaId'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
data: {},
|
||||||
|
specialPeople: {},
|
||||||
|
specialFlag: true,
|
||||||
|
ageArray: [],
|
||||||
|
sexArray: [],
|
||||||
|
sexFlag: true,
|
||||||
|
cardArray: ['居民总数','本地居民','流动人口']
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
this.getData()
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getSpecialEcharts()
|
this.getSpecialEcharts()
|
||||||
@@ -56,6 +58,21 @@ export default {
|
|||||||
this.getAgeProportion()
|
this.getAgeProportion()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getData() {
|
||||||
|
this.$http.post(`/app/appresident/residentStatisticsByAreaId?areaId=${this.areaId}`).then(res=> {
|
||||||
|
if(res?.data) {
|
||||||
|
this.data = res.data
|
||||||
|
this.specialPeople = res.data.特殊人群
|
||||||
|
for(let key in this.specialPeople) {
|
||||||
|
if(this.specialPeople[key] == 0) {
|
||||||
|
this.specialFlag = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.ageArray = res.data.年龄层次
|
||||||
|
this.aexArray = res.data.男女比例
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
// 特殊人群
|
// 特殊人群
|
||||||
getSpecialEcharts() {
|
getSpecialEcharts() {
|
||||||
let specialDom = document.getElementById('specialEcharts');
|
let specialDom = document.getElementById('specialEcharts');
|
||||||
@@ -110,10 +127,11 @@ export default {
|
|||||||
maxSurfaceAngle: 80
|
maxSurfaceAngle: 80
|
||||||
},
|
},
|
||||||
data: [
|
data: [
|
||||||
{ value: 1048, name: '退伍军人' },
|
{ value: this.specialPeople.吸毒人员, name: '吸毒人员' },
|
||||||
{ value: 735, name: '吸毒人员' },
|
{ value: this.specialPeople.残疾人, name: '残疾人' },
|
||||||
{ value: 580, name: '刑满释放人员' },
|
{ value: this.specialPeople.刑满释放人员, name: '刑满释放人员' },
|
||||||
{ value: 484, name: '高龄老人' },
|
{ value: this.specialPeople.社区矫正人群, name: '社区矫正人群' },
|
||||||
|
{ value: this.specialPeople.精神病人, name: '精神病人' },
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="update">
|
<div class="update">
|
||||||
<h3>更新统计</h3>
|
<h3>更新统计</h3>
|
||||||
<div class="information">
|
<div class="information">
|
||||||
<u-subsection :list="list" :current="1"></u-subsection>
|
<u-subsection :list="list" :current="current"></u-subsection>
|
||||||
|
|
||||||
<div class="card_list">
|
<div class="card_list">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
@@ -57,14 +57,18 @@ export default {
|
|||||||
name: '本年'
|
name: '本年'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
current: 1,
|
current: 0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
// this.getData()
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
methods: {},
|
methods: {
|
||||||
|
getData() {
|
||||||
|
// this.
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user