investHomeGroup.js 115 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689
  1. let app = new Vue({
  2. el: '#app',
  3. data () {
  4. return {
  5. time: '',
  6. timer: '',
  7. totleLimit: '1363.88',
  8. showTip2: false,
  9. showTip3: false,
  10. list: '',
  11. count: 0,
  12. countType: 0,
  13. mapName: 'shanxi',
  14. geoCoordMap: {},
  15. storageRecordConfig2:[],
  16. storageRecordConfig: {
  17. // waitTime: '30000',
  18. hoverPause: false,
  19. header: ['企业集团', '项目名 ', '投资总额'],
  20. // headerBGC: '#05507b33',
  21. // oddRowBGC: '#05507b33',
  22. // evenRowBGC: '#05507b33',
  23. headerHeight: 50,
  24. headerBGC: '#05507b33',
  25. oddRowBGC: '#05507b33',
  26. rowNum: 6,
  27. // columnWidth: [100, 550,100],
  28. align: ['center', 'center', 'center'],
  29. data: [
  30. ['国际能源', '娄烦县120MW智慧光伏发电项目+10%储能', "6.78亿元"],
  31. ['国际能源', '平朔矿区150MW农光储氢一体化项目', "7.84亿元"],
  32. ['汾酒集团', '汾酒2030技改原酒产储能扩建项目(一期)', "91.02亿元"],
  33. ['大地控股', '山西大地控股忻州新店矿业有限公司投资建设年产800万吨精品砂石骨料项目', "8.67亿元"],
  34. ['潞安化工', '分布式光伏发电项目', "2.01亿元"],
  35. ['太重集团', '设立太重(大同)新能源产业投资公司', "0.30亿元"],
  36. ['大地控股', '山西大地宏翔环保科技有限公司电厂固废资源化综合利用建设项目', "3.60亿元"],
  37. ['大地控股', '山西大地海科环保科技有限公司电厂固废资源化综合利用建设项目', "3.11亿元"],
  38. ['汾酒集团', '保健酒园区新增原酒产能项目', "4.98亿元"],
  39. ['汾酒集团', '白玉酒厂改扩建项目', "4.96亿元"],
  40. ['华阳新材', '5GW高效光伏组件制造项目', "4.82亿元"],
  41. ['华新燃气', '吉县—延长输气管道项目(一期工程)', "3.54亿元"],
  42. ['太重集团', '建设液压挖掘机配套油缸项目', "2.60亿元"],
  43. ['华远陆港', '物产集团参股设立项目公司投资建设山西物产万科(太原)综合物流产业园项目', "6.60亿元"],
  44. ['太重集团', '设立昔阳县晶能新能源有限公司', "0.50亿元"],
  45. ['山西建投', '设立山西低碳环保产业集团有限公司', "30.00亿元"],
  46. ['山西建投', '设立山西省太忻经济一体化发展投资集团有限公司', "30.00亿元"],
  47. ['华新燃气', '设立山西华新液化天然气集团有限公司', "3.00亿元"],
  48. ['交控集团', '设立山西交控新能源发展有限公司', "3.00亿元"]
  49. ],
  50. },
  51. }
  52. },
  53. created () {
  54. this.time = formatDate()
  55. this.timer = setInterval(() => {
  56. this.time = formatDate()
  57. }, 1000)
  58. },
  59. beforeDestroy () {
  60. if (this.timer) {
  61. clearInterval(this.timer);
  62. }
  63. },
  64. mounted () {
  65. setTimeout(() => {
  66. this.initChartL1()
  67. this.initChartL2()
  68. this.initChartL3()
  69. this.initChartL4()
  70. this.initChartL5()
  71. this.initChartL6()
  72. this.initChartL7()
  73. this.initChartL8()
  74. this.initChartL9()
  75. this.initChartL10()
  76. this.initChartL11()
  77. this.changeTopColor()
  78. // 大屏二
  79. this.initChartC1()
  80. this.initChartC2()
  81. this.initChartC3()
  82. this.initChartC4()
  83. this.initChinaChart()
  84. this.initProjectList()
  85. })
  86. },
  87. methods: {
  88. numFormat (value) {
  89. if (!value) return '0'
  90. // var intPart = Number(value).toFixed(0) // 获取整数部分
  91. var intPart = parseInt(value)// 获取整数部分
  92. var intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') // 将整数部分逢三一断
  93. var floatPart = '.00' // 预定义小数部分
  94. var value2Array = value.toString().split('.')
  95. // =2表示数据有小数位
  96. if (value2Array.length === 2) {
  97. floatPart = value2Array[1].toString() // 拿到小数部分
  98. if (floatPart.length === 1) {
  99. // 补0
  100. return intPartFormat + '.' + floatPart + '0'
  101. } else {
  102. return intPartFormat + '.' + floatPart
  103. }
  104. } else {
  105. return intPartFormat
  106. }
  107. },
  108. changeTopColor () {
  109. this.list = document.getElementsByClassName('row-item')
  110. for (var i = 0; i < this.list.length; i++) {
  111. if (i == 1) {
  112. this.list[i].classList.add('light')
  113. } else {
  114. this.list[i].classList.remove('light')
  115. }
  116. }
  117. this.initChartL9()
  118. },
  119. scrollChange (index) {
  120. if (index == 18) {
  121. this.count = -1
  122. } else {
  123. this.count = index
  124. }
  125. if (this.count > 12 && this.count != 18) {
  126. this.countType = 1
  127. } else {
  128. this.countType = 0
  129. }
  130. this.list = document.getElementsByClassName('row-item')
  131. for (var i = 0; i < this.list.length; i++) {
  132. if (i == 2) {
  133. this.list[i].classList.add('light')
  134. } else {
  135. this.list[i].classList.remove('light')
  136. }
  137. }
  138. this.initChartL9()
  139. },
  140. initChartL1 () {
  141. let myChart = echarts.init(this.$refs['echartL1'])
  142. var value = 0.1463;
  143. var data = [value];
  144. let option = {
  145. backgroundColor: 'transparent',
  146. title: [
  147. {
  148. // text: '总额度285.48亿',
  149. // formatter: `<span>总额度</span>285.48亿`,
  150. x: '37%',
  151. y: '80%',
  152. textStyle: {
  153. fontSize: 24,
  154. fontWeight: 'bold',
  155. color: '#2CB7E0',
  156. lineHeight: 16,
  157. textAlign: 'center',
  158. },
  159. }
  160. ],
  161. series: [
  162. {
  163. type: 'liquidFill',
  164. radius: '70%',
  165. center: ['50%', '40%'],
  166. color: [
  167. {
  168. type: 'linear',
  169. x: 0,
  170. y: 0,
  171. x2: 0,
  172. y2: 1,
  173. colorStops: [
  174. {
  175. offset: 0,
  176. color: '#446bf5',
  177. },
  178. {
  179. offset: 1,
  180. color: '#2ca3e2',
  181. },
  182. ],
  183. globalCoord: false,
  184. },
  185. ],
  186. data: [value, value], // data个数代表波浪数
  187. backgroundStyle: {
  188. borderWidth: 1,
  189. color: 'RGBA(51, 66, 127, 0.7)',
  190. },
  191. label: {
  192. normal: {
  193. formatter: function (data) {
  194. return (data.value * 100).toFixed(2) + '%'
  195. },
  196. textStyle: {
  197. fontSize: 30,
  198. color: '#fff',
  199. },
  200. },
  201. },
  202. outline: {
  203. // show: false
  204. borderDistance: 0,
  205. itemStyle: {
  206. borderWidth: 2,
  207. borderColor: 'transparent',
  208. },
  209. },
  210. },
  211. ],
  212. }
  213. myChart.setOption(option)
  214. },
  215. initChartL2 () {
  216. var chartData = [
  217. {
  218. name: '辅业',
  219. y: 76.38,
  220. num: 84,
  221. sliced: false,
  222. selected: false,
  223. },
  224. {
  225. name: '主业',
  226. y: 1287.50,
  227. num: 713,
  228. sliced: false,
  229. selected: false,
  230. }
  231. ]
  232. var timer = null;
  233. var i = 0;
  234. let that = this
  235. var option = {
  236. colors: ['#5783ab', '#1a5389', '#a79c57', '#cc8c29', '#91a65f', '#383062', '#034a39'],
  237. chart: {
  238. type: 'pie',
  239. backgroundColor: 'rgba(0,0,0,0)',
  240. options3d: {
  241. enabled: true,
  242. alpha: 45,
  243. //beta: 0
  244. },
  245. events: {
  246. // load,图表加载完成时触发
  247. load: function () {
  248. var chart = this;
  249. var points = chart.series[0].points;
  250. var len = points.length;
  251. timer && clearInterval(timer);
  252. timer = setInterval(function () {
  253. autoTooltip(points[i]);
  254. chartData.forEach((item, index) => {
  255. item.sliced = false
  256. item.selected = false
  257. if (index == i) {
  258. item.sliced = true
  259. item.selected = true
  260. }
  261. })
  262. chart.update({
  263. series: [{
  264. type: 'pie',
  265. name: '占比',
  266. point: {
  267. events: {
  268. click: function (e) {
  269. that.showTip3 = true
  270. that.echartTitle = '主辅业计划占比'
  271. setTimeout(() => {
  272. // that.initChartT1(chartData)
  273. })
  274. }
  275. }
  276. },
  277. data: chartData
  278. }]
  279. })
  280. i++;
  281. if (i === len) {
  282. i = 0;
  283. chartData.forEach((item, index) => {
  284. item.sliced = false
  285. item.selected = false
  286. })
  287. chart.update({
  288. series: [{
  289. type: 'pie',
  290. name: '占比',
  291. point: {
  292. events: {
  293. click: function (e) {
  294. console.log(e)
  295. }
  296. }
  297. },
  298. data: chartData
  299. }]
  300. })
  301. }
  302. }, 2000);
  303. },
  304. legendItemClick: function (event) {
  305. console.log(event);
  306. return true;
  307. }
  308. }
  309. },
  310. credits: {
  311. enabled: false //去掉hightchats水印
  312. },
  313. legend: {
  314. // labelFormatter: function() {
  315. // return 123;
  316. // },
  317. align: 'right',//横向位置
  318. verticalAlign: 'middle', // 纵向位置
  319. layout: "vertical",//横排还是竖排
  320. x: -30,
  321. y: 50,
  322. symbolWidth: 50,
  323. itemStyle: {
  324. fontSize: '20px',
  325. color: '#fff',
  326. x: 20
  327. },
  328. },
  329. title: {
  330. text: '主辅业计划占比',
  331. style: {
  332. color: '#fff',
  333. fontSize: 22,
  334. },
  335. align: 'center',
  336. verticalAlign: "bottom",
  337. x: -80
  338. },
  339. tooltip: {
  340. crosshairs: false,
  341. backgroundColor: 'rgba(0,0,0,0.5)',
  342. // positioner: function(e){
  343. // console.log(e, this)
  344. // },
  345. useHTML: false, //开启html模式
  346. style: {
  347. color: '#fff',
  348. },
  349. formatter: function (e) {
  350. let num = chartData[this.colorIndex].num
  351. this.percentage = this.percentage.toFixed(2) //Math.round(this.percentage)
  352. return `${this.key}:<b>${this.percentage}%</b><br/><b>${this.y}</b>亿,<b>${num}个</b>`
  353. },
  354. //pointFormat:
  355. },
  356. plotOptions: {
  357. pie: {
  358. allowPointSelect: true,
  359. showInLegend: true, // 图例
  360. cursor: 'pointer',
  361. size: 220,
  362. innerSize: 150, //环形图中间空白,0为饼图
  363. depth: 25, //立体高度
  364. slicedOffset: 21, //动画距离
  365. dataLabels: {
  366. enabled: false, // 是否展示指示线
  367. format: '{point.name}: {point.percentage}'
  368. }
  369. },
  370. },
  371. series: [{
  372. type: 'pie',
  373. name: '占比',
  374. // center: ['70%', '50%'],
  375. point: {
  376. events: {
  377. click: function (e) { //点击事件
  378. that.showTip3 = true
  379. that.echartTitle = '主辅业计划占比'
  380. setTimeout(() => {
  381. // that.initChartT1(chartData)
  382. })
  383. },
  384. mouseOver: function (e) { //鼠标移入停止轮播并且找到移入的当前数据设为选中
  385. //console.log(e)
  386. chartData.forEach((item, index) => {
  387. item.sliced = false
  388. item.selected = false
  389. })
  390. chartData[e.target.index].sliced = true
  391. chartData[e.target.index].selected = true
  392. chart.update({
  393. series: [{
  394. type: 'pie',
  395. name: '占比',
  396. point: {
  397. events: {
  398. click: function (e) {
  399. that.showTip3 = true
  400. that.echartTitle = '主辅业计划占比'
  401. setTimeout(() => {
  402. // that.initChartT1(chartData)
  403. })
  404. }
  405. }
  406. },
  407. data: chartData
  408. }]
  409. })
  410. timer && clearInterval(timer);
  411. },
  412. mouseOut: function () { // 鼠标移出后需要继续执行轮播
  413. var points = chart.series[0].points;
  414. var len = points.length;
  415. timer && clearInterval(timer);
  416. timer = setInterval(function () {
  417. autoTooltip(points[i]);
  418. chartData.forEach((item, index) => {
  419. item.sliced = false
  420. item.selected = false
  421. if (index == i) {
  422. item.sliced = true
  423. item.selected = true
  424. }
  425. })
  426. chart.update({
  427. series: [{
  428. type: 'pie',
  429. name: '占比',
  430. point: {
  431. events: {
  432. click: function (e) {
  433. that.showTip3 = true
  434. that.echartTitle = '主辅业计划占比'
  435. setTimeout(() => {
  436. // that.initChartT1(chartData)
  437. })
  438. }
  439. }
  440. },
  441. data: chartData
  442. }]
  443. })
  444. i++;
  445. if (i === len) {
  446. i = 0;
  447. chartData.forEach((item, index) => {
  448. item.sliced = false
  449. item.selected = false
  450. })
  451. chart.update({
  452. series: [{
  453. type: 'pie',
  454. name: '占比',
  455. point: {
  456. events: {
  457. click: function (e) {
  458. that.showTip3 = true
  459. that.echartTitle = '主辅业计划占比'
  460. setTimeout(() => {
  461. // that.initChartT1(chartData)
  462. })
  463. }
  464. }
  465. },
  466. data: chartData
  467. }]
  468. })
  469. }
  470. }, 2000);
  471. }
  472. }
  473. },
  474. data: chartData
  475. }]
  476. }
  477. var chart = Highcharts.chart('echartL2', option);
  478. function autoTooltip (point) {
  479. chart.tooltip.refresh(point);
  480. }
  481. },
  482. initChartL3 () {
  483. var chartData = [
  484. {
  485. name: '特别监管类',
  486. y: 635.84,
  487. num: 168,
  488. sliced: false,
  489. selected: false,
  490. },
  491. {
  492. name: '备案类',
  493. y: 728.04,
  494. num: 465,
  495. sliced: false,
  496. selected: false,
  497. }
  498. ]
  499. var timer = null;
  500. var i = 0;
  501. let that = this
  502. var chart = Highcharts.chart('echartL3', {
  503. colors: ['#5783ab', '#1a5389', '#a79c57', '#cc8c29', '#91a65f', '#383062', '#034a39'],
  504. chart: {
  505. type: 'pie',
  506. backgroundColor: 'rgba(0,0,0,0)',
  507. options3d: {
  508. enabled: true,
  509. alpha: 45,
  510. //beta: 0
  511. },
  512. events: {
  513. // load,图表加载完成时触发
  514. load: function () {
  515. var chart = this;
  516. var points = chart.series[0].points;
  517. var len = points.length;
  518. timer && clearInterval(timer);
  519. timer = setInterval(function () {
  520. autoTooltip(points[i]);
  521. chartData.forEach((item, index) => {
  522. item.sliced = false
  523. item.selected = false
  524. if (index == i) {
  525. item.sliced = true
  526. item.selected = true
  527. }
  528. })
  529. chart.update({
  530. series: [{
  531. type: 'pie',
  532. name: '占比',
  533. point: {
  534. events: {
  535. click: function (e) {
  536. that.showTip3 = true
  537. that.echartTitle = '项目管理类型'
  538. setTimeout(() => {
  539. that.initChartT1(chartData)
  540. })
  541. }
  542. }
  543. },
  544. data: chartData
  545. }]
  546. })
  547. i++;
  548. if (i === len) {
  549. i = 0;
  550. chartData.forEach((item, index) => {
  551. item.sliced = false
  552. item.selected = false
  553. })
  554. chart.update({
  555. series: [{
  556. type: 'pie',
  557. name: '占比',
  558. point: {
  559. events: {
  560. click: function (e) {
  561. console.log(e)
  562. }
  563. }
  564. },
  565. data: chartData
  566. }]
  567. })
  568. }
  569. }, 2000);
  570. },
  571. legendItemClick: function (event) {
  572. //console.log(event);
  573. that.showTip3 = true
  574. that.echartTitle = '项目管理类型'
  575. setTimeout(() => {
  576. that.initChartT1(chartData)
  577. })
  578. return true;
  579. }
  580. }
  581. },
  582. credits: {
  583. enabled: false //去掉hightchats水印
  584. },
  585. legend: {
  586. // labelFormatter: function() {
  587. // return 123;
  588. // },
  589. align: 'right',//横向位置
  590. verticalAlign: 'middle', // 纵向位置
  591. layout: "vertical",//横排还是竖排
  592. x: -30,
  593. y: 50,
  594. symbolWidth: 50,
  595. itemDistance: 50,
  596. itemStyle: {
  597. fontSize: '20px',
  598. color: '#fff',
  599. x: 20
  600. },
  601. },
  602. title: {
  603. text: '项目管理类型',
  604. style: {
  605. color: '#fff',
  606. fontSize: 22,
  607. },
  608. align: 'center',
  609. verticalAlign: "bottom",
  610. x: -120
  611. },
  612. tooltip: {
  613. crosshairs: true,
  614. backgroundColor: 'rgba(0,0,0,0.5)',
  615. // positioner: function(e){
  616. // console.log(e, this)
  617. // },
  618. useHTML: false, //开启html模式
  619. style: {
  620. color: '#fff',
  621. },
  622. formatter: function (e) {
  623. //console.log(this)
  624. let num = chartData[this.colorIndex].num
  625. this.percentage = this.percentage.toFixed(2) //Math.round(this.percentage)
  626. return `${this.key}:<b>${this.percentage}%</b><br/><b>${this.y}</b>亿,<b>${num}个</b>`
  627. },
  628. //pointFormat:
  629. },
  630. plotOptions: {
  631. pie: {
  632. allowPointSelect: true,
  633. showInLegend: true, // 图例
  634. cursor: 'pointer',
  635. size: 220,
  636. innerSize: 150, //环形图中间空白,0为饼图
  637. depth: 25, //立体高度
  638. slicedOffset: 21, //动画距离
  639. dataLabels: {
  640. enabled: false, // 是否展示指示线
  641. format: '{point.name}: {point.percentage}'
  642. }
  643. },
  644. },
  645. series: [{
  646. type: 'pie',
  647. name: '占比',
  648. // center: ['70%', '50%'],
  649. point: {
  650. events: {
  651. click: function (e) { //点击事件
  652. that.showTip3 = true
  653. that.echartTitle = '项目管理类型'
  654. setTimeout(() => {
  655. that.initChartT1(chartData)
  656. })
  657. },
  658. mouseOver: function (e) { //鼠标移入停止轮播并且找到移入的当前数据设为选中
  659. //console.log(e)
  660. chartData.forEach((item, index) => {
  661. item.sliced = false
  662. item.selected = false
  663. })
  664. chartData[e.target.index].sliced = true
  665. chartData[e.target.index].selected = true
  666. chart.update({
  667. series: [{
  668. type: 'pie',
  669. name: '占比',
  670. point: {
  671. events: {
  672. click: function (e) {
  673. that.showTip3 = true
  674. that.echartTitle = '项目管理类型'
  675. setTimeout(() => {
  676. that.initChartT1(chartData)
  677. })
  678. }
  679. }
  680. },
  681. data: chartData
  682. }]
  683. })
  684. timer && clearInterval(timer);
  685. },
  686. mouseOut: function () { // 鼠标移出后需要继续执行轮播
  687. var points = chart.series[0].points;
  688. var len = points.length;
  689. timer && clearInterval(timer);
  690. timer = setInterval(function () {
  691. autoTooltip(points[i]);
  692. chartData.forEach((item, index) => {
  693. item.sliced = false
  694. item.selected = false
  695. if (index == i) {
  696. item.sliced = true
  697. item.selected = true
  698. }
  699. })
  700. chart.update({
  701. series: [{
  702. type: 'pie',
  703. name: '占比',
  704. point: {
  705. events: {
  706. click: function (e) {
  707. that.showTip3 = true
  708. that.echartTitle = '项目管理类型'
  709. setTimeout(() => {
  710. that.initChartT1(chartData)
  711. })
  712. }
  713. }
  714. },
  715. data: chartData
  716. }]
  717. })
  718. i++;
  719. if (i === len) {
  720. i = 0;
  721. chartData.forEach((item, index) => {
  722. item.sliced = false
  723. item.selected = false
  724. })
  725. chart.update({
  726. series: [{
  727. type: 'pie',
  728. name: '占比',
  729. point: {
  730. events: {
  731. click: function (e) {
  732. console.log(e)
  733. }
  734. }
  735. },
  736. data: chartData
  737. }]
  738. })
  739. }
  740. }, 2000);
  741. }
  742. }
  743. },
  744. data: chartData
  745. }]
  746. });
  747. function autoTooltip (point) {
  748. chart.tooltip.refresh(point);
  749. }
  750. },
  751. initChartL4 () {
  752. let myChart = echarts.init(document.getElementById("echartL4"));
  753. let option = {
  754. grid: {
  755. top: 35,
  756. right: 0,
  757. left: 60,
  758. bottom: 50,
  759. },
  760. tooltip: {
  761. show: true,
  762. trigger: "axis",
  763. axisPointer: {
  764. // 坐标轴指示器,坐标轴触发有效
  765. type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
  766. },
  767. },
  768. xAxis: {
  769. data: ["山西焦煤", "晋能控股", "华阳新材", "潞安化工", "华新燃气", "太重集团", "国际能源", "华远陆港", "水控集团", "文旅集团", "交控集团", '航产集团', '山西建投', '汾酒集团', '大地控股', '云时代', '华舰体育', '神农科技'],
  770. axisTick: {
  771. show: false,
  772. },
  773. // x轴的字体颜色
  774. axisLabel: {
  775. rotate: 40,
  776. textStyle: {
  777. color: "white",
  778. },
  779. },
  780. //y轴线的颜色以及宽度
  781. axisLine: {
  782. show: true,
  783. lineStyle: {
  784. color: "#1E5389",
  785. width: 1,
  786. type: "solid",
  787. },
  788. },
  789. },
  790. yAxis: {
  791. name: '亿元',
  792. nameTextStyle: {//y轴上方单位的颜色
  793. color: '#fff',
  794. },
  795. axisTick: {
  796. lineStyle: {
  797. color: "#18416F",
  798. },
  799. },
  800. // y轴的字体颜色
  801. axisLabel: {
  802. textStyle: {
  803. color: "white",
  804. },
  805. },
  806. splitLine: {
  807. show: true,
  808. lineStyle: {
  809. color: "#204561",
  810. width: 1,
  811. type: "dotted",
  812. },
  813. },
  814. //y轴线的颜色以及宽度
  815. axisLine: {
  816. show: true,
  817. lineStyle: {
  818. color: "#1E5389",
  819. width: 1,
  820. type: "solid",
  821. },
  822. },
  823. },
  824. series: [
  825. // {
  826. // name: "2022年额度",
  827. // type: "bar",
  828. // data: [263.23, 402.18, 73.28, 144.80, 25.56, 8.23, 0, 12.97, 8.56, -1.72, 0, 0, 0, 76.90, 5.03, 9.14, 0, 0],
  829. // showBackground: false,
  830. // backgroundStyle: {
  831. // color: "#18416F",
  832. // },
  833. // barWidth: "10%",
  834. // itemStyle: {
  835. // barBorderRadius: [10, 10, 0, 0],
  836. // color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  837. // {
  838. // offset: 0,
  839. // color: '#082550',
  840. // },
  841. // {
  842. // offset: 1,
  843. // color: '#69c0ff',
  844. // },
  845. // ]),
  846. // },
  847. // },
  848. {
  849. name: "2023年额度",
  850. type: "bar",
  851. data: [359.91, 400.49, 117.65, 148.96, 34.84, 17.79, 26.15, 26.18, 16.83, 0.00, 43.49, 0.00, 43.39, 76.53, 5.05, 8.59, 0.00, 0.28],
  852. showBackground: false,
  853. backgroundStyle: {
  854. color: "#18416F",
  855. },
  856. barWidth: "30%",
  857. itemStyle: {
  858. // barBorderRadius: [10, 10, 0, 0],
  859. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  860. {
  861. offset: 0,
  862. color: '#082550',
  863. },
  864. {
  865. offset: 1,
  866. color: '#957DFF',
  867. },
  868. ]),
  869. },
  870. },
  871. ],
  872. legend: {
  873. // data: ["2022年额度", "2023年额度"],
  874. data: ["2023年额度"],
  875. textStyle: {
  876. // 图列内容样式
  877. color: "#fff", // 字体颜色
  878. // fontSize: "10",
  879. },
  880. right: 'center',
  881. y: 5,
  882. icon: "roundRect",
  883. // 小图标的宽高
  884. itemHeight: 5,
  885. },
  886. };
  887. tools.loopShowTooltip(myChart, option, {
  888. nterval: 2000,
  889. loopSeries: true,
  890. })
  891. let that = this
  892. myChart.on('click', function (param) {
  893. if (param.name == '晋能控股') {
  894. that.showTip2 = true
  895. setTimeout(() => {
  896. // that.initChartR4()
  897. // that.initChartR5()
  898. that.initChartL2b()
  899. })
  900. }
  901. })
  902. myChart.setOption(option);
  903. },
  904. initChartL5 () {
  905. var chartData = [
  906. {
  907. name: '煤炭',
  908. y: 294.61,
  909. num: 95,
  910. sliced: false,
  911. selected: false,
  912. },
  913. {
  914. name: '火电',
  915. y: 39.24,
  916. num: 1,
  917. sliced: false,
  918. selected: false,
  919. },
  920. {
  921. name: '冶金',
  922. y: 38.85,
  923. num: 6,
  924. sliced: false,
  925. selected: false,
  926. },
  927. {
  928. name: '焦化',
  929. y: 16.49,
  930. num: 4,
  931. sliced: false,
  932. selected: false,
  933. },
  934. {
  935. name: '其他传统产业',
  936. y: 14.19,
  937. num: 5,
  938. sliced: false,
  939. selected: false,
  940. }
  941. ]
  942. var timer = null;
  943. var i = 0;
  944. let that = this
  945. var option = {
  946. colors: ['#5783ab', '#1a5389', '#a79c57', '#cc8c29', '#91a65f', '#383062', '#034a39'],
  947. chart: {
  948. type: 'pie',
  949. backgroundColor: 'rgba(0,0,0,0)',
  950. options3d: {
  951. enabled: true,
  952. alpha: 45,
  953. //beta: 0
  954. },
  955. events: {
  956. // load,图表加载完成时触发
  957. load: function () {
  958. var chart = this;
  959. var points = chart.series[0].points;
  960. var len = points.length;
  961. timer && clearInterval(timer);
  962. timer = setInterval(function () {
  963. autoTooltip(points[i]);
  964. chartData.forEach((item, index) => {
  965. item.sliced = false
  966. item.selected = false
  967. if (index == i) {
  968. item.sliced = true
  969. item.selected = true
  970. }
  971. })
  972. chart.update({
  973. series: [{
  974. type: 'pie',
  975. name: '占比',
  976. point: {
  977. events: {
  978. click: function (e) {
  979. that.showTip3 = true
  980. that.echartTitle = '传统产业分析'
  981. setTimeout(() => {
  982. that.initChartT1(chartData)
  983. })
  984. }
  985. }
  986. },
  987. data: chartData
  988. }]
  989. })
  990. i++;
  991. if (i === len) {
  992. i = 0;
  993. }
  994. }, 2000);
  995. },
  996. legendItemClick: function (event) {
  997. console.log(event);
  998. return true;
  999. }
  1000. }
  1001. },
  1002. credits: {
  1003. enabled: false //去掉hightchats水印
  1004. },
  1005. legend: {
  1006. // labelFormatter: function() {
  1007. // return 123;
  1008. // },
  1009. align: 'right',//横向位置
  1010. verticalAlign: 'middle', // 纵向位置
  1011. layout: "vertical",//横排还是竖排
  1012. x: -30,
  1013. y: 50,
  1014. symbolWidth: 50,
  1015. itemDistance: 50,
  1016. itemStyle: {
  1017. fontSize: '20px',
  1018. color: '#fff',
  1019. x: 20
  1020. },
  1021. },
  1022. title: {
  1023. text: '传统产业分析',
  1024. style: {
  1025. color: '#fff',
  1026. fontSize: 22,
  1027. },
  1028. align: 'center',
  1029. verticalAlign: "bottom",
  1030. x: -120
  1031. },
  1032. tooltip: {
  1033. crosshairs: true,
  1034. backgroundColor: 'rgba(0,0,0,0.5)',
  1035. // positioner: function(e){
  1036. // console.log(e, this)
  1037. // },
  1038. useHTML: false, //开启html模式
  1039. style: {
  1040. color: '#fff',
  1041. },
  1042. formatter: function (e) {
  1043. //console.log(this)
  1044. let num = chartData[this.colorIndex].num
  1045. this.percentage = this.percentage.toFixed(2) //Math.round(this.percentage)
  1046. return `${this.key}:<b>${this.percentage}%</b><br/><b>${this.y}</b>亿,<b>${num}个</b>`
  1047. },
  1048. //pointFormat:
  1049. },
  1050. plotOptions: {
  1051. pie: {
  1052. allowPointSelect: true,
  1053. showInLegend: true, // 图例
  1054. cursor: 'pointer',
  1055. size: 220,
  1056. innerSize: 150, //环形图中间空白,0为饼图
  1057. depth: 25, //立体高度
  1058. slicedOffset: 21, //动画距离
  1059. dataLabels: {
  1060. enabled: false, // 是否展示指示线
  1061. format: '{point.name}: {point.percentage}'
  1062. }
  1063. },
  1064. },
  1065. series: [{
  1066. type: 'pie',
  1067. name: '占比',
  1068. //center: ['35%','50%'],
  1069. point: {
  1070. events: {
  1071. click: function (e) { //点击事件
  1072. that.showTip3 = true
  1073. that.echartTitle = '传统产业分析'
  1074. setTimeout(() => {
  1075. that.initChartT1(chartData)
  1076. })
  1077. },
  1078. mouseOver: function (e) { //鼠标移入停止轮播并且找到移入的当前数据设为选中
  1079. //console.log(e)
  1080. chartData.forEach((item, index) => {
  1081. item.sliced = false
  1082. item.selected = false
  1083. })
  1084. chartData[e.target.index].sliced = true
  1085. chartData[e.target.index].selected = true
  1086. chart.update({
  1087. series: [{
  1088. type: 'pie',
  1089. name: '占比',
  1090. point: {
  1091. events: {
  1092. click: function (e) {
  1093. that.showTip3 = true
  1094. that.echartTitle = '传统产业分析'
  1095. setTimeout(() => {
  1096. that.initChartT1(chartData)
  1097. })
  1098. }
  1099. }
  1100. },
  1101. data: chartData
  1102. }]
  1103. })
  1104. timer && clearInterval(timer);
  1105. },
  1106. mouseOut: function () { // 鼠标移出后需要继续执行轮播
  1107. var points = chart.series[0].points;
  1108. var len = points.length;
  1109. timer && clearInterval(timer);
  1110. timer = setInterval(function () {
  1111. autoTooltip(points[i]);
  1112. chartData.forEach((item, index) => {
  1113. item.sliced = false
  1114. item.selected = false
  1115. if (index == i) {
  1116. item.sliced = true
  1117. item.selected = true
  1118. }
  1119. })
  1120. chart.update({
  1121. series: [{
  1122. type: 'pie',
  1123. name: '占比',
  1124. point: {
  1125. events: {
  1126. click: function (e) {
  1127. that.showTip3 = true
  1128. that.echartTitle = '传统产业分析'
  1129. setTimeout(() => {
  1130. that.initChartT1(chartData)
  1131. })
  1132. }
  1133. }
  1134. },
  1135. data: chartData
  1136. }]
  1137. })
  1138. i++;
  1139. if (i === len) {
  1140. i = 0;
  1141. }
  1142. }, 2000);
  1143. }
  1144. }
  1145. },
  1146. data: chartData
  1147. }]
  1148. }
  1149. var chart = Highcharts.chart('echartL5', option);
  1150. function autoTooltip (point) {
  1151. chart.tooltip.refresh(point);
  1152. }
  1153. },
  1154. initChartL6 () {
  1155. var chartData = [
  1156. {
  1157. name: '新一代信息技术',
  1158. y: 29.26,
  1159. num: 75,
  1160. //x: 75,
  1161. sliced: false,
  1162. selected: false,
  1163. },
  1164. {
  1165. name: '高端装备制造',
  1166. y: 100.41,
  1167. num: 28,
  1168. sliced: false,
  1169. selected: false,
  1170. },
  1171. {
  1172. name: '新材料',
  1173. y: 6.72,
  1174. num: 4,
  1175. sliced: false,
  1176. selected: false,
  1177. },
  1178. {
  1179. name: '生物',
  1180. y: 3.60,
  1181. num: 58,
  1182. sliced: false,
  1183. selected: false,
  1184. },
  1185. {
  1186. name: '新能源',
  1187. y: 170.03,
  1188. num: 58,
  1189. sliced: false,
  1190. selected: false,
  1191. },
  1192. {
  1193. name: '节能环保',
  1194. y: 26.30,
  1195. num: 24,
  1196. sliced: false,
  1197. selected: false,
  1198. },
  1199. {
  1200. name: '相关服务业',
  1201. y: 5.10,
  1202. num: 2,
  1203. sliced: false,
  1204. selected: false,
  1205. }
  1206. ]
  1207. var timer = null;
  1208. var i = 0;
  1209. let that = this
  1210. var option = {
  1211. colors: ['#5783ab', '#1a5389', '#a79c57', '#cc8c29', '#91a65f', '#383062', '#034a39', '#5783ab'],
  1212. chart: {
  1213. type: 'pie',
  1214. backgroundColor: 'rgba(0,0,0,0)',
  1215. options3d: {
  1216. enabled: true,
  1217. alpha: 45,
  1218. //beta: 0
  1219. },
  1220. events: {
  1221. // load,图表加载完成时触发
  1222. load: function () {
  1223. var chart = this;
  1224. var points = chart.series[0].points;
  1225. var len = points.length;
  1226. timer && clearInterval(timer);
  1227. timer = setInterval(function () {
  1228. autoTooltip(points[i]);
  1229. chartData.forEach((item, index) => {
  1230. item.sliced = false
  1231. item.selected = false
  1232. if (index == i) {
  1233. item.sliced = true
  1234. item.selected = true
  1235. }
  1236. })
  1237. chart.update({
  1238. series: [{
  1239. type: 'pie',
  1240. name: '占比',
  1241. point: {
  1242. events: {
  1243. click: function (e) {
  1244. that.showTip3 = true
  1245. that.echartTitle = '战略性新兴产业'
  1246. setTimeout(() => {
  1247. that.initChartT1(chartData)
  1248. })
  1249. }
  1250. }
  1251. },
  1252. data: chartData
  1253. }]
  1254. })
  1255. i++;
  1256. if (i === len) {
  1257. i = 0;
  1258. }
  1259. }, 2000);
  1260. },
  1261. legendItemClick: function (event) {
  1262. console.log(event);
  1263. return true;
  1264. }
  1265. }
  1266. },
  1267. credits: {
  1268. enabled: false //去掉hightchats水印
  1269. },
  1270. legend: {
  1271. // labelFormatter: function() {
  1272. // return 123;
  1273. // },
  1274. align: 'right',//横向位置
  1275. verticalAlign: 'middle', // 纵向位置
  1276. layout: "vertical",//横排还是竖排
  1277. x: -30,
  1278. y: 30,
  1279. symbolWidth: 50,
  1280. itemDistance: 50,
  1281. itemStyle: {
  1282. fontSize: '20px',
  1283. color: '#fff',
  1284. x: 20
  1285. },
  1286. },
  1287. title: {
  1288. text: '战略性新兴产业',
  1289. style: {
  1290. color: '#fff',
  1291. fontSize: 22,
  1292. },
  1293. align: 'center',
  1294. verticalAlign: "bottom",
  1295. x: -120
  1296. },
  1297. tooltip: {
  1298. crosshairs: true,
  1299. backgroundColor: 'rgba(0,0,0,0.5)',
  1300. // positioner: function(e){
  1301. // console.log(e, this)
  1302. // },
  1303. useHTML: false, //开启html模式
  1304. style: {
  1305. color: '#fff',
  1306. },
  1307. formatter: function (e) {
  1308. //console.log(this)
  1309. let num = chartData[this.colorIndex].num
  1310. this.percentage = this.percentage.toFixed(2) //Math.round(this.percentage)
  1311. return `${this.key}:<b>${this.percentage}%</b><br/><b>${this.y}</b>亿,<b>${num}个</b>`
  1312. },
  1313. //pointFormat:
  1314. },
  1315. plotOptions: {
  1316. pie: {
  1317. allowPointSelect: true,
  1318. showInLegend: true, // 图例
  1319. cursor: 'pointer',
  1320. size: 220,
  1321. innerSize: 150, //环形图中间空白,0为饼图
  1322. depth: 25, //立体高度
  1323. slicedOffset: 21, //动画距离
  1324. dataLabels: {
  1325. enabled: false, // 是否展示指示线
  1326. format: '{point.name}: {point.percentage}'
  1327. }
  1328. },
  1329. },
  1330. series: [{
  1331. type: 'pie',
  1332. name: '占比',
  1333. //center: ['35%','50%'],
  1334. point: {
  1335. events: {
  1336. click: function (e) { //点击事件
  1337. that.showTip3 = true
  1338. that.echartTitle = '战略性新兴产业'
  1339. setTimeout(() => {
  1340. that.initChartT1(chartData)
  1341. })
  1342. },
  1343. mouseOver: function (e) { //鼠标移入停止轮播并且找到移入的当前数据设为选中
  1344. //console.log(e)
  1345. chartData.forEach((item, index) => {
  1346. item.sliced = false
  1347. item.selected = false
  1348. })
  1349. chartData[e.target.index].sliced = true
  1350. chartData[e.target.index].selected = true
  1351. chart.update({
  1352. series: [{
  1353. type: 'pie',
  1354. name: '占比',
  1355. point: {
  1356. events: {
  1357. click: function (e) {
  1358. that.showTip3 = true
  1359. that.echartTitle = '战略性新兴产业'
  1360. setTimeout(() => {
  1361. that.initChartT1(chartData)
  1362. })
  1363. }
  1364. }
  1365. },
  1366. data: chartData
  1367. }]
  1368. })
  1369. timer && clearInterval(timer);
  1370. },
  1371. mouseOut: function () { // 鼠标移出后需要继续执行轮播
  1372. var points = chart.series[0].points;
  1373. var len = points.length;
  1374. timer && clearInterval(timer);
  1375. timer = setInterval(function () {
  1376. autoTooltip(points[i]);
  1377. chartData.forEach((item, index) => {
  1378. item.sliced = false
  1379. item.selected = false
  1380. if (index == i) {
  1381. item.sliced = true
  1382. item.selected = true
  1383. }
  1384. })
  1385. chart.update({
  1386. series: [{
  1387. type: 'pie',
  1388. name: '占比',
  1389. point: {
  1390. events: {
  1391. click: function (e) {
  1392. that.showTip3 = true
  1393. that.echartTitle = '战略性新兴产业'
  1394. setTimeout(() => {
  1395. that.initChartT1(chartData)
  1396. })
  1397. }
  1398. }
  1399. },
  1400. data: chartData
  1401. }]
  1402. })
  1403. i++;
  1404. if (i === len) {
  1405. i = 0;
  1406. }
  1407. }, 2000);
  1408. }
  1409. }
  1410. },
  1411. data: chartData
  1412. }]
  1413. }
  1414. var chart = Highcharts.chart('echartL6', option);
  1415. function autoTooltip (point) {
  1416. chart.tooltip.refresh(point);
  1417. }
  1418. },
  1419. initChartL7 () {
  1420. var chartData = [
  1421. {
  1422. name: '化工',
  1423. y: 43.86,
  1424. num: 32,
  1425. sliced: false,
  1426. selected: false,
  1427. },
  1428. {
  1429. name: '煤层气',
  1430. y: 29.49,
  1431. num: 16,
  1432. sliced: false,
  1433. selected: false,
  1434. },
  1435. {
  1436. name: '文旅康养',
  1437. y: 0.07,
  1438. num: 1,
  1439. sliced: false,
  1440. selected: false,
  1441. },
  1442. {
  1443. name: '体育',
  1444. y: 2.57,
  1445. num: 5,
  1446. sliced: false,
  1447. selected: false,
  1448. },
  1449. {
  1450. name: '酿造',
  1451. y: 15.83,
  1452. num: 4,
  1453. sliced: false,
  1454. selected: false,
  1455. },
  1456. {
  1457. name: '建筑房地产',
  1458. y: 120.81,
  1459. num: 96,
  1460. sliced: false,
  1461. selected: false,
  1462. },
  1463. {
  1464. name: '农业',
  1465. y: 15.47,
  1466. num: 10,
  1467. sliced: false,
  1468. selected: false,
  1469. }
  1470. ]
  1471. var timer = null;
  1472. var i = 0;
  1473. let that = this
  1474. var option = {
  1475. colors: ['#5783ab', '#1a5389', '#a79c57', '#cc8c29', '#91a65f', '#383062', '#034a39'],
  1476. chart: {
  1477. type: 'pie',
  1478. backgroundColor: 'rgba(0,0,0,0)',
  1479. options3d: {
  1480. enabled: true,
  1481. alpha: 45,
  1482. //beta: 0
  1483. },
  1484. events: {
  1485. // load,图表加载完成时触发
  1486. load: function () {
  1487. var chart = this;
  1488. var points = chart.series[0].points;
  1489. var len = points.length;
  1490. timer && clearInterval(timer);
  1491. timer = setInterval(function () {
  1492. autoTooltip(points[i]);
  1493. chartData.forEach((item, index) => {
  1494. item.sliced = false
  1495. item.selected = false
  1496. if (index == i) {
  1497. item.sliced = true
  1498. item.selected = true
  1499. }
  1500. })
  1501. chart.update({
  1502. series: [{
  1503. type: 'pie',
  1504. name: '占比',
  1505. point: {
  1506. events: {
  1507. click: function (e) {
  1508. that.showTip3 = true
  1509. that.echartTitle = '特色优势产业'
  1510. setTimeout(() => {
  1511. that.initChartT1(chartData)
  1512. })
  1513. }
  1514. }
  1515. },
  1516. data: chartData
  1517. }]
  1518. })
  1519. i++;
  1520. if (i === len) {
  1521. i = 0;
  1522. }
  1523. }, 2000);
  1524. },
  1525. legendItemClick: function (event) {
  1526. console.log(event);
  1527. return true;
  1528. }
  1529. }
  1530. },
  1531. credits: {
  1532. enabled: false //去掉hightchats水印
  1533. },
  1534. title: {
  1535. text: '特色优势产业',
  1536. style: {
  1537. color: '#fff',
  1538. fontSize: 22,
  1539. },
  1540. align: 'center',
  1541. verticalAlign: "bottom",
  1542. x: -120
  1543. },
  1544. legend: {
  1545. // labelFormatter: function() {
  1546. // return 123;
  1547. // },
  1548. align: 'right',//横向位置
  1549. verticalAlign: 'middle', // 纵向位置
  1550. layout: "vertical",//横排还是竖排
  1551. x: -50,
  1552. y: 30,
  1553. symbolWidth: 50,
  1554. itemDistance: 50,
  1555. itemStyle: {
  1556. fontSize: '20px',
  1557. color: '#fff',
  1558. x: 20
  1559. },
  1560. },
  1561. tooltip: {
  1562. crosshairs: true,
  1563. backgroundColor: 'rgba(0,0,0,0.5)',
  1564. // positioner: function(e){
  1565. // console.log(e, this)
  1566. // },
  1567. useHTML: false, //开启html模式
  1568. style: {
  1569. color: '#fff',
  1570. },
  1571. formatter: function (e) {
  1572. //console.log(this)
  1573. let num = chartData[this.colorIndex].num
  1574. this.percentage = this.percentage.toFixed(2) //Math.round(this.percentage)
  1575. return `${this.key}:<b>${this.percentage}%</b><br/><b>${this.y}</b>亿,<b>${num}个</b>`
  1576. },
  1577. //pointFormat:
  1578. },
  1579. plotOptions: {
  1580. pie: {
  1581. allowPointSelect: true,
  1582. showInLegend: true, // 图例
  1583. cursor: 'pointer',
  1584. size: 220,
  1585. innerSize: 150, //环形图中间空白,0为饼图
  1586. depth: 25, //立体高度
  1587. slicedOffset: 21, //动画距离
  1588. dataLabels: {
  1589. enabled: false, // 是否展示指示线
  1590. format: '{point.name}: {point.percentage}'
  1591. }
  1592. },
  1593. },
  1594. series: [{
  1595. type: 'pie',
  1596. name: '占比',
  1597. //center: ['35%','50%'],
  1598. point: {
  1599. events: {
  1600. click: function (e) { //点击事件
  1601. that.showTip3 = true
  1602. that.echartTitle = '特色优势产业'
  1603. setTimeout(() => {
  1604. that.initChartT1(chartData)
  1605. })
  1606. },
  1607. mouseOver: function (e) { //鼠标移入停止轮播并且找到移入的当前数据设为选中
  1608. //console.log(e)
  1609. chartData.forEach((item, index) => {
  1610. item.sliced = false
  1611. item.selected = false
  1612. })
  1613. chartData[e.target.index].sliced = true
  1614. chartData[e.target.index].selected = true
  1615. chart.update({
  1616. series: [{
  1617. type: 'pie',
  1618. name: '占比',
  1619. point: {
  1620. events: {
  1621. click: function (e) {
  1622. that.showTip3 = true
  1623. that.echartTitle = '特色优势产业'
  1624. setTimeout(() => {
  1625. that.initChartT1(chartData)
  1626. })
  1627. }
  1628. }
  1629. },
  1630. data: chartData
  1631. }]
  1632. })
  1633. timer && clearInterval(timer);
  1634. },
  1635. mouseOut: function () { // 鼠标移出后需要继续执行轮播
  1636. var points = chart.series[0].points;
  1637. var len = points.length;
  1638. timer && clearInterval(timer);
  1639. timer = setInterval(function () {
  1640. autoTooltip(points[i]);
  1641. chartData.forEach((item, index) => {
  1642. item.sliced = false
  1643. item.selected = false
  1644. if (index == i) {
  1645. item.sliced = true
  1646. item.selected = true
  1647. }
  1648. })
  1649. chart.update({
  1650. series: [{
  1651. type: 'pie',
  1652. name: '占比',
  1653. point: {
  1654. events: {
  1655. click: function (e) {
  1656. that.showTip3 = true
  1657. that.echartTitle = '特色优势产业'
  1658. setTimeout(() => {
  1659. that.initChartT1(chartData)
  1660. })
  1661. }
  1662. }
  1663. },
  1664. data: chartData
  1665. }]
  1666. })
  1667. i++;
  1668. if (i === len) {
  1669. i = 0;
  1670. }
  1671. }, 2000);
  1672. }
  1673. }
  1674. },
  1675. data: chartData
  1676. }]
  1677. }
  1678. var chart = Highcharts.chart('echartL7', option);
  1679. function autoTooltip (point) {
  1680. chart.tooltip.refresh(point);
  1681. }
  1682. },
  1683. initChartL8 () {
  1684. var chartData = [
  1685. {
  1686. name: '交通运输业',
  1687. y: 264.70,
  1688. num: 38,
  1689. sliced: false,
  1690. selected: false,
  1691. },
  1692. {
  1693. name: '煤气层管网',
  1694. y: 14.39,
  1695. num: 14,
  1696. sliced: false,
  1697. selected: false,
  1698. },
  1699. {
  1700. name: '物流贸易',
  1701. y: 18.07,
  1702. num: 18,
  1703. sliced: false,
  1704. selected: false,
  1705. },
  1706. {
  1707. name: '水务',
  1708. y: 69.73,
  1709. num: 34,
  1710. sliced: false,
  1711. selected: false,
  1712. },
  1713. {
  1714. name: '其他',
  1715. y: 3.64,
  1716. num: 5,
  1717. sliced: false,
  1718. selected: false,
  1719. }
  1720. ]
  1721. var timer = null;
  1722. var i = 0;
  1723. let that = this
  1724. var option = {
  1725. colors: ['#5783ab', '#1a5389', '#a79c57', '#cc8c29', '#91a65f', '#383062', '#034a39'],
  1726. chart: {
  1727. type: 'pie',
  1728. backgroundColor: 'rgba(0,0,0,0)',
  1729. options3d: {
  1730. enabled: true,
  1731. alpha: 45,
  1732. //beta: 0
  1733. },
  1734. events: {
  1735. // load,图表加载完成时触发
  1736. load: function () {
  1737. var chart = this;
  1738. var points = chart.series[0].points;
  1739. var len = points.length;
  1740. timer && clearInterval(timer);
  1741. timer = setInterval(function () {
  1742. autoTooltip(points[i]);
  1743. chartData.forEach((item, index) => {
  1744. item.sliced = false
  1745. item.selected = false
  1746. if (index == i) {
  1747. item.sliced = true
  1748. item.selected = true
  1749. }
  1750. })
  1751. chart.update({
  1752. series: [{
  1753. type: 'pie',
  1754. name: '占比',
  1755. point: {
  1756. events: {
  1757. click: function (e) {
  1758. that.showTip3 = true
  1759. that.echartTitle = '公共基础等产业'
  1760. setTimeout(() => {
  1761. that.initChartT1(chartData)
  1762. })
  1763. }
  1764. }
  1765. },
  1766. data: chartData
  1767. }]
  1768. })
  1769. i++;
  1770. if (i === len) {
  1771. i = 0;
  1772. }
  1773. }, 2000);
  1774. },
  1775. legendItemClick: function (event) {
  1776. console.log(event);
  1777. return true;
  1778. }
  1779. }
  1780. },
  1781. credits: {
  1782. enabled: false //去掉hightchats水印
  1783. },
  1784. title: {
  1785. text: '公共基础等产业',
  1786. style: {
  1787. color: '#fff',
  1788. fontSize: 22,
  1789. },
  1790. align: 'center',
  1791. verticalAlign: "bottom",
  1792. x: -120
  1793. },
  1794. legend: {
  1795. // labelFormatter: function() {
  1796. // return 123;
  1797. // },
  1798. align: 'right',//横向位置
  1799. verticalAlign: 'middle', // 纵向位置
  1800. layout: "vertical",//横排还是竖排
  1801. x: -70,
  1802. y: 50,
  1803. symbolWidth: 50,
  1804. itemDistance: 50,
  1805. itemStyle: {
  1806. fontSize: '20px',
  1807. color: '#fff',
  1808. x: 20
  1809. },
  1810. },
  1811. tooltip: {
  1812. crosshairs: true,
  1813. backgroundColor: 'rgba(0,0,0,0.5)',
  1814. // positioner: function(e){
  1815. // console.log(e, this)
  1816. // },
  1817. useHTML: false, //开启html模式
  1818. style: {
  1819. color: '#fff',
  1820. },
  1821. formatter: function (e) {
  1822. //console.log(this)
  1823. let num = chartData[this.colorIndex].num
  1824. this.percentage = this.percentage.toFixed(2) //Math.round(this.percentage)
  1825. return `${this.key}:<b>${this.percentage}%</b><br/><b>${this.y}</b>亿,<b>${num}个</b>`
  1826. },
  1827. //pointFormat:
  1828. },
  1829. plotOptions: {
  1830. pie: {
  1831. allowPointSelect: true,
  1832. showInLegend: true, // 图例
  1833. cursor: 'pointer',
  1834. size: 220,
  1835. innerSize: 150, //环形图中间空白,0为饼图
  1836. depth: 25, //立体高度
  1837. slicedOffset: 21, //动画距离
  1838. dataLabels: {
  1839. enabled: false, // 是否展示指示线
  1840. format: '{point.name}: {point.percentage}'
  1841. }
  1842. },
  1843. },
  1844. series: [{
  1845. type: 'pie',
  1846. name: '占比',
  1847. //center: ['35%','50%'],
  1848. point: {
  1849. events: {
  1850. click: function (e) { //点击事件
  1851. that.showTip3 = true
  1852. that.echartTitle = '公共基础等产业'
  1853. setTimeout(() => {
  1854. that.initChartT1(chartData)
  1855. })
  1856. },
  1857. mouseOver: function (e) { //鼠标移入停止轮播并且找到移入的当前数据设为选中
  1858. //console.log(e)
  1859. chartData.forEach((item, index) => {
  1860. item.sliced = false
  1861. item.selected = false
  1862. })
  1863. chartData[e.target.index].sliced = true
  1864. chartData[e.target.index].selected = true
  1865. chart.update({
  1866. series: [{
  1867. type: 'pie',
  1868. name: '占比',
  1869. point: {
  1870. events: {
  1871. click: function (e) {
  1872. that.showTip3 = true
  1873. that.echartTitle = '公共基础等产业'
  1874. setTimeout(() => {
  1875. that.initChartT1(chartData)
  1876. })
  1877. }
  1878. }
  1879. },
  1880. data: chartData
  1881. }]
  1882. })
  1883. timer && clearInterval(timer);
  1884. },
  1885. mouseOut: function () { // 鼠标移出后需要继续执行轮播
  1886. var points = chart.series[0].points;
  1887. var len = points.length;
  1888. timer && clearInterval(timer);
  1889. timer = setInterval(function () {
  1890. autoTooltip(points[i]);
  1891. chartData.forEach((item, index) => {
  1892. item.sliced = false
  1893. item.selected = false
  1894. if (index == i) {
  1895. item.sliced = true
  1896. item.selected = true
  1897. }
  1898. })
  1899. chart.update({
  1900. series: [{
  1901. type: 'pie',
  1902. name: '占比',
  1903. point: {
  1904. events: {
  1905. click: function (e) {
  1906. that.showTip3 = true
  1907. that.echartTitle = '公共基础等产业'
  1908. setTimeout(() => {
  1909. that.initChartT1(chartData)
  1910. })
  1911. }
  1912. }
  1913. },
  1914. data: chartData
  1915. }]
  1916. })
  1917. i++;
  1918. if (i === len) {
  1919. i = 0;
  1920. }
  1921. }, 2000);
  1922. }
  1923. }
  1924. },
  1925. data: chartData
  1926. }]
  1927. }
  1928. var chart = Highcharts.chart('echartL8', option);
  1929. function autoTooltip (point) {
  1930. chart.tooltip.refresh(point);
  1931. }
  1932. },
  1933. initChartL9 () {
  1934. let myChart = echarts.init(document.getElementById("echartL9"));
  1935. option = {
  1936. tooltip: {
  1937. trigger: 'axis',
  1938. formatter: '指标:' + '{c0}' + '<br/>' + '发展线:' + '{c1}' + '<br/>' + '生存线:' + '{c2}', //+ '<br/>'+ '{a1}:{c1}' + '%',
  1939. axisPointer: {
  1940. type: 'shadow',
  1941. },
  1942. },
  1943. grid: {
  1944. top: '10%',
  1945. right: '5%',
  1946. left: '10%',
  1947. bottom: '6%',
  1948. },
  1949. xAxis: {
  1950. // data: ['总投资收益率', '销售利润率', '成本费用利润率', '总资产周转率', '财务内部收益率'],
  1951. data: dataType[this.countType],
  1952. axisLine: {
  1953. show: true, //隐藏X轴轴线
  1954. lineStyle: {
  1955. color: '#005094',
  1956. width: 1,
  1957. },
  1958. },
  1959. axisTick: {
  1960. show: true, //隐藏X轴刻度
  1961. },
  1962. axisLabel: {
  1963. show: true,
  1964. rotate: 15,
  1965. textStyle: {
  1966. color: 'rgba(255,255,255,0.6)', //X轴文字颜色
  1967. fontSize: 12,
  1968. },
  1969. },
  1970. },
  1971. yAxis: [
  1972. {
  1973. type: 'value',
  1974. splitLine: {
  1975. show: true,
  1976. lineStyle: {
  1977. color: '#68b4dd66',
  1978. type: 'dashed',
  1979. },
  1980. },
  1981. axisLine: {
  1982. show: false
  1983. },
  1984. axisLabel: {
  1985. show: true,
  1986. formatter: '{value}',
  1987. textStyle: {
  1988. color: 'rgba(250,250,250,0.6)',
  1989. },
  1990. },
  1991. nameTextStyle: {
  1992. color: '#ebf8ac',
  1993. fontSize: 16,
  1994. },
  1995. },
  1996. ],
  1997. series: [
  1998. {
  1999. name: '实际值',
  2000. type: 'bar',
  2001. barWidth: 15,
  2002. itemStyle: {
  2003. normal: {
  2004. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  2005. {
  2006. offset: 0,
  2007. color: '#69c0ff',
  2008. },
  2009. {
  2010. offset: 1,
  2011. color: '#082550',
  2012. },
  2013. ]),
  2014. },
  2015. },
  2016. // data: [70, 52, 33, 41, 52],
  2017. data: dataList[this.count + 1][2]
  2018. // markLine: {
  2019. // symbol: ['none', 'none'],
  2020. // data: [
  2021. // {
  2022. // name: '生存线',
  2023. // yAxis: 10,
  2024. // lineStyle: {
  2025. // color: '#FF8F0A',
  2026. // },
  2027. // label: {
  2028. // formatter: '{b}',
  2029. // position: 'middle',
  2030. // color: '#FF8F0A',
  2031. // fontSize: 12,
  2032. // },
  2033. // },
  2034. // {
  2035. // name: '发展线',
  2036. // yAxis: 15,
  2037. // lineStyle: {
  2038. // color: '#00EEA2',
  2039. // },
  2040. // label: {
  2041. // formatter: '{b}',
  2042. // position: 'middle',
  2043. // color: '#00EEA2',
  2044. // fontSize: 12,
  2045. // },
  2046. // },
  2047. // ],
  2048. // label: {
  2049. // distance: [50, 0],
  2050. // },
  2051. // },
  2052. },
  2053. {
  2054. name: '',
  2055. type: 'line',
  2056. barWidth: 15,
  2057. itemStyle: {
  2058. normal: {
  2059. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  2060. {
  2061. offset: 0,
  2062. color: '#69c0ff',
  2063. },
  2064. {
  2065. offset: 1,
  2066. color: 'green',
  2067. },
  2068. ]),
  2069. },
  2070. },
  2071. // data: [20, 30, 15, 28, 36],
  2072. data: dataList[this.count + 1][1]
  2073. },
  2074. {
  2075. name: '',
  2076. type: 'line',
  2077. barWidth: 15,
  2078. itemStyle: {
  2079. normal: {
  2080. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  2081. {
  2082. offset: 0,
  2083. color: '#69c0ff',
  2084. },
  2085. {
  2086. offset: 1,
  2087. color: 'yellow',
  2088. },
  2089. ]),
  2090. },
  2091. },
  2092. // data: [15, 22, 17, 33, 14],
  2093. data: dataList[this.count + 1][0]
  2094. },
  2095. ],
  2096. }
  2097. myChart.setOption(option)
  2098. // tools.loopShowTooltip(myChart, option, {
  2099. // nterval: 2000,
  2100. // loopSeries: true,
  2101. // })
  2102. },
  2103. initChartL10 () {
  2104. let myChart = echarts.init(document.getElementById("echartL10"));
  2105. let option = {
  2106. title: {
  2107. text: '固定资产',
  2108. textStyle: {
  2109. color: '#69C0FF',
  2110. fontSize: 20,
  2111. fontWeight: 500
  2112. },
  2113. top: '20',
  2114. left: '20'
  2115. },
  2116. textStyle: {
  2117. color: '#fff',
  2118. },
  2119. tooltip: {
  2120. trigger: "axis",
  2121. formatter: function (params) {
  2122. var tip = params[0].axisValue + '<br/>' + params[0].marker + params[0].data[1] + ':' + params[0].data[2] + '个,' + params[0].data[3] + '亿元' + '<br/>' + params[1].marker + params[1].data[1] + ':' + params[1].data[2] + '个,' + params[1].data[3] + '亿元';
  2123. return tip
  2124. },
  2125. axisPointer: {
  2126. lineStyle: {
  2127. type: 'dashed',
  2128. width: 2,
  2129. color: 'rgba(255,255,255,0.6)'
  2130. },
  2131. animation: true
  2132. }
  2133. },
  2134. grid: {
  2135. top: '10%',
  2136. right: '5%',
  2137. left: '15%',
  2138. bottom: '6%',
  2139. },
  2140. yAxis: {
  2141. data: ['备案', '特别监管'],
  2142. splitLine: {
  2143. show: true,
  2144. lineStyle: {
  2145. color: '#68b4dd66',
  2146. type: 'dashed',
  2147. },
  2148. },
  2149. axisLine: {
  2150. show: false
  2151. },
  2152. axisLabel: {
  2153. show: true,
  2154. formatter: '{value}',
  2155. textStyle: {
  2156. color: 'rgba(250,250,250,0.6)',
  2157. fontSize: 16,
  2158. },
  2159. },
  2160. nameTextStyle: {
  2161. color: '#ebf8ac',
  2162. fontSize: 16,
  2163. },
  2164. },
  2165. xAxis: {
  2166. data: ['项目储备', '项目立项', '可研论证', '投资决策'],
  2167. axisLine: {
  2168. show: true, //隐藏X轴轴线
  2169. lineStyle: {
  2170. color: '#005094',
  2171. width: 1,
  2172. },
  2173. },
  2174. axisTick: {
  2175. show: false, //隐藏X轴刻度
  2176. },
  2177. axisLabel: {
  2178. show: true,
  2179. textStyle: {
  2180. color: 'rgba(255,255,255,0.6)', //X轴文字颜色
  2181. fontSize: 14,
  2182. },
  2183. },
  2184. },
  2185. series: [
  2186. {
  2187. name: '特别监管',
  2188. type: 'scatter',
  2189. symbol: 'circle',//'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow'
  2190. symbolSize: function (data) {
  2191. return Math.sqrt(data[2]) * 3;
  2192. },
  2193. label: {
  2194. emphasis: {
  2195. show: true,
  2196. formatter: function (param) {
  2197. return param.data[2];
  2198. },
  2199. position: 'top'
  2200. }
  2201. },
  2202. itemStyle: {
  2203. normal: {
  2204. color: '#40A9FF'
  2205. }
  2206. },
  2207. data: [
  2208. ['项目储备', '特别监管', 14, 12.05],
  2209. ['项目立项', '特别监管', 2, 1.25],
  2210. ['可研论证', '特别监管', 10, 32.69],
  2211. ['投资决策', '特别监管', 15, 28.53],
  2212. ]
  2213. },
  2214. {
  2215. name: '备案',
  2216. type: 'scatter',
  2217. symbol: 'circle',//'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow'
  2218. symbolSize: function (data) {
  2219. return Math.sqrt(data[2]) * 3;
  2220. },
  2221. label: {
  2222. emphasis: {
  2223. show: true,
  2224. formatter: function (param) {
  2225. return param.data[2];
  2226. },
  2227. position: 'top'
  2228. }
  2229. },
  2230. itemStyle: {
  2231. normal: {
  2232. color: '#45DAD1'
  2233. }
  2234. },
  2235. data: [
  2236. ['项目储备', '备案', 27, 23.86],
  2237. ['项目立项', '备案', 1, 1.05],
  2238. ['可研论证', '备案', 14, 18.46],
  2239. ['投资决策', '备案', 40, 38.86],
  2240. ]
  2241. },
  2242. ]
  2243. }
  2244. myChart.setOption(option)
  2245. tools.loopShowTooltip(myChart, option, {
  2246. nterval: 2000,
  2247. loopSeries: true,
  2248. })
  2249. },
  2250. initChartL11 () {
  2251. let myChart = echarts.init(document.getElementById("echartL11"));
  2252. let option = {
  2253. title: {
  2254. text: '股权类',
  2255. textStyle: {
  2256. color: '#69C0FF',
  2257. fontSize: 20,
  2258. fontWeight: 500
  2259. },
  2260. top: '20',
  2261. left: '20'
  2262. },
  2263. textStyle: {
  2264. color: '#fff',
  2265. },
  2266. tooltip: {
  2267. trigger: "axis",
  2268. formatter: function (params) {
  2269. var tip = params[0].axisValue + '<br/>' + params[0].marker + params[0].data[1] + ':' + params[0].data[2] + '个,' + params[0].data[3] + '亿元' + '<br/>' + params[1].marker + params[1].data[1] + ':' + params[1].data[2] + '个,' + params[1].data[3] + '亿元';
  2270. return tip
  2271. },
  2272. axisPointer: {
  2273. lineStyle: {
  2274. type: 'dashed',
  2275. width: 2,
  2276. color: 'rgba(255,255,255,0.6)'
  2277. },
  2278. animation: true
  2279. }
  2280. },
  2281. grid: {
  2282. top: '10%',
  2283. right: '5%',
  2284. left: '15%',
  2285. bottom: '6%',
  2286. },
  2287. yAxis: {
  2288. data: ['备案', '特别监管'],
  2289. splitLine: {
  2290. show: true,
  2291. lineStyle: {
  2292. color: '#68b4dd66',
  2293. type: 'dashed',
  2294. },
  2295. },
  2296. axisLine: {
  2297. show: false
  2298. },
  2299. axisLabel: {
  2300. show: true,
  2301. formatter: '{value}',
  2302. textStyle: {
  2303. color: 'rgba(250,250,250,0.6)',
  2304. fontSize: 16,
  2305. },
  2306. },
  2307. nameTextStyle: {
  2308. color: '#ebf8ac',
  2309. fontSize: 16,
  2310. },
  2311. },
  2312. xAxis: {
  2313. data: ['项目储备', '项目立项', '可研论证', '投资决策'],
  2314. axisLine: {
  2315. show: true, //隐藏X轴轴线
  2316. lineStyle: {
  2317. color: '#005094',
  2318. width: 1,
  2319. },
  2320. },
  2321. axisTick: {
  2322. show: false, //隐藏X轴刻度
  2323. },
  2324. axisLabel: {
  2325. show: true,
  2326. textStyle: {
  2327. color: 'rgba(255,255,255,0.6)', //X轴文字颜色
  2328. fontSize: 14,
  2329. },
  2330. },
  2331. },
  2332. series: [
  2333. {
  2334. name: '',
  2335. type: 'scatter',
  2336. symbol: 'circle',
  2337. symbolSize: function (data) {
  2338. return Math.sqrt(data[2]) * 3;
  2339. },
  2340. label: {
  2341. emphasis: {
  2342. show: true,
  2343. formatter: function (param) {
  2344. return param.data[2];
  2345. },
  2346. position: 'top'
  2347. }
  2348. },
  2349. itemStyle: {
  2350. normal: {
  2351. color: '#40A9FF'
  2352. }
  2353. },
  2354. data: [
  2355. ['项目储备', '特别监管', 9, 6.49],
  2356. ['项目立项', '特别监管', 0, 0.00],
  2357. ['可研论证', '特别监管', 2, 0.10],
  2358. ['投资决策', '特别监管', 27, 15.52],
  2359. ]
  2360. },
  2361. {
  2362. name: '',
  2363. type: 'scatter',
  2364. symbol: 'circle',
  2365. symbolSize: function (data) {
  2366. return Math.sqrt(data[2]) * 3;
  2367. },
  2368. label: {
  2369. emphasis: {
  2370. show: true,
  2371. formatter: function (param) {
  2372. return param.data[2];
  2373. },
  2374. position: 'top'
  2375. }
  2376. },
  2377. itemStyle: {
  2378. normal: {
  2379. color: '#45DAD1'
  2380. }
  2381. },
  2382. data: [
  2383. ['项目储备', '备案', 39, 8.08],
  2384. ['项目立项', '备案', 7, 1.83],
  2385. ['可研论证', '备案', 19, 1.01],
  2386. ['投资决策', '备案', 73, 17.65],
  2387. ]
  2388. },
  2389. ]
  2390. }
  2391. myChart.setOption(option)
  2392. tools.loopShowTooltip(myChart, option, {
  2393. nterval: 2000,
  2394. loopSeries: true,
  2395. })
  2396. },
  2397. // 大屏二
  2398. initChartC1 () {
  2399. var chartData = []
  2400. var timer = null;
  2401. var timer2 = null;
  2402. var i = 0;
  2403. industryList.forEach((item, index) => {
  2404. let obj = {
  2405. name: item.name,
  2406. y: item.value,
  2407. sliced: false,
  2408. selected: false,
  2409. color: index == 0 ? 'rgb(243,178,119)' : index == 1 ? 'rgb(110,222,191)' : 'rgb(82,161,229)'
  2410. }
  2411. chartData.push(obj)
  2412. })
  2413. let that = this
  2414. var chart = Highcharts.chart('echartC1', {
  2415. chart: {
  2416. type: 'pie',
  2417. backgroundColor: 'rgba(0,0,0,0)',
  2418. options3d: {
  2419. enabled: true,
  2420. alpha: 45,
  2421. //beta: 0
  2422. },
  2423. events: {
  2424. // load,图表加载完成时触发
  2425. load: function () {
  2426. var chart = this;
  2427. var points = chart.series[0].points;
  2428. var len = points.length;
  2429. timer && clearInterval(timer);
  2430. timer = setInterval(function () {
  2431. autoTooltip(points[i]);
  2432. chartData.forEach((item, index) => {
  2433. item.sliced = false
  2434. item.selected = false
  2435. if (index == i) {
  2436. item.sliced = true
  2437. item.selected = true
  2438. }
  2439. })
  2440. chart.update({
  2441. series: [{
  2442. type: 'pie',
  2443. name: '占比',
  2444. point: {
  2445. events: {
  2446. click: function (e) {
  2447. if (e.point.name == '战略新兴产业') {
  2448. that.tipTitle2 = e.point.name
  2449. that.showTip2 = true
  2450. }
  2451. }
  2452. }
  2453. },
  2454. data: chartData
  2455. }]
  2456. })
  2457. i++;
  2458. if (i === len) {
  2459. i = 0;
  2460. }
  2461. }, 2000);
  2462. },
  2463. legendItemClick: function (event) {
  2464. console.log(event);
  2465. return true;
  2466. }
  2467. }
  2468. },
  2469. credits: {
  2470. enabled: false //去掉hightchats水印
  2471. },
  2472. title: {
  2473. text: null
  2474. },
  2475. tooltip: {
  2476. crosshairs: true,
  2477. backgroundColor: 'rgba(0,0,0,0.5)',
  2478. useHTML: false, //开启html模式
  2479. style: {
  2480. color: '#fff',
  2481. },
  2482. formatter: function (e) {
  2483. //console.log(this, e)
  2484. this.percentage = Math.round(this.percentage)
  2485. // e.options.backgroundColor = 'rgba(0,0,0,0.5)'
  2486. // e.options.style.color = '#fff'
  2487. return `${this.key}:<b>${this.percentage}%</b><br/>金额:<b>${this.y}</b>亿`
  2488. },
  2489. //pointFormat:
  2490. },
  2491. legend: {
  2492. layout: 'vertical',
  2493. align: 'right',
  2494. verticalAlign: 'bottom',
  2495. itemStyle: {
  2496. fontSize: '20px',
  2497. color: '#fff',
  2498. x: 20
  2499. }
  2500. },
  2501. plotOptions: {
  2502. pie: {
  2503. allowPointSelect: true,
  2504. showInLegend: true, // 图例
  2505. cursor: 'pointer',
  2506. size: 500,
  2507. innerSize: 300, //环形图中间空白,0为饼图
  2508. depth: 28, //立体高度
  2509. slicedOffset: 23, //动画距离
  2510. dataLabels: {
  2511. enabled: false, // 是否展示指示线
  2512. format: '{point.name}: {point.percentage}'
  2513. }
  2514. },
  2515. },
  2516. series: [{
  2517. type: 'pie',
  2518. name: '占比',
  2519. center: ['70%', '50%'],
  2520. point: {
  2521. events: {
  2522. click: function (e) { //点击事件
  2523. //console.log(e)
  2524. if (e.point.name == '战略新兴产业') {
  2525. that.tipTitle2 = e.point.name
  2526. that.showTip2 = true
  2527. }
  2528. },
  2529. mouseOver: function (e) { //鼠标移入停止轮播并且找到移入的当前数据设为选中
  2530. //console.log(e)
  2531. chartData.forEach((item, index) => {
  2532. item.sliced = false
  2533. item.selected = false
  2534. })
  2535. chartData[e.target.index].sliced = true
  2536. chartData[e.target.index].selected = true
  2537. chart.update({
  2538. series: [{
  2539. type: 'pie',
  2540. name: '占比',
  2541. point: {
  2542. events: {
  2543. click: function (e) {
  2544. if (e.point.name == '战略新兴产业') {
  2545. that.tipTitle2 = e.point.name
  2546. that.showTip2 = true
  2547. }
  2548. }
  2549. }
  2550. },
  2551. data: chartData
  2552. }]
  2553. })
  2554. timer && clearInterval(timer);
  2555. },
  2556. mouseOut: function () { // 鼠标移出后需要继续执行轮播
  2557. var points = chart.series[0].points;
  2558. var len = points.length;
  2559. timer && clearInterval(timer);
  2560. timer = setInterval(function () {
  2561. autoTooltip(points[i]);
  2562. chartData.forEach((item, index) => {
  2563. item.sliced = false
  2564. item.selected = false
  2565. if (index == i) {
  2566. item.sliced = true
  2567. item.selected = true
  2568. }
  2569. })
  2570. chart.update({
  2571. series: [{
  2572. type: 'pie',
  2573. name: '占比',
  2574. point: {
  2575. events: {
  2576. click: function (e) {
  2577. if (e.point.name == '战略新兴产业') {
  2578. that.tipTitle2 = e.point.name
  2579. that.showTip2 = true
  2580. }
  2581. }
  2582. }
  2583. },
  2584. data: chartData
  2585. }]
  2586. })
  2587. i++;
  2588. if (i === len) {
  2589. i = 0;
  2590. }
  2591. }, 2000);
  2592. }
  2593. }
  2594. },
  2595. data: chartData
  2596. }]
  2597. });
  2598. function autoTooltip (point) {
  2599. chart.tooltip.refresh(point);
  2600. }
  2601. },
  2602. initChartC2() {
  2603. let myChart = echarts.init(this.$refs['echartC2'])
  2604. let option = {
  2605. tooltip: {
  2606. formatter: data => {
  2607. return `${data[0].name}<br /><span style="display:inline-block;border-radius:50%; width:7px;height:7px;background-color:${data[0].color.colorStops[0].color}"></span> ${data[0].seriesName}:${data[0].value}亿 <br/><span style="display:inline-block;border-radius:50%; width:7px;height:7px;background-color:${data[1].color.colorStops[0].color}"></span> ${data[1].seriesName}:${data[1].value}亿`
  2608. },
  2609. trigger: 'axis',
  2610. axisPointer: {
  2611. type: 'cross',
  2612. },
  2613. },
  2614. dataZoom:[
  2615. {
  2616. // start: 9,//默认为@
  2617. // end: 100,//黑认认为1@0
  2618. type: "slider",
  2619. show: false,
  2620. // xAxisIndex: [0]
  2621. handlesize: 0,//滑动条的 左右2个滑动条的大小
  2622. startValue: 5,// 初始显示值
  2623. endValue: 0,// 结束显示值
  2624. height: 10,//组件高度
  2625. left:"5%",
  2626. right: "4%",//右边的距离
  2627. bottom: "25%",//底边的距离
  2628. borderColor:"#939",
  2629. fillerColor:"#269cdb",
  2630. borderRadius: 5,
  2631. backgroundColor: "#33384b",//两边未选中的滑动条区域的额色
  2632. showDataShadow: false,//是否显示数据阴影
  2633. showDetail: false,//即拖拽时候是否显示详细数值信息
  2634. truerealtime: true,//是否实时更新
  2635. filterMode: "filter"
  2636. },{
  2637. type:'inside',
  2638. show: true,
  2639. start: 1,
  2640. end: 100
  2641. }
  2642. ],
  2643. grid: {
  2644. top: '10%',
  2645. right: '3%',
  2646. left: '7%',
  2647. bottom: '7%',
  2648. },
  2649. legend: {
  2650. top: '1',
  2651. right: '10',
  2652. textStyle: {
  2653. color: 'rgba(250,250,250,0.6)',
  2654. },
  2655. },
  2656. xAxis: {
  2657. data: executeList.map(item => item.name),
  2658. axisLine: {
  2659. show: true, //隐藏X轴轴线
  2660. lineStyle: {
  2661. color: '#005094',
  2662. width: 1,
  2663. },
  2664. },
  2665. axisTick: {
  2666. show: false, //隐藏X轴刻度
  2667. },
  2668. axisLabel: {
  2669. show: true,
  2670. rotate: 40,
  2671. textStyle: {
  2672. color: '#fff',//'rgba(255,255,255,0.6)', //X轴文字颜色
  2673. },
  2674. },
  2675. },
  2676. yAxis: [
  2677. {
  2678. type: 'value',
  2679. name: '亿元',
  2680. nameTextStyle: {
  2681. color: 'rgba(255,255,255,0.6)',
  2682. },
  2683. splitLine: {
  2684. show: true,
  2685. lineStyle: {
  2686. color: '#68b4dd66',
  2687. type: 'dashed',
  2688. },
  2689. },
  2690. axisLine: {
  2691. show: true,
  2692. lineStyle: {
  2693. color: '#3D7495',
  2694. },
  2695. },
  2696. axisLabel: {
  2697. show: true,
  2698. textStyle: {
  2699. color: 'rgba(250,250,250,0.6)',
  2700. },
  2701. },
  2702. },
  2703. ],
  2704. series: [
  2705. {
  2706. name: '计划投资',
  2707. type: 'bar',
  2708. barWidth: 10,
  2709. itemStyle: {
  2710. normal: {
  2711. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  2712. {
  2713. offset: 0,
  2714. color: '#69c0ff',
  2715. },
  2716. {
  2717. offset: 1,
  2718. color: '#082550',
  2719. },
  2720. ]),
  2721. },
  2722. },
  2723. data: executeList.map(item => item.value),
  2724. },
  2725. {
  2726. name: '实际投资',
  2727. type: 'bar',
  2728. barWidth: 10,
  2729. itemStyle: {
  2730. normal: {
  2731. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  2732. {
  2733. offset: 0,
  2734. color: '#957DFF',
  2735. },
  2736. {
  2737. offset: 1,
  2738. color: '#082550',
  2739. },
  2740. ]),
  2741. },
  2742. },
  2743. data: executeList.map(item => item.value2),
  2744. },
  2745. ],
  2746. }
  2747. myChart.setOption(option)
  2748. tools.loopShowTooltip(myChart, option, {
  2749. nterval: 2000,
  2750. loopSeries: true,
  2751. })
  2752. let arr = executeList.map(item => item.value2)
  2753. this.timeOut = setInterval(function () {
  2754. let startValue = myChart.getModel().option.dataZoom[0].startValue;
  2755. let endValue = myChart.getModel().option.dataZoom[0].endValue;
  2756. let start = myChart.getModel().option.xAxis[0].data[startValue];//起始X轴
  2757. let end = myChart.getModel().option.xAxis[0].data[endValue];//结束X轴
  2758. // 每次向后滚动一个,最后一个从头开始。
  2759. // console.log(option.dataZoom[0].endValue);
  2760. if (option.dataZoom[0].endValue >= 12) {
  2761. option.dataZoom[0].endValue = 5
  2762. option.dataZoom[0].startValue = 0
  2763. } else {
  2764. option.dataZoom[0].endValue = option.dataZoom[0].endValue + 6
  2765. option.dataZoom[0].startValue = option.dataZoom[0].startValue + 6
  2766. }
  2767. // myChart.dispatchAction({
  2768. // type: 'showTip',
  2769. // seriesIndex: 0,
  2770. // dataIndex: startValue +1,
  2771. // });
  2772. myChart.setOption(option);
  2773. }, 12000);
  2774. },
  2775. convertData(data) {
  2776. var res = []
  2777. for (var i = 0; i < data.length; i++) {
  2778. var geoCoord = this.geoCoordMap[data[i].name]
  2779. if (geoCoord) {
  2780. res.push({
  2781. name: data[i].name,
  2782. value: geoCoord.concat(data[i].value),
  2783. })
  2784. }
  2785. }
  2786. return res
  2787. },
  2788. initChinaChart() {
  2789. var data = [
  2790. { name: '大同市', value: 60.35, value2: 28 },
  2791. { name: '朔州市', value: 33.61, value2: 13 },
  2792. { name: '忻州市', value: 73.35, value2: 25 },
  2793. { name: '吕梁市', value: 109.04, value2: 45 },
  2794. { name: '太原市', value: 251.67, value2: 113 },
  2795. { name: '阳泉市', value: 25.12, value2: 28 },
  2796. { name: '晋中市', value: 148.57, value2: 52 },
  2797. { name: '临汾市', value: 130.55, value2: 30 },
  2798. { name: '长治市', value: 103.00, value2: 23 },
  2799. { name: '运城市', value: 41.06, value2: 23 },
  2800. { name: '晋城市', value: 45.43, value2: 31 }
  2801. ]
  2802. var moveLine = {
  2803. normal: [
  2804. {
  2805. fromName: '太原市',
  2806. toName: '吕梁市',
  2807. coords: [
  2808. [112.3352, 37.9413],
  2809. [111.3574, 37.7325],
  2810. ],
  2811. },
  2812. {
  2813. fromName: '太原市',
  2814. toName: '忻州市',
  2815. coords: [
  2816. [112.3352, 37.9413],
  2817. [112.4561, 38.8971],
  2818. ],
  2819. },
  2820. {
  2821. fromName: '太原市',
  2822. toName: '临汾市',
  2823. coords: [
  2824. [112.3352, 37.9413],
  2825. [111.4783, 36.1615],
  2826. ],
  2827. },
  2828. {
  2829. fromName: '太原市',
  2830. toName: '阳泉市',
  2831. coords: [
  2832. [112.3352, 37.9413],
  2833. [113.4778, 38.0951],
  2834. ],
  2835. },
  2836. {
  2837. fromName: '太原市',
  2838. toName: '晋中市',
  2839. coords: [
  2840. [112.3352, 37.9413],
  2841. [112.7747, 37.37],
  2842. ],
  2843. },
  2844. {
  2845. fromName: '太原市',
  2846. toName: '运城市',
  2847. coords: [
  2848. [112.3352, 37.9413],
  2849. [111.1487, 35.2002],
  2850. ],
  2851. },
  2852. {
  2853. fromName: '太原市',
  2854. toName: '大同市',
  2855. coords: [
  2856. [112.3352, 37.9413],
  2857. [113.7854, 39.8035],
  2858. ],
  2859. },
  2860. {
  2861. fromName: '太原市',
  2862. toName: '晋城市',
  2863. coords: [
  2864. [112.3352, 37.9413],
  2865. [112.7856, 35.6342],
  2866. ],
  2867. },
  2868. {
  2869. fromName: '太原市',
  2870. toName: '长治市',
  2871. coords: [
  2872. [112.3352, 37.9413],
  2873. [112.8625, 36.4746],
  2874. ],
  2875. },
  2876. {
  2877. fromName: '太原市',
  2878. toName: '朔州市',
  2879. coords: [
  2880. [112.3352, 37.9413],
  2881. [113.0713, 39.6991],
  2882. ],
  2883. },
  2884. ],
  2885. }
  2886. /*获取地图数据*/
  2887. let myChart = echarts.init(this.$refs['echarts-map'])
  2888. echarts.registerMap('shanxi', {
  2889. type: 'FeatureCollection',
  2890. features: [
  2891. {
  2892. type: 'Feature',
  2893. id: '1409',
  2894. properties: { name: '忻州市', cp: [112.4561, 38.8971], childNum: 14 },
  2895. geometry: {
  2896. type: 'Polygon',
  2897. coordinates: [
  2898. '@@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',
  2899. ],
  2900. encodeOffsets: [[113614, 39657]],
  2901. },
  2902. },
  2903. {
  2904. type: 'Feature',
  2905. id: '1411',
  2906. properties: { name: '吕梁市', cp: [111.3574, 37.7325], childNum: 13 },
  2907. geometry: {
  2908. type: 'Polygon',
  2909. coordinates: [
  2910. '@@@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',
  2911. ],
  2912. encodeOffsets: [[113614, 39657]],
  2913. },
  2914. },
  2915. {
  2916. type: 'Feature',
  2917. id: '1410',
  2918. properties: { name: '临汾市', cp: [111.4783, 36.1615], childNum: 17 },
  2919. geometry: {
  2920. type: 'Polygon',
  2921. coordinates: [
  2922. '@@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',
  2923. ],
  2924. encodeOffsets: [[113063, 37784]],
  2925. },
  2926. },
  2927. {
  2928. type: 'Feature',
  2929. id: '1407',
  2930. properties: { name: '晋中市', cp: [112.7747, 37.37], childNum: 11 },
  2931. geometry: {
  2932. type: 'Polygon',
  2933. coordinates: [
  2934. '@@@š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@',
  2935. ],
  2936. encodeOffsets: [[114087, 37682]],
  2937. },
  2938. },
  2939. {
  2940. type: 'Feature',
  2941. id: '1408',
  2942. properties: { name: '运城市', cp: [111.1487, 35.2002], childNum: 13 },
  2943. geometry: {
  2944. type: 'Polygon',
  2945. coordinates: [
  2946. '@@„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@„',
  2947. ],
  2948. encodeOffsets: [[113232, 36597]],
  2949. },
  2950. },
  2951. {
  2952. type: 'Feature',
  2953. id: '1402',
  2954. properties: { name: '大同市', cp: [113.7854, 39.8035], childNum: 8 },
  2955. geometry: {
  2956. type: 'Polygon',
  2957. coordinates: [
  2958. '@@²£š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',
  2959. ],
  2960. encodeOffsets: [[115335, 41209]],
  2961. },
  2962. },
  2963. {
  2964. type: 'Feature',
  2965. id: '1404',
  2966. properties: { name: '长治市', cp: [112.8625, 36.4746], childNum: 12 },
  2967. geometry: {
  2968. type: 'Polygon',
  2969. coordinates: [
  2970. '@@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',
  2971. ],
  2972. encodeOffsets: [[116269, 37637]],
  2973. },
  2974. },
  2975. {
  2976. type: 'Feature',
  2977. id: '1406',
  2978. properties: { name: '朔州市', cp: [113.0713, 39.6991], childNum: 5 },
  2979. geometry: {
  2980. type: 'Polygon',
  2981. coordinates: [
  2982. '@@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‚',
  2983. ],
  2984. encodeOffsets: [[114615, 40562]],
  2985. },
  2986. },
  2987. {
  2988. type: 'Feature',
  2989. id: '1405',
  2990. properties: { name: '晋城市', cp: [112.7856, 35.6342], childNum: 6 },
  2991. geometry: {
  2992. type: 'Polygon',
  2993. coordinates: [
  2994. '@@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°',
  2995. ],
  2996. encodeOffsets: [[115223, 36895]],
  2997. },
  2998. },
  2999. {
  3000. type: 'Feature',
  3001. id: '1401',
  3002. properties: { name: '太原市', cp: [112.3352, 37.9413], childNum: 5 },
  3003. geometry: {
  3004. type: 'Polygon',
  3005. coordinates: [
  3006. '@@„@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š@°',
  3007. ],
  3008. encodeOffsets: [[114503, 39134]],
  3009. },
  3010. },
  3011. {
  3012. type: 'Feature',
  3013. id: '1403',
  3014. properties: { name: '阳泉市', cp: [113.4778, 38.0951], childNum: 3 },
  3015. geometry: {
  3016. type: 'Polygon',
  3017. coordinates: [
  3018. '@@°@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',
  3019. ],
  3020. encodeOffsets: [[115864, 39336]],
  3021. },
  3022. },
  3023. ],
  3024. UTF8Encoding: true,
  3025. })
  3026. var mapFeatures = echarts.getMap(this.mapName).geoJson.features
  3027. mapFeatures.forEach(v => {
  3028. // 地区名称
  3029. var name = v.properties.name
  3030. // 地区经纬度
  3031. this.geoCoordMap[name] = v.properties.cp
  3032. })
  3033. // <p>当前阶段:<span>可论证阶段</span></p>
  3034. // <p>时间节点:<span>2021.10-2022.10</span></p>
  3035. let option = {
  3036. tooltip: {
  3037. padding: 15,
  3038. enterable: true,
  3039. transitionDuration: 1,
  3040. formatter: (params, ticket, callback) => {
  3041. // 清空所有轮播
  3042. for (var k in this.geoCoordMap) {
  3043. myChart.dispatchAction({
  3044. // type: 'geoUnSelect',
  3045. type: 'downplay',
  3046. name: k,
  3047. })
  3048. }
  3049. // 如果鼠标滑动到线线上面,则返回空
  3050. myChart.dispatchAction({
  3051. // type: 'geoSelect',
  3052. type: 'highlight',
  3053. name: params.name,
  3054. })
  3055. if (params.componentSubType == 'lines') {
  3056. return
  3057. }
  3058. if (params.componentSubType == 'scatter') {
  3059. let tipHtml = `
  3060. <div class="tooltip-cont">
  3061. <p>项目数量:<span>${data[params.dataIndex].value2}个</span></p>
  3062. <p>总投资额:<span>${params.data.value[2]}亿</span></p>
  3063. </div>`
  3064. callback(ticket, tipHtml)
  3065. return tipHtml
  3066. }
  3067. if (params.componentSubType == 'map') {
  3068. let tipHtml = `
  3069. <div class="tooltip-cont">
  3070. <p>项目数量:<span>${data[params.dataIndex].value2}个</span></p>
  3071. <p>总投资额:<span>${params.data.value}亿</span></p>
  3072. </div>`
  3073. callback(ticket, tipHtml)
  3074. return tipHtml
  3075. }
  3076. },
  3077. },
  3078. visualMap: {
  3079. show: false,
  3080. min: 0,
  3081. max: 300,
  3082. right: 0,
  3083. bottom: 0,
  3084. text: ['高', '低'],
  3085. textStyle: {
  3086. color: '#f1f1f1'
  3087. },
  3088. realtime: false,
  3089. calculable: false,
  3090. inRange: {
  3091. color: ['lightskyblue', '#2754b7']
  3092. }
  3093. },
  3094. geo: {
  3095. show: true,
  3096. map: 'shanxi',
  3097. layoutCenter: ['50%', '50%'], //地图位置
  3098. layoutSize: '100%',
  3099. zoom:1.5,
  3100. label: {
  3101. normal: {
  3102. show: false,
  3103. },
  3104. emphasis: {
  3105. show: false,
  3106. },
  3107. },
  3108. roam: false,
  3109. itemStyle: {
  3110. normal: {
  3111. areaColor: '#1946a8',
  3112. shadowColor: '#1946a8',
  3113. borderWidth: 1, //设置外层边框
  3114. borderColor: '#1946a8',
  3115. shadowOffsetX: 10,
  3116. shadowOffsetY: 5,
  3117. shadowBlur: 2,
  3118. },
  3119. emphasis: {
  3120. areaColor: '#1946a8',
  3121. borderColor: '#d4bc1d',
  3122. borderWidth: 2, //设置外层边框
  3123. },
  3124. },
  3125. },
  3126. series: [
  3127. {
  3128. name: '散点',
  3129. type: 'scatter',
  3130. coordinateSystem: 'geo',
  3131. data: this.convertData(data),
  3132. symbolSize: function (val) {
  3133. return 10
  3134. },
  3135. label: {
  3136. normal: {
  3137. formatter: '{b}',
  3138. position: [10, 10],
  3139. fontSize: 30,
  3140. fontWeight: 600,
  3141. fontStyle: 'italic',
  3142. color: '#fff',
  3143. show: true,
  3144. },
  3145. emphasis: {
  3146. show: true,
  3147. },
  3148. },
  3149. itemStyle: {
  3150. normal: {
  3151. color: '#000',
  3152. borderWidth: 2,
  3153. borderColor: '#fff',
  3154. },
  3155. },
  3156. },
  3157. {
  3158. type: 'map',
  3159. map: this.mapName,
  3160. geoIndex: 0,
  3161. aspectScale: 1.5, //长宽比
  3162. showLegendSymbol: true, // 存在legend时显示
  3163. label: {
  3164. normal: {
  3165. show: true,
  3166. },
  3167. emphasis: {
  3168. show: false,
  3169. textStyle: {
  3170. color: '#fff',
  3171. },
  3172. },
  3173. },
  3174. roam: true,
  3175. itemStyle: {
  3176. normal: {
  3177. areaColor: '#031525',
  3178. borderColor: '#3B5077',
  3179. },
  3180. emphasis: {
  3181. areaColor: '#2B91B7',
  3182. },
  3183. },
  3184. animation: false,
  3185. data: data,
  3186. },
  3187. {
  3188. name: '点',
  3189. type: 'scatter',
  3190. coordinateSystem: 'geo',
  3191. zlevel: 6,
  3192. },
  3193. {
  3194. name: 'Top 5',
  3195. type: 'effectScatter',
  3196. coordinateSystem: 'geo',
  3197. data: this.convertData(
  3198. data
  3199. .sort(function (a, b) {
  3200. return b.value - a.value
  3201. })
  3202. .slice(0, 5)
  3203. ),
  3204. symbolSize: function (val) {
  3205. return 15
  3206. },
  3207. showEffectOn: 'render',
  3208. rippleEffect: {
  3209. brushType: 'stroke',
  3210. },
  3211. hoverAnimation: true,
  3212. label: {
  3213. normal: {
  3214. formatter: '{b}',
  3215. position: 'left',
  3216. show: false,
  3217. },
  3218. },
  3219. itemStyle: {
  3220. normal: {
  3221. color: 'yellow',
  3222. shadowBlur: 10,
  3223. shadowColor: 'yellow',
  3224. },
  3225. },
  3226. zlevel: 1000,
  3227. },
  3228. {
  3229. name: '线路',
  3230. type: 'lines',
  3231. zlevel: 2,
  3232. effect: {
  3233. show: true,
  3234. period: 4, //箭头指向速度,值越小速度越快
  3235. trailLength: 0.02, //特效尾迹长度[0,1]值越大,尾迹越长重
  3236. symbol: 'arrow', //箭头图标
  3237. symbolSize: 5, //图标大小
  3238. },
  3239. lineStyle: {
  3240. normal: {
  3241. color: '#00FFFF',
  3242. width: 1,
  3243. type: 'dashed',
  3244. opacity: 0.5, //尾迹线条透明度
  3245. curveness: -0.3, //尾迹线条曲直度
  3246. },
  3247. },
  3248. data: moveLine.normal,
  3249. },
  3250. ],
  3251. }
  3252. let that = this
  3253. myChart.on('click', function (params) {
  3254. if (params.name == '太原市') {
  3255. that.showTip = true
  3256. }
  3257. // window.open('https://www.baidu.com')
  3258. })
  3259. tools.loopShowTooltip(myChart, option, {
  3260. interval: 2000,
  3261. loopSeries: false,
  3262. });
  3263. myChart.setOption(option)
  3264. },
  3265. initChartC3() {
  3266. let myChart = echarts.init(this.$refs['echartC3'])
  3267. let option = {
  3268. tooltip: {
  3269. trigger: 'axis',
  3270. formatter: '{a0}:{c0}' + '亿元', //+ '<br/>'+ '{a1}:{c1}' + '%',
  3271. axisPointer: {
  3272. type: 'cross',
  3273. },
  3274. },
  3275. grid: {
  3276. top: '5%',
  3277. right: '3%',
  3278. left: '7%',
  3279. bottom: '10%',
  3280. },
  3281. // legend: {
  3282. // top: '1',
  3283. // textStyle: {
  3284. // color: 'rgba(250,250,250,0.6)',
  3285. // },
  3286. // },
  3287. xAxis: {
  3288. data: statusList.map(item => item.name),
  3289. axisLine: {
  3290. show: true, //隐藏X轴轴线
  3291. lineStyle: {
  3292. color: '#005094',
  3293. width: 1,
  3294. },
  3295. },
  3296. axisTick: {
  3297. show: false, //隐藏X轴刻度
  3298. },
  3299. axisLabel: {
  3300. show: true,
  3301. rotate: 20,
  3302. textStyle: {
  3303. color: '#fff',//'rgba(255,255,255,0.6)', //X轴文字颜色
  3304. },
  3305. },
  3306. },
  3307. yAxis: [
  3308. {
  3309. type: 'value',
  3310. name: '亿元',
  3311. nameTextStyle: {
  3312. color: 'rgba(255,255,255,0.6)',
  3313. },
  3314. splitLine: {
  3315. show: true,
  3316. lineStyle: {
  3317. color: '#68b4dd66',
  3318. type: 'dashed',
  3319. },
  3320. },
  3321. axisLine: {
  3322. show: true,
  3323. lineStyle: {
  3324. color: '#3D7495',
  3325. },
  3326. },
  3327. axisLabel: {
  3328. show: true,
  3329. textStyle: {
  3330. color: 'rgba(250,250,250,0.6)',
  3331. },
  3332. },
  3333. },
  3334. {
  3335. type: 'value',
  3336. axisLine: {
  3337. show: false,
  3338. },
  3339. splitLine: {
  3340. show: false,
  3341. },
  3342. axisLabel: {
  3343. show: true,
  3344. formatter: '{value} %',
  3345. textStyle: {
  3346. color: 'rgba(250,250,250,0.6)',
  3347. },
  3348. },
  3349. },
  3350. ],
  3351. series: [
  3352. {
  3353. type: 'bar',
  3354. name: '投资金额',
  3355. barWidth: 15,
  3356. itemStyle: {
  3357. normal: {
  3358. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  3359. {
  3360. offset: 0,
  3361. color: '#69c0ff',
  3362. },
  3363. {
  3364. offset: 1,
  3365. color: '#082550',
  3366. },
  3367. ]),
  3368. },
  3369. },
  3370. data: statusList.map(item => item.value),
  3371. },
  3372. ],
  3373. }
  3374. myChart.setOption(option)
  3375. tools.loopShowTooltip(myChart, option, {
  3376. nterval: 2000,
  3377. loopSeries: true,
  3378. })
  3379. },
  3380. initChartC4() {
  3381. var chartData = []
  3382. var timer = null;
  3383. var timer2 = null;
  3384. var i = 0;
  3385. chartDateR2.forEach((item,index) => {
  3386. let obj = {
  3387. name: item.name,
  3388. y: item.value2,
  3389. num: item.value,
  3390. sliced: false,
  3391. selected: false,
  3392. color: index == 0 ? '#43ede3' : '#8ba2ff'
  3393. }
  3394. chartData.push(obj)
  3395. })
  3396. let that = this
  3397. var chart = Highcharts.chart('echartC4', {
  3398. chart: {
  3399. type: 'pie',
  3400. backgroundColor: 'rgba(0,0,0,0)',
  3401. options3d: {
  3402. enabled: true,
  3403. alpha: 45,
  3404. //beta: 0
  3405. },
  3406. events: {
  3407. // load,图表加载完成时触发
  3408. load: function () {
  3409. var chart = this;
  3410. var points = chart.series[0].points;
  3411. var len = points.length;
  3412. timer && clearInterval(timer);
  3413. timer = setInterval(function () {
  3414. autoTooltip(points[i]);
  3415. chartData.forEach((item,index) => {
  3416. item.sliced = false
  3417. item.selected = false
  3418. if(index == i){
  3419. item.sliced = true
  3420. item.selected = true
  3421. }
  3422. })
  3423. chart.update({
  3424. series:[{
  3425. type: 'pie',
  3426. name: '占比',
  3427. point: {
  3428. events:{
  3429. click:function(e){
  3430. console.log(e)
  3431. }
  3432. }
  3433. },
  3434. data: chartData
  3435. }]
  3436. })
  3437. i++;
  3438. if (i === len) {
  3439. i = 0;
  3440. chartData.forEach((item,index) => {
  3441. item.sliced = false
  3442. item.selected = false
  3443. })
  3444. chart.update({
  3445. series:[{
  3446. type: 'pie',
  3447. name: '占比',
  3448. point: {
  3449. events:{
  3450. click:function(e){
  3451. console.log(e)
  3452. }
  3453. }
  3454. },
  3455. data: chartData
  3456. }]
  3457. })
  3458. }
  3459. }, 2000);
  3460. },
  3461. legendItemClick : function(event) {
  3462. console.log(event);
  3463. return true;
  3464. }
  3465. }
  3466. },
  3467. credits: {
  3468. enabled: false //去掉hightchats水印
  3469. },
  3470. title: {
  3471. text: null
  3472. },
  3473. tooltip: {
  3474. crosshairs: true,
  3475. backgroundColor: 'rgba(0,0,0,0.5)',
  3476. // positioner: function(e){
  3477. // console.log(e, this)
  3478. // },
  3479. useHTML: false, //开启html模式
  3480. style: {
  3481. color:'#fff',
  3482. },
  3483. formatter: function(e){
  3484. //console.log(this)
  3485. let num = chartData[this.colorIndex].num
  3486. this.percentage = Math.round(this.percentage)
  3487. return `${this.key}:<b>${this.percentage}%</b><br/>投资完成额:<b>${this.y}</b>亿<br/>投资数量:<b>${num}个</b>`
  3488. },
  3489. //pointFormat:
  3490. },
  3491. legend: {
  3492. layout: 'vertical',
  3493. align: 'right',
  3494. verticalAlign: 'bottom',
  3495. itemStyle: {
  3496. fontSize: '20px',
  3497. color: '#fff',
  3498. x: 20
  3499. }
  3500. },
  3501. plotOptions: {
  3502. pie: {
  3503. allowPointSelect: true,
  3504. showInLegend: true, // 图例
  3505. cursor: 'pointer',
  3506. size: 500,
  3507. innerSize : 300, //环形图中间空白,0为饼图
  3508. depth: 28, //立体高度
  3509. slicedOffset: 23, //动画距离
  3510. dataLabels: {
  3511. enabled: false, // 是否展示指示线
  3512. format: '{point.name}: {point.percentage}'
  3513. }
  3514. },
  3515. },
  3516. series: [{
  3517. type: 'pie',
  3518. name: '占比',
  3519. center: ['60%', '50%'],
  3520. point: {
  3521. events:{
  3522. click:function(e){ //点击事件
  3523. },
  3524. mouseOver: function(e){ //鼠标移入停止轮播并且找到移入的当前数据设为选中
  3525. //console.log(e)
  3526. chartData.forEach((item,index) => {
  3527. item.sliced = false
  3528. item.selected = false
  3529. })
  3530. chartData[e.target.index].sliced = true
  3531. chartData[e.target.index].selected = true
  3532. chart.update({
  3533. series:[{
  3534. type: 'pie',
  3535. name: '占比',
  3536. point: {
  3537. events:{
  3538. click:function(e){
  3539. console.log(e)
  3540. }
  3541. }
  3542. },
  3543. data: chartData
  3544. }]
  3545. })
  3546. timer && clearInterval(timer);
  3547. },
  3548. mouseOut: function(){ // 鼠标移出后需要继续执行轮播
  3549. var points = chart.series[0].points;
  3550. var len = points.length;
  3551. timer && clearInterval(timer);
  3552. timer = setInterval(function () {
  3553. autoTooltip(points[i]);
  3554. chartData.forEach((item,index) => {
  3555. item.sliced = false
  3556. item.selected = false
  3557. if(index == i){
  3558. item.sliced = true
  3559. item.selected = true
  3560. }
  3561. })
  3562. chart.update({
  3563. series:[{
  3564. type: 'pie',
  3565. name: '占比',
  3566. point: {
  3567. events:{
  3568. click:function(e){
  3569. console.log(e)
  3570. }
  3571. }
  3572. },
  3573. data: chartData
  3574. }]
  3575. })
  3576. i++;
  3577. if (i === len) {
  3578. i = 0;
  3579. chartData.forEach((item,index) => {
  3580. item.sliced = false
  3581. item.selected = false
  3582. })
  3583. chart.update({
  3584. series:[{
  3585. type: 'pie',
  3586. name: '占比',
  3587. point: {
  3588. events:{
  3589. click:function(e){
  3590. console.log(e)
  3591. }
  3592. }
  3593. },
  3594. data: chartData
  3595. }]
  3596. })
  3597. }
  3598. }, 2000);
  3599. }
  3600. }
  3601. },
  3602. data: chartData
  3603. }]
  3604. });
  3605. function autoTooltip(point) {
  3606. chart.tooltip.refresh(point);
  3607. }
  3608. },
  3609. initProjectList() {
  3610. let dataList = []
  3611. projectList.map(item => {
  3612. dataList.push([item.office,item.name, item.value + '亿'])
  3613. })
  3614. this.storageRecordConfig2 = {
  3615. header: ['企业集团', '项目名称', '投资金额'],
  3616. headerBGC: '#05507b33',
  3617. oddRowBGC: '#05507b33',
  3618. evenRowBGC: '',
  3619. headerHeight: '40',
  3620. rowNum: 6,
  3621. columnWidth: [100, 550,100],
  3622. align: ['center', 'center', 'center'],
  3623. data: dataList,
  3624. }
  3625. }
  3626. },
  3627. })