investHomeGroup.js 173 KB

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