| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296 |
- /*
- 一级大屏地图
- */
- var uploadedDataURL = "./json/format.1630046648889.js";
- var mapImg = './image/point.png';
- var myChart = echarts.init(document.getElementById('map'));
- var points = [{
- name: '安阳县',
- value: [114.164512, 36.180943]
- },
- {
- 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: '文峰区->安阳县',
- coords: [
- [114.418257, 36.034251],
- [114.164512, 36.180943]
- ]
- }];
- 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'
- }
- },
- 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.164512, 36.180943]
- ]
- })
- 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({
- name:v.Name,
- value:v.count
- })
- })
- maxNum2.push(Math.max.apply(null, dataNum2));
- initSecondMap(area,mapWorkOrder,points,num,maxNum2[0],areaChildrenId)
- }
- });
- }
- 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()
- })
- })
|