investHomeGroup.js 168 KB

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