<template>
|
<div class="left-panel">
|
<!-- 参与统计 -->
|
<div class="statistics-box">
|
<div class="box-title">各街道/乡参与排名</div>
|
</div>
|
|
<!-- 各街道参与排名 -->
|
<div class="ranking-box">
|
<div class="box-title">各街道/乡参与排名</div>
|
<!-- <<div class="ranking-list">
|
<div v-for="(item, index) in rankingList" :key="index" class="ranking-item">
|
<span class="rank">{{ index + 1 }}</span>
|
<span class="name">{{ item.name }}</span>
|
<div class="progress-bar">
|
<div class="progress" :style="{ width: item.percentage + '%' }"></div>
|
</div>
|
<span class="value">{{ item.value }}</span>
|
</div>
|
</div> -->
|
</div>
|
|
<!-- 安置房完成比 -->
|
<div class="line-chart">
|
<div class="box-title">安置房完成比</div>
|
<div class="pie-chart">
|
<v-chart class="chart" :option="pieOption" autoresize />
|
</div>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
export default {
|
name: 'LeftPanel',
|
data() {
|
return {
|
totalHouseholds: 87695,
|
totalPeople: 876995,
|
rankingList: [
|
{ name: '崇州街道', percentage: 90, value: '999户' },
|
{ name: '羊马乡', percentage: 85, value: '999户' },
|
{ name: '万家镇', percentage: 80, value: '999户' },
|
{ name: '崇阳街道', percentage: 75, value: '999户' },
|
{ name: '白头镇', percentage: 70, value: '999户' },
|
{ name: '金鸡乡', percentage: 65, value: '999户' },
|
{ name: '西江镇', percentage: 60, value: '999户' },
|
{ name: '观胜镇', percentage: 55, value: '999户' }
|
],
|
pieOption: {
|
tooltip: {
|
trigger: 'item'
|
},
|
series: [{
|
type: 'pie',
|
radius: ['65%', '80%'],
|
label: {
|
show: false
|
},
|
data: [
|
{ value: 34.5, name: '商业用房' },
|
{ value: 30, name: '住宅' },
|
{ value: 35.5, name: '其他' }
|
],
|
itemStyle: {
|
color: function(params) {
|
const colorList = ['#00ffff', '#7cb9e8', 'rgba(0,255,255,0.5)'];
|
return colorList[params.dataIndex];
|
}
|
}
|
}]
|
}
|
};
|
}
|
};
|
</script>
|
|
<style lang="less" scoped>
|
.left-panel {
|
position: absolute;
|
top: 111px;
|
left: 20px;
|
width: 440px;
|
bottom: 20px;
|
.statistics-box {
|
height: 196px;
|
background: url('@/assets/left-top-bg.png') no-repeat center center;
|
background-size: 100% 100%;
|
}
|
.ranking-box {
|
height: 466px;
|
margin-top: 21px;
|
background: url('@/assets/left-middle-bg.png') no-repeat center center;
|
background-size: 100% 100%;
|
}
|
.line-chart {
|
height: 244px;
|
margin-top: 21px;
|
background: url('@/assets/left-bottom-bg.png') no-repeat center center;
|
background-size: 100% 100%;
|
}
|
|
|
.box-title {
|
font-size: 14px;
|
color: #19ECFF;
|
text-align: center;
|
padding-top: 9px;
|
line-height: 21px;
|
}
|
|
|
.ranking-item {
|
display: flex;
|
align-items: center;
|
|
.rank {
|
width: 20px;
|
color: #00ffff;
|
}
|
|
.name {
|
width: 80px;
|
}
|
|
.progress-bar {
|
flex: 1;
|
height: 6px;
|
background: rgba(0,255,255,0.1);
|
border-radius: 3px;
|
|
.progress {
|
height: 100%;
|
background: linear-gradient(to right, #00ffff, #7cb9e8);
|
border-radius: 3px;
|
}
|
}
|
|
.value {
|
width: 60px;
|
text-align: right;
|
color: #00ffff;
|
}
|
}
|
|
.chart {
|
width: 100%;
|
height: calc(100% - 35px);
|
}
|
}
|
</style>
|