investHomeGroup.js 228 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743
  1. let app = new Vue({
  2. el: '#app',
  3. data () {
  4. return {
  5. rightAdd: {},// 左边新增筛选参数
  6. projectNum: '', // 项目列表弹窗顶部类目筛选条件
  7. centerType: false, // 中间3D饼图
  8. boardType: '', // 哪边的项目看板
  9. pullShow: false, // 选择年份弹窗
  10. pollList: [],
  11. mockData: false,// 是否使用修改的数据
  12. year: '', // 选择的年份
  13. boardUrl: '', // 跳转路径
  14. boardTipShow: false, // 项目看板弹窗专用
  15. lineCommonCompany: [], //双柱状图弹窗上面的折线图x轴
  16. commonCompanyAll: [], // 公司包括编码
  17. changeLine: true,
  18. versions: true, // 是否使用接口数据数据
  19. app_token: '',
  20. centerShow: false, // 中间内容显示
  21. echartR4Chart: '',// 倒数第二个专用
  22. echartR5Chart: '', // 倒是第一个专用
  23. myChartTip1: '', // 弹窗单个柱状图专用
  24. myChartTip2: '', // 弹窗两个柱状图专用
  25. myChartTip3: '', // 弹窗两个柱状图专用
  26. echartEnterpriseShow: false, // 企业额度分析控制
  27. mapChart: '',//地图专用echarts
  28. chartCarousel: '',//做大屏轮播专用echarts
  29. mapTipShow: false,
  30. echartSingleTipShow: false,
  31. echartDoubleTipShow: false,
  32. projectListTipShow: false, //项目列表专属弹窗
  33. titleUrl: '',
  34. titleName: '',
  35. yellowCount: 0, // 黄圈轮播参数
  36. yellowPosition: 40,// 黄圈悬浮窗位置参数
  37. yellowType: true, // 黄圈悬浮停止轮播
  38. echartR1Fd: true,
  39. echartR2Fd: true,
  40. echartC2Fd: true,
  41. echartR3Fd: true,
  42. echarts1Time: 16000,
  43. time: '',
  44. timer: '',
  45. timer2: '',
  46. center1: center1,
  47. showTip2: false,
  48. showTip3: false,
  49. list: [],
  50. count: 0,
  51. countType: 0,
  52. geoCoordMap: {},
  53. storageRecordConfig2: center9,
  54. titleList: right1,
  55. centerLeftList: right3,
  56. storageRecordConfig: left11,
  57. config5: {
  58. rowNum: 9,
  59. waitTime: 2000,
  60. headerHeight: '40',
  61. header: ["项目名称", "所属组织", '实施主体', '建设性质(新建/续建)', '产业类别', '建设地点', '2022年投资完成额(万元)'],
  62. data: [
  63. ["青银二广高速公路太原联络线建设PPP项目", "交控集团", "山西路桥建设集团有限公司", "新建", "交通运输业", "山西省太原市、晋中市", "148,086.00"],
  64. ["国道241、省道岚马线汾河水库段改线工程", "交控集团", "太原国省道汾河水库段建设管理有限公司", "续建", "交通运输业", "山西省 太原市、吕梁市", "165,314.33"],
  65. ["路桥科技中心", "交控集团", "山西路桥集团多经营有限公司", "续建", "建筑房地产", "山西省太原市", "8,098.26"],
  66. ["路桥科研基地", "交控集团", "山西路桥集团多经有限公司", "续建", "建筑房地产", "山西省太原市", "6,596.56"],
  67. ["武宿高速充电站建设", "交控集团", "山西交通运输投融资集团有限责任公司", "新建", "新能源", "山西省太原市", "100.00"],
  68. ["山西交通研创商务基地项目", "交控集团", "山西交通物流集团有限公司", "续建", "建筑房地产", "山西省太原市", "4,097.00"],
  69. ["山西省交通科学研究院产业化基地", "交控集团", "山西省交通科技研发有限公司", "续建", "建筑房地产", "山西省太原市武洛街27号", "3,242.00"],
  70. ["太长高速公路太原南收费站(二期工程暨龙城服务区)项目", "交控集团", "山西省交通开发投资集团有限公司龙城服务区发展分公司", "续建", "建筑房地产", "山西省太原市", "3,580.00"],
  71. ["山西转型综改示范区中小企业产业园项目", "交控集团", "山西交投综改园区开发有限公司", "续建", "建筑房地产", "山西省太原市", "14,432.00"]
  72. ],
  73. align: ["center", "center", "center", "center", "center", "center", "center"],
  74. headerBGC: "#153A62",
  75. oddRowBGC: "#061F42",
  76. evenRowBGC: "#0C284A",
  77. },
  78. originalConfig6: [],
  79. config6: listPop
  80. }
  81. },
  82. created () {
  83. this.time = formatDate()
  84. this.timer = setInterval(() => {
  85. this.time = formatDate()
  86. }, 1000)
  87. this.timer2 = setInterval(() => {
  88. this.yellowType && this.changeYellow()
  89. }, 2000)
  90. },
  91. beforeDestroy () {
  92. if (this.timer) {
  93. clearInterval(this.timer);
  94. }
  95. if (this.timer2) {
  96. clearInterval(this.timer2);
  97. }
  98. },
  99. mounted () {
  100. this.getUrlParams()
  101. this.countYear()
  102. this.comeIn()
  103. },
  104. methods: {
  105. // 获取地址栏参数
  106. getUrlParams (id) {
  107. let url = window.location.href
  108. // 通过 ? 分割获取后面的参数字符串
  109. let urlStr = url.split('?')[1]
  110. if (!urlStr) {
  111. return
  112. }
  113. // 创建空对象存储参数
  114. let obj = {};
  115. // 再通过 & 将每一个参数单独分割出来
  116. let paramsArr = urlStr.split('&')
  117. for (let i = 0, len = paramsArr.length; i < len; i++) {
  118. // 再通过 = 将每一个参数分割为 key:value 的形式
  119. let arr = paramsArr[i].split('=')
  120. obj[arr[0]] = arr[1];
  121. }
  122. if (obj.model) {
  123. obj.model == 'A' || obj.model == 'a' ? this.mockData = false : this.mockData = true
  124. }
  125. },
  126. // 计算展示的年份
  127. countYear () {
  128. this.year = 2024
  129. // this.year = new Date().getFullYear()
  130. // for (i = 2022; true; i++) {
  131. // if (i == this.year) {
  132. // this.pollList.push(i)
  133. // return
  134. // } else {
  135. // this.pollList.push(i)
  136. // }
  137. // }
  138. },
  139. comeIn () {
  140. if (this.versions) {
  141. // 接口版
  142. this.getAppToken()
  143. setTimeout(() => {
  144. this.changeTopColor()
  145. // 大屏三
  146. this.initChartR5()
  147. this.changeYellow()
  148. })
  149. } else {
  150. // 假数据版
  151. setTimeout(() => {
  152. this.initChartL1()
  153. this.initChartL2()
  154. this.initChartL3()
  155. this.initChartL4()
  156. this.initChartL5()
  157. this.initChartL6()
  158. this.initChartL7()
  159. this.initChartL8()
  160. this.initChartL10()
  161. this.initChartL11()
  162. this.changeTopColor()
  163. // 大屏二
  164. this.initChinaChart()
  165. // 大屏三
  166. this.initChartR1()
  167. this.initChartR2()
  168. this.initChartR3()
  169. this.changeYellow()
  170. })
  171. }
  172. },
  173. chooseTime (value) {
  174. let that = this
  175. this.year = value
  176. that.destroyCharts()
  177. this.pullShow = false
  178. setTimeout(item => {
  179. that.comeIn()
  180. })
  181. },
  182. destroyCharts () {
  183. this.left10Chart ? this.left10Chart.dispose() : ''
  184. this.left1Chart ? this.left1Chart.destroy() : ''
  185. this.left2Chart ? this.left2Chart.destroy() : ''
  186. this.left3Chart ? this.left3Chart.destroy() : ''
  187. this.left4Chart ? this.left4Chart.destroy() : ''
  188. this.left5Chart ? this.left5Chart.destroy() : ''
  189. this.left6Chart ? this.left6Chart.destroy() : ''
  190. this.left7Chart ? this.left7Chart.dispose() : ''
  191. this.left8Chart ? this.left8Chart.dispose() : ''
  192. this.left9Chart ? this.left9Chart.dispose() : ''
  193. this.chartCarousel ? this.chartCarousel.dispose() : ''
  194. this.myChartTip1 ? this.myChartTip1.dispose() : ''
  195. this.myChartTip2 ? this.myChartTip2.dispose() : ''
  196. this.myChartTip3 ? this.myChartTip3.dispose() : ''
  197. this.left11Chart ? this.left11Chart.dispose() : ''
  198. this.right1Chart ? this.right1Chart.dispose() : ''
  199. this.right2Chart ? this.right2Chart.dispose() : ''
  200. this.right3Chart ? this.right3Chart.dispose() : ''
  201. this.echartR4Chart ? this.echartR4Chart.dispose() : ''
  202. this.echartR5Chart ? this.echartR5Chart.dispose() : ''
  203. this.center1Chart ? this.center1Chart.destroy() : ''
  204. this.center2Chart ? this.center2Chart.dispose() : ''
  205. this.center3Chart ? this.center3Chart.dispose() : ''
  206. this.center4Chart ? this.center4Chart.destroy() : ''
  207. this.mapChart ? this.mapChart.dispose() : ''
  208. },
  209. // 获取token
  210. getAppToken () {
  211. // dev环境
  212. // let value = {
  213. // "appId": "xilan1014", //系统编码
  214. // "appSecret": "12345678910Aa@Bb@Cc", //AccessToken加密认证密钥
  215. // "tenantid": "", //租户id
  216. // "accountId": "", //数据中心id
  217. // "language": "zh_CN"
  218. // }
  219. // SIT环境
  220. let value = {
  221. "appId": "68dp",
  222. "appSecret": "9ErhY^O{n?@Pc#eb7HYX",
  223. "tenantid": "",
  224. "accountId": "1635498801198269440",
  225. "language": "zh_CN"
  226. }
  227. post('/ierp/api/getAppToken.do', value).then(res => {
  228. this.app_token = res.data.app_token
  229. this.getAccessToken()
  230. })
  231. },
  232. // 获取AccessToken
  233. getAccessToken () {
  234. let value = {
  235. "user": "19900000001", //登录用户手机号
  236. "apptoken": this.app_token, //应用令牌
  237. "tenantid": "", //租户id
  238. "accountId": "1635498801198269440",//数据中心id
  239. "usertype": "Mobile"
  240. }
  241. post('/ierp/api/login.do', value).then(res => {
  242. this.access_token = res.data.access_token
  243. this.getOrg()
  244. })
  245. },
  246. // 获取组织架构列表
  247. getOrg () {
  248. return new Promise((resolve, err) => {
  249. let value = {
  250. access_token: this.access_token,
  251. }
  252. get('/ierp/kapi/v2/mdnb/mdnb_xmkb/mdnb_manager_middle/getOrgName', value).then(res => {
  253. this.commonCompanyAll = res.data
  254. commonCompany = res.data.map(item => item.simplename)
  255. // 左边
  256. this.getDate1()
  257. this.getDate2()
  258. this.getDate3()
  259. this.getDate4()
  260. this.getDate5()
  261. this.getDate6()
  262. // 右边
  263. this.getDate7()
  264. this.getDate8()
  265. this.getDate9()
  266. this.getDate10()
  267. // this.getDate11() // 右下A
  268. this.getDate12() // 右下B
  269. // 中间
  270. this.getDate14()
  271. resolve(1);
  272. })
  273. });
  274. },
  275. // 获取左边企业额度分析
  276. getDate1 () {
  277. let that = this
  278. return new Promise((resolve, err) => {
  279. let value = {
  280. access_token: this.access_token,
  281. "data": {
  282. "mdnb_combofield": this.mockData ? 'B' : 'A',
  283. "mdnb_datefield": this.year - 1 + '-01-01',
  284. },
  285. pageSize: 1000
  286. }
  287. post('/ierp/kapi/v2/mdnb/mdnb_xmkb/mdnb_manager_preinvest/tqqyedfx', value).then(res => {
  288. if (res.data.rows.length > 0) {
  289. let dataList = res.data.rows[0].entryentity
  290. left3 = [[], [], []]
  291. dataList.forEach(item => {
  292. // 已用额度
  293. left3[0].push(that.yuanChange(item.mdnb_amountfield26))
  294. // 剩余额度
  295. left3[1].push(that.yuanChange(item.mdnb_amountfield27))
  296. // 总额度
  297. left3[2].push(that.yuanChange(item.mdnb_amountfield25))
  298. })
  299. this.initChartL4(dataList)
  300. }
  301. resolve(1);
  302. })
  303. });
  304. },
  305. // 获取左边投资计划分析
  306. getDate2 () {
  307. let that = this
  308. return new Promise((resolve, err) => {
  309. let value = {
  310. access_token: this.access_token,
  311. "data": {
  312. "mdnb_combofield": this.mockData ? 'B' : 'A',
  313. "mdnb_datefield": this.year - 1 + '-01-01',
  314. },
  315. pageSize: 1000
  316. }
  317. post('/ierp/kapi/v2/mdnb/mdnb_xmkb/mdnb_manager_preinvest/tqtzjhfx', value).then(res => {
  318. if (res.data.rows.length > 0) {
  319. let dataList = res.data.rows[0]
  320. left4 = []
  321. left4[0] = dataList.mdnb_amountfield7
  322. left4[1] = dataList.mdnb_amountfield13
  323. left4[2] = dataList.mdnb_amountfield23
  324. left4[3] = dataList.mdnb_amountfield43
  325. left4[4] = dataList.mdnb_integerfield14
  326. left5[0].y = that.yuanChange(dataList.mdnb_amountfield9)
  327. left5[0].num = dataList.mdnb_integerfield15
  328. left5[1].y = that.yuanChange(dataList.mdnb_amountfield43)
  329. left5[1].num = dataList.mdnb_integerfield14
  330. left6[0].y = that.yuanChange(dataList.mdnb_amountfield15)
  331. left6[0].num = dataList.mdnb_integerfield16
  332. left6[1].y = that.yuanChange(dataList.mdnb_amountfield16)
  333. left6[1].num = dataList.mdnb_integerfield17
  334. that.initChartL2()
  335. that.initChartL3()
  336. }
  337. resolve(1);
  338. })
  339. });
  340. },
  341. // 获取左边产业布局分析
  342. getDate3 () {
  343. let that = this
  344. return new Promise((resolve, err) => {
  345. let value = {
  346. access_token: this.access_token,
  347. "data": {
  348. "mdnb_combofield": this.mockData ? 'B' : 'A',
  349. "mdnb_datefield": this.year - 1 + '-01-01',
  350. },
  351. pageSize: 1000
  352. }
  353. post('/ierp/kapi/v2/mdnb/mdnb_xmkb/mdnb_manager_preinvest/tqcebjfx', value).then(res => {
  354. if (res.data.rows.length > 0) {
  355. let dataList = this.classify(res.data.rows[0].mdnb_entryentity, 'mdnb_textfield1')
  356. // 传统产业分析
  357. if (dataList[0].data.length > left7.length || dataList[0].length == left7.length) {
  358. for (let i = 0; i < left7.length; i++) {
  359. left7[i].num = dataList[0].data[i].mdnb_integerfield13
  360. left7[i].y = dataList[0].data[i].mdnb_amountfield8
  361. }
  362. this.initChartL5()
  363. }
  364. // 战略性新兴产业
  365. if (dataList[1].data.length > left8.length || dataList[1].length == left8.length) {
  366. for (let i = 0; i < left8.length; i++) {
  367. left8[i].num = dataList[1].data[i].mdnb_integerfield13
  368. left8[i].y = dataList[1].data[i].mdnb_amountfield8
  369. }
  370. this.initChartL6()
  371. }
  372. // 特色优势产业
  373. if (dataList[2].data.length > left9.length || dataList[2].length == left9.length) {
  374. for (let i = 0; i < left9.length; i++) {
  375. left9[i].num = dataList[2].data[i].mdnb_integerfield13
  376. left9[i].y = dataList[2].data[i].mdnb_amountfield8
  377. }
  378. this.initChartL7()
  379. }
  380. // 公共基础等产业
  381. if (dataList[3].data.length > left10.length || dataList[3].length == left10.length) {
  382. for (let i = 0; i < left10.length; i++) {
  383. left10[i].num = dataList[3].data[i].mdnb_integerfield13
  384. left10[i].y = dataList[3].data[i].mdnb_amountfield8
  385. }
  386. this.initChartL8()
  387. }
  388. }
  389. resolve(1);
  390. })
  391. });
  392. },
  393. // 获取左边项目阶段分析
  394. getDate4 () {
  395. let that = this
  396. return new Promise((resolve, err) => {
  397. let value = {
  398. access_token: this.access_token,
  399. "data": {
  400. "mdnb_combofield": this.mockData ? 'B' : 'A',
  401. "mdnb_datefield": this.year - 1 + '-01-01',
  402. },
  403. pageSize: 1000
  404. }
  405. post('/ierp/kapi/v2/mdnb/mdnb_xmkb/mdnb_manager_preinvest/tqxmjdfx', value).then(res => {
  406. if (res.data.rows.length > 0) {
  407. let dataList = res.data.rows[0]
  408. // 固定资产进度分布
  409. // 特别监管
  410. left13[0][0][2] = dataList.mdnb_integerfield1
  411. left13[0][0][3] = this.yuanChange(dataList.mdnb_amountfield241)
  412. left13[0][1][2] = dataList.mdnb_integerfield3
  413. left13[0][1][3] = this.yuanChange(dataList.mdnb_amountfield5)
  414. left13[0][2][2] = dataList.mdnb_integerfield5
  415. left13[0][2][3] = this.yuanChange(dataList.mdnb_amountfield21)
  416. left13[0][3][2] = dataList.mdnb_integerfield7
  417. left13[0][3][3] = this.yuanChange(dataList.mdnb_amountfield29)
  418. // 备案
  419. left13[1][0][2] = dataList.mdnb_integerfield2
  420. left13[1][0][3] = this.yuanChange(dataList.mdnb_amountfield341)
  421. left13[1][1][2] = dataList.mdnb_integerfield4
  422. left13[1][1][3] = this.yuanChange(dataList.mdnb_amountfield11)
  423. left13[1][2][2] = dataList.mdnb_integerfield6
  424. left13[1][2][3] = this.yuanChange(dataList.mdnb_amountfield28)
  425. left13[1][3][2] = dataList.mdnb_integerfield8
  426. left13[1][3][3] = this.yuanChange(dataList.mdnb_amountfield30)
  427. // 股权类进度分布
  428. // 特别监管
  429. left14[0][0][2] = dataList.mdnb_integerfield11
  430. left14[0][0][3] = this.yuanChange(dataList.mdnb_amountfield2411)
  431. left14[0][1][2] = dataList.mdnb_integerfield31
  432. left14[0][1][3] = this.yuanChange(dataList.mdnb_amountfield51)
  433. left14[0][2][2] = dataList.mdnb_integerfield51
  434. left14[0][2][3] = this.yuanChange(dataList.mdnb_amountfield211)
  435. left14[0][3][2] = dataList.mdnb_integerfield71
  436. left14[0][3][3] = this.yuanChange(dataList.mdnb_amountfield291)
  437. // 备案
  438. left14[1][0][2] = dataList.mdnb_integerfield21
  439. left14[1][0][3] = this.yuanChange(dataList.mdnb_amountfield3411)
  440. left14[1][1][2] = dataList.mdnb_integerfield41
  441. left14[1][1][3] = this.yuanChange(dataList.mdnb_amountfield111)
  442. left14[1][2][2] = dataList.mdnb_integerfield61
  443. left14[1][2][3] = this.yuanChange(dataList.mdnb_amountfield281)
  444. left14[1][3][2] = dataList.mdnb_integerfield81
  445. left14[1][3][3] = this.yuanChange(dataList.mdnb_amountfield301)
  446. this.initChartL10()
  447. this.initChartL11()
  448. }
  449. resolve(1);
  450. })
  451. });
  452. },
  453. // 获取左边投资额度分析
  454. getDate5 () {
  455. let that = this
  456. return new Promise((resolve, err) => {
  457. let value = {
  458. access_token: this.access_token,
  459. "data": {
  460. "mdnb_combofield": this.mockData ? 'B' : 'A',
  461. "mdnb_datefield": this.year - 1 + '-01-01',
  462. },
  463. pageSize: 1000
  464. }
  465. post('/ierp/kapi/v2/mdnb/mdnb_xmkb/mdnb_manager_preinvest/tqtzedfx', value).then(res => {
  466. if (res.data.rows.length > 0) {
  467. let dataList = res.data.rows[0]
  468. left1[0] = dataList.mdnb_amountfield
  469. left1[1] = dataList.mdnb_amountfield1
  470. left1[2] = dataList.mdnb_amountfield2
  471. left2[0] = dataList.mdnb_decimalfield
  472. left2[1] = dataList.mdnb_amountfield3
  473. this.initChartL1()
  474. }
  475. resolve(1);
  476. })
  477. });
  478. },
  479. // 获取左边重点项目两线指标
  480. getDate6 () {
  481. let that = this
  482. return new Promise((resolve, err) => {
  483. let value = {
  484. access_token: this.access_token,
  485. "data": {
  486. "mdnb_combofield": this.mockData ? 'B' : 'A',
  487. "mdnb_datefield": this.year - 1 + '-01-01',
  488. },
  489. pageSize: 1000
  490. }
  491. post('/ierp/kapi/v2/mdnb/mdnb_xmkb/mdnb_manager_preinvest/tqzdlxzb', value).then(res => {
  492. if (res.data.rows.length > 0) {
  493. let dataList2 = this.classify(res.data.rows[0].mdnb_entryentity1, 'mdnb_textfield3')
  494. // 右边的柱状图
  495. left12 = []
  496. dataList2.forEach((item, index) => {
  497. left12[index] = [[], [], []]
  498. for (let i = 0; i < 5; i++) {
  499. left12[index][0].push(item.data[i].mdnb_integerfield10)
  500. left12[index][1].push(item.data[i].mdnb_integerfield12)
  501. left12[index][2].push(item.data[i].mdnb_integerfield9)
  502. }
  503. })
  504. that.initChartL9()
  505. // 左边的轮播
  506. let dataList = []
  507. dataList2.forEach((item, index) => {
  508. dataList[index] = []
  509. dataList[index][0] = item.data[0].mdnb_textfield18
  510. dataList[index][1] = item.data[0].mdnb_textfield3
  511. dataList[index][2] = that.yuanChange(item.data[0].mdnb_amountfield24) + '亿'
  512. })
  513. this.storageRecordConfig.data = dataList
  514. this.storageRecordConfig = { ...this.storageRecordConfig }
  515. }
  516. resolve(1);
  517. })
  518. });
  519. },
  520. // 获取右边顶部条数据
  521. getDate7 () {
  522. return new Promise((resolve, err) => {
  523. let value = {
  524. access_token: this.access_token,
  525. "request": {
  526. isInsert: this.mockData ? '1' : '0',
  527. },
  528. pageSize: 1000
  529. }
  530. post('/ierp/kapi/v2/mdnb/mdnb_xmkb/mdnb_manager_middle/getTabpageap', value).then(res => {
  531. right1[0].number = res.data.mdnb_one_step
  532. right1[2].number = res.data.mdnb_two_step
  533. right1[4].number = res.data.mdnb_three_step
  534. right1[6].number = res.data.mdnb_four_step
  535. right1[8].number = res.data.mdnb_five_step
  536. right1[10].number = res.data.mdnb_six_step
  537. right1[12].number = res.data.mdnb_seven_step
  538. right1[14].number = res.data.mdnb_eight_step
  539. resolve(1);
  540. })
  541. });
  542. },
  543. // 获取右边中间左边的(正偏差/容差内/负偏差)
  544. getDate8 () {
  545. return new Promise((resolve, err) => {
  546. let value = {
  547. access_token: this.access_token,
  548. "request": {
  549. isInsert: this.mockData ? '1' : '0',
  550. },
  551. pageSize: 1000
  552. }
  553. post('/ierp/kapi/v2/mdnb/mdnb_xmkb/mdnb_manager_middle/getInvestSunstraction', value).then(res => {
  554. right3[0].value = res.data.mdnb_projectnum_z
  555. right3[0].value2 = res.data.mdnb_amountall_z
  556. right3[1].value = res.data.mdnb_projectnum_r
  557. right3[1].value2 = res.data.mdnb_amountall_r
  558. right3[2].value = res.data.mdnb_projectnum_f
  559. right3[2].value2 = res.data.mdnb_amountall_f
  560. resolve(1);
  561. })
  562. });
  563. },
  564. // 获取右边中间右边的(预算额/已签合同额。。。)
  565. getDate9 () {
  566. return new Promise((resolve, err) => {
  567. let value = {
  568. access_token: this.access_token,
  569. "request": {
  570. isInsert: this.mockData ? '1' : '0',
  571. },
  572. pageSize: 1000
  573. }
  574. post('/ierp/kapi/v2/mdnb/mdnb_xmkb/mdnb_manager_middle/getUnitBudgetExecuteDate', value).then(res => {
  575. res.data.forEach((item, index) => {
  576. right4[index].value = this.yuanChange(item.mdnb_aheadmoney)
  577. right4[index].value2 = this.yuanChange(item.mdnb_edmoney)
  578. right4[index].value3 = this.yuanChange(item.mdnb_smoney)
  579. right4[index].value4 = this.yuanChange(item.mdnb_jmoney)
  580. right4[index].value5 = this.yuanChange(item.mdnb_fkmoney)
  581. })
  582. this.initChartR1()
  583. resolve(1);
  584. })
  585. });
  586. },
  587. // 进度成本偏差
  588. getDate10 () {
  589. let that = this
  590. return new Promise((resolve, err) => {
  591. let value = {
  592. access_token: this.access_token,
  593. "request": {
  594. isInsert: this.mockData ? '1' : '0',
  595. },
  596. pageSize: 1000
  597. }
  598. post('/ierp/kapi/v2/mdnb/mdnb_xmkb/mdnb_manager_middle/getInvestSunstractionGas', value).then(res => {
  599. res.data.forEach((item, index) => {
  600. right5[0][index][1] = item.mdnb_amount_zb
  601. right5[0][index][2] = that.yuanChange(item.mdnb_amount_z)
  602. right5[1][index][1] = item.mdnb_amount_nb
  603. right5[1][index][2] = that.yuanChange(item.mdnb_amount_n)
  604. right5[2][index][1] = item.mdnb_amount_fb
  605. right5[2][index][2] = that.yuanChange(item.mdnb_amount_f)
  606. })
  607. this.initChartR2()
  608. resolve(1);
  609. })
  610. });
  611. },
  612. // 项目风险分析A
  613. getDate11 () {
  614. return new Promise((resolve, err) => {
  615. let value = {
  616. access_token: this.access_token,
  617. "request": {
  618. isInsert: this.mockData ? '1' : '0',
  619. },
  620. pageSize: 1000
  621. }
  622. post('/ierp/kapi/v2/mdnb/mdnb_xmkb/mdnb_manager_middle/getUnitNoSolveDangerDate', value).then(res => {
  623. res.data.forEach((item, index) => {
  624. right6[index].value = item.mdnb_height
  625. right6[index].value2 = item.mdnb_midle
  626. right6[index].value3 = item.mdnb_bottom
  627. })
  628. this.initChartR3()
  629. resolve(1);
  630. })
  631. });
  632. },
  633. // 项目风险分析B(雷达图)
  634. getDate12 () {
  635. return new Promise((resolve, err) => {
  636. let value = {
  637. access_token: this.access_token,
  638. "request": {
  639. isInsert: this.mockData ? '1' : '0',
  640. },
  641. pageSize: 1000
  642. }
  643. post('/ierp/kapi/v2/mdnb/mdnb_xmkb/mdnb_manager_middle/getUnitDangerPoraitDate', value).then(res => {
  644. res.data.forEach((item, index) => {
  645. right7[index][0] = item.mdnb_anquan
  646. right7[index][1] = item.mdnb_fukuan
  647. right7[index][2] = item.mdnb_hetong
  648. right7[index][3] = item.mdnb_jiesuan
  649. right7[index][4] = item.mdnb_jindu
  650. right7[index][5] = item.mdnb_securty
  651. })
  652. this.getDate11()
  653. resolve(1);
  654. })
  655. });
  656. },
  657. // 中间大屏数据
  658. getDate14 () {
  659. let that = this
  660. return new Promise((resolve, err) => {
  661. let value = {
  662. access_token: this.access_token,
  663. mock: this.mockData,
  664. presetYear: this.year
  665. }
  666. get('/ierp/kapi/v2/mdnb/mdnb_xmkb/presetdata/getKeyData', value).then(res => {
  667. // 头部指标
  668. if (!res.data) {
  669. return
  670. }
  671. center4[0] = res.data.transformations.estateAmount
  672. center4[1] = res.data.transformations.estateNum
  673. center4[2] = res.data.transformations.figureAmount
  674. center4[3] = res.data.transformations.figureNum
  675. // 左投部指标
  676. center1[0] = res.data.keyIndicators.totalSum
  677. center1[1] = res.data.keyIndicators.total
  678. center1[2] = res.data.keyIndicators.property
  679. center1[3] = res.data.keyIndicators.invest
  680. // 投资产业分布
  681. for (let i = 0; i < center2.length; i++) {
  682. center2[i].y = that.yuanChange(res.data.distribution[i].amount)
  683. center2[i].value = that.yuanChange(res.data.distribution[i].amount)
  684. center2[i].num = res.data.distribution[i].count
  685. center2[i].typeno = res.data.distribution[i].typeno
  686. }
  687. // 投资执行情况
  688. res.data.implementationStatus.forEach((item, index) => {
  689. center3[index].value = that.yuanChange(item.plan)
  690. center3[index].value2 = that.yuanChange(item.reality)
  691. })
  692. // 五个一体化
  693. res.data.five.forEach((item, index) => {
  694. center6[index] = { name: item.type, value: that.yuanChange(item.amount), typeno: item.typeno }
  695. })
  696. // 投资阶段分析
  697. res.data.investmentStage.forEach((item, index) => {
  698. center7[index] = { name: item.type, value: Number(item.num), value2: that.yuanChange(item.amount), typeno: item.typeno, sliced: false, selected: false }
  699. })
  700. // 重点项目监控
  701. center8 = []
  702. this.originalConfig6 = res.data.projectMonitoring
  703. res.data.projectMonitoring.forEach((item, index) => {
  704. center8.push({ value: item.amount, name: item.name, office: item.group })
  705. })
  706. // 中国地图
  707. centerChina = []
  708. res.data.investmentMap.forEach((item, index) => {
  709. centerChina.push({ name: item.address, value: that.yuanChange(item.amount), value2: item.value2 })
  710. })
  711. // 项目状态
  712. proState.projectStatus1 = res.data.projectStatus.projectStatus1
  713. proState.projectStatus2 = res.data.projectStatus.projectStatus2
  714. proState.projectStatus3 = res.data.projectStatus.projectStatus3
  715. setTimeout(() => {
  716. that.initChinaChart()
  717. })
  718. resolve(1);
  719. })
  720. });
  721. },
  722. // 右边穿透一级
  723. rightPenetrateOne () {
  724. this.boardType = 'right'
  725. return new Promise((resolve, err) => {
  726. let value = {
  727. access_token: this.access_token,
  728. "request": {
  729. isInsert: this.mockData ? '1' : '0'
  730. },
  731. pageSize: 1000
  732. }
  733. post('/ierp/kapi/v2/mdnb/mdnb_xmkb/mdnb_manager_middle/getOneLevelData', value).then(res => {
  734. res.data.forEach((item, index) => {
  735. common4[index] = item.mdnb_projects
  736. common5[index] = item.mdnb_amount_sl
  737. })
  738. setTimeout(() => {
  739. this.initChartLTip2('right')
  740. this.initChartLTip3('right')
  741. })
  742. resolve(1);
  743. })
  744. });
  745. },
  746. // 右边穿透二级
  747. rightPenetrateTwo (modelName, substraction, orgName) {
  748. this.boardType = 'right'
  749. let that = this
  750. return new Promise((resolve, err) => {
  751. let value = {
  752. access_token: this.access_token,
  753. "request": {
  754. isInsert: this.mockData ? '1' : '0',
  755. modelName: this.rightAdd.modelName,
  756. projectStepCode: this.rightAdd.projectStepCode,
  757. substraction,
  758. orgName
  759. },
  760. pageSize: 1000
  761. }
  762. post('/ierp/kapi/v2/mdnb/mdnb_xmkb/mdnb_manager_middle/getTwoLevelData', value).then(res => {
  763. that.originalConfig6 = res.data
  764. that.config6.data = []
  765. if (this.projectNum == 311) {
  766. that.config6.header = ["所属集团", "项目名称", '实施主体', '投中项目阶段', '投资总额(万元)']
  767. res.data.forEach((item, index) => {
  768. that.config6.data[index] = []
  769. that.config6.data[index][0] = item.mdnb_unitcompany
  770. that.config6.data[index][1] = item.mdnb_project_name
  771. that.config6.data[index][2] = item.mdnb_implement_org
  772. that.config6.data[index][3] = item.mdnb_projectstep_mid
  773. that.config6.data[index][4] = item.mdnb_investment_money / 10000
  774. })
  775. } else if (this.projectNum == 312 || this.projectNum == 313) {
  776. that.config6.header = ["所属集团", "项目名称", '实施主体', '容差百分比', '投资总额(万元)']
  777. res.data.forEach((item, index) => {
  778. that.config6.data[index] = []
  779. that.config6.data[index][0] = item.mdnb_unitcompany
  780. that.config6.data[index][1] = item.mdnb_project_name
  781. that.config6.data[index][2] = item.mdnb_implement_org
  782. that.config6.data[index][3] = item.mdnb_percentagetolerance
  783. that.config6.data[index][4] = item.mdnb_investment_money / 10000
  784. })
  785. } else if (this.projectNum == 314) {
  786. that.config6.header = ["所属集团", "项目名称", '实施主体', '预算额(万元)', '已签订合同额(万元)', '产值认定额(万元)', '结算额(万元)', '付款申请额(万元)', '实际付款额(万元)']
  787. res.data.forEach((item, index) => {
  788. that.config6.data[index] = []
  789. that.config6.data[index][0] = item.mdnb_unitcompany
  790. that.config6.data[index][1] = item.mdnb_project_name
  791. that.config6.data[index][2] = item.mdnb_implement_org
  792. that.config6.data[index][3] = item.mdnb_budgetamount / 10000
  793. that.config6.data[index][4] = item.mdnb_contractamount / 10000
  794. that.config6.data[index][5] = item.mdnb_outputamount / 10000
  795. that.config6.data[index][6] = item.mdnb_settlementamount / 10000
  796. that.config6.data[index][6] = item.mdnb_paymentamount / 10000
  797. that.config6.data[index][6] = item.mdnb_actualpayamount / 10000
  798. })
  799. } else if (this.projectNum == 315) {
  800. that.config6.header = ["所属集团", "项目名称", '实施主体', '高风险项', '中风险项', '低风险项', '投资总额(万元)']
  801. res.data.forEach((item, index) => {
  802. that.config6.data[index] = []
  803. that.config6.data[index][0] = item.mdnb_unitcompany
  804. that.config6.data[index][1] = item.mdnb_project_name
  805. that.config6.data[index][2] = item.mdnb_implement_org
  806. that.config6.data[index][3] = item.mdnb_heigtdanger
  807. that.config6.data[index][4] = item.mdnb_middledanger
  808. that.config6.data[index][5] = item.mdnb_lowdanger
  809. that.config6.data[index][6] = item.mdnb_investment_money / 10000
  810. })
  811. }
  812. that.config6 = { ...that.config6 }
  813. that.projectListTipShow = true
  814. resolve(1);
  815. })
  816. });
  817. },
  818. // 左边穿透一级
  819. leftPenetrateOne (mdnb_textfield11, mdnb_textfield13, mdnb_textfield16, mdnb_textfield23, typeNum, type, param, typeCTwo, paramCTwo) {
  820. this.boardType = 'left'
  821. return new Promise((resolve, err) => {
  822. let value = {
  823. access_token: this.access_token,
  824. "data": {
  825. mdnb_combofield: this.mockData ? 'B' : 'A',
  826. mdnb_textfield11,
  827. mdnb_textfield13,
  828. mdnb_textfield16,
  829. mdnb_textfield23,
  830. mdnb_datefield: this.year - 1 + '-01-01'
  831. },
  832. pageSize: 1000
  833. }
  834. post('/ierp/kapi/v2/mdnb/mdnb_xmkb/mdnb_manager_preinvest/yjct', value).then(res => {
  835. if (res.data.rows.length > 0) {
  836. if (typeNum == 2) {
  837. common4 = []
  838. common5 = []
  839. res.data.rows[0].mdnb_entryentity12.forEach((item, index) => {
  840. common4.push(item.mdnb_integerfield18)
  841. common5.push(item.mdnb_amountfield12)
  842. })
  843. setTimeout(() => {
  844. this.initChartLTip2('left', mdnb_textfield11, mdnb_textfield13, mdnb_textfield16, mdnb_textfield23, type, param, typeCTwo, paramCTwo)
  845. this.initChartLTip3('left', mdnb_textfield11, mdnb_textfield13, mdnb_textfield16, mdnb_textfield23, type, param, typeCTwo, paramCTwo)
  846. })
  847. } else if (typeNum == 1) {
  848. this.initChartLTip('left', mdnb_textfield11, mdnb_textfield13, mdnb_textfield16, mdnb_textfield23, type, param, typeCTwo, paramCTwo)
  849. }
  850. }
  851. resolve(1);
  852. })
  853. });
  854. },
  855. // 左边穿透二级
  856. leftPenetrateTwo (mdnb_textfield12, mdnb_textfield19, mdnb_textfield15, mdnb_textfield17, mdnb_textfield20, num) {
  857. num && (this.projectNum = num)
  858. this.boardType = 'left'
  859. let that = this
  860. if (that.versions) {
  861. return new Promise((resolve, err) => {
  862. let value = {
  863. access_token: this.access_token,
  864. "data": {
  865. mdnb_combofield: this.mockData ? 'B' : 'A',
  866. mdnb_datefield: this.year - 1 + '-01-01',
  867. mdnb_textfield12,
  868. mdnb_textfield19,
  869. mdnb_textfield15,
  870. mdnb_textfield17,
  871. mdnb_textfield20
  872. },
  873. pageSize: 1000
  874. }
  875. if (mdnb_textfield20) {
  876. post('/ierp/kapi/v2/mdnb/mdnb_xmkb/mdnb_manager_preinvest/ejct', value).then(res => {
  877. that.config6.data = []
  878. if (res.data.rows.length > 0) {
  879. that.originalConfig6 = res.data.rows[0].mdnb_entryentity11
  880. that.config6.data = []
  881. if (this.projectNum == 211 || this.projectNum == 212) {
  882. that.config6.header = ["所属集团", "项目名称", '投资主体', '项目类型', '项目性质', '已占用额度(万元)']
  883. res.data.rows[0].mdnb_entryentity11.forEach((item, index) => {
  884. that.config6.data[index] = []
  885. that.config6.data[index][0] = item.mdnb_textfield7
  886. that.config6.data[index][1] = item.mdnb_textfield6
  887. that.config6.data[index][2] = item.mdnb_textfield8
  888. that.config6.data[index][3] = item.mdnb_textfield25
  889. that.config6.data[index][4] = item.mdnb_textfield26
  890. that.config6.data[index][5] = item.mdnb_amountfield22 / 10000
  891. })
  892. } else if (this.projectNum == 2141) {
  893. that.config6.header = ["所属集团", "项目名称", '投资主体', '项目类型', '项目性质', '本年度计划投资额(万元)']
  894. res.data.rows[0].mdnb_entryentity11.forEach((item, index) => {
  895. that.config6.data[index] = []
  896. that.config6.data[index][0] = item.mdnb_textfield7
  897. that.config6.data[index][1] = item.mdnb_textfield6
  898. that.config6.data[index][2] = item.mdnb_textfield8
  899. that.config6.data[index][3] = item.mdnb_textfield25
  900. that.config6.data[index][4] = item.mdnb_textfield26
  901. that.config6.data[index][5] = item.mdnb_amountfield22 / 10000
  902. })
  903. } else if (this.projectNum == 2142) {
  904. that.config6.header = ["所属集团", "项目名称", '投资主体', '项目类型', '项目性质', '是否主业', '本年度计划投资额(万元)']
  905. res.data.rows[0].mdnb_entryentity11.forEach((item, index) => {
  906. that.config6.data[index] = []
  907. that.config6.data[index][0] = item.mdnb_textfield7
  908. that.config6.data[index][1] = item.mdnb_textfield6
  909. that.config6.data[index][2] = item.mdnb_textfield8
  910. that.config6.data[index][3] = item.mdnb_textfield25
  911. that.config6.data[index][4] = item.mdnb_textfield26
  912. that.config6.data[index][5] = item.mdnb_textfield21
  913. that.config6.data[index][6] = item.mdnb_amountfield22 / 10000
  914. })
  915. } else if (this.projectNum == 2143) {
  916. that.config6.header = ["所属集团", "项目名称", '投资主体', '项目类型', '项目性质', '项目管理类型', '本年度计划投资额(万元)']
  917. res.data.rows[0].mdnb_entryentity11.forEach((item, index) => {
  918. that.config6.data[index] = []
  919. that.config6.data[index][0] = item.mdnb_textfield7
  920. that.config6.data[index][1] = item.mdnb_textfield6
  921. that.config6.data[index][2] = item.mdnb_textfield8
  922. that.config6.data[index][3] = item.mdnb_textfield25
  923. that.config6.data[index][4] = item.mdnb_textfield26
  924. that.config6.data[index][5] = item.mdnb_textfield22
  925. that.config6.data[index][6] = item.mdnb_amountfield22 / 10000
  926. })
  927. } else if (this.projectNum == 215) {
  928. that.config6.header = ["所属集团", "项目名称", '投资主体', '产业类别I级', '产业类别II级', '本年度计划投资额(万元)']
  929. res.data.rows[0].mdnb_entryentity11.forEach((item, index) => {
  930. that.config6.data[index] = []
  931. that.config6.data[index][0] = item.mdnb_textfield7
  932. that.config6.data[index][1] = item.mdnb_textfield6
  933. that.config6.data[index][2] = item.mdnb_textfield8
  934. that.config6.data[index][3] = item.mdnb_textfield9
  935. that.config6.data[index][4] = item.mdnb_textfield10
  936. that.config6.data[index][5] = item.mdnb_amountfield22 / 10000
  937. })
  938. } else if (this.projectNum == 216) {
  939. that.config6.header = ["所属集团", "项目名称", '投资主体', '项目类型', '项目性质', '项目阶段', '本年度计划投资额(万元)']
  940. res.data.rows[0].mdnb_entryentity11.forEach((item, index) => {
  941. that.config6.data[index] = []
  942. that.config6.data[index][0] = item.mdnb_textfield7
  943. that.config6.data[index][1] = item.mdnb_textfield6
  944. that.config6.data[index][2] = item.mdnb_textfield8
  945. that.config6.data[index][3] = item.mdnb_textfield25
  946. that.config6.data[index][4] = item.mdnb_textfield26
  947. that.config6.data[index][5] = item.mdnb_textfield24
  948. that.config6.data[index][6] = item.mdnb_amountfield22 / 10000
  949. })
  950. }
  951. }
  952. that.config6 = { ...that.config6 }
  953. that.projectListTipShow = true
  954. resolve(1);
  955. })
  956. } else {
  957. post('/ierp/kapi/v2/mdnb/mdnb_xmkb/mdnb_manager_preinvest/tzedfxzed', value).then(res => {
  958. if (res.data.rows.length > 0) {
  959. that.originalConfig6 = res.data.rows[0].mdnb_entryentity11
  960. that.config6.data = []
  961. if (this.projectNum == 211 || this.projectNum == 212) {
  962. that.config6.header = ["所属集团", "项目名称", '投资主体', '项目类型', '项目性质', '已占用额度(万元)']
  963. res.data.rows[0].mdnb_entryentity11.forEach((item, index) => {
  964. that.config6.data[index] = []
  965. that.config6.data[index][0] = item.mdnb_textfield7
  966. that.config6.data[index][1] = item.mdnb_textfield6
  967. that.config6.data[index][2] = item.mdnb_textfield8
  968. that.config6.data[index][3] = item.mdnb_textfield25
  969. that.config6.data[index][4] = item.mdnb_textfield26
  970. that.config6.data[index][5] = item.mdnb_amountfield22 / 10000
  971. })
  972. } else if (this.projectNum == 2141) {
  973. that.config6.header = ["所属集团", "项目名称", '投资主体', '项目类型', '项目性质', '本年度计划投资额(万元)']
  974. res.data.rows[0].mdnb_entryentity11.forEach((item, index) => {
  975. that.config6.data[index] = []
  976. that.config6.data[index][0] = item.mdnb_textfield7
  977. that.config6.data[index][1] = item.mdnb_textfield6
  978. that.config6.data[index][2] = item.mdnb_textfield8
  979. that.config6.data[index][3] = item.mdnb_textfield25
  980. that.config6.data[index][4] = item.mdnb_textfield26
  981. that.config6.data[index][5] = item.mdnb_amountfield22 / 10000
  982. })
  983. } else if (this.projectNum == 2142) {
  984. that.config6.header = ["所属集团", "项目名称", '投资主体', '项目类型', '项目性质', '是否主业', '本年度计划投资额(万元)']
  985. res.data.rows[0].mdnb_entryentity11.forEach((item, index) => {
  986. that.config6.data[index] = []
  987. that.config6.data[index][0] = item.mdnb_textfield7
  988. that.config6.data[index][1] = item.mdnb_textfield6
  989. that.config6.data[index][2] = item.mdnb_textfield8
  990. that.config6.data[index][3] = item.mdnb_textfield25
  991. that.config6.data[index][4] = item.mdnb_textfield26
  992. that.config6.data[index][5] = item.mdnb_textfield21
  993. that.config6.data[index][6] = item.mdnb_amountfield22 / 10000
  994. })
  995. } else if (this.projectNum == 2143) {
  996. that.config6.header = ["所属集团", "项目名称", '投资主体', '项目类型', '项目性质', '项目管理类型', '本年度计划投资额(万元)']
  997. res.data.rows[0].mdnb_entryentity11.forEach((item, index) => {
  998. that.config6.data[index] = []
  999. that.config6.data[index][0] = item.mdnb_textfield7
  1000. that.config6.data[index][1] = item.mdnb_textfield6
  1001. that.config6.data[index][2] = item.mdnb_textfield8
  1002. that.config6.data[index][3] = item.mdnb_textfield25
  1003. that.config6.data[index][4] = item.mdnb_textfield26
  1004. that.config6.data[index][5] = item.mdnb_textfield22
  1005. that.config6.data[index][6] = item.mdnb_amountfield22 / 10000
  1006. })
  1007. } else if (this.projectNum == 215) {
  1008. that.config6.header = ["所属集团", "项目名称", '投资主体', '产业类别I级', '产业类别II级', '本年度计划投资额(万元)']
  1009. res.data.rows[0].mdnb_entryentity11.forEach((item, index) => {
  1010. that.config6.data[index] = []
  1011. that.config6.data[index][0] = item.mdnb_textfield7
  1012. that.config6.data[index][1] = item.mdnb_textfield6
  1013. that.config6.data[index][2] = item.mdnb_textfield8
  1014. that.config6.data[index][3] = item.mdnb_textfield9
  1015. that.config6.data[index][4] = item.mdnb_textfield10
  1016. that.config6.data[index][5] = item.mdnb_amountfield22 / 10000
  1017. })
  1018. } else if (this.projectNum == 216) {
  1019. that.config6.header = ["所属集团", "项目名称", '投资主体', '项目类型', '项目性质', '项目阶段', '本年度计划投资额(万元)']
  1020. res.data.rows[0].mdnb_entryentity11.forEach((item, index) => {
  1021. that.config6.data[index] = []
  1022. that.config6.data[index][0] = item.mdnb_textfield7
  1023. that.config6.data[index][1] = item.mdnb_textfield6
  1024. that.config6.data[index][2] = item.mdnb_textfield8
  1025. that.config6.data[index][3] = item.mdnb_textfield25
  1026. that.config6.data[index][4] = item.mdnb_textfield26
  1027. that.config6.data[index][5] = item.mdnb_textfield24
  1028. that.config6.data[index][6] = item.mdnb_amountfield22 / 10000
  1029. })
  1030. }
  1031. that.config6 = { ...that.config6 }
  1032. that.projectListTipShow = true
  1033. }
  1034. resolve(1);
  1035. })
  1036. }
  1037. });
  1038. } else {
  1039. that.projectListTipShow = true
  1040. }
  1041. },
  1042. // 中间穿透一级 一个柱状图还是两个
  1043. centerPenetrateOne (type, param, typeNum, typeCTwo, paramCTwo, portType) {
  1044. this.boardType = 'center'
  1045. let that = this
  1046. return new Promise((resolve, err) => {
  1047. let value = {
  1048. access_token: this.access_token,
  1049. mock: this.mockData,
  1050. presetYear: this.year,
  1051. type,
  1052. param
  1053. }
  1054. get('/ierp/kapi/v2/mdnb/mdnb_xmkb/presetdata/getPenetrationLevel1', value).then(res => {
  1055. if (typeNum == 1) {
  1056. common3 = []
  1057. res.data.keyIndicators.forEach((item, index) => {
  1058. if (param == 'cyplanamount') {
  1059. common3.push(item.cyplanamount)
  1060. }
  1061. if (param == 'cyplancount') {
  1062. common3.push(item.cyplanamount)
  1063. }
  1064. if (param == 'szplanamount') {
  1065. common3.push(item.cyplanamount)
  1066. }
  1067. if (param == 'szplancount') {
  1068. common3.push(item.szplancount)
  1069. }
  1070. if (param == 'investamount') {
  1071. common3.push(item.investamount)
  1072. }
  1073. if (param == 'projectcount') {
  1074. common3.push(item.projectcount)
  1075. }
  1076. if (param == 'gdzcamount') {
  1077. common3.push(item.projectcount)
  1078. }
  1079. if (param == 'gqtzamount') {
  1080. common3.push(item.projectcount)
  1081. }
  1082. if (param == 'ceiamount') {
  1083. common3.push(item.ceiamount)
  1084. }
  1085. if (param == 'cpneiamount') {
  1086. common3.push(item.cpneiamount)
  1087. }
  1088. if (param == 'ccheiamount') {
  1089. common3.push(item.ccheiamount)
  1090. }
  1091. if (param == 'cdiamount') {
  1092. common3.push(item.cdiamount)
  1093. }
  1094. if (param == 'cciamount') {
  1095. common3.push(item.cciamount)
  1096. }
  1097. })
  1098. setTimeout(() => {
  1099. this.initChartLTip('center', '', '', '', '', typeCTwo, paramCTwo, portType)
  1100. })
  1101. } else if (typeNum == 2) {
  1102. common4 = []
  1103. common5 = []
  1104. if (type == 'distribution') {
  1105. that.changeLine = false
  1106. that.lineCommonCompany = res.data.topData.map(item => item.type)
  1107. common4 = res.data.topData.map(item => item.amount)
  1108. common5 = res.data.bottomData.map(item => item.amount)
  1109. } else {
  1110. if (param == 'new') {
  1111. res.data.keyIndicators.forEach((item, index) => {
  1112. common4.push(item.newamount)
  1113. common5.push(item.newcount)
  1114. })
  1115. } else if (param == 'renew') {
  1116. res.data.keyIndicators.forEach((item, index) => {
  1117. common4.push(item.renewamount)
  1118. common5.push(item.renewcount)
  1119. })
  1120. } else if (param == '太原市') {
  1121. res.data.investmentMap.forEach((item, index) => {
  1122. common4.push(item.value2)
  1123. common5.push(item.amount)
  1124. })
  1125. }
  1126. }
  1127. setTimeout(() => {
  1128. this.initChartLTip2('center', '', '', '', '', type, param, typeCTwo, paramCTwo, portType)
  1129. this.initChartLTip3('center', '', '', '', '', type, param, typeCTwo, paramCTwo, portType)
  1130. })
  1131. } else if (typeNum == 3) {
  1132. // 山西地图
  1133. center5 = []
  1134. res.data.investmentMap.forEach((item, index) => {
  1135. center5.push({ name: item.address, value: that.yuanChange(item.amount), value2: item.value2 })
  1136. })
  1137. setTimeout(() => {
  1138. that.initProvinceChart()
  1139. });
  1140. }
  1141. resolve(1);
  1142. })
  1143. });
  1144. },
  1145. // 中间穿透二级
  1146. centerPenetrateTwo (type, param, orgNum, portType) {
  1147. this.boardType = 'center'
  1148. let that = this
  1149. return new Promise((resolve, err) => {
  1150. let value = {
  1151. access_token: this.access_token,
  1152. mock: this.mockData,
  1153. presetYear: this.year,
  1154. type,
  1155. param,
  1156. orgNum
  1157. }
  1158. that.config6.header[2] = '投资主体'
  1159. that.config6.header[5] = '年投资完成额(亿)'
  1160. if (portType == 1) {
  1161. get('/ierp/kapi/v2/mdnb/mdnb_xmkb/presetdata/MainPageMonthReportProject', value).then(res => {
  1162. that.config6.data = []
  1163. that.originalConfig6 = res.data
  1164. res.data.forEach((item, index) => {
  1165. that.config6.data[index] = []
  1166. that.config6.data[index][0] = item.projectname
  1167. that.config6.data[index][1] = item.orgName
  1168. that.config6.data[index][2] = item.tzzt
  1169. that.config6.data[index][3] = item.cylb
  1170. that.config6.data[index][4] = item.cylb2
  1171. that.config6.data[index][5] = item.amount
  1172. })
  1173. that.config6 = { ...that.config6 }
  1174. that.projectListTipShow = true
  1175. resolve(1);
  1176. })
  1177. } else if (portType == 2) {
  1178. get('/ierp/kapi/v2/mdnb/mdnb_xmkb/presetdata/MainPagePlanProject', value).then(res => {
  1179. that.config6.data = []
  1180. that.originalConfig6 = res.data
  1181. res.data.forEach((item, index) => {
  1182. that.config6.data[index] = []
  1183. that.config6.data[index][0] = item.projectname
  1184. that.config6.data[index][1] = item.orgName
  1185. that.config6.data[index][2] = item.tzzt
  1186. that.config6.data[index][3] = item.cylb
  1187. that.config6.data[index][4] = item.cylb2
  1188. that.config6.data[index][5] = item.amount
  1189. })
  1190. that.config6 = { ...that.config6 }
  1191. that.projectListTipShow = true
  1192. resolve(1);
  1193. })
  1194. } else {
  1195. value = {
  1196. access_token: this.access_token,
  1197. mock: this.mockData,
  1198. presetYear: this.year,
  1199. type: 'investmentMap',
  1200. param: '太原市',
  1201. orgNum
  1202. }
  1203. get('/ierp/kapi/v2/mdnb/mdnb_xmkb/presetdata/MainPageMonthReportProject', value).then(res => {
  1204. that.config6.data = []
  1205. that.originalConfig6 = res.data
  1206. res.data.forEach((item, index) => {
  1207. that.config6.data[index] = []
  1208. that.config6.data[index][0] = item.projectname
  1209. that.config6.data[index][2] = item.orgName
  1210. that.config6.data[index][5] = item.amount
  1211. })
  1212. that.config6 = { ...that.config6 }
  1213. that.projectListTipShow = true
  1214. resolve(1);
  1215. })
  1216. }
  1217. });
  1218. },
  1219. yellowMouse (index) {
  1220. if (index % 2 == 0) {
  1221. this.yellowCount = index
  1222. this.yellowPosition = (index / 2 - 1) * 315 + 40
  1223. this.yellowType = false
  1224. this.changeYellow()
  1225. }
  1226. },
  1227. // 回到中国地图
  1228. backChina () {
  1229. this.centerShow = false
  1230. this.mapChart.dispose()
  1231. setTimeout(() => {
  1232. this.initChinaChart()
  1233. });
  1234. },
  1235. // 找公司编码
  1236. findCode (code) {
  1237. let a = this.commonCompanyAll.find((item, index) => {
  1238. return item.simplename == code
  1239. })
  1240. return a ? a.number.slice(0, 4) : ''
  1241. },
  1242. // 找项目编码
  1243. findProjectCode (a, b, type) {
  1244. if (type == 'center') {
  1245. let c = this.originalConfig6.find(item => {
  1246. return item.projectname == a && item.tzzt == b
  1247. })
  1248. return c.projectno
  1249. } else if (type == 'right') {
  1250. let c = this.originalConfig6.find(item => {
  1251. return item.mdnb_project_name == a && item.mdnb_org == b
  1252. })
  1253. return c.mdnb_projectnumber
  1254. } else if (type == 'left') {
  1255. let c = this.originalConfig6.find(item => {
  1256. return item.mdnb_textfield6 == a && item.mdnb_textfield8 == b
  1257. })
  1258. return c.mdnb_textfield14
  1259. }
  1260. },
  1261. // 去项目看板
  1262. goLookBoard (e, f) {
  1263. console.log(e, '看看E')
  1264. if (f) {
  1265. this.boardType = f
  1266. this.boardUrl = `http://172.21.3.68:8081/ierp/accessTokenLogin.do?access_token=${this.access_token}&redirect=http://172.21.3.68:8081/ierp/index.html?formId=mdnb_threetoproject&prj=${this.findProjectCode(e.row[0], e.row[1], this.boardType)}`
  1267. } else {
  1268. this.boardUrl = `http://172.21.3.68:8081/ierp/accessTokenLogin.do?access_token=${this.access_token}&redirect=http://172.21.3.68:8081/ierp/index.html?formId=mdnb_threetoproject&prj=${this.findProjectCode(e.row[0], e.row[2], this.boardType)}`
  1269. }
  1270. // this.findProjectCode(e.row[0],e.row[2])
  1271. // 当前页面打开
  1272. // window.location.href = `http://192.168.2.111:8080/ierp/accessTokenLogin.do?access_token=${this.access_token}&redirect=http://192.168.2.111:8080/ierp/index.html?formId=mdnb_threetoproject&prj=PL_ZZGY_0_2023_000036`
  1273. // 新页面打开
  1274. // window.open('http://192.168.2.111:8080/ierp/accessTokenLogin.do?access_token=${this.access_token}&redirect=http://192.168.2.111:8080/ierp/index.html?formId=mdnb_threetoproject&prj=PL_ZZGY_0_2023_000036')
  1275. this.boardTipShow = true
  1276. console.log(this.boardUrl, '跳转去的项目看板地址')
  1277. },
  1278. // 根据key分组
  1279. classify (arr, k) {
  1280. let map = {};
  1281. let myArr = [];
  1282. for (let i = 0; i < arr.length; i++) {
  1283. if (!map[arr[i][k]]) {
  1284. let a = {}
  1285. a[k] = arr[i][k]
  1286. a.data = [arr[i]]
  1287. myArr.push(a)
  1288. map[arr[i][k]] = arr[i]
  1289. } else {
  1290. for (let j = 0; j < myArr.length; j++) {
  1291. if (arr[i][k] === myArr[j][k]) {
  1292. myArr[j].data.push(arr[i]);
  1293. break
  1294. }
  1295. }
  1296. }
  1297. }
  1298. return myArr
  1299. },
  1300. // 两个柱状图的弹窗
  1301. showChartLTipDouble (e, location, mdnb_textfield11, mdnb_textfield13, mdnb_textfield16, mdnb_textfield23, type, param, typeCTwo, paramCTwo, portType, num, modelName, projectStepCode) {
  1302. modelName ? this.rightAdd.modelName = modelName : this.rightAdd.modelName = ''
  1303. projectStepCode ? this.rightAdd.projectStepCode = projectStepCode : this.rightAdd.projectStepCode = ''
  1304. num && (this.projectNum = num)
  1305. this.titleName = e
  1306. this.closeTap()
  1307. this.echartDoubleTipShow = true
  1308. if (this.versions) {
  1309. if (location == 'right') {
  1310. this.rightPenetrateOne()
  1311. }
  1312. if (location == 'left') {
  1313. this.leftPenetrateOne(mdnb_textfield11, mdnb_textfield13, mdnb_textfield16, mdnb_textfield23, 2)
  1314. }
  1315. if (location == 'center') {
  1316. this.centerPenetrateOne(type, param, 2, typeCTwo, paramCTwo, portType)
  1317. }
  1318. } else {
  1319. setTimeout(() => {
  1320. this.initChartLTip2()
  1321. this.initChartLTip3()
  1322. })
  1323. }
  1324. },
  1325. // 单个柱状图的弹窗
  1326. showChartLTipSingle (e, location, type, param, mdnb_textfield11, mdnb_textfield13, mdnb_textfield16, mdnb_textfield23, typeCTwo, paramCTwo, portType, num) {
  1327. this.projectNum = num
  1328. this.closeTap()
  1329. this.titleName = e
  1330. this.echartSingleTipShow = true
  1331. if (this.versions) {
  1332. if (location == 'center') {
  1333. this.centerPenetrateOne(type, param, 1, typeCTwo, paramCTwo, portType)
  1334. }
  1335. if (location == 'left') {
  1336. this.leftPenetrateOne(mdnb_textfield11, mdnb_textfield13, mdnb_textfield16, mdnb_textfield23, 1, type, param)
  1337. }
  1338. } else {
  1339. setTimeout(() => {
  1340. this.initChartLTip(location)
  1341. })
  1342. }
  1343. },
  1344. initChartLTip (location, mdnb_textfield11, mdnb_textfield13, mdnb_textfield16, mdnb_textfield23, typeCTwo, paramCTwo, portType) {
  1345. this.myChartTip1 = echarts.init(document.getElementById("echartSingleTip"));
  1346. let option = {
  1347. grid: {
  1348. top: 40,
  1349. right: 0,
  1350. left: 60,
  1351. bottom: 70,
  1352. },
  1353. tooltip: {
  1354. show: true,
  1355. trigger: "axis",
  1356. axisPointer: {
  1357. // 坐标轴指示器,坐标轴触发有效
  1358. type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
  1359. },
  1360. textStyle: {
  1361. color: '#FFF', // 文字的颜色
  1362. fontSize: '20', // 文字字体大小
  1363. fontFamily: 'Microsoft YaHei'
  1364. },
  1365. },
  1366. xAxis: {
  1367. data: commonCompany,
  1368. axisTick: {
  1369. show: false,
  1370. },
  1371. // x轴的字体颜色
  1372. axisLabel: {
  1373. rotate: 40,
  1374. textStyle: {
  1375. color: "white",
  1376. fontSize: '20',
  1377. fontFamily: 'Microsoft YaHei'
  1378. },
  1379. },
  1380. //y轴线的颜色以及宽度
  1381. axisLine: {
  1382. show: true,
  1383. lineStyle: {
  1384. color: "#1E5389",
  1385. width: 1,
  1386. type: "solid",
  1387. },
  1388. },
  1389. },
  1390. yAxis: {
  1391. name: '亿',
  1392. nameTextStyle: {//y轴上方单位的颜色
  1393. color: '#fff',
  1394. fontSize: '20',
  1395. fontFamily: 'Microsoft YaHei'
  1396. },
  1397. axisTick: {
  1398. lineStyle: {
  1399. color: "#18416F",
  1400. },
  1401. },
  1402. // y轴的字体颜色
  1403. axisLabel: {
  1404. textStyle: {
  1405. color: "white",
  1406. fontSize: '20'
  1407. },
  1408. },
  1409. splitLine: {
  1410. show: true,
  1411. lineStyle: {
  1412. color: '#68b4dd66',
  1413. type: 'dashed',
  1414. },
  1415. },
  1416. //y轴线的颜色以及宽度
  1417. axisLine: {
  1418. show: true,
  1419. lineStyle: {
  1420. color: "#1E5389",
  1421. width: 1,
  1422. type: "solid",
  1423. },
  1424. },
  1425. },
  1426. series: [
  1427. // {
  1428. // name: "2022年额度",
  1429. // type: "bar",
  1430. // 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],
  1431. // showBackground: false,
  1432. // backgroundStyle: {
  1433. // color: "#18416F",
  1434. // },
  1435. // barWidth: "10%",
  1436. // itemStyle: {
  1437. // barBorderRadius: [10, 10, 0, 0],
  1438. // color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  1439. // {
  1440. // offset: 0,
  1441. // color: '#082550',
  1442. // },
  1443. // {
  1444. // offset: 1,
  1445. // color: '#69c0ff',
  1446. // },
  1447. // ]),
  1448. // },
  1449. // },
  1450. {
  1451. name: "总额度",
  1452. type: "bar",
  1453. data: common3,
  1454. showBackground: false,
  1455. backgroundStyle: {
  1456. color: "#18416F",
  1457. },
  1458. barWidth: "30%",
  1459. itemStyle: {
  1460. // barBorderRadius: [10, 10, 0, 0],
  1461. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  1462. {
  1463. offset: 0,
  1464. color: '#082550',
  1465. },
  1466. {
  1467. offset: 1,
  1468. color: '#957DFF',
  1469. },
  1470. ]),
  1471. },
  1472. },
  1473. ],
  1474. legend: {
  1475. // data: ["2022年额度", "2023年额度"],
  1476. data: ["总额度"],
  1477. textStyle: {
  1478. // 图列内容样式
  1479. color: "#fff", // 字体颜色
  1480. fontSize: "20",
  1481. fontFamily: 'Microsoft YaHei'
  1482. },
  1483. right: 'center',
  1484. y: 5,
  1485. // 小图标的宽高
  1486. },
  1487. };
  1488. tools.loopShowTooltip(this.myChartTip1, option, {
  1489. nterval: 2000,
  1490. loopSeries: true,
  1491. })
  1492. let that = this
  1493. that.myChartTip1.on('click', function (param) {
  1494. if (that.versions) {
  1495. if (location == 'right') {
  1496. that.rightPenetrateTwo(that.rightPenetrateTwo.modelName, '', that.findCode(param.name))
  1497. } else if (location == 'left') {
  1498. that.leftPenetrateTwo(mdnb_textfield11, mdnb_textfield13, mdnb_textfield16, mdnb_textfield23, param.name, that.projectNum)
  1499. } else if (location == 'center') {
  1500. that.centerPenetrateTwo(typeCTwo, paramCTwo, that.findCode(param.name), portType)
  1501. }
  1502. } else {
  1503. that.projectListTipShow = true
  1504. }
  1505. })
  1506. that.myChartTip1.setOption(option);
  1507. },
  1508. initChartLTip2 (location, mdnb_textfield11, mdnb_textfield13, mdnb_textfield16, mdnb_textfield23, type, param, typeCTwo, paramCTwo, portType) {
  1509. this.myChartTip2 = echarts.init(document.getElementById("echartSingleTip2"));
  1510. let option = {
  1511. grid: {
  1512. top: 40,
  1513. right: 0,
  1514. left: 60,
  1515. bottom: '15%',
  1516. },
  1517. tooltip: {
  1518. show: true,
  1519. trigger: "axis",
  1520. axisPointer: {
  1521. // 坐标轴指示器,坐标轴触发有效
  1522. type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
  1523. },
  1524. textStyle: {
  1525. color: '#FFF', // 文字的颜色
  1526. fontSize: '20', // 文字字体大小
  1527. fontFamily: 'Microsoft YaHei'
  1528. },
  1529. },
  1530. xAxis: {
  1531. data: this.changeLine ? commonCompany : this.lineCommonCompany,
  1532. axisTick: {
  1533. show: false,
  1534. },
  1535. // x轴的字体颜色
  1536. axisLabel: {
  1537. rotate: 40,
  1538. textStyle: {
  1539. color: "white",
  1540. fontSize: '20',
  1541. fontFamily: 'Microsoft YaHei'
  1542. },
  1543. },
  1544. //y轴线的颜色以及宽度
  1545. axisLine: {
  1546. show: true,
  1547. lineStyle: {
  1548. color: "#1E5389",
  1549. width: 1,
  1550. type: "solid",
  1551. },
  1552. },
  1553. },
  1554. yAxis: {
  1555. name: '个',
  1556. nameTextStyle: {//y轴上方单位的颜色
  1557. color: '#fff',
  1558. fontSize: '20',
  1559. fontFamily: 'Microsoft YaHei'
  1560. },
  1561. axisTick: {
  1562. lineStyle: {
  1563. color: "#18416F",
  1564. },
  1565. },
  1566. // y轴的字体颜色
  1567. axisLabel: {
  1568. textStyle: {
  1569. color: "#fff",
  1570. fontSize: '20',
  1571. fontFamily: 'Microsoft YaHei'
  1572. },
  1573. },
  1574. splitLine: {
  1575. show: true,
  1576. lineStyle: {
  1577. color: '#68b4dd66',
  1578. type: 'dashed',
  1579. },
  1580. },
  1581. //y轴线的颜色以及宽度
  1582. axisLine: {
  1583. show: true,
  1584. lineStyle: {
  1585. color: "#1E5389",
  1586. width: 1,
  1587. type: "solid",
  1588. },
  1589. },
  1590. },
  1591. series: [
  1592. {
  1593. name: "总数量",
  1594. type: this.changeLine ? "bar" : 'line',
  1595. data: common4,
  1596. showBackground: false,
  1597. backgroundStyle: {
  1598. color: "#18416F",
  1599. },
  1600. barWidth: "30%",
  1601. itemStyle: {
  1602. // barBorderRadius: [10, 10, 0, 0],
  1603. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  1604. {
  1605. offset: 0,
  1606. color: '#082550',
  1607. },
  1608. {
  1609. offset: 1,
  1610. color: '#957DFF',
  1611. },
  1612. ]),
  1613. },
  1614. },
  1615. ],
  1616. legend: {
  1617. // data: ["2022年额度", "2023年额度"],
  1618. data: ["总数量"],
  1619. textStyle: {
  1620. // 图列内容样式
  1621. color: "#fff", // 字体颜色
  1622. fontSize: "20",
  1623. fontFamily: 'Microsoft YaHei'
  1624. },
  1625. right: 'center',
  1626. y: 0,
  1627. // 小图标的宽高
  1628. },
  1629. };
  1630. tools.loopShowTooltip(this.myChartTip2, option, {
  1631. nterval: 2000,
  1632. loopSeries: true,
  1633. })
  1634. let that = this
  1635. that.myChartTip2.on('click', function (param) {
  1636. if (that.versions) {
  1637. if (location == 'right') {
  1638. that.rightPenetrateTwo(that.rightPenetrateTwo.modelName, '', that.findCode(param.name))
  1639. } else if (location == 'left') {
  1640. that.leftPenetrateTwo(mdnb_textfield11, mdnb_textfield13, mdnb_textfield16, mdnb_textfield23, param.name, that.projectNum)
  1641. } else if (location == 'center') {
  1642. that.centerPenetrateTwo(typeCTwo, paramCTwo, that.findCode(param.name), portType)
  1643. }
  1644. } else {
  1645. that.projectListTipShow = true
  1646. }
  1647. })
  1648. that.myChartTip2.setOption(option);
  1649. },
  1650. initChartLTip3 (location, mdnb_textfield11, mdnb_textfield13, mdnb_textfield16, mdnb_textfield23, type, param, typeCTwo, paramCTwo, portType) {
  1651. this.myChartTip3 = echarts.init(document.getElementById("echartSingleTip3"));
  1652. let option = {
  1653. grid: {
  1654. top: 40,
  1655. right: 0,
  1656. left: 60,
  1657. bottom: '15%',
  1658. },
  1659. tooltip: {
  1660. show: true,
  1661. trigger: "axis",
  1662. axisPointer: {
  1663. // 坐标轴指示器,坐标轴触发有效
  1664. type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
  1665. },
  1666. textStyle: {
  1667. color: '#FFF', // 文字的颜色
  1668. fontSize: '20', // 文字字体大小
  1669. fontFamily: 'Microsoft YaHei'
  1670. },
  1671. },
  1672. xAxis: {
  1673. data: commonCompany,
  1674. axisTick: {
  1675. show: false,
  1676. },
  1677. // x轴的字体颜色
  1678. axisLabel: {
  1679. rotate: 40,
  1680. textStyle: {
  1681. color: "#fff",
  1682. fontSize: '20',
  1683. fontFamily: 'Microsoft YaHei'
  1684. },
  1685. },
  1686. //y轴线的颜色以及宽度
  1687. axisLine: {
  1688. show: true,
  1689. lineStyle: {
  1690. color: "#1E5389",
  1691. width: 1,
  1692. type: "solid",
  1693. },
  1694. },
  1695. },
  1696. yAxis: {
  1697. name: '亿',
  1698. nameTextStyle: {//y轴上方单位的颜色
  1699. color: '#fff',
  1700. fontSize: '20',
  1701. fontFamily: 'Microsoft YaHei'
  1702. },
  1703. axisTick: {
  1704. lineStyle: {
  1705. color: "#18416F",
  1706. },
  1707. },
  1708. // y轴的字体颜色
  1709. axisLabel: {
  1710. textStyle: {
  1711. color: "#fff",
  1712. fontSize: '20',
  1713. fontFamily: 'Microsoft YaHei'
  1714. },
  1715. },
  1716. splitLine: {
  1717. show: true,
  1718. lineStyle: {
  1719. color: '#68b4dd66',
  1720. type: 'dashed',
  1721. },
  1722. },
  1723. //y轴线的颜色以及宽度
  1724. axisLine: {
  1725. show: true,
  1726. lineStyle: {
  1727. color: "#1E5389",
  1728. width: 1,
  1729. type: "solid",
  1730. },
  1731. },
  1732. },
  1733. series: [,
  1734. {
  1735. name: "总额度",
  1736. type: "bar",
  1737. data: common5,
  1738. showBackground: false,
  1739. backgroundStyle: {
  1740. color: "#18416F",
  1741. },
  1742. barWidth: "30%",
  1743. itemStyle: {
  1744. // barBorderRadius: [10, 10, 0, 0],
  1745. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  1746. {
  1747. offset: 0,
  1748. color: '#082550',
  1749. },
  1750. {
  1751. offset: 1,
  1752. color: '#69c0ff',
  1753. },
  1754. ]),
  1755. },
  1756. },
  1757. ],
  1758. legend: {
  1759. data: ["总额度"],
  1760. textStyle: {
  1761. // 图列内容样式
  1762. color: "#fff", // 字体颜色
  1763. fontSize: "20",
  1764. fontFamily: 'Microsoft YaHei'
  1765. },
  1766. right: 'center',
  1767. y: 5,
  1768. },
  1769. };
  1770. tools.loopShowTooltip(this.myChartTip3, option, {
  1771. nterval: 2000,
  1772. loopSeries: true,
  1773. })
  1774. let that = this
  1775. that.myChartTip3.on('click', function (param) {
  1776. if (that.versions) {
  1777. if (location == 'right') {
  1778. that.rightPenetrateTwo(that.rightPenetrateTwo.modelName, '', that.findCode(param.name))
  1779. } else if (location == 'left') {
  1780. that.leftPenetrateTwo(mdnb_textfield11, mdnb_textfield13, mdnb_textfield16, mdnb_textfield23, param.name, that.projectNum)
  1781. } else if (location == 'center') {
  1782. that.centerPenetrateTwo(typeCTwo, paramCTwo, that.findCode(param.name), portType)
  1783. }
  1784. } else {
  1785. that.projectListTipShow = true
  1786. }
  1787. })
  1788. that.myChartTip3.setOption(option);
  1789. },
  1790. closeTap () {
  1791. this.changeLine = true
  1792. this.echartEnterpriseShow = false
  1793. this.mapTipShow = false
  1794. this.echartSingleTipShow = false
  1795. this.echartDoubleTipShow = false
  1796. this.projectListTipShow = false
  1797. this.myChartTip1 ? this.myChartTip1.dispose() : ''
  1798. this.myChartTip2 ? this.myChartTip2.dispose() : ''
  1799. this.myChartTip3 ? this.myChartTip3.dispose() : ''
  1800. },
  1801. //点击弹窗左半部分
  1802. popLeftClick () {
  1803. if (this.titleUrl == '2.png') {
  1804. this.titleUrl = '3.png'
  1805. } else if (this.titleUrl == '7.png') {
  1806. this.titleUrl = '8.png'
  1807. } else if (this.titleUrl == '3.png') {
  1808. this.titleUrl = '2.png'
  1809. } else if (this.titleUrl == '8.png') {
  1810. this.titleUrl = '7.png'
  1811. } else if (this.titleUrl == '5.png') {
  1812. this.titleUrl = '2.png'
  1813. } else if (this.titleUrl == '10.png') {
  1814. this.titleUrl = '7.png'
  1815. }
  1816. },
  1817. //点击弹窗右半部分
  1818. poprightClick () {
  1819. if (this.titleUrl == '2.png') {
  1820. this.titleUrl = '5.png'
  1821. } else if (this.titleUrl == '7.png') {
  1822. this.titleUrl = '10.png'
  1823. } else if (this.titleUrl == '5.png') {
  1824. this.titleUrl = '2.png'
  1825. } else if (this.titleUrl == '10.png') {
  1826. this.titleUrl = '7.png'
  1827. } else if (this.titleUrl == '3.png') {
  1828. this.titleUrl = '2.png'
  1829. } else if (this.titleUrl == '8.png') {
  1830. this.titleUrl = '7.png'
  1831. }
  1832. },
  1833. // 标题弹窗
  1834. showTitlePop (e, name) {
  1835. this.closeTap()
  1836. this.titleUrl = e
  1837. this.titleName = name
  1838. this.$nextTick(() => {
  1839. this.mapTipShow = true
  1840. })
  1841. },
  1842. changeYellow () {
  1843. this.titleList.forEach((item, index) => {
  1844. this.$set(this.titleList[index], 'type', 1)
  1845. })
  1846. this.$set(this.titleList[this.yellowCount], 'type', 2)
  1847. if (this.yellowCount == 14) {
  1848. this.yellowCount = 0
  1849. this.yellowPosition += 315
  1850. } else {
  1851. if (this.yellowCount != 0) {
  1852. this.yellowPosition += 315
  1853. } else {
  1854. this.yellowPosition = 40
  1855. }
  1856. this.yellowCount += 2
  1857. }
  1858. },
  1859. numFormat (value) {
  1860. if (!value) return '0'
  1861. // var intPart = Number(value).toFixed(0) // 获取整数部分
  1862. var intPart = parseInt(value)// 获取整数部分
  1863. var intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') // 将整数部分逢三一断
  1864. var floatPart = '.00' // 预定义小数部分
  1865. var value2Array = value.toString().split('.')
  1866. // =2表示数据有小数位
  1867. if (value2Array.length === 2) {
  1868. floatPart = value2Array[1].toString() // 拿到小数部分
  1869. if (floatPart.length === 1) {
  1870. // 补0
  1871. return intPartFormat + '.' + floatPart + '0'
  1872. } else {
  1873. return intPartFormat + '.' + floatPart
  1874. }
  1875. } else {
  1876. return intPartFormat
  1877. }
  1878. },
  1879. changeTopColor () {
  1880. this.list = document.getElementsByClassName('row-item')
  1881. for (var i = 0; i < this.list.length; i++) {
  1882. if (i == 1) {
  1883. this.list[i].classList.add('light')
  1884. } else {
  1885. this.list[i].classList.remove('light')
  1886. }
  1887. }
  1888. this.initChartL9()
  1889. },
  1890. scrollChange (index) {
  1891. if (index == 18) {
  1892. this.count = -1
  1893. } else {
  1894. this.count = index
  1895. }
  1896. if (this.count > 12 && this.count != 18) {
  1897. this.countType = 1
  1898. } else {
  1899. this.countType = 0
  1900. }
  1901. for (var i = 0; i < this.list.length; i++) {
  1902. if (i == 2) {
  1903. this.list[i].classList.add('light')
  1904. } else {
  1905. this.list[i].classList.remove('light')
  1906. }
  1907. }
  1908. this.chartCarousel.dispose()
  1909. this.initChartL9()
  1910. },
  1911. initChartBall () {
  1912. this.left11Chart = echarts.init(this.$refs['echartBall'])
  1913. option = {
  1914. series: [
  1915. {
  1916. type: "liquidFill",
  1917. radius: "80%",
  1918. data: [left2[0], left2[0] + 0.02, left2[0] - 0.02],
  1919. amplitude: '4%',
  1920. waveLength: '20%', //波浪长度
  1921. // data: [
  1922. // {}
  1923. // ],
  1924. backgroundStyle: {
  1925. color: {
  1926. type: "radial",
  1927. x: 0.5,
  1928. y: 0.5,
  1929. r: 0.5,
  1930. // 水球体颜色
  1931. colorStops: [
  1932. {
  1933. offset: 0,
  1934. color: "#010a11",
  1935. },
  1936. {
  1937. offset: 0.9,
  1938. color: "#1a2f45",
  1939. },
  1940. {
  1941. offset: 1,
  1942. color: "#2b405a",
  1943. },
  1944. ],
  1945. globalCoord: false,
  1946. },
  1947. },
  1948. outline: {
  1949. borderDistance: 0,
  1950. itemStyle: {
  1951. borderWidth: 0,
  1952. borderColor: {
  1953. type: "linear",
  1954. x: 0,
  1955. y: 0,
  1956. x2: 0,
  1957. y2: 1,
  1958. colorStops: [
  1959. ],
  1960. globalCoord: false,
  1961. },
  1962. },
  1963. },
  1964. color: [
  1965. {
  1966. x: 0,
  1967. y: 0,
  1968. x2: 0,
  1969. y2: 1,
  1970. colorStops: [{
  1971. offset: 0,
  1972. color: '#237386',
  1973. },
  1974. {
  1975. offset: 1,
  1976. color: '#0078C8',
  1977. },],
  1978. },
  1979. {
  1980. x: 0,
  1981. y: 0,
  1982. x2: 0,
  1983. y2: 1,
  1984. colorStops: [{
  1985. offset: 0,
  1986. color: '#2F97A9',
  1987. },
  1988. {
  1989. offset: 1,
  1990. color: '#0078C8',
  1991. },],
  1992. },
  1993. {
  1994. x: 0,
  1995. y: 0,
  1996. x2: 0,
  1997. y2: 1,
  1998. colorStops: [{
  1999. offset: 0,
  2000. color: '#48E0ED',
  2001. },
  2002. {
  2003. offset: 1,
  2004. color: '#0078C8',
  2005. },],
  2006. }
  2007. ],
  2008. label: {
  2009. normal: {
  2010. textStyle: {
  2011. color: "#fff", // x轴文字颜色
  2012. fontSize: '70'
  2013. },
  2014. },
  2015. },
  2016. },
  2017. ],
  2018. };
  2019. this.left11Chart.setOption(option)
  2020. },
  2021. initChartL1 () {
  2022. this.left9Chart = echarts.init(this.$refs['echartL1'])
  2023. option = {
  2024. series: [
  2025. {
  2026. type: "liquidFill",
  2027. radius: "80%",
  2028. data: [left2[0], left2[0] + 0.02, left2[0] - 0.02],
  2029. amplitude: '4%',
  2030. // period:'1500',
  2031. waveLength: '20%', //波浪长度
  2032. // data: [
  2033. // {}
  2034. // ],
  2035. backgroundStyle: {
  2036. color: {
  2037. type: "radial",
  2038. x: 0.5,
  2039. y: 0.5,
  2040. r: 0.5,
  2041. // 水球体颜色
  2042. colorStops: [
  2043. {
  2044. offset: 0,
  2045. color: "#010a11",
  2046. },
  2047. {
  2048. offset: 0.9,
  2049. // color: "#203852",
  2050. color: "#1a2f45",
  2051. },
  2052. {
  2053. offset: 1,
  2054. // color: "#354e6d",
  2055. color: "#2b405a",
  2056. // color: "#314967",
  2057. },
  2058. ],
  2059. globalCoord: false,
  2060. },
  2061. },
  2062. outline: {
  2063. borderDistance: 0,
  2064. itemStyle: {
  2065. borderWidth: 0,
  2066. borderColor: {
  2067. type: "linear",
  2068. x: 0,
  2069. y: 0,
  2070. x2: 0,
  2071. y2: 1,
  2072. colorStops: [
  2073. ],
  2074. globalCoord: false,
  2075. },
  2076. },
  2077. },
  2078. color: [
  2079. {
  2080. x: 0,
  2081. y: 0,
  2082. x2: 0,
  2083. y2: 1,
  2084. colorStops: [{
  2085. offset: 0,
  2086. color: '#237386',
  2087. },
  2088. {
  2089. offset: 1,
  2090. color: '#0078C8',
  2091. },],
  2092. },
  2093. {
  2094. x: 0,
  2095. y: 0,
  2096. x2: 0,
  2097. y2: 1,
  2098. colorStops: [{
  2099. offset: 0,
  2100. color: '#2F97A9',
  2101. },
  2102. {
  2103. offset: 1,
  2104. color: '#0078C8',
  2105. },],
  2106. },
  2107. {
  2108. x: 0,
  2109. y: 0,
  2110. x2: 0,
  2111. y2: 1,
  2112. colorStops: [{
  2113. offset: 0,
  2114. color: '#48E0ED',
  2115. },
  2116. {
  2117. offset: 1,
  2118. color: '#0078C8',
  2119. },],
  2120. }
  2121. ],
  2122. label: {
  2123. normal: {
  2124. textStyle: {
  2125. color: "#fff", // x轴文字颜色
  2126. },
  2127. },
  2128. },
  2129. },
  2130. ],
  2131. };
  2132. this.left9Chart.setOption(option)
  2133. },
  2134. initChartL2 () {
  2135. var chartData = left5
  2136. var timer = null;
  2137. var i = 0;
  2138. let that = this
  2139. var option = {
  2140. colors: ['#064F78', '#BDB35D', '#623726', '#955773', '#B57C63', '#73A88E', '#09736D', '#13400B', '#0D3265'],
  2141. chart: {
  2142. type: 'pie',
  2143. backgroundColor: 'rgba(0,0,0,0)',
  2144. options3d: {
  2145. enabled: true,
  2146. alpha: 45,
  2147. //beta: 0
  2148. },
  2149. events: {
  2150. // load,图表加载完成时触发
  2151. load: function () {
  2152. var chart = this;
  2153. var points = chart.series[0].points;
  2154. var len = points.length;
  2155. timer && clearInterval(timer);
  2156. timer = setInterval(function () {
  2157. autoTooltip(points[i]);
  2158. chartData.forEach((item, index) => {
  2159. item.sliced = false
  2160. item.selected = false
  2161. if (index == i) {
  2162. // item.sliced = true
  2163. // item.selected = true
  2164. }
  2165. })
  2166. that.left1Chart.update({
  2167. series: [{
  2168. type: 'pie',
  2169. name: '占比',
  2170. point: {
  2171. events: {
  2172. click: function (e) {
  2173. that.projectNum = 2142
  2174. that.showChartLTipDouble(e.point.name, 'left', '投资计划分析', e.point.name, '', '')
  2175. }
  2176. }
  2177. },
  2178. data: chartData
  2179. }]
  2180. })
  2181. i++;
  2182. if (i === len) {
  2183. i = 0;
  2184. chartData.forEach((item, index) => {
  2185. // item.sliced = false
  2186. // item.selected = false
  2187. })
  2188. that.left1Chart.update({
  2189. series: [{
  2190. type: 'pie',
  2191. name: '占比',
  2192. point: {
  2193. events: {
  2194. click: function (e) {
  2195. that.projectNum = 2142
  2196. that.showChartLTipDouble(e.point.name, 'left', '投资计划分析', e.point.name, '', '')
  2197. }
  2198. }
  2199. },
  2200. data: chartData
  2201. }]
  2202. })
  2203. }
  2204. }, 2000);
  2205. },
  2206. legendItemClick: function (event) {
  2207. return true;
  2208. }
  2209. }
  2210. },
  2211. credits: {
  2212. enabled: false //去掉hightchats水印
  2213. },
  2214. legend: {
  2215. // labelFormatter: function() {
  2216. // return 123;
  2217. // },
  2218. align: 'right',//横向位置
  2219. verticalAlign: 'middle', // 纵向位置
  2220. layout: "vertical",//横排还是竖排
  2221. x: -110,
  2222. y: 90,
  2223. symbolWidth: 50,
  2224. itemStyle: {
  2225. fontSize: '20px',
  2226. color: '#fff',
  2227. x: 20,
  2228. fontWeight: 0,
  2229. fontFamily: 'Microsoft YaHei'
  2230. },
  2231. },
  2232. title: {
  2233. text: '主辅业计划占比',
  2234. style: {
  2235. color: '#fff',
  2236. fontSize: 24,
  2237. fontFamily: 'Microsoft YaHei',
  2238. },
  2239. align: 'center',
  2240. verticalAlign: "bottom",
  2241. x: -120
  2242. },
  2243. tooltip: {
  2244. crosshairs: false,
  2245. backgroundColor: 'rgba(0,0,0,0.5)',
  2246. // positioner: function(e){
  2247. // console.log(e, this)
  2248. // },
  2249. // useHTML: false, //开启html模式
  2250. style: {
  2251. color: '#fff',
  2252. fontSize: '20',
  2253. fontWeight: 0,
  2254. fontFamily: 'Microsoft YaHei'
  2255. },
  2256. formatter: function (e) {
  2257. let num = chartData[this.colorIndex].num
  2258. this.percentage = this.percentage.toFixed(2) //Math.round(this.percentage)
  2259. return `${this.key}:<b>${this.percentage}%</b><br/><b>${this.y}</b>亿,<b>${num}个</b>`
  2260. },
  2261. //pointFormat:
  2262. },
  2263. plotOptions: {
  2264. pie: {
  2265. allowPointSelect: true,
  2266. showInLegend: true, // 图例
  2267. cursor: 'pointer',
  2268. size: 220,
  2269. innerSize: 150, //环形图中间空白,0为饼图
  2270. depth: 25, //立体高度
  2271. slicedOffset: 21, //动画距离
  2272. dataLabels: {
  2273. enabled: false, // 是否展示指示线
  2274. format: '{point.name}: {point.percentage}'
  2275. }
  2276. },
  2277. },
  2278. series: [{
  2279. type: 'pie',
  2280. name: '占比',
  2281. center: ['50%', '50%'],
  2282. point: {
  2283. events: {
  2284. click: function (e) { //点击事件
  2285. that.projectNum = 2142
  2286. that.showChartLTipDouble(e.point.name, 'left', '投资计划分析', e.point.name, '', '')
  2287. },
  2288. mouseOver: function (e) { //鼠标移入停止轮播并且找到移入的当前数据设为选中
  2289. chartData.forEach((item, index) => {
  2290. // item.sliced = false
  2291. // item.selected = false
  2292. })
  2293. // chartData[e.target.index].sliced = true
  2294. // chartData[e.target.index].selected = true
  2295. that.left1Chart.update({
  2296. series: [{
  2297. type: 'pie',
  2298. name: '占比',
  2299. point: {
  2300. events: {
  2301. click: function (e) {
  2302. that.projectNum = 2142
  2303. that.showChartLTipDouble(e.point.name, 'left', '投资计划分析', e.point.name, '', '')
  2304. }
  2305. }
  2306. },
  2307. data: chartData
  2308. }]
  2309. })
  2310. timer && clearInterval(timer);
  2311. },
  2312. mouseOut: function () { // 鼠标移出后需要继续执行轮播
  2313. var points = that.left1Chart.series[0].points;
  2314. var len = points.length;
  2315. timer && clearInterval(timer);
  2316. timer = setInterval(function () {
  2317. autoTooltip(points[i]);
  2318. chartData.forEach((item, index) => {
  2319. // item.sliced = false
  2320. // item.selected = false
  2321. if (index == i) {
  2322. // item.sliced = true
  2323. // item.selected = true
  2324. }
  2325. })
  2326. that.left1Chart.update({
  2327. series: [{
  2328. type: 'pie',
  2329. name: '占比',
  2330. point: {
  2331. events: {
  2332. click: function (e) {
  2333. that.projectNum = 2142
  2334. that.showChartLTipDouble(e.point.name, 'left', '投资计划分析', e.point.name, '', '')
  2335. }
  2336. }
  2337. },
  2338. data: chartData
  2339. }]
  2340. })
  2341. i++;
  2342. if (i === len) {
  2343. i = 0;
  2344. chartData.forEach((item, index) => {
  2345. item.sliced = false
  2346. item.selected = false
  2347. })
  2348. that.left1Chart.update({
  2349. series: [{
  2350. type: 'pie',
  2351. name: '占比',
  2352. point: {
  2353. events: {
  2354. click: function (e) {
  2355. that.projectNum = 2142
  2356. that.showChartLTipDouble(e.point.name, 'left', '投资计划分析', e.point.name, '', '')
  2357. }
  2358. }
  2359. },
  2360. data: chartData
  2361. }]
  2362. })
  2363. }
  2364. }, 2000);
  2365. }
  2366. }
  2367. },
  2368. data: chartData
  2369. }]
  2370. }
  2371. that.left1Chart = Highcharts.chart('echartL2', option);
  2372. function autoTooltip (point) {
  2373. that.left1Chart.tooltip.refresh(point);
  2374. }
  2375. },
  2376. initChartL3 () {
  2377. var chartData = left6
  2378. var timer = null;
  2379. var i = 0;
  2380. let that = this
  2381. that.left2Chart = Highcharts.chart('echartL3', {
  2382. colors: ['#064F78', '#BDB35D', '#623726', '#955773', '#B57C63', '#73A88E', '#09736D', '#13400B', '#0D3265'],
  2383. chart: {
  2384. type: 'pie',
  2385. backgroundColor: 'rgba(0,0,0,0)',
  2386. options3d: {
  2387. enabled: true,
  2388. alpha: 45,
  2389. //beta: 0
  2390. },
  2391. events: {
  2392. // load,图表加载完成时触发
  2393. load: function () {
  2394. var chart = this;
  2395. var points = chart.series[0].points;
  2396. var len = points.length;
  2397. timer && clearInterval(timer);
  2398. timer = setInterval(function () {
  2399. autoTooltip(points[i]);
  2400. chartData.forEach((item, index) => {
  2401. item.sliced = false
  2402. item.selected = false
  2403. if (index == i) {
  2404. // item.sliced = true
  2405. // item.selected = true
  2406. }
  2407. })
  2408. that.left2Chart.update({
  2409. series: [{
  2410. type: 'pie',
  2411. name: '占比',
  2412. point: {
  2413. events: {
  2414. click: function (e) {
  2415. that.projectNum = 2143
  2416. that.showChartLTipDouble(e.point.name, 'left', '投资计划分析', e.point.name, '', '')
  2417. }
  2418. }
  2419. },
  2420. data: chartData
  2421. }]
  2422. })
  2423. i++;
  2424. if (i === len) {
  2425. i = 0;
  2426. chartData.forEach((item, index) => {
  2427. // item.sliced = false
  2428. // item.selected = false
  2429. })
  2430. that.left2Chart.update({
  2431. series: [{
  2432. type: 'pie',
  2433. name: '占比',
  2434. point: {
  2435. events: {
  2436. click: function (e) {
  2437. that.projectNum = 2143
  2438. that.showChartLTipDouble(e.point.name, 'left', '投资计划分析', e.point.name, '', '')
  2439. }
  2440. }
  2441. },
  2442. data: chartData
  2443. }]
  2444. })
  2445. }
  2446. }, 2000);
  2447. },
  2448. legendItemClick: function (event) {
  2449. that.projectNum = 2143
  2450. that.showChartLTipDouble(e.point.name, 'left', '投资计划分析', e.point.name, '', '')
  2451. return true;
  2452. }
  2453. }
  2454. },
  2455. credits: {
  2456. enabled: false //去掉hightchats水印
  2457. },
  2458. legend: {
  2459. // labelFormatter: function() {
  2460. // return 123;
  2461. // },
  2462. align: 'right',//横向位置
  2463. verticalAlign: 'middle', // 纵向位置
  2464. layout: "vertical",//横排还是竖排
  2465. x: -70,
  2466. y: 90,
  2467. symbolWidth: 50,
  2468. itemStyle: {
  2469. fontSize: '20px',
  2470. color: '#fff',
  2471. x: 20,
  2472. fontWeight: 0,
  2473. fontFamily: 'Microsoft YaHei'
  2474. },
  2475. },
  2476. title: {
  2477. text: '项目管理类型',
  2478. style: {
  2479. color: '#fff',
  2480. fontSize: 24,
  2481. fontFamily: 'Microsoft YaHei'
  2482. },
  2483. align: 'center',
  2484. verticalAlign: "bottom",
  2485. x: -120
  2486. },
  2487. tooltip: {
  2488. crosshairs: true,
  2489. backgroundColor: 'rgba(0,0,0,0.5)',
  2490. // positioner: function(e){
  2491. // console.log(e, this)
  2492. // },
  2493. useHTML: false, //开启html模式
  2494. style: {
  2495. color: '#fff',
  2496. fontSize: '20',
  2497. fontFamily: 'Microsoft YaHei'
  2498. },
  2499. formatter: function (e) {
  2500. //console.log(this)
  2501. let num = chartData[this.colorIndex].num
  2502. this.percentage = this.percentage.toFixed(2) //Math.round(this.percentage)
  2503. return `${this.key}:<b>${this.percentage}%</b><br/><b>${this.y}</b>亿,<b>${num}个</b>`
  2504. },
  2505. //pointFormat:
  2506. },
  2507. plotOptions: {
  2508. pie: {
  2509. allowPointSelect: true,
  2510. showInLegend: true, // 图例
  2511. cursor: 'pointer',
  2512. size: 220,
  2513. innerSize: 150, //环形图中间空白,0为饼图
  2514. depth: 25, //立体高度
  2515. slicedOffset: 21, //动画距离
  2516. dataLabels: {
  2517. enabled: false, // 是否展示指示线
  2518. format: '{point.name}: {point.percentage}'
  2519. }
  2520. },
  2521. },
  2522. series: [{
  2523. type: 'pie',
  2524. name: '占比',
  2525. // center: ['70%', '50%'],
  2526. point: {
  2527. events: {
  2528. click: function (e) { //点击事件
  2529. that.projectNum = 2143
  2530. that.showChartLTipDouble(e.point.name, 'left', '投资计划分析', e.point.name, '', '')
  2531. },
  2532. mouseOver: function (e) { //鼠标移入停止轮播并且找到移入的当前数据设为选中
  2533. //console.log(e)
  2534. chartData.forEach((item, index) => {
  2535. item.sliced = false
  2536. item.selected = false
  2537. })
  2538. // chartData[e.target.index].sliced = true
  2539. // chartData[e.target.index].selected = true
  2540. that.left2Chart.update({
  2541. series: [{
  2542. type: 'pie',
  2543. name: '占比',
  2544. point: {
  2545. events: {
  2546. click: function (e) {
  2547. that.projectNum = 2143
  2548. that.showChartLTipDouble(e.point.name, 'left', '投资计划分析', e.point.name, '', '')
  2549. }
  2550. }
  2551. },
  2552. data: chartData
  2553. }]
  2554. })
  2555. timer && clearInterval(timer);
  2556. },
  2557. mouseOut: function () { // 鼠标移出后需要继续执行轮播
  2558. var points = that.left2Chart.series[0].points;
  2559. var len = points.length;
  2560. timer && clearInterval(timer);
  2561. timer = setInterval(function () {
  2562. autoTooltip(points[i]);
  2563. chartData.forEach((item, index) => {
  2564. item.sliced = false
  2565. item.selected = false
  2566. if (index == i) {
  2567. // item.sliced = true
  2568. // item.selected = true
  2569. }
  2570. })
  2571. that.left2Chart.update({
  2572. series: [{
  2573. type: 'pie',
  2574. name: '占比',
  2575. point: {
  2576. events: {
  2577. click: function (e) {
  2578. that.projectNum = 2143
  2579. that.showChartLTipDouble(e.point.name, 'left', '投资计划分析', e.point.name, '', '')
  2580. }
  2581. }
  2582. },
  2583. data: chartData
  2584. }]
  2585. })
  2586. i++;
  2587. if (i === len) {
  2588. i = 0;
  2589. chartData.forEach((item, index) => {
  2590. item.sliced = false
  2591. item.selected = false
  2592. })
  2593. that.left2Chart.update({
  2594. series: [{
  2595. type: 'pie',
  2596. name: '占比',
  2597. point: {
  2598. events: {
  2599. click: function (e) {
  2600. console.log(e)
  2601. }
  2602. }
  2603. },
  2604. data: chartData
  2605. }]
  2606. })
  2607. }
  2608. }, 2000);
  2609. }
  2610. }
  2611. },
  2612. data: chartData
  2613. }]
  2614. });
  2615. function autoTooltip (point) {
  2616. that.left2Chart.tooltip.refresh(point);
  2617. }
  2618. },
  2619. initChartL4 (dataList) {
  2620. this.left10Chart = echarts.init(document.getElementById("echartL4"));
  2621. let option = {
  2622. grid: {
  2623. top: 45,
  2624. right: 0,
  2625. left: 60,
  2626. bottom: 80,
  2627. },
  2628. tooltip: {
  2629. show: true,
  2630. trigger: "axis",
  2631. formatter: data => {
  2632. 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 + data[0].value}亿`
  2633. },
  2634. axisPointer: {
  2635. // 坐标轴指示器,坐标轴触发有效
  2636. type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
  2637. },
  2638. textStyle: {
  2639. color: '#FFF', // 文字的颜色
  2640. fontSize: '20', // 文字字体大小
  2641. fontFamily: 'Microsoft YaHei'
  2642. },
  2643. },
  2644. xAxis: {
  2645. data: commonCompany,
  2646. axisTick: {
  2647. show: false,
  2648. },
  2649. // x轴的字体颜色
  2650. axisLabel: {
  2651. rotate: 40,
  2652. textStyle: {
  2653. color: "white",
  2654. fontSize: '20',
  2655. fontFamily: 'Microsoft YaHei'
  2656. },
  2657. },
  2658. //y轴线的颜色以及宽度
  2659. axisLine: {
  2660. show: true,
  2661. lineStyle: {
  2662. color: "#1E5389",
  2663. width: 1,
  2664. type: "solid",
  2665. },
  2666. },
  2667. },
  2668. yAxis: {
  2669. name: '亿',
  2670. axisTick: {
  2671. lineStyle: {
  2672. color: "#18416F",
  2673. },
  2674. },
  2675. // y轴的字体颜色
  2676. axisLabel: {
  2677. textStyle: {
  2678. color: "white",
  2679. fontSize: '20',
  2680. fontFamily: 'Microsoft YaHei'
  2681. },
  2682. },
  2683. splitLine: {
  2684. show: true,
  2685. lineStyle: {
  2686. color: "#68b4dd66",
  2687. width: 1,
  2688. type: "dashed",
  2689. },
  2690. },
  2691. //y轴线的颜色以及宽度
  2692. axisLine: {
  2693. show: true,
  2694. lineStyle: {
  2695. color: "#1E5389",
  2696. width: 1,
  2697. type: "solid",
  2698. },
  2699. },
  2700. nameTextStyle: {
  2701. color: '#fff',
  2702. fontSize: 20,
  2703. fontFamily: 'Microsoft YaHei'
  2704. },
  2705. },
  2706. series: [
  2707. {
  2708. name: "已用额度",
  2709. type: "bar",
  2710. data: left3[0],
  2711. stack: 'Ad',
  2712. showBackground: false,
  2713. backgroundStyle: {
  2714. color: "#18416F",
  2715. },
  2716. barWidth: "20",
  2717. itemStyle: {
  2718. // barBorderRadius: [10, 10, 0, 0],
  2719. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  2720. {
  2721. offset: 0,
  2722. color: '#082550',
  2723. },
  2724. {
  2725. offset: 1,
  2726. color: '#3986F8',
  2727. },
  2728. ]),
  2729. },
  2730. },
  2731. {
  2732. name: "总额度",
  2733. type: "bar",
  2734. data: left3[1],
  2735. stack: 'Ad',
  2736. showBackground: false,
  2737. backgroundStyle: {
  2738. color: "#18416F",
  2739. },
  2740. barWidth: "20",
  2741. itemStyle: {
  2742. // barBorderRadius: [10, 10, 0, 0],
  2743. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  2744. {
  2745. offset: 0,
  2746. color: '#b9b7c060',
  2747. },
  2748. {
  2749. offset: 1,
  2750. color: '#b9b7c060',
  2751. },
  2752. ]),
  2753. },
  2754. },
  2755. ],
  2756. legend: {
  2757. // data: ["2022年额度", "2023年额度"],
  2758. data: ["2023年额度"],
  2759. textStyle: {
  2760. // 图列内容样式
  2761. color: "#fff", // 字体颜色
  2762. fontSize: "20",
  2763. fontFamily: 'Microsoft YaHei'
  2764. },
  2765. right: 'center',
  2766. y: 5,
  2767. // icon: "roundRect",
  2768. // 小图标的宽高
  2769. },
  2770. };
  2771. let that = this
  2772. tools.loopShowTooltip(that.left10Chart, option, {
  2773. nterval: 2000,
  2774. loopSeries: true,
  2775. })
  2776. that.left10Chart.on('click', function (param) {
  2777. that.titleName = param.name
  2778. that.echartEnterpriseShow = true
  2779. // 如果是接口版数据版
  2780. if (that.versions) {
  2781. let findData = dataList.find(item => {
  2782. return item.mdnb_textfield == param.name
  2783. })
  2784. common1[0] = findData.mdnb_amountfield18
  2785. common1[1] = findData.mdnb_amountfield20
  2786. common1[2] = findData.mdnb_amountfield19
  2787. common1[3] = findData.mdnb_amountfield26
  2788. common1[4] = findData.mdnb_amountfield27
  2789. common1[5] = findData.mdnb_amountfield25
  2790. common2[0] = findData.mdnb_decimalfield6
  2791. }
  2792. setTimeout(() => {
  2793. that.initChartBall()
  2794. });
  2795. })
  2796. that.left10Chart.setOption(option);
  2797. },
  2798. initChartL5 () {
  2799. var chartData = left7
  2800. var timer = null;
  2801. var i = 0;
  2802. let that = this
  2803. var option = {
  2804. colors: ['#064F78', '#BDB35D', '#623726', '#955773', '#B57C63', '#73A88E', '#09736D', '#13400B', '#0D3265'],
  2805. chart: {
  2806. type: 'pie',
  2807. backgroundColor: 'rgba(0,0,0,0)',
  2808. options3d: {
  2809. enabled: true,
  2810. alpha: 45,
  2811. //beta: 0
  2812. },
  2813. events: {
  2814. // load,图表加载完成时触发
  2815. load: function () {
  2816. var chart = this;
  2817. var points = chart.series[0].points;
  2818. var len = points.length;
  2819. timer && clearInterval(timer);
  2820. timer = setInterval(function () {
  2821. autoTooltip(points[i]);
  2822. chartData.forEach((item, index) => {
  2823. item.sliced = false
  2824. item.selected = false
  2825. if (index == i) {
  2826. item.sliced = true
  2827. item.selected = true
  2828. }
  2829. })
  2830. that.left3Chart.update({
  2831. series: [{
  2832. type: 'pie',
  2833. name: '占比',
  2834. point: {
  2835. events: {
  2836. click: function (e) {
  2837. that.showChartLTipDouble(e.point.name, 'left', '产业布局分析', '传统产业分析', e.point.name, '', '', '', '', '', '', 215)
  2838. // that.showChartLTipDouble(e.point.name, 'left', '产业布局分析', '优势特色产业', '体育产业', '')
  2839. }
  2840. }
  2841. },
  2842. data: chartData
  2843. }]
  2844. })
  2845. i++;
  2846. if (i === len) {
  2847. i = 0;
  2848. }
  2849. }, 2000);
  2850. },
  2851. legendItemClick: function (event) {
  2852. console.log(event);
  2853. return true;
  2854. }
  2855. }
  2856. },
  2857. credits: {
  2858. enabled: false //去掉hightchats水印
  2859. },
  2860. legend: {
  2861. // labelFormatter: function() {
  2862. // return 123;
  2863. // },
  2864. align: 'right',//横向位置
  2865. verticalAlign: 'middle', // 纵向位置
  2866. layout: "vertical",//横排还是竖排
  2867. x: -110,
  2868. y: 50,
  2869. symbolWidth: 50,
  2870. itemDistance: 50,
  2871. itemStyle: {
  2872. fontSize: '20px',
  2873. color: '#fff',
  2874. x: 20,
  2875. fontWeight: 0,
  2876. fontFamily: 'Microsoft YaHei'
  2877. },
  2878. },
  2879. title: {
  2880. text: '传统产业分析',
  2881. style: {
  2882. color: '#fff',
  2883. fontSize: 24,
  2884. fontFamily: 'Microsoft YaHei'
  2885. },
  2886. align: 'center',
  2887. verticalAlign: "bottom",
  2888. x: -120
  2889. },
  2890. tooltip: {
  2891. crosshairs: true,
  2892. backgroundColor: 'rgba(0,0,0,0.5)',
  2893. // positioner: function(e){
  2894. // console.log(e, this)
  2895. // },
  2896. useHTML: false, //开启html模式
  2897. style: {
  2898. color: '#fff',
  2899. fontSize: '20',
  2900. fontFamily: 'Microsoft YaHei'
  2901. },
  2902. formatter: function (e) {
  2903. //console.log(this)
  2904. let num = chartData[this.colorIndex].num
  2905. this.percentage = this.percentage.toFixed(2) //Math.round(this.percentage)
  2906. return `${this.key}:<b>${this.percentage}%</b><br/><b>${this.y}</b>亿,<b>${num}个</b>`
  2907. },
  2908. //pointFormat:
  2909. },
  2910. plotOptions: {
  2911. pie: {
  2912. allowPointSelect: true,
  2913. showInLegend: true, // 图例
  2914. cursor: 'pointer',
  2915. size: 220,
  2916. innerSize: 150, //环形图中间空白,0为饼图
  2917. depth: 25, //立体高度
  2918. slicedOffset: 21, //动画距离
  2919. dataLabels: {
  2920. enabled: false, // 是否展示指示线
  2921. format: '{point.name}: {point.percentage}'
  2922. }
  2923. },
  2924. },
  2925. series: [{
  2926. type: 'pie',
  2927. name: '占比',
  2928. //center: ['35%','50%'],
  2929. point: {
  2930. events: {
  2931. click: function (e) { //点击事件
  2932. that.showChartLTipDouble(e.point.name, 'left', '产业布局分析', '传统产业分析', e.point.name, '', '', '', '', '', '', 215)
  2933. // that.showChartLTipDouble(e.point.name, 'left', '产业布局分析', '优势特色产业', '体育产业', '')
  2934. },
  2935. mouseOver: function (e) { //鼠标移入停止轮播并且找到移入的当前数据设为选中
  2936. //console.log(e)
  2937. chartData.forEach((item, index) => {
  2938. item.sliced = false
  2939. item.selected = false
  2940. })
  2941. chartData[e.target.index].sliced = true
  2942. chartData[e.target.index].selected = true
  2943. that.left3Chart.update({
  2944. series: [{
  2945. type: 'pie',
  2946. name: '占比',
  2947. point: {
  2948. events: {
  2949. click: function (e) {
  2950. that.showChartLTipDouble(e.point.name, 'left', '产业布局分析', '传统产业分析', e.point.name, '', '', '', '', '', '', 215)
  2951. // that.showChartLTipDouble(e.point.name, 'left', '产业布局分析', '优势特色产业', '体育产业', '')
  2952. }
  2953. }
  2954. },
  2955. data: chartData
  2956. }]
  2957. })
  2958. timer && clearInterval(timer);
  2959. },
  2960. mouseOut: function () { // 鼠标移出后需要继续执行轮播
  2961. var points = that.left3Chart.series[0].points;
  2962. var len = points.length;
  2963. timer && clearInterval(timer);
  2964. timer = setInterval(function () {
  2965. autoTooltip(points[i]);
  2966. chartData.forEach((item, index) => {
  2967. item.sliced = false
  2968. item.selected = false
  2969. if (index == i) {
  2970. item.sliced = true
  2971. item.selected = true
  2972. }
  2973. })
  2974. that.left3Chart.update({
  2975. series: [{
  2976. type: 'pie',
  2977. name: '占比',
  2978. point: {
  2979. events: {
  2980. click: function (e) {
  2981. that.showChartLTipDouble(e.point.name, 'left', '产业布局分析', '传统产业分析', e.point.name, '', '', '', '', '', '', 215)
  2982. // that.showChartLTipDouble(e.point.name, 'left', '产业布局分析', '优势特色产业', '体育产业', '')
  2983. }
  2984. }
  2985. },
  2986. data: chartData
  2987. }]
  2988. })
  2989. i++;
  2990. if (i === len) {
  2991. i = 0;
  2992. }
  2993. }, 2000);
  2994. }
  2995. }
  2996. },
  2997. data: chartData
  2998. }]
  2999. }
  3000. that.left3Chart = Highcharts.chart('echartL5', option);
  3001. function autoTooltip (point) {
  3002. that.left3Chart.tooltip.refresh(point);
  3003. }
  3004. },
  3005. initChartL6 () {
  3006. var chartData = left8
  3007. var timer = null;
  3008. var i = 0;
  3009. let that = this
  3010. var option = {
  3011. colors: ['#064F78', '#BDB35D', '#623726', '#955773', '#B57C63', '#73A88E', '#09736D', '#13400B', '#0D3265'],
  3012. chart: {
  3013. type: 'pie',
  3014. backgroundColor: 'rgba(0,0,0,0)',
  3015. options3d: {
  3016. enabled: true,
  3017. alpha: 45,
  3018. //beta: 0
  3019. },
  3020. events: {
  3021. // load,图表加载完成时触发
  3022. load: function () {
  3023. var chart = this;
  3024. var points = chart.series[0].points;
  3025. var len = points.length;
  3026. timer && clearInterval(timer);
  3027. timer = setInterval(function () {
  3028. autoTooltip(points[i]);
  3029. chartData.forEach((item, index) => {
  3030. item.sliced = false
  3031. item.selected = false
  3032. if (index == i) {
  3033. item.sliced = true
  3034. item.selected = true
  3035. }
  3036. })
  3037. that.left4Chart.update({
  3038. series: [{
  3039. type: 'pie',
  3040. name: '占比',
  3041. point: {
  3042. events: {
  3043. click: function (e) {
  3044. that.showChartLTipDouble(e.point.name, 'left', '产业布局分析', '战略性新兴产业', e.point.name, '', '', '', '', '', '', 215)
  3045. }
  3046. }
  3047. },
  3048. data: chartData
  3049. }]
  3050. })
  3051. i++;
  3052. if (i === len) {
  3053. i = 0;
  3054. }
  3055. }, 2000);
  3056. },
  3057. legendItemClick: function (event) {
  3058. console.log(event);
  3059. return true;
  3060. }
  3061. }
  3062. },
  3063. credits: {
  3064. enabled: false //去掉hightchats水印
  3065. },
  3066. legend: {
  3067. // labelFormatter: function() {
  3068. // return 123;
  3069. // },
  3070. align: 'right',//横向位置
  3071. verticalAlign: 'middle', // 纵向位置
  3072. layout: "vertical",//横排还是竖排
  3073. x: -30,
  3074. y: 30,
  3075. symbolWidth: 50,
  3076. itemDistance: 50,
  3077. itemStyle: {
  3078. fontSize: '20px',
  3079. color: '#fff',
  3080. x: 20,
  3081. fontWeight: 0,
  3082. fontFamily: 'Microsoft YaHei'
  3083. },
  3084. },
  3085. title: {
  3086. text: '战略性新兴产业',
  3087. style: {
  3088. color: '#fff',
  3089. fontSize: 24,
  3090. fontFamily: 'Microsoft YaHei'
  3091. },
  3092. align: 'center',
  3093. verticalAlign: "bottom",
  3094. x: -120
  3095. },
  3096. tooltip: {
  3097. crosshairs: true,
  3098. backgroundColor: 'rgba(0,0,0,0.5)',
  3099. // positioner: function(e){
  3100. // console.log(e, this)
  3101. // },
  3102. useHTML: false, //开启html模式
  3103. style: {
  3104. color: '#fff',
  3105. fontSize: '20',
  3106. fontFamily: 'Microsoft YaHei'
  3107. },
  3108. formatter: function (e) {
  3109. //console.log(this)
  3110. let num = chartData[this.colorIndex].num
  3111. this.percentage = this.percentage.toFixed(2) //Math.round(this.percentage)
  3112. return `${this.key}:<b>${this.percentage}%</b><br/><b>${this.y}</b>亿,<b>${num}个</b>`
  3113. },
  3114. //pointFormat:
  3115. },
  3116. plotOptions: {
  3117. pie: {
  3118. allowPointSelect: true,
  3119. showInLegend: true, // 图例
  3120. cursor: 'pointer',
  3121. size: 220,
  3122. innerSize: 150, //环形图中间空白,0为饼图
  3123. depth: 25, //立体高度
  3124. slicedOffset: 21, //动画距离
  3125. dataLabels: {
  3126. enabled: false, // 是否展示指示线
  3127. format: '{point.name}: {point.percentage}'
  3128. }
  3129. },
  3130. },
  3131. series: [{
  3132. type: 'pie',
  3133. name: '占比',
  3134. //center: ['35%','50%'],
  3135. point: {
  3136. events: {
  3137. click: function (e) { //点击事件
  3138. that.showChartLTipDouble(e.point.name, 'left', '产业布局分析', '战略性新兴产业', e.point.name, '', '', '', '', '', '', 215)
  3139. },
  3140. mouseOver: function (e) { //鼠标移入停止轮播并且找到移入的当前数据设为选中
  3141. //console.log(e)
  3142. chartData.forEach((item, index) => {
  3143. item.sliced = false
  3144. item.selected = false
  3145. })
  3146. chartData[e.target.index].sliced = true
  3147. chartData[e.target.index].selected = true
  3148. that.left4Chart.update({
  3149. series: [{
  3150. type: 'pie',
  3151. name: '占比',
  3152. point: {
  3153. events: {
  3154. click: function (e) {
  3155. that.showChartLTipDouble(e.point.name, 'left', '产业布局分析', '战略性新兴产业', e.point.name, '', '', '', '', '', '', 215)
  3156. }
  3157. }
  3158. },
  3159. data: chartData
  3160. }]
  3161. })
  3162. timer && clearInterval(timer);
  3163. },
  3164. mouseOut: function () { // 鼠标移出后需要继续执行轮播
  3165. var points = that.left4Chart.series[0].points;
  3166. var len = points.length;
  3167. timer && clearInterval(timer);
  3168. timer = setInterval(function () {
  3169. autoTooltip(points[i]);
  3170. chartData.forEach((item, index) => {
  3171. item.sliced = false
  3172. item.selected = false
  3173. if (index == i) {
  3174. item.sliced = true
  3175. item.selected = true
  3176. }
  3177. })
  3178. that.left4Chart.update({
  3179. series: [{
  3180. type: 'pie',
  3181. name: '占比',
  3182. point: {
  3183. events: {
  3184. click: function (e) {
  3185. that.showChartLTipDouble(e.point.name, 'left', '产业布局分析', '战略性新兴产业', e.point.name, '', '', '', '', '', '', 215)
  3186. }
  3187. }
  3188. },
  3189. data: chartData
  3190. }]
  3191. })
  3192. i++;
  3193. if (i === len) {
  3194. i = 0;
  3195. }
  3196. }, 2000);
  3197. }
  3198. }
  3199. },
  3200. data: chartData
  3201. }]
  3202. }
  3203. that.left4Chart = Highcharts.chart('echartL6', option);
  3204. function autoTooltip (point) {
  3205. that.left4Chart.tooltip.refresh(point);
  3206. }
  3207. },
  3208. initChartL7 () {
  3209. var chartData = left9
  3210. var timer = null;
  3211. var i = 0;
  3212. let that = this
  3213. var option = {
  3214. colors: ['#064F78', '#BDB35D', '#623726', '#955773', '#B57C63', '#73A88E', '#09736D', '#13400B', '#0D3265'],
  3215. chart: {
  3216. type: 'pie',
  3217. backgroundColor: 'rgba(0,0,0,0)',
  3218. options3d: {
  3219. enabled: true,
  3220. alpha: 45,
  3221. //beta: 0
  3222. },
  3223. events: {
  3224. // load,图表加载完成时触发
  3225. load: function () {
  3226. var chart = this;
  3227. var points = chart.series[0].points;
  3228. var len = points.length;
  3229. timer && clearInterval(timer);
  3230. timer = setInterval(function () {
  3231. autoTooltip(points[i]);
  3232. chartData.forEach((item, index) => {
  3233. item.sliced = false
  3234. item.selected = false
  3235. if (index == i) {
  3236. item.sliced = true
  3237. item.selected = true
  3238. }
  3239. })
  3240. that.left5Chart.update({
  3241. series: [{
  3242. type: 'pie',
  3243. name: '占比',
  3244. point: {
  3245. events: {
  3246. click: function (e) {
  3247. that.showChartLTipDouble(e.point.name, 'left', '产业布局分析', '特色优势产业', e.point.name, '', '', '', '', '', '', 215)
  3248. }
  3249. }
  3250. },
  3251. data: chartData
  3252. }]
  3253. })
  3254. i++;
  3255. if (i === len) {
  3256. i = 0;
  3257. }
  3258. }, 2000);
  3259. },
  3260. legendItemClick: function (event) {
  3261. console.log(event);
  3262. return true;
  3263. }
  3264. }
  3265. },
  3266. credits: {
  3267. enabled: false //去掉hightchats水印
  3268. },
  3269. title: {
  3270. text: '特色优势产业',
  3271. style: {
  3272. color: '#fff',
  3273. fontSize: 24,
  3274. fontFamily: 'Microsoft YaHei'
  3275. },
  3276. align: 'center',
  3277. verticalAlign: "bottom",
  3278. x: -120
  3279. },
  3280. legend: {
  3281. // labelFormatter: function() {
  3282. // return 123;
  3283. // },
  3284. align: 'right',//横向位置
  3285. verticalAlign: 'middle', // 纵向位置
  3286. layout: "vertical",//横排还是竖排
  3287. x: -50,
  3288. y: 30,
  3289. symbolWidth: 50,
  3290. itemDistance: 50,
  3291. itemStyle: {
  3292. fontSize: '20px',
  3293. color: '#fff',
  3294. x: 20,
  3295. fontWeight: 0,
  3296. fontFamily: 'Microsoft YaHei'
  3297. },
  3298. },
  3299. tooltip: {
  3300. crosshairs: true,
  3301. backgroundColor: 'rgba(0,0,0,0.5)',
  3302. // positioner: function(e){
  3303. // console.log(e, this)
  3304. // },
  3305. useHTML: false, //开启html模式
  3306. style: {
  3307. color: '#fff',
  3308. fontSize: '20',
  3309. fontFamily: 'Microsoft YaHei'
  3310. },
  3311. formatter: function (e) {
  3312. //console.log(this)
  3313. let num = chartData[this.colorIndex].num
  3314. this.percentage = this.percentage.toFixed(2) //Math.round(this.percentage)
  3315. return `${this.key}:<b>${this.percentage}%</b><br/><b>${this.y}</b>亿,<b>${num}个</b>`
  3316. },
  3317. //pointFormat:
  3318. },
  3319. plotOptions: {
  3320. pie: {
  3321. allowPointSelect: true,
  3322. showInLegend: true, // 图例
  3323. cursor: 'pointer',
  3324. size: 220,
  3325. innerSize: 150, //环形图中间空白,0为饼图
  3326. depth: 25, //立体高度
  3327. slicedOffset: 21, //动画距离
  3328. dataLabels: {
  3329. enabled: false, // 是否展示指示线
  3330. format: '{point.name}: {point.percentage}'
  3331. }
  3332. },
  3333. },
  3334. series: [{
  3335. type: 'pie',
  3336. name: '占比',
  3337. //center: ['35%','50%'],
  3338. point: {
  3339. events: {
  3340. click: function (e) { //点击事件
  3341. that.showChartLTipDouble(e.point.name, 'left', '产业布局分析', '特色优势产业', e.point.name, '', '', '', '', '', '', 215)
  3342. },
  3343. mouseOver: function (e) { //鼠标移入停止轮播并且找到移入的当前数据设为选中
  3344. //console.log(e)
  3345. chartData.forEach((item, index) => {
  3346. item.sliced = false
  3347. item.selected = false
  3348. })
  3349. chartData[e.target.index].sliced = true
  3350. chartData[e.target.index].selected = true
  3351. that.left5Chart.update({
  3352. series: [{
  3353. type: 'pie',
  3354. name: '占比',
  3355. point: {
  3356. events: {
  3357. click: function (e) {
  3358. that.showChartLTipDouble(e.point.name, 'left', '产业布局分析', '特色优势产业', e.point.name, '', '', '', '', '', '', 215)
  3359. }
  3360. }
  3361. },
  3362. data: chartData
  3363. }]
  3364. })
  3365. timer && clearInterval(timer);
  3366. },
  3367. mouseOut: function () { // 鼠标移出后需要继续执行轮播
  3368. var points = that.left5Chart.series[0].points;
  3369. var len = points.length;
  3370. timer && clearInterval(timer);
  3371. timer = setInterval(function () {
  3372. autoTooltip(points[i]);
  3373. chartData.forEach((item, index) => {
  3374. item.sliced = false
  3375. item.selected = false
  3376. if (index == i) {
  3377. item.sliced = true
  3378. item.selected = true
  3379. }
  3380. })
  3381. that.left5Chart.update({
  3382. series: [{
  3383. type: 'pie',
  3384. name: '占比',
  3385. point: {
  3386. events: {
  3387. click: function (e) {
  3388. that.showChartLTipDouble(e.point.name, 'left', '产业布局分析', '特色优势产业', e.point.name, '', '', '', '', '', '', 215)
  3389. }
  3390. }
  3391. },
  3392. data: chartData
  3393. }]
  3394. })
  3395. i++;
  3396. if (i === len) {
  3397. i = 0;
  3398. }
  3399. }, 2000);
  3400. }
  3401. }
  3402. },
  3403. data: chartData
  3404. }]
  3405. }
  3406. that.left5Chart = Highcharts.chart('echartL7', option);
  3407. function autoTooltip (point) {
  3408. that.left5Chart.tooltip.refresh(point);
  3409. }
  3410. },
  3411. initChartL8 () {
  3412. var chartData = left10
  3413. var timer = null;
  3414. var i = 0;
  3415. let that = this
  3416. var option = {
  3417. colors: ['#064F78', '#BDB35D', '#623726', '#955773', '#B57C63', '#73A88E', '#09736D', '#13400B', '#0D3265'],
  3418. chart: {
  3419. type: 'pie',
  3420. backgroundColor: 'rgba(0,0,0,0)',
  3421. options3d: {
  3422. enabled: true,
  3423. alpha: 45,
  3424. //beta: 0
  3425. },
  3426. events: {
  3427. // load,图表加载完成时触发
  3428. load: function () {
  3429. var chart = this;
  3430. var points = chart.series[0].points;
  3431. var len = points.length;
  3432. timer && clearInterval(timer);
  3433. timer = setInterval(function () {
  3434. autoTooltip(points[i]);
  3435. chartData.forEach((item, index) => {
  3436. item.sliced = false
  3437. item.selected = false
  3438. if (index == i) {
  3439. item.sliced = true
  3440. item.selected = true
  3441. }
  3442. })
  3443. that.left6Chart.update({
  3444. series: [{
  3445. type: 'pie',
  3446. name: '占比',
  3447. point: {
  3448. events: {
  3449. click: function (e) {
  3450. that.showChartLTipDouble(e.point.name, 'left', '产业布局分析', '公共基础等产业', e.point.name, '', '', '', '', '', '', 215)
  3451. }
  3452. }
  3453. },
  3454. data: chartData
  3455. }]
  3456. })
  3457. i++;
  3458. if (i === len) {
  3459. i = 0;
  3460. }
  3461. }, 2000);
  3462. },
  3463. legendItemClick: function (event) {
  3464. console.log(event);
  3465. return true;
  3466. }
  3467. }
  3468. },
  3469. credits: {
  3470. enabled: false //去掉hightchats水印
  3471. },
  3472. title: {
  3473. text: '公共基础等产业',
  3474. style: {
  3475. color: '#fff',
  3476. fontSize: 24,
  3477. fontFamily: 'Microsoft YaHei'
  3478. },
  3479. align: 'center',
  3480. verticalAlign: "bottom",
  3481. x: -120
  3482. },
  3483. legend: {
  3484. // labelFormatter: function() {
  3485. // return 123;
  3486. // },
  3487. align: 'right',//横向位置
  3488. verticalAlign: 'middle', // 纵向位置
  3489. layout: "vertical",//横排还是竖排
  3490. x: -70,
  3491. y: 50,
  3492. symbolWidth: 50,
  3493. itemDistance: 50,
  3494. itemStyle: {
  3495. fontSize: '20px',
  3496. color: '#fff',
  3497. x: 20,
  3498. fontWeight: 0,
  3499. fontFamily: 'Microsoft YaHei'
  3500. },
  3501. },
  3502. tooltip: {
  3503. crosshairs: true,
  3504. backgroundColor: 'rgba(0,0,0,0.5)',
  3505. // positioner: function(e){
  3506. // console.log(e, this)
  3507. // },
  3508. useHTML: false, //开启html模式
  3509. style: {
  3510. color: '#fff',
  3511. fontSize: '20',
  3512. fontFamily: 'Microsoft YaHei'
  3513. },
  3514. formatter: function (e) {
  3515. //console.log(this)
  3516. let num = chartData[this.colorIndex].num
  3517. this.percentage = this.percentage.toFixed(2) //Math.round(this.percentage)
  3518. return `${this.key}:<b>${this.percentage}%</b><br/><b>${this.y}</b>亿,<b>${num}个</b>`
  3519. },
  3520. //pointFormat:
  3521. },
  3522. plotOptions: {
  3523. pie: {
  3524. allowPointSelect: true,
  3525. showInLegend: true, // 图例
  3526. cursor: 'pointer',
  3527. size: 220,
  3528. innerSize: 150, //环形图中间空白,0为饼图
  3529. depth: 25, //立体高度
  3530. slicedOffset: 21, //动画距离
  3531. dataLabels: {
  3532. enabled: false, // 是否展示指示线
  3533. format: '{point.name}: {point.percentage}'
  3534. }
  3535. },
  3536. },
  3537. series: [{
  3538. type: 'pie',
  3539. name: '占比',
  3540. //center: ['35%','50%'],
  3541. point: {
  3542. events: {
  3543. click: function (e) { //点击事件
  3544. that.showChartLTipDouble(e.point.name, 'left', '产业布局分析', '公共基础等产业', e.point.name, '', '', '', '', '', '', 215)
  3545. },
  3546. mouseOver: function (e) { //鼠标移入停止轮播并且找到移入的当前数据设为选中
  3547. //console.log(e)
  3548. chartData.forEach((item, index) => {
  3549. item.sliced = false
  3550. item.selected = false
  3551. })
  3552. chartData[e.target.index].sliced = true
  3553. chartData[e.target.index].selected = true
  3554. that.left6Chart.update({
  3555. series: [{
  3556. type: 'pie',
  3557. name: '占比',
  3558. point: {
  3559. events: {
  3560. click: function (e) {
  3561. that.showChartLTipDouble(e.point.name, 'left', '产业布局分析', '公共基础等产业', e.point.name, '', '', '', '', '', '', 215)
  3562. }
  3563. }
  3564. },
  3565. data: chartData
  3566. }]
  3567. })
  3568. timer && clearInterval(timer);
  3569. },
  3570. mouseOut: function () { // 鼠标移出后需要继续执行轮播
  3571. var points = that.left6Chart.series[0].points;
  3572. var len = points.length;
  3573. timer && clearInterval(timer);
  3574. timer = setInterval(function () {
  3575. autoTooltip(points[i]);
  3576. chartData.forEach((item, index) => {
  3577. item.sliced = false
  3578. item.selected = false
  3579. if (index == i) {
  3580. item.sliced = true
  3581. item.selected = true
  3582. }
  3583. })
  3584. that.left6Chart.update({
  3585. series: [{
  3586. type: 'pie',
  3587. name: '占比',
  3588. point: {
  3589. events: {
  3590. click: function (e) {
  3591. that.showChartLTipDouble(e.point.name, 'left', '产业布局分析', '公共基础等产业', e.point.name, '', '', '', '', '', '', 215)
  3592. }
  3593. }
  3594. },
  3595. data: chartData
  3596. }]
  3597. })
  3598. i++;
  3599. if (i === len) {
  3600. i = 0;
  3601. }
  3602. }, 2000);
  3603. }
  3604. }
  3605. },
  3606. data: chartData
  3607. }]
  3608. }
  3609. that.left6Chart = Highcharts.chart('echartL8', option);
  3610. function autoTooltip (point) {
  3611. that.left6Chart.tooltip.refresh(point);
  3612. }
  3613. },
  3614. initChartL9 () {
  3615. this.chartCarousel = echarts.init(document.getElementById("echartL9"));
  3616. option = {
  3617. tooltip: {
  3618. trigger: 'axis',
  3619. formatter: '指标:' + '{c0}' + '<br/>' + '发展线:' + '{c1}' + '<br/>' + '生存线:' + '{c2}', //+ '<br/>'+ '{a1}:{c1}' + '%',
  3620. axisPointer: {
  3621. type: 'shadow',
  3622. },
  3623. },
  3624. grid: {
  3625. top: '10%',
  3626. right: '5%',
  3627. left: '12%',
  3628. bottom: '15%',
  3629. },
  3630. xAxis: {
  3631. // data: ['总投资收益率', '销售利润率', '成本费用利润率', '总资产周转率', '财务内部收益率'],
  3632. data: left15[this.countType],
  3633. axisLine: {
  3634. show: true, //隐藏X轴轴线
  3635. lineStyle: {
  3636. color: '#005094',
  3637. width: 1,
  3638. },
  3639. },
  3640. axisTick: {
  3641. show: true, //隐藏X轴刻度
  3642. },
  3643. axisLabel: {
  3644. show: true,
  3645. rotate: 30,
  3646. textStyle: {
  3647. color: '#fff', //X轴文字颜色
  3648. fontSize: 20,
  3649. fontFamily: 'Microsoft YaHei'
  3650. },
  3651. },
  3652. },
  3653. yAxis: [
  3654. {
  3655. type: 'value',
  3656. splitLine: {
  3657. show: true,
  3658. lineStyle: {
  3659. color: '#68b4dd66',
  3660. type: 'dashed',
  3661. },
  3662. },
  3663. axisLine: {
  3664. show: false
  3665. },
  3666. axisLabel: {
  3667. show: true,
  3668. formatter: '{value}%',
  3669. textStyle: {
  3670. color: '#fff',
  3671. fontSize: 20,
  3672. fontFamily: 'Microsoft YaHei'
  3673. },
  3674. },
  3675. nameTextStyle: {
  3676. color: '#ebf8ac',
  3677. fontSize: 16,
  3678. fontFamily: 'Microsoft YaHei'
  3679. },
  3680. },
  3681. ],
  3682. series: [
  3683. {
  3684. name: '实际值',
  3685. type: 'bar',
  3686. barWidth: 20,
  3687. itemStyle: {
  3688. normal: {
  3689. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  3690. {
  3691. offset: 0,
  3692. color: '#69c0ff',
  3693. },
  3694. {
  3695. offset: 1,
  3696. color: '#082550',
  3697. },
  3698. ]),
  3699. },
  3700. },
  3701. // data: [70, 52, 33, 41, 52],
  3702. data: left12[this.count + 1][2]
  3703. },
  3704. {
  3705. name: '',
  3706. type: 'line',
  3707. barWidth: 15,
  3708. itemStyle: {
  3709. normal: {
  3710. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  3711. {
  3712. offset: 0,
  3713. color: '#69c0ff',
  3714. },
  3715. {
  3716. offset: 1,
  3717. color: 'green',
  3718. },
  3719. ]),
  3720. },
  3721. },
  3722. // data: [20, 30, 15, 28, 36],
  3723. data: left12[this.count + 1][1]
  3724. },
  3725. {
  3726. name: '',
  3727. type: 'line',
  3728. barWidth: 15,
  3729. itemStyle: {
  3730. normal: {
  3731. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  3732. {
  3733. offset: 0,
  3734. color: '#69c0ff',
  3735. },
  3736. {
  3737. offset: 1,
  3738. color: 'yellow',
  3739. },
  3740. ]),
  3741. },
  3742. },
  3743. // data: [15, 22, 17, 33, 14],
  3744. data: left12[this.count + 1][0]
  3745. },
  3746. ],
  3747. }
  3748. let that = this
  3749. // this.chartCarousel.on('click', function (param) {
  3750. // that.titleName = param.name
  3751. // that.echartSingleTipShow = true
  3752. // setTimeout(() => {
  3753. // that.initChartLTip()
  3754. // });
  3755. // })
  3756. this.chartCarousel.on('mouseover', (params) => {
  3757. that.$refs.indicator.handleHover(true, 1, 2, 3, 4)
  3758. })
  3759. this.chartCarousel.on('mouseout', (params) => {
  3760. that.$refs.indicator.handleHover(false, 1, 2, 3, 4)
  3761. })
  3762. this.chartCarousel.setOption(option)
  3763. // tools.loopShowTooltip(myChart, option, {
  3764. // nterval: 2000,
  3765. // loopSeries: true,
  3766. // })
  3767. },
  3768. initChartL10 () {
  3769. this.left7Chart = echarts.init(document.getElementById("echartL10"));
  3770. let option = {
  3771. title: {
  3772. text: '固定资产进度分布',
  3773. textStyle: {
  3774. color: '#69C0FF',
  3775. fontSize: 30,
  3776. fontWeight: 500,
  3777. fontFamily: 'Microsoft YaHei'
  3778. },
  3779. top: '20',
  3780. left: '20'
  3781. },
  3782. textStyle: {
  3783. color: '#fff',
  3784. },
  3785. tooltip: {
  3786. trigger: "axis",
  3787. formatter: function (params) {
  3788. 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] + '亿';
  3789. return tip
  3790. },
  3791. textStyle: {
  3792. color: '#ffffff', // 文字的颜色
  3793. fontSize: '20', // 文字字体大小
  3794. fontFamily: 'Microsoft YaHei'
  3795. },
  3796. axisPointer: {
  3797. // lineStyle: {
  3798. // type: 'dashed',
  3799. // width: 2,
  3800. // color: 'rgba(255,255,255,0.6)'
  3801. // },
  3802. animation: false
  3803. }
  3804. },
  3805. grid: {
  3806. top: '0%',
  3807. right: '5%',
  3808. left: '15%',
  3809. bottom: '-10%',
  3810. },
  3811. yAxis: {
  3812. data: ['备案', '特别监管'],
  3813. splitLine: {
  3814. show: false,
  3815. lineStyle: {
  3816. color: '#68b4dd66',
  3817. type: 'dashed',
  3818. },
  3819. },
  3820. axisLine: {
  3821. show: false
  3822. },
  3823. axisLabel: {
  3824. show: true,
  3825. formatter: '{value}',
  3826. textStyle: {
  3827. color: '#fff',
  3828. fontSize: 20,
  3829. padding: [0, -10, 0, 0],
  3830. fontFamily: 'Microsoft YaHei',
  3831. },
  3832. },
  3833. nameTextStyle: {
  3834. color: '#ebf8ac',
  3835. fontSize: 16,
  3836. fontFamily: 'Microsoft YaHei'
  3837. },
  3838. },
  3839. xAxis: {
  3840. data: ['项目储备', '项目立项', '可研论证', '投资决策'],
  3841. axisLine: {
  3842. show: true, //隐藏X轴轴线
  3843. lineStyle: {
  3844. color: '#005094',
  3845. width: 1,
  3846. },
  3847. },
  3848. axisTick: {
  3849. show: false, //隐藏X轴刻度
  3850. },
  3851. axisLabel: {
  3852. show: true,
  3853. textStyle: {
  3854. color: '#fff', //X轴文字颜色
  3855. fontSize: 20,
  3856. padding: [-320, 0, 0, 0],
  3857. fontFamily: 'Microsoft YaHei'
  3858. },
  3859. }
  3860. },
  3861. series: [
  3862. {
  3863. name: '特别监管',
  3864. type: 'scatter',
  3865. symbol: 'circle',//'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow'
  3866. symbolSize: function (data) {
  3867. return Math.sqrt(data[2]) * 5;
  3868. },
  3869. // label: {
  3870. // emphasis: {
  3871. // show: true,
  3872. // formatter: function (param) {
  3873. // return param.data[2];
  3874. // },
  3875. // position: 'top'
  3876. // }
  3877. // },
  3878. itemStyle: {
  3879. normal: {
  3880. color: '#69c0ff'
  3881. }
  3882. },
  3883. data: left13[0]
  3884. },
  3885. {
  3886. name: '备案',
  3887. type: 'scatter',
  3888. symbol: 'circle',//'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow'
  3889. symbolSize: function (data) {
  3890. return Math.sqrt(data[2]) * 5;
  3891. },
  3892. // label: {
  3893. // emphasis: {
  3894. // show: true,
  3895. // formatter: function (param) {
  3896. // return param.data[2];
  3897. // },
  3898. // position: 'top'
  3899. // }
  3900. // },
  3901. itemStyle: {
  3902. normal: {
  3903. color: '#957DFF'
  3904. }
  3905. },
  3906. data: left13[1]
  3907. },
  3908. ]
  3909. }
  3910. let that = this
  3911. that.left7Chart.on('click', function (param) {
  3912. that.showChartLTipDouble(param.name, 'left', '项目阶段分析', '固定资产', param.name, param.seriesName, '', '', '', '', '', 216)
  3913. })
  3914. that.left7Chart.setOption(option)
  3915. tools.loopShowTooltip(that.left7Chart, option, {
  3916. nterval: 2000,
  3917. loopSeries: true,
  3918. })
  3919. },
  3920. initChartL11 () {
  3921. this.left8Chart = echarts.init(document.getElementById("echartL11"));
  3922. let option = {
  3923. title: {
  3924. text: '股权类进度分布',
  3925. textStyle: {
  3926. color: '#69C0FF',
  3927. fontSize: 30,
  3928. fontWeight: 500,
  3929. fontFamily: 'Microsoft YaHei'
  3930. },
  3931. top: '20',
  3932. left: '20'
  3933. },
  3934. textStyle: {
  3935. color: '#fff',
  3936. },
  3937. tooltip: {
  3938. trigger: "axis",
  3939. formatter: function (params) {
  3940. 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] + '亿';
  3941. return tip
  3942. },
  3943. textStyle: {
  3944. color: '#FFF', // 文字的颜色
  3945. fontSize: '20', // 文字字体大小
  3946. fontFamily: 'Microsoft YaHei'
  3947. },
  3948. axisPointer: {
  3949. // lineStyle: {
  3950. // type: 'dashed',
  3951. // width: 2,
  3952. // color: 'rgba(255,255,255,0.6)'
  3953. // },
  3954. animation: true
  3955. }
  3956. },
  3957. grid: {
  3958. top: '0%',
  3959. right: '5%',
  3960. left: '15%',
  3961. bottom: '-10%',
  3962. },
  3963. yAxis: {
  3964. data: ['备案', '特别监管'],
  3965. splitLine: {
  3966. show: false,
  3967. lineStyle: {
  3968. color: '#68b4dd66',
  3969. type: 'dashed',
  3970. },
  3971. },
  3972. axisLine: {
  3973. show: false
  3974. },
  3975. axisLabel: {
  3976. show: true,
  3977. formatter: '{value}',
  3978. textStyle: {
  3979. fontSize: 20,
  3980. padding: [0, -10, 0, 0],
  3981. fontFamily: 'Microsoft YaHei'
  3982. },
  3983. },
  3984. nameTextStyle: {
  3985. color: '#ebf8ac',
  3986. fontSize: 16,
  3987. fontFamily: 'Microsoft YaHei'
  3988. },
  3989. },
  3990. xAxis: {
  3991. data: ['项目储备', '项目立项', '可研论证', '投资决策'],
  3992. axisLine: {
  3993. show: true, //隐藏X轴轴线
  3994. lineStyle: {
  3995. color: '#005094',
  3996. width: 1,
  3997. },
  3998. },
  3999. axisTick: {
  4000. show: true, //隐藏X轴刻度
  4001. },
  4002. axisLabel: {
  4003. show: true,
  4004. textStyle: {
  4005. color: '#fff', //X轴文字颜色
  4006. fontSize: 20,
  4007. padding: [-320, 0, 0, 0],
  4008. fontFamily: 'Microsoft YaHei'
  4009. },
  4010. },
  4011. },
  4012. series: [
  4013. {
  4014. name: '',
  4015. type: 'scatter',
  4016. symbol: 'circle',
  4017. symbolSize: function (data) {
  4018. return Math.sqrt(data[2]) * 5;
  4019. },
  4020. // label: {
  4021. // emphasis: {
  4022. // show: true,
  4023. // formatter: function (param) {
  4024. // return param.data[2];
  4025. // },
  4026. // position: 'top'
  4027. // }
  4028. // },
  4029. itemStyle: {
  4030. normal: {
  4031. color: '#40A9FF'
  4032. }
  4033. },
  4034. data: left14[0]
  4035. },
  4036. {
  4037. name: '',
  4038. type: 'scatter',
  4039. symbol: 'circle',
  4040. symbolSize: function (data) {
  4041. return Math.sqrt(data[2]) * 5;
  4042. },
  4043. // label: {
  4044. // emphasis: {
  4045. // show: true,
  4046. // formatter: function (param) {
  4047. // return param.data[2];
  4048. // },
  4049. // position: 'top'
  4050. // }
  4051. // },
  4052. itemStyle: {
  4053. normal: {
  4054. color: '#957DFF'
  4055. }
  4056. },
  4057. data: left14[1]
  4058. },
  4059. ]
  4060. }
  4061. let that = this
  4062. that.left8Chart.on('click', function (param) {
  4063. that.showChartLTipDouble(param.name, 'left', '项目阶段分析', '股权类进度分布', param.name, param.seriesName, '', '', '', '', '', 216)
  4064. })
  4065. that.left8Chart.setOption(option)
  4066. tools.loopShowTooltip(that.left8Chart, option, {
  4067. nterval: 2000,
  4068. loopSeries: true,
  4069. })
  4070. },
  4071. // 大屏二
  4072. initChartC1 () {
  4073. if (this.centerType) {
  4074. //3D饼图
  4075. var chartData = center2
  4076. var timer = null;
  4077. var i = 0;
  4078. let that = this
  4079. var option = {
  4080. colors: ['#064F78', '#BDB35D', '#623726', '#955773', '#B57C63', '#73A88E', '#09736D', '#13400B', '#0D3265'],
  4081. chart: {
  4082. type: 'pie',
  4083. backgroundColor: 'rgba(0,0,0,0)',
  4084. options3d: {
  4085. enabled: true,
  4086. alpha: 60,
  4087. //beta: 0
  4088. },
  4089. events: {
  4090. // load,图表加载完成时触发
  4091. load: function () {
  4092. var chart = this;
  4093. var points = chart.series[0].points;
  4094. var len = points.length;
  4095. timer && clearInterval(timer);
  4096. timer = setInterval(function () {
  4097. autoTooltip(points[i]);
  4098. chartData.forEach((item, index) => {
  4099. item.sliced = false
  4100. item.selected = false
  4101. if (index == i) {
  4102. item.sliced = true
  4103. item.selected = true
  4104. }
  4105. })
  4106. that.center1Chart.update({
  4107. series: [{
  4108. type: 'pie',
  4109. name: '占比',
  4110. point: {
  4111. events: {
  4112. click: function (e) {
  4113. that.showChartLTipDouble(e.point.name, 'center', '', '', '', '', 'distribution', e.point.options.typeno, 'industry', e.point.options.typeno, 1)
  4114. }
  4115. }
  4116. },
  4117. data: chartData
  4118. }]
  4119. })
  4120. i++;
  4121. if (i === len) {
  4122. i = 0;
  4123. }
  4124. }, 2000);
  4125. },
  4126. legendItemClick: function (event) {
  4127. console.log(event);
  4128. return true;
  4129. }
  4130. }
  4131. },
  4132. credits: {
  4133. enabled: false //去掉hightchats水印
  4134. },
  4135. legend: {
  4136. layout: 'vertical',
  4137. align: 'right',
  4138. y: -10,
  4139. verticalAlign: 'bottom',
  4140. itemStyle: {
  4141. fontSize: '20px',
  4142. color: '#fff',
  4143. fontWeight: 0,
  4144. fontFamily: 'Microsoft YaHei'
  4145. }
  4146. },
  4147. tooltip: {
  4148. crosshairs: true,
  4149. backgroundColor: 'rgba(0,0,0,0.5)',
  4150. useHTML: false, //开启html模式
  4151. style: {
  4152. color: '#fff',
  4153. fontSize: '20',
  4154. fontFamily: 'Microsoft YaHei'
  4155. },
  4156. formatter: function (e) {
  4157. let num = chartData[this.colorIndex].num
  4158. this.percentage = this.percentage.toFixed(2) //Math.round(this.percentage)
  4159. return `${this.key}:<b>${this.percentage}%</b><br/>投资完成额:<b>${this.y}</b>亿<br/>投资数量:<b>${num}个</b>`
  4160. },
  4161. //pointFormat:
  4162. },
  4163. plotOptions: {
  4164. pie: {
  4165. allowPointSelect: true,
  4166. showInLegend: true, // 图例
  4167. cursor: 'pointer',
  4168. size: 500,
  4169. // innerSize: 330, //环形图中间空白,0为饼图
  4170. innerSize: 0, //环形图中间空白,0为饼图
  4171. depth: 75, //立体高度
  4172. slicedOffset: 40, //动画距离
  4173. dataLabels: {
  4174. enabled: false, // 是否展示指示线
  4175. format: '{point.name}: {point.percentage}'
  4176. }
  4177. },
  4178. },
  4179. title: {
  4180. text: '',
  4181. style: {
  4182. color: '#fff',
  4183. fontSize: 24,
  4184. fontFamily: 'Microsoft YaHei'
  4185. },
  4186. align: 'center',
  4187. verticalAlign: "bottom",
  4188. x: -120
  4189. },
  4190. series: [{
  4191. type: 'pie',
  4192. name: '占比',
  4193. center: ['74%', '50%'],
  4194. point: {
  4195. events: {
  4196. click: function (e) { //点击事件
  4197. that.showChartLTipDouble(e.point.name, 'center', '', '', '', '', 'distribution', e.point.options.typeno, 'industry', e.point.options.typeno, 1)
  4198. },
  4199. mouseOver: function (e) { //鼠标移入停止轮播并且找到移入的当前数据设为选中
  4200. //console.log(e)
  4201. chartData.forEach((item, index) => {
  4202. item.sliced = false
  4203. item.selected = false
  4204. })
  4205. chartData[e.target.index].sliced = true
  4206. chartData[e.target.index].selected = true
  4207. that.center1Chart.update({
  4208. series: [{
  4209. type: 'pie',
  4210. name: '占比',
  4211. point: {
  4212. events: {
  4213. click: function (e) {
  4214. that.showChartLTipDouble(e.point.name, 'center', '', '', '', '', 'distribution', e.point.options.typeno, 'industry', e.point.options.typeno, 1)
  4215. }
  4216. }
  4217. },
  4218. data: chartData
  4219. }]
  4220. })
  4221. timer && clearInterval(timer);
  4222. },
  4223. mouseOut: function () { // 鼠标移出后需要继续执行轮播
  4224. var points = that.center1Chart.series[0].points;
  4225. var len = points.length;
  4226. timer && clearInterval(timer);
  4227. timer = setInterval(function () {
  4228. autoTooltip(points[i]);
  4229. chartData.forEach((item, index) => {
  4230. item.sliced = false
  4231. item.selected = false
  4232. if (index == i) {
  4233. item.sliced = true
  4234. item.selected = true
  4235. }
  4236. })
  4237. that.center1Chart.update({
  4238. series: [{
  4239. type: 'pie',
  4240. name: '占比',
  4241. point: {
  4242. events: {
  4243. click: function (e) {
  4244. that.showChartLTipDouble(e.point.name, 'center', '', '', '', '', 'distribution', e.point.options.typeno, 'industry', e.point.options.typeno, 1)
  4245. }
  4246. }
  4247. },
  4248. data: chartData
  4249. }]
  4250. })
  4251. i++;
  4252. if (i === len) {
  4253. i = 0;
  4254. }
  4255. }, 2000);
  4256. }
  4257. }
  4258. },
  4259. data: chartData
  4260. }]
  4261. }
  4262. that.center1Chart = Highcharts.chart('echartC1', option);
  4263. function autoTooltip (point) {
  4264. that.center1Chart.tooltip.refresh(point);
  4265. }
  4266. } else {
  4267. let myChart = echarts.init(this.$refs['echartC1'])
  4268. data = center2
  4269. arrName = getArrayValue(data, "name");
  4270. arrValue = getArrayValue(data, "value");
  4271. sumValue = eval(arrValue.join("+"));
  4272. objData = array2obj(data, "name");
  4273. optionData = getData(data);
  4274. function getArrayValue (array, key) {
  4275. var key = key || "value";
  4276. var res = [];
  4277. if (array) {
  4278. array.forEach(function (t) {
  4279. res.push(t[key]);
  4280. });
  4281. }
  4282. return res;
  4283. }
  4284. function array2obj (array, key) {
  4285. var resObj = {};
  4286. for (var i = 0; i < array.length; i++) {
  4287. resObj[array[i][key]] = array[i];
  4288. }
  4289. return resObj;
  4290. }
  4291. function getData (data) {
  4292. var res = {
  4293. series: [],
  4294. yAxis: [],
  4295. };
  4296. for (let i = 0; i < data.length; i++) {
  4297. // console.log([70 - i * 15 + '%', 67 - i * 15 + '%']);
  4298. res.series.push({
  4299. name: "",
  4300. type: "pie",
  4301. clockWise: false, //顺时加载
  4302. hoverAnimation: false, //鼠标移入变大
  4303. radius: [73 - i * 25 + "%", 63 - i * 25 + "%"],
  4304. center: ["35%", "50%"],
  4305. label: {
  4306. show: false,
  4307. },
  4308. itemStyle: {
  4309. label: {
  4310. show: false,
  4311. },
  4312. labelLine: {
  4313. show: false,
  4314. },
  4315. borderWidth: 5,
  4316. },
  4317. data: [
  4318. {
  4319. value: data[i].value,
  4320. name: data[i].name,
  4321. },
  4322. {
  4323. value: sumValue - data[i].value,
  4324. name: "",
  4325. itemStyle: {
  4326. color: "rgba(0,0,0,0)",
  4327. borderWidth: 0,
  4328. },
  4329. tooltip: {
  4330. show: false,
  4331. },
  4332. hoverAnimation: false,
  4333. },
  4334. ],
  4335. });
  4336. res.series.push({
  4337. name: "",
  4338. type: "pie",
  4339. silent: true,
  4340. z: 1,
  4341. clockWise: false, //顺时加载
  4342. hoverAnimation: false, //鼠标移入变大
  4343. radius: [73 - i * 25 + "%", 63 - i * 25 + "%"],
  4344. center: ["35%", "50%"],
  4345. label: {
  4346. show: false,
  4347. },
  4348. itemStyle: {
  4349. label: {
  4350. show: false,
  4351. },
  4352. labelLine: {
  4353. show: false,
  4354. },
  4355. borderWidth: 5,
  4356. },
  4357. data: [
  4358. {
  4359. value: 7.5,
  4360. itemStyle: {
  4361. color: "#4d638050",
  4362. borderWidth: 0,
  4363. },
  4364. tooltip: {
  4365. show: false,
  4366. },
  4367. hoverAnimation: false,
  4368. },
  4369. {
  4370. value: 2.5,
  4371. name: "",
  4372. itemStyle: {
  4373. color: "rgba(0,0,0,0)",
  4374. borderWidth: 0,
  4375. },
  4376. tooltip: {
  4377. show: false,
  4378. },
  4379. hoverAnimation: false,
  4380. },
  4381. ],
  4382. });
  4383. res.yAxis.push(((data[i].value / sumValue) * 100).toFixed(2) + "%");
  4384. }
  4385. return res;
  4386. }
  4387. let option = {
  4388. // graphic: {
  4389. // elements: [{
  4390. // type: 'image',//需要填充图片,配置image,如果不需要图片可以配置其他的, text, circle, sector, ring, polygon, polyline, rect, line, bezierCurve, arc, group,
  4391. // style: {
  4392. // image: './images/loop.png', //这里添加图片地址
  4393. // width: 320,
  4394. // height: 320
  4395. // },
  4396. // left: '30',//
  4397. // top: 'middle' //配置图片居中
  4398. // }]
  4399. // },
  4400. legend: {
  4401. show: true,
  4402. trigger: 'item',
  4403. icon: "circle",
  4404. top: "center",
  4405. left: "70%",
  4406. data: arrName,
  4407. width: 50,
  4408. padding: [0, 5],
  4409. itemGap: 25,
  4410. formatter: function (data) {
  4411. let a = center2.find(item => item.name == data)
  4412. console.log(a)
  4413. // return `${data}<br/><span style="display:inline-block;border-radius:50%; width:7px;height:7px;background-color:${a.color}"></span> ${a.value}亿 <br/><span style="display:inline-block;border-radius:50%; width:7px;height:7px;background-color:${a.color}"></span> ${a.num}个`
  4414. return `${data}<br/>`
  4415. },
  4416. textStyle: {
  4417. fontSize: 20,
  4418. color: '#fff',
  4419. fontFamily: 'Microsoft YaHei'
  4420. // rich: {
  4421. // title: {
  4422. // fontSize: 14,
  4423. // lineHeight: 15,
  4424. // color: "rgb(0, 178, 246)",
  4425. // },
  4426. // value: {
  4427. // fontSize: 18,
  4428. // lineHeight: 20,
  4429. // color: "#fff",
  4430. // },
  4431. // },
  4432. },
  4433. },
  4434. // tooltip: {
  4435. // show: false,
  4436. // normal: {
  4437. // show: false,
  4438. // trigger: "item",
  4439. // label: {
  4440. // margin: 10, // label 距离轴的距离
  4441. // color: '#FFF', // 文字的颜色
  4442. // fontStyle: 'normal', // 文字字体的风格('normal',无样式;'italic',斜体;'oblique',倾斜字体)
  4443. // fontWeight: 'normal', // 文字字体的粗细('normal',无样式;'bold',加粗;'bolder',加粗的基础上再加粗;'lighter',变细;数字定义粗细也可以,取值范围100至700)
  4444. // fontSize: '20', // 文字字体大小
  4445. // lineHeight: '50', // 行高
  4446. // },
  4447. // },
  4448. // // formatter: "{a}<br>{b}:{c}({d}%)666",
  4449. // textStyle: {
  4450. // color: '#FFF', // 文字的颜色
  4451. // fontStyle: 'normal', // 文字字体的风格('normal',无样式;'italic',斜体;'oblique',倾斜字体)
  4452. // fontWeight: 'normal', // 文字字体的粗细('normal',无样式;'bold',加粗;'bolder',加粗的基础上再加粗;'lighter',变细;数字定义粗细也可以,取值范围100至700)
  4453. // },
  4454. // formatter: data => {
  4455. // console.log(data)
  4456. // // 小圆点
  4457. // return `<br /><span style="display:inline-block;border-radius:50%;margin-right:10px; width:7px;height:7px;background-color:blue"></span>${data.name}:${data.percent}`
  4458. // },
  4459. // },
  4460. color: ['#064F78', '#BDB35D', '#623726', '#955773', '#B57C63', '#73A88E', '#09736D', '#13400B', '#0D3265'],
  4461. grid: {
  4462. top: "10%",
  4463. bottom: "52%",
  4464. left: "36%",
  4465. containLabel: false,
  4466. },
  4467. yAxis: [
  4468. {
  4469. type: "category",
  4470. inverse: true,
  4471. axisLine: {
  4472. show: false,
  4473. },
  4474. axisTick: {
  4475. show: false,
  4476. },
  4477. axisLabel: {
  4478. interval: 0,
  4479. inside: true,
  4480. textStyle: {
  4481. color: "#fff",
  4482. fontSize: 20,
  4483. fontFamily: 'Microsoft YaHei'
  4484. },
  4485. show: true,
  4486. formatter: data => {
  4487. return '---- ' + data
  4488. },
  4489. },
  4490. data: optionData.yAxis,
  4491. },
  4492. ],
  4493. xAxis: [
  4494. {
  4495. show: false,
  4496. },
  4497. ],
  4498. series: optionData.series,
  4499. }
  4500. myChart.setOption(option)
  4501. // tools.loopShowTooltip(myChart, option, {
  4502. // interval: 500,
  4503. // loopSeries: true,
  4504. // });
  4505. }
  4506. },
  4507. initChartC2 () {
  4508. let that = this
  4509. that.center2Chart = echarts.init(this.$refs['echartC2'])
  4510. that.center2Chart.on('showTip', (params) => {
  4511. // 如果是7或者15并且满足防抖则切换
  4512. if ((params.dataIndex == 5 || params.dataIndex == 11) && that.echartC2Fd) {
  4513. that.echartC2Fd = false
  4514. setTimeout(() => {
  4515. option.dataZoom[0].endValue = option.dataZoom[0].endValue + 6
  4516. option.dataZoom[0].startValue = option.dataZoom[0].startValue + 6
  4517. that.center2Chart.setOption(option);
  4518. // 防止勿刷新做的防抖
  4519. setTimeout(() => {
  4520. that.echartC2Fd = true
  4521. }, 2000)
  4522. }, 1900);
  4523. // 如果是17表示到了最后一个,那么重新来一遍
  4524. } else if (params.dataIndex == 17 && that.echartC2Fd) {
  4525. that.echartC2Fd = false
  4526. setTimeout(() => {
  4527. option.dataZoom[0].endValue = 0
  4528. option.dataZoom[0].startValue = 5
  4529. that.center2Chart.setOption(option);
  4530. // 防止勿刷新做的防抖
  4531. setTimeout(() => {
  4532. that.echartC2Fd = true
  4533. }, 2000)
  4534. }, 1900)
  4535. }
  4536. })
  4537. let option = {
  4538. tooltip: {
  4539. formatter: data => {
  4540. 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}亿`
  4541. },
  4542. trigger: 'axis',
  4543. axisPointer: {
  4544. // type: 'cross',',
  4545. },
  4546. textStyle: {
  4547. color: '#FFF', // 文字的颜色
  4548. fontSize: '20', // 文字字体大小
  4549. fontFamily: 'Microsoft YaHei'
  4550. },
  4551. },
  4552. dataZoom: [
  4553. {
  4554. // start: 9,//默认为@
  4555. // end: 100,//黑认认为1@0
  4556. type: "slider",
  4557. show: false,
  4558. // xAxisIndex: [0]
  4559. handlesize: 0,//滑动条的 左右2个滑动条的大小
  4560. startValue: 5,// 初始显示值
  4561. endValue: 0,// 结束显示值
  4562. height: 10,//组件高度
  4563. left: "5%",
  4564. right: "4%",//右边的距离
  4565. bottom: "25%",//底边的距离
  4566. borderColor: "#939",
  4567. fillerColor: "#269cdb",
  4568. borderRadius: 5,
  4569. backgroundColor: "#33384b",//两边未选中的滑动条区域的额色
  4570. showDataShadow: false,//是否显示数据阴影
  4571. showDetail: false,//即拖拽时候是否显示详细数值信息
  4572. truerealtime: true,//是否实时更新
  4573. filterMode: "filter"
  4574. }, {
  4575. type: 'inside',
  4576. show: true,
  4577. start: 1,
  4578. end: 100,
  4579. zoomOnMouseWheel: false, //滚轮是否触发缩放
  4580. moveOnMouseMove: false, //鼠标滚轮触发滚动
  4581. }
  4582. ],
  4583. grid: {
  4584. top: '10%',
  4585. right: '3%',
  4586. left: '7%',
  4587. bottom: '15%',
  4588. },
  4589. legend: {
  4590. top: '1',
  4591. right: 'center',
  4592. textStyle: {
  4593. color: '#fff',
  4594. fontSize: '20',
  4595. fontFamily: 'Microsoft YaHei'
  4596. },
  4597. },
  4598. xAxis: {
  4599. data: commonCompany,
  4600. // data: center3.map(item => item.name),
  4601. axisLine: {
  4602. show: true, //隐藏X轴轴线
  4603. lineStyle: {
  4604. color: '#005094',
  4605. width: 1,
  4606. },
  4607. },
  4608. axisTick: {
  4609. show: false, //隐藏X轴刻度
  4610. },
  4611. axisLabel: {
  4612. show: true,
  4613. rotate: 40,
  4614. textStyle: {
  4615. color: '#fff',//'rgba(255,255,255,0.6)', //X轴文字颜色
  4616. fontSize: '20',
  4617. fontFamily: 'Microsoft YaHei'
  4618. },
  4619. },
  4620. },
  4621. yAxis: [
  4622. {
  4623. type: 'value',
  4624. name: '亿',
  4625. splitLine: {
  4626. show: true,
  4627. lineStyle: {
  4628. color: '#68b4dd66',
  4629. type: 'dashed',
  4630. },
  4631. },
  4632. axisLine: {
  4633. show: true,
  4634. lineStyle: {
  4635. color: '#3D7495',
  4636. },
  4637. },
  4638. axisLabel: {
  4639. show: true,
  4640. textStyle: {
  4641. color: '#fff',
  4642. fontSize: '20',
  4643. fontFamily: 'Microsoft YaHei'
  4644. },
  4645. },
  4646. nameTextStyle: {
  4647. color: '#fff',
  4648. fontSize: 20,
  4649. fontFamily: 'Microsoft YaHei'
  4650. },
  4651. },
  4652. ],
  4653. series: [
  4654. {
  4655. name: '计划投资',
  4656. type: 'bar',
  4657. barWidth: 10,
  4658. itemStyle: {
  4659. normal: {
  4660. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4661. {
  4662. offset: 0,
  4663. color: '#69c0ff',
  4664. },
  4665. {
  4666. offset: 1,
  4667. color: '#082550',
  4668. },
  4669. ]),
  4670. },
  4671. },
  4672. data: center3.map(item => item.value),
  4673. },
  4674. {
  4675. name: '实际投资',
  4676. type: 'bar',
  4677. barWidth: 10,
  4678. itemStyle: {
  4679. normal: {
  4680. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4681. {
  4682. offset: 0,
  4683. color: '#957DFF',
  4684. },
  4685. {
  4686. offset: 1,
  4687. color: '#082550',
  4688. },
  4689. ]),
  4690. },
  4691. },
  4692. data: center3.map(item => item.value2),
  4693. },
  4694. ],
  4695. }
  4696. that.center2Chart.on('click', function (param) {
  4697. that.projectListTipShow = true
  4698. that.centerPenetrateTwo('', '', that.findCode(param.name), param.seriesName == '计划投资' ? 2 : 1)
  4699. })
  4700. that.center2Chart.setOption(option)
  4701. tools.loopShowTooltip(that.center2Chart, option, {
  4702. nterval: 2000,
  4703. loopSeries: true,
  4704. })
  4705. // let arr = center3.map(item => item.value2)
  4706. // this.timeOut = setInterval(function () {
  4707. // let startValue = myChart.getModel().option.dataZoom[0].startValue;
  4708. // let endValue = myChart.getModel().option.dataZoom[0].endValue;
  4709. // let start = myChart.getModel().option.xAxis[0].data[startValue];//起始X轴
  4710. // let end = myChart.getModel().option.xAxis[0].data[endValue];//结束X轴
  4711. // // 每次向后滚动一个,最后一个从头开始。
  4712. // // console.log(option.dataZoom[0].endValue);
  4713. // if (option.dataZoom[0].endValue >= 12) {
  4714. // option.dataZoom[0].endValue = 5
  4715. // option.dataZoom[0].startValue = 0
  4716. // } else {
  4717. // option.dataZoom[0].endValue = option.dataZoom[0].endValue + 6
  4718. // option.dataZoom[0].startValue = option.dataZoom[0].startValue + 6
  4719. // }
  4720. // // myChart.dispatchAction({
  4721. // // type: 'showTip',
  4722. // // seriesIndex: 0,
  4723. // // dataIndex: startValue +1,
  4724. // // });
  4725. // myChart.setOption(option);
  4726. // }, 12000);
  4727. },
  4728. convertData (data) {
  4729. var res = []
  4730. for (var i = 0; i < data.length; i++) {
  4731. var geoCoord = this.geoCoordMap[data[i].name]
  4732. if (geoCoord) {
  4733. res.push({
  4734. name: data[i].name,
  4735. value: geoCoord.concat(data[i].value),
  4736. })
  4737. }
  4738. }
  4739. return res
  4740. },
  4741. yuanChange (value) {
  4742. return Number((value / 100000000).toFixed(2))
  4743. },
  4744. // 逢三折断
  4745. numFormat (value) {
  4746. if (!value) return '0'
  4747. // var intPart = Number(value).toFixed(0) // 获取整数部分
  4748. var intPart = parseInt(value)// 获取整数部分
  4749. var intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') // 将整数部分逢三一断
  4750. var floatPart = '.00' // 预定义小数部分
  4751. var value2Array = value.toString().split('.')
  4752. // =2表示数据有小数位
  4753. if (value2Array.length === 2) {
  4754. floatPart = value2Array[1].toString() // 拿到小数部分
  4755. if (floatPart.length === 1) {
  4756. // 补0
  4757. return intPartFormat + '.' + floatPart + '0'
  4758. } else {
  4759. return intPartFormat + '.' + floatPart
  4760. }
  4761. } else {
  4762. return intPartFormat
  4763. }
  4764. },
  4765. initProvinceChart () {
  4766. var data = center5
  4767. this.geoCoordMap = []
  4768. /*获取地图数据*/
  4769. this.mapChart = echarts.init(this.$refs['echarts-map'])
  4770. echarts.registerMap('shanxi', shanxi)
  4771. var mapFeatures = echarts.getMap('shanxi').geoJson.features
  4772. mapFeatures.forEach(v => {
  4773. // 地区名称
  4774. var name = v.properties.name
  4775. // 地区经纬度
  4776. this.geoCoordMap[name] = v.properties.centroid
  4777. // 按照地图乱序
  4778. // data.push({ name: v.properties.name, value: v.properties.centroid[0], value2: v.properties.centroid[1] })
  4779. })
  4780. let option = {
  4781. tooltip: {
  4782. padding: 15,
  4783. enterable: true,
  4784. transitionDuration: 1,
  4785. formatter: (params, ticket, callback) => {
  4786. // 清空所有轮播
  4787. for (var k in this.geoCoordMap) {
  4788. this.mapChart.dispatchAction({
  4789. // type: 'geoUnSelect',
  4790. type: 'downplay',
  4791. name: k,
  4792. })
  4793. }
  4794. // 如果鼠标滑动到线线上面,则返回空
  4795. this.mapChart.dispatchAction({
  4796. // type: 'geoSelect',
  4797. type: 'highlight',
  4798. name: params.name,
  4799. })
  4800. if (params.componentSubType == 'lines') {
  4801. return
  4802. }
  4803. if (params.componentSubType == 'scatter') {
  4804. let tipHtml = `
  4805. <div class="tooltip-cont">
  4806. <p>项目数量:<span>${data[params.dataIndex].value2}个</span></p>
  4807. <p>总投资额:<span>${params.data.value[2]}亿</span></p>
  4808. </div>`
  4809. callback(ticket, tipHtml)
  4810. return tipHtml
  4811. }
  4812. if (params.componentSubType == 'map') {
  4813. let tipHtml = `
  4814. <div class="tooltip-cont">
  4815. <p>项目数量:<span>${data[params.dataIndex].value2}个</span></p>
  4816. <p>总投资额:<span>${params.data.value}亿</span></p>
  4817. </div>`
  4818. callback(ticket, tipHtml)
  4819. return tipHtml
  4820. }
  4821. },
  4822. },
  4823. visualMap: {
  4824. show: false,
  4825. min: 0,
  4826. max: 300,
  4827. right: 0,
  4828. bottom: 0,
  4829. text: ['高', '低'],
  4830. textStyle: {
  4831. color: '#f1f1f1'
  4832. },
  4833. realtime: false,
  4834. calculable: false,
  4835. inRange: {
  4836. color: ['lightskyblue', '#2754b7']
  4837. }
  4838. },
  4839. geo: {
  4840. show: true,
  4841. map: 'shanxi',
  4842. layoutCenter: ['50%', '50%'], //地图位置
  4843. layoutSize: '140%',
  4844. label: {
  4845. normal: {
  4846. position: [100, 100],
  4847. fontSize: 25,
  4848. fontFamily: 'Microsoft YaHei',
  4849. fontWeight: 600,
  4850. color: '#fff',
  4851. show: true,
  4852. },
  4853. emphasis: {
  4854. show: true,
  4855. color: '#e7e1a0',
  4856. fontSize: 30,
  4857. },
  4858. },
  4859. roam: false,
  4860. itemStyle: {
  4861. normal: {
  4862. areaColor: '#1946a8',
  4863. shadowColor: '#1946a8',
  4864. borderWidth: 2, //设置外层边框
  4865. borderColor: '#1946a8',
  4866. shadowOffsetX: 0,
  4867. shadowOffsetY: 0,
  4868. shadowBlur: 0,
  4869. },
  4870. emphasis: {
  4871. areaColor: '#013d95',
  4872. borderColor: '#e7e1a0',
  4873. borderWidth: 4, //设置外层边框
  4874. },
  4875. },
  4876. },
  4877. series: [
  4878. {
  4879. type: 'map',
  4880. map: 'shanxi',
  4881. geoIndex: 0,
  4882. aspectScale: 1.5, //长宽比
  4883. data: data,
  4884. },
  4885. ],
  4886. }
  4887. let that = this
  4888. this.mapChart.on('click', function (params) {
  4889. if (params.name == '太原市') {
  4890. that.showChartLTipDouble(params.name, 'center', '', '', '', '', 'investmentMap', '太原市', '山西省')
  4891. }
  4892. })
  4893. tools.loopShowTooltip(this.mapChart, option, {
  4894. interval: 2000,
  4895. loopSeries: false,
  4896. });
  4897. this.mapChart.setOption(option)
  4898. },
  4899. initChinaChart () {
  4900. var data = centerChina
  4901. this.geoCoordMap = []
  4902. /*获取地图数据*/
  4903. this.mapChart = echarts.init(this.$refs['chinaMap'])
  4904. echarts.registerMap('china', china)
  4905. var mapFeatures = echarts.getMap('china').geoJson.features
  4906. mapFeatures.forEach(v => {
  4907. // 地区名称
  4908. var name = v.properties.name
  4909. // 地区经纬度
  4910. this.geoCoordMap[name] = v.properties.cp
  4911. data.push({ name: v.properties.name, value: v.properties.cp[0], value2: v.properties.cp[1] })
  4912. })
  4913. let option = {
  4914. tooltip: {
  4915. padding: 15,
  4916. enterable: true,
  4917. transitionDuration: 1,
  4918. formatter: (params, ticket, callback) => {
  4919. // 清空所有轮播
  4920. this.mapChart.dispatchAction({
  4921. // type: 'geoUnSelect',
  4922. type: 'downplay',
  4923. name: '南海诸岛',
  4924. })
  4925. for (var k in this.geoCoordMap) {
  4926. this.mapChart.dispatchAction({
  4927. // type: 'geoUnSelect',
  4928. type: 'downplay',
  4929. name: k,
  4930. })
  4931. }
  4932. // 如果鼠标滑动到线线上面,则返回空
  4933. this.mapChart.dispatchAction({
  4934. // type: 'geoSelect',
  4935. type: 'highlight',
  4936. name: params.name,
  4937. })
  4938. if (params.componentSubType == 'lines') {
  4939. return
  4940. }
  4941. if (params.componentSubType == 'scatter') {
  4942. let tipHtml = `
  4943. <div class="tooltip-cont">
  4944. <p>项目数量:<span>${data[params.dataIndex].value2}个</span></p>
  4945. <p>总投资额:<span>${params.data.value[2]}亿</span></p>
  4946. </div>`
  4947. callback(ticket, tipHtml)
  4948. return tipHtml
  4949. }
  4950. if (params.componentSubType == 'map') {
  4951. let tipHtml = `
  4952. <div class="tooltip-cont">
  4953. <p>项目数量:<span>${data[params.dataIndex].value2}个</span></p>
  4954. <p>总投资额:<span>${params.data.value}亿</span></p>
  4955. </div>`
  4956. callback(ticket, tipHtml)
  4957. return tipHtml
  4958. }
  4959. },
  4960. },
  4961. visualMap: {
  4962. show: false,
  4963. min: 0,
  4964. max: 1000,
  4965. left: '100',
  4966. bottom: 100,
  4967. text: ['高', '低'],
  4968. textStyle: {
  4969. color: '#f1f1f1'
  4970. },
  4971. realtime: true, //拖拽时,是否实时更新
  4972. calculable: false,
  4973. inRange: {
  4974. color: ['lightskyblue', '#2754b7']
  4975. },
  4976. itemWidth: 50, //图形的宽度,即长条的宽度。
  4977. itemHeight: 400, //图形的高度,即长条的高度。
  4978. textStyle: {
  4979. fontSize: 30,
  4980. color: '#fff'
  4981. }
  4982. },
  4983. geo: {
  4984. show: true,
  4985. map: 'china',
  4986. layoutCenter: ['50%', '50%'], //地图位置
  4987. layoutSize: '110%',
  4988. label: {
  4989. normal: {
  4990. position: [100, 100],
  4991. fontSize: 25,
  4992. fontFamily: 'Microsoft YaHei',
  4993. fontWeight: 600,
  4994. color: '#fff',
  4995. show: true,
  4996. },
  4997. emphasis: {
  4998. show: true,
  4999. color: '#e7e1a0',
  5000. fontSize: 30,
  5001. },
  5002. },
  5003. // 滑轮缩放
  5004. roam: false,
  5005. itemStyle: {
  5006. normal: {
  5007. areaColor: '#1946a8',
  5008. shadowColor: '#1946a8',
  5009. borderWidth: 2, //设置外层边框
  5010. borderColor: '#0b245b',
  5011. shadowOffsetX: 0,
  5012. shadowOffsetY: 0,
  5013. shadowBlur: 0,
  5014. },
  5015. emphasis: {
  5016. areaColor: '#013d95',
  5017. borderColor: '#e7e1a0',
  5018. borderWidth: 4, //设置外层边框
  5019. },
  5020. },
  5021. },
  5022. series: [
  5023. {
  5024. type: 'map',
  5025. map: 'china',
  5026. geoIndex: 0,
  5027. data: data,
  5028. },
  5029. ],
  5030. }
  5031. let that = this
  5032. this.mapChart.on('click', function (params) {
  5033. if (params.name == '山西') {
  5034. // that.showChartLTipDouble(params.name, 'center', '', '', '', '', '', 'investmentMap', '山西省')
  5035. that.mapChart.dispose()
  5036. that.centerShow = true
  5037. setTimeout(() => {
  5038. that.initChartC1()
  5039. that.initChartC2()
  5040. that.initChartC3()
  5041. that.initChartC4()
  5042. if (that.versions) {
  5043. that.centerPenetrateOne('investmentMap', params.name, 3, '', '')
  5044. } else {
  5045. that.initProvinceChart()
  5046. }
  5047. that.initProjectList()
  5048. })
  5049. }
  5050. })
  5051. tools.loopShowTooltip(this.mapChart, option, {
  5052. interval: 2000,
  5053. loopSeries: false,
  5054. });
  5055. this.mapChart.setOption(option)
  5056. },
  5057. initChartC3 () {
  5058. this.center3Chart = echarts.init(this.$refs['echartC3'])
  5059. let option = {
  5060. tooltip: {
  5061. trigger: 'axis',
  5062. formatter: '{a0}:{c0}' + '亿', //+ '<br/>'+ '{a1}:{c1}' + '%',
  5063. axisPointer: {
  5064. // type: 'cross',',
  5065. },
  5066. textStyle: {
  5067. color: '#FFF', // 文字的颜色
  5068. fontSize: '20', // 文字字体大小
  5069. fontFamily: 'Microsoft YaHei'
  5070. },
  5071. },
  5072. grid: {
  5073. top: '8%',
  5074. right: '3%',
  5075. left: '7%',
  5076. bottom: '10%',
  5077. },
  5078. // legend: {
  5079. // top: '1',
  5080. // textStyle: {
  5081. // color: 'rgba(250,250,250,0.6)',
  5082. // },
  5083. // },
  5084. xAxis: {
  5085. data: center6.map(item => item.name),
  5086. axisLine: {
  5087. show: true, //隐藏X轴轴线
  5088. lineStyle: {
  5089. color: '#005094',
  5090. width: 1,
  5091. },
  5092. },
  5093. axisTick: {
  5094. show: false, //隐藏X轴刻度
  5095. },
  5096. axisLabel: {
  5097. show: true,
  5098. rotate: 20,
  5099. textStyle: {
  5100. color: '#fff',//'rgba(255,255,255,0.6)', //X轴文字颜色
  5101. fontSize: '20',
  5102. fontFamily: 'Microsoft YaHei'
  5103. },
  5104. },
  5105. },
  5106. yAxis: [
  5107. {
  5108. type: 'value',
  5109. name: '亿',
  5110. splitLine: {
  5111. show: true,
  5112. lineStyle: {
  5113. color: '#68b4dd66',
  5114. type: 'dashed',
  5115. },
  5116. },
  5117. axisLine: {
  5118. show: true,
  5119. lineStyle: {
  5120. color: '#3D7495',
  5121. },
  5122. },
  5123. axisLabel: {
  5124. show: true,
  5125. textStyle: {
  5126. color: '#fff',
  5127. fontSize: '20',
  5128. fontFamily: 'Microsoft YaHei'
  5129. },
  5130. },
  5131. nameTextStyle: {
  5132. color: '#fff',
  5133. fontSize: 20,
  5134. fontFamily: 'Microsoft YaHei'
  5135. },
  5136. },
  5137. {
  5138. type: 'value',
  5139. axisLine: {
  5140. show: false,
  5141. },
  5142. splitLine: {
  5143. show: false,
  5144. },
  5145. axisLabel: {
  5146. show: true,
  5147. formatter: '{value} %',
  5148. textStyle: {
  5149. color: 'rgba(250,250,250,0.6)',
  5150. fontFamily: 'Microsoft YaHei'
  5151. },
  5152. },
  5153. },
  5154. ],
  5155. series: [
  5156. {
  5157. type: 'bar',
  5158. name: '投资金额',
  5159. barWidth: 15,
  5160. itemStyle: {
  5161. normal: {
  5162. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  5163. {
  5164. offset: 0,
  5165. color: '#69c0ff',
  5166. },
  5167. {
  5168. offset: 1,
  5169. color: '#082550',
  5170. },
  5171. ]),
  5172. },
  5173. },
  5174. data: center6.map(item => item.value),
  5175. },
  5176. ],
  5177. }
  5178. let that = this
  5179. that.center3Chart.on('click', function (param) {
  5180. if (param.name == '煤炭和煤电') {
  5181. that.showChartLTipSingle(param.name, 'center', 'keyIndicators', 'ceiamount', '', '', '', '', 'five', '1', 2)
  5182. } else if (param.name == '煤电和新能源') {
  5183. that.showChartLTipSingle(param.name, 'center', 'keyIndicators', 'cpneiamount', '', '', '', '', 'five', '2', 2)
  5184. } else if (param.name == '煤炭和化工') {
  5185. that.showChartLTipSingle(param.name, 'center', 'keyIndicators', 'ccheiamount', '', '', '', '', 'five', '3', 2)
  5186. } else if (param.name == '煤炭和数字') {
  5187. that.showChartLTipSingle(param.name, 'center', 'keyIndicators', 'cdiamount', '', '', '', '', 'five', '4', 2)
  5188. } else if (param.name == '煤炭和降炭') {
  5189. that.showChartLTipSingle(param.name, 'center', 'keyIndicators', 'cciamount', '', '', '', '', 'five', '5', 2)
  5190. }
  5191. })
  5192. that.center3Chart.setOption(option)
  5193. tools.loopShowTooltip(that.center3Chart, option, {
  5194. nterval: 2000,
  5195. loopSeries: true,
  5196. })
  5197. },
  5198. initChartC4 () {
  5199. if (this.centerType) {
  5200. // 3D饼图
  5201. var chartData = []
  5202. var timer = null;
  5203. var timer2 = null;
  5204. var i = 0;
  5205. center7.forEach((item, index) => {
  5206. let obj = {
  5207. name: item.name,
  5208. y: item.value2,
  5209. num: item.value,
  5210. typeno: item.typeno,
  5211. sliced: false,
  5212. selected: false,
  5213. color: index == 0 ? '#064F78' : '#BDB35D'
  5214. }
  5215. chartData.push(obj)
  5216. })
  5217. let that = this
  5218. that.center4Chart = Highcharts.chart('echartC4', {
  5219. chart: {
  5220. type: 'pie',
  5221. backgroundColor: 'rgba(0,0,0,0)',
  5222. options3d: {
  5223. enabled: true,
  5224. alpha: 60,
  5225. //beta: 0
  5226. },
  5227. events: {
  5228. // load,图表加载完成时触发
  5229. load: function () {
  5230. var chart = this;
  5231. var points = chart.series[0].points;
  5232. var len = points.length;
  5233. timer && clearInterval(timer);
  5234. timer = setInterval(function () {
  5235. autoTooltip(points[i]);
  5236. chartData.forEach((item, index) => {
  5237. item.sliced = false
  5238. item.selected = false
  5239. if (index == i) {
  5240. item.sliced = true
  5241. item.selected = true
  5242. }
  5243. })
  5244. that.center4Chart.update({
  5245. series: [{
  5246. type: 'pie',
  5247. name: '占比',
  5248. point: {
  5249. events: {
  5250. click: function (e) {
  5251. that.showChartLTipDouble(e.point.name, 'center', '', '', '', '', 'keyIndicators', e.point.options.typeno, 'state', e.point.name == '新建' ? 'new' : 'renew', 1)
  5252. }
  5253. }
  5254. },
  5255. data: chartData
  5256. }]
  5257. })
  5258. i++;
  5259. if (i === len) {
  5260. i = 0;
  5261. chartData.forEach((item, index) => {
  5262. item.sliced = false
  5263. item.selected = false
  5264. })
  5265. that.center4Chart.update({
  5266. series: [{
  5267. type: 'pie',
  5268. name: '占比',
  5269. point: {
  5270. events: {
  5271. click: function (e) {
  5272. that.showChartLTipDouble(e.point.name, 'center', '', '', '', '', 'keyIndicators', e.point.options.typeno, 'state', e.point.name == '新建' ? 'new' : 'renew', 1)
  5273. }
  5274. }
  5275. },
  5276. data: chartData
  5277. }]
  5278. })
  5279. }
  5280. }, 2000);
  5281. },
  5282. legendItemClick: function (event) {
  5283. console.log(event);
  5284. return true;
  5285. }
  5286. }
  5287. },
  5288. credits: {
  5289. enabled: false //去掉hightchats水印
  5290. },
  5291. title: {
  5292. text: null
  5293. },
  5294. tooltip: {
  5295. crosshairs: true,
  5296. backgroundColor: 'rgba(0,0,0,0.5)',
  5297. // positioner: function(e){
  5298. // console.log(e, this)
  5299. // },
  5300. useHTML: false, //开启html模式
  5301. style: {
  5302. color: '#fff',
  5303. fontSize: '20',
  5304. fontFamily: 'Microsoft YaHei'
  5305. },
  5306. formatter: function (e) {
  5307. //console.log(this)
  5308. let num = chartData[this.colorIndex].num
  5309. this.percentage = Math.round(this.percentage)
  5310. return `${this.key}:<b>${this.percentage}%</b><br/>投资完成额:<b>${this.y}</b>亿<br/>投资数量:<b>${num}个</b>`
  5311. },
  5312. //pointFormat:
  5313. },
  5314. legend: {
  5315. layout: 'vertical',
  5316. align: 'right',
  5317. y: -10,
  5318. verticalAlign: 'bottom',
  5319. itemStyle: {
  5320. fontSize: '20px',
  5321. color: '#fff',
  5322. fontWeight: 0,
  5323. fontFamily: 'Microsoft YaHei'
  5324. }
  5325. },
  5326. plotOptions: {
  5327. pie: {
  5328. allowPointSelect: true,
  5329. showInLegend: true, // 图例
  5330. cursor: 'pointer',
  5331. size: 500,
  5332. // innerSize: 330, //环形图中间空白,0为饼图
  5333. innerSize: 0, //环形图中间空白,0为饼图
  5334. depth: 75, //立体高度
  5335. slicedOffset: 40, //动画距离
  5336. dataLabels: {
  5337. enabled: false, // 是否展示指示线
  5338. format: '{point.name}: {point.percentage}'
  5339. }
  5340. },
  5341. },
  5342. series: [{
  5343. type: 'pie',
  5344. name: '占比',
  5345. center: ['60%', '50%'],
  5346. y: -10,
  5347. point: {
  5348. events: {
  5349. click: function (e) { //点击事件
  5350. that.showChartLTipDouble(e.point.name, 'center', '', '', '', '', 'keyIndicators', e.point.options.typeno, 'state', e.point.name == '新建' ? 'new' : 'renew', 1)
  5351. },
  5352. mouseOver: function (e) { //鼠标移入停止轮播并且找到移入的当前数据设为选中
  5353. //console.log(e)
  5354. chartData.forEach((item, index) => {
  5355. item.sliced = false
  5356. item.selected = false
  5357. })
  5358. chartData[e.target.index].sliced = true
  5359. chartData[e.target.index].selected = true
  5360. that.center4Chart.update({
  5361. series: [{
  5362. type: 'pie',
  5363. name: '占比',
  5364. point: {
  5365. events: {
  5366. click: function (e) {
  5367. that.showChartLTipDouble(e.point.name, 'center', '', '', '', '', 'keyIndicators', e.point.options.typeno, 'state', e.point.name == '新建' ? 'new' : 'renew', 1)
  5368. }
  5369. }
  5370. },
  5371. data: chartData
  5372. }]
  5373. })
  5374. timer && clearInterval(timer);
  5375. },
  5376. mouseOut: function () { // 鼠标移出后需要继续执行轮播
  5377. var points = that.center4Chart.series[0].points;
  5378. var len = points.length;
  5379. timer && clearInterval(timer);
  5380. timer = setInterval(function () {
  5381. autoTooltip(points[i]);
  5382. chartData.forEach((item, index) => {
  5383. item.sliced = false
  5384. item.selected = false
  5385. if (index == i) {
  5386. item.sliced = true
  5387. item.selected = true
  5388. }
  5389. })
  5390. that.center4Chart.update({
  5391. series: [{
  5392. type: 'pie',
  5393. name: '占比',
  5394. point: {
  5395. events: {
  5396. click: function (e) {
  5397. that.showChartLTipDouble(e.point.name, 'center', '', '', '', '', 'keyIndicators', e.point.options.typeno, 'state', e.point.name == '新建' ? 'new' : 'renew', 1)
  5398. }
  5399. }
  5400. },
  5401. data: chartData
  5402. }]
  5403. })
  5404. i++;
  5405. if (i === len) {
  5406. i = 0;
  5407. chartData.forEach((item, index) => {
  5408. item.sliced = false
  5409. item.selected = false
  5410. })
  5411. that.center4Chart.update({
  5412. series: [{
  5413. type: 'pie',
  5414. name: '占比',
  5415. point: {
  5416. events: {
  5417. click: function (e) {
  5418. that.showChartLTipDouble(e.point.name, 'center', '', '', '', '', 'keyIndicators', e.point.options.typeno, 'state', e.point.name == '新建' ? 'new' : 'renew', 1)
  5419. }
  5420. }
  5421. },
  5422. data: chartData
  5423. }]
  5424. })
  5425. }
  5426. }, 2000);
  5427. }
  5428. }
  5429. },
  5430. data: chartData
  5431. }]
  5432. });
  5433. function autoTooltip (point) {
  5434. that.center4Chart.tooltip.refresh(point);
  5435. }
  5436. } else {
  5437. // 环形图
  5438. let myChart = echarts.init(this.$refs['echartC4'])
  5439. data = center7
  5440. arrName = getArrayValue(data, "name");
  5441. arrValue = getArrayValue(data, "value");
  5442. sumValue = eval(arrValue.join("+"));
  5443. objData = array2obj(data, "name");
  5444. optionData = getData(data);
  5445. function getArrayValue (array, key) {
  5446. var key = key || "value";
  5447. var res = [];
  5448. if (array) {
  5449. array.forEach(function (t) {
  5450. res.push(t[key]);
  5451. });
  5452. }
  5453. return res;
  5454. }
  5455. function array2obj (array, key) {
  5456. var resObj = {};
  5457. for (var i = 0; i < array.length; i++) {
  5458. resObj[array[i][key]] = array[i];
  5459. }
  5460. return resObj;
  5461. }
  5462. function getData (data) {
  5463. var res = {
  5464. series: [],
  5465. yAxis: [],
  5466. };
  5467. for (let i = 0; i < data.length; i++) {
  5468. res.series.push({
  5469. name: "",
  5470. type: "pie",
  5471. clockWise: false, //顺时加载
  5472. hoverAnimation: false, //鼠标移入变大
  5473. radius: [73 - i * 40 + "%", 58 - i * 40 + "%"],
  5474. center: ["50%", "50%"],
  5475. label: {
  5476. show: false,
  5477. },
  5478. itemStyle: {
  5479. label: {
  5480. show: false,
  5481. },
  5482. labelLine: {
  5483. show: false,
  5484. },
  5485. borderWidth: 5,
  5486. },
  5487. data: [
  5488. {
  5489. value: data[i].value,
  5490. name: data[i].name,
  5491. },
  5492. {
  5493. value: sumValue - data[i].value,
  5494. name: "",
  5495. itemStyle: {
  5496. color: "rgba(0,0,0,0)",
  5497. borderWidth: 0,
  5498. },
  5499. tooltip: {
  5500. show: false,
  5501. },
  5502. hoverAnimation: false,
  5503. },
  5504. ],
  5505. });
  5506. res.series.push({
  5507. name: "",
  5508. type: "pie",
  5509. silent: true,
  5510. z: 1,
  5511. clockWise: false, //顺时加载
  5512. hoverAnimation: false, //鼠标移入变大
  5513. radius: [73 - i * 40 + "%", 58 - i * 40 + "%"],
  5514. center: ["50%", "50%"],
  5515. label: {
  5516. show: false,
  5517. },
  5518. itemStyle: {
  5519. label: {
  5520. show: false,
  5521. },
  5522. labelLine: {
  5523. show: false,
  5524. },
  5525. borderWidth: 10,
  5526. },
  5527. data: [
  5528. {
  5529. value: 7.5,
  5530. itemStyle: {
  5531. color: "rgba(9,40,83,0.7)",
  5532. borderWidth: 0,
  5533. },
  5534. tooltip: {
  5535. show: false,
  5536. },
  5537. hoverAnimation: false,
  5538. },
  5539. {
  5540. value: 2.5,
  5541. name: "",
  5542. itemStyle: {
  5543. color: "rgba(0,0,0,0)",
  5544. borderWidth: 0,
  5545. },
  5546. tooltip: {
  5547. show: false,
  5548. },
  5549. hoverAnimation: false,
  5550. },
  5551. ],
  5552. });
  5553. res.yAxis.push(((data[i].value / sumValue) * 100).toFixed(2) + "%");
  5554. }
  5555. return res;
  5556. }
  5557. let option = {
  5558. // graphic: {
  5559. // elements: [{
  5560. // type: 'image',//需要填充图片,配置image,如果不需要图片可以配置其他的, text, circle, sector, ring, polygon, polyline, rect, line, bezierCurve, arc, group,
  5561. // style: {
  5562. // // image: './images/loop.png', //这里添加图片地址
  5563. // width: 320,
  5564. // height: 320
  5565. // },
  5566. // left: '30',//
  5567. // top: 'middle' //配置图片居中
  5568. // }]
  5569. // },
  5570. // tooltip: {
  5571. // show: true,
  5572. // trigger: "item",
  5573. // normal: {
  5574. // show: false,
  5575. // label: {
  5576. // color: '#FFF', // 文字的颜色
  5577. // fontStyle: 'normal', // 文字字体的风格('normal',无样式;'italic',斜体;'oblique',倾斜字体)
  5578. // fontWeight: 'normal', // 文字字体的粗细('normal',无样式;'bold',加粗;'bolder',加粗的基础上再加粗;'lighter',变细;数字定义粗细也可以,取值范围100至700)
  5579. // fontSize: '20', // 文字字体大小
  5580. // },
  5581. // },
  5582. // formatter: function (data) {
  5583. // console.log(data, '?????')
  5584. // // return `${data.data.name}:${data.percent}%<br/>${data.data.y}亿,${data.data.num}个`
  5585. // },
  5586. // // formatter: "{a}<br>{b}:{c}({d}%)666",
  5587. // textStyle: {
  5588. // fontSize: '20', // 文字字体大小
  5589. // color: '#FFF', // 文字的颜色
  5590. // fontStyle: 'normal', // 文字字体的风格('normal',无样式;'italic',斜体;'oblique',倾斜字体)
  5591. // fontWeight: 'normal', // 文字字体的粗细('normal',无样式;'bold',加粗;'bolder',加粗的基础上再加粗;'lighter',变细;数字定义粗细也可以,取值范围100至700)
  5592. // },
  5593. // },
  5594. tooltip: {
  5595. trigger: 'item',
  5596. textStyle: {
  5597. color: '#fff', //X轴文字颜色
  5598. fontSize: 20,
  5599. fontFamily: 'Microsoft YaHei'
  5600. },
  5601. // 设置提示的位置
  5602. position: (p) => {
  5603. // return ['15%', '25%']
  5604. return [p[0] - 70, p[1] - 70]
  5605. // console.log(params,'???????位置信息是什么鬼')
  5606. // if (params.name == '新建') {
  5607. // return ['15%', '25%']
  5608. // }
  5609. },
  5610. formatter: data => {
  5611. let a = ''
  5612. a = center7.find(item => item.name == data.name)
  5613. return `${data.name}:${data.percent}%<br/>${data.value}亿,${a.value2}个`
  5614. },
  5615. },
  5616. legend: {
  5617. show: true,
  5618. icon: "circle",
  5619. top: "bottom",
  5620. right: "5%",
  5621. data: arrName,
  5622. orient: 'vertical',
  5623. // width: 50,
  5624. // padding: [0, 5],
  5625. itemGap: 5,
  5626. textStyle: {
  5627. color: '#fff',
  5628. fontSize: 20,
  5629. fontFamily: 'Microsoft YaHei'
  5630. },
  5631. },
  5632. color: ['#064F78', '#BDB35D', '#623726', '#955773', '#B57C63', '#73A88E', '#09736D', '#13400B', '#0D3265'],
  5633. grid: {
  5634. top: "8%",
  5635. bottom: "52%",
  5636. left: "50%",
  5637. containLabel: true,
  5638. },
  5639. yAxis: [
  5640. {
  5641. type: "category",
  5642. inverse: true,
  5643. axisLine: {
  5644. show: false,
  5645. },
  5646. axisTick: {
  5647. show: false,
  5648. },
  5649. axisLabel: {
  5650. interval: 0,
  5651. inside: true,
  5652. textStyle: {
  5653. color: "#fff",
  5654. fontSize: 20,
  5655. fontFamily: 'Microsoft YaHei'
  5656. },
  5657. show: true,
  5658. },
  5659. data: optionData.yAxis,
  5660. },
  5661. ],
  5662. xAxis: [
  5663. {
  5664. show: false,
  5665. },
  5666. ],
  5667. series: optionData.series,
  5668. }
  5669. myChart.setOption(option)
  5670. tools.loopShowTooltip(myChart, option, {
  5671. interval: 500,
  5672. loopSeries: true,
  5673. });
  5674. }
  5675. },
  5676. initProjectList () {
  5677. let dataList = []
  5678. center8.map(item => {
  5679. if (this.versions) {
  5680. dataList.push([item.office, item.name, this.yuanChange(item.value) + '亿', item.typeno])
  5681. } else {
  5682. dataList.push([item.office, item.name, item.value + '亿'])
  5683. }
  5684. })
  5685. this.storageRecordConfig2.data = dataList
  5686. this.storageRecordConfig2 = { ...this.storageRecordConfig2 }
  5687. },
  5688. // 大屏三
  5689. initChartR1 () {
  5690. let that = this
  5691. that.right1Chart = echarts.init(this.$refs['echartR1'])
  5692. that.right1Chart.on('showTip', (params) => {
  5693. // 如果是7或者15并且满足防抖则切换
  5694. if ((params.dataIndex == 5 || params.dataIndex == 11) && that.echartR1Fd) {
  5695. that.echartR1Fd = false
  5696. setTimeout(() => {
  5697. option.dataZoom[0].endValue = option.dataZoom[0].endValue + 6
  5698. option.dataZoom[0].startValue = option.dataZoom[0].startValue + 6
  5699. that.right1Chart.setOption(option);
  5700. // 防止勿刷新做的防抖
  5701. setTimeout(() => {
  5702. that.echartR1Fd = true
  5703. }, 2000)
  5704. }, 1900);
  5705. // 如果是17表示到了最后一个,那么重新来一遍
  5706. } else if (params.dataIndex == 17 && that.echartR1Fd) {
  5707. that.echartR1Fd = false
  5708. setTimeout(() => {
  5709. option.dataZoom[0].endValue = 0
  5710. option.dataZoom[0].startValue = 5
  5711. that.right1Chart.setOption(option);
  5712. // 防止勿刷新做的防抖
  5713. setTimeout(() => {
  5714. that.echartR1Fd = true
  5715. }, 2000)
  5716. }, 1900)
  5717. }
  5718. })
  5719. let option = {
  5720. tooltip: {
  5721. formatter: data => {
  5722. 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}亿`
  5723. },
  5724. textStyle: {
  5725. color: '#FFF', // 文字的颜色
  5726. fontSize: '20', // 文字字体大小
  5727. fontFamily: 'Microsoft YaHei'
  5728. },
  5729. trigger: 'axis',
  5730. axisPointer: {
  5731. // type: 'cross',',
  5732. },
  5733. },
  5734. dataZoom: [
  5735. {
  5736. // start: 9,//默认为@
  5737. // end: 100,//黑认认为1@0
  5738. type: "slider",
  5739. show: false,
  5740. // xAxisIndex: [0]
  5741. handlesize: 0,//滑动条的 左右2个滑动条的大小
  5742. startValue: 5,// 初始显示值
  5743. endValue: 0,// 结束显示值
  5744. height: 10,//组件高度
  5745. left: "5%",
  5746. right: "4%",//右边的距离
  5747. bottom: "25%",//底边的距离
  5748. borderColor: "#939",
  5749. fillerColor: "#269cdb",
  5750. borderRadius: 5,
  5751. backgroundColor: "#33384b",//两边未选中的滑动条区域的额色
  5752. showDataShadow: false,//是否显示数据阴影
  5753. showDetail: false,//即拖拽时候是否显示详细数值信息
  5754. truerealtime: true,//是否实时更新
  5755. filterMode: "filter"
  5756. }, {
  5757. type: 'inside',
  5758. show: true,
  5759. start: 1,
  5760. end: 100,
  5761. zoomOnMouseWheel: false, //滚轮是否触发缩放
  5762. moveOnMouseMove: false, //鼠标滚轮触发滚动
  5763. }
  5764. ],
  5765. grid: {
  5766. top: '10%',
  5767. right: '3%',
  5768. left: '5%',
  5769. bottom: '5%',
  5770. },
  5771. legend: {
  5772. data: ["预算额", "已签合同额", '产值认定额', '结算额', '付款额'],
  5773. x: 'center',
  5774. y: '0px',
  5775. textStyle: {
  5776. color: '#fff',
  5777. fontSize: "20",
  5778. fontFamily: 'Microsoft YaHei'
  5779. },
  5780. },
  5781. xAxis: {
  5782. data: commonCompany,
  5783. // data: right4.map(item => item.name),
  5784. axisLine: {
  5785. show: true, //隐藏X轴轴线
  5786. lineStyle: {
  5787. color: '#005094',
  5788. width: 1,
  5789. },
  5790. },
  5791. axisTick: {
  5792. show: false, //隐藏X轴刻度
  5793. },
  5794. axisLabel: {
  5795. show: true,
  5796. // rotate: 40,
  5797. textStyle: {
  5798. color: '#fff',//'rgba(255,255,255,0.6)', //X轴文字颜色
  5799. fontSize: "20",
  5800. fontFamily: 'Microsoft YaHei'
  5801. },
  5802. },
  5803. },
  5804. yAxis: [
  5805. {
  5806. type: 'value',
  5807. name: '亿',
  5808. nameTextStyle: {
  5809. color: 'rgba(255,255,255,0.6)',
  5810. },
  5811. splitLine: {
  5812. show: true,
  5813. lineStyle: {
  5814. color: '#68b4dd66',
  5815. type: 'dashed',
  5816. },
  5817. },
  5818. axisLine: {
  5819. show: true,
  5820. lineStyle: {
  5821. color: '#3D7495',
  5822. },
  5823. },
  5824. axisLabel: {
  5825. show: true,
  5826. textStyle: {
  5827. color: '#fff',
  5828. fontSize: "20",
  5829. fontFamily: 'Microsoft YaHei'
  5830. },
  5831. },
  5832. nameTextStyle: {
  5833. color: '#fff',
  5834. fontSize: 20,
  5835. fontFamily: 'Microsoft YaHei'
  5836. },
  5837. },
  5838. ],
  5839. series: [
  5840. {
  5841. name: '预算额',
  5842. type: 'bar',
  5843. barWidth: 10,
  5844. itemStyle: {
  5845. normal: {
  5846. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  5847. {
  5848. offset: 0,
  5849. color: '#064F78',
  5850. },
  5851. {
  5852. offset: 1,
  5853. color: '#082550',
  5854. },
  5855. ]),
  5856. },
  5857. },
  5858. data: right4.map(item => item.value),
  5859. },
  5860. {
  5861. name: '已签合同额',
  5862. type: 'bar',
  5863. barWidth: 10,
  5864. itemStyle: {
  5865. normal: {
  5866. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  5867. {
  5868. offset: 0,
  5869. color: '#BDB35D',
  5870. },
  5871. {
  5872. offset: 1,
  5873. color: '#082550',
  5874. },
  5875. ]),
  5876. },
  5877. },
  5878. data: right4.map(item => item.value2),
  5879. },
  5880. {
  5881. name: '产值认定额',
  5882. type: 'bar',
  5883. barWidth: 10,
  5884. itemStyle: {
  5885. normal: {
  5886. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  5887. {
  5888. offset: 0,
  5889. color: '#623726',
  5890. },
  5891. {
  5892. offset: 1,
  5893. color: '#082550',
  5894. },
  5895. ]),
  5896. },
  5897. },
  5898. data: right4.map(item => item.value3),
  5899. },
  5900. {
  5901. name: '结算额',
  5902. type: 'bar',
  5903. barWidth: 10,
  5904. itemStyle: {
  5905. normal: {
  5906. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  5907. {
  5908. offset: 0,
  5909. color: '#13400B',
  5910. },
  5911. {
  5912. offset: 1,
  5913. color: '#082550',
  5914. },
  5915. ]),
  5916. },
  5917. },
  5918. data: right4.map(item => item.value4),
  5919. },
  5920. {
  5921. name: '付款额',
  5922. type: 'bar',
  5923. barWidth: 10,
  5924. itemStyle: {
  5925. normal: {
  5926. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  5927. {
  5928. offset: 0,
  5929. color: '#B57C63',
  5930. },
  5931. {
  5932. offset: 1,
  5933. color: '#082550',
  5934. },
  5935. ]),
  5936. },
  5937. },
  5938. data: right4.map(item => item.value5),
  5939. },
  5940. ],
  5941. }
  5942. that.right1Chart.on('click', function (param) {
  5943. if (that.versions) {
  5944. that.rightPenetrateTwo(2, '', that.findCode(param.name), 'right')
  5945. } else {
  5946. that.projectListTipShow = true
  5947. }
  5948. })
  5949. that.right1Chart.setOption(option)
  5950. tools.loopShowTooltip(that.right1Chart, option, {
  5951. interval: 2000,
  5952. loopSeries: true,
  5953. })
  5954. },
  5955. initChartR2 () {
  5956. let that = this
  5957. const itemStyle = {
  5958. // opacity: 0.8,
  5959. shadowBlur: 10,
  5960. shadowOffsetX: 0,
  5961. shadowOffsetY: 0,
  5962. shadowColor: 'rgba(0,0,0,0.3)'
  5963. };
  5964. that.right2Chart = echarts.init(this.$refs['echartR2'])
  5965. that.right2Chart.on('showTip', (params) => {
  5966. // 如果是7或者15并且满足防抖则切换
  5967. if ((params.dataIndex == 5 || params.dataIndex == 11) && that.echartR2Fd) {
  5968. that.echartR2Fd = false
  5969. setTimeout(() => {
  5970. option.dataZoom[0].endValue = option.dataZoom[0].endValue + 6
  5971. option.dataZoom[0].startValue = option.dataZoom[0].startValue + 6
  5972. that.right2Chart.setOption(option);
  5973. // 防止勿刷新做的防抖
  5974. setTimeout(() => {
  5975. that.echartR2Fd = true
  5976. }, 2000)
  5977. }, 1900);
  5978. // 如果是17表示到了最后一个,那么重新来一遍
  5979. } else if (params.dataIndex == 17 && that.echartR2Fd) {
  5980. that.echartR2Fd = false
  5981. setTimeout(() => {
  5982. option.dataZoom[0].endValue = 0
  5983. option.dataZoom[0].startValue = 5
  5984. that.right2Chart.setOption(option);
  5985. // 防止勿刷新做的防抖
  5986. setTimeout(() => {
  5987. that.echartR2Fd = true
  5988. }, 2000)
  5989. }, 1900)
  5990. }
  5991. })
  5992. let option = {
  5993. color: ['#04635E', '#697143', '#4A3042'],
  5994. dataZoom: [
  5995. {
  5996. // start: 9,//默认为@
  5997. // end: 100,//黑认认为1@0
  5998. type: "slider",
  5999. show: false,
  6000. // xAxisIndex: [0]
  6001. handlesize: 0,//滑动条的 左右2个滑动条的大小
  6002. startValue: 5,// 初始显示值
  6003. endValue: 0,// 结束显示值
  6004. height: 10,//组件高度
  6005. left: "5%",
  6006. right: "4%",//右边的距离
  6007. bottom: "25%",//底边的距离
  6008. borderColor: "#939",
  6009. fillerColor: "#269cdb",
  6010. borderRadius: 5,
  6011. backgroundColor: "#33384b",//两边未选中的滑动条区域的额色
  6012. showDataShadow: false,//是否显示数据阴影
  6013. showDetail: false,//即拖拽时候是否显示详细数值信息
  6014. truerealtime: true,//是否实时更新
  6015. filterMode: "filter"
  6016. }, {
  6017. type: 'inside',
  6018. show: true,
  6019. start: 1,
  6020. end: 100,
  6021. zoomOnMouseWheel: false, //滚轮是否触发缩放
  6022. moveOnMouseMove: false, //鼠标滚轮触发滚动
  6023. }
  6024. ],
  6025. legend: {
  6026. top: 10,
  6027. data: ['正偏差', '容差', '负偏差'],
  6028. textStyle: {
  6029. fontSize: 20,
  6030. color: '#fff',
  6031. fontFamily: 'Microsoft YaHei'
  6032. }
  6033. },
  6034. textStyle: {
  6035. color: '#fff',
  6036. },
  6037. tooltip: {
  6038. show: true,
  6039. trigger: "axis",
  6040. textStyle: {
  6041. color: '#FFF', // 文字的颜色
  6042. fontSize: '20', // 文字字体大小
  6043. fontFamily: 'Microsoft YaHei'
  6044. },
  6045. formatter: data => {
  6046. 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[2]}亿<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[2]}亿<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[2]}亿`
  6047. },
  6048. axisPointer: {
  6049. // // type: 'cross',',
  6050. },
  6051. },
  6052. grid: {
  6053. top: '10%',
  6054. right: '4%',
  6055. left: '5%',
  6056. bottom: '5%',
  6057. },
  6058. yAxis: {
  6059. name: '',
  6060. splitLine: {
  6061. show: true,
  6062. lineStyle: {
  6063. color: '#68b4dd66',
  6064. type: 'dashed',
  6065. },
  6066. },
  6067. axisLine: {
  6068. show: false
  6069. },
  6070. axisLabel: {
  6071. show: true,
  6072. formatter: '{value}%',
  6073. textStyle: {
  6074. color: '#fff',
  6075. fontSize: '20',
  6076. fontFamily: 'Microsoft YaHei'
  6077. },
  6078. },
  6079. nameTextStyle: {
  6080. color: '#fff',
  6081. fontSize: 20,
  6082. fontFamily: 'Microsoft YaHei'
  6083. },
  6084. },
  6085. xAxis: {
  6086. data: commonCompany,
  6087. // data: right5[0].map(item => item[0]),
  6088. axisLine: {
  6089. show: true, //隐藏X轴轴线
  6090. lineStyle: {
  6091. color: '#005094',
  6092. width: 1,
  6093. },
  6094. },
  6095. splitLine: {
  6096. show: true,
  6097. lineStyle: {
  6098. color: '#68b4dd66',
  6099. type: 'dashed',
  6100. },
  6101. },
  6102. axisTick: {
  6103. show: false, //隐藏X轴刻度
  6104. },
  6105. axisLabel: {
  6106. show: true,
  6107. // rotate: 40,
  6108. padding: [0, 0, 0, 0],
  6109. textStyle: {
  6110. color: '#fff', //X轴文字颜色
  6111. fontSize: 20,
  6112. fontFamily: 'Microsoft YaHei'
  6113. },
  6114. },
  6115. },
  6116. series: [
  6117. {
  6118. name: '正偏差',
  6119. type: 'scatter',
  6120. itemStyle: itemStyle,
  6121. data: right5[0],
  6122. symbolSize: function (data) {
  6123. return Math.sqrt(Math.abs(data[2])) * 9;
  6124. },
  6125. },
  6126. {
  6127. name: '容差',
  6128. type: 'scatter',
  6129. itemStyle: itemStyle,
  6130. data: right5[1],
  6131. symbolSize: function (data) {
  6132. return Math.sqrt(Math.abs(data[2])) * 9;
  6133. },
  6134. },
  6135. {
  6136. name: '负偏差',
  6137. type: 'scatter',
  6138. itemStyle: itemStyle,
  6139. data: right5[2],
  6140. symbolSize: function (data) {
  6141. return Math.sqrt(Math.abs(data[2])) * 9;
  6142. },
  6143. }
  6144. ]
  6145. }
  6146. that.right2Chart.on('click', function (param) {
  6147. if (that.versions) {
  6148. that.rightPenetrateTwo(1, param.seriesName == '正偏差' ? 1 : param.seriesName == '容差' ? 2 : 3, that.findCode(param.name), 'right')
  6149. } else {
  6150. that.projectListTipShow = true
  6151. }
  6152. })
  6153. that.right2Chart.setOption(option)
  6154. tools.loopShowTooltip(that.right2Chart, option, {
  6155. interval: 2000,
  6156. loopSeries: true,
  6157. })
  6158. },
  6159. initChartR3 () {
  6160. let that = this
  6161. that.right3Chart = echarts.init(this.$refs['echartR3'])
  6162. that.right3Chart.on('showTip', (params) => {
  6163. this.echartR4Chart ? this.echartR4Chart.dispose() : ''
  6164. this.echartR5Chart ? this.echartR5Chart.dispose() : ''
  6165. that.initChartR4(params.dataIndex)
  6166. that.initChartR5(params.dataIndex)
  6167. // 如果是7或者15并且满足防抖则切换
  6168. if ((params.dataIndex == 5 || params.dataIndex == 11) && that.echartR3Fd) {
  6169. that.echartR3Fd = false
  6170. setTimeout(() => {
  6171. option.dataZoom[0].endValue = option.dataZoom[0].endValue + 6
  6172. option.dataZoom[0].startValue = option.dataZoom[0].startValue + 6
  6173. that.right3Chart.setOption(option);
  6174. // 防止勿刷新做的防抖
  6175. setTimeout(() => {
  6176. that.echartR3Fd = true
  6177. }, 2000)
  6178. }, 7900);
  6179. // 如果是17表示到了最后一个,那么重新来一遍
  6180. } else if (params.dataIndex == 17 && that.echartR3Fd) {
  6181. that.echartR3Fd = false
  6182. setTimeout(() => {
  6183. option.dataZoom[0].endValue = 0
  6184. option.dataZoom[0].startValue = 5
  6185. that.right3Chart.setOption(option);
  6186. // 防止勿刷新做的防抖
  6187. setTimeout(() => {
  6188. that.echartR3Fd = true
  6189. }, 2000)
  6190. }, 7900)
  6191. }
  6192. })
  6193. let option = {
  6194. tooltip: {
  6195. formatter: data => {
  6196. 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}亿`
  6197. },
  6198. trigger: 'axis',
  6199. axisPointer: {
  6200. // type: 'cross',',
  6201. },
  6202. position: (params) => {
  6203. return [params[0] + 10, 60]
  6204. },
  6205. textStyle: {
  6206. color: '#FFF', // 文字的颜色
  6207. fontSize: '20', // 文字字体大小
  6208. fontFamily: 'Microsoft YaHei'
  6209. },
  6210. confine: true
  6211. },
  6212. dataZoom: [
  6213. {
  6214. // start: 9,//默认为@
  6215. // end: 100,//黑认认为1@0
  6216. type: "slider",
  6217. show: false,
  6218. // xAxisIndex: [0]
  6219. handlesize: 0,//滑动条的 左右2个滑动条的大小
  6220. startValue: 5,// 初始显示值
  6221. endValue: 0,// 结束显示值
  6222. height: 10,//组件高度
  6223. left: "5%",
  6224. right: "4%",//右边的距离
  6225. bottom: "25%",//底边的距离
  6226. borderColor: "#939",
  6227. fillerColor: "#269cdb",
  6228. borderRadius: 5,
  6229. backgroundColor: "#33384b",//两边未选中的滑动条区域的额色
  6230. showDataShadow: false,//是否显示数据阴影
  6231. showDetail: false,//即拖拽时候是否显示详细数值信息
  6232. truerealtime: true,//是否实时更新
  6233. filterMode: "filter"
  6234. }, {
  6235. type: 'inside',
  6236. show: true,
  6237. start: 1,
  6238. end: 100,
  6239. zoomOnMouseWheel: false, //滚轮是否触发缩放
  6240. moveOnMouseMove: false, //鼠标滚轮触发滚动
  6241. }
  6242. ],
  6243. grid: {
  6244. top: '25%',
  6245. right: '3%',
  6246. left: '10%',
  6247. bottom: '20%',
  6248. },
  6249. legend: {
  6250. data: ["低风险", "中风险", '高风险'],
  6251. x: 'center',
  6252. y: '15px',
  6253. textStyle: {
  6254. // color: 'rgba(250,250,250,0.6)',
  6255. color: '#fff',
  6256. fontSize: "20",
  6257. fontFamily: 'Microsoft YaHei'
  6258. },
  6259. },
  6260. xAxis: {
  6261. data: commonCompany,
  6262. // data: right4.map(item => item.name),
  6263. axisLine: {
  6264. show: true, //隐藏X轴轴线
  6265. lineStyle: {
  6266. color: '#005094',
  6267. width: 1,
  6268. },
  6269. },
  6270. axisTick: {
  6271. show: false, //隐藏X轴刻度
  6272. },
  6273. axisLabel: {
  6274. show: true,
  6275. rotate: 40,
  6276. textStyle: {
  6277. color: '#fff',//'rgba(255,255,255,0.6)', //X轴文字颜色
  6278. fontSize: '20',
  6279. fontFamily: 'Microsoft YaHei'
  6280. },
  6281. },
  6282. },
  6283. yAxis: [
  6284. {
  6285. type: 'value',
  6286. name: '亿',
  6287. nameTextStyle: {
  6288. color: 'rgba(255,255,255,0.6)',
  6289. },
  6290. splitLine: {
  6291. show: true,
  6292. lineStyle: {
  6293. color: '#68b4dd66',
  6294. type: 'dashed',
  6295. },
  6296. },
  6297. axisLine: {
  6298. show: true,
  6299. lineStyle: {
  6300. color: '#3D7495',
  6301. },
  6302. },
  6303. axisLabel: {
  6304. show: true,
  6305. textStyle: {
  6306. color: '#fff',
  6307. fontSize: '20',
  6308. fontFamily: 'Microsoft YaHei'
  6309. },
  6310. },
  6311. nameTextStyle: {
  6312. color: '#fff',
  6313. fontSize: 20,
  6314. fontFamily: 'Microsoft YaHei'
  6315. },
  6316. },
  6317. ],
  6318. series: [
  6319. {
  6320. name: '高风险',
  6321. type: 'bar',
  6322. stack: 'Ad',
  6323. barWidth: 10,
  6324. itemStyle: {
  6325. normal: {
  6326. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  6327. {
  6328. offset: 0,
  6329. color: '#4A3042',
  6330. },
  6331. {
  6332. offset: 1,
  6333. color: '#4A3042',
  6334. },
  6335. ]),
  6336. },
  6337. },
  6338. data: right6.map(item => item.value),
  6339. },
  6340. {
  6341. name: '中风险',
  6342. type: 'bar',
  6343. stack: 'Ad',
  6344. barWidth: 10,
  6345. itemStyle: {
  6346. normal: {
  6347. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  6348. {
  6349. offset: 0,
  6350. color: '#697143',
  6351. },
  6352. {
  6353. offset: 1,
  6354. color: '#697143',
  6355. },
  6356. ]),
  6357. },
  6358. },
  6359. data: right6.map(item => item.value2),
  6360. },
  6361. {
  6362. name: '低风险',
  6363. type: 'bar',
  6364. stack: 'Ad',
  6365. barWidth: 10,
  6366. itemStyle: {
  6367. normal: {
  6368. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  6369. {
  6370. offset: 0,
  6371. color: '#04635E',
  6372. },
  6373. {
  6374. offset: 1,
  6375. color: '#04635E',
  6376. },
  6377. ]),
  6378. },
  6379. },
  6380. data: right6.map(item => item.value3),
  6381. },
  6382. ],
  6383. }
  6384. that.right3Chart.on('click', function (param) {
  6385. if (that.versions) {
  6386. that.rightPenetrateTwo(that.rightPenetrateTwo.modelName, '', that.findCode(param.name), 'right')
  6387. } else {
  6388. that.projectListTipShow = true
  6389. }
  6390. })
  6391. that.right3Chart.setOption(option)
  6392. tools.loopShowTooltip(that.right3Chart, option, {
  6393. interval: 8000,
  6394. loopSeries: true,
  6395. })
  6396. },
  6397. initChartR4 (indexValue) {
  6398. this.echartR4Chart = echarts.init(this.$refs['echartR4'])
  6399. option = {
  6400. title: {
  6401. text: ''
  6402. },
  6403. radar: {
  6404. center: ['50%', '50%'],
  6405. radius: 135,
  6406. indicator: [
  6407. { name: '安全风险', max: 100000 },
  6408. { name: '付款风险', max: 100000 },
  6409. { name: '合同风险', max: 100000 },
  6410. { name: '结算风险', max: 100000 },
  6411. { name: '进度风险', max: 100000 },
  6412. { name: '质量风险', max: 100000 },
  6413. ],
  6414. axisLine: { // 设置雷达图中间射线的颜色
  6415. lineStyle: {
  6416. color: '#887d33',
  6417. },
  6418. },
  6419. splitLine: { //网格颜色设置
  6420. show: true,
  6421. lineStyle: {
  6422. width: 1,
  6423. color: ['#871b1a', '#638f41', '#d29e35', '#b6802b']
  6424. },
  6425. },
  6426. name: { //修改indicator文字的颜色
  6427. textStyle: {
  6428. color: "#fff",
  6429. fontSize: '20',
  6430. fontFamily: 'Microsoft YaHei'
  6431. }
  6432. },
  6433. splitNumber: 4, //有几个圈
  6434. splitArea: { //设置图表颜色,show的值为true
  6435. show: true,
  6436. areaStyle: {
  6437. // color:"#c1ddf8", //一般设置方式
  6438. //设置渐变背景色 new echarts.graphic.LinearGradient(a,b,c,d,arr)
  6439. //a ,b,c,d值可为0,1 a:1表示arr中的颜色右到左;c:1 arr中的颜色左到右
  6440. //b:1表示arr中的颜色下到上;d:1表示arr中的颜色上到下
  6441. // color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  6442. // { offset: 0, color: '#887D33' }, // 0% 处的颜色
  6443. // { offset: 0.75, color: '#7D4216' }, // 0% 处的颜色
  6444. // { offset: 1, color: '#430705' }// 100% 处的颜色
  6445. // ], false)
  6446. color: ['#638f41', '#887d33', '#7d4216', '#430705'],
  6447. }
  6448. }
  6449. },
  6450. series: [
  6451. {
  6452. name: '',
  6453. type: 'radar',
  6454. symbol: 'circle', // 单个数值点的样式,还可以取值'rect','angle'等
  6455. symbolSize: 0, // 数值点的大小
  6456. data: [
  6457. {
  6458. value: right7[indexValue],
  6459. name: '安全风险',
  6460. itemStyle: { //该数值区域样式设置
  6461. normal: {
  6462. color: 'rgb(44,198,255,0.8)', //背景颜色,还需设置areaStyle
  6463. lineStyle: {
  6464. color: 'rgb(44,198,255,0.8)', //边框颜色
  6465. },
  6466. },
  6467. },
  6468. label: { //显示value中具体的数值
  6469. normal: {
  6470. show: false,
  6471. textStyle: { //更改数值样式
  6472. color: '#43EDE3'
  6473. }
  6474. },
  6475. },
  6476. areaStyle: { //设置区域背景颜色透明度
  6477. normal: {
  6478. width: 1,
  6479. opacity: 0.8,
  6480. },
  6481. },
  6482. }
  6483. ]
  6484. }
  6485. ]
  6486. };
  6487. // tools.loopShowTooltip(myChart, option, {
  6488. // interval: 2000,
  6489. // loopSeries: true,
  6490. // });
  6491. this.echartR4Chart.setOption(option)
  6492. },
  6493. initChartR5 () {
  6494. this.echartR5Chart = echarts.init(this.$refs['echartR5'])
  6495. let option = {
  6496. tooltip: {
  6497. formatter: data => {
  6498. 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}亿`
  6499. },
  6500. trigger: 'axis',
  6501. axisPointer: {
  6502. // type: 'cross',',
  6503. },
  6504. textStyle: {
  6505. color: '#FFF', // 文字的颜色
  6506. fontSize: '20', // 文字字体大小
  6507. fontFamily: 'Microsoft YaHei'
  6508. },
  6509. },
  6510. grid: {
  6511. top: '15%',
  6512. right: '3%',
  6513. left: '5%',
  6514. bottom: '35',
  6515. },
  6516. legend: {
  6517. data: ["预算额", "合同额", "结算额", "支付额"],
  6518. x: 'center',
  6519. y: '10px',
  6520. textStyle: {
  6521. // color: 'rgba(250,250,250,0.6)',
  6522. color: '#fff',
  6523. fontSize: "20",
  6524. fontFamily: 'Microsoft YaHei'
  6525. },
  6526. },
  6527. xAxis: {
  6528. data: ['设备费', '设计费', '施工费', '材料费'],
  6529. axisLine: {
  6530. show: true, //隐藏X轴轴线
  6531. lineStyle: {
  6532. color: '#005094',
  6533. width: 1,
  6534. },
  6535. },
  6536. axisTick: {
  6537. show: false, //隐藏X轴刻度
  6538. },
  6539. axisLabel: {
  6540. show: true,
  6541. // rotate: 40,
  6542. textStyle: {
  6543. color: '#fff',//'rgba(255,255,255,0.6)', //X轴文字颜色
  6544. fontSize: '20', // 文字字体大小
  6545. fontFamily: 'Microsoft YaHei'
  6546. },
  6547. },
  6548. },
  6549. yAxis: [
  6550. {
  6551. type: 'value',
  6552. name: '亿',
  6553. nameTextStyle: {
  6554. color: 'rgba(255,255,255,0.6)',
  6555. },
  6556. splitLine: {
  6557. show: true,
  6558. lineStyle: {
  6559. color: '#68b4dd66',
  6560. type: 'dashed',
  6561. },
  6562. },
  6563. axisLine: {
  6564. show: true,
  6565. lineStyle: {
  6566. color: '#3D7495',
  6567. },
  6568. },
  6569. axisLabel: {
  6570. show: true,
  6571. textStyle: {
  6572. color: '#fff',
  6573. fontSize: '20', // 文字字体大小
  6574. fontFamily: 'Microsoft YaHei'
  6575. },
  6576. },
  6577. nameTextStyle: {
  6578. color: '#fff',
  6579. fontSize: 20,
  6580. fontFamily: 'Microsoft YaHei'
  6581. },
  6582. },
  6583. ],
  6584. series: [
  6585. {
  6586. name: '预算额',
  6587. type: 'bar',
  6588. barWidth: 10,
  6589. itemStyle: {
  6590. normal: {
  6591. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  6592. {
  6593. offset: 0,
  6594. color: '#064F78',
  6595. },
  6596. {
  6597. offset: 1,
  6598. color: '#082550',
  6599. },
  6600. ]),
  6601. },
  6602. },
  6603. data: right8.map(item => item.value),
  6604. },
  6605. {
  6606. name: '合同额',
  6607. type: 'bar',
  6608. barWidth: 10,
  6609. itemStyle: {
  6610. normal: {
  6611. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  6612. {
  6613. offset: 0,
  6614. color: '#BDB35D',
  6615. },
  6616. {
  6617. offset: 1,
  6618. color: '#082550',
  6619. },
  6620. ]),
  6621. },
  6622. },
  6623. data: right8.map(item => item.value2),
  6624. },
  6625. {
  6626. name: '结算额',
  6627. type: 'bar',
  6628. barWidth: 10,
  6629. itemStyle: {
  6630. normal: {
  6631. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  6632. {
  6633. offset: 0,
  6634. color: '#623726',
  6635. },
  6636. {
  6637. offset: 1,
  6638. color: '#082550',
  6639. },
  6640. ]),
  6641. },
  6642. },
  6643. data: right8.map(item => item.value3),
  6644. },
  6645. {
  6646. name: '支付额',
  6647. type: 'bar',
  6648. barWidth: 10,
  6649. itemStyle: {
  6650. normal: {
  6651. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  6652. {
  6653. offset: 0,
  6654. color: '#955773',
  6655. },
  6656. {
  6657. offset: 1,
  6658. color: '#082550',
  6659. },
  6660. ]),
  6661. },
  6662. },
  6663. data: right8.map(item => item.value4),
  6664. },
  6665. ],
  6666. }
  6667. this.echartR5Chart.setOption(option)
  6668. tools.loopShowTooltip(this.echartR5Chart, option, {
  6669. interval: 2000,
  6670. loopSeries: true,
  6671. })
  6672. },
  6673. },
  6674. })