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.
 
 
 
 
 
 

1594 lines
70 KiB

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>首页--执法监督码执法监督</title>
<link rel="shortcut icon" href="favicon.ico">
<link href="/css/bootstrap.min.css" rel="stylesheet">
<link href="/css/font-awesome.min.css" rel="stylesheet">
<!-- bootstrap-table 表格插件样式 -->
<link href="/ajax/libs/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<link href="/css/animate.css" rel="stylesheet">
<link href="/css/style.css" rel="stylesheet">
<link href="/ruoyi/css/ry-ui.css" rel="stylesheet">
<link type="text/css" rel="stylesheet" href="/statistical/font-awesome-bak/css/font-awesome.min.css" />
<link type="text/css" rel="stylesheet" href="/statistical/styles/home.css" />
<script type="text/javascript" src="/statistical/scripts/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="/statistical/scripts/echarts.min.js"></script>
</head>
<body>
<div class="wrap_all">
<div class="wrap_left">
<div class="cont_left">
<h1 class="block_tit">行政执法</h1>
<div class="count_admin_wrap">
<div class="count_admin">
<label class=""><img src="/statistical/images/icon_jc2.png" alt="单独执法" />单独执法</label>
<div class="count_admin_num"><b id="single_num">0</b><span class="number_percent" id="single_per">0.0<i>%</i></span></div>
<div class="percent_box">
<div class="percent-tag">
<span class="data-rise"><i class="fa fa fa-long-arrow-up"></i></span>
<span class="data-fall" style="display: none;"><i class="fa fa fa-long-arrow-down"></i></span>
<span class="data-change" id="single_yoy">0.0%</span>
<label>同比</label>
</div>
<div class="percent-tag">
<span class="data-rise" style="display: none;"><i class="fa fa fa-long-arrow-up"></i></span>
<span class="data-fall"><i class="fa fa fa-long-arrow-down"></i></span>
<span class="data-change" id="single_rr">0.0%</span>
<label>环比</label>
</div>
</div>
</div>
<div class="count_admin">
<label class=""><img src="/statistical/images/icon_jc.png" alt="联合执法" />联合执法</label>
<div class="count_admin_num"><b id="unite_num">0</b><span class="number_percent" id="unite_per">0.0<i>%</i></span></div>
<div class="percent_box">
<div class="percent-tag">
<span class="data-rise"><i class="fa fa fa-long-arrow-up"></i></span>
<span class="data-fall" style="display: none;"><i class="fa fa fa-long-arrow-down"></i></span>
<span class="data-change" id="unite_yoy">0.0%</span>
<label>同比</label>
</div>
<div class="percent-tag">
<span class="data-rise" style="display: none;"><i class="fa fa fa-long-arrow-up"></i></span>
<span class="data-fall"><i class="fa fa fa-long-arrow-down"></i></span>
<span class="data-change" id="unite_rr">0.0%</span>
<label>环比</label>
</div>
</div>
</div>
<div class="count_admin">
<label class=""><img src="/statistical/images/icon_qy.png" alt="被执法企业" />被执法企业</label>
<!-- <div class="count_admin_num"><b id="enterprisesNum">0</b><span class="number_percent" id="enterprisesPer">0.0<i>%</i></span></div>-->
<div class="count_admin_num"><b id="enterprisesNum">0</b></div>
<div class="percent_box">
<div class="percent-tag">
<span class="data-rise"><i class="fa fa fa-long-arrow-up"></i></span>
<span class="data-fall" style="display: none;"><i class="fa fa fa-long-arrow-down"></i></span>
<span class="data-change" id="enterprisesNum_yoy">0.0%</span>
<label>同比</label>
</div>
<div class="percent-tag">
<span class="data-rise" style="display: none;"><i class="fa fa fa-long-arrow-up"></i></span>
<span class="data-fall"><i class="fa fa fa-long-arrow-down"></i></span>
<span class="data-change" id="enterprisesNum_rr">0.0%</span>
<label>环比</label>
</div>
</div>
</div>
<div class="count_admin">
<label class=""><img src="/statistical/images/icon_yj.png" alt="入企压减率" />入企压减率</label>
<div class="count_admin_num"><b id="cut_num">0</b></div>
<div class="percent_box">
<div class="percent-tag yjlv"> <span class="number_percent" id="cut_per">0.0<i>%</i></span> </div>
</div>
</div>
</div>
<div class="chartbox_right" id="echartCate" style="margin-top: -10%;"></div>
</div>
</div>
<div class="wrap_right">
<div class="cont_left">
<h1 class="block_tit">非行政执法</h1>
<div class="count_wrap" id="nonRegistrationType">
<div class="count_item">
<label><img src="/statistical/images/icon_24_r1.png" alt="日常巡查" />日常巡查</label>
<span class="number_count">0</span></div>
<div class="count_item">
<label><img src="/statistical/images/icon_24_r2.png" alt="普法宣传" />普法宣传</label>
<span class="number_count">0</span></div>
<div class="count_item">
<label><img src="/statistical/images/icon_24_r3.png" alt="企业服务" />企业服务</label>
<span class="number_count">0</span></div>
<div class="count_item">
<label><img src="/statistical/images/icon_24_r4.png" alt="技术指导" />技术指导</label>
<span class="number_count">0</span></div>
<div class="count_item">
<label><img src="/statistical/images/icon_24_r5.png" alt="检验检测" />检验检测</label>
<span class="number_count">0</span></div>
<div class="count_item">
<label><img src="/statistical/images/icon_24_r6.png" alt="诉求处理" />诉求处理</label>
<span class="number_count">0</span></div>
<div class="count_item">
<label><img src="/statistical/images/icon_24_r7.png" alt="培训" />培训</label>
<span class="number_count">0</span></div>
<div class="count_item">
<label><img src="/statistical/images/icon_24_r8.png" alt="调研" />调研</label>
<span class="number_count">0</span></div>
<div class="count_item">
<label><img src="/statistical/images/icon_24_r9.png" alt="其他" />其他</label>
<span class="number_count">0</span></div>
</div>
<div class="chartbox_right" id="echartCateNon"></div>
</div>
</div>
<div class="wrap_cent">
<div class="select_set">
<div class="select_item"><span>深圳市</span>
<!-- <label class="select_time">2025-01-01 至 2025-03-31 <a></a> </label>-->
<!-- <label class="select_time"><a id="timeSelect">时间筛选</a></label>-->
<span class="time_wrap"><input type="text" class="layui-input" id="timeSelect" placeholder="时间筛选" /></span>
</div>
</div>
<!-- <div class="link_btn"> <a href="/code/statisticalPanel/single-analysis" id="leftFlag">各市直执法单位综合分析</a> <a href="/code/statisticalPanel/overall-analysis"><span id="rightFlag">各区综合分析</span></a> </div>-->
<div class="link_btn" style="text-align: right;"> <a href="/code/statisticalPanelCity/city-direct" id="leftFlag">各市直执法单位综合分析</a> <a href="/code/statisticalPanelDistrict/district-direct"><span id="rightFlag">各区综合分析</span></a> </div>
<div class="count_box">
<div class="count_item admin">
<div class="count_tit">
<label>行政执法</label>
</div>
<div class="count_num">
<div class="count_num_all" id="jc_all">0</div>
<div class="count_num_sub"><span>(市直:<b id="s_jc_num">-</b></span><span>各区:<b id="q_jc_num">0</b></span></div>
</div>
</div>
<div class="count_item non_admin">
<div class="count_tit">
<label>非行政执法</label>
</div>
<div class="count_num">
<div class="count_num_all" id="njc_all">0</div>
<div class="count_num_sub"><span>(市直:<b id="s_njc_num">-</b></span><span>各区:<b id="q_njc_num">0</b></span></div>
</div>
</div>
</div>
<div class="map_box"><img class="szmap" src="/statistical/images/szmap_3d.png" alt="深圳地图" width="1920" height="1080" usemap="#Map_sz" border="0" />
<div class="label_wrap">
<div class="label_item" id="districtFT" style="top: 63%; left: 26%;"><a><label>福田区</label></a></div>
<div class="label_item" id="districtLHu" style="top: 59%; left: 36.5%;"><a><label>罗湖区</label></a></div>
<div class="label_item" id="districtYT" style="top: 53%; left: 47%;"><a><label>盐田区</label></a></div>
<div class="label_item" id="districtNS" style="top: 65%; left: 17%;"><a><label>南山区</label></a></div>
<div class="label_item" id="districtBA" style="top: 44%; left: 9.5%;"><a><label>宝安区</label></a></div>
<div class="label_item" id="districtLG" style="top: 38%; left: 43%;"><a><label>龙岗区</label></a></div>
<div class="label_item" id="districtLH" style="top: 40%; left: 24%;"><a><label>龙华区</label></a></div>
<div class="label_item" id="districtPS" style="top: 39%; left: 55%;"><a><label>坪山区</label></a></div>
<div class="label_item" id="districtGM" style="top: 28%; left: 17%;"><a><label>光明区</label></a></div>
<div class="label_item" id="districtDP" style="top: 48%; left: 64%;"><a><label>大鹏新区</label></a></div>
<div class="label_item" id="districtSS" style="top: 29%; left: 84%;"><a><label>深汕特别合作区</label></a></div>
</div>
<!--<div class="legend_box">
<label>涉企执法次数</label>
<label>被执法企业数量</label>
<label>行政执法</label>
<label>非行政执法</label>
</div>-->
</div>
</div>
<div class="wrap_bottom">
<div class="cont_left">
<h3>涉企执法趋势</h3>
<div class="tab_tit"> <a class="active" id="box0" onclick="switch_box(0)">行政执法</a> <a id="box1" onclick="switch_box(1)">非行政执法</a> </div>
<div class="tab_chart">
<!-- <div class="chartbox" id="echartInspect" style="position: absolute"></div>-->
<!-- <div class="chartbox" id="echartNonInspect" style="opacity: 0; position: absolute"></div>-->
<div class="chartbox" id="echartInspect" style="position: absolute"></div>
<div class="chartbox" id="echartNonInspect" style="display: none;"></div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="/ajax/libs/layer/layer.min.js"></script>
<script type="text/javascript" src="/ajax/libs/layui/layui.js"></script>
<script>
var ctx="/dev-api/";
var q_jc_num = 0;
var q_njc_num = 0;
var roleFlag = 1;
var leftAct = true;
var rightAct = false;
$(function(){
changeDate();
});
function changeDate(time1, time2) {
var beginTime = time1;
var endTime = time2;
analysisEnterprisesCoordination(beginTime, endTime);
analysis_enterprises(beginTime, endTime);
analysis_njc_all(beginTime, endTime);
analysis_registration_type(beginTime, endTime)
analysis_non_registration_type(beginTime, endTime);
analysisTime(beginTime, endTime);
analysisTime2(beginTime, endTime);
area_registration(beginTime, endTime);
}
function area_registration(beginTime, endTime) {
var areas = ['光明区', '宝安区', '南山区', '龙华区', '福田区', '罗湖区', '龙岗区', '盐田区', '坪山区', '大鹏新区', '深汕特别合作区']
var base_html = '';
base_html += '<a class="flag_c" onclick="showDetail({idx}, this)" flag="1"><label>{area}</label></a>';
base_html += '<div class="fold_cont">';
base_html += ' <div class="pop_tit"><h5>{area}</h5>';
base_html += ' <div class="tab_switch"> <a class="admin active" onclick="switch_tab({idx}, this, \'xzzf\')">行政执法</a> <a class="non-admin" onclick="switch_tab({idx}, this, \'fxzzf\')">非行政执法</a> </div>';
base_html += ' </div>';
base_html += ' <div class="tab_inspect">';
base_html += ' <div id="xzzf{idx}" class="tab_inspect_item">';
base_html += ' <div class="inspect_count">(行政执法总数:<b>{all_num}</b>)</div>';
base_html += ' <ul>';
base_html += ' <li><label>单独执法</label><span>{single_num}</span><span>{single_per}%</span></li>';
base_html += ' <li><label>联合执法</label><span>{nuite_num}</span><span>{nuite_per}%</span></li>';
base_html += ' <li><label>入企压减率</label><span>{cut_num}</span><span>{cut_per}%</span></li>';
base_html += ' <li><label>被执法企业</label><span>{ent_num}</span><span></span></li>';
base_html += ' <li><label>涉企投诉</label><span>{com_num}</span><span></span></li>';
base_html += ' </ul>';
base_html += ' </div>';
base_html += ' <div id="fxzzf{idx}" class="tab_inspect_item" style="display: none;">';
base_html += ' <div class="inspect_count">(非行政执法总数:<b>{njc_num}</b>)</div>';
base_html += ' <ul>';
base_html += ' <li><label>日常巡查</label><span>{type_4}</span><span>{type_p_4}%</span></li>';
base_html += ' <li><label>普法宣传</label><span>{type_3}</span><span>{type_p_3}%</span></li>';
base_html += ' <li><label>企业服务</label><span>{type_6}</span><span>{type_p_6}%</span></li>';
base_html += ' <li><label>技术指导</label><span>{type_7}</span><span>{type_p_7}%</span></li>';
base_html += ' <li><label>检验检测</label><span>{type_8}</span><span>{type_p_8}%</span></li>';
base_html += ' </ul>';
base_html += ' <ul>';
base_html += ' <li><label>诉求处理</label><span>{type_5}</span><span>{type_p_5}%</span></li>';
base_html += ' <li><label>培训</label><span>{type_9}</span><span>{type_p_9}%</span></li>';
base_html += ' <li><label>调研</label><span>{type_10}</span><span>{type_p_10}%</span></li>';
base_html += ' <li><label>其他</label><span>{type_0}</span><span>{type_p_0}%</span></li>';
base_html += ' </ul>';
base_html += ' </div>';
base_html += ' </div>';
q_jc_num = 0;
q_njc_num = 0;
for (var i=0; i <areas.length; i++) {
$.ajax({
url: ctx + "code/statisticalPanel/areaRegistration",
type: "post",
data: JSON.stringify({'deptId': areas[i], 'beginTime':beginTime, 'endTime':endTime}),
dataType: 'json',
contentType: "application/json",
success: function (result) {
q_jc_num += result.data.allNum;
q_njc_num += result.data.njcNum;
$("#q_jc_num").text(q_jc_num);
$("#q_njc_num").text(q_njc_num);
// if (1 == roleFlag) {
$("#s_jc_num").text($("#jc_all").text() - q_jc_num);
$("#s_njc_num").text($("#njc_all").text() - q_njc_num);
// }
console.log(result.data.area +' -> '+ result.data.njcNum +' : '+ ($("#njc_all").text() - q_njc_num))
switch (result.data.area) {
case '光明区':
let gmHtml = base_html.replaceAll("{area}", result.data.area)
.replaceAll("{all_num}", result.data.allNum)
.replaceAll("{single_num}", result.data.singleNum)
.replaceAll("{single_per}", result.data.singlePer)
.replaceAll("{nuite_num}", result.data.unionNum)
.replaceAll("{nuite_per}", result.data.unionPer)
.replaceAll("{cut_num}", result.data.cutNum)
.replaceAll("{cut_per}", result.data.cutPer)
.replaceAll("{ent_num}", result.data.entNum)
// .replaceAll("{ent_per}", result.data.entPer)
.replaceAll("{com_num}", result.data.comNum)
// .replaceAll("{com_per}", result.data.comPer)
.replaceAll("{njc_num}", result.data.njcNum)
.replaceAll("{type_3}", result.data.resNonTyps.key_3.num)
.replaceAll("{type_p_3}", result.data.resNonTyps.key_3.per)
.replaceAll("{type_4}", result.data.resNonTyps.key_4.num)
.replaceAll("{type_p_4}", result.data.resNonTyps.key_4.per)
.replaceAll("{type_5}", result.data.resNonTyps.key_5.num)
.replaceAll("{type_p_5}", result.data.resNonTyps.key_5.per)
.replaceAll("{type_6}", result.data.resNonTyps.key_6.num)
.replaceAll("{type_p_6}", result.data.resNonTyps.key_6.per)
.replaceAll("{type_7}", result.data.resNonTyps.key_7.num)
.replaceAll("{type_p_7}", result.data.resNonTyps.key_7.per)
.replaceAll("{type_8}", result.data.resNonTyps.key_8.num)
.replaceAll("{type_p_8}", result.data.resNonTyps.key_8.per)
.replaceAll("{type_9}", result.data.resNonTyps.key_9.num)
.replaceAll("{type_p_9}", result.data.resNonTyps.key_9.per)
.replaceAll("{type_10}", result.data.resNonTyps.key_10.num)
.replaceAll("{type_p_10}", result.data.resNonTyps.key_10.per)
.replaceAll("{type_0}", result.data.resNonTyps.key_0.num)
.replaceAll("{type_p_0}", result.data.resNonTyps.key_0.per)
.replaceAll("{idx}", 8);
$("#districtGM").html(gmHtml)
break;
case '宝安区':
let baHtml = base_html.replaceAll("{area}", result.data.area)
.replaceAll("{all_num}", result.data.allNum)
.replaceAll("{single_num}", result.data.singleNum)
.replaceAll("{single_per}", result.data.singlePer)
.replaceAll("{nuite_num}", result.data.unionNum)
.replaceAll("{nuite_per}", result.data.unionPer)
.replaceAll("{cut_num}", result.data.cutNum)
.replaceAll("{cut_per}", result.data.cutPer)
.replaceAll("{ent_num}", result.data.entNum)
// .replaceAll("{ent_per}", result.data.entPer)
.replaceAll("{com_num}", result.data.comNum)
// .replaceAll("{com_per}", result.data.comPer)
.replaceAll("{njc_num}", result.data.njcNum)
.replaceAll("{type_3}", result.data.resNonTyps.key_3.num)
.replaceAll("{type_p_3}", result.data.resNonTyps.key_3.per)
.replaceAll("{type_4}", result.data.resNonTyps.key_4.num)
.replaceAll("{type_p_4}", result.data.resNonTyps.key_4.per)
.replaceAll("{type_5}", result.data.resNonTyps.key_5.num)
.replaceAll("{type_p_5}", result.data.resNonTyps.key_5.per)
.replaceAll("{type_6}", result.data.resNonTyps.key_6.num)
.replaceAll("{type_p_6}", result.data.resNonTyps.key_6.per)
.replaceAll("{type_7}", result.data.resNonTyps.key_7.num)
.replaceAll("{type_p_7}", result.data.resNonTyps.key_7.per)
.replaceAll("{type_8}", result.data.resNonTyps.key_8.num)
.replaceAll("{type_p_8}", result.data.resNonTyps.key_8.per)
.replaceAll("{type_9}", result.data.resNonTyps.key_9.num)
.replaceAll("{type_p_9}", result.data.resNonTyps.key_9.per)
.replaceAll("{type_10}", result.data.resNonTyps.key_10.num)
.replaceAll("{type_p_10}", result.data.resNonTyps.key_10.per)
.replaceAll("{type_0}", result.data.resNonTyps.key_0.num)
.replaceAll("{type_p_0}", result.data.resNonTyps.key_0.per)
.replaceAll("{idx}", 4);
$("#districtBA").html(baHtml)
break;
case '南山区':
let nsHtml = base_html.replaceAll("{area}", result.data.area)
.replaceAll("{all_num}", result.data.allNum)
.replaceAll("{single_num}", result.data.singleNum)
.replaceAll("{single_per}", result.data.singlePer)
.replaceAll("{nuite_num}", result.data.unionNum)
.replaceAll("{nuite_per}", result.data.unionPer)
.replaceAll("{cut_num}", result.data.cutNum)
.replaceAll("{cut_per}", result.data.cutPer)
.replaceAll("{ent_num}", result.data.entNum)
// .replaceAll("{ent_per}", result.data.entPer)
.replaceAll("{com_num}", result.data.comNum)
// .replaceAll("{com_per}", result.data.comPer)
.replaceAll("{njc_num}", result.data.njcNum)
.replaceAll("{type_3}", result.data.resNonTyps.key_3.num)
.replaceAll("{type_p_3}", result.data.resNonTyps.key_3.per)
.replaceAll("{type_4}", result.data.resNonTyps.key_4.num)
.replaceAll("{type_p_4}", result.data.resNonTyps.key_4.per)
.replaceAll("{type_5}", result.data.resNonTyps.key_5.num)
.replaceAll("{type_p_5}", result.data.resNonTyps.key_5.per)
.replaceAll("{type_6}", result.data.resNonTyps.key_6.num)
.replaceAll("{type_p_6}", result.data.resNonTyps.key_6.per)
.replaceAll("{type_7}", result.data.resNonTyps.key_7.num)
.replaceAll("{type_p_7}", result.data.resNonTyps.key_7.per)
.replaceAll("{type_8}", result.data.resNonTyps.key_8.num)
.replaceAll("{type_p_8}", result.data.resNonTyps.key_8.per)
.replaceAll("{type_9}", result.data.resNonTyps.key_9.num)
.replaceAll("{type_p_9}", result.data.resNonTyps.key_9.per)
.replaceAll("{type_10}", result.data.resNonTyps.key_10.num)
.replaceAll("{type_p_10}", result.data.resNonTyps.key_10.per)
.replaceAll("{type_0}", result.data.resNonTyps.key_0.num)
.replaceAll("{type_p_0}", result.data.resNonTyps.key_0.per)
.replaceAll("{idx}", 3);
$("#districtNS").html(nsHtml)
break;
case '龙华区':
let lhHtml = base_html.replaceAll("{area}", result.data.area)
.replaceAll("{all_num}", result.data.allNum)
.replaceAll("{single_num}", result.data.singleNum)
.replaceAll("{single_per}", result.data.singlePer)
.replaceAll("{nuite_num}", result.data.unionNum)
.replaceAll("{nuite_per}", result.data.unionPer)
.replaceAll("{cut_num}", result.data.cutNum)
.replaceAll("{cut_per}", result.data.cutPer)
.replaceAll("{ent_num}", result.data.entNum)
// .replaceAll("{ent_per}", result.data.entPer)
.replaceAll("{com_num}", result.data.comNum)
// .replaceAll("{com_per}", result.data.comPer)
.replaceAll("{njc_num}", result.data.njcNum)
.replaceAll("{type_3}", result.data.resNonTyps.key_3.num)
.replaceAll("{type_p_3}", result.data.resNonTyps.key_3.per)
.replaceAll("{type_4}", result.data.resNonTyps.key_4.num)
.replaceAll("{type_p_4}", result.data.resNonTyps.key_4.per)
.replaceAll("{type_5}", result.data.resNonTyps.key_5.num)
.replaceAll("{type_p_5}", result.data.resNonTyps.key_5.per)
.replaceAll("{type_6}", result.data.resNonTyps.key_6.num)
.replaceAll("{type_p_6}", result.data.resNonTyps.key_6.per)
.replaceAll("{type_7}", result.data.resNonTyps.key_7.num)
.replaceAll("{type_p_7}", result.data.resNonTyps.key_7.per)
.replaceAll("{type_8}", result.data.resNonTyps.key_8.num)
.replaceAll("{type_p_8}", result.data.resNonTyps.key_8.per)
.replaceAll("{type_9}", result.data.resNonTyps.key_9.num)
.replaceAll("{type_p_9}", result.data.resNonTyps.key_9.per)
.replaceAll("{type_10}", result.data.resNonTyps.key_10.num)
.replaceAll("{type_p_10}", result.data.resNonTyps.key_10.per)
.replaceAll("{type_0}", result.data.resNonTyps.key_0.num)
.replaceAll("{type_p_0}", result.data.resNonTyps.key_0.per)
.replaceAll("{idx}", 6);
$("#districtLH").html(lhHtml)
break;
case '福田区':
let ftHtml = base_html.replaceAll("{area}", result.data.area)
.replaceAll("{all_num}", result.data.allNum)
.replaceAll("{single_num}", result.data.singleNum)
.replaceAll("{single_per}", result.data.singlePer)
.replaceAll("{nuite_num}", result.data.unionNum)
.replaceAll("{nuite_per}", result.data.unionPer)
.replaceAll("{cut_num}", result.data.cutNum)
.replaceAll("{cut_per}", result.data.cutPer)
.replaceAll("{ent_num}", result.data.entNum)
// .replaceAll("{ent_per}", result.data.entPer)
.replaceAll("{com_num}", result.data.comNum)
// .replaceAll("{com_per}", result.data.comPer)
.replaceAll("{njc_num}", result.data.njcNum)
.replaceAll("{type_3}", result.data.resNonTyps.key_3.num)
.replaceAll("{type_p_3}", result.data.resNonTyps.key_3.per)
.replaceAll("{type_4}", result.data.resNonTyps.key_4.num)
.replaceAll("{type_p_4}", result.data.resNonTyps.key_4.per)
.replaceAll("{type_5}", result.data.resNonTyps.key_5.num)
.replaceAll("{type_p_5}", result.data.resNonTyps.key_5.per)
.replaceAll("{type_6}", result.data.resNonTyps.key_6.num)
.replaceAll("{type_p_6}", result.data.resNonTyps.key_6.per)
.replaceAll("{type_7}", result.data.resNonTyps.key_7.num)
.replaceAll("{type_p_7}", result.data.resNonTyps.key_7.per)
.replaceAll("{type_8}", result.data.resNonTyps.key_8.num)
.replaceAll("{type_p_8}", result.data.resNonTyps.key_8.per)
.replaceAll("{type_9}", result.data.resNonTyps.key_9.num)
.replaceAll("{type_p_9}", result.data.resNonTyps.key_9.per)
.replaceAll("{type_10}", result.data.resNonTyps.key_10.num)
.replaceAll("{type_p_10}", result.data.resNonTyps.key_10.per)
.replaceAll("{type_0}", result.data.resNonTyps.key_0.num)
.replaceAll("{type_p_0}", result.data.resNonTyps.key_0.per)
.replaceAll("{idx}", 0);
$("#districtFT").html(ftHtml)
break;
case '罗湖区':
let lhuHtml = base_html.replaceAll("{area}", result.data.area)
.replaceAll("{all_num}", result.data.allNum)
.replaceAll("{single_num}", result.data.singleNum)
.replaceAll("{single_per}", result.data.singlePer)
.replaceAll("{nuite_num}", result.data.unionNum)
.replaceAll("{nuite_per}", result.data.unionPer)
.replaceAll("{cut_num}", result.data.cutNum)
.replaceAll("{cut_per}", result.data.cutPer)
.replaceAll("{ent_num}", result.data.entNum)
// .replaceAll("{ent_per}", result.data.entPer)
.replaceAll("{com_num}", result.data.comNum)
// .replaceAll("{com_per}", result.data.comPer)
.replaceAll("{njc_num}", result.data.njcNum)
.replaceAll("{type_3}", result.data.resNonTyps.key_3.num)
.replaceAll("{type_p_3}", result.data.resNonTyps.key_3.per)
.replaceAll("{type_4}", result.data.resNonTyps.key_4.num)
.replaceAll("{type_p_4}", result.data.resNonTyps.key_4.per)
.replaceAll("{type_5}", result.data.resNonTyps.key_5.num)
.replaceAll("{type_p_5}", result.data.resNonTyps.key_5.per)
.replaceAll("{type_6}", result.data.resNonTyps.key_6.num)
.replaceAll("{type_p_6}", result.data.resNonTyps.key_6.per)
.replaceAll("{type_7}", result.data.resNonTyps.key_7.num)
.replaceAll("{type_p_7}", result.data.resNonTyps.key_7.per)
.replaceAll("{type_8}", result.data.resNonTyps.key_8.num)
.replaceAll("{type_p_8}", result.data.resNonTyps.key_8.per)
.replaceAll("{type_9}", result.data.resNonTyps.key_9.num)
.replaceAll("{type_p_9}", result.data.resNonTyps.key_9.per)
.replaceAll("{type_10}", result.data.resNonTyps.key_10.num)
.replaceAll("{type_p_10}", result.data.resNonTyps.key_10.per)
.replaceAll("{type_0}", result.data.resNonTyps.key_0.num)
.replaceAll("{type_p_0}", result.data.resNonTyps.key_0.per)
.replaceAll("{idx}", 1);
$("#districtLHu").html(lhuHtml)
break;
case '龙岗区':
let lgHtml = base_html.replaceAll("{area}", result.data.area)
.replaceAll("{all_num}", result.data.allNum)
.replaceAll("{single_num}", result.data.singleNum)
.replaceAll("{single_per}", result.data.singlePer)
.replaceAll("{nuite_num}", result.data.unionNum)
.replaceAll("{nuite_per}", result.data.unionPer)
.replaceAll("{cut_num}", result.data.cutNum)
.replaceAll("{cut_per}", result.data.cutPer)
.replaceAll("{ent_num}", result.data.entNum)
// .replaceAll("{ent_per}", result.data.entPer)
.replaceAll("{com_num}", result.data.comNum)
// .replaceAll("{com_per}", result.data.comPer)
.replaceAll("{njc_num}", result.data.njcNum)
.replaceAll("{type_3}", result.data.resNonTyps.key_3.num)
.replaceAll("{type_p_3}", result.data.resNonTyps.key_3.per)
.replaceAll("{type_4}", result.data.resNonTyps.key_4.num)
.replaceAll("{type_p_4}", result.data.resNonTyps.key_4.per)
.replaceAll("{type_5}", result.data.resNonTyps.key_5.num)
.replaceAll("{type_p_5}", result.data.resNonTyps.key_5.per)
.replaceAll("{type_6}", result.data.resNonTyps.key_6.num)
.replaceAll("{type_p_6}", result.data.resNonTyps.key_6.per)
.replaceAll("{type_7}", result.data.resNonTyps.key_7.num)
.replaceAll("{type_p_7}", result.data.resNonTyps.key_7.per)
.replaceAll("{type_8}", result.data.resNonTyps.key_8.num)
.replaceAll("{type_p_8}", result.data.resNonTyps.key_8.per)
.replaceAll("{type_9}", result.data.resNonTyps.key_9.num)
.replaceAll("{type_p_9}", result.data.resNonTyps.key_9.per)
.replaceAll("{type_10}", result.data.resNonTyps.key_10.num)
.replaceAll("{type_p_10}", result.data.resNonTyps.key_10.per)
.replaceAll("{type_0}", result.data.resNonTyps.key_0.num)
.replaceAll("{type_p_0}", result.data.resNonTyps.key_0.per)
.replaceAll("{idx}", 5);
$("#districtLG").html(lgHtml)
break;
case '盐田区':
let ytHtml = base_html.replaceAll("{area}", result.data.area)
.replaceAll("{all_num}", result.data.allNum)
.replaceAll("{single_num}", result.data.singleNum)
.replaceAll("{single_per}", result.data.singlePer)
.replaceAll("{nuite_num}", result.data.unionNum)
.replaceAll("{nuite_per}", result.data.unionPer)
.replaceAll("{cut_num}", result.data.cutNum)
.replaceAll("{cut_per}", result.data.cutPer)
.replaceAll("{ent_num}", result.data.entNum)
// .replaceAll("{ent_per}", result.data.entPer)
.replaceAll("{com_num}", result.data.comNum)
// .replaceAll("{com_per}", result.data.comPer)
.replaceAll("{njc_num}", result.data.njcNum)
.replaceAll("{type_3}", result.data.resNonTyps.key_3.num)
.replaceAll("{type_p_3}", result.data.resNonTyps.key_3.per)
.replaceAll("{type_4}", result.data.resNonTyps.key_4.num)
.replaceAll("{type_p_4}", result.data.resNonTyps.key_4.per)
.replaceAll("{type_5}", result.data.resNonTyps.key_5.num)
.replaceAll("{type_p_5}", result.data.resNonTyps.key_5.per)
.replaceAll("{type_6}", result.data.resNonTyps.key_6.num)
.replaceAll("{type_p_6}", result.data.resNonTyps.key_6.per)
.replaceAll("{type_7}", result.data.resNonTyps.key_7.num)
.replaceAll("{type_p_7}", result.data.resNonTyps.key_7.per)
.replaceAll("{type_8}", result.data.resNonTyps.key_8.num)
.replaceAll("{type_p_8}", result.data.resNonTyps.key_8.per)
.replaceAll("{type_9}", result.data.resNonTyps.key_9.num)
.replaceAll("{type_p_9}", result.data.resNonTyps.key_9.per)
.replaceAll("{type_10}", result.data.resNonTyps.key_10.num)
.replaceAll("{type_p_10}", result.data.resNonTyps.key_10.per)
.replaceAll("{type_0}", result.data.resNonTyps.key_0.num)
.replaceAll("{type_p_0}", result.data.resNonTyps.key_0.per)
.replaceAll("{idx}", 2);
$("#districtYT").html(ytHtml)
break;
case '坪山区':
let psHtml = base_html.replaceAll("{area}", result.data.area)
.replaceAll("{all_num}", result.data.allNum)
.replaceAll("{single_num}", result.data.singleNum)
.replaceAll("{single_per}", result.data.singlePer)
.replaceAll("{nuite_num}", result.data.unionNum)
.replaceAll("{nuite_per}", result.data.unionPer)
.replaceAll("{cut_num}", result.data.cutNum)
.replaceAll("{cut_per}", result.data.cutPer)
.replaceAll("{ent_num}", result.data.entNum)
// .replaceAll("{ent_per}", result.data.entPer)
.replaceAll("{com_num}", result.data.comNum)
// .replaceAll("{com_per}", result.data.comPer)
.replaceAll("{njc_num}", result.data.njcNum)
.replaceAll("{type_3}", result.data.resNonTyps.key_3.num)
.replaceAll("{type_p_3}", result.data.resNonTyps.key_3.per)
.replaceAll("{type_4}", result.data.resNonTyps.key_4.num)
.replaceAll("{type_p_4}", result.data.resNonTyps.key_4.per)
.replaceAll("{type_5}", result.data.resNonTyps.key_5.num)
.replaceAll("{type_p_5}", result.data.resNonTyps.key_5.per)
.replaceAll("{type_6}", result.data.resNonTyps.key_6.num)
.replaceAll("{type_p_6}", result.data.resNonTyps.key_6.per)
.replaceAll("{type_7}", result.data.resNonTyps.key_7.num)
.replaceAll("{type_p_7}", result.data.resNonTyps.key_7.per)
.replaceAll("{type_8}", result.data.resNonTyps.key_8.num)
.replaceAll("{type_p_8}", result.data.resNonTyps.key_8.per)
.replaceAll("{type_9}", result.data.resNonTyps.key_9.num)
.replaceAll("{type_p_9}", result.data.resNonTyps.key_9.per)
.replaceAll("{type_10}", result.data.resNonTyps.key_10.num)
.replaceAll("{type_p_10}", result.data.resNonTyps.key_10.per)
.replaceAll("{type_0}", result.data.resNonTyps.key_0.num)
.replaceAll("{type_p_0}", result.data.resNonTyps.key_0.per)
.replaceAll("{idx}", 7);
$("#districtPS").html(psHtml)
break;
case '大鹏新区':
let dpHtml = base_html.replaceAll("{area}", result.data.area)
.replaceAll("{all_num}", result.data.allNum)
.replaceAll("{single_num}", result.data.singleNum)
.replaceAll("{single_per}", result.data.singlePer)
.replaceAll("{nuite_num}", result.data.unionNum)
.replaceAll("{nuite_per}", result.data.unionPer)
.replaceAll("{cut_num}", result.data.cutNum)
.replaceAll("{cut_per}", result.data.cutPer)
.replaceAll("{ent_num}", result.data.entNum)
// .replaceAll("{ent_per}", result.data.entPer)
.replaceAll("{com_num}", result.data.comNum)
// .replaceAll("{com_per}", result.data.comPer)
.replaceAll("{njc_num}", result.data.njcNum)
.replaceAll("{type_3}", result.data.resNonTyps.key_3.num)
.replaceAll("{type_p_3}", result.data.resNonTyps.key_3.per)
.replaceAll("{type_4}", result.data.resNonTyps.key_4.num)
.replaceAll("{type_p_4}", result.data.resNonTyps.key_4.per)
.replaceAll("{type_5}", result.data.resNonTyps.key_5.num)
.replaceAll("{type_p_5}", result.data.resNonTyps.key_5.per)
.replaceAll("{type_6}", result.data.resNonTyps.key_6.num)
.replaceAll("{type_p_6}", result.data.resNonTyps.key_6.per)
.replaceAll("{type_7}", result.data.resNonTyps.key_7.num)
.replaceAll("{type_p_7}", result.data.resNonTyps.key_7.per)
.replaceAll("{type_8}", result.data.resNonTyps.key_8.num)
.replaceAll("{type_p_8}", result.data.resNonTyps.key_8.per)
.replaceAll("{type_9}", result.data.resNonTyps.key_9.num)
.replaceAll("{type_p_9}", result.data.resNonTyps.key_9.per)
.replaceAll("{type_10}", result.data.resNonTyps.key_10.num)
.replaceAll("{type_p_10}", result.data.resNonTyps.key_10.per)
.replaceAll("{type_0}", result.data.resNonTyps.key_0.num)
.replaceAll("{type_p_0}", result.data.resNonTyps.key_0.per)
.replaceAll("{idx}", 9);
$("#districtDP").html(dpHtml);
break;
case '深汕特别合作区':
let ssHtml = base_html.replaceAll("{area}", result.data.area)
.replaceAll("{all_num}", result.data.allNum)
.replaceAll("{single_num}", result.data.singleNum)
.replaceAll("{single_per}", result.data.singlePer)
.replaceAll("{nuite_num}", result.data.unionNum)
.replaceAll("{nuite_per}", result.data.unionPer)
.replaceAll("{cut_num}", result.data.cutNum)
.replaceAll("{cut_per}", result.data.cutPer)
.replaceAll("{ent_num}", result.data.entNum)
// .replaceAll("{ent_per}", result.data.entPer)
.replaceAll("{com_num}", result.data.comNum)
// .replaceAll("{com_per}", result.data.comPer)
.replaceAll("{njc_num}", result.data.njcNum)
.replaceAll("{type_3}", result.data.resNonTyps.key_3.num)
.replaceAll("{type_p_3}", result.data.resNonTyps.key_3.per)
.replaceAll("{type_4}", result.data.resNonTyps.key_4.num)
.replaceAll("{type_p_4}", result.data.resNonTyps.key_4.per)
.replaceAll("{type_5}", result.data.resNonTyps.key_5.num)
.replaceAll("{type_p_5}", result.data.resNonTyps.key_5.per)
.replaceAll("{type_6}", result.data.resNonTyps.key_6.num)
.replaceAll("{type_p_6}", result.data.resNonTyps.key_6.per)
.replaceAll("{type_7}", result.data.resNonTyps.key_7.num)
.replaceAll("{type_p_7}", result.data.resNonTyps.key_7.per)
.replaceAll("{type_8}", result.data.resNonTyps.key_8.num)
.replaceAll("{type_p_8}", result.data.resNonTyps.key_8.per)
.replaceAll("{type_9}", result.data.resNonTyps.key_9.num)
.replaceAll("{type_p_9}", result.data.resNonTyps.key_9.per)
.replaceAll("{type_10}", result.data.resNonTyps.key_10.num)
.replaceAll("{type_p_10}", result.data.resNonTyps.key_10.per)
.replaceAll("{type_0}", result.data.resNonTyps.key_0.num)
.replaceAll("{type_p_0}", result.data.resNonTyps.key_0.per)
.replaceAll("{idx}", 10);
$("#districtSS").html(ssHtml)
break;
}
}
});
}
}
/** 联合执法数量 */
function analysisEnterprisesCoordination(beginTime, endTime) {
$.ajax({
url: ctx + "code/statisticalPanel/analysisEnterprisesCoordination",
type: "post",
data: JSON.stringify({'beginTime':beginTime, 'endTime':endTime}),
dataType: 'json',
contentType: "application/json",
success: function (result) {
roleFlag = result.data.roleFlag
if (9 == result.data.roleFlag) {
$("#leftFlag").hide();
$("#rightFlag").text(result.data.roleDept+"综合分析")
$("#s_jc_num").text("-");
$("#s_njc_num").text("-");
} else if (4 == result.data.roleFlag || 3 == result.data.roleFlag) {
$("#leftFlag").hide();
$("#rightFlag").text(result.data.roleDept+"综合分析")
$("#s_jc_num").text("-");
$("#s_njc_num").text("-");
} else if (1 == result.data.roleFlag) {
$("#leftFlag").text("各市值执法单位综合分析")
$("#rightFlag").text("各区综合分析")
}
non_jc_all = result.data.nonNum;
$("#jc_all").text(result.data.allNum);
$("#njc_all").text(result.data.nonNum);
$("#unite_num").text(result.data.unionNum);
$("#unite_yoy").text(result.data.unionYoy+"%");
$("#unite_rr").text(result.data.unionRr+"%");
$("#unite_per").text(result.data.unionPer+"%");
$("#single_num").text(result.data.singleNum);
$("#single_yoy").text(result.data.singleYoy+"%");
$("#single_rr").text(result.data.singleRr+"%");
$("#single_per").text(result.data.singlePer+"%");
$("#cut_num").text(result.data.cutNum);
$("#cut_per").text(result.data.cutPer+"%");
}
});
}
/** 所有非行政检查数量 */
function analysis_njc_all(beginTime, endTime) {
$.ajax({
url: ctx + "code/statisticalPanel/analysisEnterprisesNonAll",
type: "post",
data: JSON.stringify({'beginTime':beginTime, 'endTime':endTime}),
dataType: 'json',
contentType: "application/json",
success: function (result) {
$("#njc_all").text(result.data)
}
});
}
/** 被查企业数量 */
function analysis_enterprises(beginTime, endTime) {
$.ajax({
url: ctx + "code/statisticalPanel/analysisEnterprises",
type: "post",
data: JSON.stringify({'beginTime':beginTime, 'endTime':endTime}),
dataType: 'json',
contentType: "application/json",
success: function (result) {
$("#enterprisesNum").text(result.data.num)
$("#enterprisesNum_yoy").text(result.data.yoy+"%")
$("#enterprisesNum_rr").text(result.data.rr+"%")
// $("#enterprisesPer").text(result.data.per+"%")
}
});
}
/** 行政执法类型数量 */
function analysis_registration_type(beginTime, endTime) {
$.ajax({
url: ctx + "code/statisticalPanel/analysisRegistrationType",
type: "post",
data: JSON.stringify({'beginTime':beginTime, 'endTime':endTime}),
dataType: 'json',
contentType: "application/json",
success: function (result) {
var datas = result.data;
tmps = [];
for(var i=0; i<datas.length; i++) {
tmps.push({'value': datas[i].num, 'name': datas[i].dict_label})
}
chart_2(tmps)
}
});
}
/** 非行政检查类型数量 */
function analysis_non_registration_type(beginTime, endTime) {
$.ajax({
url: ctx + "code/statisticalPanel/analysisNonRegistrationType",
type: "post",
data: JSON.stringify({'beginTime':beginTime, 'endTime':endTime}),
dataType: 'json',
contentType: "application/json",
success: function (result) {
var datas = result.data;
tmps = [];
var html = '';
for(var i=0; i<datas.length; i++) {
tmps.push({'value': datas[i].num, 'name': datas[i].dict_label})
html += '<div class="count_item">';
html += '<label><img src="/statistical/images/icon_24_r'+(i+1)+'.png" alt="'+datas[i].dict_label+'"/>' + datas[i].dict_label + '</label>';
html += '<span class="number_count">' + datas[i].num + '</span>';
html += '</div>';
}
$("#nonRegistrationType").html(html);
chart_3(tmps)
}
});
}
/** 时间维度 */
function analysisTime(beginTime, endTime) {
$.ajax({
url: ctx + "code/statisticalPanel/analysisTime",
type: "post",
data: JSON.stringify({'beginTime':beginTime, 'endTime':endTime}),
dataType: 'json',
contentType: "application/json",
success: function (result) {
timesCharts(result.data.times, result.data.ins, result.data.ent);
}
});
}
function analysisTime2(beginTime, endTime) {
$.ajax({
url: ctx + "code/statisticalPanel/nonAnalysisTime",
type: "post",
data: JSON.stringify({'beginTime':beginTime, 'endTime':endTime}),
dataType: 'json',
contentType: "application/json",
success: function (result) {
timesCharts2(result.data.times, result.data.ins, result.data.ent);
}
});
}
function chart_2(data) {
// 基于准备好的dom,初始化echarts实例
var myChart = echarts.init(document.getElementById('echartCate'));
var option = {
tooltip : {
trigger: 'item',
formatter: "{b}: <br/> {c} ({d}%)",
backgroundColor: 'rgba(0, 0, 0, .5)',
textStyle: {
fontSize: 12,
color: 'rgba(255, 255, 255, .8)'
},
},
legend: {
bottom:'0',
show: true,
textStyle: {
color: "#809ABE",
fontSize: 12,
},
icon:'circle',
itemWidth: 6.5,
itemHeight: 6.5,
itemGap: 15,
},
toolbox: {
show : false,
feature : {
mark : {show: true},
dataView : {show: true, readOnly: false},
magicType : {
show: true,
type: ['pie', 'funnel']
},
restore : {show: true},
saveAsImage : {show: true}
}
},
calculable : true,
series : [
{
name:'行政执法类别数量及占比',
type:'pie',
color: ['#2d6fcf', '#4fa0a8', '#5e9acc', '#b29f60','#af5172','#8a61d2', '#6f2c9b', "#9d7173", "#887456", "#9eac71"],
radius : [52, 72],
center : ['50%', '50%'],
//roseType : 'area',
padAngle: 2,
itemStyle: {
borderRadius: 1,
//borderColor: '#0b1d4b',
//borderWidth: 2
},
label: {
show: true,
formatter: "{b|{b}} " + "{b|:}" + "\n " + "{a|{c}}" + "{d| ({d}%)}",
rich: {
a: {
color: '#3aaefb',
fontSize: 12,
//fontWeight: 550,
lineHeight: 16
},
b: {
color: 'rgba(255, 255, 255, .6)',
fontSize: 12,
lineHeight: 16
},
d: {
color: '#3aaefb',
fontSize: 12,
//lineHeight: 20
}
}
},
labelLine: {
normal: {
show: true,
length: 20,
length2: 5,
smooth: 0
},
emphasis: {
show: true
}
},
data:data
}
]
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
window.addEventListener("resize",function(){
myChart.resize();
});
}
function chart_3(data) {
// 基于准备好的dom,初始化echarts实例
var myChart = echarts.init(document.getElementById('echartCateNon'));
var option = {
tooltip : {
trigger: 'item',
formatter: "{b}: <br/> {c} ({d}%)",
backgroundColor: 'rgba(0, 0, 0, .5)',
textStyle: {
fontSize: 12,
color: 'rgba(255, 255, 255, .8)'
},
},
legend: {
bottom:'-1%',
show: true,
textStyle: {
color: "#809ABE",
fontSize: 12,
},
icon:'circle',
itemWidth: 6.5,
itemHeight: 6.5,
itemGap: 15,
},
toolbox: {
show : false,
feature : {
mark : {show: true},
dataView : {show: true, readOnly: false},
magicType : {
show: true,
type: ['pie', 'funnel']
},
restore : {show: true},
saveAsImage : {show: true}
}
},
calculable : true,
series : [
{
name:'非行政执法类别数量及占比',
type:'pie',
color: ['#7bb06c', '#489d61', '#4e97a6', '#3953d4', '#4e3ec5', '#6f2c9b', "#9d7173", "#887456", "#9eac71","#8e5aac"],
radius : [52, 72],
center : ['50%', '40%'],
//roseType : 'area',
padAngle: 2,
itemStyle: {
borderRadius: 1,
//borderColor: '#0b1d4b',
//borderWidth: 2
},
label: {
show: true,
formatter: "{b|{b}} " + "{b|:}" + "\n " + "{a|{c}}" + "{d| ({d}%)}",
rich: {
a: {
color: '#3aaefb',
fontSize: 12,
//fontWeight: 550,
lineHeight: 16
},
b: {
color: 'rgba(255, 255, 255, .6)',
fontSize: 12,
lineHeight: 16
},
d: {
color: '#3aaefb',
fontSize: 12,
//lineHeight: 20
}
}
},
labelLine: {
normal: {
show: true,
length: 20,
length2: 5,
smooth: 0
},
emphasis: {
show: true
}
},
data:data
}
]
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
window.addEventListener("resize",function(){
myChart.resize();
});
}
/** 自动上浮最大值 (为左右两边都有数值的折线图弄得) */
function getSmartMaxAndInterval(data1, data2, maxSplits = 5) {
const maxVal = Math.max(...data1, ...data2);
const roughInterval = maxVal / maxSplits;
const magnitude = Math.pow(10, Math.floor(Math.log10(roughInterval)));
const residual = roughInterval / magnitude;
let niceInterval;
if (residual <= 1) niceInterval = 1;
else if (residual <= 2) niceInterval = 2;
else if (residual <= 5) niceInterval = 5;
else niceInterval = 10;
const interval = niceInterval * magnitude;
const max = interval * maxSplits; // ✅ 保证只分 maxSplits 格
return { max, interval };
}
function getNiceMaxValue(arr1, arr2, step = 30) {
const rawMax = Math.max(Math.max(...arr1), Math.max(...arr2));
return Math.ceil(rawMax / step) * step;
}
var linechart1 = echarts.init(document.getElementById("echartInspect"));
var linechart2 = echarts.init(document.getElementById("echartNonInspect"));
/** 行政检查趋势 */
function timesCharts(times, ins, ent) {
// 使用更大的最大值作为 yAxis 的最大值
const { max, interval } = getSmartMaxAndInterval(ins, ent, 5);
// var linechart1 = echarts.init(document.getElementById("echartInspect"));
// 指定相关的配置项和数据
var option = {
tooltip: {
trigger: 'axis',
backgroundColor: 'rgba(0, 0, 0, .5)',
borderColor: 'rgba(46, 130, 253, .5)',
axisPointer: {
lineStyle: {
color: 'rgba(255, 255, 255, .8)'
}
},
textStyle: {
fontSize: 12,
color: 'rgba(255, 255, 255, .8)'
},
},
legend: {
// icon: 'rectangle',
data: ['行政执法数量', '被检查企业数量'],
x: 'right',
y: "top",
itemGap: 15,
textStyle: {
fontSize: 12,
color: "rgba(255,255,255,.5)"
}
},
color: ["rgba(69,139,252,1)", "#f59036"],
/*toolbox: {
feature: {
saveAsImage: {}
}
},*/
grid: {
left: '3%',
right: '3%',
bottom: '0',
containLabel: true
},
xAxis: [
{
type: 'category',
boundaryGap: false,
axisLabel: {
show: true,
textStyle: {
color: 'rgba(255,255,255,.5)'
}
},
axisLine: {
lineStyle: {
color: 'rgba(255,255,255,.1)'
}
},
data: times
}
],
yAxis: [
{
type: 'value',
name: '行政执法数量(宗)',
position: 'left',
axisLine: {
lineStyle: {
color: 'rgba(69,139,252,.7)'
}
},
axisLabel: {
formatter: '{value}',
color: 'rgba(69,139,252,.7)'
},
splitLine: {
lineStyle: {
color: 'rgba(255,255,255,.1)'
}
},
max, interval
},
{
type: 'value',
name: '被执法企业数量(家)',
position: 'right',
axisLine: {
lineStyle: {
color: 'rgba(245,144,54,.65)'
}
},
axisLabel: {
formatter: '{value}',
color: 'rgba(245,144,54,.65)'
},
splitLine: {
lineStyle: {
color: 'rgba(255,255,255,.1)'
}
},
max, interval
}
],
series: [
{
name: '行政执法数量',
type: 'line',
//stack: '总量',
itemStyle: {
normal: { //颜色渐变函数 前四个参数分别表示四个位置依次为左、下、右、上
/*color: new echarts.graphic.LinearGradient(0, 0, 0, 1,[{
offset: 0, color: 'rgba(69,139,252,.5)' // 0% 处的颜色
}, {
offset: 0.5, color: 'rgba(69,139,252,.3)' // 100% 处的颜色
}, {
offset: 1, color: 'transparent' // 100% 处的颜色
}]
), *///背景渐变色
lineStyle: { // 系列级个性化折线样式
width: 2,
type: 'solid',
color: "rgba(69,139,252,1)"
}
},
emphasis: {
color: 'rgba(69,139,252,1)',
lineStyle: { // 系列级个性化折线样式
width: 2,
type: 'dotted',
color: "rgba(69,139,252,1)" //折线的颜色
}
}
},//线条样式
symbol: 'circle', // 设置标记形状为圆形
symbolSize: 6, //折线点的大小
label: {
normal: {
show: false,
position: 'top',
color: "rgba(69,139,252,1)"
}
},
//areaStyle: {normal: {}},
data: ins
},
{
name: '被检查企业数量',
type: 'line',
//stack: '总量',
yAxisIndex: 1,
itemStyle: {
normal: { //颜色渐变函数 前四个参数分别表示四个位置依次为左、下、右、上
/*color: new echarts.graphic.LinearGradient(0, 0, 0, 1,[{
offset: 0, color: 'rgba(245,144,54,.65)' // 0% 处的颜色
}, {
offset: 0.4, color: 'rgba(245,144,54,.25)' // 100% 处的颜色
}, {
offset: 1, color: 'transparent' // 100% 处的颜色
}]
),*/ //背景渐变色
lineStyle: { // 系列级个性化折线样式
width: 2,
type: 'solid',
color: "rgba(245,144,54,.7)" //折线的颜色
}
},
emphasis: {
color: 'rgba(245,144,54,1)',
lineStyle: { // 系列级个性化折线样式
width: 2,
type: 'dotted',
color: "rgba(245,144,54,.8)"
}
}
},//线条样式
symbol: 'circle', // 设置标记形状为圆形
symbolSize: 6, // 设置标记大小
symbolStyle: {
borderColor: 'rgba(245,144,54,1)', // 设置边框颜色为黑色
borderWidth: 2, // 设置边框宽度为2
fill: 'rgba(245,144,54,1)' // 设置内部填充为无,实现空心效果
},
label: {
normal: {
show: false,
position: 'top',
color: "rgba(245,144,54,1)"
}
},
//areaStyle: {normal: {}},
data: ent
}]
};
// 使用刚指定的配置项和数据显示图表。
linechart1.setOption(option);
// window.addEventListener("resize", function () {
// linechart1.resize();
// });
}
/** 非行政检查趋势 */
function timesCharts2(times, ins, ent) {
// 使用更大的最大值作为 yAxis 的最大值
const { max, interval } = getSmartMaxAndInterval(ins, ent, 5);
// var linechart2 = echarts.init(document.getElementById("echartNonInspect"));
// 指定相关的配置项和数据
var option = {
tooltip: {
trigger: 'axis',
backgroundColor: 'rgba(0, 0, 0, .5)',
borderColor: 'rgba(46, 130, 253, .5)',
axisPointer: {
lineStyle: {
color: 'rgba(255, 255, 255, .8)'
}
},
textStyle: {
fontSize: 12,
color: 'rgba(255, 255, 255, .8)'
},
},
legend: {
// icon: 'rectangle',
data: ['非行政执法数量', '被检查企业数量'],
x: 'right',
y: "top",
itemGap: 15,
textStyle: {
fontSize: 12,
color: "rgba(255,255,255,.5)"
}
},
color: ["rgba(69,139,252,1)", "#f59036"],
/*toolbox: {
feature: {
saveAsImage: {}
}
},*/
grid: {
left: '3%',
right: '3%',
bottom: '0',
containLabel: true
},
xAxis: [
{
type: 'category',
boundaryGap: false,
axisLabel: {
show: true,
textStyle: {
color: 'rgba(255,255,255,.5)'
}
},
axisLine: {
lineStyle: {
color: 'rgba(255,255,255,.1)'
}
},
data: times
}
],
yAxis: [
{
type: 'value',
name: '行政执法数量(宗)',
position: 'left',
axisLine: {
lineStyle: {
color: 'rgba(69,139,252,.7)'
}
},
axisLabel: {
formatter: '{value}',
color: 'rgba(69,139,252,.7)'
},
splitLine: {
lineStyle: {
color: 'rgba(255,255,255,.1)'
}
},
max, interval
},
{
type: 'value',
name: '被检查企业数量(家)',
position: 'right',
axisLine: {
lineStyle: {
color: 'rgba(245,144,54,.65)'
}
},
axisLabel: {
formatter: '{value}',
color: 'rgba(245,144,54,.65)'
},
splitLine: {
lineStyle: {
color: 'rgba(255,255,255,.1)'
}
},
max, interval
}
],
series: [
{
name: '非行政执法数量',
type: 'line',
//stack: '总量',
itemStyle: {
normal: { //颜色渐变函数 前四个参数分别表示四个位置依次为左、下、右、上
/*color: new echarts.graphic.LinearGradient(0, 0, 0, 1,[{
offset: 0, color: 'rgba(69,139,252,.5)' // 0% 处的颜色
}, {
offset: 0.5, color: 'rgba(69,139,252,.3)' // 100% 处的颜色
}, {
offset: 1, color: 'transparent' // 100% 处的颜色
}]
), *///背景渐变色
lineStyle: { // 系列级个性化折线样式
width: 2,
type: 'solid',
color: "rgba(69,139,252,1)"
}
},
emphasis: {
color: 'rgba(69,139,252,1)',
lineStyle: { // 系列级个性化折线样式
width: 2,
type: 'dotted',
color: "rgba(69,139,252,1)" //折线的颜色
}
}
},//线条样式
symbol: 'circle', // 设置标记形状为圆形
symbolSize: 6, //折线点的大小
label: {
normal: {
show: false,
position: 'top',
color: "rgba(69,139,252,1)"
}
},
//areaStyle: {normal: {}},
data: ins
},
{
name: '被检查企业数量',
type: 'line',
//stack: '总量',
yAxisIndex: 1,
itemStyle: {
normal: { //颜色渐变函数 前四个参数分别表示四个位置依次为左、下、右、上
/*color: new echarts.graphic.LinearGradient(0, 0, 0, 1,[{
offset: 0, color: 'rgba(245,144,54,.65)' // 0% 处的颜色
}, {
offset: 0.4, color: 'rgba(245,144,54,.25)' // 100% 处的颜色
}, {
offset: 1, color: 'transparent' // 100% 处的颜色
}]
),*/ //背景渐变色
lineStyle: { // 系列级个性化折线样式
width: 2,
type: 'solid',
color: "rgba(245,144,54,.7)" //折线的颜色
}
},
emphasis: {
color: 'rgba(245,144,54,1)',
lineStyle: { // 系列级个性化折线样式
width: 2,
type: 'dotted',
color: "rgba(245,144,54,.8)"
}
}
},//线条样式
symbol: 'circle', // 设置标记形状为圆形
symbolSize: 6, // 设置标记大小
symbolStyle: {
borderColor: 'rgba(245,144,54,1)', // 设置边框颜色为黑色
borderWidth: 2, // 设置边框宽度为2
fill: 'rgba(245,144,54,1)' // 设置内部填充为无,实现空心效果
},
label: {
normal: {
show: false,
position: 'top',
color: "rgba(245,144,54,1)"
}
},
//areaStyle: {normal: {}},
data: ent
}]
};
// 使用刚指定的配置项和数据显示图表。
linechart2.setOption(option);
// window.addEventListener("resize", function () {
// linechart2.resize();
// });
}
/** 涉企检查趋势tab切换 */
function switch_box(tab) {
if (tab == 0) {
$("#box0").addClass("active").siblings().removeClass("active");
$("#echartInspect").show();
$("#echartNonInspect").hide();
linechart1.resize();
} else if (tab == 1) {
$("#box1").addClass("active").siblings().removeClass("active");
$("#echartInspect").hide();
$("#echartNonInspect").show();
linechart2.resize();
}
}
/**********数据子项折叠************/
$(".label_item > a").each(function (i) {
var ame = $(this);
ame.attr("flag", "1");
ame.on("click", {idx: i, a: ame}, function(e) {
var aobj = e.data.a;
var aflag = aobj.attr("flag");
var foldCoutArray = $(".fold_cont");
foldCoutArray.hide();
if (aflag == "1") {
foldCoutArray.eq(e.data.idx).show();
aobj.attr("flag", "0");
$(this).addClass("active")
} else {
aobj.attr("flag", "1");
$(this).removeClass("active")
}
})
});
function showDetail(idx, aElement) {
if (leftAct) {
$(".admin").addClass("active");
$(".non-admin").removeClass("active");
} else {
$(".admin").removeClass("active");
$(".non-admin").addClass("active");
}
var ame = $(aElement);
var aflag = ame.attr("flag");
var foldCoutArray = $(".fold_cont");
var aCoutArray = $(".flag_c");
for (let i = 0; i < 11; i++) {
if (idx != i) {
aCoutArray.eq(i).attr("flag", "1");
}
foldCoutArray.eq(i).hide();
}
if (aflag == "1") {
foldCoutArray.eq(idx).show();
ame.attr("flag", "0");
$(this).addClass("active")
} else {
foldCoutArray.eq(idx).hide();
ame.attr("flag", "1");
$(this).removeClass("active")
}
}
function switch_tab(index, aElement, flag){
if('xzzf' == flag) {
$("#xzzf"+index).show();
$("#fxzzf"+index).hide();
$(".pop_tit").css("width","auto");
$(".tab_inspect").css("margin-top","4rem");
$(".tab_inspect_item:first-child").show();
$(".tab_inspect_item:last-child").hide();
$("#districtSS .tab_inspect_item").css("width","auto");
leftAct = true;
rightAct = false;
} else if('fxzzf' == flag) {
$("#xzzf"+index).hide();
$("#fxzzf"+index).show();
$(".pop_tit").css("width","83%");
$("#districtSS .pop_tit").css("width","88%");
$(".tab_inspect").css("margin-top","1.8rem");
$(".tab_inspect_item:first-child").hide();
$(".tab_inspect_item:last-child").show();
$("#districtSS .tab_inspect_item").css("width","40rem");
leftAct = false;
rightAct = true;
}
$(aElement).addClass("active").siblings().removeClass("active");
}
layui.use('laydate',function(){
var laydate = layui.laydate;
laydate.render({
elem: "#timeSelect",// 指定元素
// range: true, // 开启范围选择
range: '至', // 开启范围选择
format: 'yyyy-MM-dd', // 日期格式
min: '2019-04-14', // 最小可选日期
max: '2099-06-16', // 最大可选日期
trigger: 'click', // 选择器触发方式,可选值:click, hover等
done: function(value, date, endDate){ // 选择日期后的回调函数
//选择了清空
if (value ===''){
$("#timeSelect").text("请选择时间")
changeDate(null,null);
}
//选择了确定
if (value !==null && value !==''){
var month1 = 10 > date.month?"0"+date.month:date.month
var date1 = 10 > date.date?"0"+date.date:date.date
let beginTime = date.year+"-"+month1+"-"+date1
var month2 = 10 > endDate.month?"0"+endDate.month:endDate.month
var date2 = 10 > endDate.date?"0"+endDate.date:endDate.date
let endTime = endDate.year+"-"+month2+"-"+date2
$("#timeSelect").text(beginTime +" 至 "+ endTime)
changeDate(beginTime,endTime);
}
}
})
});
</script>
</body>
</html>