investHomeGroup.js 145 KB

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