cokingCoalB.js 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936
  1. let app = new Vue({
  2. el: '#app',
  3. data () {
  4. return {
  5. time: '',
  6. timer: '',
  7. companyList: [
  8. { name: '核心人力-1' },
  9. { name: '核心人力-2' },
  10. { name: '内部人才市场' },
  11. { name: '薪酬福利' },
  12. { name: '培训' }
  13. ],
  14. mapName: 'shanxi',
  15. geoCoordMap: {},
  16. }
  17. },
  18. created () {
  19. this.time = formatDate()
  20. this.timer = setInterval(() => {
  21. this.time = formatDate()
  22. }, 1000)
  23. },
  24. beforeDestroy () {
  25. if (this.timer) {
  26. clearInterval(this.timer);
  27. }
  28. },
  29. mounted () {
  30. setTimeout(() => {
  31. this.budgetECharts();
  32. this.aiQualityECharts()
  33. this.aiQualityECharts2()
  34. this.initChartR1()
  35. this.initChinaChart()
  36. });
  37. },
  38. methods: {
  39. convertData (data) {
  40. var res = []
  41. for (var i = 0; i < data.length; i++) {
  42. var geoCoord = this.geoCoordMap[data[i].name]
  43. if (geoCoord) {
  44. res.push({
  45. name: data[i].name,
  46. value: geoCoord.concat(data[i].value),
  47. })
  48. }
  49. }
  50. return res
  51. },
  52. budgetECharts () {
  53. let chart = echarts.init(document.getElementById("budget"));
  54. let option = {
  55. grid: {
  56. top: 15,
  57. right: 15,
  58. left: 45,
  59. bottom: 45,
  60. },
  61. tooltip: {
  62. show: true,
  63. trigger: "axis",
  64. axisPointer: {
  65. lineStyle: {
  66. color: "#ddd",
  67. },
  68. },
  69. },
  70. legend: {
  71. textStyle: {
  72. // 图列内容样式
  73. color: "#fff", // 字体颜色
  74. // fontSize: "10",
  75. },
  76. right: 30,
  77. icon: "roundRect",
  78. // 小图标的宽高
  79. itemHeight: 5
  80. },
  81. xAxis: {
  82. type: "category",
  83. data: ["5年以下", "6-10年", "11-15年", "16-20年", '21-25年', '26-30年', '30年以上'],
  84. boundaryGap: false,
  85. splitLine: {
  86. show: false,
  87. interval: "auto",
  88. },
  89. axisTick: {
  90. show: false,
  91. },
  92. axisLine: {
  93. lineStyle: {
  94. color: "#7ECEF4",
  95. },
  96. },
  97. axisLabel: {
  98. interval: 0,
  99. rotate: 40,
  100. margin: 10,
  101. textStyle: {
  102. // fontSize: 10,
  103. color: "#fff",
  104. },
  105. },
  106. },
  107. yAxis: {
  108. type: "value",
  109. splitLine: {
  110. show: true,
  111. lineStyle: {
  112. color: "#204561",
  113. width: 1,
  114. type: "dotted",
  115. },
  116. },
  117. axisTick: {
  118. show: false,
  119. },
  120. axisLine: {
  121. lineStyle: {
  122. color: "#7ECEF4",
  123. },
  124. },
  125. axisLabel: {
  126. margin: 10,
  127. textStyle: {
  128. fontSize: 10,
  129. color: "#fff",
  130. },
  131. },
  132. },
  133. series: [
  134. {
  135. name: "",
  136. type: "line",
  137. smooth: false,
  138. showSymbol: true, // 节点长显
  139. symbol: 'image://' + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAiCAYAAADRcLDBAAAAAXNSR0IArs4c6QAACZtJREFUWEftl3tw1NUVx8+59/fY3ezmQULAJDzygATD0JGEirQwUWwDhdBOkTi+RkCL+KhTam2tf7Sh2rGO7dhRO7UqD1GrBoaOoqil0kQw+CAGi1GRkBAgQF6bxya7+/v97r2nczcNBhKEGf2zv5nd3+vecz+/8z33nHsRLvKoJuI5bVDGmFpMhHMBIR8IUgGBA0EvILQA0Eek2G4geG3eJIxdpGnACzXcf5ICLsEdRLQOANoA8FUCeBcUHPIkhEPdIJ0cSAMB+UjwbWK0GAjmANAmbrJH5k7A9guN8ZUQe47TIgJ6EgA+AMAHF0zC/1zIoH5f20aTUKl7AfBaQPztghzUNs57jAlBRFh7TFUR4GoCXHnVFHz7YgY/t83uVipGpM1EdAQVW3llLsbHsjMKQgP8q1U9QYil5GFFeQF2DHdcUU08LAYzFJgZgBhUgBYCcAXgckGDLome5N629jfunuYM99l5mGzTUs8C4YS4hUsqsjB6LsgoiDePyPXAsBz9uLB8Ig4mOlRVsbKCX2YBM6cSgQkgzuMYAxiC8kgejw18crz+tlIv0Z2IXd6ithBhYHEeLkdEGmngLIjXmuhKAniOcShdkoundcPFjx22B9KmFDMmU/Q9SYGkZKKfnYoTwMIkp0M163tkPGEcuUGARlzEej9595bxEf2supEsvwV7kMGLS/Pxz2NCaLfFiQ4S4Lrl0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ypmRkG4ynEuEVKITJwpYwNSncwPPDxtvamA4/HYTwoDVC2qcVMTZ28EZFlCw6Ld1RcxEJ3GGTZdvU7AFwpQa56fbm5OxGsZYDQCQwcQBDnbJwMILCBwAcE9aBXO1S+zZlhobmZEI+iCTePBXDW7Di3EOn78u20iEn6GyG9J53YQ7tuCOrNzxCMPiL/O4dgaPVcM3S+6oWeHNtOXkeE1yFi1RvX4F/Hsj9qdpyvUcUOCjgxdScB/gwAThDRDibdOldFv3A6DnX395+Q46eUjUPTl8/tpDkMsBz0dhBoswfskZrKoVX714IY7qw3Pt0IC1Gp7+saRwh5qDfEAHqJrcvxUSBqUIrejht8x77Kb3BDfKGv+CbeX3BX/k0MciEb/4cY9tB/AY2/0F+RNSoUAAAAAElFTkSuQmCC',
  140. symbolSize: 30,
  141. data: ["1100", "400", "608", "811", '358', '698', '125', '765'],
  142. areaStyle: {
  143. normal: {
  144. color: new echarts.graphic.LinearGradient(
  145. 0,
  146. 0,
  147. 0,
  148. 1,
  149. [
  150. {
  151. offset: 0,
  152. color: "#40A9FF",
  153. },
  154. {
  155. offset: 1,
  156. color: "#051F41",
  157. },
  158. ],
  159. false
  160. ),
  161. },
  162. },
  163. itemStyle: {
  164. normal: {
  165. color: "#40A9FF",
  166. },
  167. },
  168. lineStyle: {
  169. normal: {
  170. width: 2,
  171. },
  172. },
  173. }
  174. ],
  175. };
  176. chart.setOption(option);
  177. tools.loopShowTooltip(chart, option, {
  178. nterval: 2000,
  179. loopSeries: true,
  180. });
  181. },
  182. aiQualityECharts2 () {
  183. let chart = echarts.init(document.getElementById("aiQuality2"));
  184. let option = {
  185. grid: {
  186. top: 35,
  187. right: 10,
  188. left: 50,
  189. bottom: 60,
  190. },
  191. tooltip: {
  192. show: true,
  193. trigger: "axis",
  194. axisPointer: {
  195. // 坐标轴指示器,坐标轴触发有效
  196. type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
  197. },
  198. },
  199. xAxis: {
  200. data: ["研究生 及以上", "本科", "大专", "高中", "中专", "技校 及职高", "初中 及以下"],
  201. axisTick: {
  202. show: false,
  203. },
  204. // x轴的字体颜色
  205. axisLabel: {
  206. rotate: 40,
  207. textStyle: {
  208. color: "white",
  209. },
  210. },
  211. //y轴线的颜色以及宽度
  212. axisLine: {
  213. show: true,
  214. lineStyle: {
  215. color: "#1E5389",
  216. width: 1,
  217. type: "solid",
  218. },
  219. },
  220. },
  221. yAxis: {
  222. name: '单位:人数',
  223. nameTextStyle: {//y轴上方单位的颜色
  224. color: '#fff',
  225. },
  226. axisTick: {
  227. lineStyle: {
  228. color: "#18416F",
  229. },
  230. },
  231. // y轴的字体颜色
  232. axisLabel: {
  233. textStyle: {
  234. color: "white",
  235. },
  236. },
  237. splitLine: {
  238. show: false,
  239. lineStyle: {
  240. color: "#204561",
  241. width: 1,
  242. type: "dotted",
  243. },
  244. },
  245. //y轴线的颜色以及宽度
  246. axisLine: {
  247. show: true,
  248. lineStyle: {
  249. color: "#1E5389",
  250. width: 1,
  251. type: "solid",
  252. },
  253. },
  254. },
  255. series: [
  256. {
  257. name: "",
  258. type: "bar",
  259. data: [1200, 680, 562, 268, 717, 843, 987, 126, 723, 569],
  260. showBackground: false,
  261. backgroundStyle: {
  262. color: "#18416F",
  263. },
  264. barWidth: "15%",
  265. itemStyle: {
  266. barBorderRadius: [10, 10, 0, 0],
  267. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  268. {
  269. offset: 0,
  270. color: "#132543",
  271. }, //柱图渐变色
  272. {
  273. offset: 1,
  274. color: "#00B3FE",
  275. },
  276. ]),
  277. },
  278. }
  279. ],
  280. legend: {
  281. data: [""],
  282. textStyle: {
  283. // 图列内容样式
  284. color: "#fff", // 字体颜色
  285. // fontSize: "10",
  286. },
  287. right: 30,
  288. icon: "roundRect",
  289. // 小图标的宽高
  290. itemHeight: 5,
  291. },
  292. };
  293. chart.setOption(option);
  294. tools.loopShowTooltip(chart, option, {
  295. interval: 2000,
  296. loopSeries: true,
  297. });
  298. },
  299. aiQualityECharts () {
  300. let chart = echarts.init(document.getElementById("aiQuality"));
  301. let option = {
  302. grid: {
  303. top: 35,
  304. right: 10,
  305. left: 50,
  306. bottom: 45,
  307. },
  308. tooltip: {
  309. show: true,
  310. trigger: "axis",
  311. axisPointer: {
  312. // 坐标轴指示器,坐标轴触发有效
  313. type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
  314. },
  315. },
  316. xAxis: {
  317. data: ["30及以下", "31-35岁", "36-40岁", "41-45岁", "46-50岁", "51-55岁", "56及以上"],
  318. axisTick: {
  319. show: false,
  320. },
  321. // x轴的字体颜色
  322. axisLabel: {
  323. rotate: 40,
  324. textStyle: {
  325. color: "white",
  326. },
  327. },
  328. //y轴线的颜色以及宽度
  329. axisLine: {
  330. show: true,
  331. lineStyle: {
  332. color: "#1E5389",
  333. width: 1,
  334. type: "solid",
  335. },
  336. },
  337. },
  338. yAxis: {
  339. name: '单位:人',
  340. nameTextStyle: {//y轴上方单位的颜色
  341. color: '#fff',
  342. },
  343. axisTick: {
  344. lineStyle: {
  345. color: "#18416F",
  346. },
  347. },
  348. // y轴的字体颜色
  349. axisLabel: {
  350. textStyle: {
  351. color: "white",
  352. },
  353. },
  354. splitLine: {
  355. show: false,
  356. lineStyle: {
  357. color: "#204561",
  358. width: 1,
  359. type: "dotted",
  360. },
  361. },
  362. //y轴线的颜色以及宽度
  363. axisLine: {
  364. show: true,
  365. lineStyle: {
  366. color: "#1E5389",
  367. width: 1,
  368. type: "solid",
  369. },
  370. },
  371. },
  372. series: [
  373. {
  374. name: "",
  375. type: "bar",
  376. data: [1200, 680, 562, 268, 717, 843, 987, 126, 723, 569],
  377. showBackground: false,
  378. backgroundStyle: {
  379. color: "#18416F",
  380. },
  381. barWidth: "15%",
  382. itemStyle: {
  383. barBorderRadius: [10, 10, 0, 0],
  384. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  385. {
  386. offset: 0,
  387. color: "#132543",
  388. }, //柱图渐变色
  389. {
  390. offset: 1,
  391. color: "#00B3FE",
  392. },
  393. ]),
  394. },
  395. }
  396. ],
  397. legend: {
  398. data: [""],
  399. textStyle: {
  400. // 图列内容样式
  401. color: "#fff", // 字体颜色
  402. // fontSize: "10",
  403. },
  404. right: 30,
  405. icon: "roundRect",
  406. // 小图标的宽高
  407. itemHeight: 5,
  408. },
  409. };
  410. chart.setOption(option);
  411. tools.loopShowTooltip(chart, option, {
  412. interval: 2000,
  413. loopSeries: true,
  414. });
  415. },
  416. initChartR1 () {
  417. let myChart = echarts.init(this.$refs['echartR1'])
  418. let option = {
  419. tooltip: {
  420. trigger: 'item',
  421. },
  422. legend: {
  423. top: 'center',
  424. orient: 'vertical',
  425. left: '80%',
  426. textStyle: {
  427. color: '#9DB9EB',
  428. },
  429. },
  430. graphic: {
  431. elements: [{
  432. type: 'image',//需要填充图片,配置image,如果不需要图片可以配置其他的, text, circle, sector, ring, polygon, polyline, rect, line, bezierCurve, arc, group,
  433. // style: {
  434. // image: './images/pie-back.png', //这里添加图片地址
  435. // width: 180,
  436. // height: 180
  437. // },
  438. left: 'center',//
  439. top: 'middle' //配置图片居中
  440. }]
  441. // type: "text",
  442. // left: "center",
  443. // top: "45%",
  444. // style: {
  445. // text: "总人数2530",
  446. // textAlign: "center",
  447. // fill: "#fff",
  448. // fontSize: 20,
  449. // fontWeight: 700
  450. // }
  451. },
  452. series: [
  453. {
  454. label: {
  455. normal: {
  456. position: 'inner'
  457. }
  458. },
  459. name: '',
  460. type: 'pie',
  461. radius: ['0%', '60%'],
  462. labelLine: {
  463. normal: {
  464. lineStyle: {
  465. width: 1,
  466. },
  467. },
  468. },
  469. data: [
  470. { value: 1048, name: '教授' },
  471. { value: 735, name: '副教授' },
  472. { value: 580, name: '助教' },
  473. { value: 484, name: '讲师' },
  474. ],
  475. itemStyle: {
  476. normal: {
  477. color: function (colors) {
  478. var colorList = [
  479. '#00DCFF',
  480. '#116CFD',
  481. '#8BA2FF',
  482. '#FFC200'
  483. ];
  484. return colorList[colors.dataIndex];
  485. }
  486. },
  487. }
  488. },
  489. ],
  490. }
  491. myChart.setOption(option)
  492. tools.loopShowTooltip(myChart, option, {
  493. nterval: 2000,
  494. loopSeries: true,
  495. });
  496. },
  497. initChinaChart () {
  498. var data = [
  499. { name: '吕梁市', value: 150 },
  500. { name: '大同市', value: 190 },
  501. { name: '忻州市', value: 140 },
  502. { name: '朔州市', value: 160 },
  503. { name: '晋中市', value: 100 },
  504. { name: '太原市', value: 300 },
  505. { name: '临汾市', value: 190 },
  506. { name: '长治市', value: 100 },
  507. { name: '晋城市', value: 280 },
  508. { name: '运城市', value: 180 },
  509. { name: '阳泉市', value: 110 },
  510. ]
  511. var moveLine = {
  512. normal: [
  513. {
  514. fromName: '太原市',
  515. toName: '吕梁市',
  516. coords: [
  517. [112.3352, 37.9413],
  518. [111.3574, 37.7325],
  519. ],
  520. },
  521. {
  522. fromName: '太原市',
  523. toName: '忻州市',
  524. coords: [
  525. [112.3352, 37.9413],
  526. [112.4561, 38.8971],
  527. ],
  528. },
  529. {
  530. fromName: '太原市',
  531. toName: '临汾市',
  532. coords: [
  533. [112.3352, 37.9413],
  534. [111.4783, 36.1615],
  535. ],
  536. },
  537. {
  538. fromName: '太原市',
  539. toName: '阳泉市',
  540. coords: [
  541. [112.3352, 37.9413],
  542. [113.4778, 38.0951],
  543. ],
  544. },
  545. {
  546. fromName: '太原市',
  547. toName: '晋中市',
  548. coords: [
  549. [112.3352, 37.9413],
  550. [112.7747, 37.37],
  551. ],
  552. },
  553. {
  554. fromName: '太原市',
  555. toName: '运城市',
  556. coords: [
  557. [112.3352, 37.9413],
  558. [111.1487, 35.2002],
  559. ],
  560. },
  561. {
  562. fromName: '太原市',
  563. toName: '大同市',
  564. coords: [
  565. [112.3352, 37.9413],
  566. [113.7854, 39.8035],
  567. ],
  568. },
  569. {
  570. fromName: '太原市',
  571. toName: '晋城市',
  572. coords: [
  573. [112.3352, 37.9413],
  574. [112.7856, 35.6342],
  575. ],
  576. },
  577. {
  578. fromName: '太原市',
  579. toName: '长治市',
  580. coords: [
  581. [112.3352, 37.9413],
  582. [112.8625, 36.4746],
  583. ],
  584. },
  585. {
  586. fromName: '太原市',
  587. toName: '朔州市',
  588. coords: [
  589. [112.3352, 37.9413],
  590. [113.0713, 39.6991],
  591. ],
  592. },
  593. ],
  594. }
  595. /*获取地图数据*/
  596. let myChart = echarts.init(this.$refs['echarts-map'])
  597. echarts.registerMap('shanxi', {
  598. type: 'FeatureCollection',
  599. features: [
  600. {
  601. type: 'Feature',
  602. id: '1409',
  603. properties: { name: '忻州市', cp: [112.4561, 38.8971], childNum: 14 },
  604. geometry: {
  605. type: 'Polygon',
  606. coordinates: [
  607. '@@Vx@lnbn¦WlnnUšmš°š²VšV‚VVVnUn„ºlz@l„„@Jƒ@kXWVXl@Lƒa@„ƒKUL„ŽlbnKlLnK‚LnKÆXn°šbVV@bUVl°Un@LnaVJUbW@UX²l‚@ČwlVVIšWnkÆa°„„anV‚Kn°™UW¯@™aVUVk@Un@„aV@ValwUanmWU„k@WVUUanaVwnLVl°@nk@mVU@UVK@w„LVKVU@ƒ„K@UUKVUV@@bnL„a‚V„aôšlIXmlKX_°KVV@bVV„@šzV`kblI„V„Ul‚šL@bnV@V„Ċll„„VlIXW@k„a‚U²blKšVnIlJ„albXXlWVn°JnšnL@l@XlJlaX@„X˜W²@l_VmnKšU„blU@mnkVK„¯@U@ƒma@kX¥VƒmakkƒLƒa@aƒ@WIUUVXWWnk@a°a@kkm@kUUmJm@WUUUIk`m@V—kaWWkX™KmƒXk¯ƒ@WKƒLkak@±bƒw@ƒaƒa@akaƒ@ma¯@ƒL—KÇÅkKWbkmġ™±ÅUƒLUK™VVkƒm¯LUVVbƒ„UwUW¯bm„ƒULƒxWJ—@ƒklmkUm@@KnwVkVK@akwƒ@@a¯bƒKkn›VUI™b¯mmbk@UbmKUL@xUUƒ@klmLUŽlVXI‚VVVUVUœU`mLXVWbXnW`Ų°xmŽxU@mĉƒƒwU@mbU@UƒmbkVW¦kJ™@ƒX@`¯Im@UlUVVnb@bWJXnmbƒJUU™UUaƒ@UamIkaƒxƒ@@x@b',
  608. ],
  609. encodeOffsets: [[113614, 39657]],
  610. },
  611. },
  612. {
  613. type: 'Feature',
  614. id: '1411',
  615. properties: { name: '吕梁市', cp: [111.3574, 37.7325], childNum: 13 },
  616. geometry: {
  617. type: 'Polygon',
  618. coordinates: [
  619. '@@@a@w„@„wlbnJVb„@VbšVVV„InaWmXI@a‚aUmVUVkn@°J@_„Wš@lIX¥lUnaV„V@naV@„xĊ„n‚V@‚wn¯wƱX_WmXaWUnKV_V›VUUUUWJkUVnKlk¯™@@kmKUaŁ±KkU@WmI@WUIlUUmVwXƒ‚w@ƒUlUVwœV‚@„Lnb‚W@anU@UšaVkô@l»n@na˜JnUÈLVaƃUUVm„VKVƒ²L@mU_lK@UVWkU‚a@a@U¯aUaƒÑóÑUb™„ƒKk@@aƒk¯mVaUwVƒÑkWUmK@UUKmXUWÝwUa™LUU@aWJUUU@Ua݄U@WL@VKVaVI@WnU@alIVKƒƒ@kIƒmIkJ@™m@ƒ™@@_™K@xƒ@kaW@U„@Vmn@ŽUK@mIƒJUXV¤XXWlkKƒkkK@XmJVakImJU@ó™¯LWKUV@nUVƒLkxmKkLma@kXKmmƒLƒab™LmK@V@mXVÆUxƒX@`nL„aV@@VmLUVnLlLš˜„b@„šŽ°²nx@b‚VUxlb@V¯bUV@zV‚XVĊXVx@lVn@VnnmŽUš@LlJXVƒz¯VWVXbšV@bmn™VUVk„Çþń@XVxmbUlV„Uln„W„@„Xl‚@VLXÒ@bÞJ°¦„L˜ò„@nU‚b@°„X@ŽXbmVU„V„nb@x‚x',
  620. ],
  621. encodeOffsets: [[113614, 39657]],
  622. },
  623. },
  624. {
  625. type: 'Feature',
  626. id: '1410',
  627. properties: { name: '临汾市', cp: [111.4783, 36.1615], childNum: 17 },
  628. geometry: {
  629. type: 'Polygon',
  630. coordinates: [
  631. '@@nW‚@@UnLšK‚a„b„KnnWL@lnblKnLlw„KVU@mVUXL°KôšV@nIlJUbnI@WlL„llLXkWWU£VW„InJ‚@VL@nm@UVƒX@lb„@@wšL@`‚@„šn@V@lw„@n„VmVX„WmwnUlƒœa@_lK„wVlUn°xVKVXXWlUšVVI@K@K„n°KœwlVlU@kna@V_„Wn‚m„UVm@kXml_@m„LlKXw°m@_ôJVUV@X™l@UaV@Va°I„lk»VwUkVmwUmmVn@V¯@KƒU—wmK@U¯wUVÝ@mJƒU—nWK™@@UnKVa„_lykUmKÛnm@™x@ƒUUlwVk™ƒXW@ƒa@Uƒ@@K@ƒkIV™nammVakUlƒ@wX@@kƒ™¯@ƒVVbml@„„°UbULmlVbnbÅK±VƒKVXUJWa@ULWaUU@@U@aWK@UkxUKƒLUUUJ±UkL@V±kk@kam@UV@l@LWl@n@VVUx„LlUUx@VUV™U@aƒIUl™L@°mLU‚ƒbkUUaWUUaUU@aWK—LWJ@bUL@VUVVbU@m@a@kmKmnĉlUK™XƒWUblb—xmIkƒƒU@xWb@lkšVx™LXŽmzVV@bklVVUzm˜@bk„@Vx@xlŽU„@lUbVnl@„Wxnl@n@ŽUbV„mL‚mƒb@`X@lUX@@xlnkLWaUJnnWV™Vn@l„@bULVV@l™V@XnJVX',
  632. ],
  633. encodeOffsets: [[113063, 37784]],
  634. },
  635. },
  636. {
  637. type: 'Feature',
  638. id: '1407',
  639. properties: { name: '晋中市', cp: [112.7747, 37.37], childNum: 11 },
  640. geometry: {
  641. type: 'Polygon',
  642. coordinates: [
  643. '@@@šlInJ„lJ„@‚„ULkJ@bmV@XUJUb‚L@UXKV@ރVbV@VVXI@bVVšKVbÞxVXnWVL@VnLV‚lX„ÒUŽVxUb°n„l@bl@„LšƒVaô҄ÒVb°b@VnLnnV@lmn@lb„U„V@„‚JœUVV‚Xkl@lUzmJ@xšXkl‚bUn„JVšUb„nU‚lb„V@nlLX@lakšV`Ub°š@XVJnU‚L²KlxnI@KV@lbUbVV„KnVl@„zlm@Uš@nŽšI@WUaVl@@mVU„@XkW@ƒnkVKVƒ„_Vw„y@knwVa‚@XalU„@šVnml@„X@V„L‚KVaÞbnnlJšI„mVKn„VVVInVlU„@„m@™mXK@UmyUI@mWUUakamw@wUwmLkakwVƒmK™w@wUam£y@am_ƒW@™UU@knmm„amU@WUa@knw@ƒUUUUV@nƒJm@mVUkKVUUUkKmwƒKULƒKUImV@lUn™nŽm@mbUK@°™bUnmbUmkkƒWUb@am@UXkK@a±@™V™@ĉř„V‚UXVxUVkLWl¯@@bULUlm@@nm`—XƒlWakIkm›VUbUL@Vm@kIƒ@@Kšm@—VaX‚I@W@aU@kUƒVU_™KƒbƒJkkǎ™b@nkKmL™wÅW@kVUUƒVU@WUIƒJmIXmma@_kyVaUUlkUm@ƒkU›x¯Lƒm@L@LUJ™UkVWXUWUL¯wVmUkƒxkL@`›bk„mVnxƒXUWUnmƒƒ@kxU@',
  644. ],
  645. encodeOffsets: [[114087, 37682]],
  646. },
  647. },
  648. {
  649. type: 'Feature',
  650. id: '1408',
  651. properties: { name: '运城市', cp: [111.1487, 35.2002], childNum: 13 },
  652. geometry: {
  653. type: 'Polygon',
  654. coordinates: [
  655. '@@„Vl„nJ˜wkaVa„XšWVLĊknmnL‚l@@bn‚V@UaVU@UVK@aXI˜KXL@bVVVbXVVblV„aVnK@¯šKVk„J@bšVVU@UVwkVƒKVwUUm@@Xk@K@kVUn@lbl@²l@UlK²VVIVV„KVLlw@VXL@b@VV@VŽXbVK‚@XbVIUW„L‚U²ÆLmaUankVKVaƒ¯@ƒnkUa„U°@„š‚n@@kWa„UVaXUW@IXKVw@U™ƒ„™WU@W@@UUƒU@mn@ƒ`m@UUULkUmJ™IUƒ@@UƒK@U@›anƒ™ak_@wmKUwmakV™kmK™V™k¯b™wƒ`kwUIÇx¯»ÇaŃmn@@™mƒmUkV@wkKW@kxmL™UkĉLÝk™xÝw¯lóVU„mV@ĀVVX¦W¤kz@`Vx°„²ĸ‚š@„Ul@x„êĸNJ°¤V„VlXLWnXxmV@nUl@„',
  656. ],
  657. encodeOffsets: [[113232, 36597]],
  658. },
  659. },
  660. {
  661. type: 'Feature',
  662. id: '1402',
  663. properties: { name: '大同市', cp: [113.7854, 39.8035], childNum: 8 },
  664. geometry: {
  665. type: 'Polygon',
  666. coordinates: [
  667. '@@²£šyl@Ȑ˜Ė@bĸŽĢbĸ„˜X„a‚KŤnn@ŎôllÈx„nVnÞDŽV@b‚nXllL°KšbVb@J@b—„‚„@ŽU„„xlKXLlKlXk„@Ulk„JlkUƒVKXUƒÇVIVm@_nǚLšašl‚w„VnU@UUwma@aƒaÝaLmUk@@Wƒ@U@@X™wVWÝUUUk@@VmLƒKV»nwUw™aUL@`mzƒJUIVƒUaUw™KUaVIlJôanÑlLVUn@ša„@VV„@@UUwVK°Vn_lJÆLœéW@UUUÅ@»lm@aÞIVwXW˜UUkkm@U@aƒU@mwU£VWU_kWmƒXwW_°yUkkK@UÇK@kkUVymóK—U@KWIƒbUak@mJ@bkbmLkŽ™UmƒkVU„W¦@lnb@„@Vƒ°ULml@nkVƒa™VmLUnk`±@—XƒWW@kbǦXŽ¯„WxI@xmbmxXlWV„„@bŎUz@J‚b@bÞb™ŽU@Wbk@ƒxk@WX¯VۙƒWÝbÝUkVUU@alI@a@akLWa™m@U¯UUmÇL@K@aU@¯VUkƒKmX@`@œkJ@nV‚Ub@lbVÆXVW„ULU`VbkLUV@XWl@bXJ˜@VbV@Vl',
  668. ],
  669. encodeOffsets: [[115335, 41209]],
  670. },
  671. },
  672. {
  673. type: 'Feature',
  674. id: '1404',
  675. properties: { name: '长治市', cp: [112.8625, 36.4746], childNum: 12 },
  676. geometry: {
  677. type: 'Polygon',
  678. coordinates: [
  679. '@@Uk™Lky@I‚JVa@mÞaWšy@_W@_WƒXVlUVwš@nw°K@m„UƒVaƒmVkU@mmmnLVUmKXa™U@IlKVUnK@UmWkX@WV_Vƒ@akU@a„KWIXyƒIUVmUn™Ua@WaXUVKVmkUWVkUƒLU@@VƒbƒKbƒIUmƒ@mbVL—x›WUUkn±V¯wƒbÅJUbmLkbmKÅKƒbVnUbƒV™KUb™KUbmLKmƒb™aƒKkUm@UŽnn‚VnxUVlUxl¼ƒk¯JUbU@Vbk@WšU@UVóI@`¯nWxkLƒK@nk`Wn@lUnƒVnm‚ƒXU`@mb@lkV@„VnklVVUblz@`nbWnnJ„IVJ@XUVV„UV@lÆXšxnKlL@mšaȍll„I„ašLV`„UlVV@@b@XJWUb@˜™n@L„@lJn@@UVKVaœUlnlJXb„k˜Wn_@mn@VkVK@a°@XklKVUUwVWUšƒĊƚ@šU²@@blLVWn@@bVa„XllVnnaVmša@¯VLnan@‚šmVm@knUVJ',
  680. ],
  681. encodeOffsets: [[116269, 37637]],
  682. },
  683. },
  684. {
  685. type: 'Feature',
  686. id: '1406',
  687. properties: { name: '朔州市', cp: [113.0713, 39.6991], childNum: 5 },
  688. geometry: {
  689. type: 'Polygon',
  690. coordinates: [
  691. '@@XXWVXVWnnlnn@èƼ@„„xlš„ŽV„nblšššVŽÈUVl‚š@„blnœL܃ĊmUkU@Ua‚—@WI@aXk@WVUlKUaV_VKXƒWUUÅka@VaU@mlI@›@_nW„LVl°UV@@b@LÈKVn°V@VšnXblK@b@bkJ@bVVlUÞVÞa„Xܚ°UXWl@„wl@XaV@šÝa@aa@IVyƍ@aƒƒXUWknwna@w‚JXw°ƒWÈ¥kI@W@kmKm™¯IUmkXWWkaƒbkImJ™UkL±aVƒb@lWXkJƒUkƒĉkƒ@UmU@a™KkƒVƒUkJlaU_™yƒ@UU@aUU¯LW`kLWnkJó™ƒbUƒbmK@aU@UVVL@VƒL@„UVULƒK@xUL@VUV@nml¯@UkmKUxmbVbUV@XƒlXVmnVbkxUbU@ƒbm@@VUlUVšb°@VX¯šm‚',
  692. ],
  693. encodeOffsets: [[114615, 40562]],
  694. },
  695. },
  696. {
  697. type: 'Feature',
  698. id: '1405',
  699. properties: { name: '晋城市', cp: [112.7856, 35.6342], childNum: 6 },
  700. geometry: {
  701. type: 'Polygon',
  702. coordinates: [
  703. '@@lV„Lšb„an‚LnKVašLVašL„UVaUm„aÆLnLlanKVaÆI„a°x²UlmVVœX˜wUKna„@Vn„J‚a„L„a@UV@@alUkKVKnkmmVwUk„w@ƒ™@kxWUXƒW@@mƒk@aUa@a¯aƒLkKmwkUm@kL@K@aWIXmƒVƒXƒWkUVakL@UVKƒw@aUK@UUKmLU@¯n™KUwVƒUIWJUWmka™@UXƒJƒk@UkmW@kLWKVƒx@bmI@VUaVU@a¯@UUmVKmX@±`kÝKVxUL±akL@V™bƒLkKmVƒ@XWVUbƒVXb@lm@@lW@@xk„lVUbnnmbUšlJ@„@L„@@V„b@‚WXš„UlkxVV@„šwn@ÜmnLlVkzƒ`UbmL@Vš@XL˜m„VnIÞ@VU°x@VnL˜x„V@LU°',
  704. ],
  705. encodeOffsets: [[115223, 36895]],
  706. },
  707. },
  708. {
  709. type: 'Feature',
  710. id: '1401',
  711. properties: { name: '太原市', cp: [112.3352, 37.9413], childNum: 5 },
  712. geometry: {
  713. type: 'Polygon',
  714. coordinates: [
  715. '@@„@VV@wVKnLVal@na°nšaVJœUlm„L°a@b„@lx@bULUlmx@Ln@lVkn„l˜@XI„w‚K„Vnƒ°aVXVx„ƒUaVU°K„nUlšUVL„KÆVš²Ģ‚lnXalLÈƘL„KUaVkUanmWU™a@WwkUWU¯y¯Ñ@anIl@@aVU„m„I„ymUƒLUUVakaU@@LmJkw±LKmVUI@W¯™VaU_l™kbW@kK@mƒUkaVƒmVaU™ƒIVmalk™W@wnIVy@klkWUU›VI@ƒƒUƒVkam@knU@mmmK@bblVUX@VkLV`@n±KU„ULƒ‚UnVVńUbÇKmV—Imbm@k¼ó@Ul™b@VmV@bXmaƒK@›UUxkV‚V@„xW„UxVnkVVJ@XnJ@XlV²LƂVbnL@lš@°',
  716. ],
  717. encodeOffsets: [[114503, 39134]],
  718. },
  719. },
  720. {
  721. type: 'Feature',
  722. id: '1403',
  723. properties: { name: '阳泉市', cp: [113.4778, 38.0951], childNum: 3 },
  724. geometry: {
  725. type: 'Polygon',
  726. coordinates: [
  727. '@@°@nb„@lb@b„b„b‚@„x²al@lb„KXU@m‚kUWkkmUUƒVwV@XUW@™naVklKXblKnL‚ƒnLVanImaXKlL„ašV@U@KUKW„alƒXK@£WKXUV@VU„ƒUUVW„_V™@W@@K„@šƒUƒƒIWmXUmƒULƒn™JkImmÝaUbLƒK@UƒWk@mn™Uƒ@kVWb@Ubmx@lƒzUxƒ`U„ULml@„XWlƒ@UV@nk@U‚Vb@X™Jm™@@Vknƒyk@ƒzƒJƒnUV@bk@mJ@b°Ò°zXVlVXx‚@šbXVmnVbUlVb',
  728. ],
  729. encodeOffsets: [[115864, 39336]],
  730. },
  731. },
  732. ],
  733. UTF8Encoding: true,
  734. })
  735. var mapFeatures = echarts.getMap(this.mapName).geoJson.features
  736. mapFeatures.forEach(v => {
  737. // 地区名称
  738. var name = v.properties.name
  739. // 地区经纬度
  740. this.geoCoordMap[name] = v.properties.cp
  741. })
  742. // <p>当前阶段:<span>可论证阶段</span></p>
  743. // <p>时间节点:<span>2021.10-2022.10</span></p>
  744. let option = {
  745. tooltip: {
  746. padding: 15,
  747. enterable: true,
  748. transitionDuration: 1,
  749. formatter: (params, ticket, callback) => {
  750. let tipHtml = `
  751. <div class="tooltip-cont">
  752. <p>新开工:<span>工程建设项目</span></p>
  753. <p>总投资额:<span>${params.data.value}亿</span></p>
  754. </div>`
  755. callback(ticket, tipHtml)
  756. return tipHtml
  757. },
  758. },
  759. visualMap: {
  760. show: false,
  761. min: 0,
  762. max: 300,
  763. right: 0,
  764. bottom: 0,
  765. text: ['高', '低'],
  766. textStyle: {
  767. color: '#f1f1f1'
  768. },
  769. realtime: false,
  770. calculable: false,
  771. inRange: {
  772. color: ['lightskyblue', '#2754b7']
  773. }
  774. },
  775. geo: {
  776. show: true,
  777. map: 'shanxi',
  778. layoutCenter: ['50%', '50%'], //地图位置
  779. layoutSize: '100%',
  780. label: {
  781. normal: {
  782. show: false,
  783. },
  784. emphasis: {
  785. show: false,
  786. },
  787. },
  788. roam: false,
  789. itemStyle: {
  790. normal: {
  791. areaColor: '#1946a8',
  792. shadowColor: '#1946a8',
  793. borderWidth: 1, //设置外层边框
  794. borderColor: '#1946a8',
  795. shadowOffsetX: 10,
  796. shadowOffsetY: 5,
  797. shadowBlur: 2,
  798. },
  799. emphasis: {
  800. areaColor: '#1946a8',
  801. borderColor: '#d4bc1d',
  802. borderWidth: 2, //设置外层边框
  803. },
  804. },
  805. },
  806. series: [
  807. {
  808. name: '散点',
  809. type: 'scatter',
  810. coordinateSystem: 'geo',
  811. data: this.convertData(data),
  812. symbolSize: function (val) {
  813. return 10
  814. },
  815. label: {
  816. normal: {
  817. formatter: '{b}',
  818. position: [10, 10],
  819. fontSize: 15,
  820. fontWeight: 600,
  821. fontStyle: 'italic',
  822. color: '#fff',
  823. show: true,
  824. },
  825. emphasis: {
  826. show: true,
  827. },
  828. },
  829. itemStyle: {
  830. normal: {
  831. color: '#000',
  832. borderWidth: 2,
  833. borderColor: '#fff',
  834. },
  835. },
  836. },
  837. {
  838. type: 'map',
  839. map: this.mapName,
  840. geoIndex: 0,
  841. aspectScale: 1.5, //长宽比
  842. showLegendSymbol: true, // 存在legend时显示
  843. label: {
  844. normal: {
  845. show: true,
  846. },
  847. emphasis: {
  848. show: false,
  849. textStyle: {
  850. color: '#fff',
  851. },
  852. },
  853. },
  854. roam: true,
  855. itemStyle: {
  856. normal: {
  857. areaColor: '#031525',
  858. borderColor: '#3B5077',
  859. },
  860. emphasis: {
  861. areaColor: '#2B91B7',
  862. },
  863. },
  864. animation: false,
  865. data: data,
  866. },
  867. {
  868. name: '点',
  869. type: 'scatter',
  870. coordinateSystem: 'geo',
  871. zlevel: 6,
  872. },
  873. {
  874. name: 'Top 5',
  875. type: 'effectScatter',
  876. coordinateSystem: 'geo',
  877. data: this.convertData(
  878. data
  879. .sort(function (a, b) {
  880. return b.value - a.value
  881. })
  882. .slice(0, 5)
  883. ),
  884. symbolSize: function (val) {
  885. return 15
  886. },
  887. showEffectOn: 'render',
  888. rippleEffect: {
  889. brushType: 'stroke',
  890. },
  891. hoverAnimation: true,
  892. label: {
  893. normal: {
  894. formatter: '{b}',
  895. position: 'left',
  896. show: false,
  897. },
  898. },
  899. itemStyle: {
  900. normal: {
  901. color: 'yellow',
  902. shadowBlur: 10,
  903. shadowColor: 'yellow',
  904. },
  905. },
  906. zlevel: 1000,
  907. },
  908. {
  909. name: '线路',
  910. type: 'lines',
  911. zlevel: 2,
  912. effect: {
  913. show: true,
  914. period: 4, //箭头指向速度,值越小速度越快
  915. trailLength: 0.02, //特效尾迹长度[0,1]值越大,尾迹越长重
  916. symbol: 'arrow', //箭头图标
  917. symbolSize: 5, //图标大小
  918. },
  919. lineStyle: {
  920. normal: {
  921. color: '#00FFFF',
  922. width: 1,
  923. type: 'dashed',
  924. opacity: 0.5, //尾迹线条透明度
  925. curveness: -0.3, //尾迹线条曲直度
  926. },
  927. },
  928. data: moveLine.normal,
  929. },
  930. ],
  931. }
  932. myChart.setOption(option)
  933. },
  934. },
  935. })