//*****************统计分析图表 $(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 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 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 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(); });