varcertNumChart;$(document).ready(function() {certNumChart= echarts.init(document.getElementById('certNumChart'));
certNumChart.showLoading();
initShowView();//设置点击事件
certNumChart.on('click', function(params) {var city =params.name;var code =params.data.code;var url =G3.webPath+ "jsp/marketcheck/map_detail.jsp?code="+code;
G3.showModalDialog("执法人员区域匹配", url, {
width :1000,
height :560},function(e, ret) {if (ret == "1") {
grid.reload();
}
});
});
});vargeoCoordMap;var planePath = 'arrow';var provinceMap =proCantName;var certNumOption ={
tooltip : {
trigger:'item',
formatter:'{b}:
{c}'},
legend: {
orient:'horizontal',
x:'top',
data:["随机数据"]
},
grid:{
top:0,
bottom:0},
geo : {
map : provinceMap,
top :'10%',
roam :false,
zoom:1.2,
silent :true,
itemStyle : {
normal : {
areaColor :'#1673c5',
borderColor :'#36a0fd'},
emphasis : {
areaColor :'#2a333d'}
}
},
dataRange: {
show:true,
min:0,
max:10,
x:"right",
color:['#0080FF','#D2E9FF'],
text:['高','低'], //文本,默认为数值文本
calculable : true},
series : [
{
name:'检查数据量',
type:'map',
mapType: proCantName,
zoom:1.2,
selectedMode :'single',
itemStyle:{
normal:{label:{show:true}},
emphasis:{label:{show:true}}
},
data:[]
}
]
};functioninitShowView() {
$.ajax({
async :true,
url : G3.webPath+ "command/dispatcher/com.inspur.dtdcommon.casemanage.cmd.DtdChecManDispatcherCmd/queryList",
type :"POST",
data : {
checkYearDate : checkYearDate,
checkEndYearDate : checkEndYearDate
},
success :function(data) {
certNumOption.legend.data=data.catalog;
certNumOption.series[0].data =data.data;
certNumChart.hideLoading();
$.get(G3.webPath+ 'skins/echars/dataGeo/geometryProvince/'+proCantCode+'.json', function(geoJson) {
echarts.registerMap(proCantName, geoJson);
certNumChart.setOption(certNumOption);
});
}
});
}functioniconRefresh() {
$(document).on("click",".icon-refresh",function() {var $container = $(this).parents(".chart-container").find(".chartContainer");if ($container.css("display") == "none") {
$container.css("display", "block");
$container.prev().css("display", "none");
}
});
}