btxtgxq-system-population/src/main/resources/static/default.html
2023-11-26 16:40:22 +08:00

801 lines
33 KiB
HTML

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/html">
<head>
<base href="/population/">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all"/>
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all"/>
<link rel="stylesheet" href="assets/home/css/index.css">
<style>
.person_sta ul li {
cursor: pointer;
}
.ratio div{
cursor: pointer;
}
.h51{
cursor: pointer;
}
.h52{
cursor: pointer;
}
</style>
</head>
<body>
<!-- 父容器大盒子 -->
<div class="viewport" id="app" v-cloak>
<!-- flex:7 -->
<div class="column">
<!--人口数量统计-->
<div class="person_sta">
<ul>
<li @click="personShow()">
<img src="assets/home/images/bj1.png" alt="" class="bj">
<img src="assets/home/images/bj11.png" alt="" class="dz">
<img src="assets/home/images/bj111.png" alt="" class="dzstb">
<h5>人口总数</h5>
<span>
<em>{{ personCount }}</em>
<i></i>
</span>
</li>
<li @click="jieDaoRenKouShow('稀土路街道')">
<img src="assets/home/images/bj2.png" alt="" class="bj">
<img src="assets/home/images/bj22.png" alt="" class="dz">
<img src="assets/home/images/bj222.png" alt="" class="dzstb">
<h5>稀土路街道</h5>
<span>
<em>{{ xiTupersonCount }}</em>
<i></i>
</span>
</li>
<li @click="jieDaoRenKouShow('民馨路街道')">
<img src="assets/home/images/bj3.png" alt="" class="bj">
<img src="assets/home/images/bj33.png" alt="" class="dz">
<img src="assets/home/images/bj333.png" alt="" class="dzstb">
<h5>民馨路街道</h5>
<span>
<em>{{ mingXinpersonCount }}</em>
<i></i>
</span>
</li>
<li @click="jieDaoRenKouShow('万水泉镇')">
<img src="assets/home/images/bj4.png" alt="" class="bj">
<img src="assets/home/images/bj44.png" alt="" class="dz">
<img src="assets/home/images/bj444.png" alt="" class="dzstb">
<h5>万水泉镇</h5>
<span>
<em >{{ wanShuiQuanpersonCount }}</em>
<i></i>
</span>
</li>
</ul>
</div>
<!--地图-->
<div class="map">
<div class="chart">
<div class="geo" id="mapContainer"></div>
</div>
</div>
<!--人员记录统计-->
<div class="mod_record">
<div class="half_year">
<div class="halfbox_top">
<img src="assets/home/images/箭头.png" alt="">
<h4>近半年特殊人员记录</h4>
</div>
<div class="halfbox_bottom">
<div class="chart">
<div class="half_line" id="specialPersonChart"></div>
</div>
</div>
</div>
<div class="one_year">
<div class="onebox_top">
<img src="assets/home/images/箭头.png" alt="">
<h4>近一年信访管理类人员记录</h4>
</div>
<div class="onebox_bottom">
<div class="chart">
<div class="one_line" id="petitionRecordChart"></div>
</div>
</div>
</div>
</div>
</div>
<!-- flex:3 -->
<div class="column">
<!--政治面貌-->
<div class="politics">
<div class="politics_top">
<img src="assets/home/images/箭头.png" alt="">
<h4>政治面貌</h4>
</div>
<div class="politics_bottom">
<div class="chart">
<dic class="pie" id="politicalStatusChart"></dic>
</div>
</div>
</div>
<!--性别统计-->
<div class="gender">
<div class="gender_top">
<img src="assets/home/images/箭头.png" alt="">
<h4>性别统计</h4>
</div>
<div class="gender_bottom">
<img src="assets/home/images/man.png" alt="" class="man">
<img src="assets/home/images/woman.png" alt="" class="woman">
<em class="em_man">——{{ genderMaPercentage }}%</em>
<em class="em_woman">—{{ genderWomanPercentage }}%</em>
<div class="ratio">
<div class="manbox" style="background-image: url('assets/home/images/manryzb.png');background-size: cover;" @click="xingBieRenYuanShow('男性')">
<p class="man_p">{{ genderMaNum }}</p>
<h5>男性人数(人)</h5>
<span>
<i>占比</i>
<em>{{ genderMaPercentage }}%</em>
</span>
<div class="progress-bar1">
<div class="progress1"></div>
</div>
</div>
<div class="womanbox" style="background-image: url('assets/home/images/womanryzb.png');background-size: cover;" @click="xingBieRenYuanShow('女性')">
<p class="woman_p">{{ genderWomanNum }}</p>
<h5>女性人数(人)</h5>
<span>
<i>占比</i>
<em>{{ genderWomanPercentage }}%</em>
</span>
<div class="progress-bar2">
<div class="progress2"></div>
</div>
</div>
<div style="position: absolute;
top: 1.2rem;
left: 0.0rem;
width: 4.54rem;
height: 1.25rem;
background-image: url('assets/home/images/renyuanzhanbi.png');
background-size: contain;
"
>
</div>
</div>
</div>
</div>
<!-- 特殊信息类人员 -->
<div class="special">
<div class="special_top">
<img src="assets/home/images/箭头.png" alt="">
<h4>特殊信息类人员情况</h4>
</div>
<div class="special_bottom">
<img src="assets/home/images/r_33_1.png" alt="" class="r_33_1">
<img src="assets/home/images/r_33_2.png" alt="" class="r_33_2">
<h5 class="h51" @click="teShuRenYuanShow('社区矫正')">{{ correctCount }}人</h5>
<h5 class="h52" @click="teShuRenYuanShow('刑满释放')">{{ releaseCount }}人</h5>
<em class="em1">社区矫正对象</em>
<em class="em2">刑满释放人员</em>
</div>
</div>
<!-- 社会保障类人员 -->
<div class="society">
<div class="society_top">
<img src="assets/home/images/箭头.png" alt="">
<h4>社会保障类人员情况</h4>
</div>
<div class="society_bottom">
<div class="chart">
<div class="bar" id="protectPersonChart"></div>
</div>
</div>
</div>
</div>
</div>
<script src="assets/home/js/jquery.min.js"></script>
<script src="assets/home/js/flexible.js"></script>
<script type="text/javascript" src="assets/home/js/vue.js"></script>
<script type="text/javascript" src="assets/js/echarts.min.js"></script>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=3.0&ak=oWU9RD4ihDHAafexgI6XOrTK8lDatRju"></script>
<script>
layui.config({
base: 'assets/layuiadmin/' //静态资源所在路径
}).extend({
index: 'lib/index' //主入口模块
}).use(['index', 'laytpl'], function() {
var vue = new Vue({
el: '#app',
data: {
apiHost: 'http://219.147.99.164:8082/datahouse/',
headers: {
'PKEY': 'a0a25c1e-818a-489e-98c0-0f3a282a49d2',
'PPASS': '5be81fdf-2c5d-4ee6-ae45-ffe82b5db2ff'
},
longitude: 109.9169990478825,
latitude: 40.59520202810689,
genderMaNum: 0,
genderMaPercentage: 0,
genderWomanNum: 0,
genderWomanPercentage: 0,
correctCount: 0,
releaseCount: 0,
personCount: 0,
xiTupersonCount: 0,
mingXinpersonCount: 0,
wanShuiQuanpersonCount: 0,
},
methods: {
// 地图
initMap: function(){
map = new BMap.Map("mapContainer", {enableMapClick: false,});
var point = new BMap.Point(this.longitude, this.latitude);
map.centerAndZoom(point, 14);
map.disableDoubleClickZoom();
map.enableScrollWheelZoom();//启用地图滚轮放大缩小
map.enableContinuousZoom();//开启缩放平滑
},
// 初始化人口
initPerson: function(){
var self = this;
$.ajax({
url: self.apiHost + "app/query/sqlrelease/q3cd32d5",
type: 'GET',
dataType: 'JSON',
headers: self.headers,
success: function(data) {
self.personCount = data.renKou;
self.xiTupersonCount = data.xiTu;
self.mingXinpersonCount = data.minXin;
self.wanShuiQuanpersonCount = data.wanShuiQuan;
}
})
},
// 初始化性别
initGenderData: function(){
var self = this;
$.ajax({
url: self.apiHost + "app/query/sqlrelease/q1152adc",
type: 'GET',
dataType: 'JSON',
headers: self.headers,
success: function(data) {
$.each(data, function(i,v){
if('男性' === v.name){
self.genderMaNum = v.value;
self.genderMaPercentage = v.percent;
}else if('女性' === v.name){
self.genderWomanNum = v.value;
self.genderWomanPercentage = v.percent;
}
});
var progressBar1 = document.querySelector('.progress1');
progressBar1.style.width = self.genderMaPercentage + '%';
var progressBar2 = document.querySelector('.progress2');
progressBar2.style.width = self.genderWomanPercentage + '%';
}
})
},
// 特殊信息类人员
initSpecialPeopleData: function(){
var self = this;
$.ajax({
url: self.apiHost + "app/query/sqlrelease/q146cefa",
type: 'GET',
dataType: 'JSON',
headers: self.headers,
success: function(data) {
self.releaseCount = data.releaseCount;
self.correctCount = data.correctCount;
}
})
},
// 政治面貌
initPoliticalStatusData: function(){
var self = this;
var option = {
color: ["#5189FF", "#FF9C3D", "#00FFBC", "#FFB200"],
tooltip: {
trigger: 'item',
// 格式化提示内容:
// a 代表series系列图表名称
// b 代表series数据名称 data 里面的name
// c 代表series数据值 data 里面的value
// d代表 当前数据/总数据的比例
// formatter: "{b} : {c}"
},
legend: {
orient: 'vertical',
/* bottom: '5%',*/
top: '30%',
left: 'left',
align: 'auto',
},
series: [
{
// name: 'Access From',
type: 'pie',
radius: ['50%', '80%'],
avoidLabelOverlap: false,
itemStyle: {
borderRadius: 10,
borderColor: '#fff',
borderWidth: 0
},
label: {
show: true,
fontSize: 12,
color: '#fff',
fontWeight: 'bold',
formatter: '{b}{c}'
// position: 'center'
},
/*emphasis: {
label: {
show: true,
fontSize: 40,
fontWeight: 'bold'
}
},*/
labelLine: {
show: true
},
hoverOffset: 0,
data: [
/*{ value: 31, name: "中国共产党员" },
{ value: 29, name: "共青团员" },
{ value: 25, name: "预备党员" },
{ value: 15, name: "其他" }*/
]
}
]
};
var myChart = echarts.init(document.getElementById('politicalStatusChart'));
$.ajax({
url: self.apiHost + "app/query/sqlrelease/qe41cc66",
type: 'GET',
dataType: 'JSON',
headers: self.headers,
success: function(data) {
option.series[0]['data'] = data;
myChart.setOption(option);
}
});
myChart.on('click', function(params) {
self.zhengZhiMianMaoRenYuanShow(params.name);
});
},
// 社会保障类人员情况
initProtectPerson: function(){
var self = this;
var option = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: [
{
type: 'category',
data: [],
axisLabel: {
color: "#fff",
interval: 0,
},
axisTick: {
alignWithLabel: false
},
axisTick: {
show: false // 去除刻度
},
axisLine: {
show: false // 去除轴线
},
}
],
yAxis: [
{
type: 'value',
axisLabel: {
color: "#fff"
},
splitLine: {
lineStyle: {
color: "#C1E5EC" // 分割线颜色
}
},
axisTick: {
show: false // 去除刻度
},
axisLine: {
show: false // 去除轴线
},
}
],
color: "#FF6D44",
series: [
{
name: 'Direct',
type: 'bar',
barWidth: '60%',
data: []
}
]
};
var myChart = echarts.init(document.getElementById('protectPersonChart'));
$.ajax({
url: self.apiHost + "app/query/sqlrelease/qe34cc66",
type: 'GET',
dataType: 'JSON',
headers: self.headers,
success: function(data) {
$.each(data, function(i,v){
option.xAxis[0]['data'].push(v.name);
option.series[0]['data'].push(v.value);
});
myChart.setOption(option);
}
});
myChart.on('click', function(params) {
self.sheHuiBaoZhangRenYuanShow(params.name)
});
},
// 近一年信访管理类人员记录
initPetitionRecord: function(){
var self = this;
var option = {
tooltip: {
trigger: 'axis'
},
legend: {
// data: ['Email', 'Union Ads']
textStyle: {
color: '#fff' // 图例文字颜色
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'category',
boundaryGap: false,
data: [],
axisLabel: {
color: "#fff" // 文字颜色
},
axisLine: {
show: false // 去除轴线
},
axisTick: {
alignWithLabel: false
},
},
yAxis: {
type: 'value',
axisTick: {
show: false // 去除刻度
},
axisLine: {
show: false // 去除轴线
},
axisLabel: {
color: "#fff" // 文字颜色
},
splitLine: {
lineStyle: {
color: "#6DCCF8" // 分割线颜色
}
}
},
color: ["#3273E5", "#54EBFD", "#51FC5B", "#FBBB24", "#FB772B"],
series: [
{
name: "矛盾纠纷",
type: 'line',
// stack: 'Total',
smooth: true,
data: [],
/*label: {
show: true,
formatter: function(params) {
// 在标签中显示数据值
return params.value + "131232";
}
}*/
},
{
name: "社会治安",
type: 'line',
// stack: 'Total',
smooth: true,
data: []
},
{
name: "吸毒人员",
type: 'line',
// stack: 'Total',
smooth: true,
data: []
},
{
name: "涉邪人员",
type: 'line',
// stack: 'Total',
smooth: true,
data: []
},
{
name: "重点上访",
type: 'line',
// stack: 'Total',
smooth: true,
data: []
},
]
};
var myChart = echarts.init(document.getElementById('petitionRecordChart'));
$.ajax({
url: self.apiHost + "app/query/sqlrelease/q8d0f588",
type: 'GET',
dataType: 'JSON',
headers: self.headers,
success: function(data) {
$.each(data, function(i,v){
option.xAxis['data'].push(v['月份'] + '月');
option.series[0]['data'].push(v['矛盾纠纷']);
option.series[1]['data'].push(v['社会治安']);
option.series[2]['data'].push(v['涉毒人员']);
option.series[3]['data'].push(v['涉邪人员']);
option.series[4]['data'].push(v['重点上访户']);
});
myChart.setOption(option);
}
});
myChart.on('click', function(params) {
self.xinFangRenYuanShow(params.seriesName)
});
},
// 近半年特殊人员记录
initSpecialPersonData: function(){
var self = this;
var option = {
tooltip: {
trigger: 'axis'
},
legend: {
textStyle: {
color: '#fff' // 图例文字颜色
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'category',
boundaryGap: false,
data: [],
axisLabel: {
color: "#fff" // 文字颜色
},
axisLine: {
show: false // 去除轴线
},
axisTick: {
alignWithLabel: false
},
},
yAxis: {
type: 'value',
axisTick: {
show: false // 去除刻度
},
axisLine: {
show: false // 去除轴线
},
axisLabel: {
color: "#fff" // 文字颜色
},
splitLine: {
lineStyle: {
color: "#6DCCF8" // 分割线颜色
}
}
},
color: ["#FF9313", "#48EDF5"],
series: [
{
name: "社区矫正",
type: 'line',
// stack: 'Total',
smooth: true,
data: []
},
{
name: "刑满释放",
type: 'line',
// stack: 'Total',
smooth: true,
data: []
}
]
};
var myChart = echarts.init(document.getElementById('specialPersonChart'))
$.ajax({
url: self.apiHost + "app/query/sqlrelease/q316ecca",
type: 'GET',
dataType: 'JSON',
headers: self.headers,
success: function(data) {
$.each(data, function(i,v){
option.xAxis['data'].push(v['month'] + '月');
option.series[0]['data'].push(v['sheQu']);
option.series[1]['data'].push(v['xingMan']);
});
myChart.setOption(option);
}
});
myChart.on('click', function(params) {
self.teShuRenYuanShow(params.seriesName)
});
},
// 二级页面 - 人口总数
personShow: function(){
top.dialog.open({
url: top.restAjax.path('route/populationinfo-data/total', []),
title: '人口总数',
width: '80%',
height: '80%',
onClose: function() {
}
});
},
// 二级页面 - 街道人口
jieDaoRenKouShow: function(data){
top.dialog.open({
url: top.restAjax.path('route/populationinfo-data/jiedao?name={name}', [data]),
title: data + '人口',
width: '80%',
height: '80%',
onClose: function() {
}
});
},
// 二级页面 - 特殊人员
teShuRenYuanShow: function(data){
top.dialog.open({
url: top.restAjax.path('route/populationinfo-data/teshu?name={name}', [data]),
title: data,
width: '80%',
height: '80%',
onClose: function() {
}
});
},
// 二级页面 - 性别人员
xingBieRenYuanShow: function(data){
top.dialog.open({
url: top.restAjax.path('route/populationinfo-data/sex?name={name}', [data]),
title: data + '人员',
width: '80%',
height: '80%',
onClose: function() {
}
});
},
//二级页面 - 社会保障类人员
sheHuiBaoZhangRenYuanShow: function(data){
top.dialog.open({
url: top.restAjax.path('route/populationinfo-data/baozhang?name={name}', [data]),
title: data + '人员',
width: '80%',
height: '80%',
onClose: function() {
}
});
},
//二级页面 - 政治面貌
zhengZhiMianMaoRenYuanShow: function(data){
top.dialog.open({
url: top.restAjax.path('route/populationinfo-data/organization?name={name}', [data]),
title: data + '人员',
width: '80%',
height: '80%',
onClose: function() {
}
});
},
/*//二级页面 - 近半年特殊人员
banNianTeShuRenYuanShow: function(data){
top.dialog.open({
url: top.restAjax.path('route/populationinfo-data/organization?name={name}', [data]),
title: data + '人员',
width: '80%',
height: '80%',
onClose: function() {
}
});
},*/
//二级页面 - 近一年信访人员记录
xinFangRenYuanShow: function(data){
console.log(data)
top.dialog.open({
url: top.restAjax.path('route/populationinfo-data/xinfang?name={name}', [data]),
title: data,
width: '80%',
height: '80%',
onClose: function() {
}
});
},
},
mounted: function () {
this.initMap();
this.initPerson();
this.initGenderData();
this.initSpecialPeopleData();
this.initPoliticalStatusData();
this.initProtectPerson();
this.initPetitionRecord();
this.initSpecialPersonData();
}
});
});
</script>
</body>
</html>