investHomeGroup.js 162 KB

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