cokingCoalA.js 39 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094
  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,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',
  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: echarts1[0],
  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: echarts1[1],
  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. data = echarts2;
  418. arrName = getArrayValue(data, "name");
  419. arrValue = getArrayValue(data, "value");
  420. sumValue = eval(arrValue.join("+"));
  421. objData = array2obj(data, "name");
  422. optionData = getData(data);
  423. function getArrayValue (array, key) {
  424. var key = key || "value";
  425. var res = [];
  426. if (array) {
  427. array.forEach(function (t) {
  428. res.push(t[key]);
  429. });
  430. }
  431. return res;
  432. }
  433. function array2obj (array, key) {
  434. var resObj = {};
  435. for (var i = 0; i < array.length; i++) {
  436. resObj[array[i][key]] = array[i];
  437. }
  438. return resObj;
  439. }
  440. function getData (data) {
  441. var res = {
  442. series: [],
  443. yAxis: [],
  444. };
  445. for (let i = 0; i < data.length; i++) {
  446. // console.log([70 - i * 15 + '%', 67 - i * 15 + '%']);
  447. res.series.push({
  448. name: "",
  449. type: "pie",
  450. clockWise: false, //顺时加载
  451. hoverAnimation: false, //鼠标移入变大
  452. radius: [53 - i * 15 + "%", 48 - i * 15 + "%"],
  453. center: ["35%", "50%"],
  454. label: {
  455. show: false,
  456. },
  457. itemStyle: {
  458. label: {
  459. show: false,
  460. },
  461. labelLine: {
  462. show: false,
  463. },
  464. borderWidth: 5,
  465. },
  466. data: [
  467. {
  468. value: data[i].value,
  469. name: data[i].name,
  470. },
  471. {
  472. value: sumValue - data[i].value,
  473. name: "",
  474. itemStyle: {
  475. color: "rgba(0,0,0,0)",
  476. borderWidth: 0,
  477. },
  478. tooltip: {
  479. show: false,
  480. },
  481. hoverAnimation: false,
  482. },
  483. ],
  484. });
  485. res.series.push({
  486. name: "",
  487. type: "pie",
  488. silent: true,
  489. z: 1,
  490. clockWise: false, //顺时加载
  491. hoverAnimation: false, //鼠标移入变大
  492. radius: [53 - i * 15 + "%", 48 - i * 15 + "%"],
  493. center: ["35%", "50%"],
  494. label: {
  495. show: false,
  496. },
  497. itemStyle: {
  498. label: {
  499. show: false,
  500. },
  501. labelLine: {
  502. show: false,
  503. },
  504. borderWidth: 5,
  505. },
  506. data: [
  507. {
  508. value: 7.5,
  509. itemStyle: {
  510. color: "rgb(3, 31, 62)",
  511. borderWidth: 0,
  512. },
  513. tooltip: {
  514. show: false,
  515. },
  516. hoverAnimation: false,
  517. },
  518. {
  519. value: 2.5,
  520. name: "",
  521. itemStyle: {
  522. color: "rgba(0,0,0,0)",
  523. borderWidth: 0,
  524. },
  525. tooltip: {
  526. show: false,
  527. },
  528. hoverAnimation: false,
  529. },
  530. ],
  531. });
  532. res.yAxis.push(((data[i].value / sumValue) * 100).toFixed(2) + "%");
  533. }
  534. return res;
  535. }
  536. let option = {
  537. graphic: {
  538. elements: [{
  539. type: 'image',//需要填充图片,配置image,如果不需要图片可以配置其他的, text, circle, sector, ring, polygon, polyline, rect, line, bezierCurve, arc, group,
  540. style: {
  541. image: './images/loop.png', //这里添加图片地址
  542. width: 320,
  543. height: 320
  544. },
  545. left: '30',//
  546. top: 'middle' //配置图片居中
  547. }]
  548. },
  549. legend: {
  550. show: true,
  551. icon: "circle",
  552. top: "center",
  553. left: "70%",
  554. data: arrName,
  555. width: 50,
  556. padding: [0, 5],
  557. itemGap: 25,
  558. formatter: function (name) {
  559. return (
  560. "{title|" + name + "}\n{value|" + objData[name].value + "} {title|项}"
  561. );
  562. },
  563. textStyle: {
  564. rich: {
  565. title: {
  566. fontSize: 14,
  567. lineHeight: 15,
  568. color: "rgb(0, 178, 246)",
  569. },
  570. value: {
  571. fontSize: 18,
  572. lineHeight: 20,
  573. color: "#fff",
  574. },
  575. },
  576. },
  577. },
  578. tooltip: {
  579. show: false,
  580. normal: {
  581. show: false,
  582. trigger: "item",
  583. label: {
  584. margin: 10, // label 距离轴的距离
  585. color: '#FFF', // 文字的颜色
  586. fontStyle: 'normal', // 文字字体的风格('normal',无样式;'italic',斜体;'oblique',倾斜字体)
  587. fontWeight: 'normal', // 文字字体的粗细('normal',无样式;'bold',加粗;'bolder',加粗的基础上再加粗;'lighter',变细;数字定义粗细也可以,取值范围100至700)
  588. fontSize: '20', // 文字字体大小
  589. lineHeight: '50', // 行高
  590. },
  591. },
  592. // formatter: "{a}<br>{b}:{c}({d}%)666",
  593. textStyle: {
  594. color: '#FFF', // 文字的颜色
  595. fontStyle: 'normal', // 文字字体的风格('normal',无样式;'italic',斜体;'oblique',倾斜字体)
  596. fontWeight: 'normal', // 文字字体的粗细('normal',无样式;'bold',加粗;'bolder',加粗的基础上再加粗;'lighter',变细;数字定义粗细也可以,取值范围100至700)
  597. },
  598. formatter: data => {
  599. console.log(data)
  600. // 小圆点
  601. return `<br /><span style="display:inline-block;border-radius:50%;margin-right:10px; width:7px;height:7px;background-color:blue"></span>${data.name}:${data.percent}`
  602. },
  603. },
  604. color: [
  605. "rgb(24, 183, 142)",
  606. "rgb(1, 179, 238)",
  607. "rgb(22, 75, 205)",
  608. "rgb(52, 52, 176)",
  609. ],
  610. grid: {
  611. top: "21%",
  612. bottom: "48%",
  613. left: "36%",
  614. containLabel: false,
  615. },
  616. yAxis: [
  617. {
  618. type: "category",
  619. inverse: true,
  620. axisLine: {
  621. show: false,
  622. },
  623. axisTick: {
  624. show: false,
  625. },
  626. axisLabel: {
  627. interval: 0,
  628. inside: true,
  629. textStyle: {
  630. color: "#fff",
  631. fontSize: 14,
  632. },
  633. show: true,
  634. },
  635. data: optionData.yAxis,
  636. },
  637. ],
  638. xAxis: [
  639. {
  640. show: false,
  641. },
  642. ],
  643. series: optionData.series,
  644. }
  645. myChart.setOption(option)
  646. tools.loopShowTooltip(myChart, option, {
  647. nterval: 2000,
  648. loopSeries: true,
  649. });
  650. },
  651. initChinaChart () {
  652. var data = [
  653. { name: '吕梁市', value: 150 },
  654. { name: '大同市', value: 190 },
  655. { name: '忻州市', value: 140 },
  656. { name: '朔州市', value: 160 },
  657. { name: '晋中市', value: 100 },
  658. { name: '太原市', value: 300 },
  659. { name: '临汾市', value: 190 },
  660. { name: '长治市', value: 100 },
  661. { name: '晋城市', value: 280 },
  662. { name: '运城市', value: 180 },
  663. { name: '阳泉市', value: 110 },
  664. ]
  665. var moveLine = {
  666. normal: [
  667. {
  668. fromName: '太原市',
  669. toName: '吕梁市',
  670. coords: [
  671. [112.3352, 37.9413],
  672. [111.3574, 37.7325],
  673. ],
  674. },
  675. {
  676. fromName: '太原市',
  677. toName: '忻州市',
  678. coords: [
  679. [112.3352, 37.9413],
  680. [112.4561, 38.8971],
  681. ],
  682. },
  683. {
  684. fromName: '太原市',
  685. toName: '临汾市',
  686. coords: [
  687. [112.3352, 37.9413],
  688. [111.4783, 36.1615],
  689. ],
  690. },
  691. {
  692. fromName: '太原市',
  693. toName: '阳泉市',
  694. coords: [
  695. [112.3352, 37.9413],
  696. [113.4778, 38.0951],
  697. ],
  698. },
  699. {
  700. fromName: '太原市',
  701. toName: '晋中市',
  702. coords: [
  703. [112.3352, 37.9413],
  704. [112.7747, 37.37],
  705. ],
  706. },
  707. {
  708. fromName: '太原市',
  709. toName: '运城市',
  710. coords: [
  711. [112.3352, 37.9413],
  712. [111.1487, 35.2002],
  713. ],
  714. },
  715. {
  716. fromName: '太原市',
  717. toName: '大同市',
  718. coords: [
  719. [112.3352, 37.9413],
  720. [113.7854, 39.8035],
  721. ],
  722. },
  723. {
  724. fromName: '太原市',
  725. toName: '晋城市',
  726. coords: [
  727. [112.3352, 37.9413],
  728. [112.7856, 35.6342],
  729. ],
  730. },
  731. {
  732. fromName: '太原市',
  733. toName: '长治市',
  734. coords: [
  735. [112.3352, 37.9413],
  736. [112.8625, 36.4746],
  737. ],
  738. },
  739. {
  740. fromName: '太原市',
  741. toName: '朔州市',
  742. coords: [
  743. [112.3352, 37.9413],
  744. [113.0713, 39.6991],
  745. ],
  746. },
  747. ],
  748. }
  749. /*获取地图数据*/
  750. let myChart = echarts.init(this.$refs['echarts-map'])
  751. echarts.registerMap('shanxi', {
  752. type: 'FeatureCollection',
  753. features: [
  754. {
  755. type: 'Feature',
  756. id: '1409',
  757. properties: { name: '忻州市', cp: [112.4561, 38.8971], childNum: 14 },
  758. geometry: {
  759. type: 'Polygon',
  760. coordinates: [
  761. '@@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ƒ@WIUUVXWWnk@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„ƒULƒ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@UlUVVnb@bWJXnmbƒJUU™UUaƒ@UamIkaƒxƒ@@x@b',
  762. ],
  763. encodeOffsets: [[113614, 39657]],
  764. },
  765. },
  766. {
  767. type: 'Feature',
  768. id: '1411',
  769. properties: { name: '吕梁市', cp: [111.3574, 37.7325], childNum: 13 },
  770. geometry: {
  771. type: 'Polygon',
  772. coordinates: [
  773. '@@@a@w„@„wlbnJVb„@VbšVVV„InaWmXI@a‚aUmVUVkn@°J@_„Wš@lIX¥lUnaV„V@naV@„xĊ„n‚V@‚wn¯wƱX_WmXaWUnKV_V›VUUUUWJkUVnKlk¯™@@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ƒÑkWUmK@UUKmXUWÝwUa™LUU@aWJUUU@Ua݄U@WL@VKVaVI@WnU@alIVKƒƒ@kIƒmIkJ@™m@ƒ™@@_™K@xƒ@kaW@U„@Vmn@ŽUK@mIƒJUXV¤XXWlkKƒkkK@XmJVakImJU@ó™¯LWKUV@nUVƒLkxmKkLma@kXKmmƒLƒab™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',
  774. ],
  775. encodeOffsets: [[113614, 39657]],
  776. },
  777. },
  778. {
  779. type: 'Feature',
  780. id: '1410',
  781. properties: { name: '临汾市', cp: [111.4783, 36.1615], childNum: 17 },
  782. geometry: {
  783. type: 'Polygon',
  784. coordinates: [
  785. '@@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»VwUkVmwUmmVn@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@ULWaUU@@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„@lUbVnl@„Wxnl@n@ŽUbV„mL‚mƒb@`X@lUX@@xlnkLWaUJnnWV™Vn@l„@bULVV@l™V@XnJVX',
  786. ],
  787. encodeOffsets: [[113063, 37784]],
  788. },
  789. },
  790. {
  791. type: 'Feature',
  792. id: '1407',
  793. properties: { name: '晋中市', cp: [112.7747, 37.37], childNum: 11 },
  794. geometry: {
  795. type: 'Polygon',
  796. coordinates: [
  797. '@@@š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@WUaVl@@mVU„@XkW@ƒnkVKVƒ„_Vw„y@knwVa‚@XalU„@šVnml@„X@V„L‚KVaÞbnnlJšI„mVKn„VVVInVlU„@„m@™mXK@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@',
  798. ],
  799. encodeOffsets: [[114087, 37682]],
  800. },
  801. },
  802. {
  803. type: 'Feature',
  804. id: '1408',
  805. properties: { name: '运城市', cp: [111.1487, 35.2002], childNum: 13 },
  806. geometry: {
  807. type: 'Polygon',
  808. coordinates: [
  809. '@@„Vl„nJ˜wkaVa„XšWVLĊknmnL‚l@@bn‚V@UaVU@UVK@aXI˜KXL@bVVVbXVVblV„aVnK@¯š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@„',
  810. ],
  811. encodeOffsets: [[113232, 36597]],
  812. },
  813. },
  814. {
  815. type: 'Feature',
  816. id: '1402',
  817. properties: { name: '大同市', cp: [113.7854, 39.8035], childNum: 8 },
  818. geometry: {
  819. type: 'Polygon',
  820. coordinates: [
  821. '@@²£šyl@Ȑ˜Ė@bĸŽĢbĸ„˜X„a‚KŤnn@ŎôllÈx„nVnÞDŽV@b‚nXllL°KšbVb@J@b—„‚„@ŽU„„xlKXLlKlXk„@Ulk„JlkUƒVKXUƒÇVIVm@_nǚLšašl‚w„VnU@UUwma@aƒaÝaLmUk@@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Ž¯„WxI@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',
  822. ],
  823. encodeOffsets: [[115335, 41209]],
  824. },
  825. },
  826. {
  827. type: 'Feature',
  828. id: '1404',
  829. properties: { name: '长治市', cp: [112.8625, 36.4746], childNum: 12 },
  830. geometry: {
  831. type: 'Polygon',
  832. coordinates: [
  833. '@@Uk™Lky@I‚JVa@mÞaWšy@_W@_WƒXVlUVwš@nw°K@m„UƒVaƒmVkU@mmmnLVUmKXa™U@IlKVUnK@UmWkX@WV_Vƒ@akU@a„KWIXyƒIUVmUn™Ua@WaXUVKVmkUWVkUƒLU@@VƒbƒKbƒIUmƒ@mbVL—x›WUUkn±V¯wƒbÅJUbmLkbmKÅKƒbVnUbƒV™KUb™KUbmLKmƒb™aƒKkUm@UŽnn‚VnxUVlUxl¼ƒk¯JUbU@Vbk@WšU@UVóI@`¯nWxkLƒK@nk`Wn@lUnƒVnm‚ƒXU`@mb@lkV@„VnklVVUblz@`nbWnnJ„IVJ@XUVV„UV@lÆXšxnKlL@mšaȍll„I„ašLV`„UlVV@@b@XJWUb@˜™n@L„@lJn@@UVKVaœUlnlJXb„k˜Wn_@mn@VkVK@a°@XklKVUUwVWUšƒĊƚ@šU²@@blLVWn@@bVa„XllVnnaVmša@¯VLnan@‚šmVm@knUVJ',
  834. ],
  835. encodeOffsets: [[116269, 37637]],
  836. },
  837. },
  838. {
  839. type: 'Feature',
  840. id: '1406',
  841. properties: { name: '朔州市', cp: [113.0713, 39.6991], childNum: 5 },
  842. geometry: {
  843. type: 'Polygon',
  844. coordinates: [
  845. '@@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@aa@IVyƍ@aƒƒXUWknwna@w‚JXw°ƒWÈ¥kI@W@kmKm™¯IUmkXWWkaƒbkImJ™UkL±aVƒb@lWXkJƒUkƒĉkƒ@UmU@a™KkƒVƒUkJlaU_™yƒ@UU@aUU¯LW`kLWnkJó™ƒbUƒbmK@aU@UVVL@VƒL@„UVULƒK@xUL@VUV@nml¯@UkmKUxmbVbUV@XƒlXVmnVbkxUbU@ƒbm@@VUlUVšb°@VX¯šm‚',
  846. ],
  847. encodeOffsets: [[114615, 40562]],
  848. },
  849. },
  850. {
  851. type: 'Feature',
  852. id: '1405',
  853. properties: { name: '晋城市', cp: [112.7856, 35.6342], childNum: 6 },
  854. geometry: {
  855. type: 'Polygon',
  856. coordinates: [
  857. '@@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ƒUIWJUWmka™@UXƒJƒk@UkmW@kLWKVƒx@bmI@VUaVU@a¯@UUmVKmX@±`kÝKVxUL±akL@V™bƒLkKmVƒ@XWVUbƒVXb@lm@@lW@@xk„lVUbnnmbUšlJ@„@L„@@V„b@‚WXš„UlkxVV@„šwn@ÜmnLlVkzƒ`UbmL@Vš@XL˜m„VnIÞ@VU°x@VnL˜x„V@LU°',
  858. ],
  859. encodeOffsets: [[115223, 36895]],
  860. },
  861. },
  862. {
  863. type: 'Feature',
  864. id: '1401',
  865. properties: { name: '太原市', cp: [112.3352, 37.9413], childNum: 5 },
  866. geometry: {
  867. type: 'Polygon',
  868. coordinates: [
  869. '@@„@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±LKmVUI@W¯™VaU_l™kbW@kK@mƒUkaVƒmVaU™ƒIVmalk™W@wnIVy@klkWUU›VI@ƒƒUƒVkam@knU@mmmK@bblVUX@VkLV`@n±KU„ULƒ‚UnVVńUbÇKmV—Imbm@k¼ó@Ul™b@VmV@bXmaƒK@›UUxkV‚V@„xW„UxVnkVVJ@XnJ@XlV²LƂVbnL@lš@°',
  870. ],
  871. encodeOffsets: [[114503, 39134]],
  872. },
  873. },
  874. {
  875. type: 'Feature',
  876. id: '1403',
  877. properties: { name: '阳泉市', cp: [113.4778, 38.0951], childNum: 3 },
  878. geometry: {
  879. type: 'Polygon',
  880. coordinates: [
  881. '@@°@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ÝaUbLƒK@UƒWk@mn™Uƒ@kVWb@Ubmx@lƒzUxƒ`U„ULml@„XWlƒ@UV@nk@U‚Vb@X™Jm™@@Vknƒyk@ƒzƒJƒnUV@bk@mJ@b°Ò°zXVlVXx‚@šbXVmnVbUlVb',
  882. ],
  883. encodeOffsets: [[115864, 39336]],
  884. },
  885. },
  886. ],
  887. UTF8Encoding: true,
  888. })
  889. var mapFeatures = echarts.getMap(this.mapName).geoJson.features
  890. mapFeatures.forEach(v => {
  891. // 地区名称
  892. var name = v.properties.name
  893. // 地区经纬度
  894. this.geoCoordMap[name] = v.properties.cp
  895. })
  896. // <p>当前阶段:<span>可论证阶段</span></p>
  897. // <p>时间节点:<span>2021.10-2022.10</span></p>
  898. let option = {
  899. tooltip: {
  900. padding: 15,
  901. enterable: true,
  902. transitionDuration: 1,
  903. formatter: (params, ticket, callback) => {
  904. let tipHtml = `
  905. <div class="tooltip-cont">
  906. <p>新开工:<span>工程建设项目</span></p>
  907. <p>总投资额:<span>${params.data.value}亿</span></p>
  908. </div>`
  909. callback(ticket, tipHtml)
  910. return tipHtml
  911. },
  912. },
  913. visualMap: {
  914. show: false,
  915. min: 0,
  916. max: 300,
  917. right: 0,
  918. bottom: 0,
  919. text: ['高', '低'],
  920. textStyle: {
  921. color: '#f1f1f1'
  922. },
  923. realtime: false,
  924. calculable: false,
  925. inRange: {
  926. color: ['lightskyblue', '#2754b7']
  927. }
  928. },
  929. geo: {
  930. show: true,
  931. map: 'shanxi',
  932. layoutCenter: ['50%', '50%'], //地图位置
  933. layoutSize: '100%',
  934. label: {
  935. normal: {
  936. show: false,
  937. },
  938. emphasis: {
  939. show: false,
  940. },
  941. },
  942. roam: false,
  943. itemStyle: {
  944. normal: {
  945. areaColor: '#1946a8',
  946. shadowColor: '#1946a8',
  947. borderWidth: 1, //设置外层边框
  948. borderColor: '#1946a8',
  949. shadowOffsetX: 10,
  950. shadowOffsetY: 5,
  951. shadowBlur: 2,
  952. },
  953. emphasis: {
  954. areaColor: '#1946a8',
  955. borderColor: '#d4bc1d',
  956. borderWidth: 2, //设置外层边框
  957. },
  958. },
  959. },
  960. series: [
  961. {
  962. name: '散点',
  963. type: 'scatter',
  964. coordinateSystem: 'geo',
  965. data: this.convertData(data),
  966. symbolSize: function (val) {
  967. return 10
  968. },
  969. label: {
  970. normal: {
  971. formatter: '{b}',
  972. position: [10, 10],
  973. fontSize: 15,
  974. fontWeight: 600,
  975. fontStyle: 'italic',
  976. color: '#fff',
  977. show: true,
  978. },
  979. emphasis: {
  980. show: true,
  981. },
  982. },
  983. itemStyle: {
  984. normal: {
  985. color: '#000',
  986. borderWidth: 2,
  987. borderColor: '#fff',
  988. },
  989. },
  990. },
  991. {
  992. type: 'map',
  993. map: this.mapName,
  994. geoIndex: 0,
  995. aspectScale: 1.5, //长宽比
  996. showLegendSymbol: true, // 存在legend时显示
  997. label: {
  998. normal: {
  999. show: true,
  1000. },
  1001. emphasis: {
  1002. show: false,
  1003. textStyle: {
  1004. color: '#fff',
  1005. },
  1006. },
  1007. },
  1008. roam: true,
  1009. itemStyle: {
  1010. normal: {
  1011. areaColor: '#031525',
  1012. borderColor: '#3B5077',
  1013. },
  1014. emphasis: {
  1015. areaColor: '#2B91B7',
  1016. },
  1017. },
  1018. animation: false,
  1019. data: data,
  1020. },
  1021. {
  1022. name: '点',
  1023. type: 'scatter',
  1024. coordinateSystem: 'geo',
  1025. zlevel: 6,
  1026. },
  1027. {
  1028. name: 'Top 5',
  1029. type: 'effectScatter',
  1030. coordinateSystem: 'geo',
  1031. data: this.convertData(
  1032. data
  1033. .sort(function (a, b) {
  1034. return b.value - a.value
  1035. })
  1036. .slice(0, 5)
  1037. ),
  1038. symbolSize: function (val) {
  1039. return 15
  1040. },
  1041. showEffectOn: 'render',
  1042. rippleEffect: {
  1043. brushType: 'stroke',
  1044. },
  1045. hoverAnimation: true,
  1046. label: {
  1047. normal: {
  1048. formatter: '{b}',
  1049. position: 'left',
  1050. show: false,
  1051. },
  1052. },
  1053. itemStyle: {
  1054. normal: {
  1055. color: 'yellow',
  1056. shadowBlur: 10,
  1057. shadowColor: 'yellow',
  1058. },
  1059. },
  1060. zlevel: 1000,
  1061. },
  1062. {
  1063. name: '线路',
  1064. type: 'lines',
  1065. zlevel: 2,
  1066. effect: {
  1067. show: true,
  1068. period: 4, //箭头指向速度,值越小速度越快
  1069. trailLength: 0.02, //特效尾迹长度[0,1]值越大,尾迹越长重
  1070. symbol: 'arrow', //箭头图标
  1071. symbolSize: 5, //图标大小
  1072. },
  1073. lineStyle: {
  1074. normal: {
  1075. color: '#00FFFF',
  1076. width: 1,
  1077. type: 'dashed',
  1078. opacity: 0.5, //尾迹线条透明度
  1079. curveness: -0.3, //尾迹线条曲直度
  1080. },
  1081. },
  1082. data: moveLine.normal,
  1083. },
  1084. ],
  1085. }
  1086. myChart.setOption(option)
  1087. },
  1088. },
  1089. })