investHomeGroup.js 147 KB

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