investHomeGroup.js 210 KB

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