investHomeGroup.js 225 KB

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