|
|
@@ -1,5 +1,6 @@
|
|
|
<template>
|
|
|
- <div class="full" style="z-index: 9;">
|
|
|
+ <div class="full" style="z-index: 9;">
|
|
|
+ <!-- 左部视图 -->
|
|
|
<div class="left-view">
|
|
|
<dv-border-box-11 title="人口年龄结构图" class="animate__animated animate__backInLeft animate__faster" ref="border3"
|
|
|
style="height: 70%;" :color="color" :backgroundColor="backgroundColor">
|
|
|
@@ -23,13 +24,25 @@
|
|
|
|
|
|
<!-- 底部视图 -->
|
|
|
<div class="bottom-view">
|
|
|
- <dv-border-box-12 class="animate__animated animate__backInLeft animate__faster" style="height: 100%"
|
|
|
- :color="color" :backgroundColor="backgroundColor">
|
|
|
+ <dv-border-box-12 style="position: relative;height: 100%" class="animate__animated animate__backInLeft animate__faster"
|
|
|
+ :color="color" :backgroundColor="backgroundColor">
|
|
|
<dv-border-box-1>
|
|
|
<div style="padding: 10px;width: 100%;height: 100%;padding-top: 20px;">
|
|
|
<div id="personChangeOption" style="height: 90%;width: 100%;"></div>
|
|
|
</div>
|
|
|
</dv-border-box-1>
|
|
|
+
|
|
|
+ <div style="position: absolute;top: 6%;right: 4%;">
|
|
|
+ <el-select @change="selectChange" size="mini" popper-class="popperClass1" v-model="value" placeholder="请选择">
|
|
|
+ <el-option
|
|
|
+ v-for="item in options"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+
|
|
|
</dv-border-box-12>
|
|
|
</div>
|
|
|
|
|
|
@@ -47,7 +60,7 @@
|
|
|
:color="color" :backgroundColor="backgroundColor">
|
|
|
<dv-border-box-1 style="height: 100%;">
|
|
|
<div style="text-align: center;padding-top: 15px;font-size: 20px;" :style="{color:fontColor}">
|
|
|
- 特殊人员变化
|
|
|
+ 特殊人员变化
|
|
|
</div>
|
|
|
<div style="padding: 10px;width: 100%;height: 100%;padding-top: 20px;">
|
|
|
<div id="specialPersonnelChange" style="height: 90%;width: 100%;"></div>
|
|
|
@@ -66,6 +79,15 @@
|
|
|
fontColor: "#00f9cf",
|
|
|
backgroundColor: "rgba(15, 33, 70, 0.6)",
|
|
|
color: ['#0f234a', '#2b496a'],
|
|
|
+
|
|
|
+ options: [{
|
|
|
+ value: 'month',
|
|
|
+ label: '最近一个月'
|
|
|
+ }, {
|
|
|
+ value: 'year',
|
|
|
+ label: '最近一年'
|
|
|
+ }],
|
|
|
+ value: 'month'
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
@@ -82,6 +104,9 @@
|
|
|
this.getSpecialPersonnelChange()
|
|
|
this.getProportionOfKeyPersonnel()
|
|
|
},
|
|
|
+ selectChange(e){
|
|
|
+ this.getPersonChangeOption(e)
|
|
|
+ },
|
|
|
getSpecialPersonnelChange() {
|
|
|
var myChart = this.$echarts.init(document.getElementById('specialPersonnelChange'));
|
|
|
let option = {
|
|
|
@@ -96,7 +121,7 @@
|
|
|
}
|
|
|
},
|
|
|
legend: {
|
|
|
- data: ['重点人员', '关爱人员','服务人员'],
|
|
|
+ data: ['重点人员', '关爱人员', '服务人员'],
|
|
|
textStyle: {
|
|
|
color: "#fff"
|
|
|
},
|
|
|
@@ -112,23 +137,23 @@
|
|
|
},
|
|
|
xAxis: {
|
|
|
type: 'category',
|
|
|
- data: ['2020-06', '2020-07', '2020-08', '2020-09', '2020-10', '2020-11', '2020-12', '2021-01','2021-02'],
|
|
|
+ data: ['2020-06', '2020-07', '2020-08', '2020-09', '2020-10', '2020-11', '2020-12', '2021-01', '2021-02'],
|
|
|
},
|
|
|
- color:['#3cb2ef','#9fe080','#5470c6'],
|
|
|
+ color: ['#3cb2ef', '#9fe080', '#5470c6'],
|
|
|
series: [{
|
|
|
name: '重点人员',
|
|
|
type: 'bar',
|
|
|
- data: [6,0,10,96,23,87,20,26,10]
|
|
|
+ data: [6, 0, 10, 96, 23, 87, 20, 26, 10]
|
|
|
},
|
|
|
{
|
|
|
name: '关爱人员',
|
|
|
type: 'bar',
|
|
|
- data: [96,10,0,30,0,23,6,12,26]
|
|
|
+ data: [96, 10, 0, 30, 0, 23, 6, 12, 26]
|
|
|
},
|
|
|
{
|
|
|
name: '服务人员',
|
|
|
type: 'bar',
|
|
|
- data: [56,20,90,35,43,0,56,45,36]
|
|
|
+ data: [56, 20, 90, 35, 43, 0, 56, 45, 36]
|
|
|
}
|
|
|
]
|
|
|
};
|
|
|
@@ -141,7 +166,7 @@
|
|
|
text: '重点人员比例',
|
|
|
left: 'center',
|
|
|
textStyle: {
|
|
|
- color: this.fontColor,
|
|
|
+ color: this.fontColor,
|
|
|
},
|
|
|
},
|
|
|
tooltip: {
|
|
|
@@ -154,7 +179,7 @@
|
|
|
color: "#fff"
|
|
|
},
|
|
|
},
|
|
|
- color:['#37a2da','#32c5e9','#67e0e3','#32c5e9','#ffdb5c','#9fe080','#5c7caf'],
|
|
|
+ color: ['#37a2da', '#32c5e9', '#67e0e3', '#32c5e9', '#ffdb5c', '#9fe080', '#5c7caf'],
|
|
|
series: [{
|
|
|
name: '重点人员',
|
|
|
type: 'pie',
|
|
|
@@ -199,8 +224,30 @@
|
|
|
};
|
|
|
myChart.setOption(option);
|
|
|
},
|
|
|
- getPersonChangeOption() {
|
|
|
+ getPersonChangeOption(type='month') {
|
|
|
var myChart = this.$echarts.init(document.getElementById('personChangeOption'));
|
|
|
+ let nameList=[]
|
|
|
+ let valueList={}
|
|
|
+ if (type=='month') {
|
|
|
+ nameList=['05-02', '05-03', '05-04', '05-05', '05-06', '05-07', '05-08', '05-09', '05-10',
|
|
|
+ '05-11', '05-12', '05-13', '05-14', '05-15', '05-16', '05-17', '05-18', '05-19', '05-20',
|
|
|
+ '05-21', '05-22', '05-23', '05-24', '05-25', '05-26', '05-27', '05-28', '05-29', '05-30'
|
|
|
+ ]
|
|
|
+ valueList={
|
|
|
+ permanent:[0, 0, 0, 0, 0, 3, 4, 13, 0, 0, 1, 1, 0, 0, 0, 0, 9, 8, 0, 4, 5, 0, 0, 8, 0, 5, 12, 4, 0, 0],
|
|
|
+ flow:[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 4, 5, 0, 0, 8, 0, 5, 5, 2, 0, 0],
|
|
|
+ overseas:[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ nameList=['2020-07','2020-08','2020-09','2020-10','2020-11','2020-12','2021-01','2021-02','2021-03','2021-04',
|
|
|
+ '2021-05','2021-06'
|
|
|
+ ]
|
|
|
+ valueList={
|
|
|
+ permanent:[0, 0, 0, 0,3187, 1, 0, 0 , 0, 0, 0, 0],
|
|
|
+ flow:[0, 0, 0, 0, 210, 4, 0, 0, 0, 0, 0, 0],
|
|
|
+ overseas:[0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0]
|
|
|
+ }
|
|
|
+ }
|
|
|
let option = {
|
|
|
title: {
|
|
|
text: '小区人口变化',
|
|
|
@@ -227,22 +274,14 @@
|
|
|
bottom: '4%',
|
|
|
containLabel: true
|
|
|
},
|
|
|
- toolbox: {
|
|
|
- feature: {
|
|
|
- saveAsImage: {}
|
|
|
- }
|
|
|
- },
|
|
|
- color:['#37a2da','#32c5e9','#9fe080'],
|
|
|
+ color: ['#37a2da', '#32c5e9', '#9fe080'],
|
|
|
xAxis: {
|
|
|
splitLine: {
|
|
|
show: false
|
|
|
},
|
|
|
type: 'category',
|
|
|
boundaryGap: false,
|
|
|
- data: ['05-02', '05-03', '05-04', '05-05', '05-06', '05-07', '05-08', '05-09', '05-10',
|
|
|
- '05-11', '05-12', '05-13', '05-14', '05-15', '05-16', '05-17', '05-18', '05-19', '05-20',
|
|
|
- '05-21', '05-22', '05-23', '05-24', '05-25', '05-26', '05-27', '05-28', '05-29', '05-30'
|
|
|
- ],
|
|
|
+ data: nameList,
|
|
|
},
|
|
|
yAxis: {
|
|
|
splitLine: {
|
|
|
@@ -255,21 +294,21 @@
|
|
|
type: 'line',
|
|
|
stack: '人数',
|
|
|
smooth: true,
|
|
|
- data: [0, 0, 0, 0, 0, 3, 4, 13, 0, 0, 1, 1, 0, 0, 0, 0, 9, 8, 0, 4, 5, 0, 0, 8, 0, 5, 12, 4, 0, 0]
|
|
|
+ data: valueList.permanent
|
|
|
},
|
|
|
{
|
|
|
name: '流动人口',
|
|
|
type: 'line',
|
|
|
stack: '人数',
|
|
|
smooth: true,
|
|
|
- data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 4, 5, 0, 0, 8, 0, 5, 5, 2, 0, 0]
|
|
|
+ data: valueList.flow
|
|
|
},
|
|
|
{
|
|
|
name: '境外人口',
|
|
|
type: 'line',
|
|
|
stack: '人数',
|
|
|
smooth: true,
|
|
|
- data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
|
|
+ data: valueList.overseas
|
|
|
}
|
|
|
]
|
|
|
};
|
|
|
@@ -291,13 +330,13 @@
|
|
|
color: this.fontColor
|
|
|
},
|
|
|
},
|
|
|
- textStyle:{
|
|
|
- color:"#fff"
|
|
|
+ textStyle: {
|
|
|
+ color: "#fff"
|
|
|
},
|
|
|
legend: {
|
|
|
data: ['男', '女'],
|
|
|
- textStyle:{
|
|
|
- color:"#fff"
|
|
|
+ textStyle: {
|
|
|
+ color: "#fff"
|
|
|
}
|
|
|
},
|
|
|
grid: {
|
|
|
@@ -323,7 +362,7 @@
|
|
|
emphasis: {
|
|
|
focus: 'series'
|
|
|
},
|
|
|
- data: [1833,0,0,0,0]
|
|
|
+ data: [1833, 0, 0, 0, 0]
|
|
|
},
|
|
|
{
|
|
|
name: '女',
|
|
|
@@ -335,7 +374,7 @@
|
|
|
emphasis: {
|
|
|
focus: 'series'
|
|
|
},
|
|
|
- data: [1680,0,0,0,0]
|
|
|
+ data: [1680, 0, 0, 0, 0]
|
|
|
}
|
|
|
]
|
|
|
};
|
|
|
@@ -399,7 +438,49 @@
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
+<style>
|
|
|
+ .popperClass1 {
|
|
|
+ background-color: #fff !important;
|
|
|
+ z-index: 9999 !important;
|
|
|
+ color: #FFFFFF !important;
|
|
|
+ border-color: #fff !important
|
|
|
+ }
|
|
|
+</style>
|
|
|
+
|
|
|
<style lang="scss" scoped>
|
|
|
+ ::v-deep {
|
|
|
+ .el-input__inner {
|
|
|
+ color: #fff;
|
|
|
+ border-color: rgba(104, 141, 199, 0.7);
|
|
|
+ background-color: rgba(104, 141, 199, 0.7);
|
|
|
+ width: 105px;
|
|
|
+ height: 25px;
|
|
|
+ border-radius: 0;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ .el-input__suffix {
|
|
|
+ right: 0px;
|
|
|
+ transition: all .3s;
|
|
|
+ pointer-events: none;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-select-dropdown__item {
|
|
|
+ font-size: 14px;
|
|
|
+ padding: 0 20px;
|
|
|
+ position: relative;
|
|
|
+ white-space: nowrap;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ color: #FFFFFF;
|
|
|
+ height: 34px;
|
|
|
+ line-height: 34px;
|
|
|
+ -webkit-box-sizing: border-box;
|
|
|
+ box-sizing: border-box;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
.full {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
@@ -452,11 +533,4 @@
|
|
|
right: 22%;
|
|
|
height: calc(24%);
|
|
|
}
|
|
|
-
|
|
|
- .title {
|
|
|
- width: 90%;
|
|
|
- height: 15%;
|
|
|
- color: white;
|
|
|
- font-size: 18px
|
|
|
- }
|
|
|
</style>
|