cokingCoalA.js 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935
  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: 35,
  57. right: 20,
  58. left: 40,
  59. bottom: 50,
  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: ["首席技师", "特级技师", "高级技师", "技师", '高级工', '中级工', '初级工', '学徒工'],
  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: 55,
  187. right: 0,
  188. left: 40,
  189. bottom: 40,
  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: 25,
  307. },
  308. tooltip: {
  309. show: true,
  310. trigger: "axis",
  311. axisPointer: {
  312. // 坐标轴指示器,坐标轴触发有效
  313. type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
  314. },
  315. },
  316. xAxis: {
  317. data: ["管理序列", "技术序列", "操作序列"],
  318. axisTick: {
  319. show: false,
  320. },
  321. // x轴的字体颜色
  322. axisLabel: {
  323. textStyle: {
  324. color: "white",
  325. },
  326. },
  327. //y轴线的颜色以及宽度
  328. axisLine: {
  329. show: true,
  330. lineStyle: {
  331. color: "#1E5389",
  332. width: 1,
  333. type: "solid",
  334. },
  335. },
  336. },
  337. yAxis: {
  338. name: '单位:人数',
  339. nameTextStyle: {//y轴上方单位的颜色
  340. color: '#fff',
  341. },
  342. axisTick: {
  343. lineStyle: {
  344. color: "#18416F",
  345. },
  346. },
  347. // y轴的字体颜色
  348. axisLabel: {
  349. textStyle: {
  350. color: "white",
  351. },
  352. },
  353. splitLine: {
  354. show: false,
  355. lineStyle: {
  356. color: "#204561",
  357. width: 1,
  358. type: "dotted",
  359. },
  360. },
  361. //y轴线的颜色以及宽度
  362. axisLine: {
  363. show: true,
  364. lineStyle: {
  365. color: "#1E5389",
  366. width: 1,
  367. type: "solid",
  368. },
  369. },
  370. },
  371. series: [
  372. {
  373. name: "",
  374. type: "bar",
  375. data: [1200, 680, 562, 268, 717, 843, 987, 126, 723, 569],
  376. showBackground: false,
  377. backgroundStyle: {
  378. color: "#18416F",
  379. },
  380. barWidth: "15%",
  381. itemStyle: {
  382. barBorderRadius: [10, 10, 0, 0],
  383. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  384. {
  385. offset: 0,
  386. color: "#132543",
  387. }, //柱图渐变色
  388. {
  389. offset: 1,
  390. color: "#00B3FE",
  391. },
  392. ]),
  393. },
  394. }
  395. ],
  396. legend: {
  397. data: [""],
  398. textStyle: {
  399. // 图列内容样式
  400. color: "#fff", // 字体颜色
  401. // fontSize: "10",
  402. },
  403. right: 30,
  404. icon: "roundRect",
  405. // 小图标的宽高
  406. itemHeight: 5,
  407. },
  408. };
  409. chart.setOption(option);
  410. tools.loopShowTooltip(chart, option, {
  411. interval: 2000,
  412. loopSeries: true,
  413. });
  414. },
  415. initChartR1 () {
  416. let myChart = echarts.init(this.$refs['echartR1'])
  417. let option = {
  418. tooltip: {
  419. trigger: 'item',
  420. },
  421. legend: {
  422. top: 'center',
  423. orient: 'vertical',
  424. left: '80%',
  425. textStyle: {
  426. color: '#9DB9EB',
  427. },
  428. },
  429. graphic: {
  430. elements: [{
  431. type: 'image',//需要填充图片,配置image,如果不需要图片可以配置其他的, text, circle, sector, ring, polygon, polyline, rect, line, bezierCurve, arc, group,
  432. // style: {
  433. // image: './images/pie-back.png', //这里添加图片地址
  434. // width: 180,
  435. // height: 180
  436. // },
  437. left: 'center',//
  438. top: 'middle' //配置图片居中
  439. }]
  440. // type: "text",
  441. // left: "center",
  442. // top: "45%",
  443. // style: {
  444. // text: "总人数2530",
  445. // textAlign: "center",
  446. // fill: "#fff",
  447. // fontSize: 20,
  448. // fontWeight: 700
  449. // }
  450. },
  451. series: [
  452. {
  453. label: {
  454. normal: {
  455. position: 'inner'
  456. }
  457. },
  458. name: '',
  459. type: 'pie',
  460. radius: ['0%', '60%'],
  461. labelLine: {
  462. normal: {
  463. lineStyle: {
  464. width: 1,
  465. },
  466. },
  467. },
  468. data: [
  469. { value: 1048, name: '教授' },
  470. { value: 735, name: '副教授' },
  471. { value: 580, name: '助教' },
  472. { value: 484, name: '讲师' },
  473. ],
  474. itemStyle: {
  475. normal: {
  476. color: function (colors) {
  477. var colorList = [
  478. '#00DCFF',
  479. '#116CFD',
  480. '#8BA2FF',
  481. '#FFC200'
  482. ];
  483. return colorList[colors.dataIndex];
  484. }
  485. },
  486. }
  487. },
  488. ],
  489. }
  490. myChart.setOption(option)
  491. tools.loopShowTooltip(myChart, option, {
  492. nterval: 2000,
  493. loopSeries: true,
  494. });
  495. },
  496. initChinaChart () {
  497. var data = [
  498. { name: '吕梁市', value: 150 },
  499. { name: '大同市', value: 190 },
  500. { name: '忻州市', value: 140 },
  501. { name: '朔州市', value: 160 },
  502. { name: '晋中市', value: 100 },
  503. { name: '太原市', value: 300 },
  504. { name: '临汾市', value: 190 },
  505. { name: '长治市', value: 100 },
  506. { name: '晋城市', value: 280 },
  507. { name: '运城市', value: 180 },
  508. { name: '阳泉市', value: 110 },
  509. ]
  510. var moveLine = {
  511. normal: [
  512. {
  513. fromName: '太原市',
  514. toName: '吕梁市',
  515. coords: [
  516. [112.3352, 37.9413],
  517. [111.3574, 37.7325],
  518. ],
  519. },
  520. {
  521. fromName: '太原市',
  522. toName: '忻州市',
  523. coords: [
  524. [112.3352, 37.9413],
  525. [112.4561, 38.8971],
  526. ],
  527. },
  528. {
  529. fromName: '太原市',
  530. toName: '临汾市',
  531. coords: [
  532. [112.3352, 37.9413],
  533. [111.4783, 36.1615],
  534. ],
  535. },
  536. {
  537. fromName: '太原市',
  538. toName: '阳泉市',
  539. coords: [
  540. [112.3352, 37.9413],
  541. [113.4778, 38.0951],
  542. ],
  543. },
  544. {
  545. fromName: '太原市',
  546. toName: '晋中市',
  547. coords: [
  548. [112.3352, 37.9413],
  549. [112.7747, 37.37],
  550. ],
  551. },
  552. {
  553. fromName: '太原市',
  554. toName: '运城市',
  555. coords: [
  556. [112.3352, 37.9413],
  557. [111.1487, 35.2002],
  558. ],
  559. },
  560. {
  561. fromName: '太原市',
  562. toName: '大同市',
  563. coords: [
  564. [112.3352, 37.9413],
  565. [113.7854, 39.8035],
  566. ],
  567. },
  568. {
  569. fromName: '太原市',
  570. toName: '晋城市',
  571. coords: [
  572. [112.3352, 37.9413],
  573. [112.7856, 35.6342],
  574. ],
  575. },
  576. {
  577. fromName: '太原市',
  578. toName: '长治市',
  579. coords: [
  580. [112.3352, 37.9413],
  581. [112.8625, 36.4746],
  582. ],
  583. },
  584. {
  585. fromName: '太原市',
  586. toName: '朔州市',
  587. coords: [
  588. [112.3352, 37.9413],
  589. [113.0713, 39.6991],
  590. ],
  591. },
  592. ],
  593. }
  594. /*获取地图数据*/
  595. let myChart = echarts.init(this.$refs['echarts-map'])
  596. echarts.registerMap('shanxi', {
  597. type: 'FeatureCollection',
  598. features: [
  599. {
  600. type: 'Feature',
  601. id: '1409',
  602. properties: { name: '忻州市', cp: [112.4561, 38.8971], childNum: 14 },
  603. geometry: {
  604. type: 'Polygon',
  605. coordinates: [
  606. '@@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',
  607. ],
  608. encodeOffsets: [[113614, 39657]],
  609. },
  610. },
  611. {
  612. type: 'Feature',
  613. id: '1411',
  614. properties: { name: '吕梁市', cp: [111.3574, 37.7325], childNum: 13 },
  615. geometry: {
  616. type: 'Polygon',
  617. coordinates: [
  618. '@@@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',
  619. ],
  620. encodeOffsets: [[113614, 39657]],
  621. },
  622. },
  623. {
  624. type: 'Feature',
  625. id: '1410',
  626. properties: { name: '临汾市', cp: [111.4783, 36.1615], childNum: 17 },
  627. geometry: {
  628. type: 'Polygon',
  629. coordinates: [
  630. '@@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',
  631. ],
  632. encodeOffsets: [[113063, 37784]],
  633. },
  634. },
  635. {
  636. type: 'Feature',
  637. id: '1407',
  638. properties: { name: '晋中市', cp: [112.7747, 37.37], childNum: 11 },
  639. geometry: {
  640. type: 'Polygon',
  641. coordinates: [
  642. '@@@š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@',
  643. ],
  644. encodeOffsets: [[114087, 37682]],
  645. },
  646. },
  647. {
  648. type: 'Feature',
  649. id: '1408',
  650. properties: { name: '运城市', cp: [111.1487, 35.2002], childNum: 13 },
  651. geometry: {
  652. type: 'Polygon',
  653. coordinates: [
  654. '@@„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@„',
  655. ],
  656. encodeOffsets: [[113232, 36597]],
  657. },
  658. },
  659. {
  660. type: 'Feature',
  661. id: '1402',
  662. properties: { name: '大同市', cp: [113.7854, 39.8035], childNum: 8 },
  663. geometry: {
  664. type: 'Polygon',
  665. coordinates: [
  666. '@@²£š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',
  667. ],
  668. encodeOffsets: [[115335, 41209]],
  669. },
  670. },
  671. {
  672. type: 'Feature',
  673. id: '1404',
  674. properties: { name: '长治市', cp: [112.8625, 36.4746], childNum: 12 },
  675. geometry: {
  676. type: 'Polygon',
  677. coordinates: [
  678. '@@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',
  679. ],
  680. encodeOffsets: [[116269, 37637]],
  681. },
  682. },
  683. {
  684. type: 'Feature',
  685. id: '1406',
  686. properties: { name: '朔州市', cp: [113.0713, 39.6991], childNum: 5 },
  687. geometry: {
  688. type: 'Polygon',
  689. coordinates: [
  690. '@@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‚',
  691. ],
  692. encodeOffsets: [[114615, 40562]],
  693. },
  694. },
  695. {
  696. type: 'Feature',
  697. id: '1405',
  698. properties: { name: '晋城市', cp: [112.7856, 35.6342], childNum: 6 },
  699. geometry: {
  700. type: 'Polygon',
  701. coordinates: [
  702. '@@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°',
  703. ],
  704. encodeOffsets: [[115223, 36895]],
  705. },
  706. },
  707. {
  708. type: 'Feature',
  709. id: '1401',
  710. properties: { name: '太原市', cp: [112.3352, 37.9413], childNum: 5 },
  711. geometry: {
  712. type: 'Polygon',
  713. coordinates: [
  714. '@@„@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š@°',
  715. ],
  716. encodeOffsets: [[114503, 39134]],
  717. },
  718. },
  719. {
  720. type: 'Feature',
  721. id: '1403',
  722. properties: { name: '阳泉市', cp: [113.4778, 38.0951], childNum: 3 },
  723. geometry: {
  724. type: 'Polygon',
  725. coordinates: [
  726. '@@°@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',
  727. ],
  728. encodeOffsets: [[115864, 39336]],
  729. },
  730. },
  731. ],
  732. UTF8Encoding: true,
  733. })
  734. var mapFeatures = echarts.getMap(this.mapName).geoJson.features
  735. mapFeatures.forEach(v => {
  736. // 地区名称
  737. var name = v.properties.name
  738. // 地区经纬度
  739. this.geoCoordMap[name] = v.properties.cp
  740. })
  741. // <p>当前阶段:<span>可论证阶段</span></p>
  742. // <p>时间节点:<span>2021.10-2022.10</span></p>
  743. let option = {
  744. tooltip: {
  745. padding: 15,
  746. enterable: true,
  747. transitionDuration: 1,
  748. formatter: (params, ticket, callback) => {
  749. let tipHtml = `
  750. <div class="tooltip-cont">
  751. <p>新开工:<span>工程建设项目</span></p>
  752. <p>总投资额:<span>${params.data.value}亿</span></p>
  753. </div>`
  754. callback(ticket, tipHtml)
  755. return tipHtml
  756. },
  757. },
  758. visualMap: {
  759. show: false,
  760. min: 0,
  761. max: 300,
  762. right: 0,
  763. bottom: 0,
  764. text: ['高', '低'],
  765. textStyle: {
  766. color: '#f1f1f1'
  767. },
  768. realtime: false,
  769. calculable: false,
  770. inRange: {
  771. color: ['lightskyblue', '#2754b7']
  772. }
  773. },
  774. geo: {
  775. show: true,
  776. map: 'shanxi',
  777. layoutCenter: ['50%', '50%'], //地图位置
  778. layoutSize: '100%',
  779. label: {
  780. normal: {
  781. show: false,
  782. },
  783. emphasis: {
  784. show: false,
  785. },
  786. },
  787. roam: false,
  788. itemStyle: {
  789. normal: {
  790. areaColor: '#1946a8',
  791. shadowColor: '#1946a8',
  792. borderWidth: 1, //设置外层边框
  793. borderColor: '#1946a8',
  794. shadowOffsetX: 10,
  795. shadowOffsetY: 5,
  796. shadowBlur: 2,
  797. },
  798. emphasis: {
  799. areaColor: '#1946a8',
  800. borderColor: '#d4bc1d',
  801. borderWidth: 2, //设置外层边框
  802. },
  803. },
  804. },
  805. series: [
  806. {
  807. name: '散点',
  808. type: 'scatter',
  809. coordinateSystem: 'geo',
  810. data: this.convertData(data),
  811. symbolSize: function (val) {
  812. return 10
  813. },
  814. label: {
  815. normal: {
  816. formatter: '{b}',
  817. position: [10, 10],
  818. fontSize: 15,
  819. fontWeight: 600,
  820. fontStyle: 'italic',
  821. color: '#fff',
  822. show: true,
  823. },
  824. emphasis: {
  825. show: true,
  826. },
  827. },
  828. itemStyle: {
  829. normal: {
  830. color: '#000',
  831. borderWidth: 2,
  832. borderColor: '#fff',
  833. },
  834. },
  835. },
  836. {
  837. type: 'map',
  838. map: this.mapName,
  839. geoIndex: 0,
  840. aspectScale: 1.5, //长宽比
  841. showLegendSymbol: true, // 存在legend时显示
  842. label: {
  843. normal: {
  844. show: true,
  845. },
  846. emphasis: {
  847. show: false,
  848. textStyle: {
  849. color: '#fff',
  850. },
  851. },
  852. },
  853. roam: true,
  854. itemStyle: {
  855. normal: {
  856. areaColor: '#031525',
  857. borderColor: '#3B5077',
  858. },
  859. emphasis: {
  860. areaColor: '#2B91B7',
  861. },
  862. },
  863. animation: false,
  864. data: data,
  865. },
  866. {
  867. name: '点',
  868. type: 'scatter',
  869. coordinateSystem: 'geo',
  870. zlevel: 6,
  871. },
  872. {
  873. name: 'Top 5',
  874. type: 'effectScatter',
  875. coordinateSystem: 'geo',
  876. data: this.convertData(
  877. data
  878. .sort(function (a, b) {
  879. return b.value - a.value
  880. })
  881. .slice(0, 5)
  882. ),
  883. symbolSize: function (val) {
  884. return 15
  885. },
  886. showEffectOn: 'render',
  887. rippleEffect: {
  888. brushType: 'stroke',
  889. },
  890. hoverAnimation: true,
  891. label: {
  892. normal: {
  893. formatter: '{b}',
  894. position: 'left',
  895. show: false,
  896. },
  897. },
  898. itemStyle: {
  899. normal: {
  900. color: 'yellow',
  901. shadowBlur: 10,
  902. shadowColor: 'yellow',
  903. },
  904. },
  905. zlevel: 1000,
  906. },
  907. {
  908. name: '线路',
  909. type: 'lines',
  910. zlevel: 2,
  911. effect: {
  912. show: true,
  913. period: 4, //箭头指向速度,值越小速度越快
  914. trailLength: 0.02, //特效尾迹长度[0,1]值越大,尾迹越长重
  915. symbol: 'arrow', //箭头图标
  916. symbolSize: 5, //图标大小
  917. },
  918. lineStyle: {
  919. normal: {
  920. color: '#00FFFF',
  921. width: 1,
  922. type: 'dashed',
  923. opacity: 0.5, //尾迹线条透明度
  924. curveness: -0.3, //尾迹线条曲直度
  925. },
  926. },
  927. data: moveLine.normal,
  928. },
  929. ],
  930. }
  931. myChart.setOption(option)
  932. },
  933. },
  934. })