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.

1195 lines
32 KiB

//*****************统计分析图表
// $(function(){
// sixIndicators_area();
// reg_type();
// enterprise_type();
// complaint_type();
// reg_order();
// complaint_order();
// bureau_order();
// });
var chartArea_option = null;
var reg_type_option = null;
var enterprise_type_option = null;
var complaint_type_option = null;
var reg_order_option = null;
var complaint_order_option = null;
var bureau_order_option = null;
/** 各区综合分析 */
function sixIndicators_area(qy) {
$.ajax({
url: ctx + "code/statisticalPanel/sixIndicators_area",
type: "get",
data: {dateType: "year", year:"2025", qy:qy},
success: function(res) {
if(res.success) {
chartArea(res.data);
}
},
error: function (error) {
$.modal.alertWarning("获取分析数据失败。");
}
});
}
/** 检查类别数量及占比 */
function reg_type(qy) {
$.ajax({
url: ctx + "code/registration/echarts1",
type: "post",
data: {year: '2025', dateSearch: 'year', qy:qy},
success: function(res) {
chartRegType(res);
},
error: function (error) {
$.modal.alertWarning("获取分析数据失败。");
}
});
}
/** 企业类别数量及占比 */
function enterprise_type(qy) {
$.ajax({
url: ctx + "code/statisticsEnterprise/type",
type: "get",
data: {qy:qy},
success: function(res) {
chartEnterpriseType(res);
},
error: function (error) {
$.modal.alertWarning("获取分析数据失败。");
}
});
}
/** 投诉类别数量及占比 */
function complaint_type(qy) {
$.ajax({
url: ctx + "code/complaintStatic/list2",
type: "post",
data: {dateSearch:'year', year:'2025', qy:qy},
success: function(res) {
chartComplaintType(res.rows);
},
error: function (error) {
$.modal.alertWarning("获取分析数据失败。");
}
});
}
/** 被检查企业次数排行 */
function reg_order(qy) {
$.ajax({
url: ctx + "code/statisticalPanel/staisticalRegistration_order",
type: "get",
data: {dateType:'year', year:'2025', qy:qy},
success: function(res) {
chartReg_order(res.data);
},
error: function (error) {
$.modal.alertWarning("获取分析数据失败。");
}
});
}
/** 被投诉单位排行 */
function complaint_order(qy) {
$.ajax({
url: ctx + "code/statisticalPanel/staisticalComplaint_order",
type: "get",
data: {dateType:'year', year:'2025', qy:qy},
success: function(res) {
chartComplaint_order(res.data);
},
error: function (error) {
$.modal.alertWarning("获取分析数据失败。");
}
});
}
/** 执法检查数量排行 */
function bureau_order(qy) {
$.ajax({
url: ctx + "code/statisticalPanel/staisticalBureau_order",
type: "get",
data: {dateType:'year', year:'2025', qy:qy},
success: function(res) {
chartBureau_order(res.data);
},
error: function (error) {
$.modal.alertWarning("获取分析数据失败。");
}
});
}
/*******综合数据***********/
// 基于准备好的dom,初始化echarts实例
function chartArea(datas) {
var areas = [];
var registrations = [];
var unite_registrations = [];
var lawEnforcements = [];
var complaints = [];
var warnings = [];
var enterprises = [];
for(var i=0; i<datas.length; i++) {
var indicator = datas[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);
}
}
}
var myChart = 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 : ['福田区','罗湖区','南山区','盐田区','宝安区','龙岗区','龙华区','坪山区','光明区','大鹏新区','深汕特别合作区'],
data : areas,
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:[13078, 13980, 15687, 6093, 12092, 16073, 9087,7254,8088,3021,4596],
data: registrations,
color:'#7ca9fb',
itemStyle: {
borderRadius: [10, 10, 0, 0]
}
},
{
name:'联合执法次数',
type:'bar',
barWidth: '10%',
showBackground: true,
backgroundStyle: {
borderRadius: [10, 10, 0, 0]
},
// data:[13078, 13980, 15687, 6093, 12092, 16073, 9087,7254,8088,3021,4596],
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:[13078, 13980, 15687, 6093, 12092, 16073, 9087,7254,8088,3021,4596],
data: lawEnforcements,
color:'#8ffd87',
itemStyle: {
borderRadius: [10, 10, 0, 0]
}
},
{
name:'涉企投诉次数',
type:'bar',
barWidth: '10%',
showBackground: true,
backgroundStyle: {
borderRadius: [10, 10, 0, 0]
},
// data:[138, 139, 156, 93, 10, 160, 90, 72, 80, 30, 45],
data: complaints,
color:'#fd8787',
itemStyle: {
borderRadius: [10, 10, 0, 0]
}
},
{
name:'执法预警次数',
type:'bar',
barWidth: '10%',
showBackground: true,
backgroundStyle: {
borderRadius: [10, 10, 0, 0]
},
// data:[1378, 1380, 1587, 603, 1092, 1673, 987,754,808,301,496],
data: warnings,
color:'#fdcc87',
itemStyle: {
borderRadius: [10, 10, 0, 0]
}
},
{
name:'企业数量',
type:'bar',
barWidth: '10%',
showBackground: true,
backgroundStyle: {
borderRadius: [10, 10, 0, 0]
},
// data:[13078, 13980, 15687, 6093, 12092, 16073, 9087,7254,8088,3021,4596],
data: enterprises,
color:'#a1d4f5',
itemStyle: {
borderRadius: [10, 10, 0, 0]
}
}
]
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
window.addEventListener("resize",function(){
myChart.resize();
});
}
/*******检查类别数量及占比***********/
function chartRegType(datas) {
var types = []
for (var i=0; i<datas.length; i++) {
types.push({value: datas[i].value, name: datas[i].name});
}
var myChart = 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: ['43%', '60%'],
avoidLabelOverlap: false,
itemStyle: {
borderRadius: 0,
borderColor: '#fff',
borderWidth: 1
},
emphasis: {
label: {
show: true,
fontSize: '14',
fontWeight: 'bold'
}
},
// data: [
// {value: 1048, name: '日常检查'},
// {value: 735, name: '上级交办'},
// {value: 580, name: '其他机关移送'},
// {value: 484, name: '重点领域治理部署'},
// {value: 300, name: '投诉举报'},
// {value: 200, name: '其他'}
// ],
data: types,
color: ['#0038bb', '#0047eb', '#1c60ff', '#3f78ff', '#6592ff', '#9ebafc'],
}
]
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
window.addEventListener("resize", function () {
myChart.resize();
});
}
/*******企业类别数量及占比***********/
function chartEnterpriseType(datas) {
var types = []
for (var i=0; i<datas.length; i++) {
types.push({value: datas[i].value, name: datas[i].name});
}
var myChart = 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: ['43%', '60%'],
avoidLabelOverlap: false,
itemStyle: {
borderRadius: 0,
borderColor: '#fff',
borderWidth: 1
},
emphasis: {
label: {
show: true,
fontSize: '14',
fontWeight: 'bold'
}
},
// data: [
// {value: 1048, name: '有限责任公司'},
// {value: 735, name: '股份有限公司'},
// {value: 580, name: '个人独资企业'},
// {value: 484, name: '合伙企业'},
// {value: 300, name: '个体工商户'},
// {value: 200, name: '其他'}
// ],
data: types,
color: ['#0038bb', '#0047eb', '#1c60ff', '#3f78ff', '#6592ff', '#9ebafc'],
}
]
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
window.addEventListener("resize", function () {
myChart.resize();
});
}
/*******投诉类别数量及占比***********/
function chartComplaintType(datas) {
var types = []
for (var i = 0; i < datas.length; i++) {
types.push({value: datas[i].numInt, name: datas[i].name});
}
var myChart = 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: ['43%', '60%'],
avoidLabelOverlap: false,
itemStyle: {
borderRadius: 0,
borderColor: '#fff',
borderWidth: 1
},
emphasis: {
label: {
show: true,
fontSize: '14',
fontWeight: 'bold'
}
},
// data: [
// {value: 1048, name: '违法执法'},
// {value: 735, name: '违规执法'},
// {value: 580, name: '执法不文明'},
// {value: 484, name: '选择性执法'},
// {value: 300, name: '其他'},
// {value: 200, name: '入企不扫码'}
// ],
data: types,
color: ['#0038bb', '#0047eb', '#1c60ff', '#3f78ff', '#6592ff', '#9ebafc'],
}
]
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
window.addEventListener("resize", function () {
myChart.resize();
});
}
/*******被检查企业次数排行***********/
function chartReg_order(datas) {
var top_num = 10;
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);
}
// 基于准备好的dom,初始化echarts实例
var myChart = echarts.init(document.getElementById('rankCommpany'));
// 指定图表的配置项和数据
var option = {
title : {
text: '',
subtext: ''
},
tooltip : {
trigger: 'axis'
},
grid: {
left: '0',
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 : names,
axisLine: {show: false},
axisTick: {show: false},
axisLabel: {
show: true,
interval: 0,
rotate: 30,
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: '25%',
showBackground: true,
backgroundStyle: {
borderRadius: [10, 10, 0, 0]
},
// data:[13, 12, 11, 9, 8, 7, 6, 5, 5, 4],
data:nums,
color:'#7ca9fb',
itemStyle: {
borderRadius: [10, 10, 0, 0]
}
},
]
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
window.addEventListener("resize",function(){
myChart.resize();
});
}
/*******被投诉单位排行***********/
function chartComplaint_order(datas) {
console.log('----->: ', datas);
var top_num = 10;
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);
}
// 基于准备好的dom,初始化echarts实例
var myChart = echarts.init(document.getElementById('rankComplaint'));
// 指定图表的配置项和数据
var option = {
title : {
text: '',
subtext: ''
},
tooltip : {
trigger: 'axis'
},
grid: {
left: '0',
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 : names,
axisLine: {show: false},
axisTick: {show: false},
axisLabel: {
show: true,
interval: 0,
rotate: 30,
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: '25%',
showBackground: true,
backgroundStyle: {
borderRadius: [10, 10, 0, 0]
},
// data:[13, 12, 11, 9, 8, 7, 6, 5, 5, 4],
data: nums,
color:'#7ca9fb',
itemStyle: {
borderRadius: [10, 10, 0, 0]
}
},
]
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
window.addEventListener("resize",function(){
myChart.resize();
});
}
/*******执法检查数量排行***********/
function chartBureau_order(datas) {
var top_num = 10;
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);
}
// 基于准备好的dom,初始化echarts实例
var myChart = echarts.init(document.getElementById('rankInspect'));
// 指定图表的配置项和数据
var option = {
title : {
text: '',
subtext: ''
},
tooltip : {
trigger: 'axis'
},
grid: {
left: '0',
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 : names,
axisLine: {show: false},
axisTick: {show: false},
axisLabel: {
show: true,
interval: 0,
rotate: 30,
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: '25%',
showBackground: true,
backgroundStyle: {
borderRadius: [10, 10, 0, 0]
},
// data:[13, 12, 11, 9, 8, 7, 6, 5, 5, 4],
data:nums,
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('powerUse'));
// 指定图表的配置项和数据
var option = {
title : {
text: '',
subtext: ''
},
tooltip : {
trigger: 'axis'
},
grid: {
left: '0',
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,
}
},
}
],
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],
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: '0',
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,
}
},
}
],
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],
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: '0',
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,
}
},
}
],
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],
color:'#7ca9fb',
itemStyle: {
borderRadius: [10, 10, 0, 0]
}
},
]
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
window.addEventListener("resize",function(){
myChart.resize();
});