investHome.js 41 KB

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