Geen omschrijving

anyangMap.js 27KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298
  1. /*
  2. 一级大屏地图
  3. */
  4. var uploadedDataURL = "./json/format.1630046648889.js";
  5. var mapImg = './image/point.png';
  6. var myChart = echarts.init(document.getElementById('map'));
  7. var points = [{
  8. name: '安阳县',
  9. value: [114.164512, 36.180943]
  10. },
  11. {
  12. name: '北关区',
  13. value: [114.379621, 36.137115]
  14. },
  15. {
  16. name: '滑县',
  17. value: [114.667181, 35.465867]
  18. },
  19. {
  20. name: '龙安区',
  21. value: [114.254489, 36.044375]
  22. },
  23. {
  24. name: '林州市',
  25. value: [113.854634, 36.010256]
  26. },
  27. {
  28. name: '内黄县',
  29. value: [114.8165, 35.900576]
  30. },
  31. {
  32. name: '汤阴县',
  33. value: [114.455689, 35.902302]
  34. },
  35. {
  36. name: '文峰区(高新区)',
  37. value: [114.418257, 36.034251]
  38. },
  39. {
  40. name: '殷都区',
  41. value: [114.289197, 36.133648]
  42. }
  43. ];
  44. let mapWorkOrder = []//地区data
  45. let mapNum = 0;//高新区归纳于文峰区
  46. var maxNum = []//热力图最高范围
  47. let dataNum = [];
  48. // let arrowData = []
  49. let series = [];//地图内容
  50. let areaCount=[];//获取每个地图的受理量
  51. //地区坐标
  52. let hxData = [{
  53. name: '文峰区->滑县',
  54. coords: [
  55. [114.418257, 36.034251],
  56. [114.667181, 35.465867]
  57. ]
  58. }];
  59. let nhData = [{
  60. name: '文峰区->内黄县',
  61. coords: [
  62. [114.418257, 36.034251],
  63. [114.8165, 35.900576]
  64. ]
  65. }];
  66. let ayData = [{
  67. name: '文峰区->安阳县',
  68. coords: [
  69. [114.418257, 36.034251],
  70. [114.164512, 36.180943]
  71. ]
  72. }];
  73. let lzData = [{
  74. name: '文峰区->林州市',
  75. coords: [
  76. [114.418257, 36.034251],
  77. [113.854634, 36.010256]
  78. ]
  79. }];
  80. let tyData = [{
  81. name: '文峰区->汤阴县',
  82. coords: [
  83. [114.418257, 36.034251],
  84. [114.455689, 35.902302]
  85. ]
  86. }];
  87. let ydData = [{
  88. name: '文峰区->殷都区',
  89. coords: [
  90. [114.418257, 36.034251],
  91. [114.289197, 36.133648]
  92. ]
  93. }];
  94. let laData = [{
  95. name: '文峰区->龙安区',
  96. coords: [
  97. [114.418257, 36.034251],
  98. [114.254489, 36.044375]
  99. ]
  100. }];
  101. let bgData = [{
  102. name: '文峰区->北关区',
  103. coords: [
  104. [114.418257, 36.034251],
  105. [114.379621, 36.137115]
  106. ]
  107. }];
  108. //地区的受理量(工单量)
  109. let hxName = 0;//滑县
  110. let nhName =0;//内黄
  111. let ayName =0;//安阳
  112. let lzName =0;//林州
  113. let tyName =0;//汤阴
  114. let ydName =0;//殷都
  115. let laName =0;//龙安
  116. let bgName =0;//北关
  117. initData()//从后台获取每个区的受理状况
  118. setInterval(function(){
  119. mapWorkOrder = []
  120. mapNum = 0;
  121. maxNum = []
  122. dataNum = [];
  123. series = [];
  124. areaCount=[]
  125. initData()
  126. getinitMap();
  127. },30000)
  128. getinitMap()//每增加一个工单就出现一个箭头
  129. function getinitMap(){
  130. for (i = 0; i < mapWorkOrder.length; i++) {
  131. for (j = 0; j < mapWorkOrder.length; j++) {
  132. if (mapWorkOrder[i].value > mapWorkOrder[j].value) {
  133. t = mapWorkOrder[i];
  134. mapWorkOrder[i] = mapWorkOrder[j];
  135. mapWorkOrder[j] = t;
  136. }
  137. }
  138. }
  139. series.push( //地图
  140. {
  141. type: 'map',
  142. mapType: 'js',
  143. geoIndex: -1,
  144. zoom: 1.29, //默认显示级别
  145. // left: 350,
  146. label: {
  147. show: false,
  148. color: '#222',
  149. // offset :[-200,-220],
  150. emphasis: {
  151. color: 'white',
  152. show: false
  153. }
  154. },
  155. itemStyle: {
  156. normal: {
  157. borderColor: '#2980b9',
  158. borderWidth: 1,
  159. areaColor: '#12235c'
  160. },
  161. emphasis: {
  162. // areaColor: '#FA8C16',
  163. borderWidth: 0,
  164. color: 'green'
  165. }
  166. },
  167. data: mapWorkOrder
  168. }, {
  169. type: 'effectScatter',
  170. coordinateSystem: 'geo',
  171. showEffectOn: 'render',
  172. rippleEffect: {
  173. period: 2,
  174. scale: 3,
  175. brushType: 'fill'
  176. },
  177. hoverAnimation: true,
  178. label: {
  179. formatter: '{b}',
  180. position: 'right',
  181. offset: [-20, -20],
  182. color: '#000000',
  183. fontWeight: 600,
  184. show: true
  185. },
  186. itemStyle: {
  187. normal: {
  188. color: '#00fcff',
  189. shadowBlur: 2,
  190. borderWidth: 2,
  191. shadowColor: '#00fcff'
  192. }
  193. },
  194. emphasis: {
  195. show: false,
  196. itemStyle: {
  197. opacity: 1, //线条宽度
  198. }
  199. },
  200. data: points
  201. })
  202. //每增加一个工单就出现一个箭头
  203. mapWorkOrder.forEach(function(v, n) {
  204. dataNum.push(v.value);
  205. if (v.name == '北关区' && v.value != 0) {
  206. if(bgName<v.value&&bgName!=0){
  207. bgData.push({
  208. name: '文峰区->北关区',
  209. coords: [
  210. [114.418257, 36.034251],
  211. [114.379621, 36.137115]
  212. ]
  213. })
  214. bgName=v.value
  215. }else{
  216. bgName=v.value
  217. }
  218. series.push({
  219. name: '供应商B',
  220. type: 'lines',
  221. zlevel: 2,
  222. symbol: ['none', 'arrow'],
  223. symbolSize: 7,
  224. effect: {
  225. show: true,
  226. period: n + 1,
  227. trailLength: 0.02,
  228. symbol: 'arrow',
  229. symbolSize: 6,
  230. color: '#23e9dc',
  231. loop:false
  232. },
  233. lineStyle: {
  234. color: '#23e9dc',
  235. // width: 1.5, //线条宽度
  236. opacity: 1, //尾迹线条透明度
  237. curveness: 0.3, //尾迹线条曲直度
  238. // shadowBlur: 10,
  239. },
  240. data:bgData
  241. })
  242. }
  243. if (v.name == '殷都区' && v.value != 0) {
  244. if(ydName<v.value&&ydName!=0){
  245. ydData.push({
  246. name: '文峰区->殷都区',
  247. coords: [
  248. [114.418257, 36.034251],
  249. [114.289197, 36.133648]
  250. ]
  251. })
  252. ydName=v.value
  253. }else{
  254. ydName=v.value
  255. }
  256. series.push({
  257. name: '供应商B',
  258. type: 'lines',
  259. zlevel: 2,
  260. symbol: ['none', 'arrow'],
  261. symbolSize: 7,
  262. effect: {
  263. show: true,
  264. period: n + 1,
  265. trailLength: 0.02,
  266. symbol: 'arrow',
  267. symbolSize: 6,
  268. color: '#23e9dc',
  269. loop:false
  270. },
  271. lineStyle: {
  272. color: '#23e9dc',
  273. // width: 1.5, //线条宽度
  274. opacity: 1, //尾迹线条透明度
  275. curveness: 0.3, //尾迹线条曲直度
  276. // shadowBlur: 10,
  277. },
  278. emphasis: {
  279. // lineStyle: {
  280. // width: 2, //线条宽度
  281. // }
  282. },
  283. data: ydData
  284. })
  285. }
  286. if (v.name == '龙安区' && v.value != 0) {
  287. if(laName<v.value&&laName!=0){
  288. laData.push({
  289. name: '文峰区->龙安区',
  290. coords: [
  291. [114.418257, 36.034251],
  292. [114.254489, 36.044375]
  293. ]
  294. })
  295. laName=v.value
  296. }else{
  297. alName=v.value
  298. }
  299. series.push({
  300. name: '供应商B',
  301. type: 'lines',
  302. zlevel: 2,
  303. symbol: ['none', 'arrow'],
  304. symbolSize: 7,
  305. effect: {
  306. show: true,
  307. period: n + 1,
  308. trailLength: 0.02,
  309. symbol: 'arrow',
  310. symbolSize: 6,
  311. color: '#23e9dc',
  312. loop:false
  313. },
  314. lineStyle: {
  315. color: '#23e9dc',
  316. // width: 1.5, //线条宽度
  317. opacity: 1, //尾迹线条透明度
  318. curveness: 0.3, //尾迹线条曲直度
  319. // shadowBlur: 10,
  320. },
  321. emphasis: {
  322. // lineStyle: {
  323. // width: 2, //线条宽度
  324. // }
  325. },
  326. data: laData
  327. })
  328. }
  329. if (v.name == '安阳县' && v.value != 0) {
  330. if(ayName<v.value&&ayName!=0){
  331. ayData.push({
  332. name: '文峰区->安阳县',
  333. coords: [
  334. [114.418257, 36.034251],
  335. [114.164512, 36.180943]
  336. ]
  337. })
  338. ayName=v.value
  339. }else{
  340. ayName=v.value
  341. }
  342. series.push({
  343. name: '供应商B',
  344. type: 'lines',
  345. zlevel: 2,
  346. symbol: ['none', 'arrow'],
  347. symbolSize: 7,
  348. effect: {
  349. show: true,
  350. period: n + 1,
  351. trailLength: 0.02,
  352. symbol: 'arrow',
  353. symbolSize: 6,
  354. color: '#23e9dc',
  355. loop:false
  356. },
  357. lineStyle: {
  358. color: '#23e9dc',
  359. // width: 1.5, //线条宽度
  360. opacity: 1, //尾迹线条透明度
  361. curveness: 0.3, //尾迹线条曲直度
  362. // shadowBlur: 10,
  363. },
  364. emphasis: {
  365. // lineStyle: {
  366. // width: 2, //线条宽度
  367. // }
  368. },
  369. data: ayData
  370. })
  371. }
  372. if (v.name == '汤阴县' && v.value != 0) {
  373. if(tyName<v.value&&tyName!=0){
  374. tyData.push({
  375. name: '文峰区->汤阴县',
  376. coords: [
  377. [114.418257, 36.034251],
  378. [114.455689, 35.902302]
  379. ]
  380. })
  381. tyName=v.value
  382. }else{
  383. tyName=v.value
  384. }
  385. series.push({
  386. name: '供应商B',
  387. type: 'lines',
  388. zlevel: 2,
  389. symbol: ['none', 'arrow'],
  390. symbolSize: 7,
  391. effect: {
  392. show: true,
  393. period: n + 1,
  394. trailLength: 0.02,
  395. symbol: 'arrow',
  396. symbolSize: 6,
  397. color: '#23e9dc',
  398. loop:false
  399. },
  400. lineStyle: {
  401. color: '#23e9dc',
  402. // width: 1.5, //线条宽度
  403. opacity: 1, //尾迹线条透明度
  404. curveness: 0.3, //尾迹线条曲直度
  405. // shadowBlur: 10,
  406. },
  407. emphasis: {
  408. // lineStyle: {
  409. // width: 2, //线条宽度
  410. // }
  411. },
  412. data: tyData
  413. })
  414. }
  415. if (v.name == '内黄县' && v.value != 0) {
  416. if(nhName<v.value&&nhName!=0){
  417. nhData.push({
  418. name: '文峰区->内黄县',
  419. coords: [
  420. [114.418257, 36.034251],
  421. [114.8165, 35.900576]
  422. ]
  423. })
  424. nhName=v.value
  425. }else{
  426. nhName=v.value
  427. }
  428. series.push({
  429. name: '供应商B',
  430. type: 'lines',
  431. zlevel: 2,
  432. symbol: ['none', 'arrow'],
  433. symbolSize: 7,
  434. effect: {
  435. show: true,
  436. period: n + 1,
  437. trailLength: 0.02,
  438. symbol: 'arrow',
  439. symbolSize: 6,
  440. color: '#23e9dc',
  441. loop:false
  442. },
  443. lineStyle: {
  444. color: '#23e9dc',
  445. // width: 1.5, //线条宽度
  446. opacity: 1, //尾迹线条透明度
  447. curveness: 0.3, //尾迹线条曲直度
  448. // shadowBlur: 10,
  449. },
  450. emphasis: {
  451. // lineStyle: {
  452. // width: 2, //线条宽度
  453. // }
  454. },
  455. data: nhData
  456. })
  457. }
  458. if (v.name == '滑县' && v.value != 0) {
  459. if(hxName<v.value&&hxName!=0){
  460. hxData.push({
  461. name: '文峰区->滑县',
  462. coords: [
  463. [114.418257, 36.034251],
  464. [114.667181, 35.465867]
  465. ]
  466. })
  467. hxName=v.value
  468. }else{
  469. hxName=v.value
  470. }
  471. series.push({
  472. name: '供应商B',
  473. type: 'lines',
  474. zlevel: 2,
  475. symbol: ['none', 'arrow'],
  476. symbolSize: 7,
  477. effect: {
  478. show: true,
  479. period: n + 1,
  480. trailLength: 0.02,
  481. symbol: 'arrow',
  482. symbolSize: 6,
  483. color: '#23e9dc',
  484. loop:false
  485. },
  486. lineStyle: {
  487. color: '#23e9dc',
  488. // width: 1.5, //线条宽度
  489. opacity: 1, //尾迹线条透明度
  490. curveness: 0.3, //尾迹线条曲直度
  491. // shadowBlur: 10,
  492. },
  493. emphasis: {
  494. // lineStyle: {
  495. // width: 2, //线条宽度
  496. // }
  497. },
  498. data: hxData
  499. })
  500. }
  501. if (v.name == '林州市' && v.value != 0) {
  502. if(lzName<v.value&&lzName!=0){
  503. lzData.push({
  504. name: '文峰区->林州市',
  505. coords: [
  506. [114.418257, 36.034251],
  507. [113.854634, 36.010256]
  508. ]
  509. })
  510. lzName=v.value
  511. }else{
  512. lzName=v.value
  513. }
  514. series.push({
  515. name: '供应商B',
  516. type: 'lines',
  517. zlevel: 2,
  518. symbol: ['none', 'arrow'],
  519. symbolSize: 7,
  520. effect: {
  521. show: true,
  522. period: n + 1,
  523. trailLength: 0.02,
  524. symbol: 'arrow',
  525. symbolSize: 6,
  526. color: '#23e9dc',
  527. loop:false
  528. },
  529. lineStyle: {
  530. color: '#23e9dc',
  531. // width: 1.5, //线条宽度
  532. opacity: 1, //尾迹线条透明度
  533. curveness: 0.3, //尾迹线条曲直度
  534. // shadowBlur: 10,
  535. },
  536. emphasis: {
  537. // lineStyle: {
  538. // width: 2, //线条宽度
  539. // }
  540. },
  541. data: lzData
  542. })
  543. }
  544. })
  545. maxNum.push(Math.max.apply(null, dataNum));
  546. getMap(mapWorkOrder, maxNum[0], series)
  547. }
  548. function initData(){
  549. $.ajax({
  550. type: "get",
  551. url: huayi.config.callcenter_url + "InfoNew/GetAreaCount",
  552. async: false,
  553. dataType: 'json',
  554. success: function(res) {
  555. areaCount=res;
  556. res.forEach(function(v, n) {
  557. if (v.AreaName == "北关区" || v.AreaName == "殷都区" || v.AreaName == "龙安区" || v.AreaName ==
  558. "安阳县" || v.AreaName == "汤阴县" || v.AreaName == "内黄县" || v.AreaName == "滑县" || v
  559. .AreaName == "林州市") {
  560. mapWorkOrder.push({
  561. name: v.AreaName,
  562. value:v.DayCount
  563. })
  564. }
  565. if (v.AreaName == '高新区' || v.AreaName == '文峰区') {
  566. mapNum += v.DayCount
  567. }
  568. if (n == res.length - 1) {
  569. mapWorkOrder.push({
  570. name: '文峰区',
  571. value: mapNum
  572. })
  573. }
  574. })
  575. }
  576. });
  577. }
  578. function getMap(mapWorkOrder, maxNum) {
  579. var option = null;
  580. $.getJSON(uploadedDataURL, function(geoJson) {
  581. echarts.registerMap('js', geoJson);
  582. myChart.hideLoading();
  583. option = {
  584. tooltip: {
  585. trigger: 'item',
  586. textStyle: {
  587. color: '#fff',
  588. fontSize: '16',
  589. fontWeight: '600'
  590. },
  591. position: 'top',
  592. backgroundColor: 'rgba(250,250,250,0)',
  593. transitionDuration: 0.4,
  594. formatter: function(params) {
  595. let str=''
  596. areaCount.forEach(function(v,n){
  597. // debugger
  598. if(v.AreaName=='林州市'){
  599. $('.wrapp').css({
  600. 'top':'11px !important'
  601. })
  602. }
  603. if(v.AreaName==params.name){
  604. str='<div class="wrapp"><p>'+v.AreaName+'</p><ul class="mapWrap"><li><label>今日受理量:</label>'+
  605. v.DayCount+'</li><li><label>今日办理量:</label>'+v.dayblcount+'</li><li><label>今日办理率:</label>'+
  606. v.blrate+'</li><li><label>今日满意度:</label>'+v.mydrate+'</li></ul></div>'
  607. }
  608. })
  609. return str
  610. }
  611. },
  612. graphic: {
  613. elements: [{
  614. type: "image",
  615. z: 3,
  616. style: {
  617. image: mapImg,
  618. width: 30,
  619. height: 31
  620. },
  621. left: 390,
  622. top: 155
  623. }]
  624. },
  625. visualMap: {
  626. show: true,
  627. max: maxNum,
  628. seriesIndex: [0],
  629. // left: 185,
  630. calculable: true,
  631. textStyle: {
  632. color: '#fff'
  633. },
  634. inRange: {
  635. color: ['#fffb00', '#ff0100']
  636. }
  637. },
  638. geo: [{
  639. map: 'js',
  640. roam: false, //是否允许缩放
  641. zoom: 1.29, //默认显示级别
  642. // left: 350,
  643. scaleLimit: {
  644. min: 0,
  645. max: 3
  646. }, //缩放级别
  647. itemStyle: {
  648. normal: {
  649. // areaColor: '#013C62',
  650. shadowColor: '#013C62',
  651. shadowBlur: 20,
  652. shadowOffsetX: -5,
  653. shadowOffsetY: 15,
  654. }
  655. },
  656. tooltip: {
  657. show: false
  658. }
  659. }],
  660. series: series
  661. };
  662. myChart.setOption(option);
  663. })
  664. }
  665. //跳入二级地图
  666. myChart.on('click',function(params){
  667. let areaid=0;
  668. let areaChildrenId={};
  669. $('.secondLevel_map .regionMap').html('<div id="regionMap" style="width:1100px;height:800px;"></div>');
  670. $('.bulletFrame').show();
  671. $('.secondLevel_map').show();
  672. $('.secondLevel_map').siblings().hide()
  673. if ($('.bulletFrame').css('display') == 'block') {
  674. $('.body').css('opacity', '0.4')
  675. }
  676. // getTimes('.table_title .time')
  677. if(params.name=='汤阴县'){
  678. areaid=4970
  679. $('.table_title .region').text('安阳市/汤阴县');
  680. $('.secondLevel_map h3').text('汤阴县各个地区的数据');
  681. var points = [{
  682. name: '韩庄镇',
  683. value: [114.334991,35.927563]
  684. },
  685. {
  686. name: '宜沟镇',
  687. value: [114.323211,35.834913]
  688. },
  689. {
  690. name: '五陵镇',
  691. value: [114.596888,35.891651]
  692. },
  693. {
  694. name: '瓦岗乡',
  695. value: [114.483246,35.862893]
  696. },
  697. {
  698. name: '任固镇',
  699. value: [114.647119,35.969153]
  700. },
  701. {
  702. name: '白营镇',
  703. value: [114.420167,35.947903]
  704. },
  705. {
  706. name: '菜园镇',
  707. value: [114.537142,35.959174]
  708. },
  709. {
  710. name: '城关镇',
  711. value: [114.361279,35.909404]
  712. },
  713. {
  714. name: '伏道镇',
  715. value: [114.434838,35.885618]
  716. },{
  717. name: '古贤镇',
  718. value: [114.468908,35.952257]
  719. }
  720. ];
  721. getAreaChildrenDate("./json/second_mapjson/tyMap.js",areaid,params.name,2.1);
  722. }
  723. if(params.name=='北关区'){
  724. areaid=4966
  725. $('.table_title .region').text('安阳市/北关区');
  726. $('.secondLevel_map h3').text('北关区各个地区的数据');
  727. var points = [{
  728. name: '柏庄镇街道办事处',
  729. value: [114.376146,36.189086]
  730. },
  731. {
  732. name: '灯塔路街道办事处',
  733. value: [114.363224,36.103208]
  734. },
  735. {
  736. name: '豆腐营街道办事处',
  737. value: [114.367485,36.117054]
  738. },
  739. {
  740. name: '红旗路街道办事处',
  741. value: [114.352712,36.111018]
  742. },
  743. {
  744. name: '洹北街道办事处',
  745. value: [114.352576,36.126513]
  746. },
  747. {
  748. name: '解放路街道办事处',
  749. value: [114.337825,36.105418]
  750. },
  751. {
  752. name: '明航路街道办事处',
  753. value: [114.342118,36.116426]
  754. },
  755. {
  756. name: '曙光路街道办事处',
  757. value: [114.386033,36.11196]
  758. },
  759. {
  760. name: '彰北街道办事处',
  761. value: [114.348406,36.153483]
  762. },{
  763. name: '彰东街道办事处',
  764. value: [114.406294,36.122082]
  765. }
  766. ];
  767. // getAreaData("./json/second_mapjson/bg.js",areaid,1,points)
  768. getAreaChildrenDate("./json/second_mapjson/bg.js",areaid,params.name,1)
  769. }
  770. if(params.name=='林州市'){
  771. areaid=4973
  772. $('.table_title .region').text('安阳市/林州市');
  773. $('.secondLevel_map h3').text('林州市各个地区的数据');
  774. var points = [{
  775. name: '采桑镇',
  776. value: [113.887716,35.960656]
  777. },
  778. {
  779. name: '茶店镇',
  780. value: [113.777267,35.81841]
  781. },
  782. {
  783. name: '东岗镇',
  784. value: [113.931622,36.262622]
  785. },
  786. {
  787. name: '东姚镇',
  788. value: [113.96501,35.919831]
  789. },
  790. {
  791. name: '桂林镇',
  792. value: [113.849715,35.87905]
  793. },
  794. {
  795. name: '桂园街道',
  796. value: [113.845538,36.069393]
  797. },
  798. {
  799. name: '合涧镇',
  800. value: [113.75004,35.976737]
  801. },
  802. {
  803. name: '河顺镇',
  804. value: [113.934313,36.166682]
  805. },
  806. {
  807. name: '横水镇',
  808. value: [113.929042,36.059674]
  809. },{
  810. name: '黄华镇',
  811. value: [113.731985,36.055168]
  812. },{
  813. name: '开元街道',
  814. value: [113.779445,36.062924]
  815. },
  816. {
  817. name: '临淇镇',
  818. value: [113.810211,35.746358]
  819. },
  820. {
  821. name: '陵阳镇',
  822. value: [113.860306,36.108913]
  823. },
  824. {
  825. name: '龙山街道',
  826. value: [113.844116,36.036597]
  827. },{
  828. name: '任村镇',
  829. value: [113.819971,36.280505]
  830. },{
  831. name: '石板岩镇',
  832. value: [113.732406,36.171901]
  833. },
  834. {
  835. name: '五龙镇',
  836. value: [113.936786,35.768473]
  837. },{
  838. name: '姚村镇',
  839. value: [113.788672,36.163975]
  840. },{
  841. name: '原康镇',
  842. value: [113.733172,35.901168]
  843. },{
  844. name: '振林街道',
  845. value: [113.78518,36.028286]
  846. }
  847. ];
  848. // initSecondMap("./json/second_mapjson/lz.js",mapWorkOrder,points,0.8)
  849. // getAreaData("./json/second_mapjson/lz.js",areaid,0.8,points)
  850. getAreaChildrenDate("./json/second_mapjson/lz.js",areaid,params.name,0.8);
  851. }
  852. if(params.name=='龙安区'){
  853. areaid=4968
  854. $('.table_title .region').text('安阳市/龙安区');
  855. $('.secondLevel_map h3').text('龙安区各个地区的数据');
  856. var points = [{
  857. name: '东风乡',
  858. value: [114.263657,36.081646]
  859. },
  860. {
  861. name: '龙泉镇',
  862. value: [114.183266,36.066322]
  863. },
  864. {
  865. name: '马家乡',
  866. value: [114.033834,36.007366]
  867. },
  868. {
  869. name: '善应镇',
  870. value: [114.087244,36.052482]
  871. },
  872. {
  873. name: '马投涧',
  874. value: [114.265472,36.017159]
  875. },
  876. {
  877. name: '彰武街道',
  878. value: [114.126507,36.081671]
  879. },
  880. {
  881. name: '其他街道',
  882. value: [114.309283,36.086998]
  883. },
  884. {
  885. name: '田村街道',
  886. value: [114.325998,35.995775]
  887. }
  888. ];
  889. // initSecondMap("./json/second_mapjson/la.js",mapWorkOrder,points,1.7,1)
  890. getAreaChildrenDate("./json/second_mapjson/la.js",areaid,params.name,1.7)
  891. }
  892. if(params.name=='内黄县'){
  893. areaid=4971
  894. $('.table_title .region').text('安阳市/内黄县');
  895. $('.secondLevel_map h3').text('内黄县各个地区的数据');
  896. var points = [{
  897. name: '亳城乡',
  898. value: [114.791918,35.856879]
  899. },
  900. {
  901. name: '城关镇',
  902. value: [114.913482,35.921525]
  903. },
  904. {
  905. name: '楚旺镇',
  906. value: [114.861593,36.069981]
  907. },
  908. {
  909. name: '东庄镇',
  910. value: [114.799996,35.939528]
  911. },
  912. {
  913. name: '豆公镇',
  914. value: [114.731277,36.003302]
  915. },
  916. {
  917. name: '二安镇',
  918. value: [114.63051,35.830218]
  919. },
  920. {
  921. name: '高堤乡',
  922. value: [114.686809,35.926727]
  923. },
  924. {
  925. name: '后河镇',
  926. value: [114.886355,35.823831]
  927. },
  928. {
  929. name: '井店镇',
  930. value: [114.714754,35.824492]
  931. },{
  932. name: '梁庄镇',
  933. value: [114.790612,35.714601]
  934. },{
  935. name: '六村乡',
  936. value: [114.765365,35.818409]
  937. },
  938. {
  939. name: '马上乡',
  940. value: [114.923471,36.012246]
  941. },
  942. {
  943. name: '石盘屯乡',
  944. value: [114.795523,36.026423]
  945. },
  946. {
  947. name: '宋村乡',
  948. value: [114.874849,36.102626]
  949. },{
  950. name: '田氏镇',
  951. value: [114.768836,36.093927]
  952. },{
  953. name: '张龙乡',
  954. value: [114.836405,35.997405]
  955. },
  956. {
  957. name: '中召乡',
  958. value: [114.880941,35.672457]
  959. }
  960. ];
  961. // initSecondMap("./json/second_mapjson/nh.js",mapWorkOrder,points,0.9,1)
  962. // getAreaData("./json/second_mapjson/nh.js",areaid,0.9,points)
  963. getAreaChildrenDate("./json/second_mapjson/nh.js",areaid,params.name,0.9)
  964. }
  965. if(params.name=='安阳县'){
  966. areaid=4969
  967. $('.table_title .region').text('安阳市/安阳县');
  968. $('.secondLevel_map h3').text('安阳县各个地区的数据');
  969. var points = [{
  970. name: '白璧镇',
  971. value: [114.496084,36.085256]
  972. },
  973. {
  974. name: '北郭乡',
  975. value: [114.718712,36.092081]
  976. },
  977. {
  978. name: '崔家桥',
  979. value: [114.472922,36.127645]
  980. },
  981. {
  982. name: '高庄镇',
  983. value: [114.441733,36.022587]
  984. },
  985. {
  986. name: '韩陵镇',
  987. value: [114.426147,36.157893]
  988. },
  989. {
  990. name: '吕村镇',
  991. value: [114.63456,36.097088]
  992. },
  993. {
  994. name: '瓦店乡',
  995. value: [114.543443,36.030168]
  996. },
  997. {
  998. name: '辛村镇',
  999. value: [114.649095,36.038501]
  1000. },{
  1001. name: '永和镇',
  1002. value: [114.556285,36.076409]
  1003. }
  1004. ];
  1005. // initSecondMap("./json/second_mapjson/an.js",mapWorkOrder,points,1.8,1)
  1006. getAreaChildrenDate("./json/second_mapjson/an.js",areaid,params.name,1.8)
  1007. }
  1008. if(params.name=='滑县'){
  1009. areaid=4972
  1010. $('.table_title .region').text('安阳市/滑县');
  1011. $('.secondLevel_map h3').text('滑县各个地区的数据');
  1012. var points = [{
  1013. name: '道口镇街道',
  1014. value: [114.521725,35.57908]
  1015. },
  1016. {
  1017. name: '城关镇',
  1018. value: [114.562491,35.536364]
  1019. },
  1020. {
  1021. name: '白道口镇',
  1022. value: [114.687202,35.610667]
  1023. },
  1024. {
  1025. name: '留固镇',
  1026. value: [114.707976,35.521489]
  1027. },
  1028. {
  1029. name: '上官镇',
  1030. value: [114.6566,35.408238]
  1031. },
  1032. {
  1033. name: '牛屯镇',
  1034. value: [114.432765,35.263399]
  1035. },
  1036. {
  1037. name: '万古镇',
  1038. value: [114.765123,35.425571]
  1039. },
  1040. {
  1041. name: '高平镇',
  1042. value: [114.762324,35.362734]
  1043. },
  1044. {
  1045. name: '王庄镇',
  1046. value: [114.452002,35.448025]
  1047. },{
  1048. name: '老店镇',
  1049. value: [114.519226,35.432093]
  1050. },{
  1051. name: '枣村乡',
  1052. value: [114.641436,35.586652]
  1053. },
  1054. {
  1055. name: '四间房镇',
  1056. value: [114.809686,35.644298]
  1057. },
  1058. {
  1059. name: '八里营镇',
  1060. value: [114.802761,35.526012]
  1061. },
  1062. {
  1063. name: '赵营镇',
  1064. value: [114.918496,35.558846]
  1065. },{
  1066. name: '大寨乡',
  1067. value: [114.922687,35.510747]
  1068. },{
  1069. name: '桑村乡',
  1070. value: [114.948336,35.40398]
  1071. },
  1072. {
  1073. name: '老爷庙乡',
  1074. value: [114.859358,35.417752]
  1075. },{
  1076. name: '慈周寨镇',
  1077. value: [114.656107,35.31389]
  1078. },{
  1079. name: '瓦岗寨乡',
  1080. value: [114.605103,35.337706]
  1081. },{
  1082. name: '焦虎镇',
  1083. value: [114.547843,35.324892]
  1084. },{
  1085. name:'半坡店镇',
  1086. value: [114.461749,35.357857]
  1087. },{
  1088. name:'小铺乡',
  1089. value: [114.462266,35.524934]
  1090. },{
  1091. name:'锦和街道',
  1092. value:[114.534026,35.55689]
  1093. }
  1094. ];
  1095. getAreaChildrenDate("./json/second_mapjson/hx.js",areaid,params.name,1.5)
  1096. }
  1097. if(params.name=='文峰区'){
  1098. areaid=4965
  1099. $('.table_title .region').text('安阳市/文峰区');
  1100. $('.secondLevel_map h3').text('文峰区各个地区的数据');
  1101. var points = [{
  1102. name: '紫薇大道街道办事处',
  1103. value: [114.377648,36.100414]
  1104. },
  1105. {
  1106. name: '中华路街道办事处',
  1107. value: [114.395717,36.077149]
  1108. },
  1109. {
  1110. name: '西关街道办事处',
  1111. value: [114.338148,36.084578]
  1112. },
  1113. {
  1114. name: '永明路街道办事处',
  1115. value: [114.399933,36.099202]
  1116. },
  1117. {
  1118. name: '银杏大街办事处',
  1119. value: [114.373121,36.064235]
  1120. },
  1121. {
  1122. name: '西大街街道办事处',
  1123. value: [114.34324,36.088201]
  1124. },
  1125. {
  1126. name: '头二三街道办事处',
  1127. value: [114.360524,36.094981]
  1128. },
  1129. {
  1130. name: '甜水井街道办事处',
  1131. value: [114.358959,36.099054]
  1132. },
  1133. {
  1134. name: '商颂大街办事处',
  1135. value: [114.382846,36.030264]
  1136. },
  1137. {
  1138. name: '南关街道办事处',
  1139. value: [114.349528,36.078638]
  1140. },{
  1141. name: '光华路街道办事处',
  1142. value: [114.375407,36.07955]
  1143. },{
  1144. name: '峨嵋大街办事处',
  1145. value: [114.336056,36.055329]
  1146. },
  1147. {
  1148. name: '东关街道办事处',
  1149. value: [114.372651,36.090796]
  1150. },
  1151. {
  1152. name: '东大街街道办事处',
  1153. value: [114.350048,36.091195]
  1154. },
  1155. {
  1156. name: '北大街街道办事处',
  1157. value: [114.34613,36.097237]
  1158. },{
  1159. name: '宝莲寺镇人民政府',
  1160. value: [114.375466,36.005516]
  1161. }
  1162. ];
  1163. getAreaChildrenDate("./json/second_mapjson/wf.js",areaid,params.name,1)
  1164. // initSecondMap("./json/second_mapjson/wf.js",mapWorkOrder,points,1)
  1165. }
  1166. if(params.name=='殷都区'){
  1167. areaid=4967
  1168. $('.table_title .region').text('安阳市/殷都区');
  1169. $('.secondLevel_map h3').text('殷都区各个地区的数据');
  1170. var points = [{
  1171. name: '其他街道',
  1172. value: [114.293737,36.139251]
  1173. },
  1174. {
  1175. name: '洪河屯乡',
  1176. value: [114.305236,36.177483]
  1177. },
  1178. {
  1179. name: '伦掌镇',
  1180. value: [114.139168,36.228247]
  1181. },
  1182. {
  1183. name: '水冶镇',
  1184. value: [114.137329,36.131261]
  1185. },
  1186. {
  1187. name: '许家沟乡',
  1188. value: [114.062848,36.123366]
  1189. },
  1190. {
  1191. name: '磊口乡',
  1192. value: [113.995755,36.155448]
  1193. },
  1194. {
  1195. name: '铜冶镇',
  1196. value: [114.078469,36.235819]
  1197. },
  1198. {
  1199. name: '都里镇',
  1200. value: [114.016636,36.272104]
  1201. },{
  1202. name: '安丰乡',
  1203. value: [114.268893,36.203905]
  1204. },{
  1205. name: '曲沟镇',
  1206. value: [114.21666,36.115853]
  1207. }
  1208. ];
  1209. // initSecondMap("./json/second_mapjson/yd.js",mapWorkOrder,points,1.5,1)
  1210. getAreaChildrenDate("./json/second_mapjson/nyd.js",areaid,params.name,1.5)
  1211. }
  1212. initTableMap(areaid)
  1213. //按钮样式
  1214. $('.type').css({
  1215. 'background': 'url(./image/second/btn1.png)'
  1216. })
  1217. $('.classify').css({
  1218. 'background': 'url(./image/second/btn2.png)'
  1219. })
  1220. $('#orderKeylist').hide()
  1221. function getAreaData(area,areaid,num,points,areaChildrenId){
  1222. new doAjax({
  1223. url:huayi.config.callcenter_url+'/InfoNew/GetAreaChildrenCount',
  1224. Type: 'get',
  1225. data: {
  1226. areaid :areaid
  1227. },
  1228. callBack: function (res) {
  1229. let mapWorkOrder=[];
  1230. let maxNum2=[];//二级热力图的最高范围
  1231. let dataNum2=[];
  1232. res.data.forEach(function(v,n){
  1233. dataNum2.push(v.count)
  1234. mapWorkOrder.push({
  1235. name:v.Name,
  1236. value:v.count
  1237. })
  1238. })
  1239. maxNum2.push(Math.max.apply(null, dataNum2));
  1240. initSecondMap(area,mapWorkOrder,points,num,maxNum2[0],areaChildrenId)
  1241. }
  1242. });
  1243. }
  1244. function getAreaChildrenDate(area,areaid,areaName,num){
  1245. new doAjax({
  1246. url:huayi.config.callcenter_url+'/InfoNew/GetTownshipCount',
  1247. Type: 'get',
  1248. async:false,
  1249. data: {
  1250. id:areaid
  1251. },
  1252. callBack: function (res) {
  1253. areaChildrenId={};
  1254. areaChildrenId.areaName=areaName;
  1255. areaChildrenId.data=res.data;
  1256. console.log(areaChildrenId)
  1257. getAreaData(area,areaid,num,points,areaChildrenId);
  1258. }
  1259. });
  1260. }
  1261. //二级地图的按钮切换左侧表格
  1262. $('.table_btn').click(function(e){
  1263. if(e.target.tagName == 'SPAN'){
  1264. if ($(e.target).attr('pos') == '0') {
  1265. //诉求分类
  1266. initTableMap(areaid)
  1267. $('#orderKeylist').hide()
  1268. $('#orderlist').show()
  1269. $('.type').css({
  1270. 'background': 'url(./image/second/btn1.png)',
  1271. 'color':'#f4d219'
  1272. })
  1273. $('.classify').css({
  1274. 'background': 'url(./image/second/btn2.png)',
  1275. 'color':'#0693be'
  1276. })
  1277. }else{
  1278. //问题分类前十
  1279. keyTable(areaid)
  1280. $('#orderlist').hide()
  1281. $('#orderKeylist').show()
  1282. $('.classify').css({
  1283. 'background': 'url(./image/second/btn1.png)',
  1284. 'color':'#f4d219'
  1285. })
  1286. $('.type').css({
  1287. 'background': 'url(./image/second/btn2.png)',
  1288. 'color':'#0693be'
  1289. })
  1290. }
  1291. }
  1292. e.stopPropagation()
  1293. })
  1294. })