investHome.js 34 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049
  1. let app = new Vue({
  2. el: '#app',
  3. data () {
  4. return {
  5. showTip: true,
  6. year: '2022',
  7. time: '',
  8. timer: '',
  9. mapName: 'shanxi',
  10. geoCoordMap: {},
  11. config1: {
  12. number: [100],
  13. content: '{nt}个',
  14. },
  15. storageRecordConfig: null,
  16. companyList: [
  17. { name: '山西焦煤' },
  18. { name: '晋能控股' },
  19. { name: '华新燃气' },
  20. { name: '山西建投' },
  21. { name: '潞安化工' },
  22. { name: '华远陆港' },
  23. { name: '航产集团' },
  24. { name: '大地控股' },
  25. { name: '国新能源' },
  26. { name: '汾酒集团' },
  27. { name: '云时代' },
  28. { name: '神农科技' },
  29. { name: '华阳新材' },
  30. { name: '华舰体育' },
  31. { name: '交控集团' },
  32. { name: '文旅集团' },
  33. { name: '水控集团' },
  34. { name: '太重集团' },
  35. ],
  36. amountList: amountList,
  37. amountTotal: 0,
  38. classOption: {
  39. step: 0.5
  40. }
  41. }
  42. },
  43. created () {
  44. this.amountList.map(item => {
  45. this.amountTotal += Number(item.value)
  46. })
  47. this.time = formatDate()
  48. this.timer = setInterval(() => {
  49. this.time = formatDate()
  50. }, 1000)
  51. },
  52. beforeDestroy () {
  53. if (this.timer) {
  54. clearInterval(this.timer);
  55. }
  56. },
  57. mounted () {
  58. setTimeout(() => {
  59. // 左侧图表
  60. this.initChartTip()
  61. this.initChartTip2()
  62. this.initChartL1()
  63. this.initChartL2()
  64. this.initChartR1()
  65. this.initChinaChart()
  66. this.initProjectList()
  67. },0)
  68. },
  69. methods: {
  70. numFormat (value) {
  71. if (!value) return '0'
  72. var intPart = Number(value).toFixed(0) // 获取整数部分
  73. var intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') // 将整数部分逢三一断
  74. var floatPart = '.00' // 预定义小数部分
  75. var value2Array = value.toString().split('.')
  76. // =2表示数据有小数位
  77. if (value2Array.length === 2) {
  78. floatPart = value2Array[1].toString() // 拿到小数部分
  79. if (floatPart.length === 1) {
  80. // 补0
  81. return intPartFormat + '.' + floatPart + '0'
  82. } else {
  83. return intPartFormat + '.' + floatPart
  84. }
  85. } else {
  86. return intPartFormat
  87. }
  88. },
  89. convertData (data) {
  90. var res = []
  91. for (var i = 0; i < data.length; i++) {
  92. var geoCoord = this.geoCoordMap[data[i].name]
  93. if (geoCoord) {
  94. res.push({
  95. name: data[i].name,
  96. value: geoCoord.concat(data[i].value),
  97. })
  98. }
  99. }
  100. return res
  101. },
  102. initChinaChart () {
  103. var data = [
  104. { name: '吕梁市', value: 150 },
  105. { name: '大同市', value: 190 },
  106. { name: '忻州市', value: 140 },
  107. { name: '朔州市', value: 160 },
  108. { name: '晋中市', value: 100 },
  109. { name: '太原市', value: 300 },
  110. { name: '临汾市', value: 190 },
  111. { name: '长治市', value: 100 },
  112. { name: '晋城市', value: 280 },
  113. { name: '运城市', value: 180 },
  114. { name: '阳泉市', value: 110 },
  115. ]
  116. var moveLine = {
  117. normal: [
  118. {
  119. fromName: '太原市',
  120. toName: '吕梁市',
  121. coords: [
  122. [112.3352, 37.9413],
  123. [111.3574, 37.7325],
  124. ],
  125. },
  126. {
  127. fromName: '太原市',
  128. toName: '忻州市',
  129. coords: [
  130. [112.3352, 37.9413],
  131. [112.4561, 38.8971],
  132. ],
  133. },
  134. {
  135. fromName: '太原市',
  136. toName: '临汾市',
  137. coords: [
  138. [112.3352, 37.9413],
  139. [111.4783, 36.1615],
  140. ],
  141. },
  142. {
  143. fromName: '太原市',
  144. toName: '阳泉市',
  145. coords: [
  146. [112.3352, 37.9413],
  147. [113.4778, 38.0951],
  148. ],
  149. },
  150. {
  151. fromName: '太原市',
  152. toName: '晋中市',
  153. coords: [
  154. [112.3352, 37.9413],
  155. [112.7747, 37.37],
  156. ],
  157. },
  158. {
  159. fromName: '太原市',
  160. toName: '运城市',
  161. coords: [
  162. [112.3352, 37.9413],
  163. [111.1487, 35.2002],
  164. ],
  165. },
  166. {
  167. fromName: '太原市',
  168. toName: '大同市',
  169. coords: [
  170. [112.3352, 37.9413],
  171. [113.7854, 39.8035],
  172. ],
  173. },
  174. {
  175. fromName: '太原市',
  176. toName: '晋城市',
  177. coords: [
  178. [112.3352, 37.9413],
  179. [112.7856, 35.6342],
  180. ],
  181. },
  182. {
  183. fromName: '太原市',
  184. toName: '长治市',
  185. coords: [
  186. [112.3352, 37.9413],
  187. [112.8625, 36.4746],
  188. ],
  189. },
  190. {
  191. fromName: '太原市',
  192. toName: '朔州市',
  193. coords: [
  194. [112.3352, 37.9413],
  195. [113.0713, 39.6991],
  196. ],
  197. },
  198. ],
  199. }
  200. /*获取地图数据*/
  201. let myChart = echarts.init(this.$refs['echarts-map'])
  202. echarts.registerMap('shanxi', {
  203. type: 'FeatureCollection',
  204. features: [
  205. {
  206. type: 'Feature',
  207. id: '1409',
  208. properties: { name: '忻州市', cp: [112.4561, 38.8971], childNum: 14 },
  209. geometry: {
  210. type: 'Polygon',
  211. coordinates: [
  212. '@@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',
  213. ],
  214. encodeOffsets: [[113614, 39657]],
  215. },
  216. },
  217. {
  218. type: 'Feature',
  219. id: '1411',
  220. properties: { name: '吕梁市', cp: [111.3574, 37.7325], childNum: 13 },
  221. geometry: {
  222. type: 'Polygon',
  223. coordinates: [
  224. '@@@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',
  225. ],
  226. encodeOffsets: [[113614, 39657]],
  227. },
  228. },
  229. {
  230. type: 'Feature',
  231. id: '1410',
  232. properties: { name: '临汾市', cp: [111.4783, 36.1615], childNum: 17 },
  233. geometry: {
  234. type: 'Polygon',
  235. coordinates: [
  236. '@@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',
  237. ],
  238. encodeOffsets: [[113063, 37784]],
  239. },
  240. },
  241. {
  242. type: 'Feature',
  243. id: '1407',
  244. properties: { name: '晋中市', cp: [112.7747, 37.37], childNum: 11 },
  245. geometry: {
  246. type: 'Polygon',
  247. coordinates: [
  248. '@@@š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@',
  249. ],
  250. encodeOffsets: [[114087, 37682]],
  251. },
  252. },
  253. {
  254. type: 'Feature',
  255. id: '1408',
  256. properties: { name: '运城市', cp: [111.1487, 35.2002], childNum: 13 },
  257. geometry: {
  258. type: 'Polygon',
  259. coordinates: [
  260. '@@„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@„',
  261. ],
  262. encodeOffsets: [[113232, 36597]],
  263. },
  264. },
  265. {
  266. type: 'Feature',
  267. id: '1402',
  268. properties: { name: '大同市', cp: [113.7854, 39.8035], childNum: 8 },
  269. geometry: {
  270. type: 'Polygon',
  271. coordinates: [
  272. '@@²£š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',
  273. ],
  274. encodeOffsets: [[115335, 41209]],
  275. },
  276. },
  277. {
  278. type: 'Feature',
  279. id: '1404',
  280. properties: { name: '长治市', cp: [112.8625, 36.4746], childNum: 12 },
  281. geometry: {
  282. type: 'Polygon',
  283. coordinates: [
  284. '@@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',
  285. ],
  286. encodeOffsets: [[116269, 37637]],
  287. },
  288. },
  289. {
  290. type: 'Feature',
  291. id: '1406',
  292. properties: { name: '朔州市', cp: [113.0713, 39.6991], childNum: 5 },
  293. geometry: {
  294. type: 'Polygon',
  295. coordinates: [
  296. '@@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‚',
  297. ],
  298. encodeOffsets: [[114615, 40562]],
  299. },
  300. },
  301. {
  302. type: 'Feature',
  303. id: '1405',
  304. properties: { name: '晋城市', cp: [112.7856, 35.6342], childNum: 6 },
  305. geometry: {
  306. type: 'Polygon',
  307. coordinates: [
  308. '@@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°',
  309. ],
  310. encodeOffsets: [[115223, 36895]],
  311. },
  312. },
  313. {
  314. type: 'Feature',
  315. id: '1401',
  316. properties: { name: '太原市', cp: [112.3352, 37.9413], childNum: 5 },
  317. geometry: {
  318. type: 'Polygon',
  319. coordinates: [
  320. '@@„@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š@°',
  321. ],
  322. encodeOffsets: [[114503, 39134]],
  323. },
  324. },
  325. {
  326. type: 'Feature',
  327. id: '1403',
  328. properties: { name: '阳泉市', cp: [113.4778, 38.0951], childNum: 3 },
  329. geometry: {
  330. type: 'Polygon',
  331. coordinates: [
  332. '@@°@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',
  333. ],
  334. encodeOffsets: [[115864, 39336]],
  335. },
  336. },
  337. ],
  338. UTF8Encoding: true,
  339. })
  340. var mapFeatures = echarts.getMap(this.mapName).geoJson.features
  341. mapFeatures.forEach(v => {
  342. // 地区名称
  343. var name = v.properties.name
  344. // 地区经纬度
  345. this.geoCoordMap[name] = v.properties.cp
  346. })
  347. // <p>当前阶段:<span>可论证阶段</span></p>
  348. // <p>时间节点:<span>2021.10-2022.10</span></p>
  349. let option = {
  350. tooltip: {
  351. padding: 15,
  352. enterable: true,
  353. transitionDuration: 1,
  354. formatter: (params, ticket, callback) => {
  355. let tipHtml = `
  356. <div class="tooltip-cont">
  357. <p>新开工:<span>工程建设项目</span></p>
  358. <p>总投资额:<span>${params.data.value}亿</span></p>
  359. </div>`
  360. callback(ticket, tipHtml)
  361. return tipHtml
  362. },
  363. },
  364. visualMap: {
  365. show: false,
  366. min: 0,
  367. max: 300,
  368. right: 0,
  369. bottom: 0,
  370. text: ['高', '低'],
  371. textStyle: {
  372. color: '#f1f1f1'
  373. },
  374. realtime: false,
  375. calculable: false,
  376. inRange: {
  377. color: ['lightskyblue', '#2754b7']
  378. }
  379. },
  380. geo: {
  381. show: true,
  382. map: 'shanxi',
  383. layoutCenter: ['50%', '50%'], //地图位置
  384. layoutSize: '100%',
  385. label: {
  386. normal: {
  387. show: false,
  388. },
  389. emphasis: {
  390. show: false,
  391. },
  392. },
  393. roam: false,
  394. itemStyle: {
  395. normal: {
  396. areaColor: '#1946a8',
  397. shadowColor: '#1946a8',
  398. borderWidth: 1, //设置外层边框
  399. borderColor: '#1946a8',
  400. shadowOffsetX: 10,
  401. shadowOffsetY: 5,
  402. shadowBlur: 2,
  403. },
  404. emphasis: {
  405. areaColor: '#1946a8',
  406. borderColor: '#d4bc1d',
  407. borderWidth: 2, //设置外层边框
  408. },
  409. },
  410. },
  411. series: [
  412. {
  413. name: '散点',
  414. type: 'scatter',
  415. coordinateSystem: 'geo',
  416. data: this.convertData(data),
  417. symbolSize: function (val) {
  418. return 10
  419. },
  420. label: {
  421. normal: {
  422. formatter: '{b}',
  423. position: [10, 10],
  424. fontSize: 15,
  425. fontWeight: 600,
  426. fontStyle: 'italic',
  427. color: '#fff',
  428. show: true,
  429. },
  430. emphasis: {
  431. show: true,
  432. },
  433. },
  434. itemStyle: {
  435. normal: {
  436. color: '#000',
  437. borderWidth: 2,
  438. borderColor: '#fff',
  439. },
  440. },
  441. },
  442. {
  443. type: 'map',
  444. map: this.mapName,
  445. geoIndex: 0,
  446. aspectScale: 1.5, //长宽比
  447. showLegendSymbol: true, // 存在legend时显示
  448. label: {
  449. normal: {
  450. show: true,
  451. },
  452. emphasis: {
  453. show: false,
  454. textStyle: {
  455. color: '#fff',
  456. },
  457. },
  458. },
  459. roam: true,
  460. itemStyle: {
  461. normal: {
  462. areaColor: '#031525',
  463. borderColor: '#3B5077',
  464. },
  465. emphasis: {
  466. areaColor: '#2B91B7',
  467. },
  468. },
  469. animation: false,
  470. data: data,
  471. },
  472. {
  473. name: '点',
  474. type: 'scatter',
  475. coordinateSystem: 'geo',
  476. zlevel: 6,
  477. },
  478. {
  479. name: 'Top 5',
  480. type: 'effectScatter',
  481. coordinateSystem: 'geo',
  482. data: this.convertData(
  483. data
  484. .sort(function (a, b) {
  485. return b.value - a.value
  486. })
  487. .slice(0, 5)
  488. ),
  489. symbolSize: function (val) {
  490. return 15
  491. },
  492. showEffectOn: 'render',
  493. rippleEffect: {
  494. brushType: 'stroke',
  495. },
  496. hoverAnimation: true,
  497. label: {
  498. normal: {
  499. formatter: '{b}',
  500. position: 'left',
  501. show: false,
  502. },
  503. },
  504. itemStyle: {
  505. normal: {
  506. color: 'yellow',
  507. shadowBlur: 10,
  508. shadowColor: 'yellow',
  509. },
  510. },
  511. zlevel: 1000,
  512. },
  513. {
  514. name: '线路',
  515. type: 'lines',
  516. zlevel: 2,
  517. effect: {
  518. show: true,
  519. period: 4, //箭头指向速度,值越小速度越快
  520. trailLength: 0.02, //特效尾迹长度[0,1]值越大,尾迹越长重
  521. symbol: 'arrow', //箭头图标
  522. symbolSize: 5, //图标大小
  523. },
  524. lineStyle: {
  525. normal: {
  526. color: '#00FFFF',
  527. width: 1,
  528. type: 'dashed',
  529. opacity: 0.5, //尾迹线条透明度
  530. curveness: -0.3, //尾迹线条曲直度
  531. },
  532. },
  533. data: moveLine.normal,
  534. },
  535. ],
  536. }
  537. myChart.on('click', function(params) {
  538. console.log(params)
  539. window.open('https://www.baidu.com')
  540. })
  541. myChart.setOption(option)
  542. },
  543. initChartTip(){
  544. let myChart = echarts.init(this.$refs['echartTip'])
  545. let option = {
  546. tooltip: {
  547. trigger: 'item',
  548. },
  549. color: ['#6682f5', '#69c0ff', '#43ede3','#8ba2ff'],
  550. legend: {
  551. top: '0',
  552. orient: 'vertical',
  553. left: '2%',
  554. textStyle: {
  555. color: '#9DB9EB',
  556. },
  557. },
  558. series: [
  559. {
  560. name: '',
  561. type: 'pie',
  562. center: ['45%','40%'],
  563. radius: ['35%', '50%'],
  564. labelLine: {
  565. normal: {
  566. lineStyle: {
  567. width: 1,
  568. },
  569. },
  570. },
  571. data: statusList,
  572. },
  573. ],
  574. }
  575. myChart.setOption(option)
  576. tools.loopShowTooltip(myChart, option, {
  577. nterval: 2000,
  578. loopSeries: true,
  579. })
  580. myChart.on('click', function(param) {
  581. console.log(param)
  582. window.open('https://www.baidu.com')
  583. })
  584. },
  585. initChartTip2(){
  586. let myChart = echarts.init(this.$refs['echartTip2'])
  587. let option = {
  588. tooltip: {
  589. trigger: 'axis',
  590. axisPointer: {
  591. type: 'cross',
  592. },
  593. },
  594. dataZoom:[
  595. {
  596. // start: 9,//默认为@
  597. // end: 100,//黑认认为1@0
  598. type: "slider",
  599. show: true,
  600. // xAxisIndex: [0]
  601. handlesize: 0,//滑动条的 左右2个滑动条的大小
  602. startValue: 9,// 初始显示值
  603. endValue: 6,// 结束显示值
  604. height: 10,//组件高度
  605. left:"5%",
  606. right: "4%",//右边的距离
  607. bottom: "25%",//底边的距离
  608. borderColor:"#939",
  609. fillerColor:"#269cdb",
  610. borderRadius: 5,
  611. backgroundColor: "#33384b",//两边未选中的滑动条区域的额色
  612. showDataShadow: false,//是否显示数据阴影
  613. showDetail: false,//即拖拽时候是否显示详细数值信息
  614. truerealtime: true,//是否实时更新
  615. filterMode: "filter"
  616. },{
  617. type:'inside',
  618. show: true,
  619. start: 1,
  620. end: 100
  621. }
  622. ],
  623. grid: {
  624. top: '16%',
  625. right: '3%',
  626. left: '10%',
  627. bottom: '38%',
  628. },
  629. legend: {
  630. top: '1',
  631. right: '10',
  632. textStyle: {
  633. color: 'rgba(250,250,250,0.6)',
  634. },
  635. },
  636. xAxis: {
  637. data: executeList.map(item=>item.name),
  638. axisLine: {
  639. show: true, //隐藏X轴轴线
  640. lineStyle: {
  641. color: '#005094',
  642. width: 1,
  643. },
  644. },
  645. axisTick: {
  646. show: false, //隐藏X轴刻度
  647. },
  648. axisLabel: {
  649. show: true,
  650. rotate: 40,
  651. textStyle: {
  652. color: 'rgba(255,255,255,0.6)', //X轴文字颜色
  653. },
  654. },
  655. },
  656. yAxis: [
  657. {
  658. type: 'value',
  659. nameTextStyle: {
  660. color: '#ebf8ac',
  661. },
  662. splitLine: {
  663. show: true,
  664. lineStyle: {
  665. color: '#68b4dd66',
  666. type: 'dashed',
  667. },
  668. },
  669. axisLine: {
  670. show: true,
  671. lineStyle: {
  672. color: '#3D7495',
  673. },
  674. },
  675. axisLabel: {
  676. show: true,
  677. textStyle: {
  678. color: 'rgba(250,250,250,0.6)',
  679. },
  680. },
  681. },
  682. ],
  683. series: [
  684. {
  685. name: '计划投资',
  686. type: 'bar',
  687. barWidth: 10,
  688. itemStyle: {
  689. normal: {
  690. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  691. {
  692. offset: 0,
  693. color: '#69c0ff',
  694. },
  695. {
  696. offset: 1,
  697. color: '#082550',
  698. },
  699. ]),
  700. },
  701. },
  702. data: executeList.map(item=>item.value),
  703. },
  704. {
  705. name: '实际投资',
  706. type: 'bar',
  707. barWidth: 10,
  708. itemStyle: {
  709. normal: {
  710. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  711. {
  712. offset: 0,
  713. color: '#957DFF',
  714. },
  715. {
  716. offset: 1,
  717. color: '#082550',
  718. },
  719. ]),
  720. },
  721. },
  722. data: executeList.map(item=>item.value2),
  723. },
  724. ],
  725. }
  726. myChart.setOption(option)
  727. tools.loopShowTooltip(myChart, option, {
  728. nterval: 2000,
  729. loopSeries: true,
  730. })
  731. },
  732. initChartL1 () {
  733. let myChart = echarts.init(this.$refs['echartL1'])
  734. let option = {
  735. tooltip: {
  736. trigger: 'item',
  737. },
  738. color: ['#6682f5', '#69c0ff', '#43ede3','#8ba2ff'],
  739. legend: {
  740. top: 'center',
  741. orient: 'vertical',
  742. right: '2%',
  743. textStyle: {
  744. color: '#9DB9EB',
  745. },
  746. },
  747. series: [
  748. {
  749. name: '',
  750. type: 'pie',
  751. radius: ['55%', '80%'],
  752. labelLine: {
  753. normal: {
  754. lineStyle: {
  755. width: 1,
  756. },
  757. },
  758. },
  759. data: statusList,
  760. },
  761. ],
  762. }
  763. myChart.setOption(option)
  764. tools.loopShowTooltip(myChart, option, {
  765. nterval: 2000,
  766. loopSeries: true,
  767. })
  768. },
  769. initChartL2 () {
  770. let myChart = echarts.init(this.$refs['echartL2'])
  771. let option = {
  772. tooltip: {
  773. trigger: 'axis',
  774. axisPointer: {
  775. type: 'cross',
  776. },
  777. },
  778. grid: {
  779. top: '16%',
  780. right: '3%',
  781. left: '10%',
  782. bottom: '23%',
  783. },
  784. legend: {
  785. top: '1',
  786. right: '10',
  787. textStyle: {
  788. color: 'rgba(250,250,250,0.6)',
  789. },
  790. },
  791. xAxis: {
  792. data: executeList.map(item=>item.name),
  793. axisLine: {
  794. show: true, //隐藏X轴轴线
  795. lineStyle: {
  796. color: '#005094',
  797. width: 1,
  798. },
  799. },
  800. axisTick: {
  801. show: false, //隐藏X轴刻度
  802. },
  803. axisLabel: {
  804. show: true,
  805. rotate: 40,
  806. textStyle: {
  807. color: 'rgba(255,255,255,0.6)', //X轴文字颜色
  808. },
  809. },
  810. },
  811. yAxis: [
  812. {
  813. type: 'value',
  814. nameTextStyle: {
  815. color: '#ebf8ac',
  816. },
  817. splitLine: {
  818. show: true,
  819. lineStyle: {
  820. color: '#68b4dd66',
  821. type: 'dashed',
  822. },
  823. },
  824. axisLine: {
  825. show: true,
  826. lineStyle: {
  827. color: '#3D7495',
  828. },
  829. },
  830. axisLabel: {
  831. show: true,
  832. textStyle: {
  833. color: 'rgba(250,250,250,0.6)',
  834. },
  835. },
  836. },
  837. ],
  838. series: [
  839. {
  840. name: '计划投资',
  841. type: 'bar',
  842. barWidth: 10,
  843. itemStyle: {
  844. normal: {
  845. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  846. {
  847. offset: 0,
  848. color: '#69c0ff',
  849. },
  850. {
  851. offset: 1,
  852. color: '#082550',
  853. },
  854. ]),
  855. },
  856. },
  857. data: executeList.map(item=>item.value),
  858. },
  859. {
  860. name: '实际投资',
  861. type: 'bar',
  862. barWidth: 10,
  863. itemStyle: {
  864. normal: {
  865. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  866. {
  867. offset: 0,
  868. color: '#957DFF',
  869. },
  870. {
  871. offset: 1,
  872. color: '#082550',
  873. },
  874. ]),
  875. },
  876. },
  877. data: executeList.map(item=>item.value2),
  878. },
  879. ],
  880. }
  881. myChart.setOption(option)
  882. tools.loopShowTooltip(myChart, option, {
  883. nterval: 2000,
  884. loopSeries: true,
  885. })
  886. },
  887. initChartR1 () {
  888. let myChart = echarts.init(this.$refs['echartR1'])
  889. let option = {
  890. tooltip: {
  891. trigger: 'axis',
  892. formatter: '{a0}:{c0}' + '亿元' + '<br/>' + '{a1}:{c1}' + '%',
  893. axisPointer: {
  894. type: 'cross',
  895. },
  896. },
  897. grid: {
  898. top: '16%',
  899. right: '10%',
  900. left: '10%',
  901. bottom: '10%',
  902. },
  903. legend: {
  904. top: '1',
  905. textStyle: {
  906. color: 'rgba(250,250,250,0.6)',
  907. },
  908. },
  909. xAxis: {
  910. data: industryList.map(item=> item.name),
  911. axisLine: {
  912. show: true, //隐藏X轴轴线
  913. lineStyle: {
  914. color: '#005094',
  915. width: 1,
  916. },
  917. },
  918. axisTick: {
  919. show: false, //隐藏X轴刻度
  920. },
  921. axisLabel: {
  922. show: true,
  923. // rotate: 20,
  924. textStyle: {
  925. color: 'rgba(255,255,255,0.6)', //X轴文字颜色
  926. },
  927. },
  928. },
  929. yAxis: [
  930. {
  931. type: 'value',
  932. name: '亿元',
  933. nameTextStyle: {
  934. color: 'rgba(255,255,255,0.6)',
  935. },
  936. splitLine: {
  937. show: true,
  938. lineStyle: {
  939. color: '#68b4dd66',
  940. type: 'dashed',
  941. },
  942. },
  943. axisLine: {
  944. show: true,
  945. lineStyle: {
  946. color: '#3D7495',
  947. },
  948. },
  949. axisLabel: {
  950. show: true,
  951. textStyle: {
  952. color: 'rgba(250,250,250,0.6)',
  953. },
  954. },
  955. },
  956. {
  957. type: 'value',
  958. axisLine: {
  959. show: false,
  960. },
  961. splitLine: {
  962. show: false,
  963. },
  964. axisLabel: {
  965. show: true,
  966. formatter: '{value} %',
  967. textStyle: {
  968. color: 'rgba(250,250,250,0.6)',
  969. },
  970. },
  971. },
  972. ],
  973. series: [
  974. {
  975. type: 'bar',
  976. name: '投资金额',
  977. barWidth: 15,
  978. itemStyle: {
  979. normal: {
  980. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  981. {
  982. offset: 0,
  983. color: '#69c0ff',
  984. },
  985. {
  986. offset: 1,
  987. color: '#082550',
  988. },
  989. ]),
  990. },
  991. },
  992. data: industryList.map(item=> item.value),
  993. },
  994. {
  995. type: 'line',
  996. name: '投资占比',
  997. type: 'line',
  998. yAxisIndex: 1,
  999. smooth: true, //平滑曲线显示
  1000. showAllSymbol: true, //显示所有图形。
  1001. symbol: 'circle', //标记的图形为实心圆
  1002. symbolSize: 4, //标记的大小
  1003. smooth: false,
  1004. itemStyle: {
  1005. //折线拐点标志的样式
  1006. color: '#fbe138',
  1007. borderColor: '#fbe138',
  1008. width: 1,
  1009. shadowColor: '#fbe138',
  1010. shadowBlur: 2,
  1011. },
  1012. lineStyle: {
  1013. color: '#fbe138',
  1014. width: 1,
  1015. },
  1016. data: industryList.map(item=> item.value2),
  1017. },
  1018. ],
  1019. }
  1020. myChart.setOption(option)
  1021. tools.loopShowTooltip(myChart, option, {
  1022. nterval: 2000,
  1023. loopSeries: true,
  1024. })
  1025. myChart.on('click', function(param) {
  1026. console.log(param)
  1027. window.open('https://www.baidu.com')
  1028. })
  1029. },
  1030. initProjectList() {
  1031. let dataList = []
  1032. projectList.map(item=> {
  1033. dataList.push([item.name,item.value+'亿',item.status])
  1034. })
  1035. this.storageRecordConfig = {
  1036. header: ['项目名称', '投资金额', '项目进度'],
  1037. headerBGC: '#05507b33',
  1038. oddRowBGC: '#05507b33',
  1039. evenRowBGC: '',
  1040. headerHeight: '40',
  1041. rowNum: 5,
  1042. columnWidth: [350,100],
  1043. align: ['center', 'center', 'center'],
  1044. data: dataList,
  1045. }
  1046. }
  1047. },
  1048. })