/**
* 大数据统计图表
* */
//初始获取本月案件统计信息
function getCaseStatistics() {
$.ajax({
type : "post",
url : "../../easyAPI/case/getCaseStatistics.action",
contentType : "charset=utf-8",
success : function(data) {
if (data != undefined || data != null) {
$("#casenum_110").html(data.resource110); // 110案件数
$("#casenum_119").html(data.resource119);// 119案件数
$("#casenum_122").html(data.resource122);// 122案件数
$("#casenum_total").html(data.casenum_total); // 案件总数
$("#casenum_criminal").html(data.casenum_criminal); // 刑事案件数
$("#casenum_safety").html(data.casenum_safety);// 治安案件数
$("#casenum_civil").html(data.casenum_civil); // 民事案件数
$("#casenum_traffic").html(data.casenum_traffic);// 交通
$("#casenum_sos").html(data.casenum_sos);// 求助
$("#casenum_null").html(data.casenum_null);// 无效
}else{
console.log("案件统计信息为空!");
}
},
error : function(XMLHttpRequest, textStatus, errorThrown) {
console.log("获取案件统计信息失败!");
}
});
}
//初始获取值班信息
function getDutyInfoData() {
$.ajax({
type : "post",
url : "../../easyAPI/duty/getDutyInfoData.action",
contentType : "charset=utf-8",
success : function(data) {
if (data != undefined || data != '') {
var dutyInfoData = {dutyData:[],dutyInfocategories:[],dutyInfolinks:[]};
for(var key = 0;key{b}: {c} ({d}%)"
},
legend: {
show: false,
orient: 'vertical',
x: 'left',
data:['重点人口','流动人口','普通人口']
},
series: [
{
name:'接入人口资源',
type:'pie',
radius: ['57%', '80%'],
avoidLabelOverlap: false,
label: {
normal: {
show: false,
position: 'center',
padding: [22, 0, 0, 0]
},
emphasis: {
show: true,
textStyle: {
fontSize: '11',
fontWeight: 'bold',
color: '#fff065'
}
}
},
labelLine: {
normal: {
show: false
}
},
startAngle: 315,
minAngle: 2,
hoverOffset: 3,
data:peopleData
}
]
};
var addOption = {
title: {
text: '地址资源',
left: 'center',
top: 37,
textStyle: {
color: '#f1f1f1',
fontSize: '13',
fontWeight: 'bold'
}
},
tooltip: {
trigger: 'item',
formatter: "{a}
{b}: {c} ({d}%)"
},
legend: {
show: false,
orient: 'vertical',
x: 'left',
data:['地名地址','房屋']
},
series: [
{
name:'接入地址资源',
type:'pie',
radius: ['57%', '80%'],
avoidLabelOverlap: false,
label: {
normal: {
show: false,
position: 'center',
padding: [22, 0, 0, 0]
},
emphasis: {
show: true,
textStyle: {
fontSize: '11',
fontWeight: 'bold',
color: '#fff065'
}
}
},
labelLine: {
normal: {
show: false
}
},
startAngle: 315,
minAngle: 2,
hoverOffset: 3,
data:addData
}
]
};
var depOption = {
title: {
text: '单位资源',
left: 'center',
top: 37,
textStyle: {
color: '#f1f1f1',
fontSize: '13',
fontWeight: 'bold'
}
},
tooltip: {
trigger: 'item',
formatter: "{a}
{b}: {c} ({d}%)"
},
legend: {
show: false,
orient: 'vertical',
x: 'left',
data:['重点单位','消防列管单位','行业场所']
},
series: [
{
name:'接入单位资源',
type:'pie',
radius: ['57%', '80%'],
avoidLabelOverlap: false,
label: {
normal: {
show: false,
position: 'center',
padding: [22, 0, 0, 0]
},
emphasis: {
show: true,
textStyle: {
fontSize: '11',
fontWeight: 'bold',
color: '#fff065'
}
}
},
labelLine: {
normal: {
show: false
}
},
startAngle: 315,
minAngle: 2,
hoverOffset: 3,
data:depData
}
]
};
var patrolOption = {
title: {
text: '巡逻业务',
left: 'center',
top: 37,
textStyle: {
color: '#f1f1f1',
fontSize: '13',
fontWeight: 'bold'
}
},
tooltip: {
trigger: 'item',
formatter: "{a}
{b}: {c} ({d}%)"
},
legend: {
show: false,
orient: 'vertical',
x: 'left',
data:['巡逻点位','治安卡口','巡区','巡线']
},
series: [
{
name:'接入巡逻资源',
type:'pie',
radius: ['57%', '80%'],
avoidLabelOverlap: false,
label: {
normal: {
show: false,
position: 'center',
padding: [22, 0, 0, 0]
},
emphasis: {
show: true,
textStyle: {
fontSize: '11',
fontWeight: 'bold',
color: '#fff065'
}
}
},
labelLine: {
normal: {
show: false
}
},
startAngle: 315,
minAngle: 2,
hoverOffset: 3,
data:patrolData
}
]
};
var camOption = {
title: {
text: '监控资源',
left: 'center',
top: 37,
textStyle: {
color: '#f1f1f1',
fontSize: '13',
fontWeight: 'bold'
}
},
tooltip: {
trigger: 'item',
formatter: "{a}
{b}: {c} ({d}%)"
},
legend: {
show: false,
orient: 'vertical',
x: 'left',
data:['枪机','球机','高空贴地','车辆识别','人脸识别']
},
series: [
{
name:'接入视频资源',
type:'pie',
radius: ['57%', '80%'],
avoidLabelOverlap: false,
label: {
normal: {
show: false,
position: 'center',
padding: [22, 0, 0, 0]
},
emphasis: {
show: true,
textStyle: {
fontSize: '11',
fontWeight: 'bold',
color: '#fff065'
}
}
},
labelLine: {
normal: {
show: false
}
},
startAngle: 315,
minAngle: 2,
hoverOffset: 3,
data:camData
}
]
};
var manOption = {
title: {
text: '警力资源',
left: 'center',
top: 37,
textStyle: {
color: '#f1f1f1',
fontSize: '13',
fontWeight: 'bold'
}
},
tooltip: {
trigger: 'item',
formatter: "{a}
{b}: {c} ({d}%)"
},
legend: {
show: false,
orient: 'vertical',
x: 'left',
data:['警员','车辆','摩托','无人机','治安员']
},
series: [
{
name:'接入力量资源',
type:'pie',
radius: ['57%', '80%'],
avoidLabelOverlap: false,
label: {
normal: {
show: false,
position: 'center',
padding: [22, 0, 0, 0],
},
emphasis: {
show: true,
textStyle: {
fontSize: '11',
fontWeight: 'bold',
color: '#fff065'
}
}
},
labelLine: {
normal: {
show: false
}
},
startAngle: 315,
minAngle: 2,
hoverOffset: 3,
data:manData
}
]
};
peopleChart.setOption(peopleOption);
addChart.setOption(addOption);
depChart.setOption(depOption);
patrolChart.setOption(patrolOption);
camChart.setOption(camOption);
manChart.setOption(manOption);
},
error : function(XMLHttpRequest, textStatus, errorThrown) {
console.log("获取接入资源数据失败!");
}
});
}
//重点点位巡逻频率
function getPatrolCount(){
var patrolChart = echarts.init(document.getElementById("patrol_count"), 'light');
var data = [
{"name": "市政府", "value": [129.83683548871977,42.965566094967514,102]},
{"name": "市委", "value": [129.8399350346122,42.97153240299053,25]},
{"name": "政协", "value": [129.8443581515092,42.96667264408873,78]},
{"name": "人大", "value": [129.85294871812172,42.97075994314144,55]},
{"name": "人民医院", "value": [129.84431748714206,42.96369299979136,90]},
{"name": "图们江广场", "value": [129.848403479995,42.9597318467446,130]},
{"name": "图们站", "value": [129.83431055494407,42.96300654085372,118]},
{"name": "国税局", "value": [129.8522001286703,42.9704242054773,32]},
{"name": "图们大厦", "value": [129.84097134676531,42.96628682027666,46]},
{"name": "串街", "value": [129.84090693996072,42.96440412326532,39]},
{"name": "九州影城", "value": [129.84005200334016,42.96293939658221,66]},
{"name": "铁路广场", "value": [129.83392299205005,42.96770153775316,35]},
{"name": "日光山公园", "value": [129.84754746180153,42.948924341586654,51]},
{"name": "南园小区", "value": [129.8425993636356,42.958003424681564,22]},
{"name": "金盾家园", "value": [129.842540228245,42.970414837327056,43]},
{"name": "五中", "value": [129.84007169575224,42.96022565430143,28]},
{"name": "月宫市场", "value": [129.83536519178358,42.96954355305834,61]},
{"name": "延吉百货", "value": [129.83899596477045,42.96782436281346,43]},
{"name": "人民银行", "value": [129.84597337923364,42.9686104194597,56]},
{"name": "市三中", "value": [129.8476714717203,42.967706547788474,26]},
{"name": "市一小", "value": [129.84897743496927,42.96815908170219,18]},
{"name": "步行街", "value": [129.84356951347792,42.960798832090404,35]},
];
for ( var i = 0; i < data.length; i++) {
var baidupoi = wgs84tobd09(data[i].value[0],data[i].value[1]);
data[i].value[0] = baidupoi[0];
data[i].value[1] = baidupoi[1];
}
var option = {
tooltip: {
trigger: 'item',
formatter: function (params) {
return params.name + ' : ' + params.value[2];
}
},
bmap: {
center: [129.857337,42.974421],
zoom: 15,
roam: true,
mapStyle: {
styleJson: [{
'featureType': 'land', //调整土地颜色
'elementType': 'geometry',
'stylers': {'color': '#081734'}
},{
'featureType': 'building', //调整建筑物颜色
'elementType': 'geometry',
'stylers': {'color': '#04406F'}
},{
'featureType': 'building', //调整建筑物标签是否可视
'elementType': 'labels',
'stylers': {'visibility': 'off'}
},{
'featureType': 'highway', //调整高速道路颜色
'elementType': 'geometry',
'stylers': {'color': '#015B99'}
},{
'featureType': 'highway', //调整高速名字是否可视
'elementType': 'labels',
'stylers': {'visibility': 'off'}
},{
'featureType': 'arterial', //调整一些干道颜色
'elementType': 'geometry',
'stylers': {'color':'#003051'}
},{
'featureType': 'arterial',
'elementType': 'labels',
'stylers': {'visibility': 'off'}
},{
'featureType': 'green',
'elementType': 'geometry',
'stylers': {'visibility': 'off'}
},{
'featureType': 'water',
'elementType': 'geometry',
'stylers': {'color': '#044161'}
},{
'featureType': 'subway', //调整地铁颜色
'elementType': 'geometry.stroke',
'stylers': {'color': '#003051'}
},{
'featureType': 'subway',
'elementType': 'labels',
'stylers': {'visibility': 'off'}
},{
'featureType': 'railway',
'elementType': 'geometry',
'stylers': {'visibility': 'off'}
},{
'featureType': 'railway',
'elementType': 'labels',
'stylers': {'visibility': 'off'}
},{
'featureType': 'all', //调整所有的标签的边缘颜色
'elementType': 'labels.text.stroke',
'stylers': {'color': '#313131'}
},{
'featureType': 'all', //调整所有标签的填充颜色
'elementType': 'labels.text.fill',
'stylers': {'color': '#FFFFFF'}
},{
"featureType": "poi",
"elementType": "all",
"stylers": {'visibility': 'off'}
},{
'featureType': 'manmade',
'elementType': 'geometry',
'stylers': {'visibility': 'off'}
},{
'featureType': 'manmade',
'elementType': 'labels',
'stylers': {'visibility': 'off'}
},{
'featureType': 'local',
'elementType': 'geometry',
'stylers': {'visibility': 'off'}
},{
'featureType': 'local',
'elementType': 'labels',
'stylers': {'visibility': 'off'}
},{
'featureType': 'subway',
'elementType': 'geometry',
'stylers': {'lightness': -65}
},{
'featureType': 'railway',
'elementType': 'all',
'stylers': {'lightness': -40}
},{
'featureType': 'boundary',
'elementType': 'geometry',
'stylers': {
'color': '#8b8787',
'weight': '1',
'lightness': -29
}
}]
}
},
series: [
{
name: '巡逻频率',
type: 'scatter',
coordinateSystem: 'bmap',
data: data,
symbolSize: function (val) {
return val[2] / 3;
},
label: {
normal: {
formatter: '{b}',
position: 'right',
left: '0',
show: true,
textStyle: {
fontSize: '6',
fontWeight: 'bold',
color: '#fff'
}
},
},
itemStyle: {
normal: {
color: '#dfa736'
}
}
}
]
};
patrolChart.setOption(option);
}