investHome.js 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796
  1. let app = new Vue({
  2. el: '#app',
  3. data() {
  4. return {
  5. year: '2022',
  6. time: '',
  7. timer: '',
  8. mapName: 'shanxi',
  9. geoCoordMap: {},
  10. config1: {
  11. number: [100],
  12. content: '{nt}个',
  13. },
  14. storageRecordConfig: {
  15. header: ['项目名称', '投资金额', '项目进度'],
  16. headerBGC: '#05507b33',
  17. oddRowBGC: '#05507b33',
  18. evenRowBGC: '',
  19. headerHeight: '40',
  20. rowNum: 4,
  21. align: ['center'],
  22. data: [
  23. ['工程建设项目', '21.2亿', '施工图设计'],
  24. ['工程建设项目', '21.2亿', '施工图设计'],
  25. ['工程建设项目', '21.2亿', '施工图设计'],
  26. ['工程建设项目', '21.2亿', '施工图设计'],
  27. ['工程建设项目', '21.2亿', '施工图设计'],
  28. ],
  29. },
  30. companyList: [
  31. { name: '山西焦煤' },
  32. { name: '晋能控股' },
  33. { name: '华新燃气' },
  34. { name: '山西建投' },
  35. { name: '潞安化工' },
  36. { name: '华远陆港' },
  37. { name: '航产集团' },
  38. { name: '大地控股' },
  39. { name: '国新能源' },
  40. { name: '汾酒集团' },
  41. { name: '云时代' },
  42. { name: '神农科技' },
  43. { name: '华阳新材' },
  44. { name: '华舰体育' },
  45. { name: '交控集团' },
  46. { name: '文旅集团' },
  47. { name: '水控集团' },
  48. { name: '太重集团' },
  49. ],
  50. }
  51. },
  52. created() {
  53. this.time = formatDate()
  54. this.timer = setInterval(()=> {
  55. this.time = formatDate()
  56. },1000)
  57. },
  58. beforeDestroy() {
  59. if (this.timer) {
  60. clearInterval(this.timer);
  61. }
  62. },
  63. mounted() {
  64. // 左侧图表
  65. this.initChartL1()
  66. this.initChartL2()
  67. this.initChartR1()
  68. this.initChinaChart()
  69. },
  70. methods: {
  71. convertData(data) {
  72. var res = []
  73. for (var i = 0; i < data.length; i++) {
  74. var geoCoord = this.geoCoordMap[data[i].name]
  75. if (geoCoord) {
  76. res.push({
  77. name: data[i].name,
  78. value: geoCoord.concat(data[i].value),
  79. })
  80. }
  81. }
  82. return res
  83. },
  84. initChinaChart() {
  85. var data = [
  86. { name: '吕梁市', value: 150 },
  87. { name: '大同市', value: 190 },
  88. { name: '忻州市', value: 140 },
  89. { name: '朔州市', value: 160 },
  90. { name: '晋中市', value: 100 },
  91. { name: '太原市', value: 300 },
  92. { name: '临汾市', value: 190 },
  93. { name: '长治市', value: 100 },
  94. { name: '晋城市', value: 280 },
  95. { name: '运城市', value: 180 },
  96. { name: '阳泉市', value: 110 },
  97. ]
  98. var moveLine = {
  99. normal: [
  100. {
  101. fromName: '太原市',
  102. toName: '吕梁市',
  103. coords: [
  104. [112.3352, 37.9413],
  105. [111.3574, 37.7325],
  106. ],
  107. },
  108. {
  109. fromName: '太原市',
  110. toName: '忻州市',
  111. coords: [
  112. [112.3352, 37.9413],
  113. [112.4561, 38.8971],
  114. ],
  115. },
  116. {
  117. fromName: '太原市',
  118. toName: '临汾市',
  119. coords: [
  120. [112.3352, 37.9413],
  121. [111.4783, 36.1615],
  122. ],
  123. },
  124. {
  125. fromName: '太原市',
  126. toName: '阳泉市',
  127. coords: [
  128. [112.3352, 37.9413],
  129. [113.4778, 38.0951],
  130. ],
  131. },
  132. {
  133. fromName: '太原市',
  134. toName: '晋中市',
  135. coords: [
  136. [112.3352, 37.9413],
  137. [112.7747, 37.37],
  138. ],
  139. },
  140. {
  141. fromName: '太原市',
  142. toName: '运城市',
  143. coords: [
  144. [112.3352, 37.9413],
  145. [111.1487, 35.2002],
  146. ],
  147. },
  148. {
  149. fromName: '太原市',
  150. toName: '大同市',
  151. coords: [
  152. [112.3352, 37.9413],
  153. [113.7854, 39.8035],
  154. ],
  155. },
  156. {
  157. fromName: '太原市',
  158. toName: '晋城市',
  159. coords: [
  160. [112.3352, 37.9413],
  161. [112.7856, 35.6342],
  162. ],
  163. },
  164. {
  165. fromName: '太原市',
  166. toName: '长治市',
  167. coords: [
  168. [112.3352, 37.9413],
  169. [112.8625, 36.4746],
  170. ],
  171. },
  172. {
  173. fromName: '太原市',
  174. toName: '朔州市',
  175. coords: [
  176. [112.3352, 37.9413],
  177. [113.0713, 39.6991],
  178. ],
  179. },
  180. ],
  181. }
  182. /*获取地图数据*/
  183. let myChart = echarts.init(this.$refs['echarts-map'])
  184. echarts.registerMap('shanxi', {
  185. type: 'FeatureCollection',
  186. features: [
  187. {
  188. type: 'Feature',
  189. id: '1409',
  190. properties: { name: '忻州市', cp: [112.4561, 38.8971], childNum: 14 },
  191. geometry: {
  192. type: 'Polygon',
  193. coordinates: [
  194. '@@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',
  195. ],
  196. encodeOffsets: [[113614, 39657]],
  197. },
  198. },
  199. {
  200. type: 'Feature',
  201. id: '1411',
  202. properties: { name: '吕梁市', cp: [111.3574, 37.7325], childNum: 13 },
  203. geometry: {
  204. type: 'Polygon',
  205. coordinates: [
  206. '@@@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',
  207. ],
  208. encodeOffsets: [[113614, 39657]],
  209. },
  210. },
  211. {
  212. type: 'Feature',
  213. id: '1410',
  214. properties: { name: '临汾市', cp: [111.4783, 36.1615], childNum: 17 },
  215. geometry: {
  216. type: 'Polygon',
  217. coordinates: [
  218. '@@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',
  219. ],
  220. encodeOffsets: [[113063, 37784]],
  221. },
  222. },
  223. {
  224. type: 'Feature',
  225. id: '1407',
  226. properties: { name: '晋中市', cp: [112.7747, 37.37], childNum: 11 },
  227. geometry: {
  228. type: 'Polygon',
  229. coordinates: [
  230. '@@@š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@',
  231. ],
  232. encodeOffsets: [[114087, 37682]],
  233. },
  234. },
  235. {
  236. type: 'Feature',
  237. id: '1408',
  238. properties: { name: '运城市', cp: [111.1487, 35.2002], childNum: 13 },
  239. geometry: {
  240. type: 'Polygon',
  241. coordinates: [
  242. '@@„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@„',
  243. ],
  244. encodeOffsets: [[113232, 36597]],
  245. },
  246. },
  247. {
  248. type: 'Feature',
  249. id: '1402',
  250. properties: { name: '大同市', cp: [113.7854, 39.8035], childNum: 8 },
  251. geometry: {
  252. type: 'Polygon',
  253. coordinates: [
  254. '@@²£š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',
  255. ],
  256. encodeOffsets: [[115335, 41209]],
  257. },
  258. },
  259. {
  260. type: 'Feature',
  261. id: '1404',
  262. properties: { name: '长治市', cp: [112.8625, 36.4746], childNum: 12 },
  263. geometry: {
  264. type: 'Polygon',
  265. coordinates: [
  266. '@@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',
  267. ],
  268. encodeOffsets: [[116269, 37637]],
  269. },
  270. },
  271. {
  272. type: 'Feature',
  273. id: '1406',
  274. properties: { name: '朔州市', cp: [113.0713, 39.6991], childNum: 5 },
  275. geometry: {
  276. type: 'Polygon',
  277. coordinates: [
  278. '@@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‚',
  279. ],
  280. encodeOffsets: [[114615, 40562]],
  281. },
  282. },
  283. {
  284. type: 'Feature',
  285. id: '1405',
  286. properties: { name: '晋城市', cp: [112.7856, 35.6342], childNum: 6 },
  287. geometry: {
  288. type: 'Polygon',
  289. coordinates: [
  290. '@@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°',
  291. ],
  292. encodeOffsets: [[115223, 36895]],
  293. },
  294. },
  295. {
  296. type: 'Feature',
  297. id: '1401',
  298. properties: { name: '太原市', cp: [112.3352, 37.9413], childNum: 5 },
  299. geometry: {
  300. type: 'Polygon',
  301. coordinates: [
  302. '@@„@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š@°',
  303. ],
  304. encodeOffsets: [[114503, 39134]],
  305. },
  306. },
  307. {
  308. type: 'Feature',
  309. id: '1403',
  310. properties: { name: '阳泉市', cp: [113.4778, 38.0951], childNum: 3 },
  311. geometry: {
  312. type: 'Polygon',
  313. coordinates: [
  314. '@@°@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',
  315. ],
  316. encodeOffsets: [[115864, 39336]],
  317. },
  318. },
  319. ],
  320. UTF8Encoding: true,
  321. })
  322. var mapFeatures = echarts.getMap(this.mapName).geoJson.features
  323. mapFeatures.forEach(v => {
  324. // 地区名称
  325. var name = v.properties.name
  326. // 地区经纬度
  327. this.geoCoordMap[name] = v.properties.cp
  328. })
  329. myChart.setOption({
  330. tooltip: {
  331. padding: 15,
  332. enterable: true,
  333. transitionDuration: 1,
  334. formatter: (params, ticket, callback) => {
  335. let tipHtml = `
  336. <div class="tooltip-cont">
  337. <p>新开工:<span>工程建设项目</span></p>
  338. <p>总投资额:<span>${params.data.value}亿</span></p>
  339. <p>当前阶段:<span>可论证阶段</span></p>
  340. <p>时间节点:<span>2021.10-2022.10</span></p>
  341. </div>`
  342. return tipHtml
  343. },
  344. },
  345. visualMap: {
  346. min: 0,
  347. max: 300,
  348. right: 0,
  349. bottom: 0,
  350. text: ['高', '低'],
  351. textStyle: {
  352. color: '#f1f1f1'
  353. },
  354. realtime: false,
  355. calculable: true,
  356. inRange: {
  357. color: ['lightskyblue', '#2754b7']
  358. }
  359. },
  360. geo: {
  361. show: true,
  362. map: 'shanxi',
  363. layoutCenter: ['50%', '50%'], //地图位置
  364. layoutSize: '100%',
  365. label: {
  366. normal: {
  367. show: false,
  368. },
  369. emphasis: {
  370. show: false,
  371. },
  372. },
  373. roam: false,
  374. itemStyle: {
  375. normal: {
  376. areaColor: '#1946a8',
  377. shadowColor: '#1946a8',
  378. borderWidth: 1, //设置外层边框
  379. borderColor: '#1946a8',
  380. shadowOffsetX: 10,
  381. shadowOffsetY: 5,
  382. shadowBlur: 2,
  383. },
  384. emphasis: {
  385. areaColor: '#1946a8',
  386. borderColor: '#d4bc1d',
  387. borderWidth: 2, //设置外层边框
  388. },
  389. },
  390. },
  391. series: [
  392. {
  393. name: '散点',
  394. type: 'scatter',
  395. coordinateSystem: 'geo',
  396. data: this.convertData(data),
  397. symbolSize: function (val) {
  398. return 10
  399. },
  400. label: {
  401. normal: {
  402. formatter: '{b}',
  403. position: [10, 10],
  404. fontSize: 15,
  405. fontWeight: 600,
  406. fontStyle: 'italic',
  407. color: '#fff',
  408. show: true,
  409. },
  410. emphasis: {
  411. show: true,
  412. },
  413. },
  414. itemStyle: {
  415. normal: {
  416. color: '#000',
  417. borderWidth: 2,
  418. borderColor: '#fff',
  419. },
  420. },
  421. },
  422. {
  423. type: 'map',
  424. map: this.mapName,
  425. geoIndex: 0,
  426. aspectScale: 0.75, //长宽比
  427. showLegendSymbol: true, // 存在legend时显示
  428. label: {
  429. normal: {
  430. show: true,
  431. },
  432. emphasis: {
  433. show: false,
  434. textStyle: {
  435. color: '#fff',
  436. },
  437. },
  438. },
  439. roam: true,
  440. itemStyle: {
  441. normal: {
  442. areaColor: '#031525',
  443. borderColor: '#3B5077',
  444. },
  445. emphasis: {
  446. areaColor: '#2B91B7',
  447. },
  448. },
  449. animation: false,
  450. data: data,
  451. },
  452. {
  453. name: '点',
  454. type: 'scatter',
  455. coordinateSystem: 'geo',
  456. zlevel: 6,
  457. },
  458. {
  459. name: 'Top 5',
  460. type: 'effectScatter',
  461. coordinateSystem: 'geo',
  462. data: this.convertData(
  463. data
  464. .sort(function (a, b) {
  465. return b.value - a.value
  466. })
  467. .slice(0, 5)
  468. ),
  469. symbolSize: function (val) {
  470. return 15
  471. },
  472. showEffectOn: 'render',
  473. rippleEffect: {
  474. brushType: 'stroke',
  475. },
  476. hoverAnimation: true,
  477. label: {
  478. normal: {
  479. formatter: '{b}',
  480. position: 'left',
  481. show: false,
  482. },
  483. },
  484. itemStyle: {
  485. normal: {
  486. color: 'yellow',
  487. shadowBlur: 10,
  488. shadowColor: 'yellow',
  489. },
  490. },
  491. zlevel: 1000,
  492. },
  493. {
  494. name: '线路',
  495. type: 'lines',
  496. zlevel: 2,
  497. effect: {
  498. show: true,
  499. period: 4, //箭头指向速度,值越小速度越快
  500. trailLength: 0.02, //特效尾迹长度[0,1]值越大,尾迹越长重
  501. symbol: 'arrow', //箭头图标
  502. symbolSize: 5, //图标大小
  503. },
  504. lineStyle: {
  505. normal: {
  506. color: '#00FFFF',
  507. width: 1,
  508. type: 'dashed',
  509. opacity: 0.5, //尾迹线条透明度
  510. curveness: -0.3, //尾迹线条曲直度
  511. },
  512. },
  513. data: moveLine.normal,
  514. },
  515. ],
  516. })
  517. },
  518. initChartL1() {
  519. let myChart = echarts.init(this.$refs['echartL1'])
  520. let option = {
  521. tooltip: {
  522. trigger: 'item',
  523. },
  524. color: ['#6682f5','#8ba2ff','#69c0ff','#43ede3'],
  525. legend: {
  526. top: 'center',
  527. orient: 'vertical',
  528. right: '2%',
  529. textStyle: {
  530. color: '#9DB9EB',
  531. },
  532. },
  533. series: [
  534. {
  535. name: '',
  536. type: 'pie',
  537. radius: ['55%', '80%'],
  538. labelLine: {
  539. normal: {
  540. lineStyle: {
  541. width: 1,
  542. },
  543. },
  544. },
  545. data: [
  546. { value: 1048, name: '煤炭' },
  547. { value: 735, name: '火电' },
  548. { value: 580, name: '焦化' },
  549. { value: 484, name: '风电' },
  550. ],
  551. },
  552. ],
  553. }
  554. myChart.setOption(option)
  555. },
  556. initChartL2() {
  557. let myChart = echarts.init(this.$refs['echartL2'])
  558. let option = {
  559. tooltip: {
  560. trigger: 'axis',
  561. axisPointer: {
  562. type: 'shadow',
  563. },
  564. },
  565. grid: {
  566. top: '16%',
  567. right: '3%',
  568. left: '10%',
  569. bottom: '10%',
  570. },
  571. legend: {
  572. top: '1',
  573. right: '10',
  574. textStyle: {
  575. color: 'rgba(250,250,250,0.6)',
  576. },
  577. },
  578. xAxis: {
  579. data: ['山西焦煤', '山西文旅', '潞安化工', '晋能控股', '山西建投'],
  580. axisLine: {
  581. show: true, //隐藏X轴轴线
  582. lineStyle: {
  583. color: '#005094',
  584. width: 1,
  585. },
  586. },
  587. axisTick: {
  588. show: false, //隐藏X轴刻度
  589. },
  590. axisLabel: {
  591. show: true,
  592. textStyle: {
  593. color: 'rgba(255,255,255,0.6)', //X轴文字颜色
  594. },
  595. },
  596. },
  597. yAxis: [
  598. {
  599. type: 'value',
  600. nameTextStyle: {
  601. color: '#ebf8ac',
  602. },
  603. splitLine: {
  604. show: true,
  605. lineStyle: {
  606. color: '#68b4dd66',
  607. type: 'dashed',
  608. },
  609. },
  610. axisLine: {
  611. show: true,
  612. lineStyle: {
  613. color: '#3D7495',
  614. },
  615. },
  616. axisLabel: {
  617. show: true,
  618. textStyle: {
  619. color: 'rgba(250,250,250,0.6)',
  620. },
  621. },
  622. },
  623. ],
  624. series: [
  625. {
  626. name: '计划投资',
  627. type: 'bar',
  628. barWidth: 15,
  629. itemStyle: {
  630. normal: {
  631. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  632. {
  633. offset: 0,
  634. color: '#69c0ff',
  635. },
  636. {
  637. offset: 1,
  638. color: '#082550',
  639. },
  640. ]),
  641. },
  642. },
  643. data: [900, 600, 500, 450, 500],
  644. },
  645. {
  646. name: '实际投资',
  647. type: 'bar',
  648. barWidth: 15,
  649. itemStyle: {
  650. normal: {
  651. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  652. {
  653. offset: 0,
  654. color: '#957DFF',
  655. },
  656. {
  657. offset: 1,
  658. color: '#082550',
  659. },
  660. ]),
  661. },
  662. },
  663. data: [500, 900, 600, 800, 450],
  664. },
  665. ],
  666. }
  667. myChart.setOption(option)
  668. },
  669. initChartR1() {
  670. let myChart = echarts.init(this.$refs['echartR1'])
  671. let option = {
  672. tooltip: {
  673. trigger: 'axis',
  674. axisPointer: {
  675. type: 'shadow',
  676. },
  677. },
  678. grid: {
  679. top: '16%',
  680. right: '10%',
  681. left: '10%',
  682. bottom: '10%',
  683. },
  684. legend: {
  685. top: '1',
  686. textStyle: {
  687. color: 'rgba(250,250,250,0.6)',
  688. },
  689. },
  690. xAxis: {
  691. data: ['煤炭', '火电', '焦化', '物流贸易', '文旅康养','水务','生物','冶金','建材'],
  692. axisLine: {
  693. show: true, //隐藏X轴轴线
  694. lineStyle: {
  695. color: '#005094',
  696. width: 1,
  697. },
  698. },
  699. axisTick: {
  700. show: false, //隐藏X轴刻度
  701. },
  702. axisLabel: {
  703. show: true,
  704. textStyle: {
  705. color: 'rgba(255,255,255,0.6)', //X轴文字颜色
  706. },
  707. },
  708. },
  709. yAxis: [
  710. {
  711. type: 'value',
  712. name: '亿元',
  713. nameTextStyle: {
  714. color: 'rgba(255,255,255,0.6)',
  715. },
  716. splitLine: {
  717. show: true,
  718. lineStyle: {
  719. color: '#68b4dd66',
  720. type: 'dashed',
  721. },
  722. },
  723. axisLine: {
  724. show: true,
  725. lineStyle: {
  726. color: '#3D7495',
  727. },
  728. },
  729. axisLabel: {
  730. show: true,
  731. textStyle: {
  732. color: 'rgba(250,250,250,0.6)',
  733. },
  734. },
  735. },
  736. {
  737. type: 'value',
  738. name: '%',
  739. nameTextStyle: {
  740. color: 'rgba(255,255,255,0.6)',
  741. },
  742. axisLine: {
  743. show: true,
  744. lineStyle: {
  745. color: '#3D7495',
  746. },
  747. },
  748. axisLabel: {
  749. show: true,
  750. textStyle: {
  751. color: 'rgba(250,250,250,0.6)',
  752. },
  753. },
  754. },
  755. ],
  756. series: [
  757. {
  758. type: 'bar',
  759. name: '柱形数据',
  760. barWidth: 15,
  761. itemStyle: {
  762. normal: {
  763. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  764. {
  765. offset: 0,
  766. color: '#69c0ff',
  767. },
  768. {
  769. offset: 1,
  770. color: '#082550',
  771. },
  772. ]),
  773. },
  774. },
  775. data: [900, 600, 500, 450, 500,900, 600, 500, 450],
  776. },
  777. {
  778. type: 'line',
  779. name: '折线数据',
  780. barWidth: 15,
  781. yAxisIndex: 1,
  782. itemStyle: {
  783. normal: {
  784. color: '#FBE139',
  785. },
  786. },
  787. data: [60, 50, 45, 50,100,45,60,45,20],
  788. },
  789. ],
  790. }
  791. myChart.setOption(option)
  792. },
  793. },
  794. })