investHomeGroup.js 155 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080
  1. let app = new Vue({
  2. el: '#app',
  3. data () {
  4. return {
  5. echartEnterpriseShow: false, // 企业额度分析控制
  6. mapChart: '',//地图专用echarts
  7. chartCarousel: '',//做大屏轮播专用echarts
  8. mapTipShow: false,
  9. echartSingleTipShow: false,
  10. echartDoubleTipShow: false,
  11. backShow: false,
  12. titleUrl: '',
  13. titleName: '',
  14. yellowCount: 0, // 黄圈轮播参数
  15. yellowPosition: 40,// 黄圈悬浮窗位置参数
  16. echartR1Fd: true,
  17. echartR2Fd: true,
  18. echartR3Fd: true,
  19. echarts1Time: 16000,
  20. time: '',
  21. timer: '',
  22. timer2: '',
  23. totleLimit: left4[0],
  24. totleLimit2: left4[1],
  25. totleLimit3: left4[2],
  26. totleLimit4: left4[3],
  27. totleLimit5: left4[4],
  28. center1:center1,
  29. showTip2: false,
  30. showTip3: false,
  31. list: [],
  32. count: 0,
  33. countType: 0,
  34. mapName: 'shanxi',
  35. geoCoordMap: {},
  36. storageRecordConfig2: center9,
  37. titleList: right1,
  38. centerLeftList: right3,
  39. storageRecordConfig: left11
  40. }
  41. },
  42. created () {
  43. this.time = formatDate()
  44. this.timer = setInterval(() => {
  45. this.time = formatDate()
  46. }, 1000)
  47. this.timer2 = setInterval(() => {
  48. this.changeYellow()
  49. }, 2000)
  50. },
  51. beforeDestroy () {
  52. if (this.timer) {
  53. clearInterval(this.timer);
  54. }
  55. if (this.timer2) {
  56. clearInterval(this.timer2);
  57. }
  58. },
  59. mounted () {
  60. setTimeout(() => {
  61. this.initChartL1()
  62. this.initChartL2()
  63. this.initChartL3()
  64. this.initChartL4()
  65. this.initChartL5()
  66. this.initChartL6()
  67. this.initChartL7()
  68. this.initChartL8()
  69. this.initChartL10()
  70. this.initChartL11()
  71. this.changeTopColor()
  72. // 大屏二
  73. this.initChartC1()
  74. this.initChartC2()
  75. this.initChartC3()
  76. this.initChartC4()
  77. this.initChinaChart()
  78. this.initProjectList()
  79. // 大屏三
  80. this.initChartR1()
  81. this.initChartR2()
  82. this.initChartR3()
  83. this.initChartR4()
  84. this.initChartR5()
  85. this.changeYellow()
  86. })
  87. },
  88. methods: {
  89. // 回到中国地图
  90. backChina () {
  91. this.backShow = false
  92. this.mapChart.dispose()
  93. setTimeout(() => {
  94. this.initChinaChart()
  95. });
  96. },
  97. // 去项目看板
  98. goLookBoard (e) {
  99. console.log(e, '?????')
  100. },
  101. // 单个柱状图的弹窗
  102. showChartLTipSingle (e) {
  103. this.closeTap()
  104. this.titleName = e
  105. this.echartSingleTipShow = true
  106. setTimeout(() => {
  107. this.initChartLTip()
  108. })
  109. },
  110. // 两个柱状图的弹窗
  111. showChartLTipDouble (e) {
  112. this.titleName = e
  113. this.echartDoubleTipShow = true
  114. setTimeout(() => {
  115. this.initChartLTip2()
  116. this.initChartLTip3()
  117. })
  118. },
  119. initChartLTip () {
  120. let myChart = echarts.init(document.getElementById("echartSingleTip"));
  121. let option = {
  122. grid: {
  123. top: 40,
  124. right: 0,
  125. left: 60,
  126. bottom: 70,
  127. },
  128. tooltip: {
  129. show: true,
  130. trigger: "axis",
  131. axisPointer: {
  132. // 坐标轴指示器,坐标轴触发有效
  133. type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
  134. },
  135. textStyle: {
  136. color: '#FFF', // 文字的颜色
  137. fontSize: '20', // 文字字体大小
  138. },
  139. },
  140. xAxis: {
  141. data: ["山西焦煤", "晋能控股", "华阳新材", "潞安化工", "华新燃气", "太重集团", "国际能源", "华远陆港", "水控集团", "文旅集团", "交控集团", '航产集团', '山西建投', '汾酒集团', '大地控股', '云时代', '华舰体育', '神农科技'],
  142. axisTick: {
  143. show: false,
  144. },
  145. // x轴的字体颜色
  146. axisLabel: {
  147. rotate: 40,
  148. textStyle: {
  149. color: "white",
  150. fontSize: '20'
  151. },
  152. },
  153. //y轴线的颜色以及宽度
  154. axisLine: {
  155. show: true,
  156. lineStyle: {
  157. color: "#1E5389",
  158. width: 1,
  159. type: "solid",
  160. },
  161. },
  162. },
  163. yAxis: {
  164. name: '亿元',
  165. nameTextStyle: {//y轴上方单位的颜色
  166. color: '#fff',
  167. fontSize: '20'
  168. },
  169. axisTick: {
  170. lineStyle: {
  171. color: "#18416F",
  172. },
  173. },
  174. // y轴的字体颜色
  175. axisLabel: {
  176. textStyle: {
  177. color: "white",
  178. fontSize: '20'
  179. },
  180. },
  181. splitLine: {
  182. show: true,
  183. lineStyle: {
  184. color: "#204561",
  185. width: 1,
  186. type: "dotted",
  187. },
  188. },
  189. //y轴线的颜色以及宽度
  190. axisLine: {
  191. show: true,
  192. lineStyle: {
  193. color: "#1E5389",
  194. width: 1,
  195. type: "solid",
  196. },
  197. },
  198. },
  199. series: [
  200. // {
  201. // name: "2022年额度",
  202. // type: "bar",
  203. // 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],
  204. // showBackground: false,
  205. // backgroundStyle: {
  206. // color: "#18416F",
  207. // },
  208. // barWidth: "10%",
  209. // itemStyle: {
  210. // barBorderRadius: [10, 10, 0, 0],
  211. // color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  212. // {
  213. // offset: 0,
  214. // color: '#082550',
  215. // },
  216. // {
  217. // offset: 1,
  218. // color: '#69c0ff',
  219. // },
  220. // ]),
  221. // },
  222. // },
  223. {
  224. name: "2023年额度",
  225. type: "bar",
  226. data: [359.91, 400.49, 117.65, 148.96, 34.84, 17.79, 26.15, 26.18, 16.83, 0.00, 43.49, 0.00, 43.39, 76.53, 5.05, 8.59, 0.00, 0.28],
  227. showBackground: false,
  228. backgroundStyle: {
  229. color: "#18416F",
  230. },
  231. barWidth: "30%",
  232. itemStyle: {
  233. // barBorderRadius: [10, 10, 0, 0],
  234. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  235. {
  236. offset: 0,
  237. color: '#082550',
  238. },
  239. {
  240. offset: 1,
  241. color: '#957DFF',
  242. },
  243. ]),
  244. },
  245. },
  246. ],
  247. legend: {
  248. // data: ["2022年额度", "2023年额度"],
  249. data: ["2023年额度"],
  250. textStyle: {
  251. // 图列内容样式
  252. color: "#fff", // 字体颜色
  253. fontSize: "20",
  254. },
  255. right: 'center',
  256. y: 5,
  257. icon: "roundRect",
  258. // 小图标的宽高
  259. itemHeight: 5,
  260. },
  261. };
  262. tools.loopShowTooltip(myChart, option, {
  263. nterval: 2000,
  264. loopSeries: true,
  265. })
  266. let that = this
  267. myChart.on('click', function (param) {
  268. window.location.href = './investHomeChild.html?type=2'
  269. })
  270. myChart.setOption(option);
  271. },
  272. initChartLTip2 () {
  273. let myChart = echarts.init(document.getElementById("echartSingleTip2"));
  274. let option = {
  275. grid: {
  276. top: 35,
  277. right: 0,
  278. left: 60,
  279. bottom: 50,
  280. },
  281. tooltip: {
  282. show: true,
  283. trigger: "axis",
  284. axisPointer: {
  285. // 坐标轴指示器,坐标轴触发有效
  286. type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
  287. },
  288. textStyle: {
  289. color: '#FFF', // 文字的颜色
  290. fontSize: '20', // 文字字体大小
  291. },
  292. },
  293. xAxis: {
  294. data: ["山西焦煤", "晋能控股", "华阳新材", "潞安化工", "华新燃气", "太重集团", "国际能源", "华远陆港", "水控集团", "文旅集团", "交控集团", '航产集团', '山西建投', '汾酒集团', '大地控股', '云时代', '华舰体育', '神农科技'],
  295. axisTick: {
  296. show: false,
  297. },
  298. // x轴的字体颜色
  299. axisLabel: {
  300. rotate: 40,
  301. textStyle: {
  302. color: "white",
  303. fontSize: '15'
  304. },
  305. },
  306. //y轴线的颜色以及宽度
  307. axisLine: {
  308. show: true,
  309. lineStyle: {
  310. color: "#1E5389",
  311. width: 1,
  312. type: "solid",
  313. },
  314. },
  315. },
  316. yAxis: {
  317. name: '亿元',
  318. nameTextStyle: {//y轴上方单位的颜色
  319. color: '#fff',
  320. fontSize: '15'
  321. },
  322. axisTick: {
  323. lineStyle: {
  324. color: "#18416F",
  325. },
  326. },
  327. // y轴的字体颜色
  328. axisLabel: {
  329. textStyle: {
  330. color: "white",
  331. fontSize: '15'
  332. },
  333. },
  334. splitLine: {
  335. show: true,
  336. lineStyle: {
  337. color: "#204561",
  338. width: 1,
  339. type: "dotted",
  340. },
  341. },
  342. //y轴线的颜色以及宽度
  343. axisLine: {
  344. show: true,
  345. lineStyle: {
  346. color: "#1E5389",
  347. width: 1,
  348. type: "solid",
  349. },
  350. },
  351. },
  352. series: [
  353. // {
  354. // name: "2022年额度",
  355. // type: "bar",
  356. // 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],
  357. // showBackground: false,
  358. // backgroundStyle: {
  359. // color: "#18416F",
  360. // },
  361. // barWidth: "10%",
  362. // itemStyle: {
  363. // barBorderRadius: [10, 10, 0, 0],
  364. // color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  365. // {
  366. // offset: 0,
  367. // color: '#082550',
  368. // },
  369. // {
  370. // offset: 1,
  371. // color: '#69c0ff',
  372. // },
  373. // ]),
  374. // },
  375. // },
  376. {
  377. name: "2023年额度",
  378. type: "bar",
  379. data: [359.91, 400.49, 117.65, 148.96, 34.84, 17.79, 26.15, 26.18, 16.83, 0.00, 43.49, 0.00, 43.39, 76.53, 5.05, 8.59, 0.00, 0.28],
  380. showBackground: false,
  381. backgroundStyle: {
  382. color: "#18416F",
  383. },
  384. barWidth: "30%",
  385. itemStyle: {
  386. // barBorderRadius: [10, 10, 0, 0],
  387. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  388. {
  389. offset: 0,
  390. color: '#082550',
  391. },
  392. {
  393. offset: 1,
  394. color: '#957DFF',
  395. },
  396. ]),
  397. },
  398. },
  399. ],
  400. legend: {
  401. // data: ["2022年额度", "2023年额度"],
  402. data: ["2023年额度"],
  403. textStyle: {
  404. // 图列内容样式
  405. color: "#fff", // 字体颜色
  406. fontSize: "20",
  407. },
  408. right: 'center',
  409. y: 5,
  410. icon: "roundRect",
  411. // 小图标的宽高
  412. itemHeight: 5,
  413. },
  414. };
  415. tools.loopShowTooltip(myChart, option, {
  416. nterval: 2000,
  417. loopSeries: true,
  418. })
  419. let that = this
  420. myChart.on('click', function (param) {
  421. window.location.href = './investHomeChild.html?type=2'
  422. })
  423. myChart.setOption(option);
  424. },
  425. initChartLTip3 () {
  426. let myChart = echarts.init(document.getElementById("echartSingleTip3"));
  427. let option = {
  428. grid: {
  429. top: 35,
  430. right: 0,
  431. left: 60,
  432. bottom: 50,
  433. },
  434. tooltip: {
  435. show: true,
  436. trigger: "axis",
  437. axisPointer: {
  438. // 坐标轴指示器,坐标轴触发有效
  439. type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
  440. },
  441. textStyle: {
  442. color: '#FFF', // 文字的颜色
  443. fontSize: '20', // 文字字体大小
  444. },
  445. },
  446. xAxis: {
  447. data: ["山西焦煤", "晋能控股", "华阳新材", "潞安化工", "华新燃气", "太重集团", "国际能源", "华远陆港", "水控集团", "文旅集团", "交控集团", '航产集团', '山西建投', '汾酒集团', '大地控股', '云时代', '华舰体育', '神农科技'],
  448. axisTick: {
  449. show: false,
  450. },
  451. // x轴的字体颜色
  452. axisLabel: {
  453. rotate: 40,
  454. textStyle: {
  455. color: "white",
  456. fontSize: '15'
  457. },
  458. },
  459. //y轴线的颜色以及宽度
  460. axisLine: {
  461. show: true,
  462. lineStyle: {
  463. color: "#1E5389",
  464. width: 1,
  465. type: "solid",
  466. },
  467. },
  468. },
  469. yAxis: {
  470. name: '个',
  471. nameTextStyle: {//y轴上方单位的颜色
  472. color: '#fff',
  473. fontSize: '15'
  474. },
  475. axisTick: {
  476. lineStyle: {
  477. color: "#18416F",
  478. },
  479. },
  480. // y轴的字体颜色
  481. axisLabel: {
  482. textStyle: {
  483. color: "white",
  484. fontSize: '15'
  485. },
  486. },
  487. splitLine: {
  488. show: true,
  489. lineStyle: {
  490. color: "#204561",
  491. width: 1,
  492. type: "dotted",
  493. },
  494. },
  495. //y轴线的颜色以及宽度
  496. axisLine: {
  497. show: true,
  498. lineStyle: {
  499. color: "#1E5389",
  500. width: 1,
  501. type: "solid",
  502. },
  503. },
  504. },
  505. series: [
  506. // {
  507. // name: "2022年额度",
  508. // type: "bar",
  509. // 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],
  510. // showBackground: false,
  511. // backgroundStyle: {
  512. // color: "#18416F",
  513. // },
  514. // barWidth: "10%",
  515. // itemStyle: {
  516. // barBorderRadius: [10, 10, 0, 0],
  517. // color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  518. // {
  519. // offset: 0,
  520. // color: '#082550',
  521. // },
  522. // {
  523. // offset: 1,
  524. // color: '#69c0ff',
  525. // },
  526. // ]),
  527. // },
  528. // },
  529. {
  530. name: "2023年额度",
  531. type: "bar",
  532. data: [359.91, 400.49, 117.65, 148.96, 34.84, 17.79, 26.15, 26.18, 16.83, 0.00, 43.49, 0.00, 43.39, 76.53, 5.05, 8.59, 0.00, 0.28],
  533. showBackground: false,
  534. backgroundStyle: {
  535. color: "#18416F",
  536. },
  537. barWidth: "30%",
  538. itemStyle: {
  539. // barBorderRadius: [10, 10, 0, 0],
  540. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  541. {
  542. offset: 0,
  543. color: '#082550',
  544. },
  545. {
  546. offset: 1,
  547. color: '#69c0ff',
  548. },
  549. ]),
  550. },
  551. },
  552. ],
  553. legend: {
  554. // data: ["2022年额度", "2023年额度"],
  555. data: ["2023年额度"],
  556. textStyle: {
  557. // 图列内容样式
  558. color: "#fff", // 字体颜色
  559. fontSize: "20",
  560. },
  561. right: 'center',
  562. y: 5,
  563. icon: "roundRect",
  564. // 小图标的宽高
  565. itemHeight: 5,
  566. },
  567. };
  568. tools.loopShowTooltip(myChart, option, {
  569. nterval: 2000,
  570. loopSeries: true,
  571. })
  572. let that = this
  573. myChart.on('click', function (param) {
  574. window.location.href = './investHomeChild.html?type=2'
  575. })
  576. myChart.setOption(option);
  577. },
  578. closeTap () {
  579. this.echartEnterpriseShow = false
  580. this.mapTipShow = false
  581. this.echartSingleTipShow = false
  582. this.echartDoubleTipShow = false
  583. },
  584. //点击弹窗左半部分
  585. popLeftClick () {
  586. if (this.titleUrl == '2.png') {
  587. this.titleUrl = '3.png'
  588. } else if (this.titleUrl == '7.png') {
  589. this.titleUrl = '8.png'
  590. } else if (this.titleUrl == '3.png') {
  591. this.titleUrl = '2.png'
  592. } else if (this.titleUrl == '8.png') {
  593. this.titleUrl = '7.png'
  594. } else if (this.titleUrl == '5.png') {
  595. this.titleUrl = '2.png'
  596. } else if (this.titleUrl == '10.png') {
  597. this.titleUrl = '7.png'
  598. }
  599. },
  600. //点击弹窗右半部分
  601. poprightClick () {
  602. if (this.titleUrl == '2.png') {
  603. this.titleUrl = '5.png'
  604. } else if (this.titleUrl == '7.png') {
  605. this.titleUrl = '10.png'
  606. } else if (this.titleUrl == '5.png') {
  607. this.titleUrl = '2.png'
  608. } else if (this.titleUrl == '10.png') {
  609. this.titleUrl = '7.png'
  610. } else if (this.titleUrl == '3.png') {
  611. this.titleUrl = '2.png'
  612. } else if (this.titleUrl == '8.png') {
  613. this.titleUrl = '7.png'
  614. }
  615. },
  616. // 标题弹窗
  617. showTitlePop (e, name) {
  618. this.closeTap()
  619. this.titleUrl = e
  620. this.titleName = name
  621. this.mapTipShow = true
  622. },
  623. changeYellow () {
  624. this.titleList.forEach((item, index) => {
  625. this.$set(this.titleList[index], 'type', 1)
  626. })
  627. this.$set(this.titleList[this.yellowCount], 'type', 2)
  628. if (this.yellowCount == 14) {
  629. this.yellowCount = 0
  630. this.yellowPosition += 315
  631. } else {
  632. if (this.yellowCount != 0) {
  633. this.yellowPosition += 315
  634. } else {
  635. this.yellowPosition = 40
  636. }
  637. this.yellowCount += 2
  638. }
  639. },
  640. numFormat (value) {
  641. if (!value) return '0'
  642. // var intPart = Number(value).toFixed(0) // 获取整数部分
  643. var intPart = parseInt(value)// 获取整数部分
  644. var intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') // 将整数部分逢三一断
  645. var floatPart = '.00' // 预定义小数部分
  646. var value2Array = value.toString().split('.')
  647. // =2表示数据有小数位
  648. if (value2Array.length === 2) {
  649. floatPart = value2Array[1].toString() // 拿到小数部分
  650. if (floatPart.length === 1) {
  651. // 补0
  652. return intPartFormat + '.' + floatPart + '0'
  653. } else {
  654. return intPartFormat + '.' + floatPart
  655. }
  656. } else {
  657. return intPartFormat
  658. }
  659. },
  660. changeTopColor () {
  661. this.list = document.getElementsByClassName('row-item')
  662. for (var i = 0; i < this.list.length; i++) {
  663. if (i == 1) {
  664. this.list[i].classList.add('light')
  665. } else {
  666. this.list[i].classList.remove('light')
  667. }
  668. }
  669. this.initChartL9()
  670. },
  671. scrollChange (index) {
  672. if (index == 18) {
  673. this.count = -1
  674. } else {
  675. this.count = index
  676. }
  677. if (this.count > 12 && this.count != 18) {
  678. this.countType = 1
  679. } else {
  680. this.countType = 0
  681. }
  682. for (var i = 0; i < this.list.length; i++) {
  683. if (i == 2) {
  684. this.list[i].classList.add('light')
  685. } else {
  686. this.list[i].classList.remove('light')
  687. }
  688. }
  689. this.chartCarousel.dispose()
  690. this.initChartL9()
  691. },
  692. initChartBall () {
  693. let myChart = echarts.init(this.$refs['echartBall'])
  694. var value = 0.1463;
  695. var data = [value];
  696. let option = {
  697. backgroundColor: 'transparent',
  698. title: [
  699. {
  700. // text: '总额度285.48亿',
  701. // formatter: `<span>总额度</span>285.48亿`,
  702. x: '37%',
  703. y: '80%',
  704. textStyle: {
  705. fontSize: 24,
  706. fontWeight: 'bold',
  707. color: '#2CB7E0',
  708. lineHeight: 16,
  709. textAlign: 'center',
  710. },
  711. }
  712. ],
  713. series: [
  714. {
  715. type: 'liquidFill',
  716. radius: '70%',
  717. center: ['50%', '40%'],
  718. color: [
  719. {
  720. type: 'linear',
  721. x: 0,
  722. y: 0,
  723. x2: 0,
  724. y2: 1,
  725. colorStops: [
  726. {
  727. offset: 0,
  728. color: '#446bf5',
  729. },
  730. {
  731. offset: 1,
  732. color: '#2ca3e2',
  733. },
  734. ],
  735. globalCoord: false,
  736. },
  737. ],
  738. data: [value, value], // data个数代表波浪数
  739. backgroundStyle: {
  740. borderWidth: 1,
  741. color: 'RGBA(51, 66, 127, 0.7)',
  742. },
  743. label: {
  744. normal: {
  745. formatter: function (data) {
  746. return (data.value * 100).toFixed(2) + '%'
  747. },
  748. textStyle: {
  749. fontSize: 30,
  750. color: '#fff',
  751. },
  752. },
  753. },
  754. outline: {
  755. // show: false
  756. borderDistance: 0,
  757. itemStyle: {
  758. borderWidth: 2,
  759. borderColor: 'transparent',
  760. },
  761. },
  762. },
  763. ],
  764. }
  765. myChart.setOption(option)
  766. },
  767. initChartL1 () {
  768. let myChart = echarts.init(this.$refs['echartL1'])
  769. var value = left2[0];
  770. let option = {
  771. backgroundColor: 'transparent',
  772. title: [
  773. {
  774. // text: '总额度285.48亿',
  775. // formatter: `<span>总额度</span>285.48亿`,
  776. x: '37%',
  777. y: '80%',
  778. textStyle: {
  779. fontSize: 24,
  780. fontWeight: 'bold',
  781. color: '#2CB7E0',
  782. lineHeight: 16,
  783. textAlign: 'center',
  784. },
  785. }
  786. ],
  787. series: [
  788. {
  789. type: 'liquidFill',
  790. radius: '70%',
  791. center: ['50%', '40%'],
  792. color: [
  793. {
  794. type: 'linear',
  795. x: 0,
  796. y: 0,
  797. x2: 0,
  798. y2: 1,
  799. colorStops: [
  800. {
  801. offset: 0,
  802. color: '#446bf5',
  803. },
  804. {
  805. offset: 1,
  806. color: '#2ca3e2',
  807. },
  808. ],
  809. globalCoord: false,
  810. },
  811. ],
  812. data: [value, value], // data个数代表波浪数
  813. backgroundStyle: {
  814. borderWidth: 1,
  815. color: 'RGBA(51, 66, 127, 0.7)',
  816. },
  817. label: {
  818. normal: {
  819. formatter: function (data) {
  820. return (data.value * 100).toFixed(2) + '%'
  821. },
  822. textStyle: {
  823. fontSize: 30,
  824. color: '#fff',
  825. },
  826. },
  827. },
  828. outline: {
  829. // show: false
  830. borderDistance: 0,
  831. itemStyle: {
  832. borderWidth: 2,
  833. borderColor: 'transparent',
  834. },
  835. },
  836. },
  837. ],
  838. }
  839. myChart.setOption(option)
  840. },
  841. initChartL2 () {
  842. var chartData = left5
  843. var timer = null;
  844. var i = 0;
  845. let that = this
  846. var option = {
  847. colors: ['#5783ab', '#1a5389', '#a79c57', '#cc8c29', '#91a65f', '#383062', '#034a39'],
  848. chart: {
  849. type: 'pie',
  850. backgroundColor: 'rgba(0,0,0,0)',
  851. options3d: {
  852. enabled: true,
  853. alpha: 45,
  854. //beta: 0
  855. },
  856. events: {
  857. // load,图表加载完成时触发
  858. load: function () {
  859. var chart = this;
  860. var points = chart.series[0].points;
  861. var len = points.length;
  862. timer && clearInterval(timer);
  863. timer = setInterval(function () {
  864. autoTooltip(points[i]);
  865. chartData.forEach((item, index) => {
  866. item.sliced = false
  867. item.selected = false
  868. if (index == i) {
  869. item.sliced = true
  870. item.selected = true
  871. }
  872. })
  873. chart.update({
  874. series: [{
  875. type: 'pie',
  876. name: '占比',
  877. point: {
  878. events: {
  879. click: function (e) {
  880. that.showChartLTipDouble(e.point.name)
  881. }
  882. }
  883. },
  884. data: chartData
  885. }]
  886. })
  887. i++;
  888. if (i === len) {
  889. i = 0;
  890. chartData.forEach((item, index) => {
  891. item.sliced = false
  892. item.selected = false
  893. })
  894. chart.update({
  895. series: [{
  896. type: 'pie',
  897. name: '占比',
  898. point: {
  899. events: {
  900. click: function (e) {
  901. console.log(e)
  902. }
  903. }
  904. },
  905. data: chartData
  906. }]
  907. })
  908. }
  909. }, 2000);
  910. },
  911. legendItemClick: function (event) {
  912. console.log(event);
  913. return true;
  914. }
  915. }
  916. },
  917. credits: {
  918. enabled: false //去掉hightchats水印
  919. },
  920. legend: {
  921. // labelFormatter: function() {
  922. // return 123;
  923. // },
  924. align: 'right',//横向位置
  925. verticalAlign: 'middle', // 纵向位置
  926. layout: "vertical",//横排还是竖排
  927. x: -30,
  928. y: 50,
  929. symbolWidth: 50,
  930. itemStyle: {
  931. fontSize: '20px',
  932. color: '#fff',
  933. x: 20
  934. },
  935. },
  936. title: {
  937. text: '主辅业计划占比',
  938. style: {
  939. color: '#fff',
  940. fontSize: 22,
  941. },
  942. align: 'center',
  943. verticalAlign: "bottom",
  944. x: -80
  945. },
  946. tooltip: {
  947. crosshairs: false,
  948. backgroundColor: 'rgba(0,0,0,0.5)',
  949. // positioner: function(e){
  950. // console.log(e, this)
  951. // },
  952. useHTML: false, //开启html模式
  953. style: {
  954. color: '#fff',
  955. fontSize: '20'
  956. },
  957. formatter: function (e) {
  958. let num = chartData[this.colorIndex].num
  959. this.percentage = this.percentage.toFixed(2) //Math.round(this.percentage)
  960. return `${this.key}:<b>${this.percentage}%</b><br/><b>${this.y}</b>亿,<b>${num}个</b>`
  961. },
  962. //pointFormat:
  963. },
  964. plotOptions: {
  965. pie: {
  966. allowPointSelect: true,
  967. showInLegend: true, // 图例
  968. cursor: 'pointer',
  969. size: 220,
  970. innerSize: 150, //环形图中间空白,0为饼图
  971. depth: 25, //立体高度
  972. slicedOffset: 21, //动画距离
  973. dataLabels: {
  974. enabled: false, // 是否展示指示线
  975. format: '{point.name}: {point.percentage}'
  976. }
  977. },
  978. },
  979. series: [{
  980. type: 'pie',
  981. name: '占比',
  982. // center: ['70%', '50%'],
  983. point: {
  984. events: {
  985. click: function (e) { //点击事件
  986. that.showChartLTipDouble(e.point.name)
  987. },
  988. mouseOver: function (e) { //鼠标移入停止轮播并且找到移入的当前数据设为选中
  989. //console.log(e)
  990. chartData.forEach((item, index) => {
  991. item.sliced = false
  992. item.selected = false
  993. })
  994. chartData[e.target.index].sliced = true
  995. chartData[e.target.index].selected = true
  996. chart.update({
  997. series: [{
  998. type: 'pie',
  999. name: '占比',
  1000. point: {
  1001. events: {
  1002. click: function (e) {
  1003. that.showChartLTipDouble(e.point.name)
  1004. }
  1005. }
  1006. },
  1007. data: chartData
  1008. }]
  1009. })
  1010. timer && clearInterval(timer);
  1011. },
  1012. mouseOut: function () { // 鼠标移出后需要继续执行轮播
  1013. var points = chart.series[0].points;
  1014. var len = points.length;
  1015. timer && clearInterval(timer);
  1016. timer = setInterval(function () {
  1017. autoTooltip(points[i]);
  1018. chartData.forEach((item, index) => {
  1019. item.sliced = false
  1020. item.selected = false
  1021. if (index == i) {
  1022. item.sliced = true
  1023. item.selected = true
  1024. }
  1025. })
  1026. chart.update({
  1027. series: [{
  1028. type: 'pie',
  1029. name: '占比',
  1030. point: {
  1031. events: {
  1032. click: function (e) {
  1033. that.showChartLTipDouble(e.point.name)
  1034. }
  1035. }
  1036. },
  1037. data: chartData
  1038. }]
  1039. })
  1040. i++;
  1041. if (i === len) {
  1042. i = 0;
  1043. chartData.forEach((item, index) => {
  1044. item.sliced = false
  1045. item.selected = false
  1046. })
  1047. chart.update({
  1048. series: [{
  1049. type: 'pie',
  1050. name: '占比',
  1051. point: {
  1052. events: {
  1053. click: function (e) {
  1054. that.showTip3 = true
  1055. that.showChartLTipDouble(e.point.name)
  1056. }
  1057. }
  1058. },
  1059. data: chartData
  1060. }]
  1061. })
  1062. }
  1063. }, 2000);
  1064. }
  1065. }
  1066. },
  1067. data: chartData
  1068. }]
  1069. }
  1070. var chart = Highcharts.chart('echartL2', option);
  1071. function autoTooltip (point) {
  1072. chart.tooltip.refresh(point);
  1073. }
  1074. },
  1075. initChartL3 () {
  1076. var chartData = left6
  1077. var timer = null;
  1078. var i = 0;
  1079. let that = this
  1080. var chart = Highcharts.chart('echartL3', {
  1081. colors: ['#5783ab', '#1a5389', '#a79c57', '#cc8c29', '#91a65f', '#383062', '#034a39'],
  1082. chart: {
  1083. type: 'pie',
  1084. backgroundColor: 'rgba(0,0,0,0)',
  1085. options3d: {
  1086. enabled: true,
  1087. alpha: 45,
  1088. //beta: 0
  1089. },
  1090. events: {
  1091. // load,图表加载完成时触发
  1092. load: function () {
  1093. var chart = this;
  1094. var points = chart.series[0].points;
  1095. var len = points.length;
  1096. timer && clearInterval(timer);
  1097. timer = setInterval(function () {
  1098. autoTooltip(points[i]);
  1099. chartData.forEach((item, index) => {
  1100. item.sliced = false
  1101. item.selected = false
  1102. if (index == i) {
  1103. item.sliced = true
  1104. item.selected = true
  1105. }
  1106. })
  1107. chart.update({
  1108. series: [{
  1109. type: 'pie',
  1110. name: '占比',
  1111. point: {
  1112. events: {
  1113. click: function (e) {
  1114. that.showChartLTipDouble(e.point.name)
  1115. }
  1116. }
  1117. },
  1118. data: chartData
  1119. }]
  1120. })
  1121. i++;
  1122. if (i === len) {
  1123. i = 0;
  1124. chartData.forEach((item, index) => {
  1125. item.sliced = false
  1126. item.selected = false
  1127. })
  1128. chart.update({
  1129. series: [{
  1130. type: 'pie',
  1131. name: '占比',
  1132. point: {
  1133. events: {
  1134. click: function (e) {
  1135. console.log(e)
  1136. }
  1137. }
  1138. },
  1139. data: chartData
  1140. }]
  1141. })
  1142. }
  1143. }, 2000);
  1144. },
  1145. legendItemClick: function (event) {
  1146. that.showChartLTipDouble(e.point.name)
  1147. return true;
  1148. }
  1149. }
  1150. },
  1151. credits: {
  1152. enabled: false //去掉hightchats水印
  1153. },
  1154. legend: {
  1155. // labelFormatter: function() {
  1156. // return 123;
  1157. // },
  1158. align: 'right',//横向位置
  1159. verticalAlign: 'middle', // 纵向位置
  1160. layout: "vertical",//横排还是竖排
  1161. x: -30,
  1162. y: 50,
  1163. symbolWidth: 50,
  1164. itemDistance: 50,
  1165. itemStyle: {
  1166. fontSize: '20px',
  1167. color: '#fff',
  1168. x: 20
  1169. },
  1170. },
  1171. title: {
  1172. text: '项目管理类型',
  1173. style: {
  1174. color: '#fff',
  1175. fontSize: 22,
  1176. },
  1177. align: 'center',
  1178. verticalAlign: "bottom",
  1179. x: -120
  1180. },
  1181. tooltip: {
  1182. crosshairs: true,
  1183. backgroundColor: 'rgba(0,0,0,0.5)',
  1184. // positioner: function(e){
  1185. // console.log(e, this)
  1186. // },
  1187. useHTML: false, //开启html模式
  1188. style: {
  1189. color: '#fff',
  1190. fontSize: '20'
  1191. },
  1192. formatter: function (e) {
  1193. //console.log(this)
  1194. let num = chartData[this.colorIndex].num
  1195. this.percentage = this.percentage.toFixed(2) //Math.round(this.percentage)
  1196. return `${this.key}:<b>${this.percentage}%</b><br/><b>${this.y}</b>亿,<b>${num}个</b>`
  1197. },
  1198. //pointFormat:
  1199. },
  1200. plotOptions: {
  1201. pie: {
  1202. allowPointSelect: true,
  1203. showInLegend: true, // 图例
  1204. cursor: 'pointer',
  1205. size: 220,
  1206. innerSize: 150, //环形图中间空白,0为饼图
  1207. depth: 25, //立体高度
  1208. slicedOffset: 21, //动画距离
  1209. dataLabels: {
  1210. enabled: false, // 是否展示指示线
  1211. format: '{point.name}: {point.percentage}'
  1212. }
  1213. },
  1214. },
  1215. series: [{
  1216. type: 'pie',
  1217. name: '占比',
  1218. // center: ['70%', '50%'],
  1219. point: {
  1220. events: {
  1221. click: function (e) { //点击事件
  1222. that.showChartLTipDouble(e.point.name)
  1223. },
  1224. mouseOver: function (e) { //鼠标移入停止轮播并且找到移入的当前数据设为选中
  1225. //console.log(e)
  1226. chartData.forEach((item, index) => {
  1227. item.sliced = false
  1228. item.selected = false
  1229. })
  1230. chartData[e.target.index].sliced = true
  1231. chartData[e.target.index].selected = true
  1232. chart.update({
  1233. series: [{
  1234. type: 'pie',
  1235. name: '占比',
  1236. point: {
  1237. events: {
  1238. click: function (e) {
  1239. that.showChartLTipDouble(e.point.name)
  1240. }
  1241. }
  1242. },
  1243. data: chartData
  1244. }]
  1245. })
  1246. timer && clearInterval(timer);
  1247. },
  1248. mouseOut: function () { // 鼠标移出后需要继续执行轮播
  1249. var points = chart.series[0].points;
  1250. var len = points.length;
  1251. timer && clearInterval(timer);
  1252. timer = setInterval(function () {
  1253. autoTooltip(points[i]);
  1254. chartData.forEach((item, index) => {
  1255. item.sliced = false
  1256. item.selected = false
  1257. if (index == i) {
  1258. item.sliced = true
  1259. item.selected = true
  1260. }
  1261. })
  1262. chart.update({
  1263. series: [{
  1264. type: 'pie',
  1265. name: '占比',
  1266. point: {
  1267. events: {
  1268. click: function (e) {
  1269. that.showChartLTipDouble(e.point.name)
  1270. }
  1271. }
  1272. },
  1273. data: chartData
  1274. }]
  1275. })
  1276. i++;
  1277. if (i === len) {
  1278. i = 0;
  1279. chartData.forEach((item, index) => {
  1280. item.sliced = false
  1281. item.selected = false
  1282. })
  1283. chart.update({
  1284. series: [{
  1285. type: 'pie',
  1286. name: '占比',
  1287. point: {
  1288. events: {
  1289. click: function (e) {
  1290. console.log(e)
  1291. }
  1292. }
  1293. },
  1294. data: chartData
  1295. }]
  1296. })
  1297. }
  1298. }, 2000);
  1299. }
  1300. }
  1301. },
  1302. data: chartData
  1303. }]
  1304. });
  1305. function autoTooltip (point) {
  1306. chart.tooltip.refresh(point);
  1307. }
  1308. },
  1309. initChartL4 () {
  1310. let myChart = echarts.init(document.getElementById("echartL4"));
  1311. let option = {
  1312. grid: {
  1313. top: 45,
  1314. right: 0,
  1315. left: 60,
  1316. bottom: 60,
  1317. },
  1318. tooltip: {
  1319. show: true,
  1320. trigger: "axis",
  1321. axisPointer: {
  1322. // 坐标轴指示器,坐标轴触发有效
  1323. type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
  1324. },
  1325. textStyle: {
  1326. color: '#FFF', // 文字的颜色
  1327. fontSize: '20', // 文字字体大小
  1328. },
  1329. },
  1330. xAxis: {
  1331. data: commonCompany,
  1332. axisTick: {
  1333. show: false,
  1334. },
  1335. // x轴的字体颜色
  1336. axisLabel: {
  1337. rotate: 40,
  1338. textStyle: {
  1339. color: "white",
  1340. fontSize: '15'
  1341. },
  1342. },
  1343. //y轴线的颜色以及宽度
  1344. axisLine: {
  1345. show: true,
  1346. lineStyle: {
  1347. color: "#1E5389",
  1348. width: 1,
  1349. type: "solid",
  1350. },
  1351. },
  1352. },
  1353. yAxis: {
  1354. name: '亿元',
  1355. nameTextStyle: {//y轴上方单位的颜色
  1356. color: '#fff',
  1357. },
  1358. axisTick: {
  1359. lineStyle: {
  1360. color: "#18416F",
  1361. },
  1362. },
  1363. // y轴的字体颜色
  1364. axisLabel: {
  1365. textStyle: {
  1366. color: "white",
  1367. fontSize: '15'
  1368. },
  1369. },
  1370. splitLine: {
  1371. show: true,
  1372. lineStyle: {
  1373. color: "#204561",
  1374. width: 1,
  1375. type: "dotted",
  1376. },
  1377. },
  1378. //y轴线的颜色以及宽度
  1379. axisLine: {
  1380. show: true,
  1381. lineStyle: {
  1382. color: "#1E5389",
  1383. width: 1,
  1384. type: "solid",
  1385. },
  1386. },
  1387. nameTextStyle: {
  1388. color: '#fff',
  1389. fontSize: 15,
  1390. },
  1391. },
  1392. series: [
  1393. {
  1394. name: "2023年额度",
  1395. type: "bar",
  1396. data: left3[0],
  1397. showBackground: false,
  1398. backgroundStyle: {
  1399. color: "#18416F",
  1400. },
  1401. barWidth: "30%",
  1402. itemStyle: {
  1403. // barBorderRadius: [10, 10, 0, 0],
  1404. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  1405. {
  1406. offset: 0,
  1407. color: '#082550',
  1408. },
  1409. {
  1410. offset: 1,
  1411. color: '#957DFF',
  1412. },
  1413. ]),
  1414. },
  1415. },
  1416. ],
  1417. legend: {
  1418. // data: ["2022年额度", "2023年额度"],
  1419. data: ["2023年额度"],
  1420. textStyle: {
  1421. // 图列内容样式
  1422. color: "#fff", // 字体颜色
  1423. fontSize: "20",
  1424. },
  1425. right: 'center',
  1426. y: 5,
  1427. icon: "roundRect",
  1428. // 小图标的宽高
  1429. itemHeight: 5,
  1430. },
  1431. };
  1432. tools.loopShowTooltip(myChart, option, {
  1433. nterval: 2000,
  1434. loopSeries: true,
  1435. })
  1436. let that = this
  1437. myChart.on('click', function (param) {
  1438. that.titleName = param.name
  1439. that.echartEnterpriseShow = true
  1440. setTimeout(() => {
  1441. that.initChartBall()
  1442. });
  1443. })
  1444. myChart.setOption(option);
  1445. },
  1446. initChartL5 () {
  1447. var chartData = left7
  1448. var timer = null;
  1449. var i = 0;
  1450. let that = this
  1451. var option = {
  1452. colors: ['#5783ab', '#1a5389', '#a79c57', '#cc8c29', '#91a65f', '#383062', '#034a39'],
  1453. chart: {
  1454. type: 'pie',
  1455. backgroundColor: 'rgba(0,0,0,0)',
  1456. options3d: {
  1457. enabled: true,
  1458. alpha: 45,
  1459. //beta: 0
  1460. },
  1461. events: {
  1462. // load,图表加载完成时触发
  1463. load: function () {
  1464. var chart = this;
  1465. var points = chart.series[0].points;
  1466. var len = points.length;
  1467. timer && clearInterval(timer);
  1468. timer = setInterval(function () {
  1469. autoTooltip(points[i]);
  1470. chartData.forEach((item, index) => {
  1471. item.sliced = false
  1472. item.selected = false
  1473. if (index == i) {
  1474. item.sliced = true
  1475. item.selected = true
  1476. }
  1477. })
  1478. chart.update({
  1479. series: [{
  1480. type: 'pie',
  1481. name: '占比',
  1482. point: {
  1483. events: {
  1484. click: function (e) {
  1485. that.showChartLTipDouble(e.point.name)
  1486. }
  1487. }
  1488. },
  1489. data: chartData
  1490. }]
  1491. })
  1492. i++;
  1493. if (i === len) {
  1494. i = 0;
  1495. }
  1496. }, 2000);
  1497. },
  1498. legendItemClick: function (event) {
  1499. console.log(event);
  1500. return true;
  1501. }
  1502. }
  1503. },
  1504. credits: {
  1505. enabled: false //去掉hightchats水印
  1506. },
  1507. legend: {
  1508. // labelFormatter: function() {
  1509. // return 123;
  1510. // },
  1511. align: 'right',//横向位置
  1512. verticalAlign: 'middle', // 纵向位置
  1513. layout: "vertical",//横排还是竖排
  1514. x: -30,
  1515. y: 50,
  1516. symbolWidth: 50,
  1517. itemDistance: 50,
  1518. itemStyle: {
  1519. fontSize: '20px',
  1520. color: '#fff',
  1521. x: 20
  1522. },
  1523. },
  1524. title: {
  1525. text: '传统产业分析',
  1526. style: {
  1527. color: '#fff',
  1528. fontSize: 22,
  1529. },
  1530. align: 'center',
  1531. verticalAlign: "bottom",
  1532. x: -120
  1533. },
  1534. tooltip: {
  1535. crosshairs: true,
  1536. backgroundColor: 'rgba(0,0,0,0.5)',
  1537. // positioner: function(e){
  1538. // console.log(e, this)
  1539. // },
  1540. useHTML: false, //开启html模式
  1541. style: {
  1542. color: '#fff',
  1543. fontSize: '20'
  1544. },
  1545. formatter: function (e) {
  1546. //console.log(this)
  1547. let num = chartData[this.colorIndex].num
  1548. this.percentage = this.percentage.toFixed(2) //Math.round(this.percentage)
  1549. return `${this.key}:<b>${this.percentage}%</b><br/><b>${this.y}</b>亿,<b>${num}个</b>`
  1550. },
  1551. //pointFormat:
  1552. },
  1553. plotOptions: {
  1554. pie: {
  1555. allowPointSelect: true,
  1556. showInLegend: true, // 图例
  1557. cursor: 'pointer',
  1558. size: 220,
  1559. innerSize: 150, //环形图中间空白,0为饼图
  1560. depth: 25, //立体高度
  1561. slicedOffset: 21, //动画距离
  1562. dataLabels: {
  1563. enabled: false, // 是否展示指示线
  1564. format: '{point.name}: {point.percentage}'
  1565. }
  1566. },
  1567. },
  1568. series: [{
  1569. type: 'pie',
  1570. name: '占比',
  1571. //center: ['35%','50%'],
  1572. point: {
  1573. events: {
  1574. click: function (e) { //点击事件
  1575. that.showChartLTipDouble(e.point.name)
  1576. },
  1577. mouseOver: function (e) { //鼠标移入停止轮播并且找到移入的当前数据设为选中
  1578. //console.log(e)
  1579. chartData.forEach((item, index) => {
  1580. item.sliced = false
  1581. item.selected = false
  1582. })
  1583. chartData[e.target.index].sliced = true
  1584. chartData[e.target.index].selected = true
  1585. chart.update({
  1586. series: [{
  1587. type: 'pie',
  1588. name: '占比',
  1589. point: {
  1590. events: {
  1591. click: function (e) {
  1592. that.showChartLTipDouble(e.point.name)
  1593. }
  1594. }
  1595. },
  1596. data: chartData
  1597. }]
  1598. })
  1599. timer && clearInterval(timer);
  1600. },
  1601. mouseOut: function () { // 鼠标移出后需要继续执行轮播
  1602. var points = chart.series[0].points;
  1603. var len = points.length;
  1604. timer && clearInterval(timer);
  1605. timer = setInterval(function () {
  1606. autoTooltip(points[i]);
  1607. chartData.forEach((item, index) => {
  1608. item.sliced = false
  1609. item.selected = false
  1610. if (index == i) {
  1611. item.sliced = true
  1612. item.selected = true
  1613. }
  1614. })
  1615. chart.update({
  1616. series: [{
  1617. type: 'pie',
  1618. name: '占比',
  1619. point: {
  1620. events: {
  1621. click: function (e) {
  1622. that.showChartLTipDouble(e.point.name)
  1623. }
  1624. }
  1625. },
  1626. data: chartData
  1627. }]
  1628. })
  1629. i++;
  1630. if (i === len) {
  1631. i = 0;
  1632. }
  1633. }, 2000);
  1634. }
  1635. }
  1636. },
  1637. data: chartData
  1638. }]
  1639. }
  1640. var chart = Highcharts.chart('echartL5', option);
  1641. function autoTooltip (point) {
  1642. chart.tooltip.refresh(point);
  1643. }
  1644. },
  1645. initChartL6 () {
  1646. var chartData = left8
  1647. var timer = null;
  1648. var i = 0;
  1649. let that = this
  1650. var option = {
  1651. colors: ['#5783ab', '#1a5389', '#a79c57', '#cc8c29', '#91a65f', '#383062', '#034a39', '#5783ab'],
  1652. chart: {
  1653. type: 'pie',
  1654. backgroundColor: 'rgba(0,0,0,0)',
  1655. options3d: {
  1656. enabled: true,
  1657. alpha: 45,
  1658. //beta: 0
  1659. },
  1660. events: {
  1661. // load,图表加载完成时触发
  1662. load: function () {
  1663. var chart = this;
  1664. var points = chart.series[0].points;
  1665. var len = points.length;
  1666. timer && clearInterval(timer);
  1667. timer = setInterval(function () {
  1668. autoTooltip(points[i]);
  1669. chartData.forEach((item, index) => {
  1670. item.sliced = false
  1671. item.selected = false
  1672. if (index == i) {
  1673. item.sliced = true
  1674. item.selected = true
  1675. }
  1676. })
  1677. chart.update({
  1678. series: [{
  1679. type: 'pie',
  1680. name: '占比',
  1681. point: {
  1682. events: {
  1683. click: function (e) {
  1684. that.showChartLTipDouble(e.point.name)
  1685. }
  1686. }
  1687. },
  1688. data: chartData
  1689. }]
  1690. })
  1691. i++;
  1692. if (i === len) {
  1693. i = 0;
  1694. }
  1695. }, 2000);
  1696. },
  1697. legendItemClick: function (event) {
  1698. console.log(event);
  1699. return true;
  1700. }
  1701. }
  1702. },
  1703. credits: {
  1704. enabled: false //去掉hightchats水印
  1705. },
  1706. legend: {
  1707. // labelFormatter: function() {
  1708. // return 123;
  1709. // },
  1710. align: 'right',//横向位置
  1711. verticalAlign: 'middle', // 纵向位置
  1712. layout: "vertical",//横排还是竖排
  1713. x: -30,
  1714. y: 30,
  1715. symbolWidth: 50,
  1716. itemDistance: 50,
  1717. itemStyle: {
  1718. fontSize: '20px',
  1719. color: '#fff',
  1720. x: 20
  1721. },
  1722. },
  1723. title: {
  1724. text: '战略性新兴产业',
  1725. style: {
  1726. color: '#fff',
  1727. fontSize: 22,
  1728. },
  1729. align: 'center',
  1730. verticalAlign: "bottom",
  1731. x: -120
  1732. },
  1733. tooltip: {
  1734. crosshairs: true,
  1735. backgroundColor: 'rgba(0,0,0,0.5)',
  1736. // positioner: function(e){
  1737. // console.log(e, this)
  1738. // },
  1739. useHTML: false, //开启html模式
  1740. style: {
  1741. color: '#fff',
  1742. fontSize: '20'
  1743. },
  1744. formatter: function (e) {
  1745. //console.log(this)
  1746. let num = chartData[this.colorIndex].num
  1747. this.percentage = this.percentage.toFixed(2) //Math.round(this.percentage)
  1748. return `${this.key}:<b>${this.percentage}%</b><br/><b>${this.y}</b>亿,<b>${num}个</b>`
  1749. },
  1750. //pointFormat:
  1751. },
  1752. plotOptions: {
  1753. pie: {
  1754. allowPointSelect: true,
  1755. showInLegend: true, // 图例
  1756. cursor: 'pointer',
  1757. size: 220,
  1758. innerSize: 150, //环形图中间空白,0为饼图
  1759. depth: 25, //立体高度
  1760. slicedOffset: 21, //动画距离
  1761. dataLabels: {
  1762. enabled: false, // 是否展示指示线
  1763. format: '{point.name}: {point.percentage}'
  1764. }
  1765. },
  1766. },
  1767. series: [{
  1768. type: 'pie',
  1769. name: '占比',
  1770. //center: ['35%','50%'],
  1771. point: {
  1772. events: {
  1773. click: function (e) { //点击事件
  1774. that.showChartLTipDouble(e.point.name)
  1775. },
  1776. mouseOver: function (e) { //鼠标移入停止轮播并且找到移入的当前数据设为选中
  1777. //console.log(e)
  1778. chartData.forEach((item, index) => {
  1779. item.sliced = false
  1780. item.selected = false
  1781. })
  1782. chartData[e.target.index].sliced = true
  1783. chartData[e.target.index].selected = true
  1784. chart.update({
  1785. series: [{
  1786. type: 'pie',
  1787. name: '占比',
  1788. point: {
  1789. events: {
  1790. click: function (e) {
  1791. that.showChartLTipDouble(e.point.name)
  1792. }
  1793. }
  1794. },
  1795. data: chartData
  1796. }]
  1797. })
  1798. timer && clearInterval(timer);
  1799. },
  1800. mouseOut: function () { // 鼠标移出后需要继续执行轮播
  1801. var points = chart.series[0].points;
  1802. var len = points.length;
  1803. timer && clearInterval(timer);
  1804. timer = setInterval(function () {
  1805. autoTooltip(points[i]);
  1806. chartData.forEach((item, index) => {
  1807. item.sliced = false
  1808. item.selected = false
  1809. if (index == i) {
  1810. item.sliced = true
  1811. item.selected = true
  1812. }
  1813. })
  1814. chart.update({
  1815. series: [{
  1816. type: 'pie',
  1817. name: '占比',
  1818. point: {
  1819. events: {
  1820. click: function (e) {
  1821. that.showChartLTipDouble(e.point.name)
  1822. }
  1823. }
  1824. },
  1825. data: chartData
  1826. }]
  1827. })
  1828. i++;
  1829. if (i === len) {
  1830. i = 0;
  1831. }
  1832. }, 2000);
  1833. }
  1834. }
  1835. },
  1836. data: chartData
  1837. }]
  1838. }
  1839. var chart = Highcharts.chart('echartL6', option);
  1840. function autoTooltip (point) {
  1841. chart.tooltip.refresh(point);
  1842. }
  1843. },
  1844. initChartL7 () {
  1845. var chartData = left9
  1846. var timer = null;
  1847. var i = 0;
  1848. let that = this
  1849. var option = {
  1850. colors: ['#5783ab', '#1a5389', '#a79c57', '#cc8c29', '#91a65f', '#383062', '#034a39'],
  1851. chart: {
  1852. type: 'pie',
  1853. backgroundColor: 'rgba(0,0,0,0)',
  1854. options3d: {
  1855. enabled: true,
  1856. alpha: 45,
  1857. //beta: 0
  1858. },
  1859. events: {
  1860. // load,图表加载完成时触发
  1861. load: function () {
  1862. var chart = this;
  1863. var points = chart.series[0].points;
  1864. var len = points.length;
  1865. timer && clearInterval(timer);
  1866. timer = setInterval(function () {
  1867. autoTooltip(points[i]);
  1868. chartData.forEach((item, index) => {
  1869. item.sliced = false
  1870. item.selected = false
  1871. if (index == i) {
  1872. item.sliced = true
  1873. item.selected = true
  1874. }
  1875. })
  1876. chart.update({
  1877. series: [{
  1878. type: 'pie',
  1879. name: '占比',
  1880. point: {
  1881. events: {
  1882. click: function (e) {
  1883. that.showChartLTipDouble(e.point.name)
  1884. }
  1885. }
  1886. },
  1887. data: chartData
  1888. }]
  1889. })
  1890. i++;
  1891. if (i === len) {
  1892. i = 0;
  1893. }
  1894. }, 2000);
  1895. },
  1896. legendItemClick: function (event) {
  1897. console.log(event);
  1898. return true;
  1899. }
  1900. }
  1901. },
  1902. credits: {
  1903. enabled: false //去掉hightchats水印
  1904. },
  1905. title: {
  1906. text: '特色优势产业',
  1907. style: {
  1908. color: '#fff',
  1909. fontSize: 22,
  1910. },
  1911. align: 'center',
  1912. verticalAlign: "bottom",
  1913. x: -120
  1914. },
  1915. legend: {
  1916. // labelFormatter: function() {
  1917. // return 123;
  1918. // },
  1919. align: 'right',//横向位置
  1920. verticalAlign: 'middle', // 纵向位置
  1921. layout: "vertical",//横排还是竖排
  1922. x: -50,
  1923. y: 30,
  1924. symbolWidth: 50,
  1925. itemDistance: 50,
  1926. itemStyle: {
  1927. fontSize: '20px',
  1928. color: '#fff',
  1929. x: 20
  1930. },
  1931. },
  1932. tooltip: {
  1933. crosshairs: true,
  1934. backgroundColor: 'rgba(0,0,0,0.5)',
  1935. // positioner: function(e){
  1936. // console.log(e, this)
  1937. // },
  1938. useHTML: false, //开启html模式
  1939. style: {
  1940. color: '#fff',
  1941. fontSize: '20'
  1942. },
  1943. formatter: function (e) {
  1944. //console.log(this)
  1945. let num = chartData[this.colorIndex].num
  1946. this.percentage = this.percentage.toFixed(2) //Math.round(this.percentage)
  1947. return `${this.key}:<b>${this.percentage}%</b><br/><b>${this.y}</b>亿,<b>${num}个</b>`
  1948. },
  1949. //pointFormat:
  1950. },
  1951. plotOptions: {
  1952. pie: {
  1953. allowPointSelect: true,
  1954. showInLegend: true, // 图例
  1955. cursor: 'pointer',
  1956. size: 220,
  1957. innerSize: 150, //环形图中间空白,0为饼图
  1958. depth: 25, //立体高度
  1959. slicedOffset: 21, //动画距离
  1960. dataLabels: {
  1961. enabled: false, // 是否展示指示线
  1962. format: '{point.name}: {point.percentage}'
  1963. }
  1964. },
  1965. },
  1966. series: [{
  1967. type: 'pie',
  1968. name: '占比',
  1969. //center: ['35%','50%'],
  1970. point: {
  1971. events: {
  1972. click: function (e) { //点击事件
  1973. that.showChartLTipDouble(e.point.name)
  1974. },
  1975. mouseOver: function (e) { //鼠标移入停止轮播并且找到移入的当前数据设为选中
  1976. //console.log(e)
  1977. chartData.forEach((item, index) => {
  1978. item.sliced = false
  1979. item.selected = false
  1980. })
  1981. chartData[e.target.index].sliced = true
  1982. chartData[e.target.index].selected = true
  1983. chart.update({
  1984. series: [{
  1985. type: 'pie',
  1986. name: '占比',
  1987. point: {
  1988. events: {
  1989. click: function (e) {
  1990. that.showChartLTipDouble(e.point.name)
  1991. }
  1992. }
  1993. },
  1994. data: chartData
  1995. }]
  1996. })
  1997. timer && clearInterval(timer);
  1998. },
  1999. mouseOut: function () { // 鼠标移出后需要继续执行轮播
  2000. var points = chart.series[0].points;
  2001. var len = points.length;
  2002. timer && clearInterval(timer);
  2003. timer = setInterval(function () {
  2004. autoTooltip(points[i]);
  2005. chartData.forEach((item, index) => {
  2006. item.sliced = false
  2007. item.selected = false
  2008. if (index == i) {
  2009. item.sliced = true
  2010. item.selected = true
  2011. }
  2012. })
  2013. chart.update({
  2014. series: [{
  2015. type: 'pie',
  2016. name: '占比',
  2017. point: {
  2018. events: {
  2019. click: function (e) {
  2020. that.showChartLTipDouble(e.point.name)
  2021. }
  2022. }
  2023. },
  2024. data: chartData
  2025. }]
  2026. })
  2027. i++;
  2028. if (i === len) {
  2029. i = 0;
  2030. }
  2031. }, 2000);
  2032. }
  2033. }
  2034. },
  2035. data: chartData
  2036. }]
  2037. }
  2038. var chart = Highcharts.chart('echartL7', option);
  2039. function autoTooltip (point) {
  2040. chart.tooltip.refresh(point);
  2041. }
  2042. },
  2043. initChartL8 () {
  2044. var chartData = left10
  2045. var timer = null;
  2046. var i = 0;
  2047. let that = this
  2048. var option = {
  2049. colors: ['#5783ab', '#1a5389', '#a79c57', '#cc8c29', '#91a65f', '#383062', '#034a39'],
  2050. chart: {
  2051. type: 'pie',
  2052. backgroundColor: 'rgba(0,0,0,0)',
  2053. options3d: {
  2054. enabled: true,
  2055. alpha: 45,
  2056. //beta: 0
  2057. },
  2058. events: {
  2059. // load,图表加载完成时触发
  2060. load: function () {
  2061. var chart = this;
  2062. var points = chart.series[0].points;
  2063. var len = points.length;
  2064. timer && clearInterval(timer);
  2065. timer = setInterval(function () {
  2066. autoTooltip(points[i]);
  2067. chartData.forEach((item, index) => {
  2068. item.sliced = false
  2069. item.selected = false
  2070. if (index == i) {
  2071. item.sliced = true
  2072. item.selected = true
  2073. }
  2074. })
  2075. chart.update({
  2076. series: [{
  2077. type: 'pie',
  2078. name: '占比',
  2079. point: {
  2080. events: {
  2081. click: function (e) {
  2082. that.showChartLTipDouble(e.point.name)
  2083. }
  2084. }
  2085. },
  2086. data: chartData
  2087. }]
  2088. })
  2089. i++;
  2090. if (i === len) {
  2091. i = 0;
  2092. }
  2093. }, 2000);
  2094. },
  2095. legendItemClick: function (event) {
  2096. console.log(event);
  2097. return true;
  2098. }
  2099. }
  2100. },
  2101. credits: {
  2102. enabled: false //去掉hightchats水印
  2103. },
  2104. title: {
  2105. text: '公共基础等产业',
  2106. style: {
  2107. color: '#fff',
  2108. fontSize: 22,
  2109. },
  2110. align: 'center',
  2111. verticalAlign: "bottom",
  2112. x: -120
  2113. },
  2114. legend: {
  2115. // labelFormatter: function() {
  2116. // return 123;
  2117. // },
  2118. align: 'right',//横向位置
  2119. verticalAlign: 'middle', // 纵向位置
  2120. layout: "vertical",//横排还是竖排
  2121. x: -70,
  2122. y: 50,
  2123. symbolWidth: 50,
  2124. itemDistance: 50,
  2125. itemStyle: {
  2126. fontSize: '20px',
  2127. color: '#fff',
  2128. x: 20
  2129. },
  2130. },
  2131. tooltip: {
  2132. crosshairs: true,
  2133. backgroundColor: 'rgba(0,0,0,0.5)',
  2134. // positioner: function(e){
  2135. // console.log(e, this)
  2136. // },
  2137. useHTML: false, //开启html模式
  2138. style: {
  2139. color: '#fff',
  2140. fontSize: '20'
  2141. },
  2142. formatter: function (e) {
  2143. //console.log(this)
  2144. let num = chartData[this.colorIndex].num
  2145. this.percentage = this.percentage.toFixed(2) //Math.round(this.percentage)
  2146. return `${this.key}:<b>${this.percentage}%</b><br/><b>${this.y}</b>亿,<b>${num}个</b>`
  2147. },
  2148. //pointFormat:
  2149. },
  2150. plotOptions: {
  2151. pie: {
  2152. allowPointSelect: true,
  2153. showInLegend: true, // 图例
  2154. cursor: 'pointer',
  2155. size: 220,
  2156. innerSize: 150, //环形图中间空白,0为饼图
  2157. depth: 25, //立体高度
  2158. slicedOffset: 21, //动画距离
  2159. dataLabels: {
  2160. enabled: false, // 是否展示指示线
  2161. format: '{point.name}: {point.percentage}'
  2162. }
  2163. },
  2164. },
  2165. series: [{
  2166. type: 'pie',
  2167. name: '占比',
  2168. //center: ['35%','50%'],
  2169. point: {
  2170. events: {
  2171. click: function (e) { //点击事件
  2172. that.showChartLTipDouble(e.point.name)
  2173. },
  2174. mouseOver: function (e) { //鼠标移入停止轮播并且找到移入的当前数据设为选中
  2175. //console.log(e)
  2176. chartData.forEach((item, index) => {
  2177. item.sliced = false
  2178. item.selected = false
  2179. })
  2180. chartData[e.target.index].sliced = true
  2181. chartData[e.target.index].selected = true
  2182. chart.update({
  2183. series: [{
  2184. type: 'pie',
  2185. name: '占比',
  2186. point: {
  2187. events: {
  2188. click: function (e) {
  2189. that.showChartLTipDouble(e.point.name)
  2190. }
  2191. }
  2192. },
  2193. data: chartData
  2194. }]
  2195. })
  2196. timer && clearInterval(timer);
  2197. },
  2198. mouseOut: function () { // 鼠标移出后需要继续执行轮播
  2199. var points = chart.series[0].points;
  2200. var len = points.length;
  2201. timer && clearInterval(timer);
  2202. timer = setInterval(function () {
  2203. autoTooltip(points[i]);
  2204. chartData.forEach((item, index) => {
  2205. item.sliced = false
  2206. item.selected = false
  2207. if (index == i) {
  2208. item.sliced = true
  2209. item.selected = true
  2210. }
  2211. })
  2212. chart.update({
  2213. series: [{
  2214. type: 'pie',
  2215. name: '占比',
  2216. point: {
  2217. events: {
  2218. click: function (e) {
  2219. that.showChartLTipDouble(e.point.name)
  2220. }
  2221. }
  2222. },
  2223. data: chartData
  2224. }]
  2225. })
  2226. i++;
  2227. if (i === len) {
  2228. i = 0;
  2229. }
  2230. }, 2000);
  2231. }
  2232. }
  2233. },
  2234. data: chartData
  2235. }]
  2236. }
  2237. var chart = Highcharts.chart('echartL8', option);
  2238. function autoTooltip (point) {
  2239. chart.tooltip.refresh(point);
  2240. }
  2241. },
  2242. initChartL9 () {
  2243. this.chartCarousel = echarts.init(document.getElementById("echartL9"));
  2244. option = {
  2245. tooltip: {
  2246. trigger: 'axis',
  2247. formatter: '指标:' + '{c0}' + '<br/>' + '发展线:' + '{c1}' + '<br/>' + '生存线:' + '{c2}', //+ '<br/>'+ '{a1}:{c1}' + '%',
  2248. axisPointer: {
  2249. type: 'shadow',
  2250. },
  2251. },
  2252. grid: {
  2253. top: '10%',
  2254. right: '5%',
  2255. left: '10%',
  2256. bottom: '10%',
  2257. },
  2258. xAxis: {
  2259. // data: ['总投资收益率', '销售利润率', '成本费用利润率', '总资产周转率', '财务内部收益率'],
  2260. data: left15[this.countType],
  2261. axisLine: {
  2262. show: true, //隐藏X轴轴线
  2263. lineStyle: {
  2264. color: '#005094',
  2265. width: 1,
  2266. },
  2267. },
  2268. axisTick: {
  2269. show: true, //隐藏X轴刻度
  2270. },
  2271. axisLabel: {
  2272. show: true,
  2273. rotate: 15,
  2274. textStyle: {
  2275. color: '#fff', //X轴文字颜色
  2276. fontSize: 15,
  2277. },
  2278. },
  2279. },
  2280. yAxis: [
  2281. {
  2282. type: 'value',
  2283. splitLine: {
  2284. show: true,
  2285. lineStyle: {
  2286. color: '#68b4dd66',
  2287. type: 'dashed',
  2288. },
  2289. },
  2290. axisLine: {
  2291. show: false
  2292. },
  2293. axisLabel: {
  2294. show: true,
  2295. formatter: '{value}',
  2296. textStyle: {
  2297. color: '#fff',
  2298. fontSize: 15
  2299. },
  2300. },
  2301. nameTextStyle: {
  2302. color: '#ebf8ac',
  2303. fontSize: 16,
  2304. },
  2305. },
  2306. ],
  2307. series: [
  2308. {
  2309. name: '实际值',
  2310. type: 'bar',
  2311. barWidth: 15,
  2312. itemStyle: {
  2313. normal: {
  2314. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  2315. {
  2316. offset: 0,
  2317. color: '#69c0ff',
  2318. },
  2319. {
  2320. offset: 1,
  2321. color: '#082550',
  2322. },
  2323. ]),
  2324. },
  2325. },
  2326. // data: [70, 52, 33, 41, 52],
  2327. data: left12[this.count + 1][2]
  2328. // markLine: {
  2329. // symbol: ['none', 'none'],
  2330. // data: [
  2331. // {
  2332. // name: '生存线',
  2333. // yAxis: 10,
  2334. // lineStyle: {
  2335. // color: '#FF8F0A',
  2336. // },
  2337. // label: {
  2338. // formatter: '{b}',
  2339. // position: 'middle',
  2340. // color: '#FF8F0A',
  2341. // fontSize: 12,
  2342. // },
  2343. // },
  2344. // {
  2345. // name: '发展线',
  2346. // yAxis: 15,
  2347. // lineStyle: {
  2348. // color: '#00EEA2',
  2349. // },
  2350. // label: {
  2351. // formatter: '{b}',
  2352. // position: 'middle',
  2353. // color: '#00EEA2',
  2354. // fontSize: 12,
  2355. // },
  2356. // },
  2357. // ],
  2358. // label: {
  2359. // distance: [50, 0],
  2360. // },
  2361. // },
  2362. },
  2363. {
  2364. name: '',
  2365. type: 'line',
  2366. barWidth: 15,
  2367. itemStyle: {
  2368. normal: {
  2369. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  2370. {
  2371. offset: 0,
  2372. color: '#69c0ff',
  2373. },
  2374. {
  2375. offset: 1,
  2376. color: 'green',
  2377. },
  2378. ]),
  2379. },
  2380. },
  2381. // data: [20, 30, 15, 28, 36],
  2382. data: left12[this.count + 1][1]
  2383. },
  2384. {
  2385. name: '',
  2386. type: 'line',
  2387. barWidth: 15,
  2388. itemStyle: {
  2389. normal: {
  2390. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  2391. {
  2392. offset: 0,
  2393. color: '#69c0ff',
  2394. },
  2395. {
  2396. offset: 1,
  2397. color: 'yellow',
  2398. },
  2399. ]),
  2400. },
  2401. },
  2402. // data: [15, 22, 17, 33, 14],
  2403. data: left12[this.count + 1][0]
  2404. },
  2405. ],
  2406. }
  2407. let that = this
  2408. this.chartCarousel.on('click', function (param) {
  2409. that.titleName = param.name
  2410. that.echartSingleTipShow = true
  2411. setTimeout(() => {
  2412. that.initChartLTip()
  2413. });
  2414. })
  2415. this.chartCarousel.setOption(option)
  2416. // tools.loopShowTooltip(myChart, option, {
  2417. // nterval: 2000,
  2418. // loopSeries: true,
  2419. // })
  2420. },
  2421. initChartL10 () {
  2422. let myChart = echarts.init(document.getElementById("echartL10"));
  2423. let option = {
  2424. title: {
  2425. text: '固定资产',
  2426. textStyle: {
  2427. color: '#69C0FF',
  2428. fontSize: 25,
  2429. fontWeight: 500
  2430. },
  2431. top: '20',
  2432. left: '20'
  2433. },
  2434. textStyle: {
  2435. color: '#fff',
  2436. },
  2437. tooltip: {
  2438. trigger: "axis",
  2439. formatter: function (params) {
  2440. 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] + '亿元';
  2441. return tip
  2442. },
  2443. textStyle: {
  2444. color: '#FFF', // 文字的颜色
  2445. fontSize: '20', // 文字字体大小
  2446. },
  2447. axisPointer: {
  2448. lineStyle: {
  2449. type: 'dashed',
  2450. width: 2,
  2451. color: 'rgba(255,255,255,0.6)'
  2452. },
  2453. animation: true
  2454. }
  2455. },
  2456. grid: {
  2457. top: '10%',
  2458. right: '5%',
  2459. left: '15%',
  2460. bottom: '6%',
  2461. },
  2462. yAxis: {
  2463. data: ['备案', '特别监管'],
  2464. splitLine: {
  2465. show: true,
  2466. lineStyle: {
  2467. color: '#68b4dd66',
  2468. type: 'dashed',
  2469. },
  2470. },
  2471. axisLine: {
  2472. show: false
  2473. },
  2474. axisLabel: {
  2475. show: true,
  2476. formatter: '{value}',
  2477. textStyle: {
  2478. color: '#fff',
  2479. fontSize: 15,
  2480. },
  2481. },
  2482. nameTextStyle: {
  2483. color: '#ebf8ac',
  2484. fontSize: 16,
  2485. },
  2486. },
  2487. xAxis: {
  2488. data: ['项目储备', '项目立项', '可研论证', '投资决策'],
  2489. axisLine: {
  2490. show: true, //隐藏X轴轴线
  2491. lineStyle: {
  2492. color: '#005094',
  2493. width: 1,
  2494. },
  2495. },
  2496. axisTick: {
  2497. show: false, //隐藏X轴刻度
  2498. },
  2499. axisLabel: {
  2500. show: true,
  2501. textStyle: {
  2502. color: '#fff', //X轴文字颜色
  2503. fontSize: 15,
  2504. },
  2505. },
  2506. },
  2507. series: [
  2508. {
  2509. name: '特别监管',
  2510. type: 'scatter',
  2511. symbol: 'circle',//'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow'
  2512. symbolSize: function (data) {
  2513. return Math.sqrt(data[2]) * 3;
  2514. },
  2515. label: {
  2516. emphasis: {
  2517. show: true,
  2518. formatter: function (param) {
  2519. return param.data[2];
  2520. },
  2521. position: 'top'
  2522. }
  2523. },
  2524. itemStyle: {
  2525. normal: {
  2526. color: '#40A9FF'
  2527. }
  2528. },
  2529. data: left13[0]
  2530. },
  2531. {
  2532. name: '备案',
  2533. type: 'scatter',
  2534. symbol: 'circle',//'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow'
  2535. symbolSize: function (data) {
  2536. return Math.sqrt(data[2]) * 3;
  2537. },
  2538. label: {
  2539. emphasis: {
  2540. show: true,
  2541. formatter: function (param) {
  2542. return param.data[2];
  2543. },
  2544. position: 'top'
  2545. }
  2546. },
  2547. itemStyle: {
  2548. normal: {
  2549. color: '#45DAD1'
  2550. }
  2551. },
  2552. data: left13[1]
  2553. },
  2554. ]
  2555. }
  2556. let that = this
  2557. myChart.on('click', function (param) {
  2558. that.showChartLTipDouble('固定资产')
  2559. })
  2560. myChart.setOption(option)
  2561. tools.loopShowTooltip(myChart, option, {
  2562. nterval: 2000,
  2563. loopSeries: true,
  2564. })
  2565. },
  2566. initChartL11 () {
  2567. let myChart = echarts.init(document.getElementById("echartL11"));
  2568. let option = {
  2569. title: {
  2570. text: '股权类',
  2571. textStyle: {
  2572. color: '#69C0FF',
  2573. fontSize: 25,
  2574. fontWeight: 500
  2575. },
  2576. top: '20',
  2577. left: '20'
  2578. },
  2579. textStyle: {
  2580. color: '#fff',
  2581. },
  2582. tooltip: {
  2583. trigger: "axis",
  2584. formatter: function (params) {
  2585. 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] + '亿元';
  2586. return tip
  2587. },
  2588. textStyle: {
  2589. color: '#FFF', // 文字的颜色
  2590. fontSize: '20', // 文字字体大小
  2591. },
  2592. axisPointer: {
  2593. lineStyle: {
  2594. type: 'dashed',
  2595. width: 2,
  2596. color: 'rgba(255,255,255,0.6)'
  2597. },
  2598. animation: true
  2599. }
  2600. },
  2601. grid: {
  2602. top: '10%',
  2603. right: '5%',
  2604. left: '15%',
  2605. bottom: '6%',
  2606. },
  2607. yAxis: {
  2608. data: ['备案', '特别监管'],
  2609. splitLine: {
  2610. show: true,
  2611. lineStyle: {
  2612. color: '#68b4dd66',
  2613. type: 'dashed',
  2614. },
  2615. },
  2616. axisLine: {
  2617. show: false
  2618. },
  2619. axisLabel: {
  2620. show: true,
  2621. formatter: '{value}',
  2622. textStyle: {
  2623. color: "#fff",
  2624. fontSize: 15,
  2625. },
  2626. },
  2627. nameTextStyle: {
  2628. color: '#ebf8ac',
  2629. fontSize: 16,
  2630. },
  2631. },
  2632. xAxis: {
  2633. data: ['项目储备', '项目立项', '可研论证', '投资决策'],
  2634. axisLine: {
  2635. show: true, //隐藏X轴轴线
  2636. lineStyle: {
  2637. color: '#005094',
  2638. width: 1,
  2639. },
  2640. },
  2641. axisTick: {
  2642. show: false, //隐藏X轴刻度
  2643. },
  2644. axisLabel: {
  2645. show: true,
  2646. textStyle: {
  2647. color: '#fff', //X轴文字颜色
  2648. fontSize: 15,
  2649. },
  2650. },
  2651. },
  2652. series: [
  2653. {
  2654. name: '',
  2655. type: 'scatter',
  2656. symbol: 'circle',
  2657. symbolSize: function (data) {
  2658. return Math.sqrt(data[2]) * 3;
  2659. },
  2660. label: {
  2661. emphasis: {
  2662. show: true,
  2663. formatter: function (param) {
  2664. return param.data[2];
  2665. },
  2666. position: 'top'
  2667. }
  2668. },
  2669. itemStyle: {
  2670. normal: {
  2671. color: '#40A9FF'
  2672. }
  2673. },
  2674. data: left14[0]
  2675. },
  2676. {
  2677. name: '',
  2678. type: 'scatter',
  2679. symbol: 'circle',
  2680. symbolSize: function (data) {
  2681. return Math.sqrt(data[2]) * 3;
  2682. },
  2683. label: {
  2684. emphasis: {
  2685. show: true,
  2686. formatter: function (param) {
  2687. return param.data[2];
  2688. },
  2689. position: 'top'
  2690. }
  2691. },
  2692. itemStyle: {
  2693. normal: {
  2694. color: '#45DAD1'
  2695. }
  2696. },
  2697. data: left14[1]
  2698. },
  2699. ]
  2700. }
  2701. let that = this
  2702. myChart.on('click', function (param) {
  2703. that.showChartLTipDouble('股权类')
  2704. })
  2705. myChart.setOption(option)
  2706. tools.loopShowTooltip(myChart, option, {
  2707. nterval: 2000,
  2708. loopSeries: true,
  2709. })
  2710. },
  2711. // 大屏二
  2712. initChartC1 () {
  2713. var chartData = []
  2714. var timer = null;
  2715. var timer2 = null;
  2716. var i = 0;
  2717. center2.forEach((item, index) => {
  2718. let obj = {
  2719. name: item.name,
  2720. y: item.value,
  2721. sliced: false,
  2722. selected: false,
  2723. color: index == 0 ? 'rgb(243,178,119)' : index == 1 ? 'rgb(110,222,191)' : 'rgb(82,161,229)'
  2724. }
  2725. chartData.push(obj)
  2726. })
  2727. let that = this
  2728. var chart = Highcharts.chart('echartC1', {
  2729. chart: {
  2730. type: 'pie',
  2731. backgroundColor: 'rgba(0,0,0,0)',
  2732. options3d: {
  2733. enabled: true,
  2734. alpha: 45,
  2735. //beta: 0
  2736. },
  2737. events: {
  2738. // load,图表加载完成时触发
  2739. load: function () {
  2740. var chart = this;
  2741. var points = chart.series[0].points;
  2742. var len = points.length;
  2743. timer && clearInterval(timer);
  2744. timer = setInterval(function () {
  2745. autoTooltip(points[i]);
  2746. chartData.forEach((item, index) => {
  2747. item.sliced = false
  2748. item.selected = false
  2749. if (index == i) {
  2750. item.sliced = true
  2751. item.selected = true
  2752. }
  2753. })
  2754. chart.update({
  2755. series: [{
  2756. type: 'pie',
  2757. name: '占比',
  2758. point: {
  2759. events: {
  2760. click: function (e) {
  2761. that.showChartLTipDouble(e.point.name)
  2762. }
  2763. }
  2764. },
  2765. data: chartData
  2766. }]
  2767. })
  2768. i++;
  2769. if (i === len) {
  2770. i = 0;
  2771. }
  2772. }, 2000);
  2773. },
  2774. legendItemClick: function (event) {
  2775. console.log(event);
  2776. return true;
  2777. }
  2778. }
  2779. },
  2780. credits: {
  2781. enabled: false //去掉hightchats水印
  2782. },
  2783. title: {
  2784. text: null
  2785. },
  2786. tooltip: {
  2787. crosshairs: true,
  2788. backgroundColor: 'rgba(0,0,0,0.5)',
  2789. useHTML: false, //开启html模式
  2790. style: {
  2791. color: '#fff',
  2792. fontSize: '20'
  2793. },
  2794. formatter: function (e) {
  2795. //console.log(this, e)
  2796. this.percentage = Math.round(this.percentage)
  2797. // e.options.backgroundColor = 'rgba(0,0,0,0.5)'
  2798. // e.options.style.color = '#fff'
  2799. return `${this.key}:<b>${this.percentage}%</b><br/>金额:<b>${this.y}</b>亿`
  2800. },
  2801. //pointFormat:
  2802. },
  2803. legend: {
  2804. layout: 'vertical',
  2805. align: 'right',
  2806. verticalAlign: 'bottom',
  2807. itemStyle: {
  2808. fontSize: '20px',
  2809. color: '#fff',
  2810. x: 20
  2811. }
  2812. },
  2813. plotOptions: {
  2814. pie: {
  2815. allowPointSelect: true,
  2816. showInLegend: true, // 图例
  2817. cursor: 'pointer',
  2818. size: 500,
  2819. innerSize: 300, //环形图中间空白,0为饼图
  2820. depth: 28, //立体高度
  2821. slicedOffset: 23, //动画距离
  2822. dataLabels: {
  2823. enabled: false, // 是否展示指示线
  2824. format: '{point.name}: {point.percentage}'
  2825. }
  2826. },
  2827. },
  2828. series: [{
  2829. type: 'pie',
  2830. name: '占比',
  2831. center: ['70%', '50%'],
  2832. point: {
  2833. events: {
  2834. click: function (e) { //点击事件
  2835. that.showChartLTipDouble(e.point.name)
  2836. },
  2837. mouseOver: function (e) { //鼠标移入停止轮播并且找到移入的当前数据设为选中
  2838. //console.log(e)
  2839. chartData.forEach((item, index) => {
  2840. item.sliced = false
  2841. item.selected = false
  2842. })
  2843. chartData[e.target.index].sliced = true
  2844. chartData[e.target.index].selected = true
  2845. chart.update({
  2846. series: [{
  2847. type: 'pie',
  2848. name: '占比',
  2849. point: {
  2850. events: {
  2851. click: function (e) {
  2852. console.log(222222)
  2853. that.showChartLTipDouble(e.point.name)
  2854. // if (e.point.name == '战略新兴产业') {
  2855. // that.tipTitle2 = e.point.name
  2856. // that.showTip2 = true
  2857. // }
  2858. }
  2859. }
  2860. },
  2861. data: chartData
  2862. }]
  2863. })
  2864. timer && clearInterval(timer);
  2865. },
  2866. mouseOut: function () { // 鼠标移出后需要继续执行轮播
  2867. var points = chart.series[0].points;
  2868. var len = points.length;
  2869. timer && clearInterval(timer);
  2870. timer = setInterval(function () {
  2871. autoTooltip(points[i]);
  2872. chartData.forEach((item, index) => {
  2873. item.sliced = false
  2874. item.selected = false
  2875. if (index == i) {
  2876. item.sliced = true
  2877. item.selected = true
  2878. }
  2879. })
  2880. chart.update({
  2881. series: [{
  2882. type: 'pie',
  2883. name: '占比',
  2884. point: {
  2885. events: {
  2886. click: function (e) {
  2887. console.log(111111)
  2888. that.showChartLTipDouble(e.point.name)
  2889. // if (e.point.name == '战略新兴产业') {
  2890. // that.tipTitle2 = e.point.name
  2891. // that.showTip2 = true
  2892. // }
  2893. }
  2894. }
  2895. },
  2896. data: chartData
  2897. }]
  2898. })
  2899. i++;
  2900. if (i === len) {
  2901. i = 0;
  2902. }
  2903. }, 2000);
  2904. }
  2905. }
  2906. },
  2907. data: chartData
  2908. }]
  2909. });
  2910. function autoTooltip (point) {
  2911. chart.tooltip.refresh(point);
  2912. }
  2913. },
  2914. initChartC2 () {
  2915. let myChart = echarts.init(this.$refs['echartC2'])
  2916. let option = {
  2917. tooltip: {
  2918. formatter: data => {
  2919. 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}亿`
  2920. },
  2921. trigger: 'axis',
  2922. axisPointer: {
  2923. type: 'cross',
  2924. },
  2925. textStyle: {
  2926. color: '#FFF', // 文字的颜色
  2927. fontSize: '20', // 文字字体大小
  2928. },
  2929. },
  2930. dataZoom: [
  2931. {
  2932. // start: 9,//默认为@
  2933. // end: 100,//黑认认为1@0
  2934. type: "slider",
  2935. show: false,
  2936. // xAxisIndex: [0]
  2937. handlesize: 0,//滑动条的 左右2个滑动条的大小
  2938. startValue: 5,// 初始显示值
  2939. endValue: 0,// 结束显示值
  2940. height: 10,//组件高度
  2941. left: "5%",
  2942. right: "4%",//右边的距离
  2943. bottom: "25%",//底边的距离
  2944. borderColor: "#939",
  2945. fillerColor: "#269cdb",
  2946. borderRadius: 5,
  2947. backgroundColor: "#33384b",//两边未选中的滑动条区域的额色
  2948. showDataShadow: false,//是否显示数据阴影
  2949. showDetail: false,//即拖拽时候是否显示详细数值信息
  2950. truerealtime: true,//是否实时更新
  2951. filterMode: "filter"
  2952. }, {
  2953. type: 'inside',
  2954. show: true,
  2955. start: 1,
  2956. end: 100,
  2957. zoomOnMouseWheel: false, //滚轮是否触发缩放
  2958. moveOnMouseMove: false, //鼠标滚轮触发滚动
  2959. }
  2960. ],
  2961. grid: {
  2962. top: '10%',
  2963. right: '3%',
  2964. left: '7%',
  2965. bottom: '10%',
  2966. },
  2967. legend: {
  2968. top: '1',
  2969. right: '10',
  2970. textStyle: {
  2971. color: 'rgba(250,250,250,0.6)',
  2972. fontSize: '15'
  2973. },
  2974. },
  2975. xAxis: {
  2976. data: center3.map(item => item.name),
  2977. axisLine: {
  2978. show: true, //隐藏X轴轴线
  2979. lineStyle: {
  2980. color: '#005094',
  2981. width: 1,
  2982. },
  2983. },
  2984. axisTick: {
  2985. show: false, //隐藏X轴刻度
  2986. },
  2987. axisLabel: {
  2988. show: true,
  2989. rotate: 40,
  2990. textStyle: {
  2991. color: '#fff',//'rgba(255,255,255,0.6)', //X轴文字颜色
  2992. fontSize: '15'
  2993. },
  2994. },
  2995. },
  2996. yAxis: [
  2997. {
  2998. type: 'value',
  2999. name: '亿元',
  3000. nameTextStyle: {
  3001. color: 'rgba(255,255,255,0.6)',
  3002. fontSize: '15'
  3003. },
  3004. splitLine: {
  3005. show: true,
  3006. lineStyle: {
  3007. color: '#68b4dd66',
  3008. type: 'dashed',
  3009. },
  3010. },
  3011. axisLine: {
  3012. show: true,
  3013. lineStyle: {
  3014. color: '#3D7495',
  3015. },
  3016. },
  3017. axisLabel: {
  3018. show: true,
  3019. textStyle: {
  3020. color: '#fff',
  3021. fontSize: '15'
  3022. },
  3023. },
  3024. nameTextStyle: {
  3025. color: '#fff',
  3026. fontSize: 15,
  3027. },
  3028. },
  3029. ],
  3030. series: [
  3031. {
  3032. name: '计划投资',
  3033. type: 'bar',
  3034. barWidth: 10,
  3035. itemStyle: {
  3036. normal: {
  3037. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  3038. {
  3039. offset: 0,
  3040. color: '#69c0ff',
  3041. },
  3042. {
  3043. offset: 1,
  3044. color: '#082550',
  3045. },
  3046. ]),
  3047. },
  3048. },
  3049. data: center3.map(item => item.value),
  3050. },
  3051. {
  3052. name: '实际投资',
  3053. type: 'bar',
  3054. barWidth: 10,
  3055. itemStyle: {
  3056. normal: {
  3057. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  3058. {
  3059. offset: 0,
  3060. color: '#957DFF',
  3061. },
  3062. {
  3063. offset: 1,
  3064. color: '#082550',
  3065. },
  3066. ]),
  3067. },
  3068. },
  3069. data: center3.map(item => item.value2),
  3070. },
  3071. ],
  3072. }
  3073. myChart.on('click', function (param) {
  3074. window.location.href = './investHomeChild.html?type=2'
  3075. })
  3076. myChart.setOption(option)
  3077. tools.loopShowTooltip(myChart, option, {
  3078. nterval: 2000,
  3079. loopSeries: true,
  3080. })
  3081. let arr = center3.map(item => item.value2)
  3082. this.timeOut = setInterval(function () {
  3083. let startValue = myChart.getModel().option.dataZoom[0].startValue;
  3084. let endValue = myChart.getModel().option.dataZoom[0].endValue;
  3085. let start = myChart.getModel().option.xAxis[0].data[startValue];//起始X轴
  3086. let end = myChart.getModel().option.xAxis[0].data[endValue];//结束X轴
  3087. // 每次向后滚动一个,最后一个从头开始。
  3088. // console.log(option.dataZoom[0].endValue);
  3089. if (option.dataZoom[0].endValue >= 12) {
  3090. option.dataZoom[0].endValue = 5
  3091. option.dataZoom[0].startValue = 0
  3092. } else {
  3093. option.dataZoom[0].endValue = option.dataZoom[0].endValue + 6
  3094. option.dataZoom[0].startValue = option.dataZoom[0].startValue + 6
  3095. }
  3096. // myChart.dispatchAction({
  3097. // type: 'showTip',
  3098. // seriesIndex: 0,
  3099. // dataIndex: startValue +1,
  3100. // });
  3101. myChart.setOption(option);
  3102. }, 12000);
  3103. },
  3104. convertData (data) {
  3105. var res = []
  3106. for (var i = 0; i < data.length; i++) {
  3107. var geoCoord = this.geoCoordMap[data[i].name]
  3108. if (geoCoord) {
  3109. res.push({
  3110. name: data[i].name,
  3111. value: geoCoord.concat(data[i].value),
  3112. })
  3113. }
  3114. }
  3115. return res
  3116. },
  3117. initProvinceChart () {
  3118. var data = center5
  3119. var moveLine = {
  3120. normal: [
  3121. {
  3122. fromName: '太原市',
  3123. toName: '吕梁市',
  3124. coords: [
  3125. [112.3352, 37.9413],
  3126. [111.3574, 37.7325],
  3127. ],
  3128. },
  3129. {
  3130. fromName: '太原市',
  3131. toName: '忻州市',
  3132. coords: [
  3133. [112.3352, 37.9413],
  3134. [112.4561, 38.8971],
  3135. ],
  3136. },
  3137. {
  3138. fromName: '太原市',
  3139. toName: '临汾市',
  3140. coords: [
  3141. [112.3352, 37.9413],
  3142. [111.4783, 36.1615],
  3143. ],
  3144. },
  3145. {
  3146. fromName: '太原市',
  3147. toName: '阳泉市',
  3148. coords: [
  3149. [112.3352, 37.9413],
  3150. [113.4778, 38.0951],
  3151. ],
  3152. },
  3153. {
  3154. fromName: '太原市',
  3155. toName: '晋中市',
  3156. coords: [
  3157. [112.3352, 37.9413],
  3158. [112.7747, 37.37],
  3159. ],
  3160. },
  3161. {
  3162. fromName: '太原市',
  3163. toName: '运城市',
  3164. coords: [
  3165. [112.3352, 37.9413],
  3166. [111.1487, 35.2002],
  3167. ],
  3168. },
  3169. {
  3170. fromName: '太原市',
  3171. toName: '大同市',
  3172. coords: [
  3173. [112.3352, 37.9413],
  3174. [113.7854, 39.8035],
  3175. ],
  3176. },
  3177. {
  3178. fromName: '太原市',
  3179. toName: '晋城市',
  3180. coords: [
  3181. [112.3352, 37.9413],
  3182. [112.7856, 35.6342],
  3183. ],
  3184. },
  3185. {
  3186. fromName: '太原市',
  3187. toName: '长治市',
  3188. coords: [
  3189. [112.3352, 37.9413],
  3190. [112.8625, 36.4746],
  3191. ],
  3192. },
  3193. {
  3194. fromName: '太原市',
  3195. toName: '朔州市',
  3196. coords: [
  3197. [112.3352, 37.9413],
  3198. [113.0713, 39.6991],
  3199. ],
  3200. },
  3201. ],
  3202. }
  3203. /*获取地图数据*/
  3204. this.mapChart = echarts.init(this.$refs['echarts-map'])
  3205. echarts.registerMap('shanxi', {
  3206. type: 'FeatureCollection',
  3207. features: [
  3208. {
  3209. type: 'Feature',
  3210. id: '1409',
  3211. properties: { name: '忻州市', cp: [112.4561, 38.8971], childNum: 14 },
  3212. geometry: {
  3213. type: 'Polygon',
  3214. coordinates: [
  3215. '@@Vx@lnbn¦WlnnUšmš°š²VšV‚VVVnUn„ºlz@l„„@Jƒ@kXWVXl@Lƒa@„ƒKUL„ŽlbnKlLnK‚LnKÆXn°šbVV@bUVl°Un@LnaVJUbW@UX²l‚@ČwlVVIšWnkÆa°„„anV‚Kn°™UW¯@™aVUVk@Un@„aV@ValwUanmWU„k@WVUUanaVwnLVl°@nk@mVU@UVK@w„LVKVU@ƒ„K@UUKVUV@@bnL„a‚V„aôšlIXmlKX_°KVV@bVV„@šzV`kblI„V„Ul‚šL@bnV@V„Ċll„„VlIXW@k„a‚U²blKšVnIlJ„albXXlWVn°JnšnL@l@XlJlaX@„X˜W²@l_VmnKšU„blU@mnkVK„¯@U@ƒma@kX¥VƒmakkƒLƒa@aƒ@WIUUVXWWnk@a°a@kkm@kUUmJm@WUUUIk`m@V—kaWWkX™KmƒXk¯ƒ@WKƒLkak@±bƒw@ƒaƒa@akaƒ@ma¯@ƒL—KÇÅkKWbkmġ™±ÅUƒLUK™VVkƒm¯LUVVbƒ„UwUW¯bm„ƒULƒxWJ—@ƒklmkUm@@KnwVkVK@akwƒ@@a¯bƒKkn›VUI™b¯mmbk@UbmKUL@xUUƒ@klmLUŽlVXI‚VVVUVUœU`mLXVWbXnW`Ų°xmŽxU@mĉƒƒwU@mbU@UƒmbkVW¦kJ™@ƒX@`¯Im@UlUVVnb@bWJXnmbƒJUU™UUaƒ@UamIkaƒxƒ@@x@b',
  3216. ],
  3217. encodeOffsets: [[113614, 39657]],
  3218. },
  3219. },
  3220. {
  3221. type: 'Feature',
  3222. id: '1411',
  3223. properties: { name: '吕梁市', cp: [111.3574, 37.7325], childNum: 13 },
  3224. geometry: {
  3225. type: 'Polygon',
  3226. coordinates: [
  3227. '@@@a@w„@„wlbnJVb„@VbšVVV„InaWmXI@a‚aUmVUVkn@°J@_„Wš@lIX¥lUnaV„V@naV@„xĊ„n‚V@‚wn¯wƱX_WmXaWUnKV_V›VUUUUWJkUVnKlk¯™@@kmKUaŁ±KkU@WmI@WUIlUUmVwXƒ‚w@ƒUlUVwœV‚@„Lnb‚W@anU@UšaVkô@l»n@na˜JnUÈLVaƃUUVm„VKVƒ²L@mU_lK@UVWkU‚a@a@U¯aUaƒÑóÑUb™„ƒKk@@aƒk¯mVaUwVƒÑkWUmK@UUKmXUWÝwUa™LUU@aWJUUU@Ua݄U@WL@VKVaVI@WnU@alIVKƒƒ@kIƒmIkJ@™m@ƒ™@@_™K@xƒ@kaW@U„@Vmn@ŽUK@mIƒJUXV¤XXWlkKƒkkK@XmJVakImJU@ó™¯LWKUV@nUVƒLkxmKkLma@kXKmmƒLƒab™LmK@V@mXVÆUxƒX@`nL„aV@@VmLUVnLlLš˜„b@„šŽ°²nx@b‚VUxlb@V¯bUV@zV‚XVĊXVx@lVn@VnnmŽUš@LlJXVƒz¯VWVXbšV@bmn™VUVk„Çþń@XVxmbUlV„Uln„W„@„Xl‚@VLXÒ@bÞJ°¦„L˜ò„@nU‚b@°„X@ŽXbmVU„V„nb@x‚x',
  3228. ],
  3229. encodeOffsets: [[113614, 39657]],
  3230. },
  3231. },
  3232. {
  3233. type: 'Feature',
  3234. id: '1410',
  3235. properties: { name: '临汾市', cp: [111.4783, 36.1615], childNum: 17 },
  3236. geometry: {
  3237. type: 'Polygon',
  3238. coordinates: [
  3239. '@@nW‚@@UnLšK‚a„b„KnnWL@lnblKnLlw„KVU@mVUXL°KôšV@nIlJUbnI@WlL„llLXkWWU£VW„InJ‚@VL@nm@UVƒX@lb„@@wšL@`‚@„šn@V@lw„@n„VmVX„WmwnUlƒœa@_lK„wVlUn°xVKVXXWlUšVVI@K@K„n°KœwlVlU@kna@V_„Wn‚m„UVm@kXml_@m„LlKXw°m@_ôJVUV@X™l@UaV@Va°I„lk»VwUkVmwUmmVn@V¯@KƒU—wmK@U¯wUVÝ@mJƒU—nWK™@@UnKVa„_lykUmKÛnm@™x@ƒUUlwVk™ƒXW@ƒa@Uƒ@@K@ƒkIV™nammVakUlƒ@wX@@kƒ™¯@ƒVVbml@„„°UbULmlVbnbÅK±VƒKVXUJWa@ULWaUU@@U@aWK@UkxUKƒLUUUJ±UkL@V±kk@kam@UV@l@LWl@n@VVUx„LlUUx@VUV™U@aƒIUl™L@°mLU‚ƒbkUUaWUUaUU@aWK—LWJ@bUL@VUVVbU@m@a@kmKmnĉlUK™XƒWUblb—xmIkƒƒU@xWb@lkšVx™LXŽmzVV@bklVVUzm˜@bk„@Vx@xlŽU„@lUbVnl@„Wxnl@n@ŽUbV„mL‚mƒb@`X@lUX@@xlnkLWaUJnnWV™Vn@l„@bULVV@l™V@XnJVX',
  3240. ],
  3241. encodeOffsets: [[113063, 37784]],
  3242. },
  3243. },
  3244. {
  3245. type: 'Feature',
  3246. id: '1407',
  3247. properties: { name: '晋中市', cp: [112.7747, 37.37], childNum: 11 },
  3248. geometry: {
  3249. type: 'Polygon',
  3250. coordinates: [
  3251. '@@@šlInJ„lJ„@‚„ULkJ@bmV@XUJUb‚L@UXKV@ރVbV@VVXI@bVVšKVbÞxVXnWVL@VnLV‚lX„ÒUŽVxUb°n„l@bl@„LšƒVaô҄ÒVb°b@VnLnnV@lmn@lb„U„V@„‚JœUVV‚Xkl@lUzmJ@xšXkl‚bUn„JVšUb„nU‚lb„V@nlLX@lakšV`Ub°š@XVJnU‚L²KlxnI@KV@lbUbVV„KnVl@„zlm@Uš@nŽšI@WUaVl@@mVU„@XkW@ƒnkVKVƒ„_Vw„y@knwVa‚@XalU„@šVnml@„X@V„L‚KVaÞbnnlJšI„mVKn„VVVInVlU„@„m@™mXK@UmyUI@mWUUakamw@wUwmLkakwVƒmK™w@wUam£y@am_ƒW@™UU@knmm„amU@WUa@knw@ƒUUUUV@nƒJm@mVUkKVUUUkKmwƒKULƒKUImV@lUn™nŽm@mbUK@°™bUnmbUmkkƒWUb@am@UXkK@a±@™V™@ĉř„V‚UXVxUVkLWl¯@@bULUlm@@nm`—XƒlWakIkm›VUbUL@Vm@kIƒ@@Kšm@—VaX‚I@W@aU@kUƒVU_™KƒbƒJkkǎ™b@nkKmL™wÅW@kVUUƒVU@WUIƒJmIXmma@_kyVaUUlkUm@ƒkU›x¯Lƒm@L@LUJ™UkVWXUWUL¯wVmUkƒxkL@`›bk„mVnxƒXUWUnmƒƒ@kxU@',
  3252. ],
  3253. encodeOffsets: [[114087, 37682]],
  3254. },
  3255. },
  3256. {
  3257. type: 'Feature',
  3258. id: '1408',
  3259. properties: { name: '运城市', cp: [111.1487, 35.2002], childNum: 13 },
  3260. geometry: {
  3261. type: 'Polygon',
  3262. coordinates: [
  3263. '@@„Vl„nJ˜wkaVa„XšWVLĊknmnL‚l@@bn‚V@UaVU@UVK@aXI˜KXL@bVVVbXVVblV„aVnK@¯šKVk„J@bšVVU@UVwkVƒKVwUUm@@Xk@K@kVUn@lbl@²l@UlK²VVIVV„KVLlw@VXL@b@VV@VŽXbVK‚@XbVIUW„L‚U²ÆLmaUankVKVaƒ¯@ƒnkUa„U°@„š‚n@@kWa„UVaXUW@IXKVw@U™ƒ„™WU@W@@UUƒU@mn@ƒ`m@UUULkUmJ™IUƒ@@UƒK@U@›anƒ™ak_@wmKUwmakV™kmK™V™k¯b™wƒ`kwUIÇx¯»ÇaŃmn@@™mƒmUkV@wkKW@kxmL™UkĉLÝk™xÝw¯lóVU„mV@ĀVVX¦W¤kz@`Vx°„²ĸ‚š@„Ul@x„êĸNJ°¤V„VlXLWnXxmV@nUl@„',
  3264. ],
  3265. encodeOffsets: [[113232, 36597]],
  3266. },
  3267. },
  3268. {
  3269. type: 'Feature',
  3270. id: '1402',
  3271. properties: { name: '大同市', cp: [113.7854, 39.8035], childNum: 8 },
  3272. geometry: {
  3273. type: 'Polygon',
  3274. coordinates: [
  3275. '@@²£šyl@Ȑ˜Ė@bĸŽĢbĸ„˜X„a‚KŤnn@ŎôllÈx„nVnÞDŽV@b‚nXllL°KšbVb@J@b—„‚„@ŽU„„xlKXLlKlXk„@Ulk„JlkUƒVKXUƒÇVIVm@_nǚLšašl‚w„VnU@UUwma@aƒaÝaLmUk@@Wƒ@U@@X™wVWÝUUUk@@VmLƒKV»nwUw™aUL@`mzƒJUIVƒUaUw™KUaVIlJôanÑlLVUn@ša„@VV„@@UUwVK°Vn_lJÆLœéW@UUUÅ@»lm@aÞIVwXW˜UUkkm@U@aƒU@mwU£VWU_kWmƒXwW_°yUkkK@UÇK@kkUVymóK—U@KWIƒbUak@mJ@bkbmLkŽ™UmƒkVU„W¦@lnb@„@Vƒ°ULml@nkVƒa™VmLUnk`±@—XƒWW@kbǦXŽ¯„WxI@xmbmxXlWV„„@bŎUz@J‚b@bÞb™ŽU@Wbk@ƒxk@WX¯VۙƒWÝbÝUkVUU@alI@a@akLWa™m@U¯UUmÇL@K@aU@¯VUkƒKmX@`@œkJ@nV‚Ub@lbVÆXVW„ULU`VbkLUV@XWl@bXJ˜@VbV@Vl',
  3276. ],
  3277. encodeOffsets: [[115335, 41209]],
  3278. },
  3279. },
  3280. {
  3281. type: 'Feature',
  3282. id: '1404',
  3283. properties: { name: '长治市', cp: [112.8625, 36.4746], childNum: 12 },
  3284. geometry: {
  3285. type: 'Polygon',
  3286. coordinates: [
  3287. '@@Uk™Lky@I‚JVa@mÞaWšy@_W@_WƒXVlUVwš@nw°K@m„UƒVaƒmVkU@mmmnLVUmKXa™U@IlKVUnK@UmWkX@WV_Vƒ@akU@a„KWIXyƒIUVmUn™Ua@WaXUVKVmkUWVkUƒLU@@VƒbƒKbƒIUmƒ@mbVL—x›WUUkn±V¯wƒbÅJUbmLkbmKÅKƒbVnUbƒV™KUb™KUbmLKmƒb™aƒKkUm@UŽnn‚VnxUVlUxl¼ƒk¯JUbU@Vbk@WšU@UVóI@`¯nWxkLƒK@nk`Wn@lUnƒVnm‚ƒXU`@mb@lkV@„VnklVVUblz@`nbWnnJ„IVJ@XUVV„UV@lÆXšxnKlL@mšaȍll„I„ašLV`„UlVV@@b@XJWUb@˜™n@L„@lJn@@UVKVaœUlnlJXb„k˜Wn_@mn@VkVK@a°@XklKVUUwVWUšƒĊƚ@šU²@@blLVWn@@bVa„XllVnnaVmša@¯VLnan@‚šmVm@knUVJ',
  3288. ],
  3289. encodeOffsets: [[116269, 37637]],
  3290. },
  3291. },
  3292. {
  3293. type: 'Feature',
  3294. id: '1406',
  3295. properties: { name: '朔州市', cp: [113.0713, 39.6991], childNum: 5 },
  3296. geometry: {
  3297. type: 'Polygon',
  3298. coordinates: [
  3299. '@@XXWVXVWnnlnn@èƼ@„„xlš„ŽV„nblšššVŽÈUVl‚š@„blnœL܃ĊmUkU@Ua‚—@WI@aXk@WVUlKUaV_VKXƒWUUÅka@VaU@mlI@›@_nW„LVl°UV@@b@LÈKVn°V@VšnXblK@b@bkJ@bVVlUÞVÞa„Xܚ°UXWl@„wl@XaV@šÝa@aa@IVyƍ@aƒƒXUWknwna@w‚JXw°ƒWÈ¥kI@W@kmKm™¯IUmkXWWkaƒbkImJ™UkL±aVƒb@lWXkJƒUkƒĉkƒ@UmU@a™KkƒVƒUkJlaU_™yƒ@UU@aUU¯LW`kLWnkJó™ƒbUƒbmK@aU@UVVL@VƒL@„UVULƒK@xUL@VUV@nml¯@UkmKUxmbVbUV@XƒlXVmnVbkxUbU@ƒbm@@VUlUVšb°@VX¯šm‚',
  3300. ],
  3301. encodeOffsets: [[114615, 40562]],
  3302. },
  3303. },
  3304. {
  3305. type: 'Feature',
  3306. id: '1405',
  3307. properties: { name: '晋城市', cp: [112.7856, 35.6342], childNum: 6 },
  3308. geometry: {
  3309. type: 'Polygon',
  3310. coordinates: [
  3311. '@@lV„Lšb„an‚LnKVašLVašL„UVaUm„aÆLnLlanKVaÆI„a°x²UlmVVœX˜wUKna„@Vn„J‚a„L„a@UV@@alUkKVKnkmmVwUk„w@ƒ™@kxWUXƒW@@mƒk@aUa@a¯aƒLkKmwkUm@kL@K@aWIXmƒVƒXƒWkUVakL@UVKƒw@aUK@UUKmLU@¯n™KUwVƒUIWJUWmka™@UXƒJƒk@UkmW@kLWKVƒx@bmI@VUaVU@a¯@UUmVKmX@±`kÝKVxUL±akL@V™bƒLkKmVƒ@XWVUbƒVXb@lm@@lW@@xk„lVUbnnmbUšlJ@„@L„@@V„b@‚WXš„UlkxVV@„šwn@ÜmnLlVkzƒ`UbmL@Vš@XL˜m„VnIÞ@VU°x@VnL˜x„V@LU°',
  3312. ],
  3313. encodeOffsets: [[115223, 36895]],
  3314. },
  3315. },
  3316. {
  3317. type: 'Feature',
  3318. id: '1401',
  3319. properties: { name: '太原市', cp: [112.3352, 37.9413], childNum: 5 },
  3320. geometry: {
  3321. type: 'Polygon',
  3322. coordinates: [
  3323. '@@„@VV@wVKnLVal@na°nšaVJœUlm„L°a@b„@lx@bULUlmx@Ln@lVkn„l˜@XI„w‚K„Vnƒ°aVXVx„ƒUaVU°K„nUlšUVL„KÆVš²Ģ‚lnXalLÈƘL„KUaVkUanmWU™a@WwkUWU¯y¯Ñ@anIl@@aVU„m„I„ymUƒLUUVakaU@@LmJkw±LKmVUI@W¯™VaU_l™kbW@kK@mƒUkaVƒmVaU™ƒIVmalk™W@wnIVy@klkWUU›VI@ƒƒUƒVkam@knU@mmmK@bblVUX@VkLV`@n±KU„ULƒ‚UnVVńUbÇKmV—Imbm@k¼ó@Ul™b@VmV@bXmaƒK@›UUxkV‚V@„xW„UxVnkVVJ@XnJ@XlV²LƂVbnL@lš@°',
  3324. ],
  3325. encodeOffsets: [[114503, 39134]],
  3326. },
  3327. },
  3328. {
  3329. type: 'Feature',
  3330. id: '1403',
  3331. properties: { name: '阳泉市', cp: [113.4778, 38.0951], childNum: 3 },
  3332. geometry: {
  3333. type: 'Polygon',
  3334. coordinates: [
  3335. '@@°@nb„@lb@b„b„b‚@„x²al@lb„KXU@m‚kUWkkmUUƒVwV@XUW@™naVklKXblKnL‚ƒnLVanImaXKlL„ašV@U@KUKW„alƒXK@£WKXUV@VU„ƒUUVW„_V™@W@@K„@šƒUƒƒIWmXUmƒULƒn™JkImmÝaUbLƒK@UƒWk@mn™Uƒ@kVWb@Ubmx@lƒzUxƒ`U„ULml@„XWlƒ@UV@nk@U‚Vb@X™Jm™@@Vknƒyk@ƒzƒJƒnUV@bk@mJ@b°Ò°zXVlVXx‚@šbXVmnVbUlVb',
  3336. ],
  3337. encodeOffsets: [[115864, 39336]],
  3338. },
  3339. },
  3340. ],
  3341. UTF8Encoding: true,
  3342. })
  3343. var mapFeatures = echarts.getMap(this.mapName).geoJson.features
  3344. mapFeatures.forEach(v => {
  3345. // 地区名称
  3346. var name = v.properties.name
  3347. // 地区经纬度
  3348. this.geoCoordMap[name] = v.properties.cp
  3349. })
  3350. let option = {
  3351. tooltip: {
  3352. padding: 15,
  3353. enterable: true,
  3354. transitionDuration: 1,
  3355. formatter: (params, ticket, callback) => {
  3356. // 清空所有轮播
  3357. for (var k in this.geoCoordMap) {
  3358. this.mapChart.dispatchAction({
  3359. // type: 'geoUnSelect',
  3360. type: 'downplay',
  3361. name: k,
  3362. })
  3363. }
  3364. // 如果鼠标滑动到线线上面,则返回空
  3365. this.mapChart.dispatchAction({
  3366. // type: 'geoSelect',
  3367. type: 'highlight',
  3368. name: params.name,
  3369. })
  3370. if (params.componentSubType == 'lines') {
  3371. return
  3372. }
  3373. if (params.componentSubType == 'scatter') {
  3374. let tipHtml = `
  3375. <div class="tooltip-cont">
  3376. <p>项目数量:<span>${data[params.dataIndex].value2}个</span></p>
  3377. <p>总投资额:<span>${params.data.value[2]}亿</span></p>
  3378. </div>`
  3379. callback(ticket, tipHtml)
  3380. return tipHtml
  3381. }
  3382. if (params.componentSubType == 'map') {
  3383. let tipHtml = `
  3384. <div class="tooltip-cont">
  3385. <p>项目数量:<span>${data[params.dataIndex].value2}个</span></p>
  3386. <p>总投资额:<span>${params.data.value}亿</span></p>
  3387. </div>`
  3388. callback(ticket, tipHtml)
  3389. return tipHtml
  3390. }
  3391. },
  3392. },
  3393. visualMap: {
  3394. show: false,
  3395. min: 0,
  3396. max: 300,
  3397. right: 0,
  3398. bottom: 0,
  3399. text: ['高', '低'],
  3400. textStyle: {
  3401. color: '#f1f1f1'
  3402. },
  3403. realtime: false,
  3404. calculable: false,
  3405. inRange: {
  3406. color: ['lightskyblue', '#2754b7']
  3407. }
  3408. },
  3409. geo: {
  3410. show: true,
  3411. map: 'shanxi',
  3412. layoutCenter: ['50%', '50%'], //地图位置
  3413. layoutSize: '65%',
  3414. zoom: 1.5,
  3415. label: {
  3416. normal: {
  3417. show: false,
  3418. },
  3419. emphasis: {
  3420. show: false,
  3421. },
  3422. },
  3423. roam: false,
  3424. itemStyle: {
  3425. normal: {
  3426. areaColor: '#1946a8',
  3427. shadowColor: '#1946a8',
  3428. borderWidth: 1, //设置外层边框
  3429. borderColor: '#1946a8',
  3430. shadowOffsetX: 10,
  3431. shadowOffsetY: 5,
  3432. shadowBlur: 2,
  3433. },
  3434. emphasis: {
  3435. areaColor: '#1946a8',
  3436. borderColor: '#d4bc1d',
  3437. borderWidth: 2, //设置外层边框
  3438. },
  3439. },
  3440. },
  3441. series: [
  3442. {
  3443. name: '散点',
  3444. type: 'scatter',
  3445. coordinateSystem: 'geo',
  3446. data: this.convertData(data),
  3447. symbolSize: function (val) {
  3448. return 10
  3449. },
  3450. label: {
  3451. normal: {
  3452. formatter: '{b}',
  3453. position: [10, 10],
  3454. fontSize: 30,
  3455. fontWeight: 600,
  3456. fontStyle: 'italic',
  3457. color: '#fff',
  3458. show: true,
  3459. },
  3460. emphasis: {
  3461. show: true,
  3462. },
  3463. },
  3464. itemStyle: {
  3465. normal: {
  3466. color: '#000',
  3467. borderWidth: 2,
  3468. borderColor: '#fff',
  3469. },
  3470. },
  3471. },
  3472. {
  3473. type: 'map',
  3474. map: this.mapName,
  3475. geoIndex: 0,
  3476. aspectScale: 1.5, //长宽比
  3477. showLegendSymbol: true, // 存在legend时显示
  3478. label: {
  3479. normal: {
  3480. show: true,
  3481. },
  3482. emphasis: {
  3483. show: false,
  3484. textStyle: {
  3485. color: '#fff',
  3486. },
  3487. },
  3488. },
  3489. roam: true,
  3490. itemStyle: {
  3491. normal: {
  3492. areaColor: '#031525',
  3493. borderColor: '#3B5077',
  3494. },
  3495. emphasis: {
  3496. areaColor: '#2B91B7',
  3497. },
  3498. },
  3499. animation: false,
  3500. data: data,
  3501. },
  3502. {
  3503. name: '点',
  3504. type: 'scatter',
  3505. coordinateSystem: 'geo',
  3506. zlevel: 6,
  3507. },
  3508. {
  3509. name: 'Top 5',
  3510. type: 'effectScatter',
  3511. coordinateSystem: 'geo',
  3512. data: this.convertData(
  3513. data
  3514. .sort(function (a, b) {
  3515. return b.value - a.value
  3516. })
  3517. .slice(0, 5)
  3518. ),
  3519. symbolSize: function (val) {
  3520. return 15
  3521. },
  3522. showEffectOn: 'render',
  3523. rippleEffect: {
  3524. brushType: 'stroke',
  3525. },
  3526. hoverAnimation: true,
  3527. label: {
  3528. normal: {
  3529. formatter: '{b}',
  3530. position: 'left',
  3531. show: false,
  3532. },
  3533. },
  3534. itemStyle: {
  3535. normal: {
  3536. color: 'yellow',
  3537. shadowBlur: 10,
  3538. shadowColor: 'yellow',
  3539. },
  3540. },
  3541. zlevel: 1000,
  3542. },
  3543. {
  3544. name: '线路',
  3545. type: 'lines',
  3546. zlevel: 2,
  3547. effect: {
  3548. show: true,
  3549. period: 4, //箭头指向速度,值越小速度越快
  3550. trailLength: 0.02, //特效尾迹长度[0,1]值越大,尾迹越长重
  3551. symbol: 'arrow', //箭头图标
  3552. symbolSize: 5, //图标大小
  3553. },
  3554. lineStyle: {
  3555. normal: {
  3556. color: '#00FFFF',
  3557. width: 1,
  3558. type: 'dashed',
  3559. opacity: 0.5, //尾迹线条透明度
  3560. curveness: -0.3, //尾迹线条曲直度
  3561. },
  3562. },
  3563. data: moveLine.normal,
  3564. },
  3565. ],
  3566. }
  3567. let that = this
  3568. this.mapChart.on('click', function (params) {
  3569. if (params.name == '太原市') {
  3570. that.showChartLTipDouble('太原市')
  3571. }
  3572. })
  3573. tools.loopShowTooltip(this.mapChart, option, {
  3574. interval: 2000,
  3575. loopSeries: false,
  3576. });
  3577. this.mapChart.setOption(option)
  3578. },
  3579. initChinaChart () {
  3580. var data = []
  3581. /*获取地图数据*/
  3582. this.mapChart = echarts.init(this.$refs['echarts-map'])
  3583. echarts.registerMap('china', china)
  3584. var mapFeatures = echarts.getMap('china').geoJson.features
  3585. mapFeatures.forEach(v => {
  3586. // 地区名称
  3587. var name = v.properties.name
  3588. // 地区经纬度
  3589. // this.geoCoordMap[name] = v.properties.centroid
  3590. this.geoCoordMap[name] = v.properties.cp
  3591. data.push({ name: v.properties.name, value1: v.properties.cp[0], value2: v.properties.cp[1] })
  3592. })
  3593. // <p>当前阶段:<span>可论证阶段</span></p>
  3594. // <p>时间节点:<span>2021.10-2022.10</span></p>
  3595. let option = {
  3596. geo: {
  3597. show: true,
  3598. map: 'china',
  3599. layoutCenter: ['50%', '50%'], //地图位置
  3600. layoutSize: '65%',
  3601. zoom: 1.5,
  3602. label: {
  3603. normal: {
  3604. show: false,
  3605. },
  3606. emphasis: {
  3607. show: false,
  3608. },
  3609. },
  3610. roam: false,
  3611. itemStyle: {
  3612. normal: {
  3613. areaColor: '#70b0ea',
  3614. shadowColor: '#1946a8',
  3615. borderWidth: 1, //设置外层边框
  3616. borderColor: '#1946a8',
  3617. shadowOffsetX: 2,
  3618. shadowOffsetY: 1,
  3619. shadowBlur: 2,
  3620. },
  3621. emphasis: {
  3622. areaColor: '#1946a8',
  3623. borderColor: '#d4bc1d',
  3624. borderWidth: 2, //设置外层边框
  3625. },
  3626. },
  3627. },
  3628. series: [
  3629. {
  3630. name: '散点',
  3631. type: 'scatter',
  3632. coordinateSystem: 'geo',
  3633. data: this.convertData(data),
  3634. symbolSize: function (val) {
  3635. return 10
  3636. },
  3637. label: {
  3638. normal: {
  3639. formatter: '{b}',
  3640. position: [10, 10],
  3641. fontSize: 20,
  3642. fontWeight: 600,
  3643. // fontStyle: 'italic',
  3644. color: '#fff',
  3645. show: true,
  3646. },
  3647. emphasis: {
  3648. show: true,
  3649. },
  3650. },
  3651. itemStyle: {
  3652. normal: {
  3653. color: 'rgba(0,0,0,0)',
  3654. borderWidth: 2,
  3655. borderColor: '#fff',
  3656. },
  3657. },
  3658. },
  3659. ],
  3660. }
  3661. let that = this
  3662. this.mapChart.on('click', function (params) {
  3663. if (params.name == '山西') {
  3664. that.backShow = true
  3665. setTimeout(() => {
  3666. that.initProvinceChart()
  3667. })
  3668. }
  3669. })
  3670. tools.loopShowTooltip(this.mapChart, option, {
  3671. interval: 2000,
  3672. loopSeries: true,
  3673. })
  3674. this.mapChart.setOption(option)
  3675. },
  3676. initChartC3 () {
  3677. let myChart = echarts.init(this.$refs['echartC3'])
  3678. let option = {
  3679. tooltip: {
  3680. trigger: 'axis',
  3681. formatter: '{a0}:{c0}' + '亿元', //+ '<br/>'+ '{a1}:{c1}' + '%',
  3682. axisPointer: {
  3683. type: 'cross',
  3684. },
  3685. textStyle: {
  3686. color: '#FFF', // 文字的颜色
  3687. fontSize: '20', // 文字字体大小
  3688. },
  3689. },
  3690. grid: {
  3691. top: '8%',
  3692. right: '3%',
  3693. left: '7%',
  3694. bottom: '10%',
  3695. },
  3696. // legend: {
  3697. // top: '1',
  3698. // textStyle: {
  3699. // color: 'rgba(250,250,250,0.6)',
  3700. // },
  3701. // },
  3702. xAxis: {
  3703. data: center6.map(item => item.name),
  3704. axisLine: {
  3705. show: true, //隐藏X轴轴线
  3706. lineStyle: {
  3707. color: '#005094',
  3708. width: 1,
  3709. },
  3710. },
  3711. axisTick: {
  3712. show: false, //隐藏X轴刻度
  3713. },
  3714. axisLabel: {
  3715. show: true,
  3716. rotate: 20,
  3717. textStyle: {
  3718. color: '#fff',//'rgba(255,255,255,0.6)', //X轴文字颜色
  3719. fontSize: '15'
  3720. },
  3721. },
  3722. },
  3723. yAxis: [
  3724. {
  3725. type: 'value',
  3726. name: '亿元',
  3727. nameTextStyle: {
  3728. color: 'rgba(255,255,255,0.6)',
  3729. fontSize: '15'
  3730. },
  3731. splitLine: {
  3732. show: true,
  3733. lineStyle: {
  3734. color: '#68b4dd66',
  3735. type: 'dashed',
  3736. },
  3737. },
  3738. axisLine: {
  3739. show: true,
  3740. lineStyle: {
  3741. color: '#3D7495',
  3742. },
  3743. },
  3744. axisLabel: {
  3745. show: true,
  3746. textStyle: {
  3747. color: '#fff',
  3748. fontSize: '15'
  3749. },
  3750. },
  3751. nameTextStyle: {
  3752. color: '#fff',
  3753. fontSize: 15,
  3754. },
  3755. },
  3756. {
  3757. type: 'value',
  3758. axisLine: {
  3759. show: false,
  3760. },
  3761. splitLine: {
  3762. show: false,
  3763. },
  3764. axisLabel: {
  3765. show: true,
  3766. formatter: '{value} %',
  3767. textStyle: {
  3768. color: 'rgba(250,250,250,0.6)',
  3769. },
  3770. },
  3771. },
  3772. ],
  3773. series: [
  3774. {
  3775. type: 'bar',
  3776. name: '投资金额',
  3777. barWidth: 15,
  3778. itemStyle: {
  3779. normal: {
  3780. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  3781. {
  3782. offset: 0,
  3783. color: '#69c0ff',
  3784. },
  3785. {
  3786. offset: 1,
  3787. color: '#082550',
  3788. },
  3789. ]),
  3790. },
  3791. },
  3792. data: center6.map(item => item.value),
  3793. },
  3794. ],
  3795. }
  3796. myChart.on('click', function (param) {
  3797. window.location.href = './investHomeChild.html?type=2'
  3798. })
  3799. myChart.setOption(option)
  3800. tools.loopShowTooltip(myChart, option, {
  3801. nterval: 2000,
  3802. loopSeries: true,
  3803. })
  3804. },
  3805. initChartC4 () {
  3806. var chartData = []
  3807. var timer = null;
  3808. var timer2 = null;
  3809. var i = 0;
  3810. center7.forEach((item, index) => {
  3811. let obj = {
  3812. name: item.name,
  3813. y: item.value2,
  3814. num: item.value,
  3815. sliced: false,
  3816. selected: false,
  3817. color: index == 0 ? '#43ede3' : '#8ba2ff'
  3818. }
  3819. chartData.push(obj)
  3820. })
  3821. let that = this
  3822. var chart = Highcharts.chart('echartC4', {
  3823. chart: {
  3824. type: 'pie',
  3825. backgroundColor: 'rgba(0,0,0,0)',
  3826. options3d: {
  3827. enabled: true,
  3828. alpha: 45,
  3829. //beta: 0
  3830. },
  3831. events: {
  3832. // load,图表加载完成时触发
  3833. load: function () {
  3834. var chart = this;
  3835. var points = chart.series[0].points;
  3836. var len = points.length;
  3837. timer && clearInterval(timer);
  3838. timer = setInterval(function () {
  3839. autoTooltip(points[i]);
  3840. chartData.forEach((item, index) => {
  3841. item.sliced = false
  3842. item.selected = false
  3843. if (index == i) {
  3844. item.sliced = true
  3845. item.selected = true
  3846. }
  3847. })
  3848. chart.update({
  3849. series: [{
  3850. type: 'pie',
  3851. name: '占比',
  3852. point: {
  3853. events: {
  3854. click: function (e) {
  3855. that.showChartLTipDouble(e.point.name)
  3856. }
  3857. }
  3858. },
  3859. data: chartData
  3860. }]
  3861. })
  3862. i++;
  3863. if (i === len) {
  3864. i = 0;
  3865. chartData.forEach((item, index) => {
  3866. item.sliced = false
  3867. item.selected = false
  3868. })
  3869. chart.update({
  3870. series: [{
  3871. type: 'pie',
  3872. name: '占比',
  3873. point: {
  3874. events: {
  3875. click: function (e) {
  3876. that.showChartLTipDouble(e.point.name)
  3877. }
  3878. }
  3879. },
  3880. data: chartData
  3881. }]
  3882. })
  3883. }
  3884. }, 2000);
  3885. },
  3886. legendItemClick: function (event) {
  3887. console.log(event);
  3888. return true;
  3889. }
  3890. }
  3891. },
  3892. credits: {
  3893. enabled: false //去掉hightchats水印
  3894. },
  3895. title: {
  3896. text: null
  3897. },
  3898. tooltip: {
  3899. crosshairs: true,
  3900. backgroundColor: 'rgba(0,0,0,0.5)',
  3901. // positioner: function(e){
  3902. // console.log(e, this)
  3903. // },
  3904. useHTML: false, //开启html模式
  3905. style: {
  3906. color: '#fff',
  3907. fontSize: '20'
  3908. },
  3909. formatter: function (e) {
  3910. //console.log(this)
  3911. let num = chartData[this.colorIndex].num
  3912. this.percentage = Math.round(this.percentage)
  3913. return `${this.key}:<b>${this.percentage}%</b><br/>投资完成额:<b>${this.y}</b>亿<br/>投资数量:<b>${num}个</b>`
  3914. },
  3915. //pointFormat:
  3916. },
  3917. legend: {
  3918. layout: 'vertical',
  3919. align: 'right',
  3920. verticalAlign: 'bottom',
  3921. itemStyle: {
  3922. fontSize: '20px',
  3923. color: '#fff',
  3924. x: 20
  3925. }
  3926. },
  3927. plotOptions: {
  3928. pie: {
  3929. allowPointSelect: true,
  3930. showInLegend: true, // 图例
  3931. cursor: 'pointer',
  3932. size: 500,
  3933. innerSize: 300, //环形图中间空白,0为饼图
  3934. depth: 28, //立体高度
  3935. slicedOffset: 23, //动画距离
  3936. dataLabels: {
  3937. enabled: false, // 是否展示指示线
  3938. format: '{point.name}: {point.percentage}'
  3939. }
  3940. },
  3941. },
  3942. series: [{
  3943. type: 'pie',
  3944. name: '占比',
  3945. center: ['60%', '50%'],
  3946. point: {
  3947. events: {
  3948. click: function (e) { //点击事件
  3949. that.showChartLTipDouble(e.point.name)
  3950. },
  3951. mouseOver: function (e) { //鼠标移入停止轮播并且找到移入的当前数据设为选中
  3952. //console.log(e)
  3953. chartData.forEach((item, index) => {
  3954. item.sliced = false
  3955. item.selected = false
  3956. })
  3957. chartData[e.target.index].sliced = true
  3958. chartData[e.target.index].selected = true
  3959. chart.update({
  3960. series: [{
  3961. type: 'pie',
  3962. name: '占比',
  3963. point: {
  3964. events: {
  3965. click: function (e) {
  3966. that.showChartLTipDouble(e.point.name)
  3967. }
  3968. }
  3969. },
  3970. data: chartData
  3971. }]
  3972. })
  3973. timer && clearInterval(timer);
  3974. },
  3975. mouseOut: function () { // 鼠标移出后需要继续执行轮播
  3976. var points = chart.series[0].points;
  3977. var len = points.length;
  3978. timer && clearInterval(timer);
  3979. timer = setInterval(function () {
  3980. autoTooltip(points[i]);
  3981. chartData.forEach((item, index) => {
  3982. item.sliced = false
  3983. item.selected = false
  3984. if (index == i) {
  3985. item.sliced = true
  3986. item.selected = true
  3987. }
  3988. })
  3989. chart.update({
  3990. series: [{
  3991. type: 'pie',
  3992. name: '占比',
  3993. point: {
  3994. events: {
  3995. click: function (e) {
  3996. that.showChartLTipDouble(e.point.name)
  3997. }
  3998. }
  3999. },
  4000. data: chartData
  4001. }]
  4002. })
  4003. i++;
  4004. if (i === len) {
  4005. i = 0;
  4006. chartData.forEach((item, index) => {
  4007. item.sliced = false
  4008. item.selected = false
  4009. })
  4010. chart.update({
  4011. series: [{
  4012. type: 'pie',
  4013. name: '占比',
  4014. point: {
  4015. events: {
  4016. click: function (e) {
  4017. that.showChartLTipDouble(e.point.name)
  4018. }
  4019. }
  4020. },
  4021. data: chartData
  4022. }]
  4023. })
  4024. }
  4025. }, 2000);
  4026. }
  4027. }
  4028. },
  4029. data: chartData
  4030. }]
  4031. });
  4032. function autoTooltip (point) {
  4033. chart.tooltip.refresh(point);
  4034. }
  4035. },
  4036. initProjectList () {
  4037. let dataList = []
  4038. center8.map(item => {
  4039. dataList.push([item.office, item.name, item.value + '亿'])
  4040. })
  4041. this.storageRecordConfig2.data = dataList
  4042. this.storageRecordConfig2 = { ...this.storageRecordConfig2 }
  4043. },
  4044. // 大屏三
  4045. initChartR1 () {
  4046. let that = this
  4047. let myChart = echarts.init(this.$refs['echartR1'])
  4048. myChart.on('showTip', (params) => {
  4049. // 如果是7或者15并且满足防抖则切换
  4050. if ((params.dataIndex == 5 || params.dataIndex == 11) && that.echartR1Fd) {
  4051. that.echartR1Fd = false
  4052. setTimeout(() => {
  4053. option.dataZoom[0].endValue = option.dataZoom[0].endValue + 6
  4054. option.dataZoom[0].startValue = option.dataZoom[0].startValue + 6
  4055. myChart.setOption(option);
  4056. // 防止勿刷新做的防抖
  4057. setTimeout(() => {
  4058. that.echartR1Fd = true
  4059. }, 2000)
  4060. }, 1900);
  4061. // 如果是17表示到了最后一个,那么重新来一遍
  4062. } else if (params.dataIndex == 17 && that.echartR1Fd) {
  4063. that.echartR1Fd = false
  4064. setTimeout(() => {
  4065. option.dataZoom[0].endValue = 0
  4066. option.dataZoom[0].startValue = 5
  4067. myChart.setOption(option);
  4068. // 防止勿刷新做的防抖
  4069. setTimeout(() => {
  4070. that.echartR1Fd = true
  4071. }, 2000)
  4072. }, 1900)
  4073. }
  4074. })
  4075. let option = {
  4076. tooltip: {
  4077. formatter: data => {
  4078. 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}亿`
  4079. },
  4080. textStyle: {
  4081. color: '#FFF', // 文字的颜色
  4082. fontSize: '20', // 文字字体大小
  4083. },
  4084. trigger: 'axis',
  4085. axisPointer: {
  4086. type: 'cross',
  4087. },
  4088. },
  4089. dataZoom: [
  4090. {
  4091. // start: 9,//默认为@
  4092. // end: 100,//黑认认为1@0
  4093. type: "slider",
  4094. show: false,
  4095. // xAxisIndex: [0]
  4096. handlesize: 0,//滑动条的 左右2个滑动条的大小
  4097. startValue: 5,// 初始显示值
  4098. endValue: 0,// 结束显示值
  4099. height: 10,//组件高度
  4100. left: "5%",
  4101. right: "4%",//右边的距离
  4102. bottom: "25%",//底边的距离
  4103. borderColor: "#939",
  4104. fillerColor: "#269cdb",
  4105. borderRadius: 5,
  4106. backgroundColor: "#33384b",//两边未选中的滑动条区域的额色
  4107. showDataShadow: false,//是否显示数据阴影
  4108. showDetail: false,//即拖拽时候是否显示详细数值信息
  4109. truerealtime: true,//是否实时更新
  4110. filterMode: "filter"
  4111. }, {
  4112. type: 'inside',
  4113. show: true,
  4114. start: 1,
  4115. end: 100,
  4116. zoomOnMouseWheel: false, //滚轮是否触发缩放
  4117. moveOnMouseMove: false, //鼠标滚轮触发滚动
  4118. }
  4119. ],
  4120. grid: {
  4121. top: '10%',
  4122. right: '3%',
  4123. left: '5%',
  4124. bottom: '5%',
  4125. },
  4126. legend: {
  4127. data: ["预算额", "已签合同额", '产值认定额', '结算额', '付款额'],
  4128. x: 'center',
  4129. y: '20px',
  4130. textStyle: {
  4131. color: '#fff',
  4132. fontSize: "20",
  4133. },
  4134. },
  4135. xAxis: {
  4136. data: right4.map(item => item.name),
  4137. axisLine: {
  4138. show: true, //隐藏X轴轴线
  4139. lineStyle: {
  4140. color: '#005094',
  4141. width: 1,
  4142. },
  4143. },
  4144. axisTick: {
  4145. show: false, //隐藏X轴刻度
  4146. },
  4147. axisLabel: {
  4148. show: true,
  4149. // rotate: 40,
  4150. textStyle: {
  4151. color: '#fff',//'rgba(255,255,255,0.6)', //X轴文字颜色
  4152. fontSize: "15",
  4153. },
  4154. },
  4155. },
  4156. yAxis: [
  4157. {
  4158. type: 'value',
  4159. name: '亿元',
  4160. nameTextStyle: {
  4161. color: 'rgba(255,255,255,0.6)',
  4162. },
  4163. splitLine: {
  4164. show: true,
  4165. lineStyle: {
  4166. color: '#68b4dd66',
  4167. type: 'dashed',
  4168. },
  4169. },
  4170. axisLine: {
  4171. show: true,
  4172. lineStyle: {
  4173. color: '#3D7495',
  4174. },
  4175. },
  4176. axisLabel: {
  4177. show: true,
  4178. textStyle: {
  4179. color: '#fff',
  4180. fontSize: "15",
  4181. },
  4182. },
  4183. nameTextStyle: {
  4184. color: '#fff',
  4185. fontSize: 15,
  4186. },
  4187. },
  4188. ],
  4189. series: [
  4190. {
  4191. name: '预算额',
  4192. type: 'bar',
  4193. barWidth: 10,
  4194. itemStyle: {
  4195. normal: {
  4196. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4197. {
  4198. offset: 0,
  4199. color: '#71D5FF',
  4200. },
  4201. {
  4202. offset: 1,
  4203. color: '#082550',
  4204. },
  4205. ]),
  4206. },
  4207. },
  4208. data: right4.map(item => item.value),
  4209. },
  4210. {
  4211. name: '已签合同额',
  4212. type: 'bar',
  4213. barWidth: 10,
  4214. itemStyle: {
  4215. normal: {
  4216. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4217. {
  4218. offset: 0,
  4219. color: '#4D6FF6',
  4220. },
  4221. {
  4222. offset: 1,
  4223. color: '#082550',
  4224. },
  4225. ]),
  4226. },
  4227. },
  4228. data: right4.map(item => item.value2),
  4229. },
  4230. {
  4231. name: '产值认定额',
  4232. type: 'bar',
  4233. barWidth: 10,
  4234. itemStyle: {
  4235. normal: {
  4236. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4237. {
  4238. offset: 0,
  4239. color: '#877CFC',
  4240. },
  4241. {
  4242. offset: 1,
  4243. color: '#082550',
  4244. },
  4245. ]),
  4246. },
  4247. },
  4248. data: right4.map(item => item.value),
  4249. },
  4250. {
  4251. name: '结算额',
  4252. type: 'bar',
  4253. barWidth: 10,
  4254. itemStyle: {
  4255. normal: {
  4256. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4257. {
  4258. offset: 0,
  4259. color: '#52BF80',
  4260. },
  4261. {
  4262. offset: 1,
  4263. color: '#082550',
  4264. },
  4265. ]),
  4266. },
  4267. },
  4268. data: right4.map(item => item.value2),
  4269. },
  4270. {
  4271. name: '付款额',
  4272. type: 'bar',
  4273. barWidth: 10,
  4274. itemStyle: {
  4275. normal: {
  4276. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4277. {
  4278. offset: 0,
  4279. color: '#CADD62',
  4280. },
  4281. {
  4282. offset: 1,
  4283. color: '#082550',
  4284. },
  4285. ]),
  4286. },
  4287. },
  4288. data: right4.map(item => item.value),
  4289. },
  4290. ],
  4291. }
  4292. myChart.on('click', function (param) {
  4293. window.location.href = './investHomeChild.html?type=2'
  4294. })
  4295. myChart.setOption(option)
  4296. tools.loopShowTooltip(myChart, option, {
  4297. interval: 2000,
  4298. loopSeries: true,
  4299. })
  4300. },
  4301. initChartR2 () {
  4302. let that = this
  4303. const itemStyle = {
  4304. // opacity: 0.8,
  4305. shadowBlur: 10,
  4306. shadowOffsetX: 0,
  4307. shadowOffsetY: 0,
  4308. shadowColor: 'rgba(0,0,0,0.3)'
  4309. };
  4310. let myChart = echarts.init(this.$refs['echartR2'])
  4311. myChart.on('showTip', (params) => {
  4312. // 如果是7或者15并且满足防抖则切换
  4313. if ((params.dataIndex == 5 || params.dataIndex == 11) && that.echartR2Fd) {
  4314. that.echartR2Fd = false
  4315. setTimeout(() => {
  4316. option.dataZoom[0].endValue = option.dataZoom[0].endValue + 6
  4317. option.dataZoom[0].startValue = option.dataZoom[0].startValue + 6
  4318. myChart.setOption(option);
  4319. // 防止勿刷新做的防抖
  4320. setTimeout(() => {
  4321. that.echartR2Fd = true
  4322. }, 2000)
  4323. }, 1900);
  4324. // 如果是17表示到了最后一个,那么重新来一遍
  4325. } else if (params.dataIndex == 17 && that.echartR2Fd) {
  4326. that.echartR2Fd = false
  4327. setTimeout(() => {
  4328. option.dataZoom[0].endValue = 0
  4329. option.dataZoom[0].startValue = 5
  4330. myChart.setOption(option);
  4331. // 防止勿刷新做的防抖
  4332. setTimeout(() => {
  4333. that.echartR2Fd = true
  4334. }, 2000)
  4335. }, 1900)
  4336. }
  4337. })
  4338. let option = {
  4339. color: ['#80F1BE', '#fec42c', '#dd4444'],
  4340. title: {
  4341. textStyle: {
  4342. color: '#69C0FF',
  4343. fontSize: 16,
  4344. fontWeight: 500
  4345. },
  4346. top: '10',
  4347. left: '10'
  4348. },
  4349. dataZoom: [
  4350. {
  4351. // start: 9,//默认为@
  4352. // end: 100,//黑认认为1@0
  4353. type: "slider",
  4354. show: false,
  4355. // xAxisIndex: [0]
  4356. handlesize: 0,//滑动条的 左右2个滑动条的大小
  4357. startValue: 5,// 初始显示值
  4358. endValue: 0,// 结束显示值
  4359. height: 10,//组件高度
  4360. left: "5%",
  4361. right: "4%",//右边的距离
  4362. bottom: "25%",//底边的距离
  4363. borderColor: "#939",
  4364. fillerColor: "#269cdb",
  4365. borderRadius: 5,
  4366. backgroundColor: "#33384b",//两边未选中的滑动条区域的额色
  4367. showDataShadow: false,//是否显示数据阴影
  4368. showDetail: false,//即拖拽时候是否显示详细数值信息
  4369. truerealtime: true,//是否实时更新
  4370. filterMode: "filter"
  4371. }, {
  4372. type: 'inside',
  4373. show: true,
  4374. start: 1,
  4375. end: 100,
  4376. zoomOnMouseWheel: false, //滚轮是否触发缩放
  4377. moveOnMouseMove: false, //鼠标滚轮触发滚动
  4378. }
  4379. ],
  4380. legend: {
  4381. top: 10,
  4382. data: ['正偏差', '容差', '负偏差'],
  4383. textStyle: {
  4384. fontSize: 20,
  4385. color: '#fff'
  4386. }
  4387. },
  4388. textStyle: {
  4389. color: '#fff',
  4390. },
  4391. tooltip: {
  4392. show: true,
  4393. trigger: "axis",
  4394. textStyle: {
  4395. color: '#FFF', // 文字的颜色
  4396. fontSize: '20', // 文字字体大小
  4397. },
  4398. formatter: data => {
  4399. 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]}亿`
  4400. },
  4401. axisPointer: {
  4402. type: 'cross',
  4403. },
  4404. // axisPointer: {
  4405. // lineStyle: {
  4406. // type: 'dashed',
  4407. // width: 2,
  4408. // color: 'rgba(255,255,255,0.6)'
  4409. // },
  4410. // animation: true
  4411. // }
  4412. },
  4413. grid: {
  4414. top: '10%',
  4415. right: '4%',
  4416. left: '5%',
  4417. bottom: '5%',
  4418. },
  4419. yAxis: {
  4420. name: '亿元',
  4421. splitLine: {
  4422. show: true,
  4423. lineStyle: {
  4424. color: '#68b4dd66',
  4425. type: 'dashed',
  4426. },
  4427. },
  4428. axisLine: {
  4429. show: false
  4430. },
  4431. axisLabel: {
  4432. show: true,
  4433. formatter: '{value}',
  4434. textStyle: {
  4435. color: '#fff',
  4436. fontSize: '15'
  4437. },
  4438. },
  4439. nameTextStyle: {
  4440. color: '#fff',
  4441. fontSize: 15,
  4442. },
  4443. },
  4444. xAxis: {
  4445. data: right5[0].map(item => item[0]),
  4446. axisLine: {
  4447. show: true, //隐藏X轴轴线
  4448. lineStyle: {
  4449. color: '#005094',
  4450. width: 1,
  4451. },
  4452. },
  4453. splitLine: {
  4454. show: true,
  4455. lineStyle: {
  4456. color: '#68b4dd66',
  4457. type: 'dashed',
  4458. },
  4459. },
  4460. axisTick: {
  4461. show: false, //隐藏X轴刻度
  4462. },
  4463. axisLabel: {
  4464. show: true,
  4465. // rotate: 40,
  4466. padding: [0, 0, 0, 0],
  4467. textStyle: {
  4468. color: '#fff', //X轴文字颜色
  4469. fontSize: 15,
  4470. },
  4471. },
  4472. },
  4473. series: [
  4474. {
  4475. name: '正偏差',
  4476. type: 'scatter',
  4477. itemStyle: itemStyle,
  4478. data: right5[0],
  4479. symbolSize: function (data) {
  4480. return Math.sqrt(data[1]) * 9;
  4481. },
  4482. },
  4483. {
  4484. name: '容差',
  4485. type: 'scatter',
  4486. itemStyle: itemStyle,
  4487. data: right5[1],
  4488. symbolSize: function (data) {
  4489. return Math.sqrt(data[1]) * 8;
  4490. },
  4491. },
  4492. {
  4493. name: '负偏差',
  4494. type: 'scatter',
  4495. itemStyle: itemStyle,
  4496. data: right5[2],
  4497. symbolSize: function (data) {
  4498. return Math.sqrt(data[1]) * 7;
  4499. },
  4500. }
  4501. ]
  4502. }
  4503. myChart.on('click', function (param) {
  4504. that.showChartLTipDouble(param.name)
  4505. })
  4506. myChart.setOption(option)
  4507. tools.loopShowTooltip(myChart, option, {
  4508. interval: 2000,
  4509. loopSeries: true,
  4510. })
  4511. },
  4512. initChartR3 () {
  4513. let that = this
  4514. let myChart = echarts.init(this.$refs['echartR3'])
  4515. myChart.on('showTip', (params) => {
  4516. // 如果是7或者15并且满足防抖则切换
  4517. if ((params.dataIndex == 5 || params.dataIndex == 11) && that.echartR3Fd) {
  4518. that.echartR3Fd = false
  4519. setTimeout(() => {
  4520. option.dataZoom[0].endValue = option.dataZoom[0].endValue + 6
  4521. option.dataZoom[0].startValue = option.dataZoom[0].startValue + 6
  4522. myChart.setOption(option);
  4523. // 防止勿刷新做的防抖
  4524. setTimeout(() => {
  4525. that.echartR3Fd = true
  4526. }, 2000)
  4527. }, 7900);
  4528. // 如果是17表示到了最后一个,那么重新来一遍
  4529. } else if (params.dataIndex == 17 && that.echartR3Fd) {
  4530. that.echartR3Fd = false
  4531. setTimeout(() => {
  4532. option.dataZoom[0].endValue = 0
  4533. option.dataZoom[0].startValue = 5
  4534. myChart.setOption(option);
  4535. // 防止勿刷新做的防抖
  4536. setTimeout(() => {
  4537. that.echartR3Fd = true
  4538. }, 2000)
  4539. }, 7900)
  4540. }
  4541. })
  4542. let option = {
  4543. tooltip: {
  4544. formatter: data => {
  4545. 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}亿`
  4546. },
  4547. trigger: 'axis',
  4548. axisPointer: {
  4549. type: 'cross',
  4550. },
  4551. position: (params) => {
  4552. return [params[0] + 10, 60]
  4553. },
  4554. textStyle: {
  4555. color: '#FFF', // 文字的颜色
  4556. fontSize: '20', // 文字字体大小
  4557. },
  4558. confine: true
  4559. },
  4560. dataZoom: [
  4561. {
  4562. // start: 9,//默认为@
  4563. // end: 100,//黑认认为1@0
  4564. type: "slider",
  4565. show: false,
  4566. // xAxisIndex: [0]
  4567. handlesize: 0,//滑动条的 左右2个滑动条的大小
  4568. startValue: 5,// 初始显示值
  4569. endValue: 0,// 结束显示值
  4570. height: 10,//组件高度
  4571. left: "5%",
  4572. right: "4%",//右边的距离
  4573. bottom: "25%",//底边的距离
  4574. borderColor: "#939",
  4575. fillerColor: "#269cdb",
  4576. borderRadius: 5,
  4577. backgroundColor: "#33384b",//两边未选中的滑动条区域的额色
  4578. showDataShadow: false,//是否显示数据阴影
  4579. showDetail: false,//即拖拽时候是否显示详细数值信息
  4580. truerealtime: true,//是否实时更新
  4581. filterMode: "filter"
  4582. }, {
  4583. type: 'inside',
  4584. show: true,
  4585. start: 1,
  4586. end: 100,
  4587. zoomOnMouseWheel: false, //滚轮是否触发缩放
  4588. moveOnMouseMove: false, //鼠标滚轮触发滚动
  4589. }
  4590. ],
  4591. grid: {
  4592. top: '25%',
  4593. right: '3%',
  4594. left: '10%',
  4595. bottom: '15%',
  4596. },
  4597. legend: {
  4598. data: ["高风险", "中风险", '低风险'],
  4599. x: 'center',
  4600. y: '15px',
  4601. textStyle: {
  4602. // color: 'rgba(250,250,250,0.6)',
  4603. color: '#fff',
  4604. fontSize: "20",
  4605. },
  4606. },
  4607. xAxis: {
  4608. data: right4.map(item => item.name),
  4609. axisLine: {
  4610. show: true, //隐藏X轴轴线
  4611. lineStyle: {
  4612. color: '#005094',
  4613. width: 1,
  4614. },
  4615. },
  4616. axisTick: {
  4617. show: false, //隐藏X轴刻度
  4618. },
  4619. axisLabel: {
  4620. show: true,
  4621. rotate: 40,
  4622. textStyle: {
  4623. color: '#fff',//'rgba(255,255,255,0.6)', //X轴文字颜色
  4624. fontSize: '15'
  4625. },
  4626. },
  4627. },
  4628. yAxis: [
  4629. {
  4630. type: 'value',
  4631. name: '亿元',
  4632. nameTextStyle: {
  4633. color: 'rgba(255,255,255,0.6)',
  4634. },
  4635. splitLine: {
  4636. show: true,
  4637. lineStyle: {
  4638. color: '#68b4dd66',
  4639. type: 'dashed',
  4640. },
  4641. },
  4642. axisLine: {
  4643. show: true,
  4644. lineStyle: {
  4645. color: '#3D7495',
  4646. },
  4647. },
  4648. axisLabel: {
  4649. show: true,
  4650. textStyle: {
  4651. color: '#fff',
  4652. fontSize: '15'
  4653. },
  4654. },
  4655. nameTextStyle: {
  4656. color: '#fff',
  4657. fontSize: 15,
  4658. },
  4659. },
  4660. ],
  4661. series: [
  4662. {
  4663. name: '高风险',
  4664. type: 'bar',
  4665. stack: 'Ad',
  4666. barWidth: 10,
  4667. itemStyle: {
  4668. normal: {
  4669. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4670. {
  4671. offset: 0,
  4672. color: '#CADD62',
  4673. },
  4674. {
  4675. offset: 1,
  4676. color: '#082550',
  4677. },
  4678. ]),
  4679. },
  4680. },
  4681. data: right6.map(item => item.value),
  4682. },
  4683. {
  4684. name: '中风险',
  4685. type: 'bar',
  4686. stack: 'Ad',
  4687. barWidth: 10,
  4688. itemStyle: {
  4689. normal: {
  4690. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4691. {
  4692. offset: 0,
  4693. color: '#4D6FF6',
  4694. },
  4695. {
  4696. offset: 1,
  4697. color: '#082550',
  4698. },
  4699. ]),
  4700. },
  4701. },
  4702. data: right6.map(item => item.value2),
  4703. },
  4704. {
  4705. name: '低风险',
  4706. type: 'bar',
  4707. stack: 'Ad',
  4708. barWidth: 10,
  4709. itemStyle: {
  4710. normal: {
  4711. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4712. {
  4713. offset: 0,
  4714. color: '#52BF80',
  4715. },
  4716. {
  4717. offset: 1,
  4718. color: '#082550',
  4719. },
  4720. ]),
  4721. },
  4722. },
  4723. data: right6.map(item => item.value3),
  4724. },
  4725. ],
  4726. }
  4727. myChart.setOption(option)
  4728. tools.loopShowTooltip(myChart, option, {
  4729. interval: 8000,
  4730. loopSeries: true,
  4731. })
  4732. },
  4733. initChartR4 () {
  4734. let myChart = echarts.init(this.$refs['echartR4'])
  4735. option = {
  4736. title: {
  4737. text: ''
  4738. },
  4739. // legend: {
  4740. // data: ['安全风险', '付款风险', '合同风险', '结算风险', '进度风险', '质量风险'],
  4741. // textStyle: {
  4742. // color: '#9DB9EB',
  4743. // },
  4744. // top: 'center',
  4745. // right:'50',
  4746. // orient: 'vertical', // vertical 竖着
  4747. // },
  4748. radar: {
  4749. // shape: 'circle',
  4750. center: ['50%', '50%'],
  4751. radius: 135,
  4752. indicator: [
  4753. { name: '安全风险', max: 100000 },
  4754. { name: '付款风险', max: 100000 },
  4755. { name: '合同风险', max: 100000 },
  4756. { name: '结算风险', max: 100000 },
  4757. { name: '进度风险', max: 100000 },
  4758. { name: '质量风险', max: 100000 },
  4759. ],
  4760. axisLine: { // 设置雷达图中间射线的颜色
  4761. lineStyle: {
  4762. color: '#887d33',
  4763. },
  4764. },
  4765. splitLine: { //网格颜色设置
  4766. show: true,
  4767. lineStyle: {
  4768. width: 1,
  4769. color: ['#871b1a', '#638f41', '#d29e35', '#b6802b']
  4770. // color: '#000',
  4771. // color:(color)=>{
  4772. // }
  4773. },
  4774. },
  4775. name: { //修改indicator文字的颜色
  4776. textStyle: {
  4777. color: "#fff",
  4778. fontSize: '20'
  4779. }
  4780. },
  4781. splitNumber: 4, //有几个圈
  4782. splitArea: { //设置图表颜色,show的值为true
  4783. show: true,
  4784. areaStyle: {
  4785. // color:"#c1ddf8", //一般设置方式
  4786. //设置渐变背景色 new echarts.graphic.LinearGradient(a,b,c,d,arr)
  4787. //a ,b,c,d值可为0,1 a:1表示arr中的颜色右到左;c:1 arr中的颜色左到右
  4788. //b:1表示arr中的颜色下到上;d:1表示arr中的颜色上到下
  4789. // color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  4790. // { offset: 0, color: '#887D33' }, // 0% 处的颜色
  4791. // { offset: 0.75, color: '#7D4216' }, // 0% 处的颜色
  4792. // { offset: 1, color: '#430705' }// 100% 处的颜色
  4793. // ], false)
  4794. color: ['#638f41', '#887d33', '#7d4216', '#430705'],
  4795. }
  4796. }
  4797. },
  4798. series: [
  4799. {
  4800. name: '',
  4801. type: 'radar',
  4802. symbol: 'circle', // 单个数值点的样式,还可以取值'rect','angle'等
  4803. symbolSize: 0, // 数值点的大小
  4804. data: [
  4805. {
  4806. value: right7[0],
  4807. name: '安全风险',
  4808. itemStyle: { //该数值区域样式设置
  4809. normal: {
  4810. color: 'rgb(44,198,255,0.8)', //背景颜色,还需设置areaStyle
  4811. lineStyle: {
  4812. color: 'rgb(44,198,255,0.8)', //边框颜色
  4813. },
  4814. },
  4815. },
  4816. label: { //显示value中具体的数值
  4817. normal: {
  4818. show: false,
  4819. textStyle: { //更改数值样式
  4820. color: '#43EDE3'
  4821. }
  4822. },
  4823. },
  4824. areaStyle: { //设置区域背景颜色透明度
  4825. normal: {
  4826. width: 1,
  4827. opacity: 0.8,
  4828. },
  4829. },
  4830. }
  4831. ]
  4832. }
  4833. ]
  4834. };
  4835. // tools.loopShowTooltip(myChart, option, {
  4836. // interval: 2000,
  4837. // loopSeries: true,
  4838. // });
  4839. myChart.setOption(option)
  4840. },
  4841. initChartR5 () {
  4842. let myChart = echarts.init(this.$refs['echartR5'])
  4843. let option = {
  4844. tooltip: {
  4845. formatter: data => {
  4846. 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}亿`
  4847. },
  4848. trigger: 'axis',
  4849. axisPointer: {
  4850. type: 'cross',
  4851. },
  4852. textStyle: {
  4853. color: '#FFF', // 文字的颜色
  4854. fontSize: '20', // 文字字体大小
  4855. },
  4856. },
  4857. grid: {
  4858. top: '15%',
  4859. right: '3%',
  4860. left: '5%',
  4861. bottom: '35',
  4862. },
  4863. legend: {
  4864. data: ["预算额", "合同额", "结算额", "支付额"],
  4865. x: 'center',
  4866. y: '10px',
  4867. textStyle: {
  4868. // color: 'rgba(250,250,250,0.6)',
  4869. color: '#fff',
  4870. fontSize: "20",
  4871. },
  4872. },
  4873. xAxis: {
  4874. data: ['设备费', '设计费', '施工费', '材料费'],
  4875. axisLine: {
  4876. show: true, //隐藏X轴轴线
  4877. lineStyle: {
  4878. color: '#005094',
  4879. width: 1,
  4880. },
  4881. },
  4882. axisTick: {
  4883. show: false, //隐藏X轴刻度
  4884. },
  4885. axisLabel: {
  4886. show: true,
  4887. // rotate: 40,
  4888. textStyle: {
  4889. color: '#fff',//'rgba(255,255,255,0.6)', //X轴文字颜色
  4890. fontSize: '15', // 文字字体大小
  4891. },
  4892. },
  4893. },
  4894. yAxis: [
  4895. {
  4896. type: 'value',
  4897. name: '亿元',
  4898. nameTextStyle: {
  4899. color: 'rgba(255,255,255,0.6)',
  4900. },
  4901. splitLine: {
  4902. show: true,
  4903. lineStyle: {
  4904. color: '#68b4dd66',
  4905. type: 'dashed',
  4906. },
  4907. },
  4908. axisLine: {
  4909. show: true,
  4910. lineStyle: {
  4911. color: '#3D7495',
  4912. },
  4913. },
  4914. axisLabel: {
  4915. show: true,
  4916. textStyle: {
  4917. color: '#fff',
  4918. fontSize: '15', // 文字字体大小
  4919. },
  4920. },
  4921. nameTextStyle: {
  4922. color: '#fff',
  4923. fontSize: 15,
  4924. },
  4925. },
  4926. ],
  4927. series: [
  4928. {
  4929. name: '预算额',
  4930. type: 'bar',
  4931. barWidth: 10,
  4932. itemStyle: {
  4933. normal: {
  4934. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4935. {
  4936. offset: 0,
  4937. color: '#71D5FF',
  4938. },
  4939. {
  4940. offset: 1,
  4941. color: '#082550',
  4942. },
  4943. ]),
  4944. },
  4945. },
  4946. data: right8.map(item => item.value),
  4947. },
  4948. {
  4949. name: '合同额',
  4950. type: 'bar',
  4951. barWidth: 10,
  4952. itemStyle: {
  4953. normal: {
  4954. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4955. {
  4956. offset: 0,
  4957. color: '#4D6FF6',
  4958. },
  4959. {
  4960. offset: 1,
  4961. color: '#082550',
  4962. },
  4963. ]),
  4964. },
  4965. },
  4966. data: right8.map(item => item.value2),
  4967. },
  4968. {
  4969. name: '结算额',
  4970. type: 'bar',
  4971. barWidth: 10,
  4972. itemStyle: {
  4973. normal: {
  4974. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4975. {
  4976. offset: 0,
  4977. color: '#877CFC',
  4978. },
  4979. {
  4980. offset: 1,
  4981. color: '#082550',
  4982. },
  4983. ]),
  4984. },
  4985. },
  4986. data: right8.map(item => item.value3),
  4987. },
  4988. {
  4989. name: '支付额',
  4990. type: 'bar',
  4991. barWidth: 10,
  4992. itemStyle: {
  4993. normal: {
  4994. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4995. {
  4996. offset: 0,
  4997. color: '#52BF80',
  4998. },
  4999. {
  5000. offset: 1,
  5001. color: '#082550',
  5002. },
  5003. ]),
  5004. },
  5005. },
  5006. data: right8.map(item => item.value4),
  5007. },
  5008. ],
  5009. }
  5010. myChart.setOption(option)
  5011. tools.loopShowTooltip(myChart, option, {
  5012. interval: 2000,
  5013. loopSeries: true,
  5014. })
  5015. },
  5016. },
  5017. })