investHomeGroup.js 152 KB

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