investHomeGroup.js 195 KB

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