investHomeGroup.js 158 KB

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