investHomeGroup.js 158 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109
  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: "#203852",
  869. },
  870. {
  871. offset: 1,
  872. color: "#354e6d",
  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. },
  980. {
  981. offset: 1,
  982. color: "#354e6d",
  983. },
  984. ],
  985. globalCoord: false,
  986. },
  987. },
  988. outline: {
  989. borderDistance: 0,
  990. itemStyle: {
  991. borderWidth: 0,
  992. borderColor: {
  993. type: "linear",
  994. x: 0,
  995. y: 0,
  996. x2: 0,
  997. y2: 1,
  998. colorStops: [
  999. ],
  1000. globalCoord: false,
  1001. },
  1002. },
  1003. },
  1004. color: [
  1005. {
  1006. x: 0,
  1007. y: 0,
  1008. x2: 0,
  1009. y2: 1,
  1010. colorStops: [{
  1011. offset: 0,
  1012. color: '#237386',
  1013. },
  1014. {
  1015. offset: 1,
  1016. color: '#0078C8',
  1017. },],
  1018. },
  1019. {
  1020. x: 0,
  1021. y: 0,
  1022. x2: 0,
  1023. y2: 1,
  1024. colorStops: [{
  1025. offset: 0,
  1026. color: '#2F97A9',
  1027. },
  1028. {
  1029. offset: 1,
  1030. color: '#0078C8',
  1031. },],
  1032. },
  1033. {
  1034. x: 0,
  1035. y: 0,
  1036. x2: 0,
  1037. y2: 1,
  1038. colorStops: [{
  1039. offset: 0,
  1040. color: '#48E0ED',
  1041. },
  1042. {
  1043. offset: 1,
  1044. color: '#0078C8',
  1045. },],
  1046. }
  1047. ],
  1048. label: {
  1049. normal: {
  1050. textStyle: {
  1051. color: "#fff", // x轴文字颜色
  1052. },
  1053. },
  1054. },
  1055. },
  1056. ],
  1057. };
  1058. myChart.setOption(option)
  1059. },
  1060. initChartL2 () {
  1061. var chartData = left5
  1062. var timer = null;
  1063. var i = 0;
  1064. let that = this
  1065. var option = {
  1066. colors: ['#74a55d', '#cea446', '#b84b4b', '#5593ab', '#2a7652', '#c3643c', '#714585', '#b75d9f'],
  1067. chart: {
  1068. type: 'pie',
  1069. backgroundColor: 'rgba(0,0,0,0)',
  1070. options3d: {
  1071. enabled: true,
  1072. alpha: 45,
  1073. //beta: 0
  1074. },
  1075. events: {
  1076. // load,图表加载完成时触发
  1077. load: function () {
  1078. var chart = this;
  1079. var points = chart.series[0].points;
  1080. var len = points.length;
  1081. timer && clearInterval(timer);
  1082. timer = setInterval(function () {
  1083. autoTooltip(points[i]);
  1084. chartData.forEach((item, index) => {
  1085. item.sliced = false
  1086. item.selected = false
  1087. if (index == i) {
  1088. item.sliced = true
  1089. item.selected = true
  1090. }
  1091. })
  1092. chart.update({
  1093. series: [{
  1094. type: 'pie',
  1095. name: '占比',
  1096. point: {
  1097. events: {
  1098. click: function (e) {
  1099. that.showChartLTipDouble(e.point.name)
  1100. }
  1101. }
  1102. },
  1103. data: chartData
  1104. }]
  1105. })
  1106. i++;
  1107. if (i === len) {
  1108. i = 0;
  1109. chartData.forEach((item, index) => {
  1110. item.sliced = false
  1111. item.selected = false
  1112. })
  1113. chart.update({
  1114. series: [{
  1115. type: 'pie',
  1116. name: '占比',
  1117. point: {
  1118. events: {
  1119. click: function (e) {
  1120. that.showTip3 = true
  1121. that.showChartLTipDouble(e.point.name)
  1122. }
  1123. }
  1124. },
  1125. data: chartData
  1126. }]
  1127. })
  1128. }
  1129. }, 2000);
  1130. },
  1131. legendItemClick: function (event) {
  1132. console.log(event);
  1133. return true;
  1134. }
  1135. }
  1136. },
  1137. credits: {
  1138. enabled: false //去掉hightchats水印
  1139. },
  1140. legend: {
  1141. // labelFormatter: function() {
  1142. // return 123;
  1143. // },
  1144. align: 'right',//横向位置
  1145. verticalAlign: 'middle', // 纵向位置
  1146. layout: "vertical",//横排还是竖排
  1147. x: -110,
  1148. y: 90,
  1149. symbolWidth: 50,
  1150. itemStyle: {
  1151. fontSize: '20px',
  1152. color: '#fff',
  1153. x: 20,
  1154. fontWeight: 0,
  1155. fontFamily: 'Microsoft YaHei'
  1156. },
  1157. },
  1158. title: {
  1159. text: '主辅业计划占比',
  1160. style: {
  1161. color: '#fff',
  1162. fontSize: 24,
  1163. fontFamily: 'Microsoft YaHei',
  1164. },
  1165. align: 'center',
  1166. verticalAlign: "bottom",
  1167. x: -120
  1168. },
  1169. tooltip: {
  1170. crosshairs: false,
  1171. backgroundColor: 'rgba(0,0,0,0.5)',
  1172. // positioner: function(e){
  1173. // console.log(e, this)
  1174. // },
  1175. // useHTML: false, //开启html模式
  1176. style: {
  1177. color: '#fff',
  1178. fontSize: '20',
  1179. fontWeight: 0,
  1180. fontFamily: 'Microsoft YaHei'
  1181. },
  1182. formatter: function (e) {
  1183. let num = chartData[this.colorIndex].num
  1184. this.percentage = this.percentage.toFixed(2) //Math.round(this.percentage)
  1185. return `${this.key}:<b>${this.percentage}%</b><br/><b>${this.y}</b>亿,<b>${num}个</b>`
  1186. },
  1187. //pointFormat:
  1188. },
  1189. plotOptions: {
  1190. pie: {
  1191. allowPointSelect: true,
  1192. showInLegend: true, // 图例
  1193. cursor: 'pointer',
  1194. size: 220,
  1195. innerSize: 150, //环形图中间空白,0为饼图
  1196. depth: 25, //立体高度
  1197. slicedOffset: 21, //动画距离
  1198. dataLabels: {
  1199. enabled: false, // 是否展示指示线
  1200. format: '{point.name}: {point.percentage}'
  1201. }
  1202. },
  1203. },
  1204. series: [{
  1205. type: 'pie',
  1206. name: '占比',
  1207. center: ['50%', '50%'],
  1208. point: {
  1209. events: {
  1210. click: function (e) { //点击事件
  1211. that.showChartLTipDouble(e.point.name)
  1212. },
  1213. mouseOver: function (e) { //鼠标移入停止轮播并且找到移入的当前数据设为选中
  1214. //console.log(e)
  1215. chartData.forEach((item, index) => {
  1216. item.sliced = false
  1217. item.selected = false
  1218. })
  1219. chartData[e.target.index].sliced = true
  1220. chartData[e.target.index].selected = true
  1221. chart.update({
  1222. series: [{
  1223. type: 'pie',
  1224. name: '占比',
  1225. point: {
  1226. events: {
  1227. click: function (e) {
  1228. that.showChartLTipDouble(e.point.name)
  1229. }
  1230. }
  1231. },
  1232. data: chartData
  1233. }]
  1234. })
  1235. timer && clearInterval(timer);
  1236. },
  1237. mouseOut: function () { // 鼠标移出后需要继续执行轮播
  1238. var points = chart.series[0].points;
  1239. var len = points.length;
  1240. timer && clearInterval(timer);
  1241. timer = setInterval(function () {
  1242. autoTooltip(points[i]);
  1243. chartData.forEach((item, index) => {
  1244. item.sliced = false
  1245. item.selected = false
  1246. if (index == i) {
  1247. item.sliced = true
  1248. item.selected = true
  1249. }
  1250. })
  1251. chart.update({
  1252. series: [{
  1253. type: 'pie',
  1254. name: '占比',
  1255. point: {
  1256. events: {
  1257. click: function (e) {
  1258. that.showChartLTipDouble(e.point.name)
  1259. }
  1260. }
  1261. },
  1262. data: chartData
  1263. }]
  1264. })
  1265. i++;
  1266. if (i === len) {
  1267. i = 0;
  1268. chartData.forEach((item, index) => {
  1269. item.sliced = false
  1270. item.selected = false
  1271. })
  1272. chart.update({
  1273. series: [{
  1274. type: 'pie',
  1275. name: '占比',
  1276. point: {
  1277. events: {
  1278. click: function (e) {
  1279. that.showChartLTipDouble(e.point.name)
  1280. }
  1281. }
  1282. },
  1283. data: chartData
  1284. }]
  1285. })
  1286. }
  1287. }, 2000);
  1288. }
  1289. }
  1290. },
  1291. data: chartData
  1292. }]
  1293. }
  1294. var chart = Highcharts.chart('echartL2', option);
  1295. function autoTooltip (point) {
  1296. chart.tooltip.refresh(point);
  1297. }
  1298. },
  1299. initChartL3 () {
  1300. var chartData = left6
  1301. var timer = null;
  1302. var i = 0;
  1303. let that = this
  1304. var chart = Highcharts.chart('echartL3', {
  1305. colors: ['#74a55d', '#cea446', '#b84b4b', '#5593ab', '#2a7652', '#c3643c', '#714585', '#b75d9f'],
  1306. chart: {
  1307. type: 'pie',
  1308. backgroundColor: 'rgba(0,0,0,0)',
  1309. options3d: {
  1310. enabled: true,
  1311. alpha: 45,
  1312. //beta: 0
  1313. },
  1314. events: {
  1315. // load,图表加载完成时触发
  1316. load: function () {
  1317. var chart = this;
  1318. var points = chart.series[0].points;
  1319. var len = points.length;
  1320. timer && clearInterval(timer);
  1321. timer = setInterval(function () {
  1322. autoTooltip(points[i]);
  1323. chartData.forEach((item, index) => {
  1324. item.sliced = false
  1325. item.selected = false
  1326. if (index == i) {
  1327. item.sliced = true
  1328. item.selected = true
  1329. }
  1330. })
  1331. chart.update({
  1332. series: [{
  1333. type: 'pie',
  1334. name: '占比',
  1335. point: {
  1336. events: {
  1337. click: function (e) {
  1338. that.showChartLTipDouble(e.point.name)
  1339. }
  1340. }
  1341. },
  1342. data: chartData
  1343. }]
  1344. })
  1345. i++;
  1346. if (i === len) {
  1347. i = 0;
  1348. chartData.forEach((item, index) => {
  1349. item.sliced = false
  1350. item.selected = false
  1351. })
  1352. chart.update({
  1353. series: [{
  1354. type: 'pie',
  1355. name: '占比',
  1356. point: {
  1357. events: {
  1358. click: function (e) {
  1359. that.showChartLTipDouble(e.point.name)
  1360. }
  1361. }
  1362. },
  1363. data: chartData
  1364. }]
  1365. })
  1366. }
  1367. }, 2000);
  1368. },
  1369. legendItemClick: function (event) {
  1370. that.showChartLTipDouble(e.point.name)
  1371. return true;
  1372. }
  1373. }
  1374. },
  1375. credits: {
  1376. enabled: false //去掉hightchats水印
  1377. },
  1378. legend: {
  1379. // labelFormatter: function() {
  1380. // return 123;
  1381. // },
  1382. align: 'right',//横向位置
  1383. verticalAlign: 'middle', // 纵向位置
  1384. layout: "vertical",//横排还是竖排
  1385. x: -70,
  1386. y: 90,
  1387. symbolWidth: 50,
  1388. itemStyle: {
  1389. fontSize: '20px',
  1390. color: '#fff',
  1391. x: 20,
  1392. fontWeight: 0,
  1393. fontFamily: 'Microsoft YaHei'
  1394. },
  1395. },
  1396. title: {
  1397. text: '项目管理类型',
  1398. style: {
  1399. color: '#fff',
  1400. fontSize: 24,
  1401. fontFamily: 'Microsoft YaHei'
  1402. },
  1403. align: 'center',
  1404. verticalAlign: "bottom",
  1405. x: -120
  1406. },
  1407. tooltip: {
  1408. crosshairs: true,
  1409. backgroundColor: 'rgba(0,0,0,0.5)',
  1410. // positioner: function(e){
  1411. // console.log(e, this)
  1412. // },
  1413. useHTML: false, //开启html模式
  1414. style: {
  1415. color: '#fff',
  1416. fontSize: '20',
  1417. fontFamily: 'Microsoft YaHei'
  1418. },
  1419. formatter: function (e) {
  1420. //console.log(this)
  1421. let num = chartData[this.colorIndex].num
  1422. this.percentage = this.percentage.toFixed(2) //Math.round(this.percentage)
  1423. return `${this.key}:<b>${this.percentage}%</b><br/><b>${this.y}</b>亿,<b>${num}个</b>`
  1424. },
  1425. //pointFormat:
  1426. },
  1427. plotOptions: {
  1428. pie: {
  1429. allowPointSelect: true,
  1430. showInLegend: true, // 图例
  1431. cursor: 'pointer',
  1432. size: 220,
  1433. innerSize: 150, //环形图中间空白,0为饼图
  1434. depth: 25, //立体高度
  1435. slicedOffset: 21, //动画距离
  1436. dataLabels: {
  1437. enabled: false, // 是否展示指示线
  1438. format: '{point.name}: {point.percentage}'
  1439. }
  1440. },
  1441. },
  1442. series: [{
  1443. type: 'pie',
  1444. name: '占比',
  1445. // center: ['70%', '50%'],
  1446. point: {
  1447. events: {
  1448. click: function (e) { //点击事件
  1449. that.showChartLTipDouble(e.point.name)
  1450. },
  1451. mouseOver: function (e) { //鼠标移入停止轮播并且找到移入的当前数据设为选中
  1452. //console.log(e)
  1453. chartData.forEach((item, index) => {
  1454. item.sliced = false
  1455. item.selected = false
  1456. })
  1457. chartData[e.target.index].sliced = true
  1458. chartData[e.target.index].selected = true
  1459. chart.update({
  1460. series: [{
  1461. type: 'pie',
  1462. name: '占比',
  1463. point: {
  1464. events: {
  1465. click: function (e) {
  1466. that.showChartLTipDouble(e.point.name)
  1467. }
  1468. }
  1469. },
  1470. data: chartData
  1471. }]
  1472. })
  1473. timer && clearInterval(timer);
  1474. },
  1475. mouseOut: function () { // 鼠标移出后需要继续执行轮播
  1476. var points = chart.series[0].points;
  1477. var len = points.length;
  1478. timer && clearInterval(timer);
  1479. timer = setInterval(function () {
  1480. autoTooltip(points[i]);
  1481. chartData.forEach((item, index) => {
  1482. item.sliced = false
  1483. item.selected = false
  1484. if (index == i) {
  1485. item.sliced = true
  1486. item.selected = true
  1487. }
  1488. })
  1489. chart.update({
  1490. series: [{
  1491. type: 'pie',
  1492. name: '占比',
  1493. point: {
  1494. events: {
  1495. click: function (e) {
  1496. that.showChartLTipDouble(e.point.name)
  1497. }
  1498. }
  1499. },
  1500. data: chartData
  1501. }]
  1502. })
  1503. i++;
  1504. if (i === len) {
  1505. i = 0;
  1506. chartData.forEach((item, index) => {
  1507. item.sliced = false
  1508. item.selected = false
  1509. })
  1510. chart.update({
  1511. series: [{
  1512. type: 'pie',
  1513. name: '占比',
  1514. point: {
  1515. events: {
  1516. click: function (e) {
  1517. console.log(e)
  1518. }
  1519. }
  1520. },
  1521. data: chartData
  1522. }]
  1523. })
  1524. }
  1525. }, 2000);
  1526. }
  1527. }
  1528. },
  1529. data: chartData
  1530. }]
  1531. });
  1532. function autoTooltip (point) {
  1533. chart.tooltip.refresh(point);
  1534. }
  1535. },
  1536. initChartL4 () {
  1537. let myChart = echarts.init(document.getElementById("echartL4"));
  1538. let option = {
  1539. grid: {
  1540. top: 45,
  1541. right: 0,
  1542. left: 60,
  1543. bottom: 80,
  1544. },
  1545. tooltip: {
  1546. show: true,
  1547. trigger: "axis",
  1548. axisPointer: {
  1549. // 坐标轴指示器,坐标轴触发有效
  1550. type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
  1551. },
  1552. textStyle: {
  1553. color: '#FFF', // 文字的颜色
  1554. fontSize: '20', // 文字字体大小
  1555. fontFamily: 'Microsoft YaHei'
  1556. },
  1557. },
  1558. xAxis: {
  1559. data: commonCompany,
  1560. axisTick: {
  1561. show: false,
  1562. },
  1563. // x轴的字体颜色
  1564. axisLabel: {
  1565. rotate: 40,
  1566. textStyle: {
  1567. color: "white",
  1568. fontSize: '20',
  1569. fontFamily: 'Microsoft YaHei'
  1570. },
  1571. },
  1572. //y轴线的颜色以及宽度
  1573. axisLine: {
  1574. show: true,
  1575. lineStyle: {
  1576. color: "#1E5389",
  1577. width: 1,
  1578. type: "solid",
  1579. },
  1580. },
  1581. },
  1582. yAxis: {
  1583. name: '亿元',
  1584. axisTick: {
  1585. lineStyle: {
  1586. color: "#18416F",
  1587. },
  1588. },
  1589. // y轴的字体颜色
  1590. axisLabel: {
  1591. textStyle: {
  1592. color: "white",
  1593. fontSize: '20',
  1594. fontFamily: 'Microsoft YaHei'
  1595. },
  1596. },
  1597. splitLine: {
  1598. show: true,
  1599. lineStyle: {
  1600. color: "#68b4dd66",
  1601. width: 1,
  1602. type: "dashed",
  1603. },
  1604. },
  1605. //y轴线的颜色以及宽度
  1606. axisLine: {
  1607. show: true,
  1608. lineStyle: {
  1609. color: "#1E5389",
  1610. width: 1,
  1611. type: "solid",
  1612. },
  1613. },
  1614. nameTextStyle: {
  1615. color: '#fff',
  1616. fontSize: 20,
  1617. fontFamily: 'Microsoft YaHei'
  1618. },
  1619. },
  1620. series: [
  1621. {
  1622. name: "2023年额度",
  1623. type: "bar",
  1624. data: left3[0],
  1625. showBackground: true,
  1626. backgroundStyle: {
  1627. color: "#18416F",
  1628. },
  1629. barWidth: "20",
  1630. itemStyle: {
  1631. // barBorderRadius: [10, 10, 0, 0],
  1632. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  1633. {
  1634. offset: 0,
  1635. color: '#082550',
  1636. },
  1637. {
  1638. offset: 1,
  1639. color: '#957DFF',
  1640. },
  1641. ]),
  1642. },
  1643. },
  1644. ],
  1645. legend: {
  1646. // data: ["2022年额度", "2023年额度"],
  1647. data: ["2023年额度"],
  1648. textStyle: {
  1649. // 图列内容样式
  1650. color: "#fff", // 字体颜色
  1651. fontSize: "20",
  1652. fontFamily: 'Microsoft YaHei'
  1653. },
  1654. right: 'center',
  1655. y: 5,
  1656. // icon: "roundRect",
  1657. // 小图标的宽高
  1658. },
  1659. };
  1660. tools.loopShowTooltip(myChart, option, {
  1661. nterval: 2000,
  1662. loopSeries: true,
  1663. })
  1664. let that = this
  1665. myChart.on('click', function (param) {
  1666. that.titleName = param.name
  1667. that.echartEnterpriseShow = true
  1668. setTimeout(() => {
  1669. that.initChartBall()
  1670. });
  1671. })
  1672. myChart.setOption(option);
  1673. },
  1674. initChartL5 () {
  1675. var chartData = left7
  1676. var timer = null;
  1677. var i = 0;
  1678. let that = this
  1679. var option = {
  1680. colors: ['#74a55d', '#cea446', '#b84b4b', '#5593ab', '#2a7652', '#c3643c', '#714585', '#b75d9f'],
  1681. chart: {
  1682. type: 'pie',
  1683. backgroundColor: 'rgba(0,0,0,0)',
  1684. options3d: {
  1685. enabled: true,
  1686. alpha: 45,
  1687. //beta: 0
  1688. },
  1689. events: {
  1690. // load,图表加载完成时触发
  1691. load: function () {
  1692. var chart = this;
  1693. var points = chart.series[0].points;
  1694. var len = points.length;
  1695. timer && clearInterval(timer);
  1696. timer = setInterval(function () {
  1697. autoTooltip(points[i]);
  1698. chartData.forEach((item, index) => {
  1699. item.sliced = false
  1700. item.selected = false
  1701. if (index == i) {
  1702. item.sliced = true
  1703. item.selected = true
  1704. }
  1705. })
  1706. chart.update({
  1707. series: [{
  1708. type: 'pie',
  1709. name: '占比',
  1710. point: {
  1711. events: {
  1712. click: function (e) {
  1713. that.showChartLTipDouble(e.point.name)
  1714. }
  1715. }
  1716. },
  1717. data: chartData
  1718. }]
  1719. })
  1720. i++;
  1721. if (i === len) {
  1722. i = 0;
  1723. }
  1724. }, 2000);
  1725. },
  1726. legendItemClick: function (event) {
  1727. console.log(event);
  1728. return true;
  1729. }
  1730. }
  1731. },
  1732. credits: {
  1733. enabled: false //去掉hightchats水印
  1734. },
  1735. legend: {
  1736. // labelFormatter: function() {
  1737. // return 123;
  1738. // },
  1739. align: 'right',//横向位置
  1740. verticalAlign: 'middle', // 纵向位置
  1741. layout: "vertical",//横排还是竖排
  1742. x: -110,
  1743. y: 50,
  1744. symbolWidth: 50,
  1745. itemDistance: 50,
  1746. itemStyle: {
  1747. fontSize: '20px',
  1748. color: '#fff',
  1749. x: 20,
  1750. fontWeight: 0,
  1751. fontFamily: 'Microsoft YaHei'
  1752. },
  1753. },
  1754. title: {
  1755. text: '传统产业分析',
  1756. style: {
  1757. color: '#fff',
  1758. fontSize: 24,
  1759. fontFamily: 'Microsoft YaHei'
  1760. },
  1761. align: 'center',
  1762. verticalAlign: "bottom",
  1763. x: -120
  1764. },
  1765. tooltip: {
  1766. crosshairs: true,
  1767. backgroundColor: 'rgba(0,0,0,0.5)',
  1768. // positioner: function(e){
  1769. // console.log(e, this)
  1770. // },
  1771. useHTML: false, //开启html模式
  1772. style: {
  1773. color: '#fff',
  1774. fontSize: '20',
  1775. fontFamily: 'Microsoft YaHei'
  1776. },
  1777. formatter: function (e) {
  1778. //console.log(this)
  1779. let num = chartData[this.colorIndex].num
  1780. this.percentage = this.percentage.toFixed(2) //Math.round(this.percentage)
  1781. return `${this.key}:<b>${this.percentage}%</b><br/><b>${this.y}</b>亿,<b>${num}个</b>`
  1782. },
  1783. //pointFormat:
  1784. },
  1785. plotOptions: {
  1786. pie: {
  1787. allowPointSelect: true,
  1788. showInLegend: true, // 图例
  1789. cursor: 'pointer',
  1790. size: 220,
  1791. innerSize: 150, //环形图中间空白,0为饼图
  1792. depth: 25, //立体高度
  1793. slicedOffset: 21, //动画距离
  1794. dataLabels: {
  1795. enabled: false, // 是否展示指示线
  1796. format: '{point.name}: {point.percentage}'
  1797. }
  1798. },
  1799. },
  1800. series: [{
  1801. type: 'pie',
  1802. name: '占比',
  1803. //center: ['35%','50%'],
  1804. point: {
  1805. events: {
  1806. click: function (e) { //点击事件
  1807. that.showChartLTipDouble(e.point.name)
  1808. },
  1809. mouseOver: function (e) { //鼠标移入停止轮播并且找到移入的当前数据设为选中
  1810. //console.log(e)
  1811. chartData.forEach((item, index) => {
  1812. item.sliced = false
  1813. item.selected = false
  1814. })
  1815. chartData[e.target.index].sliced = true
  1816. chartData[e.target.index].selected = true
  1817. chart.update({
  1818. series: [{
  1819. type: 'pie',
  1820. name: '占比',
  1821. point: {
  1822. events: {
  1823. click: function (e) {
  1824. that.showChartLTipDouble(e.point.name)
  1825. }
  1826. }
  1827. },
  1828. data: chartData
  1829. }]
  1830. })
  1831. timer && clearInterval(timer);
  1832. },
  1833. mouseOut: function () { // 鼠标移出后需要继续执行轮播
  1834. var points = chart.series[0].points;
  1835. var len = points.length;
  1836. timer && clearInterval(timer);
  1837. timer = setInterval(function () {
  1838. autoTooltip(points[i]);
  1839. chartData.forEach((item, index) => {
  1840. item.sliced = false
  1841. item.selected = false
  1842. if (index == i) {
  1843. item.sliced = true
  1844. item.selected = true
  1845. }
  1846. })
  1847. chart.update({
  1848. series: [{
  1849. type: 'pie',
  1850. name: '占比',
  1851. point: {
  1852. events: {
  1853. click: function (e) {
  1854. that.showChartLTipDouble(e.point.name)
  1855. }
  1856. }
  1857. },
  1858. data: chartData
  1859. }]
  1860. })
  1861. i++;
  1862. if (i === len) {
  1863. i = 0;
  1864. }
  1865. }, 2000);
  1866. }
  1867. }
  1868. },
  1869. data: chartData
  1870. }]
  1871. }
  1872. var chart = Highcharts.chart('echartL5', option);
  1873. function autoTooltip (point) {
  1874. chart.tooltip.refresh(point);
  1875. }
  1876. },
  1877. initChartL6 () {
  1878. var chartData = left8
  1879. var timer = null;
  1880. var i = 0;
  1881. let that = this
  1882. var option = {
  1883. colors: ['#74a55d', '#cea446', '#b84b4b', '#5593ab', '#2a7652', '#c3643c', '#714585', '#b75d9f'],
  1884. chart: {
  1885. type: 'pie',
  1886. backgroundColor: 'rgba(0,0,0,0)',
  1887. options3d: {
  1888. enabled: true,
  1889. alpha: 45,
  1890. //beta: 0
  1891. },
  1892. events: {
  1893. // load,图表加载完成时触发
  1894. load: function () {
  1895. var chart = this;
  1896. var points = chart.series[0].points;
  1897. var len = points.length;
  1898. timer && clearInterval(timer);
  1899. timer = setInterval(function () {
  1900. autoTooltip(points[i]);
  1901. chartData.forEach((item, index) => {
  1902. item.sliced = false
  1903. item.selected = false
  1904. if (index == i) {
  1905. item.sliced = true
  1906. item.selected = true
  1907. }
  1908. })
  1909. chart.update({
  1910. series: [{
  1911. type: 'pie',
  1912. name: '占比',
  1913. point: {
  1914. events: {
  1915. click: function (e) {
  1916. that.showChartLTipDouble(e.point.name)
  1917. }
  1918. }
  1919. },
  1920. data: chartData
  1921. }]
  1922. })
  1923. i++;
  1924. if (i === len) {
  1925. i = 0;
  1926. }
  1927. }, 2000);
  1928. },
  1929. legendItemClick: function (event) {
  1930. console.log(event);
  1931. return true;
  1932. }
  1933. }
  1934. },
  1935. credits: {
  1936. enabled: false //去掉hightchats水印
  1937. },
  1938. legend: {
  1939. // labelFormatter: function() {
  1940. // return 123;
  1941. // },
  1942. align: 'right',//横向位置
  1943. verticalAlign: 'middle', // 纵向位置
  1944. layout: "vertical",//横排还是竖排
  1945. x: -30,
  1946. y: 30,
  1947. symbolWidth: 50,
  1948. itemDistance: 50,
  1949. itemStyle: {
  1950. fontSize: '20px',
  1951. color: '#fff',
  1952. x: 20,
  1953. fontWeight: 0,
  1954. fontFamily: 'Microsoft YaHei'
  1955. },
  1956. },
  1957. title: {
  1958. text: '战略性新兴产业',
  1959. style: {
  1960. color: '#fff',
  1961. fontSize: 24,
  1962. fontFamily: 'Microsoft YaHei'
  1963. },
  1964. align: 'center',
  1965. verticalAlign: "bottom",
  1966. x: -120
  1967. },
  1968. tooltip: {
  1969. crosshairs: true,
  1970. backgroundColor: 'rgba(0,0,0,0.5)',
  1971. // positioner: function(e){
  1972. // console.log(e, this)
  1973. // },
  1974. useHTML: false, //开启html模式
  1975. style: {
  1976. color: '#fff',
  1977. fontSize: '20',
  1978. fontFamily: 'Microsoft YaHei'
  1979. },
  1980. formatter: function (e) {
  1981. //console.log(this)
  1982. let num = chartData[this.colorIndex].num
  1983. this.percentage = this.percentage.toFixed(2) //Math.round(this.percentage)
  1984. return `${this.key}:<b>${this.percentage}%</b><br/><b>${this.y}</b>亿,<b>${num}个</b>`
  1985. },
  1986. //pointFormat:
  1987. },
  1988. plotOptions: {
  1989. pie: {
  1990. allowPointSelect: true,
  1991. showInLegend: true, // 图例
  1992. cursor: 'pointer',
  1993. size: 220,
  1994. innerSize: 150, //环形图中间空白,0为饼图
  1995. depth: 25, //立体高度
  1996. slicedOffset: 21, //动画距离
  1997. dataLabels: {
  1998. enabled: false, // 是否展示指示线
  1999. format: '{point.name}: {point.percentage}'
  2000. }
  2001. },
  2002. },
  2003. series: [{
  2004. type: 'pie',
  2005. name: '占比',
  2006. //center: ['35%','50%'],
  2007. point: {
  2008. events: {
  2009. click: function (e) { //点击事件
  2010. that.showChartLTipDouble(e.point.name)
  2011. },
  2012. mouseOver: function (e) { //鼠标移入停止轮播并且找到移入的当前数据设为选中
  2013. //console.log(e)
  2014. chartData.forEach((item, index) => {
  2015. item.sliced = false
  2016. item.selected = false
  2017. })
  2018. chartData[e.target.index].sliced = true
  2019. chartData[e.target.index].selected = true
  2020. chart.update({
  2021. series: [{
  2022. type: 'pie',
  2023. name: '占比',
  2024. point: {
  2025. events: {
  2026. click: function (e) {
  2027. that.showChartLTipDouble(e.point.name)
  2028. }
  2029. }
  2030. },
  2031. data: chartData
  2032. }]
  2033. })
  2034. timer && clearInterval(timer);
  2035. },
  2036. mouseOut: function () { // 鼠标移出后需要继续执行轮播
  2037. var points = chart.series[0].points;
  2038. var len = points.length;
  2039. timer && clearInterval(timer);
  2040. timer = setInterval(function () {
  2041. autoTooltip(points[i]);
  2042. chartData.forEach((item, index) => {
  2043. item.sliced = false
  2044. item.selected = false
  2045. if (index == i) {
  2046. item.sliced = true
  2047. item.selected = true
  2048. }
  2049. })
  2050. chart.update({
  2051. series: [{
  2052. type: 'pie',
  2053. name: '占比',
  2054. point: {
  2055. events: {
  2056. click: function (e) {
  2057. that.showChartLTipDouble(e.point.name)
  2058. }
  2059. }
  2060. },
  2061. data: chartData
  2062. }]
  2063. })
  2064. i++;
  2065. if (i === len) {
  2066. i = 0;
  2067. }
  2068. }, 2000);
  2069. }
  2070. }
  2071. },
  2072. data: chartData
  2073. }]
  2074. }
  2075. var chart = Highcharts.chart('echartL6', option);
  2076. function autoTooltip (point) {
  2077. chart.tooltip.refresh(point);
  2078. }
  2079. },
  2080. initChartL7 () {
  2081. var chartData = left9
  2082. var timer = null;
  2083. var i = 0;
  2084. let that = this
  2085. var option = {
  2086. colors: ['#74a55d', '#cea446', '#b84b4b', '#5593ab', '#2a7652', '#c3643c', '#714585', '#b75d9f'],
  2087. chart: {
  2088. type: 'pie',
  2089. backgroundColor: 'rgba(0,0,0,0)',
  2090. options3d: {
  2091. enabled: true,
  2092. alpha: 45,
  2093. //beta: 0
  2094. },
  2095. events: {
  2096. // load,图表加载完成时触发
  2097. load: function () {
  2098. var chart = this;
  2099. var points = chart.series[0].points;
  2100. var len = points.length;
  2101. timer && clearInterval(timer);
  2102. timer = setInterval(function () {
  2103. autoTooltip(points[i]);
  2104. chartData.forEach((item, index) => {
  2105. item.sliced = false
  2106. item.selected = false
  2107. if (index == i) {
  2108. item.sliced = true
  2109. item.selected = true
  2110. }
  2111. })
  2112. chart.update({
  2113. series: [{
  2114. type: 'pie',
  2115. name: '占比',
  2116. point: {
  2117. events: {
  2118. click: function (e) {
  2119. that.showChartLTipDouble(e.point.name)
  2120. }
  2121. }
  2122. },
  2123. data: chartData
  2124. }]
  2125. })
  2126. i++;
  2127. if (i === len) {
  2128. i = 0;
  2129. }
  2130. }, 2000);
  2131. },
  2132. legendItemClick: function (event) {
  2133. console.log(event);
  2134. return true;
  2135. }
  2136. }
  2137. },
  2138. credits: {
  2139. enabled: false //去掉hightchats水印
  2140. },
  2141. title: {
  2142. text: '特色优势产业',
  2143. style: {
  2144. color: '#fff',
  2145. fontSize: 24,
  2146. fontFamily: 'Microsoft YaHei'
  2147. },
  2148. align: 'center',
  2149. verticalAlign: "bottom",
  2150. x: -120
  2151. },
  2152. legend: {
  2153. // labelFormatter: function() {
  2154. // return 123;
  2155. // },
  2156. align: 'right',//横向位置
  2157. verticalAlign: 'middle', // 纵向位置
  2158. layout: "vertical",//横排还是竖排
  2159. x: -50,
  2160. y: 30,
  2161. symbolWidth: 50,
  2162. itemDistance: 50,
  2163. itemStyle: {
  2164. fontSize: '20px',
  2165. color: '#fff',
  2166. x: 20,
  2167. fontWeight: 0,
  2168. fontFamily: 'Microsoft YaHei'
  2169. },
  2170. },
  2171. tooltip: {
  2172. crosshairs: true,
  2173. backgroundColor: 'rgba(0,0,0,0.5)',
  2174. // positioner: function(e){
  2175. // console.log(e, this)
  2176. // },
  2177. useHTML: false, //开启html模式
  2178. style: {
  2179. color: '#fff',
  2180. fontSize: '20',
  2181. fontFamily: 'Microsoft YaHei'
  2182. },
  2183. formatter: function (e) {
  2184. //console.log(this)
  2185. let num = chartData[this.colorIndex].num
  2186. this.percentage = this.percentage.toFixed(2) //Math.round(this.percentage)
  2187. return `${this.key}:<b>${this.percentage}%</b><br/><b>${this.y}</b>亿,<b>${num}个</b>`
  2188. },
  2189. //pointFormat:
  2190. },
  2191. plotOptions: {
  2192. pie: {
  2193. allowPointSelect: true,
  2194. showInLegend: true, // 图例
  2195. cursor: 'pointer',
  2196. size: 220,
  2197. innerSize: 150, //环形图中间空白,0为饼图
  2198. depth: 25, //立体高度
  2199. slicedOffset: 21, //动画距离
  2200. dataLabels: {
  2201. enabled: false, // 是否展示指示线
  2202. format: '{point.name}: {point.percentage}'
  2203. }
  2204. },
  2205. },
  2206. series: [{
  2207. type: 'pie',
  2208. name: '占比',
  2209. //center: ['35%','50%'],
  2210. point: {
  2211. events: {
  2212. click: function (e) { //点击事件
  2213. that.showChartLTipDouble(e.point.name)
  2214. },
  2215. mouseOver: function (e) { //鼠标移入停止轮播并且找到移入的当前数据设为选中
  2216. //console.log(e)
  2217. chartData.forEach((item, index) => {
  2218. item.sliced = false
  2219. item.selected = false
  2220. })
  2221. chartData[e.target.index].sliced = true
  2222. chartData[e.target.index].selected = true
  2223. chart.update({
  2224. series: [{
  2225. type: 'pie',
  2226. name: '占比',
  2227. point: {
  2228. events: {
  2229. click: function (e) {
  2230. that.showChartLTipDouble(e.point.name)
  2231. }
  2232. }
  2233. },
  2234. data: chartData
  2235. }]
  2236. })
  2237. timer && clearInterval(timer);
  2238. },
  2239. mouseOut: function () { // 鼠标移出后需要继续执行轮播
  2240. var points = chart.series[0].points;
  2241. var len = points.length;
  2242. timer && clearInterval(timer);
  2243. timer = setInterval(function () {
  2244. autoTooltip(points[i]);
  2245. chartData.forEach((item, index) => {
  2246. item.sliced = false
  2247. item.selected = false
  2248. if (index == i) {
  2249. item.sliced = true
  2250. item.selected = true
  2251. }
  2252. })
  2253. chart.update({
  2254. series: [{
  2255. type: 'pie',
  2256. name: '占比',
  2257. point: {
  2258. events: {
  2259. click: function (e) {
  2260. that.showChartLTipDouble(e.point.name)
  2261. }
  2262. }
  2263. },
  2264. data: chartData
  2265. }]
  2266. })
  2267. i++;
  2268. if (i === len) {
  2269. i = 0;
  2270. }
  2271. }, 2000);
  2272. }
  2273. }
  2274. },
  2275. data: chartData
  2276. }]
  2277. }
  2278. var chart = Highcharts.chart('echartL7', option);
  2279. function autoTooltip (point) {
  2280. chart.tooltip.refresh(point);
  2281. }
  2282. },
  2283. initChartL8 () {
  2284. var chartData = left10
  2285. var timer = null;
  2286. var i = 0;
  2287. let that = this
  2288. var option = {
  2289. colors: ['#74a55d', '#cea446', '#b84b4b', '#5593ab', '#2a7652', '#c3643c', '#714585', '#b75d9f'],
  2290. chart: {
  2291. type: 'pie',
  2292. backgroundColor: 'rgba(0,0,0,0)',
  2293. options3d: {
  2294. enabled: true,
  2295. alpha: 45,
  2296. //beta: 0
  2297. },
  2298. events: {
  2299. // load,图表加载完成时触发
  2300. load: function () {
  2301. var chart = this;
  2302. var points = chart.series[0].points;
  2303. var len = points.length;
  2304. timer && clearInterval(timer);
  2305. timer = setInterval(function () {
  2306. autoTooltip(points[i]);
  2307. chartData.forEach((item, index) => {
  2308. item.sliced = false
  2309. item.selected = false
  2310. if (index == i) {
  2311. item.sliced = true
  2312. item.selected = true
  2313. }
  2314. })
  2315. chart.update({
  2316. series: [{
  2317. type: 'pie',
  2318. name: '占比',
  2319. point: {
  2320. events: {
  2321. click: function (e) {
  2322. that.showChartLTipDouble(e.point.name)
  2323. }
  2324. }
  2325. },
  2326. data: chartData
  2327. }]
  2328. })
  2329. i++;
  2330. if (i === len) {
  2331. i = 0;
  2332. }
  2333. }, 2000);
  2334. },
  2335. legendItemClick: function (event) {
  2336. console.log(event);
  2337. return true;
  2338. }
  2339. }
  2340. },
  2341. credits: {
  2342. enabled: false //去掉hightchats水印
  2343. },
  2344. title: {
  2345. text: '公共基础等产业',
  2346. style: {
  2347. color: '#fff',
  2348. fontSize: 24,
  2349. fontFamily: 'Microsoft YaHei'
  2350. },
  2351. align: 'center',
  2352. verticalAlign: "bottom",
  2353. x: -120
  2354. },
  2355. legend: {
  2356. // labelFormatter: function() {
  2357. // return 123;
  2358. // },
  2359. align: 'right',//横向位置
  2360. verticalAlign: 'middle', // 纵向位置
  2361. layout: "vertical",//横排还是竖排
  2362. x: -70,
  2363. y: 50,
  2364. symbolWidth: 50,
  2365. itemDistance: 50,
  2366. itemStyle: {
  2367. fontSize: '20px',
  2368. color: '#fff',
  2369. x: 20,
  2370. fontWeight: 0,
  2371. fontFamily: 'Microsoft YaHei'
  2372. },
  2373. },
  2374. tooltip: {
  2375. crosshairs: true,
  2376. backgroundColor: 'rgba(0,0,0,0.5)',
  2377. // positioner: function(e){
  2378. // console.log(e, this)
  2379. // },
  2380. useHTML: false, //开启html模式
  2381. style: {
  2382. color: '#fff',
  2383. fontSize: '20',
  2384. fontFamily: 'Microsoft YaHei'
  2385. },
  2386. formatter: function (e) {
  2387. //console.log(this)
  2388. let num = chartData[this.colorIndex].num
  2389. this.percentage = this.percentage.toFixed(2) //Math.round(this.percentage)
  2390. return `${this.key}:<b>${this.percentage}%</b><br/><b>${this.y}</b>亿,<b>${num}个</b>`
  2391. },
  2392. //pointFormat:
  2393. },
  2394. plotOptions: {
  2395. pie: {
  2396. allowPointSelect: true,
  2397. showInLegend: true, // 图例
  2398. cursor: 'pointer',
  2399. size: 220,
  2400. innerSize: 150, //环形图中间空白,0为饼图
  2401. depth: 25, //立体高度
  2402. slicedOffset: 21, //动画距离
  2403. dataLabels: {
  2404. enabled: false, // 是否展示指示线
  2405. format: '{point.name}: {point.percentage}'
  2406. }
  2407. },
  2408. },
  2409. series: [{
  2410. type: 'pie',
  2411. name: '占比',
  2412. //center: ['35%','50%'],
  2413. point: {
  2414. events: {
  2415. click: function (e) { //点击事件
  2416. that.showChartLTipDouble(e.point.name)
  2417. },
  2418. mouseOver: function (e) { //鼠标移入停止轮播并且找到移入的当前数据设为选中
  2419. //console.log(e)
  2420. chartData.forEach((item, index) => {
  2421. item.sliced = false
  2422. item.selected = false
  2423. })
  2424. chartData[e.target.index].sliced = true
  2425. chartData[e.target.index].selected = true
  2426. chart.update({
  2427. series: [{
  2428. type: 'pie',
  2429. name: '占比',
  2430. point: {
  2431. events: {
  2432. click: function (e) {
  2433. that.showChartLTipDouble(e.point.name)
  2434. }
  2435. }
  2436. },
  2437. data: chartData
  2438. }]
  2439. })
  2440. timer && clearInterval(timer);
  2441. },
  2442. mouseOut: function () { // 鼠标移出后需要继续执行轮播
  2443. var points = chart.series[0].points;
  2444. var len = points.length;
  2445. timer && clearInterval(timer);
  2446. timer = setInterval(function () {
  2447. autoTooltip(points[i]);
  2448. chartData.forEach((item, index) => {
  2449. item.sliced = false
  2450. item.selected = false
  2451. if (index == i) {
  2452. item.sliced = true
  2453. item.selected = true
  2454. }
  2455. })
  2456. chart.update({
  2457. series: [{
  2458. type: 'pie',
  2459. name: '占比',
  2460. point: {
  2461. events: {
  2462. click: function (e) {
  2463. that.showChartLTipDouble(e.point.name)
  2464. }
  2465. }
  2466. },
  2467. data: chartData
  2468. }]
  2469. })
  2470. i++;
  2471. if (i === len) {
  2472. i = 0;
  2473. }
  2474. }, 2000);
  2475. }
  2476. }
  2477. },
  2478. data: chartData
  2479. }]
  2480. }
  2481. var chart = Highcharts.chart('echartL8', option);
  2482. function autoTooltip (point) {
  2483. chart.tooltip.refresh(point);
  2484. }
  2485. },
  2486. initChartL9 () {
  2487. this.chartCarousel = echarts.init(document.getElementById("echartL9"));
  2488. option = {
  2489. tooltip: {
  2490. trigger: 'axis',
  2491. formatter: '指标:' + '{c0}' + '<br/>' + '发展线:' + '{c1}' + '<br/>' + '生存线:' + '{c2}', //+ '<br/>'+ '{a1}:{c1}' + '%',
  2492. axisPointer: {
  2493. type: 'shadow',
  2494. },
  2495. },
  2496. grid: {
  2497. top: '10%',
  2498. right: '5%',
  2499. left: '12%',
  2500. bottom: '15%',
  2501. },
  2502. xAxis: {
  2503. // data: ['总投资收益率', '销售利润率', '成本费用利润率', '总资产周转率', '财务内部收益率'],
  2504. data: left15[this.countType],
  2505. axisLine: {
  2506. show: true, //隐藏X轴轴线
  2507. lineStyle: {
  2508. color: '#005094',
  2509. width: 1,
  2510. },
  2511. },
  2512. axisTick: {
  2513. show: true, //隐藏X轴刻度
  2514. },
  2515. axisLabel: {
  2516. show: true,
  2517. rotate: 30,
  2518. textStyle: {
  2519. color: '#fff', //X轴文字颜色
  2520. fontSize: 20,
  2521. fontFamily: 'Microsoft YaHei'
  2522. },
  2523. },
  2524. },
  2525. yAxis: [
  2526. {
  2527. type: 'value',
  2528. splitLine: {
  2529. show: true,
  2530. lineStyle: {
  2531. color: '#68b4dd66',
  2532. type: 'dashed',
  2533. },
  2534. },
  2535. axisLine: {
  2536. show: false
  2537. },
  2538. axisLabel: {
  2539. show: true,
  2540. formatter: '{value}%',
  2541. textStyle: {
  2542. color: '#fff',
  2543. fontSize: 20,
  2544. fontFamily: 'Microsoft YaHei'
  2545. },
  2546. },
  2547. nameTextStyle: {
  2548. color: '#ebf8ac',
  2549. fontSize: 16,
  2550. fontFamily: 'Microsoft YaHei'
  2551. },
  2552. },
  2553. ],
  2554. series: [
  2555. {
  2556. name: '实际值',
  2557. type: 'bar',
  2558. barWidth: 20,
  2559. itemStyle: {
  2560. normal: {
  2561. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  2562. {
  2563. offset: 0,
  2564. color: '#69c0ff',
  2565. },
  2566. {
  2567. offset: 1,
  2568. color: '#082550',
  2569. },
  2570. ]),
  2571. },
  2572. },
  2573. // data: [70, 52, 33, 41, 52],
  2574. data: left12[this.count + 1][2]
  2575. },
  2576. {
  2577. name: '',
  2578. type: 'line',
  2579. barWidth: 15,
  2580. itemStyle: {
  2581. normal: {
  2582. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  2583. {
  2584. offset: 0,
  2585. color: '#69c0ff',
  2586. },
  2587. {
  2588. offset: 1,
  2589. color: 'green',
  2590. },
  2591. ]),
  2592. },
  2593. },
  2594. // data: [20, 30, 15, 28, 36],
  2595. data: left12[this.count + 1][1]
  2596. },
  2597. {
  2598. name: '',
  2599. type: 'line',
  2600. barWidth: 15,
  2601. itemStyle: {
  2602. normal: {
  2603. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  2604. {
  2605. offset: 0,
  2606. color: '#69c0ff',
  2607. },
  2608. {
  2609. offset: 1,
  2610. color: 'yellow',
  2611. },
  2612. ]),
  2613. },
  2614. },
  2615. // data: [15, 22, 17, 33, 14],
  2616. data: left12[this.count + 1][0]
  2617. },
  2618. ],
  2619. }
  2620. let that = this
  2621. this.chartCarousel.on('click', function (param) {
  2622. that.titleName = param.name
  2623. that.echartSingleTipShow = true
  2624. setTimeout(() => {
  2625. that.initChartLTip()
  2626. });
  2627. })
  2628. this.chartCarousel.setOption(option)
  2629. // tools.loopShowTooltip(myChart, option, {
  2630. // nterval: 2000,
  2631. // loopSeries: true,
  2632. // })
  2633. },
  2634. initChartL10 () {
  2635. let myChart = echarts.init(document.getElementById("echartL10"));
  2636. let option = {
  2637. title: {
  2638. text: '固定资产进度分布',
  2639. textStyle: {
  2640. color: '#69C0FF',
  2641. fontSize: 30,
  2642. fontWeight: 500,
  2643. fontFamily: 'Microsoft YaHei'
  2644. },
  2645. top: '20',
  2646. left: '20'
  2647. },
  2648. textStyle: {
  2649. color: '#fff',
  2650. },
  2651. tooltip: {
  2652. trigger: "axis",
  2653. formatter: function (params) {
  2654. 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] + '亿元';
  2655. return tip
  2656. },
  2657. textStyle: {
  2658. color: '#ffffff', // 文字的颜色
  2659. fontSize: '20', // 文字字体大小
  2660. fontFamily: 'Microsoft YaHei'
  2661. },
  2662. axisPointer: {
  2663. // lineStyle: {
  2664. // type: 'dashed',
  2665. // width: 2,
  2666. // color: 'rgba(255,255,255,0.6)'
  2667. // },
  2668. animation: false
  2669. }
  2670. },
  2671. grid: {
  2672. top: '0%',
  2673. right: '5%',
  2674. left: '15%',
  2675. bottom: '-10%',
  2676. },
  2677. yAxis: {
  2678. data: ['备案', '特别监管'],
  2679. splitLine: {
  2680. show: false,
  2681. lineStyle: {
  2682. color: '#68b4dd66',
  2683. type: 'dashed',
  2684. },
  2685. },
  2686. axisLine: {
  2687. show: false
  2688. },
  2689. axisLabel: {
  2690. show: true,
  2691. formatter: '{value}',
  2692. textStyle: {
  2693. color: '#fff',
  2694. fontSize: 20,
  2695. padding: [0, -10, 0, 0],
  2696. fontFamily: 'Microsoft YaHei',
  2697. },
  2698. },
  2699. nameTextStyle: {
  2700. color: '#ebf8ac',
  2701. fontSize: 16,
  2702. fontFamily: 'Microsoft YaHei'
  2703. },
  2704. },
  2705. xAxis: {
  2706. data: ['项目储备', '项目立项', '可研论证', '投资决策'],
  2707. axisLine: {
  2708. show: true, //隐藏X轴轴线
  2709. lineStyle: {
  2710. color: '#005094',
  2711. width: 1,
  2712. },
  2713. },
  2714. axisTick: {
  2715. show: false, //隐藏X轴刻度
  2716. },
  2717. axisLabel: {
  2718. show: true,
  2719. textStyle: {
  2720. color: '#fff', //X轴文字颜色
  2721. fontSize: 20,
  2722. padding: [-320, 0, 0, 0],
  2723. fontFamily: 'Microsoft YaHei'
  2724. },
  2725. }
  2726. },
  2727. series: [
  2728. {
  2729. name: '特别监管',
  2730. type: 'scatter',
  2731. symbol: 'circle',//'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow'
  2732. symbolSize: function (data) {
  2733. return Math.sqrt(data[2]) * 5;
  2734. },
  2735. // label: {
  2736. // emphasis: {
  2737. // show: true,
  2738. // formatter: function (param) {
  2739. // return param.data[2];
  2740. // },
  2741. // position: 'top'
  2742. // }
  2743. // },
  2744. itemStyle: {
  2745. normal: {
  2746. color: '#69c0ff'
  2747. }
  2748. },
  2749. data: left13[0]
  2750. },
  2751. {
  2752. name: '备案',
  2753. type: 'scatter',
  2754. symbol: 'circle',//'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow'
  2755. symbolSize: function (data) {
  2756. return Math.sqrt(data[2]) * 5;
  2757. },
  2758. // label: {
  2759. // emphasis: {
  2760. // show: true,
  2761. // formatter: function (param) {
  2762. // return param.data[2];
  2763. // },
  2764. // position: 'top'
  2765. // }
  2766. // },
  2767. itemStyle: {
  2768. normal: {
  2769. color: '#957DFF'
  2770. }
  2771. },
  2772. data: left13[1]
  2773. },
  2774. ]
  2775. }
  2776. let that = this
  2777. myChart.on('click', function (param) {
  2778. that.showChartLTipDouble('固定资产')
  2779. })
  2780. myChart.setOption(option)
  2781. tools.loopShowTooltip(myChart, option, {
  2782. nterval: 2000,
  2783. loopSeries: true,
  2784. })
  2785. },
  2786. initChartL11 () {
  2787. let myChart = echarts.init(document.getElementById("echartL11"));
  2788. let option = {
  2789. title: {
  2790. text: '股权类进度分布',
  2791. textStyle: {
  2792. color: '#69C0FF',
  2793. fontSize: 30,
  2794. fontWeight: 500,
  2795. fontFamily: 'Microsoft YaHei'
  2796. },
  2797. top: '20',
  2798. left: '20'
  2799. },
  2800. textStyle: {
  2801. color: '#fff',
  2802. },
  2803. tooltip: {
  2804. trigger: "axis",
  2805. formatter: function (params) {
  2806. 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] + '亿元';
  2807. return tip
  2808. },
  2809. textStyle: {
  2810. color: '#FFF', // 文字的颜色
  2811. fontSize: '20', // 文字字体大小
  2812. fontFamily: 'Microsoft YaHei'
  2813. },
  2814. axisPointer: {
  2815. // lineStyle: {
  2816. // type: 'dashed',
  2817. // width: 2,
  2818. // color: 'rgba(255,255,255,0.6)'
  2819. // },
  2820. animation: true
  2821. }
  2822. },
  2823. grid: {
  2824. top: '0%',
  2825. right: '5%',
  2826. left: '15%',
  2827. bottom: '-10%',
  2828. },
  2829. yAxis: {
  2830. data: ['备案', '特别监管'],
  2831. splitLine: {
  2832. show: false,
  2833. lineStyle: {
  2834. color: '#68b4dd66',
  2835. type: 'dashed',
  2836. },
  2837. },
  2838. axisLine: {
  2839. show: false
  2840. },
  2841. axisLabel: {
  2842. show: true,
  2843. formatter: '{value}',
  2844. textStyle: {
  2845. fontSize: 20,
  2846. padding: [0, -10, 0, 0],
  2847. fontFamily: 'Microsoft YaHei'
  2848. },
  2849. },
  2850. nameTextStyle: {
  2851. color: '#ebf8ac',
  2852. fontSize: 16,
  2853. fontFamily: 'Microsoft YaHei'
  2854. },
  2855. },
  2856. xAxis: {
  2857. data: ['项目储备', '项目立项', '可研论证', '投资决策'],
  2858. axisLine: {
  2859. show: true, //隐藏X轴轴线
  2860. lineStyle: {
  2861. color: '#005094',
  2862. width: 1,
  2863. },
  2864. },
  2865. axisTick: {
  2866. show: true, //隐藏X轴刻度
  2867. },
  2868. axisLabel: {
  2869. show: true,
  2870. textStyle: {
  2871. color: '#fff', //X轴文字颜色
  2872. fontSize: 20,
  2873. padding: [-320, 0, 0, 0],
  2874. fontFamily: 'Microsoft YaHei'
  2875. },
  2876. },
  2877. },
  2878. series: [
  2879. {
  2880. name: '',
  2881. type: 'scatter',
  2882. symbol: 'circle',
  2883. symbolSize: function (data) {
  2884. return Math.sqrt(data[2]) * 5;
  2885. },
  2886. // label: {
  2887. // emphasis: {
  2888. // show: true,
  2889. // formatter: function (param) {
  2890. // return param.data[2];
  2891. // },
  2892. // position: 'top'
  2893. // }
  2894. // },
  2895. itemStyle: {
  2896. normal: {
  2897. color: '#40A9FF'
  2898. }
  2899. },
  2900. data: left14[0]
  2901. },
  2902. {
  2903. name: '',
  2904. type: 'scatter',
  2905. symbol: 'circle',
  2906. symbolSize: function (data) {
  2907. return Math.sqrt(data[2]) * 5;
  2908. },
  2909. // label: {
  2910. // emphasis: {
  2911. // show: true,
  2912. // formatter: function (param) {
  2913. // return param.data[2];
  2914. // },
  2915. // position: 'top'
  2916. // }
  2917. // },
  2918. itemStyle: {
  2919. normal: {
  2920. color: '#957DFF'
  2921. }
  2922. },
  2923. data: left14[1]
  2924. },
  2925. ]
  2926. }
  2927. let that = this
  2928. myChart.on('click', function (param) {
  2929. that.showChartLTipDouble('股权类')
  2930. })
  2931. myChart.setOption(option)
  2932. tools.loopShowTooltip(myChart, option, {
  2933. nterval: 2000,
  2934. loopSeries: true,
  2935. })
  2936. },
  2937. // 大屏二
  2938. initChartC1 () {
  2939. var chartData = center2
  2940. var timer = null;
  2941. var i = 0;
  2942. let that = this
  2943. var option = {
  2944. colors: ['#74a55d', '#cea446', '#b84b4b', '#5593ab', '#2a7652', '#c3643c', '#714585', '#b75d9f'],
  2945. chart: {
  2946. type: 'pie',
  2947. backgroundColor: 'rgba(0,0,0,0)',
  2948. options3d: {
  2949. enabled: true,
  2950. alpha: 60,
  2951. //beta: 0
  2952. },
  2953. events: {
  2954. // load,图表加载完成时触发
  2955. load: function () {
  2956. var chart = this;
  2957. var points = chart.series[0].points;
  2958. var len = points.length;
  2959. timer && clearInterval(timer);
  2960. timer = setInterval(function () {
  2961. autoTooltip(points[i]);
  2962. chartData.forEach((item, index) => {
  2963. item.sliced = false
  2964. item.selected = false
  2965. if (index == i) {
  2966. item.sliced = true
  2967. item.selected = true
  2968. }
  2969. })
  2970. chart.update({
  2971. series: [{
  2972. type: 'pie',
  2973. name: '占比',
  2974. point: {
  2975. events: {
  2976. click: function (e) {
  2977. that.showChartLTipDouble(e.point.name)
  2978. }
  2979. }
  2980. },
  2981. data: chartData
  2982. }]
  2983. })
  2984. i++;
  2985. if (i === len) {
  2986. i = 0;
  2987. }
  2988. }, 2000);
  2989. },
  2990. legendItemClick: function (event) {
  2991. console.log(event);
  2992. return true;
  2993. }
  2994. }
  2995. },
  2996. credits: {
  2997. enabled: false //去掉hightchats水印
  2998. },
  2999. legend: {
  3000. layout: 'vertical',
  3001. align: 'right',
  3002. y: -10,
  3003. verticalAlign: 'bottom',
  3004. itemStyle: {
  3005. fontSize: '20px',
  3006. color: '#fff',
  3007. fontWeight: 0,
  3008. fontFamily: 'Microsoft YaHei'
  3009. }
  3010. },
  3011. tooltip: {
  3012. crosshairs: true,
  3013. backgroundColor: 'rgba(0,0,0,0.5)',
  3014. useHTML: false, //开启html模式
  3015. style: {
  3016. color: '#fff',
  3017. fontSize: '20',
  3018. fontFamily: 'Microsoft YaHei'
  3019. },
  3020. formatter: function (e) {
  3021. let num = chartData[this.colorIndex].num
  3022. this.percentage = this.percentage.toFixed(2) //Math.round(this.percentage)
  3023. return `${this.key}:<b>${this.percentage}%</b><br/>投资完成额:<b>${this.y}</b>亿<br/>投资数量:<b>${num}个</b>`
  3024. },
  3025. //pointFormat:
  3026. },
  3027. plotOptions: {
  3028. pie: {
  3029. allowPointSelect: true,
  3030. showInLegend: true, // 图例
  3031. cursor: 'pointer',
  3032. size: 500,
  3033. innerSize: 330, //环形图中间空白,0为饼图
  3034. depth: 75, //立体高度
  3035. slicedOffset: 40, //动画距离
  3036. dataLabels: {
  3037. enabled: false, // 是否展示指示线
  3038. format: '{point.name}: {point.percentage}'
  3039. }
  3040. },
  3041. },
  3042. title: {
  3043. text: '',
  3044. style: {
  3045. color: '#fff',
  3046. fontSize: 24,
  3047. fontFamily: 'Microsoft YaHei'
  3048. },
  3049. align: 'center',
  3050. verticalAlign: "bottom",
  3051. x: -120
  3052. },
  3053. series: [{
  3054. type: 'pie',
  3055. name: '占比',
  3056. center: ['74%', '50%'],
  3057. point: {
  3058. events: {
  3059. click: function (e) { //点击事件
  3060. that.showChartLTipDouble(e.point.name)
  3061. },
  3062. mouseOver: function (e) { //鼠标移入停止轮播并且找到移入的当前数据设为选中
  3063. //console.log(e)
  3064. chartData.forEach((item, index) => {
  3065. item.sliced = false
  3066. item.selected = false
  3067. })
  3068. chartData[e.target.index].sliced = true
  3069. chartData[e.target.index].selected = true
  3070. chart.update({
  3071. series: [{
  3072. type: 'pie',
  3073. name: '占比',
  3074. point: {
  3075. events: {
  3076. click: function (e) {
  3077. that.showChartLTipDouble(e.point.name)
  3078. }
  3079. }
  3080. },
  3081. data: chartData
  3082. }]
  3083. })
  3084. timer && clearInterval(timer);
  3085. },
  3086. mouseOut: function () { // 鼠标移出后需要继续执行轮播
  3087. var points = chart.series[0].points;
  3088. var len = points.length;
  3089. timer && clearInterval(timer);
  3090. timer = setInterval(function () {
  3091. autoTooltip(points[i]);
  3092. chartData.forEach((item, index) => {
  3093. item.sliced = false
  3094. item.selected = false
  3095. if (index == i) {
  3096. item.sliced = true
  3097. item.selected = true
  3098. }
  3099. })
  3100. chart.update({
  3101. series: [{
  3102. type: 'pie',
  3103. name: '占比',
  3104. point: {
  3105. events: {
  3106. click: function (e) {
  3107. that.showChartLTipDouble(e.point.name)
  3108. }
  3109. }
  3110. },
  3111. data: chartData
  3112. }]
  3113. })
  3114. i++;
  3115. if (i === len) {
  3116. i = 0;
  3117. }
  3118. }, 2000);
  3119. }
  3120. }
  3121. },
  3122. data: chartData
  3123. }]
  3124. }
  3125. var chart = Highcharts.chart('echartC1', option);
  3126. function autoTooltip (point) {
  3127. chart.tooltip.refresh(point);
  3128. }
  3129. },
  3130. initChartC2 () {
  3131. let that = this
  3132. let myChart = echarts.init(this.$refs['echartC2'])
  3133. myChart.on('showTip', (params) => {
  3134. // 如果是7或者15并且满足防抖则切换
  3135. if ((params.dataIndex == 5 || params.dataIndex == 11) && that.echartC2Fd) {
  3136. that.echartC2Fd = false
  3137. setTimeout(() => {
  3138. option.dataZoom[0].endValue = option.dataZoom[0].endValue + 6
  3139. option.dataZoom[0].startValue = option.dataZoom[0].startValue + 6
  3140. myChart.setOption(option);
  3141. // 防止勿刷新做的防抖
  3142. setTimeout(() => {
  3143. that.echartC2Fd = true
  3144. }, 2000)
  3145. }, 1900);
  3146. // 如果是17表示到了最后一个,那么重新来一遍
  3147. } else if (params.dataIndex == 17 && that.echartC2Fd) {
  3148. that.echartC2Fd = false
  3149. setTimeout(() => {
  3150. option.dataZoom[0].endValue = 0
  3151. option.dataZoom[0].startValue = 5
  3152. myChart.setOption(option);
  3153. // 防止勿刷新做的防抖
  3154. setTimeout(() => {
  3155. that.echartC2Fd = true
  3156. }, 2000)
  3157. }, 1900)
  3158. }
  3159. })
  3160. let option = {
  3161. tooltip: {
  3162. formatter: data => {
  3163. 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}亿`
  3164. },
  3165. trigger: 'axis',
  3166. axisPointer: {
  3167. // type: 'cross',',
  3168. },
  3169. textStyle: {
  3170. color: '#FFF', // 文字的颜色
  3171. fontSize: '20', // 文字字体大小
  3172. fontFamily: 'Microsoft YaHei'
  3173. },
  3174. },
  3175. dataZoom: [
  3176. {
  3177. // start: 9,//默认为@
  3178. // end: 100,//黑认认为1@0
  3179. type: "slider",
  3180. show: false,
  3181. // xAxisIndex: [0]
  3182. handlesize: 0,//滑动条的 左右2个滑动条的大小
  3183. startValue: 5,// 初始显示值
  3184. endValue: 0,// 结束显示值
  3185. height: 10,//组件高度
  3186. left: "5%",
  3187. right: "4%",//右边的距离
  3188. bottom: "25%",//底边的距离
  3189. borderColor: "#939",
  3190. fillerColor: "#269cdb",
  3191. borderRadius: 5,
  3192. backgroundColor: "#33384b",//两边未选中的滑动条区域的额色
  3193. showDataShadow: false,//是否显示数据阴影
  3194. showDetail: false,//即拖拽时候是否显示详细数值信息
  3195. truerealtime: true,//是否实时更新
  3196. filterMode: "filter"
  3197. }, {
  3198. type: 'inside',
  3199. show: true,
  3200. start: 1,
  3201. end: 100,
  3202. zoomOnMouseWheel: false, //滚轮是否触发缩放
  3203. moveOnMouseMove: false, //鼠标滚轮触发滚动
  3204. }
  3205. ],
  3206. grid: {
  3207. top: '10%',
  3208. right: '3%',
  3209. left: '7%',
  3210. bottom: '15%',
  3211. },
  3212. legend: {
  3213. top: '1',
  3214. right: 'center',
  3215. textStyle: {
  3216. color: '#fff',
  3217. fontSize: '20',
  3218. fontFamily: 'Microsoft YaHei'
  3219. },
  3220. },
  3221. xAxis: {
  3222. data: center3.map(item => item.name),
  3223. axisLine: {
  3224. show: true, //隐藏X轴轴线
  3225. lineStyle: {
  3226. color: '#005094',
  3227. width: 1,
  3228. },
  3229. },
  3230. axisTick: {
  3231. show: false, //隐藏X轴刻度
  3232. },
  3233. axisLabel: {
  3234. show: true,
  3235. rotate: 40,
  3236. textStyle: {
  3237. color: '#fff',//'rgba(255,255,255,0.6)', //X轴文字颜色
  3238. fontSize: '20',
  3239. fontFamily: 'Microsoft YaHei'
  3240. },
  3241. },
  3242. },
  3243. yAxis: [
  3244. {
  3245. type: 'value',
  3246. name: '亿元',
  3247. splitLine: {
  3248. show: true,
  3249. lineStyle: {
  3250. color: '#68b4dd66',
  3251. type: 'dashed',
  3252. },
  3253. },
  3254. axisLine: {
  3255. show: true,
  3256. lineStyle: {
  3257. color: '#3D7495',
  3258. },
  3259. },
  3260. axisLabel: {
  3261. show: true,
  3262. textStyle: {
  3263. color: '#fff',
  3264. fontSize: '20',
  3265. fontFamily: 'Microsoft YaHei'
  3266. },
  3267. },
  3268. nameTextStyle: {
  3269. color: '#fff',
  3270. fontSize: 20,
  3271. fontFamily: 'Microsoft YaHei'
  3272. },
  3273. },
  3274. ],
  3275. series: [
  3276. {
  3277. name: '计划投资',
  3278. type: 'bar',
  3279. barWidth: 10,
  3280. itemStyle: {
  3281. normal: {
  3282. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  3283. {
  3284. offset: 0,
  3285. color: '#69c0ff',
  3286. },
  3287. {
  3288. offset: 1,
  3289. color: '#082550',
  3290. },
  3291. ]),
  3292. },
  3293. },
  3294. data: center3.map(item => item.value),
  3295. },
  3296. {
  3297. name: '实际投资',
  3298. type: 'bar',
  3299. barWidth: 10,
  3300. itemStyle: {
  3301. normal: {
  3302. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  3303. {
  3304. offset: 0,
  3305. color: '#957DFF',
  3306. },
  3307. {
  3308. offset: 1,
  3309. color: '#082550',
  3310. },
  3311. ]),
  3312. },
  3313. },
  3314. data: center3.map(item => item.value2),
  3315. },
  3316. ],
  3317. }
  3318. myChart.on('click', function (param) {
  3319. that.projectListTipShow = true
  3320. })
  3321. myChart.setOption(option)
  3322. tools.loopShowTooltip(myChart, option, {
  3323. nterval: 2000,
  3324. loopSeries: true,
  3325. })
  3326. // let arr = center3.map(item => item.value2)
  3327. // this.timeOut = setInterval(function () {
  3328. // let startValue = myChart.getModel().option.dataZoom[0].startValue;
  3329. // let endValue = myChart.getModel().option.dataZoom[0].endValue;
  3330. // let start = myChart.getModel().option.xAxis[0].data[startValue];//起始X轴
  3331. // let end = myChart.getModel().option.xAxis[0].data[endValue];//结束X轴
  3332. // // 每次向后滚动一个,最后一个从头开始。
  3333. // // console.log(option.dataZoom[0].endValue);
  3334. // if (option.dataZoom[0].endValue >= 12) {
  3335. // option.dataZoom[0].endValue = 5
  3336. // option.dataZoom[0].startValue = 0
  3337. // } else {
  3338. // option.dataZoom[0].endValue = option.dataZoom[0].endValue + 6
  3339. // option.dataZoom[0].startValue = option.dataZoom[0].startValue + 6
  3340. // }
  3341. // // myChart.dispatchAction({
  3342. // // type: 'showTip',
  3343. // // seriesIndex: 0,
  3344. // // dataIndex: startValue +1,
  3345. // // });
  3346. // myChart.setOption(option);
  3347. // }, 12000);
  3348. },
  3349. convertData (data) {
  3350. var res = []
  3351. for (var i = 0; i < data.length; i++) {
  3352. var geoCoord = this.geoCoordMap[data[i].name]
  3353. if (geoCoord) {
  3354. res.push({
  3355. name: data[i].name,
  3356. value: geoCoord.concat(data[i].value),
  3357. })
  3358. }
  3359. }
  3360. return res
  3361. },
  3362. initProvinceChart () {
  3363. var data = [
  3364. { name: '大同市', value: 60.35, value2: 28 },
  3365. { name: '朔州市', value: 33.61, value2: 13 },
  3366. { name: '忻州市', value: 73.35, value2: 25 },
  3367. { name: '吕梁市', value: 109.04, value2: 45 },
  3368. { name: '太原市', value: 251.67, value2: 113 },
  3369. { name: '阳泉市', value: 25.12, value2: 28 },
  3370. { name: '晋中市', value: 148.57, value2: 52 },
  3371. { name: '临汾市', value: 130.55, value2: 30 },
  3372. { name: '长治市', value: 103.00, value2: 23 },
  3373. { name: '运城市', value: 41.06, value2: 23 },
  3374. { name: '晋城市', value: 45.43, value2: 31 }
  3375. ]
  3376. this.geoCoordMap = []
  3377. /*获取地图数据*/
  3378. this.mapChart = echarts.init(this.$refs['echarts-map'])
  3379. echarts.registerMap('shanxi', shanxi)
  3380. var mapFeatures = echarts.getMap('shanxi').geoJson.features
  3381. mapFeatures.forEach(v => {
  3382. // 地区名称
  3383. var name = v.properties.name
  3384. // 地区经纬度
  3385. this.geoCoordMap[name] = v.properties.centroid
  3386. // 按照地图乱序
  3387. // data.push({ name: v.properties.name, value: v.properties.centroid[0], value2: v.properties.centroid[1] })
  3388. })
  3389. let option = {
  3390. tooltip: {
  3391. padding: 15,
  3392. enterable: true,
  3393. transitionDuration: 1,
  3394. formatter: (params, ticket, callback) => {
  3395. // 清空所有轮播
  3396. for (var k in this.geoCoordMap) {
  3397. this.mapChart.dispatchAction({
  3398. // type: 'geoUnSelect',
  3399. type: 'downplay',
  3400. name: k,
  3401. })
  3402. }
  3403. // 如果鼠标滑动到线线上面,则返回空
  3404. this.mapChart.dispatchAction({
  3405. // type: 'geoSelect',
  3406. type: 'highlight',
  3407. name: params.name,
  3408. })
  3409. if (params.componentSubType == 'lines') {
  3410. return
  3411. }
  3412. if (params.componentSubType == 'scatter') {
  3413. let tipHtml = `
  3414. <div class="tooltip-cont">
  3415. <p>项目数量:<span>${data[params.dataIndex].value2}个</span></p>
  3416. <p>总投资额:<span>${params.data.value[2]}亿</span></p>
  3417. </div>`
  3418. callback(ticket, tipHtml)
  3419. return tipHtml
  3420. }
  3421. if (params.componentSubType == 'map') {
  3422. let tipHtml = `
  3423. <div class="tooltip-cont">
  3424. <p>项目数量:<span>${data[params.dataIndex].value2}个</span></p>
  3425. <p>总投资额:<span>${params.data.value}亿</span></p>
  3426. </div>`
  3427. callback(ticket, tipHtml)
  3428. return tipHtml
  3429. }
  3430. },
  3431. },
  3432. visualMap: {
  3433. show: false,
  3434. min: 0,
  3435. max: 300,
  3436. right: 0,
  3437. bottom: 0,
  3438. text: ['高', '低'],
  3439. textStyle: {
  3440. color: '#f1f1f1'
  3441. },
  3442. realtime: false,
  3443. calculable: false,
  3444. inRange: {
  3445. color: ['lightskyblue', '#2754b7']
  3446. }
  3447. },
  3448. geo: {
  3449. show: true,
  3450. map: 'shanxi',
  3451. layoutCenter: ['50%', '50%'], //地图位置
  3452. layoutSize: '140%',
  3453. label: {
  3454. normal: {
  3455. position: [100, 100],
  3456. fontSize: 25,
  3457. fontFamily: 'Microsoft YaHei',
  3458. fontWeight: 600,
  3459. color: '#fff',
  3460. show: true,
  3461. },
  3462. emphasis: {
  3463. show: true,
  3464. color: '#e7e1a0',
  3465. fontSize: 30,
  3466. },
  3467. },
  3468. roam: false,
  3469. itemStyle: {
  3470. normal: {
  3471. areaColor: '#1946a8',
  3472. shadowColor: '#1946a8',
  3473. borderWidth: 2, //设置外层边框
  3474. borderColor: '#1946a8',
  3475. shadowOffsetX: 0,
  3476. shadowOffsetY: 0,
  3477. shadowBlur: 0,
  3478. },
  3479. emphasis: {
  3480. areaColor: '#013d95',
  3481. borderColor: '#e7e1a0',
  3482. borderWidth: 4, //设置外层边框
  3483. },
  3484. },
  3485. },
  3486. series: [
  3487. {
  3488. type: 'map',
  3489. map: 'shanxi',
  3490. geoIndex: 0,
  3491. aspectScale: 1.5, //长宽比
  3492. data: data,
  3493. },
  3494. ],
  3495. }
  3496. let that = this
  3497. this.mapChart.on('click', function (params) {
  3498. if (params.name == '太原市') {
  3499. that.showChartLTipDouble('太原市')
  3500. }
  3501. })
  3502. tools.loopShowTooltip(this.mapChart, option, {
  3503. interval: 2000,
  3504. loopSeries: false,
  3505. });
  3506. this.mapChart.setOption(option)
  3507. },
  3508. initChinaChart () {
  3509. var data = [{ name: '河北', value: 60.35, value2: 28 },
  3510. { name: '山西', value: 4060.35, value2: 29 },
  3511. { name: '辽宁', value: 260.35, value2: 30 },
  3512. { name: '吉林', value: 360.35, value2: 30 },
  3513. { name: '黑龙江', value: 460.35, value2: 30 },
  3514. { name: '江苏', value: 560.35, value2: 30 },
  3515. { name: '浙江', value: 60.35, value2: 28 },
  3516. { name: '安徽', value: 160.35, value2: 29 },
  3517. { name: '福建', value: 260.35, value2: 30 },
  3518. { name: '江西', value: 360.35, value2: 30 },
  3519. { name: '山东', value: 460.35, value2: 30 },
  3520. { name: '河南', value: 560.35, value2: 30 },
  3521. { name: '湖北', value: 60.35, value2: 28 },
  3522. { name: '湖南', value: 160.35, value2: 29 },
  3523. { name: '广东', value: 260.35, value2: 30 },
  3524. { name: '海南', value: 360.35, value2: 30 },
  3525. { name: '四川', value: 6.35, value2: 30 },
  3526. { name: '贵州', value: 560.35, value2: 30 },
  3527. { name: '云南', value: 60.35, value2: 28 },
  3528. { name: '陕西', value: 160.35, value2: 29 },
  3529. { name: '甘肃', value: 260.35, value2: 30 },
  3530. { name: '青海', value: 360.35, value2: 30 },
  3531. { name: '台湾', value: 460.35, value2: 30 },
  3532. { name: '内蒙古', value: 560.35, value2: 30 },
  3533. { name: '广西', value: 60.35, value2: 28 },
  3534. { name: '西藏', value: 160.35, value2: 29 },
  3535. { name: '宁夏', value: 260.35, value2: 30 },
  3536. { name: '新疆', value: 360.35, value2: 30 },
  3537. { name: '北京', value: 460.35, value2: 30 },
  3538. { name: '天津', value: 560.35, value2: 30 },
  3539. { name: '上海', value: 260.35, value2: 30 },
  3540. { name: '重庆', value: 360.35, value2: 30 },
  3541. { name: '香港', value: 460.35, value2: 30 },
  3542. { name: '澳门', value: 560.35, value2: 30 },]
  3543. this.geoCoordMap = []
  3544. /*获取地图数据*/
  3545. this.mapChart = echarts.init(this.$refs['chinaMap'])
  3546. echarts.registerMap('china', china)
  3547. var mapFeatures = echarts.getMap('china').geoJson.features
  3548. mapFeatures.forEach(v => {
  3549. // 地区名称
  3550. var name = v.properties.name
  3551. // 地区经纬度
  3552. this.geoCoordMap[name] = v.properties.cp
  3553. data.push({ name: v.properties.name, value: v.properties.cp[0], value2: v.properties.cp[1] })
  3554. })
  3555. let option = {
  3556. tooltip: {
  3557. padding: 15,
  3558. enterable: true,
  3559. transitionDuration: 1,
  3560. formatter: (params, ticket, callback) => {
  3561. // 清空所有轮播
  3562. this.mapChart.dispatchAction({
  3563. // type: 'geoUnSelect',
  3564. type: 'downplay',
  3565. name: '南海诸岛',
  3566. })
  3567. for (var k in this.geoCoordMap) {
  3568. this.mapChart.dispatchAction({
  3569. // type: 'geoUnSelect',
  3570. type: 'downplay',
  3571. name: k,
  3572. })
  3573. }
  3574. // 如果鼠标滑动到线线上面,则返回空
  3575. this.mapChart.dispatchAction({
  3576. // type: 'geoSelect',
  3577. type: 'highlight',
  3578. name: params.name,
  3579. })
  3580. if (params.componentSubType == 'lines') {
  3581. return
  3582. }
  3583. if (params.componentSubType == 'scatter') {
  3584. let tipHtml = `
  3585. <div class="tooltip-cont">
  3586. <p>项目数量:<span>${data[params.dataIndex].value2}个</span></p>
  3587. <p>总投资额:<span>${params.data.value[2]}亿</span></p>
  3588. </div>`
  3589. callback(ticket, tipHtml)
  3590. return tipHtml
  3591. }
  3592. if (params.componentSubType == 'map') {
  3593. let tipHtml = `
  3594. <div class="tooltip-cont">
  3595. <p>项目数量:<span>${data[params.dataIndex].value2}个</span></p>
  3596. <p>总投资额:<span>${params.data.value}亿</span></p>
  3597. </div>`
  3598. callback(ticket, tipHtml)
  3599. return tipHtml
  3600. }
  3601. },
  3602. },
  3603. visualMap: {
  3604. show: false,
  3605. min: 0,
  3606. max: 1000,
  3607. left: '100',
  3608. bottom: 100,
  3609. text: ['高', '低'],
  3610. textStyle: {
  3611. color: '#f1f1f1'
  3612. },
  3613. realtime: true, //拖拽时,是否实时更新
  3614. calculable: false,
  3615. inRange: {
  3616. color: ['lightskyblue', '#2754b7']
  3617. },
  3618. itemWidth: 50, //图形的宽度,即长条的宽度。
  3619. itemHeight: 400, //图形的高度,即长条的高度。
  3620. textStyle: {
  3621. fontSize: 30,
  3622. color: '#fff'
  3623. }
  3624. },
  3625. geo: {
  3626. show: true,
  3627. map: 'china',
  3628. layoutCenter: ['50%', '50%'], //地图位置
  3629. layoutSize: '110%',
  3630. label: {
  3631. normal: {
  3632. position: [100, 100],
  3633. fontSize: 25,
  3634. fontFamily: 'Microsoft YaHei',
  3635. fontWeight: 600,
  3636. color: '#fff',
  3637. show: true,
  3638. },
  3639. emphasis: {
  3640. show: true,
  3641. color: '#e7e1a0',
  3642. fontSize: 30,
  3643. },
  3644. },
  3645. // 滑轮缩放
  3646. roam: false,
  3647. itemStyle: {
  3648. normal: {
  3649. areaColor: '#1946a8',
  3650. shadowColor: '#1946a8',
  3651. borderWidth: 2, //设置外层边框
  3652. borderColor: '#0b245b',
  3653. shadowOffsetX: 0,
  3654. shadowOffsetY: 0,
  3655. shadowBlur: 0,
  3656. },
  3657. emphasis: {
  3658. areaColor: '#013d95',
  3659. borderColor: '#e7e1a0',
  3660. borderWidth: 4, //设置外层边框
  3661. },
  3662. },
  3663. },
  3664. series: [
  3665. {
  3666. type: 'map',
  3667. map: 'china',
  3668. geoIndex: 0,
  3669. data: data,
  3670. },
  3671. ],
  3672. }
  3673. let that = this
  3674. this.mapChart.on('click', function (params) {
  3675. if (params.name == '山西') {
  3676. that.mapChart.dispose()
  3677. that.centerShow = true
  3678. setTimeout(() => {
  3679. that.initChartC1()
  3680. that.initChartC2()
  3681. that.initChartC3()
  3682. that.initChartC4()
  3683. that.initProvinceChart()
  3684. that.initProjectList()
  3685. })
  3686. }
  3687. })
  3688. tools.loopShowTooltip(this.mapChart, option, {
  3689. interval: 2000,
  3690. loopSeries: false,
  3691. });
  3692. this.mapChart.setOption(option)
  3693. },
  3694. initChartC3 () {
  3695. let myChart = echarts.init(this.$refs['echartC3'])
  3696. let option = {
  3697. tooltip: {
  3698. trigger: 'axis',
  3699. formatter: '{a0}:{c0}' + '亿元', //+ '<br/>'+ '{a1}:{c1}' + '%',
  3700. axisPointer: {
  3701. // type: 'cross',',
  3702. },
  3703. textStyle: {
  3704. color: '#FFF', // 文字的颜色
  3705. fontSize: '20', // 文字字体大小
  3706. fontFamily: 'Microsoft YaHei'
  3707. },
  3708. },
  3709. grid: {
  3710. top: '8%',
  3711. right: '3%',
  3712. left: '7%',
  3713. bottom: '10%',
  3714. },
  3715. // legend: {
  3716. // top: '1',
  3717. // textStyle: {
  3718. // color: 'rgba(250,250,250,0.6)',
  3719. // },
  3720. // },
  3721. xAxis: {
  3722. data: center6.map(item => item.name),
  3723. axisLine: {
  3724. show: true, //隐藏X轴轴线
  3725. lineStyle: {
  3726. color: '#005094',
  3727. width: 1,
  3728. },
  3729. },
  3730. axisTick: {
  3731. show: false, //隐藏X轴刻度
  3732. },
  3733. axisLabel: {
  3734. show: true,
  3735. rotate: 20,
  3736. textStyle: {
  3737. color: '#fff',//'rgba(255,255,255,0.6)', //X轴文字颜色
  3738. fontSize: '20',
  3739. fontFamily: 'Microsoft YaHei'
  3740. },
  3741. },
  3742. },
  3743. yAxis: [
  3744. {
  3745. type: 'value',
  3746. name: '亿元',
  3747. splitLine: {
  3748. show: true,
  3749. lineStyle: {
  3750. color: '#68b4dd66',
  3751. type: 'dashed',
  3752. },
  3753. },
  3754. axisLine: {
  3755. show: true,
  3756. lineStyle: {
  3757. color: '#3D7495',
  3758. },
  3759. },
  3760. axisLabel: {
  3761. show: true,
  3762. textStyle: {
  3763. color: '#fff',
  3764. fontSize: '20',
  3765. fontFamily: 'Microsoft YaHei'
  3766. },
  3767. },
  3768. nameTextStyle: {
  3769. color: '#fff',
  3770. fontSize: 20,
  3771. fontFamily: 'Microsoft YaHei'
  3772. },
  3773. },
  3774. {
  3775. type: 'value',
  3776. axisLine: {
  3777. show: false,
  3778. },
  3779. splitLine: {
  3780. show: false,
  3781. },
  3782. axisLabel: {
  3783. show: true,
  3784. formatter: '{value} %',
  3785. textStyle: {
  3786. color: 'rgba(250,250,250,0.6)',
  3787. },
  3788. },
  3789. },
  3790. ],
  3791. series: [
  3792. {
  3793. type: 'bar',
  3794. name: '投资金额',
  3795. barWidth: 15,
  3796. itemStyle: {
  3797. normal: {
  3798. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  3799. {
  3800. offset: 0,
  3801. color: '#69c0ff',
  3802. },
  3803. {
  3804. offset: 1,
  3805. color: '#082550',
  3806. },
  3807. ]),
  3808. },
  3809. },
  3810. data: center6.map(item => item.value),
  3811. },
  3812. ],
  3813. }
  3814. myChart.on('click', function (param) {
  3815. that.projectListTipShow = true
  3816. })
  3817. myChart.setOption(option)
  3818. tools.loopShowTooltip(myChart, option, {
  3819. nterval: 2000,
  3820. loopSeries: true,
  3821. })
  3822. },
  3823. initChartC4 () {
  3824. var chartData = []
  3825. var timer = null;
  3826. var timer2 = null;
  3827. var i = 0;
  3828. center7.forEach((item, index) => {
  3829. let obj = {
  3830. name: item.name,
  3831. y: item.value2,
  3832. num: item.value,
  3833. sliced: false,
  3834. selected: false,
  3835. color: index == 0 ? '#74a55d' : '#cea446'
  3836. }
  3837. chartData.push(obj)
  3838. })
  3839. let that = this
  3840. var chart = Highcharts.chart('echartC4', {
  3841. chart: {
  3842. type: 'pie',
  3843. backgroundColor: 'rgba(0,0,0,0)',
  3844. options3d: {
  3845. enabled: true,
  3846. alpha: 60,
  3847. //beta: 0
  3848. },
  3849. events: {
  3850. // load,图表加载完成时触发
  3851. load: function () {
  3852. var chart = this;
  3853. var points = chart.series[0].points;
  3854. var len = points.length;
  3855. timer && clearInterval(timer);
  3856. timer = setInterval(function () {
  3857. autoTooltip(points[i]);
  3858. chartData.forEach((item, index) => {
  3859. item.sliced = false
  3860. item.selected = false
  3861. if (index == i) {
  3862. item.sliced = true
  3863. item.selected = true
  3864. }
  3865. })
  3866. chart.update({
  3867. series: [{
  3868. type: 'pie',
  3869. name: '占比',
  3870. point: {
  3871. events: {
  3872. click: function (e) {
  3873. that.showChartLTipDouble(e.point.name)
  3874. }
  3875. }
  3876. },
  3877. data: chartData
  3878. }]
  3879. })
  3880. i++;
  3881. if (i === len) {
  3882. i = 0;
  3883. chartData.forEach((item, index) => {
  3884. item.sliced = false
  3885. item.selected = false
  3886. })
  3887. chart.update({
  3888. series: [{
  3889. type: 'pie',
  3890. name: '占比',
  3891. point: {
  3892. events: {
  3893. click: function (e) {
  3894. that.showChartLTipDouble(e.point.name)
  3895. }
  3896. }
  3897. },
  3898. data: chartData
  3899. }]
  3900. })
  3901. }
  3902. }, 2000);
  3903. },
  3904. legendItemClick: function (event) {
  3905. console.log(event);
  3906. return true;
  3907. }
  3908. }
  3909. },
  3910. credits: {
  3911. enabled: false //去掉hightchats水印
  3912. },
  3913. title: {
  3914. text: null
  3915. },
  3916. tooltip: {
  3917. crosshairs: true,
  3918. backgroundColor: 'rgba(0,0,0,0.5)',
  3919. // positioner: function(e){
  3920. // console.log(e, this)
  3921. // },
  3922. useHTML: false, //开启html模式
  3923. style: {
  3924. color: '#fff',
  3925. fontSize: '20',
  3926. fontFamily: 'Microsoft YaHei'
  3927. },
  3928. formatter: function (e) {
  3929. //console.log(this)
  3930. let num = chartData[this.colorIndex].num
  3931. this.percentage = Math.round(this.percentage)
  3932. return `${this.key}:<b>${this.percentage}%</b><br/>投资完成额:<b>${this.y}</b>亿<br/>投资数量:<b>${num}个</b>`
  3933. },
  3934. //pointFormat:
  3935. },
  3936. legend: {
  3937. layout: 'vertical',
  3938. align: 'right',
  3939. y: -10,
  3940. verticalAlign: 'bottom',
  3941. itemStyle: {
  3942. fontSize: '20px',
  3943. color: '#fff',
  3944. fontWeight: 0,
  3945. fontFamily: 'Microsoft YaHei'
  3946. }
  3947. },
  3948. plotOptions: {
  3949. pie: {
  3950. allowPointSelect: true,
  3951. showInLegend: true, // 图例
  3952. cursor: 'pointer',
  3953. size: 500,
  3954. innerSize: 330, //环形图中间空白,0为饼图
  3955. depth: 75, //立体高度
  3956. slicedOffset: 40, //动画距离
  3957. dataLabels: {
  3958. enabled: false, // 是否展示指示线
  3959. format: '{point.name}: {point.percentage}'
  3960. }
  3961. },
  3962. },
  3963. series: [{
  3964. type: 'pie',
  3965. name: '占比',
  3966. center: ['60%', '50%'],
  3967. y: -10,
  3968. point: {
  3969. events: {
  3970. click: function (e) { //点击事件
  3971. that.showChartLTipDouble(e.point.name)
  3972. },
  3973. mouseOver: function (e) { //鼠标移入停止轮播并且找到移入的当前数据设为选中
  3974. //console.log(e)
  3975. chartData.forEach((item, index) => {
  3976. item.sliced = false
  3977. item.selected = false
  3978. })
  3979. chartData[e.target.index].sliced = true
  3980. chartData[e.target.index].selected = true
  3981. chart.update({
  3982. series: [{
  3983. type: 'pie',
  3984. name: '占比',
  3985. point: {
  3986. events: {
  3987. click: function (e) {
  3988. that.showChartLTipDouble(e.point.name)
  3989. }
  3990. }
  3991. },
  3992. data: chartData
  3993. }]
  3994. })
  3995. timer && clearInterval(timer);
  3996. },
  3997. mouseOut: function () { // 鼠标移出后需要继续执行轮播
  3998. var points = chart.series[0].points;
  3999. var len = points.length;
  4000. timer && clearInterval(timer);
  4001. timer = setInterval(function () {
  4002. autoTooltip(points[i]);
  4003. chartData.forEach((item, index) => {
  4004. item.sliced = false
  4005. item.selected = false
  4006. if (index == i) {
  4007. item.sliced = true
  4008. item.selected = true
  4009. }
  4010. })
  4011. chart.update({
  4012. series: [{
  4013. type: 'pie',
  4014. name: '占比',
  4015. point: {
  4016. events: {
  4017. click: function (e) {
  4018. that.showChartLTipDouble(e.point.name)
  4019. }
  4020. }
  4021. },
  4022. data: chartData
  4023. }]
  4024. })
  4025. i++;
  4026. if (i === len) {
  4027. i = 0;
  4028. chartData.forEach((item, index) => {
  4029. item.sliced = false
  4030. item.selected = false
  4031. })
  4032. chart.update({
  4033. series: [{
  4034. type: 'pie',
  4035. name: '占比',
  4036. point: {
  4037. events: {
  4038. click: function (e) {
  4039. that.showChartLTipDouble(e.point.name)
  4040. }
  4041. }
  4042. },
  4043. data: chartData
  4044. }]
  4045. })
  4046. }
  4047. }, 2000);
  4048. }
  4049. }
  4050. },
  4051. data: chartData
  4052. }]
  4053. });
  4054. function autoTooltip (point) {
  4055. chart.tooltip.refresh(point);
  4056. }
  4057. },
  4058. initProjectList () {
  4059. let dataList = []
  4060. center8.map(item => {
  4061. dataList.push([item.office, item.name, item.value + '亿'])
  4062. })
  4063. this.storageRecordConfig2.data = dataList
  4064. this.storageRecordConfig2 = { ...this.storageRecordConfig2 }
  4065. },
  4066. // 大屏三
  4067. initChartR1 () {
  4068. let that = this
  4069. let myChart = echarts.init(this.$refs['echartR1'])
  4070. myChart.on('showTip', (params) => {
  4071. // 如果是7或者15并且满足防抖则切换
  4072. if ((params.dataIndex == 5 || params.dataIndex == 11) && that.echartR1Fd) {
  4073. that.echartR1Fd = false
  4074. setTimeout(() => {
  4075. option.dataZoom[0].endValue = option.dataZoom[0].endValue + 6
  4076. option.dataZoom[0].startValue = option.dataZoom[0].startValue + 6
  4077. myChart.setOption(option);
  4078. // 防止勿刷新做的防抖
  4079. setTimeout(() => {
  4080. that.echartR1Fd = true
  4081. }, 2000)
  4082. }, 1900);
  4083. // 如果是17表示到了最后一个,那么重新来一遍
  4084. } else if (params.dataIndex == 17 && that.echartR1Fd) {
  4085. that.echartR1Fd = false
  4086. setTimeout(() => {
  4087. option.dataZoom[0].endValue = 0
  4088. option.dataZoom[0].startValue = 5
  4089. myChart.setOption(option);
  4090. // 防止勿刷新做的防抖
  4091. setTimeout(() => {
  4092. that.echartR1Fd = true
  4093. }, 2000)
  4094. }, 1900)
  4095. }
  4096. })
  4097. let option = {
  4098. tooltip: {
  4099. formatter: data => {
  4100. 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}亿`
  4101. },
  4102. textStyle: {
  4103. color: '#FFF', // 文字的颜色
  4104. fontSize: '20', // 文字字体大小
  4105. fontFamily: 'Microsoft YaHei'
  4106. },
  4107. trigger: 'axis',
  4108. axisPointer: {
  4109. // type: 'cross',',
  4110. },
  4111. },
  4112. dataZoom: [
  4113. {
  4114. // start: 9,//默认为@
  4115. // end: 100,//黑认认为1@0
  4116. type: "slider",
  4117. show: false,
  4118. // xAxisIndex: [0]
  4119. handlesize: 0,//滑动条的 左右2个滑动条的大小
  4120. startValue: 5,// 初始显示值
  4121. endValue: 0,// 结束显示值
  4122. height: 10,//组件高度
  4123. left: "5%",
  4124. right: "4%",//右边的距离
  4125. bottom: "25%",//底边的距离
  4126. borderColor: "#939",
  4127. fillerColor: "#269cdb",
  4128. borderRadius: 5,
  4129. backgroundColor: "#33384b",//两边未选中的滑动条区域的额色
  4130. showDataShadow: false,//是否显示数据阴影
  4131. showDetail: false,//即拖拽时候是否显示详细数值信息
  4132. truerealtime: true,//是否实时更新
  4133. filterMode: "filter"
  4134. }, {
  4135. type: 'inside',
  4136. show: true,
  4137. start: 1,
  4138. end: 100,
  4139. zoomOnMouseWheel: false, //滚轮是否触发缩放
  4140. moveOnMouseMove: false, //鼠标滚轮触发滚动
  4141. }
  4142. ],
  4143. grid: {
  4144. top: '10%',
  4145. right: '3%',
  4146. left: '5%',
  4147. bottom: '5%',
  4148. },
  4149. legend: {
  4150. data: ["预算额", "已签合同额", '产值认定额', '结算额', '付款额'],
  4151. x: 'center',
  4152. y: '0px',
  4153. textStyle: {
  4154. color: '#fff',
  4155. fontSize: "20",
  4156. fontFamily: 'Microsoft YaHei'
  4157. },
  4158. },
  4159. xAxis: {
  4160. data: right4.map(item => item.name),
  4161. axisLine: {
  4162. show: true, //隐藏X轴轴线
  4163. lineStyle: {
  4164. color: '#005094',
  4165. width: 1,
  4166. },
  4167. },
  4168. axisTick: {
  4169. show: false, //隐藏X轴刻度
  4170. },
  4171. axisLabel: {
  4172. show: true,
  4173. // rotate: 40,
  4174. textStyle: {
  4175. color: '#fff',//'rgba(255,255,255,0.6)', //X轴文字颜色
  4176. fontSize: "20",
  4177. fontFamily: 'Microsoft YaHei'
  4178. },
  4179. },
  4180. },
  4181. yAxis: [
  4182. {
  4183. type: 'value',
  4184. name: '亿元',
  4185. nameTextStyle: {
  4186. color: 'rgba(255,255,255,0.6)',
  4187. },
  4188. splitLine: {
  4189. show: true,
  4190. lineStyle: {
  4191. color: '#68b4dd66',
  4192. type: 'dashed',
  4193. },
  4194. },
  4195. axisLine: {
  4196. show: true,
  4197. lineStyle: {
  4198. color: '#3D7495',
  4199. },
  4200. },
  4201. axisLabel: {
  4202. show: true,
  4203. textStyle: {
  4204. color: '#fff',
  4205. fontSize: "20",
  4206. fontFamily: 'Microsoft YaHei'
  4207. },
  4208. },
  4209. nameTextStyle: {
  4210. color: '#fff',
  4211. fontSize: 20,
  4212. fontFamily: 'Microsoft YaHei'
  4213. },
  4214. },
  4215. ],
  4216. series: [
  4217. {
  4218. name: '预算额',
  4219. type: 'bar',
  4220. barWidth: 10,
  4221. itemStyle: {
  4222. normal: {
  4223. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4224. {
  4225. offset: 0,
  4226. color: '#74a55d',
  4227. },
  4228. {
  4229. offset: 1,
  4230. color: '#082550',
  4231. },
  4232. ]),
  4233. },
  4234. },
  4235. data: right4.map(item => item.value),
  4236. },
  4237. {
  4238. name: '已签合同额',
  4239. type: 'bar',
  4240. barWidth: 10,
  4241. itemStyle: {
  4242. normal: {
  4243. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4244. {
  4245. offset: 0,
  4246. color: '#cea446',
  4247. },
  4248. {
  4249. offset: 1,
  4250. color: '#082550',
  4251. },
  4252. ]),
  4253. },
  4254. },
  4255. data: right4.map(item => item.value2),
  4256. },
  4257. {
  4258. name: '产值认定额',
  4259. type: 'bar',
  4260. barWidth: 10,
  4261. itemStyle: {
  4262. normal: {
  4263. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4264. {
  4265. offset: 0,
  4266. color: '#b84b4b',
  4267. },
  4268. {
  4269. offset: 1,
  4270. color: '#082550',
  4271. },
  4272. ]),
  4273. },
  4274. },
  4275. data: right4.map(item => item.value),
  4276. },
  4277. {
  4278. name: '结算额',
  4279. type: 'bar',
  4280. barWidth: 10,
  4281. itemStyle: {
  4282. normal: {
  4283. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4284. {
  4285. offset: 0,
  4286. color: '#5593ab',
  4287. },
  4288. {
  4289. offset: 1,
  4290. color: '#082550',
  4291. },
  4292. ]),
  4293. },
  4294. },
  4295. data: right4.map(item => item.value2),
  4296. },
  4297. {
  4298. name: '付款额',
  4299. type: 'bar',
  4300. barWidth: 10,
  4301. itemStyle: {
  4302. normal: {
  4303. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4304. {
  4305. offset: 0,
  4306. color: '#2a7652',
  4307. },
  4308. {
  4309. offset: 1,
  4310. color: '#082550',
  4311. },
  4312. ]),
  4313. },
  4314. },
  4315. data: right4.map(item => item.value),
  4316. },
  4317. ],
  4318. }
  4319. myChart.on('click', function (param) {
  4320. that.projectListTipShow = true
  4321. })
  4322. myChart.setOption(option)
  4323. tools.loopShowTooltip(myChart, option, {
  4324. interval: 2000,
  4325. loopSeries: true,
  4326. })
  4327. },
  4328. initChartR2 () {
  4329. let that = this
  4330. const itemStyle = {
  4331. // opacity: 0.8,
  4332. shadowBlur: 10,
  4333. shadowOffsetX: 0,
  4334. shadowOffsetY: 0,
  4335. shadowColor: 'rgba(0,0,0,0.3)'
  4336. };
  4337. let myChart = echarts.init(this.$refs['echartR2'])
  4338. myChart.on('showTip', (params) => {
  4339. // 如果是7或者15并且满足防抖则切换
  4340. if ((params.dataIndex == 5 || params.dataIndex == 11) && that.echartR2Fd) {
  4341. that.echartR2Fd = false
  4342. setTimeout(() => {
  4343. option.dataZoom[0].endValue = option.dataZoom[0].endValue + 6
  4344. option.dataZoom[0].startValue = option.dataZoom[0].startValue + 6
  4345. myChart.setOption(option);
  4346. // 防止勿刷新做的防抖
  4347. setTimeout(() => {
  4348. that.echartR2Fd = true
  4349. }, 2000)
  4350. }, 1900);
  4351. // 如果是17表示到了最后一个,那么重新来一遍
  4352. } else if (params.dataIndex == 17 && that.echartR2Fd) {
  4353. that.echartR2Fd = false
  4354. setTimeout(() => {
  4355. option.dataZoom[0].endValue = 0
  4356. option.dataZoom[0].startValue = 5
  4357. myChart.setOption(option);
  4358. // 防止勿刷新做的防抖
  4359. setTimeout(() => {
  4360. that.echartR2Fd = true
  4361. }, 2000)
  4362. }, 1900)
  4363. }
  4364. })
  4365. let option = {
  4366. color: ['#74a55d', '#cea446', '#b84b4b'],
  4367. dataZoom: [
  4368. {
  4369. // start: 9,//默认为@
  4370. // end: 100,//黑认认为1@0
  4371. type: "slider",
  4372. show: false,
  4373. // xAxisIndex: [0]
  4374. handlesize: 0,//滑动条的 左右2个滑动条的大小
  4375. startValue: 5,// 初始显示值
  4376. endValue: 0,// 结束显示值
  4377. height: 10,//组件高度
  4378. left: "5%",
  4379. right: "4%",//右边的距离
  4380. bottom: "25%",//底边的距离
  4381. borderColor: "#939",
  4382. fillerColor: "#269cdb",
  4383. borderRadius: 5,
  4384. backgroundColor: "#33384b",//两边未选中的滑动条区域的额色
  4385. showDataShadow: false,//是否显示数据阴影
  4386. showDetail: false,//即拖拽时候是否显示详细数值信息
  4387. truerealtime: true,//是否实时更新
  4388. filterMode: "filter"
  4389. }, {
  4390. type: 'inside',
  4391. show: true,
  4392. start: 1,
  4393. end: 100,
  4394. zoomOnMouseWheel: false, //滚轮是否触发缩放
  4395. moveOnMouseMove: false, //鼠标滚轮触发滚动
  4396. }
  4397. ],
  4398. legend: {
  4399. top: 10,
  4400. data: ['正偏差', '容差', '负偏差'],
  4401. textStyle: {
  4402. fontSize: 20,
  4403. color: '#fff',
  4404. fontFamily: 'Microsoft YaHei'
  4405. }
  4406. },
  4407. textStyle: {
  4408. color: '#fff',
  4409. },
  4410. tooltip: {
  4411. show: true,
  4412. trigger: "axis",
  4413. textStyle: {
  4414. color: '#FFF', // 文字的颜色
  4415. fontSize: '20', // 文字字体大小
  4416. fontFamily: 'Microsoft YaHei'
  4417. },
  4418. formatter: data => {
  4419. 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]}亿`
  4420. },
  4421. axisPointer: {
  4422. // // type: 'cross',',
  4423. },
  4424. },
  4425. grid: {
  4426. top: '10%',
  4427. right: '4%',
  4428. left: '5%',
  4429. bottom: '5%',
  4430. },
  4431. yAxis: {
  4432. name: '亿元',
  4433. splitLine: {
  4434. show: true,
  4435. lineStyle: {
  4436. color: '#68b4dd66',
  4437. type: 'dashed',
  4438. },
  4439. },
  4440. axisLine: {
  4441. show: false
  4442. },
  4443. axisLabel: {
  4444. show: true,
  4445. formatter: '{value}',
  4446. textStyle: {
  4447. color: '#fff',
  4448. fontSize: '20',
  4449. fontFamily: 'Microsoft YaHei'
  4450. },
  4451. },
  4452. nameTextStyle: {
  4453. color: '#fff',
  4454. fontSize: 20,
  4455. fontFamily: 'Microsoft YaHei'
  4456. },
  4457. },
  4458. xAxis: {
  4459. data: right5[0].map(item => item[0]),
  4460. axisLine: {
  4461. show: true, //隐藏X轴轴线
  4462. lineStyle: {
  4463. color: '#005094',
  4464. width: 1,
  4465. },
  4466. },
  4467. splitLine: {
  4468. show: true,
  4469. lineStyle: {
  4470. color: '#68b4dd66',
  4471. type: 'dashed',
  4472. },
  4473. },
  4474. axisTick: {
  4475. show: false, //隐藏X轴刻度
  4476. },
  4477. axisLabel: {
  4478. show: true,
  4479. // rotate: 40,
  4480. padding: [0, 0, 0, 0],
  4481. textStyle: {
  4482. color: '#fff', //X轴文字颜色
  4483. fontSize: 20,
  4484. fontFamily: 'Microsoft YaHei'
  4485. },
  4486. },
  4487. },
  4488. series: [
  4489. {
  4490. name: '正偏差',
  4491. type: 'scatter',
  4492. itemStyle: itemStyle,
  4493. data: right5[0],
  4494. symbolSize: function (data) {
  4495. return Math.sqrt(data[1]) * 9;
  4496. },
  4497. },
  4498. {
  4499. name: '容差',
  4500. type: 'scatter',
  4501. itemStyle: itemStyle,
  4502. data: right5[1],
  4503. symbolSize: function (data) {
  4504. return Math.sqrt(data[1]) * 8;
  4505. },
  4506. },
  4507. {
  4508. name: '负偏差',
  4509. type: 'scatter',
  4510. itemStyle: itemStyle,
  4511. data: right5[2],
  4512. symbolSize: function (data) {
  4513. return Math.sqrt(data[1]) * 7;
  4514. },
  4515. }
  4516. ]
  4517. }
  4518. myChart.on('click', function (param) {
  4519. // that.showChartLTipDouble(param.name)
  4520. that.projectListTipShow = true
  4521. })
  4522. myChart.setOption(option)
  4523. tools.loopShowTooltip(myChart, option, {
  4524. interval: 2000,
  4525. loopSeries: true,
  4526. })
  4527. },
  4528. initChartR3 () {
  4529. let that = this
  4530. let myChart = echarts.init(this.$refs['echartR3'])
  4531. myChart.on('showTip', (params) => {
  4532. this.echartR4Chart ? this.echartR4Chart.dispose() : ''
  4533. this.echartR5Chart ? this.echartR5Chart.dispose() : ''
  4534. that.initChartR4()
  4535. that.initChartR5()
  4536. // 如果是7或者15并且满足防抖则切换
  4537. if ((params.dataIndex == 5 || params.dataIndex == 11) && that.echartR3Fd) {
  4538. that.echartR3Fd = false
  4539. setTimeout(() => {
  4540. option.dataZoom[0].endValue = option.dataZoom[0].endValue + 6
  4541. option.dataZoom[0].startValue = option.dataZoom[0].startValue + 6
  4542. myChart.setOption(option);
  4543. // 防止勿刷新做的防抖
  4544. setTimeout(() => {
  4545. that.echartR3Fd = true
  4546. }, 2000)
  4547. }, 7900);
  4548. // 如果是17表示到了最后一个,那么重新来一遍
  4549. } else if (params.dataIndex == 17 && that.echartR3Fd) {
  4550. that.echartR3Fd = false
  4551. setTimeout(() => {
  4552. option.dataZoom[0].endValue = 0
  4553. option.dataZoom[0].startValue = 5
  4554. myChart.setOption(option);
  4555. // 防止勿刷新做的防抖
  4556. setTimeout(() => {
  4557. that.echartR3Fd = true
  4558. }, 2000)
  4559. }, 7900)
  4560. }
  4561. })
  4562. let option = {
  4563. tooltip: {
  4564. formatter: data => {
  4565. 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}亿`
  4566. },
  4567. trigger: 'axis',
  4568. axisPointer: {
  4569. // type: 'cross',',
  4570. },
  4571. position: (params) => {
  4572. return [params[0] + 10, 60]
  4573. },
  4574. textStyle: {
  4575. color: '#FFF', // 文字的颜色
  4576. fontSize: '20', // 文字字体大小
  4577. fontFamily: 'Microsoft YaHei'
  4578. },
  4579. confine: true
  4580. },
  4581. dataZoom: [
  4582. {
  4583. // start: 9,//默认为@
  4584. // end: 100,//黑认认为1@0
  4585. type: "slider",
  4586. show: false,
  4587. // xAxisIndex: [0]
  4588. handlesize: 0,//滑动条的 左右2个滑动条的大小
  4589. startValue: 5,// 初始显示值
  4590. endValue: 0,// 结束显示值
  4591. height: 10,//组件高度
  4592. left: "5%",
  4593. right: "4%",//右边的距离
  4594. bottom: "25%",//底边的距离
  4595. borderColor: "#939",
  4596. fillerColor: "#269cdb",
  4597. borderRadius: 5,
  4598. backgroundColor: "#33384b",//两边未选中的滑动条区域的额色
  4599. showDataShadow: false,//是否显示数据阴影
  4600. showDetail: false,//即拖拽时候是否显示详细数值信息
  4601. truerealtime: true,//是否实时更新
  4602. filterMode: "filter"
  4603. }, {
  4604. type: 'inside',
  4605. show: true,
  4606. start: 1,
  4607. end: 100,
  4608. zoomOnMouseWheel: false, //滚轮是否触发缩放
  4609. moveOnMouseMove: false, //鼠标滚轮触发滚动
  4610. }
  4611. ],
  4612. grid: {
  4613. top: '25%',
  4614. right: '3%',
  4615. left: '10%',
  4616. bottom: '20%',
  4617. },
  4618. legend: {
  4619. data: ["低风险", "中风险", '高风险'],
  4620. x: 'center',
  4621. y: '15px',
  4622. textStyle: {
  4623. // color: 'rgba(250,250,250,0.6)',
  4624. color: '#fff',
  4625. fontSize: "20",
  4626. fontFamily: 'Microsoft YaHei'
  4627. },
  4628. },
  4629. xAxis: {
  4630. data: right4.map(item => item.name),
  4631. axisLine: {
  4632. show: true, //隐藏X轴轴线
  4633. lineStyle: {
  4634. color: '#005094',
  4635. width: 1,
  4636. },
  4637. },
  4638. axisTick: {
  4639. show: false, //隐藏X轴刻度
  4640. },
  4641. axisLabel: {
  4642. show: true,
  4643. rotate: 40,
  4644. textStyle: {
  4645. color: '#fff',//'rgba(255,255,255,0.6)', //X轴文字颜色
  4646. fontSize: '20',
  4647. fontFamily: 'Microsoft YaHei'
  4648. },
  4649. },
  4650. },
  4651. yAxis: [
  4652. {
  4653. type: 'value',
  4654. name: '亿元',
  4655. nameTextStyle: {
  4656. color: 'rgba(255,255,255,0.6)',
  4657. },
  4658. splitLine: {
  4659. show: true,
  4660. lineStyle: {
  4661. color: '#68b4dd66',
  4662. type: 'dashed',
  4663. },
  4664. },
  4665. axisLine: {
  4666. show: true,
  4667. lineStyle: {
  4668. color: '#3D7495',
  4669. },
  4670. },
  4671. axisLabel: {
  4672. show: true,
  4673. textStyle: {
  4674. color: '#fff',
  4675. fontSize: '20',
  4676. fontFamily: 'Microsoft YaHei'
  4677. },
  4678. },
  4679. nameTextStyle: {
  4680. color: '#fff',
  4681. fontSize: 20,
  4682. fontFamily: 'Microsoft YaHei'
  4683. },
  4684. },
  4685. ],
  4686. series: [
  4687. {
  4688. name: '高风险',
  4689. type: 'bar',
  4690. stack: 'Ad',
  4691. barWidth: 10,
  4692. itemStyle: {
  4693. normal: {
  4694. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4695. {
  4696. offset: 0,
  4697. color: '#b84b4b',
  4698. },
  4699. {
  4700. offset: 1,
  4701. color: '#b84b4b',
  4702. },
  4703. ]),
  4704. },
  4705. },
  4706. data: right6.map(item => item.value),
  4707. },
  4708. {
  4709. name: '中风险',
  4710. type: 'bar',
  4711. stack: 'Ad',
  4712. barWidth: 10,
  4713. itemStyle: {
  4714. normal: {
  4715. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4716. {
  4717. offset: 0,
  4718. color: '#cea446',
  4719. },
  4720. {
  4721. offset: 1,
  4722. color: '#cea446',
  4723. },
  4724. ]),
  4725. },
  4726. },
  4727. data: right6.map(item => item.value2),
  4728. },
  4729. {
  4730. name: '低风险',
  4731. type: 'bar',
  4732. stack: 'Ad',
  4733. barWidth: 10,
  4734. itemStyle: {
  4735. normal: {
  4736. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4737. {
  4738. offset: 0,
  4739. color: '#2a7652',
  4740. },
  4741. {
  4742. offset: 1,
  4743. color: '#2a7652',
  4744. },
  4745. ]),
  4746. },
  4747. },
  4748. data: right6.map(item => item.value3),
  4749. },
  4750. ],
  4751. }
  4752. myChart.setOption(option)
  4753. tools.loopShowTooltip(myChart, option, {
  4754. interval: 8000,
  4755. loopSeries: true,
  4756. })
  4757. },
  4758. initChartR4 () {
  4759. this.echartR4Chart = echarts.init(this.$refs['echartR4'])
  4760. option = {
  4761. title: {
  4762. text: ''
  4763. },
  4764. radar: {
  4765. center: ['50%', '50%'],
  4766. radius: 135,
  4767. indicator: [
  4768. { name: '安全风险', max: 100000 },
  4769. { name: '付款风险', max: 100000 },
  4770. { name: '合同风险', max: 100000 },
  4771. { name: '结算风险', max: 100000 },
  4772. { name: '进度风险', max: 100000 },
  4773. { name: '质量风险', max: 100000 },
  4774. ],
  4775. axisLine: { // 设置雷达图中间射线的颜色
  4776. lineStyle: {
  4777. color: '#887d33',
  4778. },
  4779. },
  4780. splitLine: { //网格颜色设置
  4781. show: true,
  4782. lineStyle: {
  4783. width: 1,
  4784. color: ['#871b1a', '#638f41', '#d29e35', '#b6802b']
  4785. },
  4786. },
  4787. name: { //修改indicator文字的颜色
  4788. textStyle: {
  4789. color: "#fff",
  4790. fontSize: '20',
  4791. fontFamily: 'Microsoft YaHei'
  4792. }
  4793. },
  4794. splitNumber: 4, //有几个圈
  4795. splitArea: { //设置图表颜色,show的值为true
  4796. show: true,
  4797. areaStyle: {
  4798. // color:"#c1ddf8", //一般设置方式
  4799. //设置渐变背景色 new echarts.graphic.LinearGradient(a,b,c,d,arr)
  4800. //a ,b,c,d值可为0,1 a:1表示arr中的颜色右到左;c:1 arr中的颜色左到右
  4801. //b:1表示arr中的颜色下到上;d:1表示arr中的颜色上到下
  4802. // color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  4803. // { offset: 0, color: '#887D33' }, // 0% 处的颜色
  4804. // { offset: 0.75, color: '#7D4216' }, // 0% 处的颜色
  4805. // { offset: 1, color: '#430705' }// 100% 处的颜色
  4806. // ], false)
  4807. color: ['#638f41', '#887d33', '#7d4216', '#430705'],
  4808. }
  4809. }
  4810. },
  4811. series: [
  4812. {
  4813. name: '',
  4814. type: 'radar',
  4815. symbol: 'circle', // 单个数值点的样式,还可以取值'rect','angle'等
  4816. symbolSize: 0, // 数值点的大小
  4817. data: [
  4818. {
  4819. value: right7[0],
  4820. name: '安全风险',
  4821. itemStyle: { //该数值区域样式设置
  4822. normal: {
  4823. color: 'rgb(44,198,255,0.8)', //背景颜色,还需设置areaStyle
  4824. lineStyle: {
  4825. color: 'rgb(44,198,255,0.8)', //边框颜色
  4826. },
  4827. },
  4828. },
  4829. label: { //显示value中具体的数值
  4830. normal: {
  4831. show: false,
  4832. textStyle: { //更改数值样式
  4833. color: '#43EDE3'
  4834. }
  4835. },
  4836. },
  4837. areaStyle: { //设置区域背景颜色透明度
  4838. normal: {
  4839. width: 1,
  4840. opacity: 0.8,
  4841. },
  4842. },
  4843. }
  4844. ]
  4845. }
  4846. ]
  4847. };
  4848. // tools.loopShowTooltip(myChart, option, {
  4849. // interval: 2000,
  4850. // loopSeries: true,
  4851. // });
  4852. this.echartR4Chart.setOption(option)
  4853. },
  4854. initChartR5 () {
  4855. this.echartR5Chart = echarts.init(this.$refs['echartR5'])
  4856. let option = {
  4857. tooltip: {
  4858. formatter: data => {
  4859. 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}亿`
  4860. },
  4861. trigger: 'axis',
  4862. axisPointer: {
  4863. // type: 'cross',',
  4864. },
  4865. textStyle: {
  4866. color: '#FFF', // 文字的颜色
  4867. fontSize: '20', // 文字字体大小
  4868. fontFamily: 'Microsoft YaHei'
  4869. },
  4870. },
  4871. grid: {
  4872. top: '15%',
  4873. right: '3%',
  4874. left: '5%',
  4875. bottom: '35',
  4876. },
  4877. legend: {
  4878. data: ["预算额", "合同额", "结算额", "支付额"],
  4879. x: 'center',
  4880. y: '10px',
  4881. textStyle: {
  4882. // color: 'rgba(250,250,250,0.6)',
  4883. color: '#fff',
  4884. fontSize: "20",
  4885. fontFamily: 'Microsoft YaHei'
  4886. },
  4887. },
  4888. xAxis: {
  4889. data: ['设备费', '设计费', '施工费', '材料费'],
  4890. axisLine: {
  4891. show: true, //隐藏X轴轴线
  4892. lineStyle: {
  4893. color: '#005094',
  4894. width: 1,
  4895. },
  4896. },
  4897. axisTick: {
  4898. show: false, //隐藏X轴刻度
  4899. },
  4900. axisLabel: {
  4901. show: true,
  4902. // rotate: 40,
  4903. textStyle: {
  4904. color: '#fff',//'rgba(255,255,255,0.6)', //X轴文字颜色
  4905. fontSize: '20', // 文字字体大小
  4906. fontFamily: 'Microsoft YaHei'
  4907. },
  4908. },
  4909. },
  4910. yAxis: [
  4911. {
  4912. type: 'value',
  4913. name: '亿元',
  4914. nameTextStyle: {
  4915. color: 'rgba(255,255,255,0.6)',
  4916. },
  4917. splitLine: {
  4918. show: true,
  4919. lineStyle: {
  4920. color: '#68b4dd66',
  4921. type: 'dashed',
  4922. },
  4923. },
  4924. axisLine: {
  4925. show: true,
  4926. lineStyle: {
  4927. color: '#3D7495',
  4928. },
  4929. },
  4930. axisLabel: {
  4931. show: true,
  4932. textStyle: {
  4933. color: '#fff',
  4934. fontSize: '20', // 文字字体大小
  4935. fontFamily: 'Microsoft YaHei'
  4936. },
  4937. },
  4938. nameTextStyle: {
  4939. color: '#fff',
  4940. fontSize: 20,
  4941. fontFamily: 'Microsoft YaHei'
  4942. },
  4943. },
  4944. ],
  4945. series: [
  4946. {
  4947. name: '预算额',
  4948. type: 'bar',
  4949. barWidth: 10,
  4950. itemStyle: {
  4951. normal: {
  4952. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4953. {
  4954. offset: 0,
  4955. color: '#74a55d',
  4956. },
  4957. {
  4958. offset: 1,
  4959. color: '#082550',
  4960. },
  4961. ]),
  4962. },
  4963. },
  4964. data: right8.map(item => item.value),
  4965. },
  4966. {
  4967. name: '合同额',
  4968. type: 'bar',
  4969. barWidth: 10,
  4970. itemStyle: {
  4971. normal: {
  4972. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4973. {
  4974. offset: 0,
  4975. color: '#cea446',
  4976. },
  4977. {
  4978. offset: 1,
  4979. color: '#082550',
  4980. },
  4981. ]),
  4982. },
  4983. },
  4984. data: right8.map(item => item.value2),
  4985. },
  4986. {
  4987. name: '结算额',
  4988. type: 'bar',
  4989. barWidth: 10,
  4990. itemStyle: {
  4991. normal: {
  4992. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4993. {
  4994. offset: 0,
  4995. color: '#b84b4b',
  4996. },
  4997. {
  4998. offset: 1,
  4999. color: '#082550',
  5000. },
  5001. ]),
  5002. },
  5003. },
  5004. data: right8.map(item => item.value3),
  5005. },
  5006. {
  5007. name: '支付额',
  5008. type: 'bar',
  5009. barWidth: 10,
  5010. itemStyle: {
  5011. normal: {
  5012. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  5013. {
  5014. offset: 0,
  5015. color: '#5593ab',
  5016. },
  5017. {
  5018. offset: 1,
  5019. color: '#082550',
  5020. },
  5021. ]),
  5022. },
  5023. },
  5024. data: right8.map(item => item.value4),
  5025. },
  5026. ],
  5027. }
  5028. this.echartR5Chart.setOption(option)
  5029. tools.loopShowTooltip(this.echartR5Chart, option, {
  5030. interval: 2000,
  5031. loopSeries: true,
  5032. })
  5033. },
  5034. },
  5035. })