| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301 |
- /*
- 一级大屏地图
- */
-
- var uploadedDataURL = "./json/format.1630046648889.js";
- var mapImg = './image/point.png';
- var myChart = echarts.init(document.getElementById('map'));
- var points = [{
- name: '安阳县',
- value: [114.47031891162396, 36.10994521277965]
- },
- {
- name: '北关区',
- value: [114.379621, 36.137115]
- },
- {
- name: '滑县',
- value: [114.667181, 35.465867]
- },
- {
- name: '龙安区',
- value: [114.254489, 36.044375]
- },
- {
- name: '林州市',
- value: [113.854634, 36.010256]
- },
- {
- name: '内黄县',
- value: [114.8165, 35.900576]
- },
- {
- name: '汤阴县',
- value: [114.455689, 35.902302]
- },
- {
- name: '文峰区(高新区)',
- value: [114.418257, 36.034251]
- },
- {
- name: '殷都区',
- value: [114.289197, 36.133648]
- }
- ];
- let mapWorkOrder = []//地区data
- let mapNum = 0;//高新区归纳于文峰区
- var maxNum = []//热力图最高范围
- let dataNum = [];
- // let arrowData = []
- let series = [];//地图内容
- let areaCount=[];//获取每个地图的受理量
- //地区坐标
- let hxData = [{
- name: '文峰区->滑县',
- coords: [
- [114.418257, 36.034251],
- [114.667181, 35.465867]
- ]
- }];
- let nhData = [{
- name: '文峰区->内黄县',
- coords: [
- [114.418257, 36.034251],
- [114.8165, 35.900576]
- ]
- }];
- let ayData = [{
- name: '文峰区->安阳县',
- //[114.470318, 36.109945]
- coords: [
- [114.418257, 36.034251],
- [114.470318, 36.109945]
- ]
- }];
- let lzData = [{
- name: '文峰区->林州市',
- coords: [
- [114.418257, 36.034251],
- [113.854634, 36.010256]
- ]
- }];
- let tyData = [{
- name: '文峰区->汤阴县',
- coords: [
- [114.418257, 36.034251],
- [114.455689, 35.902302]
- ]
- }];
- let ydData = [{
- name: '文峰区->殷都区',
- coords: [
- [114.418257, 36.034251],
- [114.289197, 36.133648]
- ]
- }];
- let laData = [{
- name: '文峰区->龙安区',
- coords: [
- [114.418257, 36.034251],
- [114.254489, 36.044375]
- ]
- }];
- let bgData = [{
- name: '文峰区->北关区',
- coords: [
- [114.418257, 36.034251],
- [114.379621, 36.137115]
- ]
- }];
- //地区的受理量(工单量)
- let hxName = 0;//滑县
- let nhName =0;//内黄
- let ayName =0;//安阳
- let lzName =0;//林州
- let tyName =0;//汤阴
- let ydName =0;//殷都
- let laName =0;//龙安
- let bgName =0;//北关
-
- function getinitMap(){
- for (i = 0; i < mapWorkOrder.length; i++) {
- for (j = 0; j < mapWorkOrder.length; j++) {
- if (mapWorkOrder[i].value > mapWorkOrder[j].value) {
- t = mapWorkOrder[i];
- mapWorkOrder[i] = mapWorkOrder[j];
- mapWorkOrder[j] = t;
- }
- }
- }
- series.push( //地图
- {
- type: 'map',
- mapType: 'js',
- geoIndex: -1,
- zoom: 1.29, //默认显示级别
- // left: 350,
- label: {
- show: false,
- color: '#222',
- // offset :[-200,-220],
- emphasis: {
- color: 'white',
- show: false
- }
- },
- itemStyle: {
- normal: {
- borderColor: '#2980b9',
- borderWidth: 1,
- areaColor: '#12235c'
- },
- emphasis: {
- areaColor: '#FA8C16',
- borderWidth: 0,
- color: 'green',
- // color: '#000',
- },
-
- },
- data: mapWorkOrder
- }, {
- type: 'effectScatter',
- coordinateSystem: 'geo',
- showEffectOn: 'render',
- rippleEffect: {
- period: 2,
- scale: 3,
- brushType: 'fill'
- },
- hoverAnimation: true,
- label: {
- formatter: '{b}',
- position: 'right',
- offset: [-20, -20],
- color: '#000000',
- fontWeight: 600,
- show: true
- },
- itemStyle: {
- normal: {
- color: '#00fcff',
- shadowBlur: 2,
- borderWidth: 2,
- shadowColor: '#00fcff'
- },
-
- },
- emphasis: {
- show: false,
- itemStyle: {
- opacity: 1, //线条宽度
- }
- },
- data: points
- })
- //每增加一个工单就出现一个箭头
- mapWorkOrder.forEach(function(v, n) {
- dataNum.push(v.value);
- if (v.name == '北关区' && v.value != 0) {
- if(bgName<v.value&&bgName!=0){
- bgData.push({
- name: '文峰区->北关区',
- coords: [
- [114.418257, 36.034251],
- [114.379621, 36.137115]
- ]
- })
- bgName=v.value
- }else{
- bgName=v.value
- }
- series.push({
- name: '供应商B',
- type: 'lines',
- zlevel: 2,
- symbol: ['none', 'arrow'],
- symbolSize: 7,
- effect: {
- show: true,
- period: n + 1,
- trailLength: 0.02,
- symbol: 'arrow',
- symbolSize: 6,
- color: '#23e9dc',
- loop:false
- },
- lineStyle: {
- color: '#23e9dc',
- // width: 1.5, //线条宽度
- opacity: 1, //尾迹线条透明度
- curveness: 0.3, //尾迹线条曲直度
- // shadowBlur: 10,
- },
- data:bgData
- })
- }
- if (v.name == '殷都区' && v.value != 0) {
- if(ydName<v.value&&ydName!=0){
- ydData.push({
- name: '文峰区->殷都区',
- coords: [
- [114.418257, 36.034251],
- [114.289197, 36.133648]
- ]
- })
- ydName=v.value
- }else{
- ydName=v.value
- }
- series.push({
- name: '供应商B',
- type: 'lines',
- zlevel: 2,
- symbol: ['none', 'arrow'],
- symbolSize: 7,
- effect: {
- show: true,
- period: n + 1,
- trailLength: 0.02,
- symbol: 'arrow',
- symbolSize: 6,
- color: '#23e9dc',
- loop:false
- },
- lineStyle: {
- color: '#23e9dc',
- // width: 1.5, //线条宽度
- opacity: 1, //尾迹线条透明度
- curveness: 0.3, //尾迹线条曲直度
- // shadowBlur: 10,
- },
- emphasis: {
- // lineStyle: {
- // width: 2, //线条宽度
- // }
- },
- data: ydData
- })
- }
- if (v.name == '龙安区' && v.value != 0) {
- if(laName<v.value&&laName!=0){
- laData.push({
- name: '文峰区->龙安区',
- coords: [
- [114.418257, 36.034251],
- [114.254489, 36.044375]
- ]
- })
- laName=v.value
- }else{
- alName=v.value
- }
- series.push({
- name: '供应商B',
- type: 'lines',
- zlevel: 2,
- symbol: ['none', 'arrow'],
- symbolSize: 7,
- effect: {
- show: true,
- period: n + 1,
- trailLength: 0.02,
- symbol: 'arrow',
- symbolSize: 6,
- color: '#23e9dc',
- loop:false
- },
- lineStyle: {
- color: '#23e9dc',
- // width: 1.5, //线条宽度
- opacity: 1, //尾迹线条透明度
- curveness: 0.3, //尾迹线条曲直度
- // shadowBlur: 10,
- },
- emphasis: {
- // lineStyle: {
- // width: 2, //线条宽度
- // }
- },
- data: laData
- })
- }
- if (v.name == '安阳县' && v.value != 0) {
- if(ayName<v.value&&ayName!=0){
- ayData.push({
- name: '文峰区->安阳县',
- coords: [
- [114.418257, 36.034251],
- [114.470318, 36.109945]
- ]
- })
- ayName=v.value
- }else{
- ayName=v.value
- }
- series.push({
- name: '供应商B',
- type: 'lines',
- zlevel: 2,
- symbol: ['none', 'arrow'],
- symbolSize: 7,
- effect: {
- show: true,
- period: n + 1,
- trailLength: 0.02,
- symbol: 'arrow',
- symbolSize: 6,
- color: '#23e9dc',
- loop:false
- },
- lineStyle: {
- color: '#23e9dc',
- // width: 1.5, //线条宽度
- opacity: 1, //尾迹线条透明度
- curveness: 0.3, //尾迹线条曲直度
- // shadowBlur: 10,
- },
- emphasis: {
- // lineStyle: {
- // width: 2, //线条宽度
- // }
- },
- data: ayData
- })
- }
- if (v.name == '汤阴县' && v.value != 0) {
- if(tyName<v.value&&tyName!=0){
- tyData.push({
- name: '文峰区->汤阴县',
- coords: [
- [114.418257, 36.034251],
- [114.455689, 35.902302]
- ]
- })
- tyName=v.value
- }else{
- tyName=v.value
- }
- series.push({
- name: '供应商B',
- type: 'lines',
- zlevel: 2,
- symbol: ['none', 'arrow'],
- symbolSize: 7,
- effect: {
- show: true,
- period: n + 1,
- trailLength: 0.02,
- symbol: 'arrow',
- symbolSize: 6,
- color: '#23e9dc',
- loop:false
- },
- lineStyle: {
- color: '#23e9dc',
- // width: 1.5, //线条宽度
- opacity: 1, //尾迹线条透明度
- curveness: 0.3, //尾迹线条曲直度
- // shadowBlur: 10,
- },
- emphasis: {
- // lineStyle: {
- // width: 2, //线条宽度
- // }
- },
- data: tyData
- })
- }
- if (v.name == '内黄县' && v.value != 0) {
- if(nhName<v.value&&nhName!=0){
- nhData.push({
- name: '文峰区->内黄县',
- coords: [
- [114.418257, 36.034251],
- [114.8165, 35.900576]
- ]
- })
- nhName=v.value
- }else{
- nhName=v.value
- }
- series.push({
- name: '供应商B',
- type: 'lines',
- zlevel: 2,
- symbol: ['none', 'arrow'],
- symbolSize: 7,
- effect: {
- show: true,
- period: n + 1,
- trailLength: 0.02,
- symbol: 'arrow',
- symbolSize: 6,
- color: '#23e9dc',
- loop:false
- },
- lineStyle: {
- color: '#23e9dc',
- // width: 1.5, //线条宽度
- opacity: 1, //尾迹线条透明度
- curveness: 0.3, //尾迹线条曲直度
- // shadowBlur: 10,
- },
- emphasis: {
- // lineStyle: {
- // width: 2, //线条宽度
- // }
- },
- data: nhData
- })
- }
- if (v.name == '滑县' && v.value != 0) {
- if(hxName<v.value&&hxName!=0){
- hxData.push({
- name: '文峰区->滑县',
- coords: [
- [114.418257, 36.034251],
- [114.667181, 35.465867]
- ]
- })
- hxName=v.value
- }else{
- hxName=v.value
- }
- series.push({
- name: '供应商B',
- type: 'lines',
- zlevel: 2,
- symbol: ['none', 'arrow'],
- symbolSize: 7,
- effect: {
- show: true,
- period: n + 1,
- trailLength: 0.02,
- symbol: 'arrow',
- symbolSize: 6,
- color: '#23e9dc',
- loop:false
- },
- lineStyle: {
- color: '#23e9dc',
- // width: 1.5, //线条宽度
- opacity: 1, //尾迹线条透明度
- curveness: 0.3, //尾迹线条曲直度
- // shadowBlur: 10,
- },
- emphasis: {
- // lineStyle: {
- // width: 2, //线条宽度
- // }
- },
- data: hxData
- })
- }
- if (v.name == '林州市' && v.value != 0) {
- if(lzName<v.value&&lzName!=0){
- lzData.push({
- name: '文峰区->林州市',
- coords: [
- [114.418257, 36.034251],
- [113.854634, 36.010256]
- ]
- })
- lzName=v.value
- }else{
- lzName=v.value
- }
- series.push({
- name: '供应商B',
- type: 'lines',
- zlevel: 2,
- symbol: ['none', 'arrow'],
- symbolSize: 7,
- effect: {
- show: true,
- period: n + 1,
- trailLength: 0.02,
- symbol: 'arrow',
- symbolSize: 6,
- color: '#23e9dc',
- loop:false
- },
- lineStyle: {
- color: '#23e9dc',
- // width: 1.5, //线条宽度
- opacity: 1, //尾迹线条透明度
- curveness: 0.3, //尾迹线条曲直度
- // shadowBlur: 10,
- },
- emphasis: {
- // lineStyle: {
- // width: 2, //线条宽度
- // }
- },
- data: lzData
- })
- }
- })
- maxNum.push(Math.max.apply(null, dataNum));
- getMap(mapWorkOrder, maxNum[0], series)
- }
-
- function initData(){
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "InfoNew/GetAreaCount",
- async: false,
- dataType: 'json',
- data: {token: $.cookie("token"),},
- success: function(res) {
- if(res.state === "notoken") {
- window.location.href = "login.html";
- }
- areaCount=res;
- res.forEach(function(v, n) {
- if (v.AreaName == "北关区" || v.AreaName == "殷都区" || v.AreaName == "龙安区" || v.AreaName ==
- "安阳县" || v.AreaName == "汤阴县" || v.AreaName == "内黄县" || v.AreaName == "滑县" || v
- .AreaName == "林州市") {
- mapWorkOrder.push({
- name: v.AreaName,
- value:v.DayCount
- })
- }
- if (v.AreaName == '高新区' || v.AreaName == '文峰区') {
- mapNum += v.DayCount
- }
- if (n == res.length - 1) {
- mapWorkOrder.push({
- name: '文峰区',
- value: mapNum
-
- })
- }
- })
- }
- });
- }
-
- function getMap(mapWorkOrder, maxNum) {
- var option = null;
- $.getJSON(uploadedDataURL, function(geoJson) {
- echarts.registerMap('js', geoJson);
- myChart.hideLoading();
- option = {
- tooltip: {
- trigger: 'item',
- textStyle: {
- color: '#fff',
- fontSize: '16',
- fontWeight: '600'
- },
- position: 'top',
- backgroundColor: 'rgba(250,250,250,0)',
- transitionDuration: 0.4,
- formatter: function(params) {
- let str=''
- areaCount.forEach(function(v,n){
- // debugger
- if(v.AreaName=='林州市'){
- $('.wrapp').css({
- 'top':'11px !important'
- })
- }
- if(v.AreaName==params.name){
- str='<div class="wrapp"><p>'+v.AreaName+'</p><ul class="mapWrap"><li><label>今日受理量:</label>'+
- v.DayCount+'</li><li><label>今日办理量:</label>'+v.dayblcount+'</li><li><label>今日办理率:</label>'+
- v.blrate+'</li><li><label>今日满意度:</label>'+v.mydrate+'</li></ul></div>'
- }
- })
- return str
- }
- },
- graphic: {
- elements: [{
- type: "image",
- z: 3,
- style: {
- image: mapImg,
- width: 30,
- height: 31
- },
- left: 390,
- top: 155
- }]
- },
- visualMap: {
- show: true,
- max: maxNum,
- seriesIndex: [0],
- // left: 185,
- calculable: true,
- textStyle: {
- color: '#fff'
- },
- inRange: {
- color: ['#fffb00', '#ff0100']
- }
- },
- geo: [{
- map: 'js',
- roam: false, //是否允许缩放
- zoom: 1.29, //默认显示级别
- // left: 350,
- scaleLimit: {
- min: 0,
- max: 3
- }, //缩放级别
- itemStyle: {
- normal: {
- // areaColor: '#013C62',
- shadowColor: '#013C62',
- shadowBlur: 20,
- shadowOffsetX: -5,
- shadowOffsetY: 15,
- }
- },
- tooltip: {
- show: false
- }
- }],
- series: series
- };
- myChart.setOption(option);
- })
- }
-
- //跳入二级地图
- myChart.on('click',function(params){
- let areaid=0;
- let areaChildrenId={};
- $('.secondLevel_map .regionMap').html('<div id="regionMap" style="width:1100px;height:800px;"></div>');
- $('.bulletFrame').show();
- $('.secondLevel_map').show();
- $('.secondLevel_map').siblings().hide()
- if ($('.bulletFrame').css('display') == 'block') {
- $('.body').css('opacity', '0.4')
- }
- // getTimes('.table_title .time')
- if(params.name=='汤阴县'){
- areaid=4970
- $('.table_title .region').text('安阳市/汤阴县');
- $('.secondLevel_map h3').text('汤阴县各个地区的数据');
- var points = [{
- name: '韩庄镇',
- value: [114.334991,35.927563]
- },
- {
- name: '宜沟镇',
- value: [114.323211,35.834913]
- },
- {
- name: '五陵镇',
- value: [114.596888,35.891651]
- },
- {
- name: '瓦岗乡',
- value: [114.483246,35.862893]
- },
- {
- name: '任固镇',
- value: [114.647119,35.969153]
- },
- {
- name: '白营镇',
- value: [114.420167,35.947903]
- },
- {
- name: '菜园镇',
- value: [114.537142,35.959174]
- },
- {
- name: '城关镇',
- value: [114.361279,35.909404]
- },
- {
- name: '伏道镇',
- value: [114.434838,35.885618]
- },{
- name: '古贤镇',
- value: [114.468908,35.952257]
- }
- ];
- getAreaChildrenDate("./json/second_mapjson/tyMap.js",areaid,params.name,2.1);
-
- }
- if(params.name=='北关区'){
- areaid=4966
- $('.table_title .region').text('安阳市/北关区');
- $('.secondLevel_map h3').text('北关区各个地区的数据');
- var points = [{
- name: '柏庄镇街道办事处',
- value: [114.376146,36.189086]
- },
- {
- name: '灯塔路街道办事处',
- value: [114.363224,36.103208]
- },
- {
- name: '豆腐营街道办事处',
- value: [114.367485,36.117054]
- },
- {
- name: '红旗路街道办事处',
- value: [114.352712,36.111018]
- },
- {
- name: '洹北街道办事处',
- value: [114.352576,36.126513]
- },
- {
- name: '解放路街道办事处',
- value: [114.337825,36.105418]
- },
- {
- name: '明航路街道办事处',
- value: [114.342118,36.116426]
- },
- {
- name: '曙光路街道办事处',
- value: [114.386033,36.11196]
- },
- {
- name: '彰北街道办事处',
- value: [114.348406,36.153483]
- },{
- name: '彰东街道办事处',
- value: [114.406294,36.122082]
- }
- ];
- // getAreaData("./json/second_mapjson/bg.js",areaid,1,points)
- getAreaChildrenDate("./json/second_mapjson/bg.js",areaid,params.name,1)
- }
- if(params.name=='林州市'){
- areaid=4973
- $('.table_title .region').text('安阳市/林州市');
- $('.secondLevel_map h3').text('林州市各个地区的数据');
- var points = [{
- name: '采桑镇',
- value: [113.887716,35.960656]
- },
- {
- name: '茶店镇',
- value: [113.777267,35.81841]
- },
- {
- name: '东岗镇',
- value: [113.931622,36.262622]
- },
- {
- name: '东姚镇',
- value: [113.96501,35.919831]
- },
- {
- name: '桂林镇',
- value: [113.849715,35.87905]
- },
- {
- name: '桂园街道',
- value: [113.845538,36.069393]
- },
- {
- name: '合涧镇',
- value: [113.75004,35.976737]
- },
- {
- name: '河顺镇',
- value: [113.934313,36.166682]
- },
- {
- name: '横水镇',
- value: [113.929042,36.059674]
- },{
- name: '黄华镇',
- value: [113.731985,36.055168]
- },{
- name: '开元街道',
- value: [113.779445,36.062924]
- },
- {
- name: '临淇镇',
- value: [113.810211,35.746358]
- },
- {
- name: '陵阳镇',
- value: [113.860306,36.108913]
- },
- {
- name: '龙山街道',
- value: [113.844116,36.036597]
- },{
- name: '任村镇',
- value: [113.819971,36.280505]
- },{
- name: '石板岩镇',
- value: [113.732406,36.171901]
- },
- {
- name: '五龙镇',
- value: [113.936786,35.768473]
- },{
- name: '姚村镇',
- value: [113.788672,36.163975]
- },{
- name: '原康镇',
- value: [113.733172,35.901168]
- },{
- name: '振林街道',
- value: [113.78518,36.028286]
- }
- ];
- // initSecondMap("./json/second_mapjson/lz.js",mapWorkOrder,points,0.8)
- // getAreaData("./json/second_mapjson/lz.js",areaid,0.8,points)
- getAreaChildrenDate("./json/second_mapjson/lz.js",areaid,params.name,0.8);
- }
- if(params.name=='龙安区'){
- areaid=4968
- $('.table_title .region').text('安阳市/龙安区');
- $('.secondLevel_map h3').text('龙安区各个地区的数据');
- var points = [{
- name: '东风乡',
- value: [114.263657,36.081646]
- },
- {
- name: '龙泉镇',
- value: [114.183266,36.066322]
- },
- {
- name: '马家乡',
- value: [114.033834,36.007366]
- },
- {
- name: '善应镇',
- value: [114.087244,36.052482]
- },
- {
- name: '马投涧',
- value: [114.265472,36.017159]
- },
- {
- name: '彰武街道',
- value: [114.126507,36.081671]
- },
- {
- name: '其他街道',
- value: [114.309283,36.086998]
- },
- {
- name: '田村街道',
- value: [114.325998,35.995775]
- }
- ];
- // initSecondMap("./json/second_mapjson/la.js",mapWorkOrder,points,1.7,1)
- getAreaChildrenDate("./json/second_mapjson/la.js",areaid,params.name,1.7)
- }
- if(params.name=='内黄县'){
- areaid=4971
- $('.table_title .region').text('安阳市/内黄县');
- $('.secondLevel_map h3').text('内黄县各个地区的数据');
- var points = [{
- name: '亳城乡',
- value: [114.791918,35.856879]
- },
- {
- name: '城关镇',
- value: [114.913482,35.921525]
- },
- {
- name: '楚旺镇',
- value: [114.861593,36.069981]
- },
- {
- name: '东庄镇',
- value: [114.799996,35.939528]
- },
- {
- name: '豆公镇',
- value: [114.731277,36.003302]
- },
- {
- name: '二安镇',
- value: [114.63051,35.830218]
- },
- {
- name: '高堤乡',
- value: [114.686809,35.926727]
- },
- {
- name: '后河镇',
- value: [114.886355,35.823831]
- },
- {
- name: '井店镇',
- value: [114.714754,35.824492]
- },{
- name: '梁庄镇',
- value: [114.790612,35.714601]
- },{
- name: '六村乡',
- value: [114.765365,35.818409]
- },
- {
- name: '马上乡',
- value: [114.923471,36.012246]
- },
- {
- name: '石盘屯乡',
- value: [114.795523,36.026423]
- },
- {
- name: '宋村乡',
- value: [114.874849,36.102626]
- },{
- name: '田氏镇',
- value: [114.768836,36.093927]
- },{
- name: '张龙乡',
- value: [114.836405,35.997405]
- },
- {
- name: '中召乡',
- value: [114.880941,35.672457]
- }
- ];
- // initSecondMap("./json/second_mapjson/nh.js",mapWorkOrder,points,0.9,1)
- // getAreaData("./json/second_mapjson/nh.js",areaid,0.9,points)
- getAreaChildrenDate("./json/second_mapjson/nh.js",areaid,params.name,0.9)
- }
- if(params.name=='安阳县'){
- areaid=4969
- $('.table_title .region').text('安阳市/安阳县');
- $('.secondLevel_map h3').text('安阳县各个地区的数据');
- var points = [{
- name: '白璧镇',
- value: [114.496084,36.085256]
- },
- {
- name: '北郭乡',
- value: [114.718712,36.092081]
- },
- {
- name: '崔家桥',
- value: [114.472922,36.127645]
- },
- {
- name: '高庄镇',
- value: [114.441733,36.022587]
- },
- {
- name: '韩陵镇',
- value: [114.426147,36.157893]
- },
- {
- name: '吕村镇',
- value: [114.63456,36.097088]
- },
- {
- name: '瓦店乡',
- value: [114.543443,36.030168]
- },
- {
- name: '辛村镇',
- value: [114.649095,36.038501]
- },{
- name: '永和镇',
- value: [114.556285,36.076409]
- }
- ];
- // initSecondMap("./json/second_mapjson/an.js",mapWorkOrder,points,1.8,1)
- getAreaChildrenDate("./json/second_mapjson/an.js",areaid,params.name,1.8)
- }
- if(params.name=='滑县'){
- areaid=4972
- $('.table_title .region').text('安阳市/滑县');
- $('.secondLevel_map h3').text('滑县各个地区的数据');
- var points = [{
- name: '道口镇街道',
- value: [114.521725,35.57908]
- },
- {
- name: '城关镇',
- value: [114.562491,35.536364]
- },
- {
- name: '白道口镇',
- value: [114.687202,35.610667]
- },
- {
- name: '留固镇',
- value: [114.707976,35.521489]
- },
- {
- name: '上官镇',
- value: [114.6566,35.408238]
- },
- {
- name: '牛屯镇',
- value: [114.432765,35.263399]
- },
- {
- name: '万古镇',
- value: [114.765123,35.425571]
- },
- {
- name: '高平镇',
- value: [114.762324,35.362734]
- },
- {
- name: '王庄镇',
- value: [114.452002,35.448025]
- },{
- name: '老店镇',
- value: [114.519226,35.432093]
- },{
- name: '枣村乡',
- value: [114.641436,35.586652]
- },
- {
- name: '四间房镇',
- value: [114.809686,35.644298]
- },
- {
- name: '八里营镇',
- value: [114.802761,35.526012]
- },
- {
- name: '赵营镇',
- value: [114.918496,35.558846]
- },{
- name: '大寨乡',
- value: [114.922687,35.510747]
- },{
- name: '桑村乡',
- value: [114.948336,35.40398]
- },
- {
- name: '老爷庙乡',
- value: [114.859358,35.417752]
- },{
- name: '慈周寨镇',
- value: [114.656107,35.31389]
- },{
- name: '瓦岗寨乡',
- value: [114.605103,35.337706]
- },{
- name: '焦虎镇',
- value: [114.547843,35.324892]
- },{
- name:'半坡店镇',
- value: [114.461749,35.357857]
- },{
- name:'小铺乡',
- value: [114.462266,35.524934]
- },{
- name:'锦和街道',
- value:[114.534026,35.55689]
- }
- ];
- getAreaChildrenDate("./json/second_mapjson/hx.js",areaid,params.name,1.5)
- }
- if(params.name=='文峰区'){
- areaid=4965
- $('.table_title .region').text('安阳市/文峰区');
- $('.secondLevel_map h3').text('文峰区各个地区的数据');
- var points = [{
- name: '紫薇大道街道办事处',
- value: [114.377648,36.100414]
- },
- {
- name: '中华路街道办事处',
- value: [114.395717,36.077149]
- },
- {
- name: '西关街道办事处',
- value: [114.338148,36.084578]
- },
- {
- name: '永明路街道办事处',
- value: [114.399933,36.099202]
- },
- {
- name: '银杏大街办事处',
- value: [114.373121,36.064235]
- },
- {
- name: '西大街街道办事处',
- value: [114.34324,36.088201]
- },
- {
- name: '头二三街道办事处',
- value: [114.360524,36.094981]
- },
- {
- name: '甜水井街道办事处',
- value: [114.358959,36.099054]
- },
- {
- name: '商颂大街办事处',
- value: [114.382846,36.030264]
- },
- {
- name: '南关街道办事处',
- value: [114.349528,36.078638]
- },{
- name: '光华路街道办事处',
- value: [114.375407,36.07955]
- },{
- name: '峨嵋大街办事处',
- value: [114.336056,36.055329]
- },
- {
- name: '东关街道办事处',
- value: [114.372651,36.090796]
- },
- {
- name: '东大街街道办事处',
- value: [114.350048,36.091195]
- },
- {
- name: '北大街街道办事处',
- value: [114.34613,36.097237]
- },{
- name: '宝莲寺镇人民政府',
- value: [114.375466,36.005516]
- }
- ];
- getAreaChildrenDate("./json/second_mapjson/wf.js",areaid,params.name,1)
- // initSecondMap("./json/second_mapjson/wf.js",mapWorkOrder,points,1)
- }
- if(params.name=='殷都区'){
- areaid=4967
- $('.table_title .region').text('安阳市/殷都区');
- $('.secondLevel_map h3').text('殷都区各个地区的数据');
- var points = [{
- name: '其他街道',
- value: [114.293737,36.139251]
- },
- {
- name: '洪河屯乡',
- value: [114.305236,36.177483]
- },
- {
- name: '伦掌镇',
- value: [114.139168,36.228247]
- },
- {
- name: '水冶镇',
- value: [114.137329,36.131261]
- },
- {
- name: '许家沟乡',
- value: [114.062848,36.123366]
- },
- {
- name: '磊口乡',
- value: [113.995755,36.155448]
- },
- {
- name: '铜冶镇',
- value: [114.078469,36.235819]
- },
- {
- name: '都里镇',
- value: [114.016636,36.272104]
- },{
- name: '安丰乡',
- value: [114.268893,36.203905]
- },{
- name: '曲沟镇',
- value: [114.21666,36.115853]
- }
- ];
- // initSecondMap("./json/second_mapjson/yd.js",mapWorkOrder,points,1.5,1)
- getAreaChildrenDate("./json/second_mapjson/nyd.js",areaid,params.name,1.5)
- }
- initTableMap(areaid)
- //按钮样式
- $('.type').css({
- 'background': 'url(./image/second/btn1.png)'
- })
- $('.classify').css({
- 'background': 'url(./image/second/btn2.png)'
- })
- $('#orderKeylist').hide()
- function getAreaData(area,areaid,num,points,areaChildrenId){
- new doAjax({
- url:huayi.config.callcenter_url+'/InfoNew/GetAreaChildrenCount',
- Type: 'get',
- data: {
- token: $.cookie("token"),
- areaid :areaid
- },
- callBack: function (res) {
- let mapWorkOrder=[];
- let maxNum2=[];//二级热力图的最高范围
- let dataNum2=[];
- res.data.forEach(function(v,n){
- dataNum2.push(v.count)
- mapWorkOrder.push({
- id: v.Township, // 更改为从接口中获取数据
- name:v.Name,
- value:v.count
- })
- })
- maxNum2.push(Math.max.apply(null, dataNum2));
- initSecondMap(area,mapWorkOrder,points,num,maxNum2[0],areaChildrenId, areaid)
- }
- });
- }
- function getAreaChildrenDate(area,areaid,areaName,num){
- new doAjax({
- url:huayi.config.callcenter_url+'/InfoNew/GetTownshipCount',
- Type: 'get',
- async:false,
- data: {
- token: $.cookie("token"),
- id:areaid
- },
- callBack: function (res) {
- areaChildrenId={};
- areaChildrenId.areaName=areaName;
- areaChildrenId.data=res.data;
- console.log(areaChildrenId)
- getAreaData(area,areaid,num,points,areaChildrenId);
- }
- });
- }
- //二级地图的按钮切换左侧表格
- $('.table_btn').click(function(e){
- if(e.target.tagName == 'SPAN'){
- if ($(e.target).attr('pos') == '0') {
- //诉求分类
- initTableMap(areaid)
- $('#orderKeylist').hide()
- $('#orderlist').show()
- $('.type').css({
- 'background': 'url(./image/second/btn1.png)',
- 'color':'#f4d219'
- })
- $('.classify').css({
- 'background': 'url(./image/second/btn2.png)',
- 'color':'#0693be'
- })
- }else{
- //问题分类前十
- keyTable(areaid)
- $('#orderlist').hide()
- $('#orderKeylist').show()
- $('.classify').css({
- 'background': 'url(./image/second/btn1.png)',
- 'color':'#f4d219'
- })
- $('.type').css({
- 'background': 'url(./image/second/btn2.png)',
- 'color':'#0693be'
- })
- }
- }
- e.stopPropagation()
- })
- })
|