You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1292 lines
38 KiB
1292 lines
38 KiB
//*****************统计分析图表
|
|
|
|
$(function(){
|
|
chartArea();
|
|
chartRegType();
|
|
chartEnterpriseType();
|
|
chartComplaintType();
|
|
chartReg_order();
|
|
chartComplaint_order();
|
|
chartBureau_order();
|
|
|
|
// sixIndicators_area();
|
|
// reg_type(null);
|
|
// enterprise_type(null);
|
|
// complaint_type(null);
|
|
// reg_order(null);
|
|
// complaint_order(null);
|
|
// bureau_order(null);
|
|
});
|
|
|
|
var area_chart = null;
|
|
var reg_type_chart = null;
|
|
var enterprise_type_chart = null;
|
|
var complaint_type_chart = null;
|
|
var reg_order_chart = null;
|
|
var complaint_order_chart = null;
|
|
var bureau_order_chart = null;
|
|
|
|
/** 各区综合分析 */
|
|
function sixIndicators_area(deptId, area,beginTime,endTime,) {
|
|
$.ajax({
|
|
url: ctx + "code/statisticalPanel/sixIndicators_area",
|
|
type: "get",
|
|
data: {deptId: deptId, qy: area,beginTime: beginTime,endTime: endTime, dataType: '区'},
|
|
success: function(res) {
|
|
if(res.success) {
|
|
// chartArea(res.data);
|
|
var areas = [];
|
|
var registrations = [];
|
|
var unite_registrations = [];
|
|
var lawEnforcements = [];
|
|
var complaints = [];
|
|
var warnings = [];
|
|
var enterprises = [];
|
|
for(var i=0; i<res.data.length; i++) {
|
|
var indicator = res.data[i];
|
|
areas.push(indicator.area);
|
|
var nums = indicator.list;
|
|
for(var j=0; j<nums.length; j++) {
|
|
if (nums[j].title == "涉企执法次数") {
|
|
registrations.push(nums[j].num);
|
|
}
|
|
if (nums[j].title == "联合执法次数") {
|
|
unite_registrations.push(nums[j].num);
|
|
}
|
|
if (nums[j].title == "行政执法预告次数") {
|
|
lawEnforcements.push(nums[j].num);
|
|
}
|
|
if (nums[j].title == "涉企投诉次数") {
|
|
complaints.push(nums[j].num);
|
|
}
|
|
if (nums[j].title == "执法预警次数") {
|
|
warnings.push(nums[j].num);
|
|
}
|
|
if (nums[j].title == "企业数量") {
|
|
enterprises.push(nums[j].num);
|
|
}
|
|
|
|
}
|
|
}
|
|
area_chart.setOption({
|
|
xAxis: [{data:areas}],
|
|
series: [
|
|
{
|
|
name:'涉企执法次数',
|
|
type:'bar',
|
|
barWidth: '10%',
|
|
showBackground: true,
|
|
backgroundStyle: {
|
|
borderRadius: [10, 10, 0, 0]
|
|
},
|
|
data:registrations,
|
|
color:'#7ca9fb',
|
|
itemStyle: {
|
|
borderRadius: [10, 10, 0, 0]
|
|
}
|
|
},
|
|
{
|
|
name:'联合执法次数',
|
|
type:'bar',
|
|
barWidth: '10%',
|
|
showBackground: true,
|
|
backgroundStyle: {
|
|
borderRadius: [10, 10, 0, 0]
|
|
},
|
|
data:unite_registrations,
|
|
color:'#7afdfb',
|
|
itemStyle: {
|
|
borderRadius: [10, 10, 0, 0]
|
|
}
|
|
},
|
|
{
|
|
name:'行政执法预告次数',
|
|
type:'bar',
|
|
barWidth: '10%',
|
|
showBackground: true,
|
|
backgroundStyle: {
|
|
borderRadius: [10, 10, 0, 0]
|
|
},
|
|
data:lawEnforcements,
|
|
color:'#8ffd87',
|
|
itemStyle: {
|
|
borderRadius: [10, 10, 0, 0]
|
|
}
|
|
},
|
|
{
|
|
name:'涉企投诉次数',
|
|
type:'bar',
|
|
barWidth: '10%',
|
|
showBackground: true,
|
|
backgroundStyle: {
|
|
borderRadius: [10, 10, 0, 0]
|
|
},
|
|
data:complaints,
|
|
color:'#fd8787',
|
|
itemStyle: {
|
|
borderRadius: [10, 10, 0, 0]
|
|
}
|
|
},
|
|
{
|
|
name:'执法预警次数',
|
|
type:'bar',
|
|
barWidth: '10%',
|
|
showBackground: true,
|
|
backgroundStyle: {
|
|
borderRadius: [10, 10, 0, 0]
|
|
},
|
|
data:warnings,
|
|
color:'#fdcc87',
|
|
itemStyle: {
|
|
borderRadius: [10, 10, 0, 0]
|
|
}
|
|
},
|
|
{
|
|
name:'企业数量',
|
|
type:'bar',
|
|
barWidth: '10%',
|
|
showBackground: true,
|
|
backgroundStyle: {
|
|
borderRadius: [10, 10, 0, 0]
|
|
},
|
|
data:enterprises,
|
|
color:'#a1d4f5',
|
|
itemStyle: {
|
|
borderRadius: [10, 10, 0, 0]
|
|
}
|
|
}
|
|
]
|
|
});
|
|
}
|
|
}, error: function (error) {
|
|
$.modal.alertWarning("获取分析数据失败。");
|
|
}
|
|
});
|
|
}
|
|
|
|
/** 检查类别数量及占比 */
|
|
function reg_type(deptId,beginTime,endTime) {
|
|
$.ajax({
|
|
// url: ctx + "code/registration/echarts1",
|
|
url: ctx + "code/statisticalPanel/staisticalCheck_category",
|
|
type: "get",
|
|
data: {deptId: deptId,beginTime: beginTime,endTime: endTime},
|
|
success: function(res) {
|
|
var types = []
|
|
for (var i=0; i<res.data.length; i++) {
|
|
if (res.data[i].num > 0)
|
|
types.push({value: res.data[i].num, name: res.data[i].category});
|
|
}
|
|
reg_type_chart.setOption({
|
|
series: [{data:types}]
|
|
});
|
|
},
|
|
error: function (error) {
|
|
$.modal.alertWarning("获取分析数据失败。");
|
|
}
|
|
});
|
|
}
|
|
|
|
/** 企业类别数量及占比 */
|
|
function enterprise_type(deptId,beginTime,endTime) {
|
|
$.ajax({
|
|
url: ctx + "code/statisticalPanel/staisticalEnterprise_category",
|
|
// url: ctx + "code/statisticsEnterprise/type",
|
|
type: "get",
|
|
data: {deptId: deptId,beginTime: beginTime,endTime: endTime},
|
|
success: function(res) {
|
|
var types = []
|
|
for (var i=0; i<res.data.length; i++) {
|
|
if (res.data[i].value > 0)
|
|
types.push({value: res.data[i].value, name: res.data[i].name});
|
|
}
|
|
enterprise_type_chart.setOption({
|
|
series: [{data:types}]
|
|
});
|
|
},
|
|
error: function (error) {
|
|
$.modal.alertWarning("获取分析数据失败。");
|
|
}
|
|
});
|
|
}
|
|
|
|
/** 投诉类别数量及占比 */
|
|
function complaint_type(deptId,beginTime,endTime) {
|
|
$.ajax({
|
|
// url: ctx + "code/complaintStatic/list2",
|
|
url: ctx + "code/statisticalPanel/staisticalEnforce_type",
|
|
type: "get",
|
|
data: {deptId: deptId,beginTime: beginTime,endTime: endTime},
|
|
success: function(res) {
|
|
var types = []
|
|
for (var i = 0; i < res.data.length; i++) {
|
|
if (res.data[i].num > 0)
|
|
types.push({value: res.data[i].num, name: res.data[i].type});
|
|
}
|
|
complaint_type_chart.setOption({
|
|
series: [{data:types}]
|
|
});
|
|
},
|
|
error: function (error) {
|
|
$.modal.alertWarning("获取分析数据失败。");
|
|
}
|
|
});
|
|
}
|
|
|
|
/** 被检查企业次数排行 */
|
|
function reg_order(deptId,beginTime,endTime, pageSize) {
|
|
$.ajax({
|
|
url: ctx + "code/statisticalPanel/staisticalRegistration_order",
|
|
type: "get",
|
|
data: {deptId: deptId,beginTime: beginTime,endTime: endTime, pageSize: pageSize},
|
|
success: function(res) {
|
|
var datas = res.data;
|
|
var top_num = pageSize;
|
|
if (datas.length < top_num) top_num = datas.length;
|
|
var names = [];
|
|
var nums = [];
|
|
for (var i=0; i<top_num; i++) {
|
|
names.push(datas[i].enterprise_name);
|
|
nums.push(datas[i].num);
|
|
}
|
|
reg_order_chart.setOption({
|
|
xAxis: [{data:names}],
|
|
series: [{data:nums}]
|
|
});
|
|
},
|
|
error: function (error) {
|
|
$.modal.alertWarning("获取分析数据失败。");
|
|
}
|
|
});
|
|
}
|
|
|
|
/** 被投诉单位排行 */
|
|
function complaint_order(deptId,beginTime,endTime, pageSize) {
|
|
$.ajax({
|
|
url: ctx + "code/statisticalPanel/staisticalComplaint_order",
|
|
type: "get",
|
|
data: {deptId: deptId,beginTime: beginTime,endTime: endTime, pageSize: pageSize},
|
|
success: function(res) {
|
|
var datas = res.data;
|
|
var top_num = pageSize;
|
|
if (datas.length < top_num) top_num = datas.length;
|
|
var names = [];
|
|
var nums = [];
|
|
for (var i=0; i<top_num; i++) {
|
|
if(null==datas[i].complaint_department || 'null'==datas[i].complaint_department) continue;
|
|
names.push(datas[i].complaint_department);
|
|
nums.push(datas[i].num);
|
|
}
|
|
complaint_order_chart.setOption({
|
|
xAxis: [{data:names}],
|
|
series: [{data:nums}]
|
|
});
|
|
},
|
|
error: function (error) {
|
|
$.modal.alertWarning("获取分析数据失败。");
|
|
}
|
|
});
|
|
}
|
|
|
|
/** 执法检查数量排行 */
|
|
function bureau_order(deptId,beginTime,endTime, pageSize) {
|
|
$.ajax({
|
|
url: ctx + "code/statisticalPanel/staisticalBureau_order",
|
|
type: "get",
|
|
data: {deptId: deptId, beginTime: beginTime,endTime: endTime, pageSize: pageSize},
|
|
success: function(res) {
|
|
var datas = res.data;
|
|
var top_num = pageSize;
|
|
if (datas.length < top_num) top_num = datas.length;
|
|
var names = [];
|
|
var nums = [];
|
|
for (var i=0; i<top_num; i++) {
|
|
names.push(datas[i].bureau_dept_name);
|
|
nums.push(datas[i].num);
|
|
}
|
|
bureau_order_chart.setOption({
|
|
xAxis: [{data:names}],
|
|
series: [{data:nums}]
|
|
});
|
|
},
|
|
error: function (error) {
|
|
$.modal.alertWarning("获取分析数据失败。");
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
/*******综合数据***********/
|
|
|
|
/*******各区综合数据***********/
|
|
function chartArea() {
|
|
area_chart = echarts.init(document.getElementById('countDistrict'));
|
|
|
|
// 指定图表的配置项和数据
|
|
var option = {
|
|
title : {
|
|
text: '',
|
|
subtext: ''
|
|
},
|
|
tooltip : {
|
|
trigger: 'axis'
|
|
},
|
|
legend: {
|
|
top: '0',
|
|
padding: 5,
|
|
itemGap: 20,
|
|
itemWidth: 10,
|
|
itemHeight: 10,
|
|
data:['企业数量','涉企执法次数','联合执法次数','行政执法预告次数','涉企投诉次数','执法预警次数']
|
|
// data:areas
|
|
},
|
|
grid: {
|
|
left: '0',
|
|
right: '0',
|
|
bottom: '0',
|
|
top: '20%',
|
|
containLabel: true
|
|
},
|
|
toolbox: {
|
|
show : false,
|
|
feature : {
|
|
dataView : {show: true, readOnly: false},
|
|
magicType : {show: true, type: ['line', 'bar']},
|
|
restore : {show: true},
|
|
saveAsImage : {show: true}
|
|
}
|
|
},
|
|
|
|
calculable : true,
|
|
xAxis : [
|
|
{
|
|
type : 'category',
|
|
data : ['福田区','罗湖区','盐田区','南山区','宝安区','龙岗区','龙华区','坪山区','光明区','大鹏新区','深汕特别合作区'],
|
|
axisLine: {show: false},
|
|
axisTick: {show: false},
|
|
axisLabel: {
|
|
show: true,
|
|
interval: 0,
|
|
rotate: 0,
|
|
textStyle: {
|
|
color: '#999',
|
|
fontSize: 12,
|
|
}
|
|
},
|
|
}
|
|
],
|
|
yAxis : [
|
|
{
|
|
type : 'value',
|
|
splitLine: {
|
|
show: true,
|
|
lineStyle: {
|
|
color: 'transparent',
|
|
}
|
|
},
|
|
axisLine: {show: false},
|
|
axisTick: {show: false},
|
|
axisLabel: {
|
|
show: true,
|
|
textStyle: {
|
|
color: '#79a3ca',
|
|
fontSize: 12,
|
|
}
|
|
},
|
|
}
|
|
],
|
|
series : [
|
|
{
|
|
name:'企业数量',
|
|
type:'bar',
|
|
barWidth: '10%',
|
|
showBackground: true,
|
|
backgroundStyle: {
|
|
borderRadius: [10, 10, 0, 0]
|
|
},
|
|
data:[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
color:'#a1d4f5',
|
|
itemStyle: {
|
|
borderRadius: [10, 10, 0, 0]
|
|
}
|
|
},
|
|
{
|
|
name:'涉企执法次数',
|
|
type:'bar',
|
|
barWidth: '10%',
|
|
showBackground: true,
|
|
backgroundStyle: {
|
|
borderRadius: [10, 10, 0, 0]
|
|
},
|
|
data:[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
color:'#7ca9fb',
|
|
itemStyle: {
|
|
borderRadius: [10, 10, 0, 0]
|
|
}
|
|
},
|
|
{
|
|
name:'联合执法次数',
|
|
type:'bar',
|
|
barWidth: '10%',
|
|
showBackground: true,
|
|
backgroundStyle: {
|
|
borderRadius: [10, 10, 0, 0]
|
|
},
|
|
data:[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
color:'#7afdfb',
|
|
itemStyle: {
|
|
borderRadius: [10, 10, 0, 0]
|
|
}
|
|
},
|
|
{
|
|
name:'行政执法预告次数',
|
|
type:'bar',
|
|
barWidth: '10%',
|
|
showBackground: true,
|
|
backgroundStyle: {
|
|
borderRadius: [10, 10, 0, 0]
|
|
},
|
|
data:[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
color:'#8ffd87',
|
|
itemStyle: {
|
|
borderRadius: [10, 10, 0, 0]
|
|
}
|
|
},
|
|
{
|
|
name:'涉企投诉次数',
|
|
type:'bar',
|
|
barWidth: '10%',
|
|
showBackground: true,
|
|
backgroundStyle: {
|
|
borderRadius: [10, 10, 0, 0]
|
|
},
|
|
data:[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
color:'#fd8787',
|
|
itemStyle: {
|
|
borderRadius: [10, 10, 0, 0]
|
|
}
|
|
}
|
|
// {
|
|
// name:'执法预警次数',
|
|
// type:'bar',
|
|
// barWidth: '10%',
|
|
// showBackground: true,
|
|
// backgroundStyle: {
|
|
// borderRadius: [10, 10, 0, 0]
|
|
// },
|
|
// data:[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
// color:'#fdcc87',
|
|
// itemStyle: {
|
|
// borderRadius: [10, 10, 0, 0]
|
|
// }
|
|
// },
|
|
]
|
|
};
|
|
|
|
// 使用刚指定的配置项和数据显示图表。
|
|
area_chart.setOption(option);
|
|
window.addEventListener("resize",function(){
|
|
area_chart.resize();
|
|
});
|
|
}
|
|
|
|
/*******检查类别数量及占比***********/
|
|
function chartRegType() {
|
|
reg_type_chart = echarts.init(document.getElementById("countInspect"));
|
|
|
|
// 圆环图各环节的颜色
|
|
var option = {
|
|
tooltip: {
|
|
trigger: 'item',
|
|
//formatter: '{b}: {c} ({d}%)'
|
|
formatter: function (param) {
|
|
return param.marker + " " + param.name + " : " + param.value + " ( " + param.percent + "% )";
|
|
}
|
|
|
|
},
|
|
series: [
|
|
{
|
|
name: '执法类别数量及占比',
|
|
type: 'pie',
|
|
radius: ['42%', '60%'],
|
|
avoidLabelOverlap: false,
|
|
itemStyle: {
|
|
borderRadius: 0,
|
|
borderColor: '#fff',
|
|
borderWidth: 1
|
|
},
|
|
emphasis: {
|
|
label: {
|
|
show: true,
|
|
fontSize: '14',
|
|
fontWeight: 'bold'
|
|
}
|
|
},
|
|
data: [],
|
|
//color: ['#0038bb', '#0047eb', '#1c60ff', '#3f78ff', '#6592ff', '#9ebafc'],
|
|
color: ['#1c60ff','#91cc75','#fac858','#ef6667','#73c0df','#3ba272','#fc8352','#9b60b4','#9ebafc'],
|
|
}
|
|
]
|
|
};
|
|
|
|
|
|
// 使用刚指定的配置项和数据显示图表。
|
|
reg_type_chart.setOption(option);
|
|
window.addEventListener("resize", function () {
|
|
reg_type_chart.resize();
|
|
});
|
|
}
|
|
|
|
/*******企业类别数量及占比***********/
|
|
function chartEnterpriseType() {
|
|
enterprise_type_chart = echarts.init(document.getElementById("countCommpany"));
|
|
|
|
// 圆环图各环节的颜色
|
|
var option = {
|
|
tooltip: {
|
|
trigger: 'item',
|
|
//formatter: '{b}: {c} ({d}%)'
|
|
formatter: function (param) {
|
|
return param.marker + " " + param.name + " : " + param.value + " ( " + param.percent + "% )";
|
|
}
|
|
|
|
},
|
|
series: [
|
|
{
|
|
name: '被执法企业类别数量及占比',
|
|
type: 'pie',
|
|
radius: ['42%', '60%'],
|
|
avoidLabelOverlap: false,
|
|
itemStyle: {
|
|
borderRadius: 0,
|
|
borderColor: '#fff',
|
|
borderWidth: 1
|
|
},
|
|
emphasis: {
|
|
label: {
|
|
show: true,
|
|
fontSize: '14',
|
|
fontWeight: 'bold'
|
|
}
|
|
},
|
|
|
|
data: [],
|
|
//color: ['#0038bb', '#0047eb', '#1c60ff', '#3f78ff', '#6592ff', '#9ebafc'],
|
|
color: ['#1c60ff','#91cc75','#fac858','#ef6667','#73c0df','#3ba272','#fc8352','#9b60b4','#9ebafc'],
|
|
}
|
|
]
|
|
};
|
|
|
|
|
|
// 使用刚指定的配置项和数据显示图表。
|
|
enterprise_type_chart.setOption(option);
|
|
window.addEventListener("resize", function () {
|
|
enterprise_type_chart.resize();
|
|
});
|
|
}
|
|
|
|
/*******投诉类别数量及占比***********/
|
|
function chartComplaintType() {
|
|
complaint_type_chart = echarts.init(document.getElementById("countComplaint"));
|
|
|
|
// 圆环图各环节的颜色
|
|
var option = {
|
|
tooltip: {
|
|
trigger: 'item',
|
|
//formatter: '{b}: {c} ({d}%)'
|
|
formatter: function (param) {
|
|
return param.marker + " " + param.name + " : " + param.value + " ( " + param.percent + "% )";
|
|
}
|
|
|
|
},
|
|
series: [
|
|
{
|
|
name: '投诉类别数量及占比',
|
|
type: 'pie',
|
|
radius: ['42%', '60%'],
|
|
avoidLabelOverlap: false,
|
|
itemStyle: {
|
|
borderRadius: 0,
|
|
borderColor: '#fff',
|
|
borderWidth: 1
|
|
},
|
|
emphasis: {
|
|
label: {
|
|
show: true,
|
|
fontSize: '14',
|
|
fontWeight: 'bold'
|
|
}
|
|
},
|
|
data: [],
|
|
//color: ['#0038bb', '#0047eb', '#1c60ff', '#3f78ff', '#6592ff', '#9ebafc'],
|
|
color: ['#1c60ff','#91cc75','#fac858','#ef6667','#73c0df','#3ba272','#fc8352','#9b60b4','#9ebafc'],
|
|
}
|
|
]
|
|
};
|
|
|
|
|
|
// 使用刚指定的配置项和数据显示图表。
|
|
complaint_type_chart.setOption(option);
|
|
window.addEventListener("resize", function () {
|
|
complaint_type_chart.resize();
|
|
});
|
|
}
|
|
|
|
/*******被检查企业次数排行***********/
|
|
function chartReg_order() {
|
|
// 基于准备好的dom,初始化echarts实例
|
|
reg_order_chart = echarts.init(document.getElementById('rankCommpany'));
|
|
|
|
// 指定图表的配置项和数据
|
|
var option = {
|
|
title : {
|
|
text: '',
|
|
subtext: ''
|
|
},
|
|
tooltip : {
|
|
trigger: 'axis'
|
|
},
|
|
|
|
grid: {
|
|
left: '5%',
|
|
right: '0',
|
|
bottom: '5%',
|
|
top: '15%',
|
|
containLabel: true
|
|
},
|
|
toolbox: {
|
|
show : false,
|
|
feature : {
|
|
dataView : {show: true, readOnly: false},
|
|
magicType : {show: true, type: ['line', 'bar']},
|
|
restore : {show: true},
|
|
saveAsImage : {show: true}
|
|
}
|
|
},
|
|
|
|
calculable : true,
|
|
xAxis : [
|
|
{
|
|
type : 'category',
|
|
data : [],
|
|
axisLine: {show: false},
|
|
axisTick: {show: false},
|
|
axisLabel: {
|
|
show: true,
|
|
interval: 0,
|
|
rotate: 30,
|
|
textStyle: {
|
|
color: '#999',
|
|
fontSize: 12,
|
|
},
|
|
formatter: function (value) {
|
|
// 设定一个最大长度,例如10个字符
|
|
const maxLength = 6;
|
|
return value.length > maxLength ? value.slice(0, maxLength) + '...' : value;
|
|
}
|
|
},
|
|
}
|
|
],
|
|
yAxis : [
|
|
{
|
|
type : 'value',
|
|
splitLine: {
|
|
show: true,
|
|
lineStyle: {
|
|
color: 'transparent',
|
|
}
|
|
},
|
|
axisLine: {show: false},
|
|
axisTick: {show: false},
|
|
axisLabel: {
|
|
show: true,
|
|
textStyle: {
|
|
color: '#79a3ca',
|
|
fontSize: 12,
|
|
}
|
|
},
|
|
}
|
|
],
|
|
series : [
|
|
|
|
{
|
|
name:'被执法企业次数',
|
|
type:'bar',
|
|
barWidth: '25%',
|
|
showBackground: true,
|
|
backgroundStyle: {
|
|
borderRadius: [10, 10, 0, 0]
|
|
},
|
|
data:[],
|
|
color:'#7ca9fb',
|
|
itemStyle: {
|
|
borderRadius: [10, 10, 0, 0]
|
|
}
|
|
},
|
|
|
|
|
|
]
|
|
};
|
|
|
|
|
|
// 使用刚指定的配置项和数据显示图表。
|
|
reg_order_chart.setOption(option);
|
|
window.addEventListener("resize",function(){
|
|
reg_order_chart.resize();
|
|
});
|
|
}
|
|
|
|
/*******被投诉单位排行***********/
|
|
function chartComplaint_order() {
|
|
// 基于准备好的dom,初始化echarts实例
|
|
complaint_order_chart = echarts.init(document.getElementById('rankComplaint'));
|
|
|
|
// 指定图表的配置项和数据
|
|
var option = {
|
|
title : {
|
|
text: '',
|
|
subtext: ''
|
|
},
|
|
tooltip : {
|
|
trigger: 'axis'
|
|
},
|
|
|
|
grid: {
|
|
left: '5%',
|
|
right: '0',
|
|
bottom: '5%',
|
|
top: '15%',
|
|
containLabel: true
|
|
},
|
|
toolbox: {
|
|
show : false,
|
|
feature : {
|
|
dataView : {show: true, readOnly: false},
|
|
magicType : {show: true, type: ['line', 'bar']},
|
|
restore : {show: true},
|
|
saveAsImage : {show: true}
|
|
}
|
|
},
|
|
|
|
calculable : true,
|
|
xAxis : [
|
|
{
|
|
type : 'category',
|
|
data : [],
|
|
axisLine: {show: false},
|
|
axisTick: {show: false},
|
|
axisLabel: {
|
|
show: true,
|
|
interval: 0,
|
|
rotate: 30,
|
|
textStyle: {
|
|
color: '#999',
|
|
fontSize: 12,
|
|
},
|
|
formatter: function (value) {
|
|
// 设定一个最大长度,例如10个字符
|
|
const maxLength = 6;
|
|
return value.length > maxLength ? value.slice(0, maxLength) + '...' : value;
|
|
}
|
|
},
|
|
}
|
|
],
|
|
yAxis : [
|
|
{
|
|
type : 'value',
|
|
splitLine: {
|
|
show: true,
|
|
lineStyle: {
|
|
color: 'transparent',
|
|
}
|
|
},
|
|
axisLine: {show: false},
|
|
axisTick: {show: false},
|
|
axisLabel: {
|
|
show: true,
|
|
textStyle: {
|
|
color: '#79a3ca',
|
|
fontSize: 12,
|
|
}
|
|
},
|
|
}
|
|
],
|
|
series : [
|
|
|
|
{
|
|
name:'被投诉单位被投诉数量排行',
|
|
type:'bar',
|
|
barWidth: '25%',
|
|
showBackground: true,
|
|
backgroundStyle: {
|
|
borderRadius: [10, 10, 0, 0]
|
|
},
|
|
data: [],
|
|
color:'#7ca9fb',
|
|
itemStyle: {
|
|
borderRadius: [10, 10, 0, 0]
|
|
}
|
|
},
|
|
|
|
|
|
]
|
|
};
|
|
|
|
|
|
// 使用刚指定的配置项和数据显示图表。
|
|
complaint_order_chart.setOption(option);
|
|
window.addEventListener("resize",function(){
|
|
complaint_order_chart.resize();
|
|
});
|
|
}
|
|
|
|
/*******执法检查数量排行***********/
|
|
function chartBureau_order() {
|
|
// 基于准备好的dom,初始化echarts实例
|
|
bureau_order_chart = echarts.init(document.getElementById('rankInspect'));
|
|
|
|
// 指定图表的配置项和数据
|
|
var option = {
|
|
title : {
|
|
text: '',
|
|
subtext: ''
|
|
},
|
|
tooltip : {
|
|
trigger: 'axis'
|
|
},
|
|
|
|
grid: {
|
|
left: '5%',
|
|
right: '0',
|
|
bottom: '5%',
|
|
top: '15%',
|
|
containLabel: true
|
|
},
|
|
toolbox: {
|
|
show : false,
|
|
feature : {
|
|
dataView : {show: true, readOnly: false},
|
|
magicType : {show: true, type: ['line', 'bar']},
|
|
restore : {show: true},
|
|
saveAsImage : {show: true}
|
|
}
|
|
},
|
|
|
|
calculable : true,
|
|
xAxis : [
|
|
{
|
|
type : 'category',
|
|
data : [],
|
|
axisLine: {show: false},
|
|
axisTick: {show: false},
|
|
axisLabel: {
|
|
show: true,
|
|
interval: 0,
|
|
rotate: 30,
|
|
textStyle: {
|
|
color: '#999',
|
|
fontSize: 12,
|
|
},
|
|
formatter: function (value) {
|
|
// 设定一个最大长度,例如10个字符
|
|
const maxLength = 6;
|
|
return value.length > maxLength ? value.slice(0, maxLength) + '...' : value;
|
|
}
|
|
},
|
|
}
|
|
],
|
|
yAxis : [
|
|
{
|
|
type : 'value',
|
|
splitLine: {
|
|
show: true,
|
|
lineStyle: {
|
|
color: 'transparent',
|
|
}
|
|
},
|
|
axisLine: {show: false},
|
|
axisTick: {show: false},
|
|
axisLabel: {
|
|
show: true,
|
|
textStyle: {
|
|
color: '#79a3ca',
|
|
fontSize: 12,
|
|
}
|
|
},
|
|
}
|
|
],
|
|
series : [
|
|
|
|
{
|
|
name:'执法执法数量排行',
|
|
type:'bar',
|
|
barWidth: '25%',
|
|
showBackground: true,
|
|
backgroundStyle: {
|
|
borderRadius: [10, 10, 0, 0]
|
|
},
|
|
data:[],
|
|
color:'#7ca9fb',
|
|
itemStyle: {
|
|
borderRadius: [10, 10, 0, 0]
|
|
}
|
|
},
|
|
|
|
|
|
]
|
|
};
|
|
|
|
|
|
// 使用刚指定的配置项和数据显示图表。
|
|
bureau_order_chart.setOption(option);
|
|
window.addEventListener("resize",function(){
|
|
bureau_order_chart.resize();
|
|
});
|
|
}
|
|
|
|
|
|
|
|
|
|
/*******职权使用率排行***********/
|
|
|
|
// 基于准备好的dom,初始化echarts实例
|
|
var myChart = echarts.init(document.getElementById('powerUse'));
|
|
|
|
// 指定图表的配置项和数据
|
|
var option = {
|
|
title : {
|
|
text: '',
|
|
subtext: ''
|
|
},
|
|
tooltip : {
|
|
trigger: 'axis'
|
|
},
|
|
|
|
grid: {
|
|
left: '5%',
|
|
right: '0',
|
|
bottom: '5%',
|
|
top: '15%',
|
|
containLabel: true
|
|
},
|
|
toolbox: {
|
|
show : false,
|
|
feature : {
|
|
dataView : {show: true, readOnly: false},
|
|
magicType : {show: true, type: ['line', 'bar']},
|
|
restore : {show: true},
|
|
saveAsImage : {show: true}
|
|
}
|
|
},
|
|
|
|
calculable : true,
|
|
xAxis : [
|
|
{
|
|
type : 'category',
|
|
// data : ['深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局'],
|
|
data : [],
|
|
axisLine: {show: false},
|
|
axisTick: {show: false},
|
|
axisLabel: {
|
|
show: true,
|
|
interval: 0,
|
|
rotate: 30,
|
|
textStyle: {
|
|
color: '#999',
|
|
fontSize: 12,
|
|
},
|
|
formatter: function (value) {
|
|
// 设定一个最大长度,例如10个字符
|
|
const maxLength = 6;
|
|
return value.length > maxLength ? value.slice(0, maxLength) + '...' : value;
|
|
}
|
|
},
|
|
}
|
|
],
|
|
yAxis : [
|
|
{
|
|
type : 'value',
|
|
splitLine: {
|
|
show: true,
|
|
lineStyle: {
|
|
color: 'transparent',
|
|
}
|
|
},
|
|
axisLine: {show: false},
|
|
axisTick: {show: false},
|
|
axisLabel: {
|
|
show: true,
|
|
textStyle: {
|
|
color: '#79a3ca',
|
|
fontSize: 12,
|
|
}
|
|
},
|
|
}
|
|
],
|
|
series : [
|
|
|
|
{
|
|
name:'被执法企业次数',
|
|
type:'bar',
|
|
barWidth: '25%',
|
|
showBackground: true,
|
|
backgroundStyle: {
|
|
borderRadius: [10, 10, 0, 0]
|
|
},
|
|
// data:[13, 12, 11, 9, 8, 7, 6, 5, 5, 4],
|
|
data:[],
|
|
color:'#7ca9fb',
|
|
itemStyle: {
|
|
borderRadius: [10, 10, 0, 0]
|
|
}
|
|
},
|
|
|
|
|
|
]
|
|
};
|
|
|
|
|
|
// 使用刚指定的配置项和数据显示图表。
|
|
myChart.setOption(option);
|
|
window.addEventListener("resize",function(){
|
|
myChart.resize();
|
|
});
|
|
|
|
|
|
|
|
/*******职权休眠率排行***********/
|
|
|
|
|
|
// 基于准备好的dom,初始化echarts实例
|
|
var myChart = echarts.init(document.getElementById('powerSleep'));
|
|
|
|
// 指定图表的配置项和数据
|
|
var option = {
|
|
title : {
|
|
text: '',
|
|
subtext: ''
|
|
},
|
|
tooltip : {
|
|
trigger: 'axis'
|
|
},
|
|
|
|
grid: {
|
|
left: '5%',
|
|
right: '0',
|
|
bottom: '5%',
|
|
top: '15%',
|
|
containLabel: true
|
|
},
|
|
toolbox: {
|
|
show : false,
|
|
feature : {
|
|
dataView : {show: true, readOnly: false},
|
|
magicType : {show: true, type: ['line', 'bar']},
|
|
restore : {show: true},
|
|
saveAsImage : {show: true}
|
|
}
|
|
},
|
|
|
|
calculable : true,
|
|
xAxis : [
|
|
{
|
|
type : 'category',
|
|
// data : ['深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局'],
|
|
data : [],
|
|
axisLine: {show: false},
|
|
axisTick: {show: false},
|
|
axisLabel: {
|
|
show: true,
|
|
interval: 0,
|
|
rotate: 30,
|
|
textStyle: {
|
|
color: '#999',
|
|
fontSize: 12,
|
|
},
|
|
formatter: function (value) {
|
|
// 设定一个最大长度,例如10个字符
|
|
const maxLength = 6;
|
|
return value.length > maxLength ? value.slice(0, maxLength) + '...' : value;
|
|
}
|
|
},
|
|
}
|
|
],
|
|
yAxis : [
|
|
{
|
|
type : 'value',
|
|
splitLine: {
|
|
show: true,
|
|
lineStyle: {
|
|
color: 'transparent',
|
|
}
|
|
},
|
|
axisLine: {show: false},
|
|
axisTick: {show: false},
|
|
axisLabel: {
|
|
show: true,
|
|
textStyle: {
|
|
color: '#79a3ca',
|
|
fontSize: 12,
|
|
}
|
|
},
|
|
}
|
|
],
|
|
series : [
|
|
|
|
{
|
|
name:'被执法企业次数',
|
|
type:'bar',
|
|
barWidth: '25%',
|
|
showBackground: true,
|
|
backgroundStyle: {
|
|
borderRadius: [10, 10, 0, 0]
|
|
},
|
|
// data:[13, 12, 11, 9, 8, 7, 6, 5, 5, 4],
|
|
data:[],
|
|
color:'#7ca9fb',
|
|
itemStyle: {
|
|
borderRadius: [10, 10, 0, 0]
|
|
}
|
|
},
|
|
|
|
|
|
]
|
|
};
|
|
|
|
|
|
// 使用刚指定的配置项和数据显示图表。
|
|
myChart.setOption(option);
|
|
window.addEventListener("resize",function(){
|
|
myChart.resize();
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
/*******职权使用次数排行***********/
|
|
|
|
|
|
// 基于准备好的dom,初始化echarts实例
|
|
var myChart = echarts.init(document.getElementById('powerNumber'));
|
|
|
|
// 指定图表的配置项和数据
|
|
var option = {
|
|
title : {
|
|
text: '',
|
|
subtext: ''
|
|
},
|
|
tooltip : {
|
|
trigger: 'axis'
|
|
},
|
|
|
|
grid: {
|
|
left: '5%',
|
|
right: '0',
|
|
bottom: '5%',
|
|
top: '15%',
|
|
containLabel: true
|
|
},
|
|
toolbox: {
|
|
show : false,
|
|
feature : {
|
|
dataView : {show: true, readOnly: false},
|
|
magicType : {show: true, type: ['line', 'bar']},
|
|
restore : {show: true},
|
|
saveAsImage : {show: true}
|
|
}
|
|
},
|
|
|
|
calculable : true,
|
|
xAxis : [
|
|
{
|
|
type : 'category',
|
|
// data : ['深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局'],
|
|
data : [],
|
|
axisLine: {show: false},
|
|
axisTick: {show: false},
|
|
axisLabel: {
|
|
show: true,
|
|
interval: 0,
|
|
rotate: 30,
|
|
textStyle: {
|
|
color: '#999',
|
|
fontSize: 12,
|
|
},
|
|
formatter: function (value) {
|
|
// 设定一个最大长度,例如10个字符
|
|
const maxLength = 6;
|
|
return value.length > maxLength ? value.slice(0, maxLength) + '...' : value;
|
|
}
|
|
},
|
|
}
|
|
],
|
|
yAxis : [
|
|
{
|
|
type : 'value',
|
|
splitLine: {
|
|
show: true,
|
|
lineStyle: {
|
|
color: 'transparent',
|
|
}
|
|
},
|
|
axisLine: {show: false},
|
|
axisTick: {show: false},
|
|
axisLabel: {
|
|
show: true,
|
|
textStyle: {
|
|
color: '#79a3ca',
|
|
fontSize: 12,
|
|
}
|
|
},
|
|
}
|
|
],
|
|
series : [
|
|
|
|
{
|
|
name:'被执法企业次数',
|
|
type:'bar',
|
|
barWidth: '25%',
|
|
showBackground: true,
|
|
backgroundStyle: {
|
|
borderRadius: [10, 10, 0, 0]
|
|
},
|
|
// data:[13, 12, 11, 9, 8, 7, 6, 5, 5, 4],
|
|
data:[],
|
|
color:'#7ca9fb',
|
|
itemStyle: {
|
|
borderRadius: [10, 10, 0, 0]
|
|
}
|
|
},
|
|
|
|
|
|
]
|
|
};
|
|
|
|
|
|
// 使用刚指定的配置项和数据显示图表。
|
|
myChart.setOption(option);
|
|
window.addEventListener("resize",function(){
|
|
myChart.resize();
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|