investHome.js 30 KB

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