investHomeGroup.js 165 KB

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