investHomeGroup.js 144 KB

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