investHomeGroup.js 160 KB

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