investHomeGroup.js 146 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987
  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:commonCompany,
  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: common3,
  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: common4,
  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: common5,
  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 = common2[0];
  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', shanxi)
  3206. var mapFeatures = echarts.getMap('shanxi').geoJson.features
  3207. mapFeatures.forEach(v => {
  3208. // 地区名称
  3209. var name = v.properties.name
  3210. // 地区经纬度
  3211. this.geoCoordMap[name] = v.properties.centroid
  3212. })
  3213. let option = {
  3214. tooltip: {
  3215. padding: 15,
  3216. enterable: true,
  3217. transitionDuration: 1,
  3218. formatter: (params, ticket, callback) => {
  3219. // 清空所有轮播
  3220. for (var k in this.geoCoordMap) {
  3221. this.mapChart.dispatchAction({
  3222. // type: 'geoUnSelect',
  3223. type: 'downplay',
  3224. name: k,
  3225. })
  3226. }
  3227. // 如果鼠标滑动到线线上面,则返回空
  3228. this.mapChart.dispatchAction({
  3229. // type: 'geoSelect',
  3230. type: 'highlight',
  3231. name: params.name,
  3232. })
  3233. if (params.componentSubType == 'lines') {
  3234. return
  3235. }
  3236. if (params.componentSubType == 'scatter') {
  3237. let tipHtml = `
  3238. <div class="tooltip-cont">
  3239. <p>项目数量:<span>${data[params.dataIndex].value2}个</span></p>
  3240. <p>总投资额:<span>${params.data.value[2]}亿</span></p>
  3241. </div>`
  3242. callback(ticket, tipHtml)
  3243. return tipHtml
  3244. }
  3245. if (params.componentSubType == 'map') {
  3246. let tipHtml = `
  3247. <div class="tooltip-cont">
  3248. <p>项目数量:<span>${data[params.dataIndex].value2}个</span></p>
  3249. <p>总投资额:<span>${params.data.value}亿</span></p>
  3250. </div>`
  3251. callback(ticket, tipHtml)
  3252. return tipHtml
  3253. }
  3254. },
  3255. },
  3256. visualMap: {
  3257. show: false,
  3258. min: 0,
  3259. max: 300,
  3260. right: 0,
  3261. bottom: 0,
  3262. text: ['高', '低'],
  3263. textStyle: {
  3264. color: '#f1f1f1'
  3265. },
  3266. realtime: false,
  3267. calculable: false,
  3268. inRange: {
  3269. color: ['lightskyblue', '#2754b7']
  3270. }
  3271. },
  3272. geo: {
  3273. show: true,
  3274. map: 'shanxi',
  3275. layoutCenter: ['50%', '50%'], //地图位置
  3276. layoutSize: '65%',
  3277. zoom: 1.5,
  3278. label: {
  3279. normal: {
  3280. show: false,
  3281. },
  3282. emphasis: {
  3283. show: false,
  3284. },
  3285. },
  3286. roam: false,
  3287. itemStyle: {
  3288. normal: {
  3289. areaColor: '#1946a8',
  3290. shadowColor: '#1946a8',
  3291. borderWidth: 1, //设置外层边框
  3292. borderColor: '#1946a8',
  3293. shadowOffsetX: 10,
  3294. shadowOffsetY: 5,
  3295. shadowBlur: 2,
  3296. },
  3297. emphasis: {
  3298. areaColor: '#1946a8',
  3299. borderColor: '#d4bc1d',
  3300. borderWidth: 2, //设置外层边框
  3301. },
  3302. },
  3303. },
  3304. series: [
  3305. {
  3306. name: '散点',
  3307. type: 'scatter',
  3308. coordinateSystem: 'geo',
  3309. data: this.convertData(data),
  3310. symbolSize: function (val) {
  3311. return 10
  3312. },
  3313. label: {
  3314. normal: {
  3315. formatter: '{b}',
  3316. position: [10, 10],
  3317. fontSize: 30,
  3318. fontWeight: 600,
  3319. fontStyle: 'italic',
  3320. color: '#fff',
  3321. show: true,
  3322. },
  3323. emphasis: {
  3324. show: true,
  3325. },
  3326. },
  3327. itemStyle: {
  3328. normal: {
  3329. color: '#000',
  3330. borderWidth: 2,
  3331. borderColor: '#fff',
  3332. },
  3333. },
  3334. },
  3335. {
  3336. type: 'map',
  3337. map: this.mapName,
  3338. geoIndex: 0,
  3339. aspectScale: 1.5, //长宽比
  3340. showLegendSymbol: true, // 存在legend时显示
  3341. label: {
  3342. normal: {
  3343. show: true,
  3344. },
  3345. emphasis: {
  3346. show: false,
  3347. textStyle: {
  3348. color: '#fff',
  3349. },
  3350. },
  3351. },
  3352. roam: true,
  3353. itemStyle: {
  3354. normal: {
  3355. areaColor: '#031525',
  3356. borderColor: '#3B5077',
  3357. },
  3358. emphasis: {
  3359. areaColor: '#2B91B7',
  3360. },
  3361. },
  3362. animation: false,
  3363. data: data,
  3364. },
  3365. {
  3366. name: '点',
  3367. type: 'scatter',
  3368. coordinateSystem: 'geo',
  3369. zlevel: 6,
  3370. },
  3371. {
  3372. name: 'Top 5',
  3373. type: 'effectScatter',
  3374. coordinateSystem: 'geo',
  3375. data: this.convertData(
  3376. data
  3377. .sort(function (a, b) {
  3378. return b.value - a.value
  3379. })
  3380. .slice(0, 5)
  3381. ),
  3382. symbolSize: function (val) {
  3383. return 15
  3384. },
  3385. showEffectOn: 'render',
  3386. rippleEffect: {
  3387. brushType: 'stroke',
  3388. },
  3389. hoverAnimation: true,
  3390. label: {
  3391. normal: {
  3392. formatter: '{b}',
  3393. position: 'left',
  3394. show: false,
  3395. },
  3396. },
  3397. itemStyle: {
  3398. normal: {
  3399. color: 'yellow',
  3400. shadowBlur: 10,
  3401. shadowColor: 'yellow',
  3402. },
  3403. },
  3404. zlevel: 1000,
  3405. },
  3406. // {
  3407. // name: '线路',
  3408. // type: 'lines',
  3409. // zlevel: 2,
  3410. // effect: {
  3411. // show: true,
  3412. // period: 4, //箭头指向速度,值越小速度越快
  3413. // trailLength: 0.02, //特效尾迹长度[0,1]值越大,尾迹越长重
  3414. // symbol: 'arrow', //箭头图标
  3415. // symbolSize: 5, //图标大小
  3416. // },
  3417. // lineStyle: {
  3418. // normal: {
  3419. // color: '#00FFFF',
  3420. // width: 1,
  3421. // type: 'dashed',
  3422. // opacity: 0.5, //尾迹线条透明度
  3423. // curveness: -0.3, //尾迹线条曲直度
  3424. // },
  3425. // },
  3426. // data: moveLine.normal,
  3427. // },
  3428. ],
  3429. }
  3430. let that = this
  3431. this.mapChart.on('click', function (params) {
  3432. if (params.name == '太原市') {
  3433. that.showChartLTipDouble('太原市')
  3434. }
  3435. })
  3436. tools.loopShowTooltip(this.mapChart, option, {
  3437. interval: 2000,
  3438. loopSeries: false,
  3439. });
  3440. this.mapChart.setOption(option)
  3441. },
  3442. initChinaChart () {
  3443. var data = []
  3444. /*获取地图数据*/
  3445. this.mapChart = echarts.init(this.$refs['echarts-map'])
  3446. echarts.registerMap('china', china)
  3447. var mapFeatures = echarts.getMap('china').geoJson.features
  3448. mapFeatures.forEach(v => {
  3449. // 地区名称
  3450. var name = v.properties.name
  3451. // 地区经纬度
  3452. // this.geoCoordMap[name] = v.properties.centroid
  3453. this.geoCoordMap[name] = v.properties.cp
  3454. data.push({ name: v.properties.name, value1: v.properties.cp[0], value2: v.properties.cp[1] })
  3455. })
  3456. // <p>当前阶段:<span>可论证阶段</span></p>
  3457. // <p>时间节点:<span>2021.10-2022.10</span></p>
  3458. let option = {
  3459. tooltip: {
  3460. padding: 15,
  3461. enterable: true,
  3462. transitionDuration: 1,
  3463. formatter: (params, ticket, callback) => {
  3464. // 清空所有轮播
  3465. for (var k in this.geoCoordMap) {
  3466. this.mapChart.dispatchAction({
  3467. // type: 'geoUnSelect',
  3468. type: 'downplay',
  3469. name: k,
  3470. })
  3471. }
  3472. // 如果鼠标滑动到线线上面,则返回空
  3473. this.mapChart.dispatchAction({
  3474. // type: 'geoSelect',
  3475. type: 'highlight',
  3476. name: params.name,
  3477. })
  3478. if (params.componentSubType == 'lines') {
  3479. return
  3480. }
  3481. if (params.componentSubType == 'scatter') {
  3482. let tipHtml = `
  3483. <div class="tooltip-cont">
  3484. <p>项目数量:<span>${data[params.dataIndex].value2}个</span></p>
  3485. <p>总投资额:<span>${params.data.value[2]}亿</span></p>
  3486. </div>`
  3487. callback(ticket, tipHtml)
  3488. return ''
  3489. return tipHtml
  3490. }
  3491. if (params.componentSubType == 'map') {
  3492. let tipHtml = `
  3493. <div class="tooltip-cont">
  3494. <p>项目数量:<span>${data[params.dataIndex].value2}个</span></p>
  3495. <p>总投资额:<span>${params.data.value}亿</span></p>
  3496. </div>`
  3497. callback(ticket, tipHtml)
  3498. return tipHtml
  3499. }
  3500. },
  3501. },
  3502. geo: {
  3503. show: true,
  3504. map: 'china',
  3505. layoutCenter: ['50%', '50%'], //地图位置
  3506. layoutSize: '65%',
  3507. zoom: 1.5,
  3508. label: {
  3509. normal: {
  3510. show: false,
  3511. },
  3512. emphasis: {
  3513. show: false,
  3514. },
  3515. },
  3516. roam: false,
  3517. itemStyle: {
  3518. normal: {
  3519. areaColor: '#70b0ea',
  3520. shadowColor: '#1946a8',
  3521. borderWidth: 1, //设置外层边框
  3522. borderColor: '#1946a8',
  3523. shadowOffsetX: 2,
  3524. shadowOffsetY: 1,
  3525. shadowBlur: 2,
  3526. },
  3527. emphasis: {
  3528. areaColor: '#1946a8',
  3529. borderColor: '#d4bc1d',
  3530. borderWidth: 2, //设置外层边框
  3531. },
  3532. },
  3533. },
  3534. series: [
  3535. {
  3536. name: '散点',
  3537. type: 'scatter',
  3538. coordinateSystem: 'geo',
  3539. data: this.convertData(data),
  3540. symbolSize: function (val) {
  3541. return 10
  3542. },
  3543. label: {
  3544. normal: {
  3545. formatter: '{b}',
  3546. position: [10, 10],
  3547. fontSize: 20,
  3548. fontWeight: 600,
  3549. // fontStyle: 'italic',
  3550. color: '#fff',
  3551. show: true,
  3552. },
  3553. emphasis: {
  3554. show: true,
  3555. },
  3556. },
  3557. itemStyle: {
  3558. normal: {
  3559. color: 'rgba(0,0,0,0)',
  3560. borderWidth: 2,
  3561. borderColor: '#fff',
  3562. },
  3563. },
  3564. },
  3565. ],
  3566. }
  3567. let that = this
  3568. this.mapChart.on('click', function (params) {
  3569. if (params.name == '山西') {
  3570. that.backShow = true
  3571. setTimeout(() => {
  3572. that.initProvinceChart()
  3573. })
  3574. }
  3575. })
  3576. tools.loopShowTooltip(this.mapChart, option, {
  3577. interval: 2000,
  3578. loopSeries: true,
  3579. })
  3580. this.mapChart.setOption(option)
  3581. },
  3582. initChartC3 () {
  3583. let myChart = echarts.init(this.$refs['echartC3'])
  3584. let option = {
  3585. tooltip: {
  3586. trigger: 'axis',
  3587. formatter: '{a0}:{c0}' + '亿元', //+ '<br/>'+ '{a1}:{c1}' + '%',
  3588. axisPointer: {
  3589. type: 'cross',
  3590. },
  3591. textStyle: {
  3592. color: '#FFF', // 文字的颜色
  3593. fontSize: '20', // 文字字体大小
  3594. },
  3595. },
  3596. grid: {
  3597. top: '8%',
  3598. right: '3%',
  3599. left: '7%',
  3600. bottom: '10%',
  3601. },
  3602. // legend: {
  3603. // top: '1',
  3604. // textStyle: {
  3605. // color: 'rgba(250,250,250,0.6)',
  3606. // },
  3607. // },
  3608. xAxis: {
  3609. data: center6.map(item => item.name),
  3610. axisLine: {
  3611. show: true, //隐藏X轴轴线
  3612. lineStyle: {
  3613. color: '#005094',
  3614. width: 1,
  3615. },
  3616. },
  3617. axisTick: {
  3618. show: false, //隐藏X轴刻度
  3619. },
  3620. axisLabel: {
  3621. show: true,
  3622. rotate: 20,
  3623. textStyle: {
  3624. color: '#fff',//'rgba(255,255,255,0.6)', //X轴文字颜色
  3625. fontSize: '15'
  3626. },
  3627. },
  3628. },
  3629. yAxis: [
  3630. {
  3631. type: 'value',
  3632. name: '亿元',
  3633. nameTextStyle: {
  3634. color: 'rgba(255,255,255,0.6)',
  3635. fontSize: '15'
  3636. },
  3637. splitLine: {
  3638. show: true,
  3639. lineStyle: {
  3640. color: '#68b4dd66',
  3641. type: 'dashed',
  3642. },
  3643. },
  3644. axisLine: {
  3645. show: true,
  3646. lineStyle: {
  3647. color: '#3D7495',
  3648. },
  3649. },
  3650. axisLabel: {
  3651. show: true,
  3652. textStyle: {
  3653. color: '#fff',
  3654. fontSize: '15'
  3655. },
  3656. },
  3657. nameTextStyle: {
  3658. color: '#fff',
  3659. fontSize: 15,
  3660. },
  3661. },
  3662. {
  3663. type: 'value',
  3664. axisLine: {
  3665. show: false,
  3666. },
  3667. splitLine: {
  3668. show: false,
  3669. },
  3670. axisLabel: {
  3671. show: true,
  3672. formatter: '{value} %',
  3673. textStyle: {
  3674. color: 'rgba(250,250,250,0.6)',
  3675. },
  3676. },
  3677. },
  3678. ],
  3679. series: [
  3680. {
  3681. type: 'bar',
  3682. name: '投资金额',
  3683. barWidth: 15,
  3684. itemStyle: {
  3685. normal: {
  3686. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  3687. {
  3688. offset: 0,
  3689. color: '#69c0ff',
  3690. },
  3691. {
  3692. offset: 1,
  3693. color: '#082550',
  3694. },
  3695. ]),
  3696. },
  3697. },
  3698. data: center6.map(item => item.value),
  3699. },
  3700. ],
  3701. }
  3702. myChart.on('click', function (param) {
  3703. window.location.href = './investHomeChild.html?type=2'
  3704. })
  3705. myChart.setOption(option)
  3706. tools.loopShowTooltip(myChart, option, {
  3707. nterval: 2000,
  3708. loopSeries: true,
  3709. })
  3710. },
  3711. initChartC4 () {
  3712. var chartData = []
  3713. var timer = null;
  3714. var timer2 = null;
  3715. var i = 0;
  3716. center7.forEach((item, index) => {
  3717. let obj = {
  3718. name: item.name,
  3719. y: item.value2,
  3720. num: item.value,
  3721. sliced: false,
  3722. selected: false,
  3723. color: index == 0 ? '#43ede3' : '#8ba2ff'
  3724. }
  3725. chartData.push(obj)
  3726. })
  3727. let that = this
  3728. var chart = Highcharts.chart('echartC4', {
  3729. chart: {
  3730. type: 'pie',
  3731. backgroundColor: 'rgba(0,0,0,0)',
  3732. options3d: {
  3733. enabled: true,
  3734. alpha: 45,
  3735. //beta: 0
  3736. },
  3737. events: {
  3738. // load,图表加载完成时触发
  3739. load: function () {
  3740. var chart = this;
  3741. var points = chart.series[0].points;
  3742. var len = points.length;
  3743. timer && clearInterval(timer);
  3744. timer = setInterval(function () {
  3745. autoTooltip(points[i]);
  3746. chartData.forEach((item, index) => {
  3747. item.sliced = false
  3748. item.selected = false
  3749. if (index == i) {
  3750. item.sliced = true
  3751. item.selected = true
  3752. }
  3753. })
  3754. chart.update({
  3755. series: [{
  3756. type: 'pie',
  3757. name: '占比',
  3758. point: {
  3759. events: {
  3760. click: function (e) {
  3761. that.showChartLTipDouble(e.point.name)
  3762. }
  3763. }
  3764. },
  3765. data: chartData
  3766. }]
  3767. })
  3768. i++;
  3769. if (i === len) {
  3770. i = 0;
  3771. chartData.forEach((item, index) => {
  3772. item.sliced = false
  3773. item.selected = false
  3774. })
  3775. chart.update({
  3776. series: [{
  3777. type: 'pie',
  3778. name: '占比',
  3779. point: {
  3780. events: {
  3781. click: function (e) {
  3782. that.showChartLTipDouble(e.point.name)
  3783. }
  3784. }
  3785. },
  3786. data: chartData
  3787. }]
  3788. })
  3789. }
  3790. }, 2000);
  3791. },
  3792. legendItemClick: function (event) {
  3793. console.log(event);
  3794. return true;
  3795. }
  3796. }
  3797. },
  3798. credits: {
  3799. enabled: false //去掉hightchats水印
  3800. },
  3801. title: {
  3802. text: null
  3803. },
  3804. tooltip: {
  3805. crosshairs: true,
  3806. backgroundColor: 'rgba(0,0,0,0.5)',
  3807. // positioner: function(e){
  3808. // console.log(e, this)
  3809. // },
  3810. useHTML: false, //开启html模式
  3811. style: {
  3812. color: '#fff',
  3813. fontSize: '20'
  3814. },
  3815. formatter: function (e) {
  3816. //console.log(this)
  3817. let num = chartData[this.colorIndex].num
  3818. this.percentage = Math.round(this.percentage)
  3819. return `${this.key}:<b>${this.percentage}%</b><br/>投资完成额:<b>${this.y}</b>亿<br/>投资数量:<b>${num}个</b>`
  3820. },
  3821. //pointFormat:
  3822. },
  3823. legend: {
  3824. layout: 'vertical',
  3825. align: 'right',
  3826. verticalAlign: 'bottom',
  3827. itemStyle: {
  3828. fontSize: '20px',
  3829. color: '#fff',
  3830. x: 20
  3831. }
  3832. },
  3833. plotOptions: {
  3834. pie: {
  3835. allowPointSelect: true,
  3836. showInLegend: true, // 图例
  3837. cursor: 'pointer',
  3838. size: 500,
  3839. innerSize: 300, //环形图中间空白,0为饼图
  3840. depth: 28, //立体高度
  3841. slicedOffset: 23, //动画距离
  3842. dataLabels: {
  3843. enabled: false, // 是否展示指示线
  3844. format: '{point.name}: {point.percentage}'
  3845. }
  3846. },
  3847. },
  3848. series: [{
  3849. type: 'pie',
  3850. name: '占比',
  3851. center: ['60%', '50%'],
  3852. point: {
  3853. events: {
  3854. click: function (e) { //点击事件
  3855. that.showChartLTipDouble(e.point.name)
  3856. },
  3857. mouseOver: function (e) { //鼠标移入停止轮播并且找到移入的当前数据设为选中
  3858. //console.log(e)
  3859. chartData.forEach((item, index) => {
  3860. item.sliced = false
  3861. item.selected = false
  3862. })
  3863. chartData[e.target.index].sliced = true
  3864. chartData[e.target.index].selected = true
  3865. chart.update({
  3866. series: [{
  3867. type: 'pie',
  3868. name: '占比',
  3869. point: {
  3870. events: {
  3871. click: function (e) {
  3872. that.showChartLTipDouble(e.point.name)
  3873. }
  3874. }
  3875. },
  3876. data: chartData
  3877. }]
  3878. })
  3879. timer && clearInterval(timer);
  3880. },
  3881. mouseOut: function () { // 鼠标移出后需要继续执行轮播
  3882. var points = chart.series[0].points;
  3883. var len = points.length;
  3884. timer && clearInterval(timer);
  3885. timer = setInterval(function () {
  3886. autoTooltip(points[i]);
  3887. chartData.forEach((item, index) => {
  3888. item.sliced = false
  3889. item.selected = false
  3890. if (index == i) {
  3891. item.sliced = true
  3892. item.selected = true
  3893. }
  3894. })
  3895. chart.update({
  3896. series: [{
  3897. type: 'pie',
  3898. name: '占比',
  3899. point: {
  3900. events: {
  3901. click: function (e) {
  3902. that.showChartLTipDouble(e.point.name)
  3903. }
  3904. }
  3905. },
  3906. data: chartData
  3907. }]
  3908. })
  3909. i++;
  3910. if (i === len) {
  3911. i = 0;
  3912. chartData.forEach((item, index) => {
  3913. item.sliced = false
  3914. item.selected = false
  3915. })
  3916. chart.update({
  3917. series: [{
  3918. type: 'pie',
  3919. name: '占比',
  3920. point: {
  3921. events: {
  3922. click: function (e) {
  3923. that.showChartLTipDouble(e.point.name)
  3924. }
  3925. }
  3926. },
  3927. data: chartData
  3928. }]
  3929. })
  3930. }
  3931. }, 2000);
  3932. }
  3933. }
  3934. },
  3935. data: chartData
  3936. }]
  3937. });
  3938. function autoTooltip (point) {
  3939. chart.tooltip.refresh(point);
  3940. }
  3941. },
  3942. initProjectList () {
  3943. let dataList = []
  3944. center8.map(item => {
  3945. dataList.push([item.office, item.name, item.value + '亿'])
  3946. })
  3947. this.storageRecordConfig2.data = dataList
  3948. this.storageRecordConfig2 = { ...this.storageRecordConfig2 }
  3949. },
  3950. // 大屏三
  3951. initChartR1 () {
  3952. let that = this
  3953. let myChart = echarts.init(this.$refs['echartR1'])
  3954. myChart.on('showTip', (params) => {
  3955. // 如果是7或者15并且满足防抖则切换
  3956. if ((params.dataIndex == 5 || params.dataIndex == 11) && that.echartR1Fd) {
  3957. that.echartR1Fd = false
  3958. setTimeout(() => {
  3959. option.dataZoom[0].endValue = option.dataZoom[0].endValue + 6
  3960. option.dataZoom[0].startValue = option.dataZoom[0].startValue + 6
  3961. myChart.setOption(option);
  3962. // 防止勿刷新做的防抖
  3963. setTimeout(() => {
  3964. that.echartR1Fd = true
  3965. }, 2000)
  3966. }, 1900);
  3967. // 如果是17表示到了最后一个,那么重新来一遍
  3968. } else if (params.dataIndex == 17 && that.echartR1Fd) {
  3969. that.echartR1Fd = false
  3970. setTimeout(() => {
  3971. option.dataZoom[0].endValue = 0
  3972. option.dataZoom[0].startValue = 5
  3973. myChart.setOption(option);
  3974. // 防止勿刷新做的防抖
  3975. setTimeout(() => {
  3976. that.echartR1Fd = true
  3977. }, 2000)
  3978. }, 1900)
  3979. }
  3980. })
  3981. let option = {
  3982. tooltip: {
  3983. formatter: data => {
  3984. 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}亿`
  3985. },
  3986. textStyle: {
  3987. color: '#FFF', // 文字的颜色
  3988. fontSize: '20', // 文字字体大小
  3989. },
  3990. trigger: 'axis',
  3991. axisPointer: {
  3992. type: 'cross',
  3993. },
  3994. },
  3995. dataZoom: [
  3996. {
  3997. // start: 9,//默认为@
  3998. // end: 100,//黑认认为1@0
  3999. type: "slider",
  4000. show: false,
  4001. // xAxisIndex: [0]
  4002. handlesize: 0,//滑动条的 左右2个滑动条的大小
  4003. startValue: 5,// 初始显示值
  4004. endValue: 0,// 结束显示值
  4005. height: 10,//组件高度
  4006. left: "5%",
  4007. right: "4%",//右边的距离
  4008. bottom: "25%",//底边的距离
  4009. borderColor: "#939",
  4010. fillerColor: "#269cdb",
  4011. borderRadius: 5,
  4012. backgroundColor: "#33384b",//两边未选中的滑动条区域的额色
  4013. showDataShadow: false,//是否显示数据阴影
  4014. showDetail: false,//即拖拽时候是否显示详细数值信息
  4015. truerealtime: true,//是否实时更新
  4016. filterMode: "filter"
  4017. }, {
  4018. type: 'inside',
  4019. show: true,
  4020. start: 1,
  4021. end: 100,
  4022. zoomOnMouseWheel: false, //滚轮是否触发缩放
  4023. moveOnMouseMove: false, //鼠标滚轮触发滚动
  4024. }
  4025. ],
  4026. grid: {
  4027. top: '10%',
  4028. right: '3%',
  4029. left: '5%',
  4030. bottom: '5%',
  4031. },
  4032. legend: {
  4033. data: ["预算额", "已签合同额", '产值认定额', '结算额', '付款额'],
  4034. x: 'center',
  4035. y: '20px',
  4036. textStyle: {
  4037. color: '#fff',
  4038. fontSize: "20",
  4039. },
  4040. },
  4041. xAxis: {
  4042. data: right4.map(item => item.name),
  4043. axisLine: {
  4044. show: true, //隐藏X轴轴线
  4045. lineStyle: {
  4046. color: '#005094',
  4047. width: 1,
  4048. },
  4049. },
  4050. axisTick: {
  4051. show: false, //隐藏X轴刻度
  4052. },
  4053. axisLabel: {
  4054. show: true,
  4055. // rotate: 40,
  4056. textStyle: {
  4057. color: '#fff',//'rgba(255,255,255,0.6)', //X轴文字颜色
  4058. fontSize: "15",
  4059. },
  4060. },
  4061. },
  4062. yAxis: [
  4063. {
  4064. type: 'value',
  4065. name: '亿元',
  4066. nameTextStyle: {
  4067. color: 'rgba(255,255,255,0.6)',
  4068. },
  4069. splitLine: {
  4070. show: true,
  4071. lineStyle: {
  4072. color: '#68b4dd66',
  4073. type: 'dashed',
  4074. },
  4075. },
  4076. axisLine: {
  4077. show: true,
  4078. lineStyle: {
  4079. color: '#3D7495',
  4080. },
  4081. },
  4082. axisLabel: {
  4083. show: true,
  4084. textStyle: {
  4085. color: '#fff',
  4086. fontSize: "15",
  4087. },
  4088. },
  4089. nameTextStyle: {
  4090. color: '#fff',
  4091. fontSize: 15,
  4092. },
  4093. },
  4094. ],
  4095. series: [
  4096. {
  4097. name: '预算额',
  4098. type: 'bar',
  4099. barWidth: 10,
  4100. itemStyle: {
  4101. normal: {
  4102. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4103. {
  4104. offset: 0,
  4105. color: '#71D5FF',
  4106. },
  4107. {
  4108. offset: 1,
  4109. color: '#082550',
  4110. },
  4111. ]),
  4112. },
  4113. },
  4114. data: right4.map(item => item.value),
  4115. },
  4116. {
  4117. name: '已签合同额',
  4118. type: 'bar',
  4119. barWidth: 10,
  4120. itemStyle: {
  4121. normal: {
  4122. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4123. {
  4124. offset: 0,
  4125. color: '#4D6FF6',
  4126. },
  4127. {
  4128. offset: 1,
  4129. color: '#082550',
  4130. },
  4131. ]),
  4132. },
  4133. },
  4134. data: right4.map(item => item.value2),
  4135. },
  4136. {
  4137. name: '产值认定额',
  4138. type: 'bar',
  4139. barWidth: 10,
  4140. itemStyle: {
  4141. normal: {
  4142. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4143. {
  4144. offset: 0,
  4145. color: '#877CFC',
  4146. },
  4147. {
  4148. offset: 1,
  4149. color: '#082550',
  4150. },
  4151. ]),
  4152. },
  4153. },
  4154. data: right4.map(item => item.value),
  4155. },
  4156. {
  4157. name: '结算额',
  4158. type: 'bar',
  4159. barWidth: 10,
  4160. itemStyle: {
  4161. normal: {
  4162. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4163. {
  4164. offset: 0,
  4165. color: '#52BF80',
  4166. },
  4167. {
  4168. offset: 1,
  4169. color: '#082550',
  4170. },
  4171. ]),
  4172. },
  4173. },
  4174. data: right4.map(item => item.value2),
  4175. },
  4176. {
  4177. name: '付款额',
  4178. type: 'bar',
  4179. barWidth: 10,
  4180. itemStyle: {
  4181. normal: {
  4182. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4183. {
  4184. offset: 0,
  4185. color: '#CADD62',
  4186. },
  4187. {
  4188. offset: 1,
  4189. color: '#082550',
  4190. },
  4191. ]),
  4192. },
  4193. },
  4194. data: right4.map(item => item.value),
  4195. },
  4196. ],
  4197. }
  4198. myChart.on('click', function (param) {
  4199. window.location.href = './investHomeChild.html?type=2'
  4200. })
  4201. myChart.setOption(option)
  4202. tools.loopShowTooltip(myChart, option, {
  4203. interval: 2000,
  4204. loopSeries: true,
  4205. })
  4206. },
  4207. initChartR2 () {
  4208. let that = this
  4209. const itemStyle = {
  4210. // opacity: 0.8,
  4211. shadowBlur: 10,
  4212. shadowOffsetX: 0,
  4213. shadowOffsetY: 0,
  4214. shadowColor: 'rgba(0,0,0,0.3)'
  4215. };
  4216. let myChart = echarts.init(this.$refs['echartR2'])
  4217. myChart.on('showTip', (params) => {
  4218. // 如果是7或者15并且满足防抖则切换
  4219. if ((params.dataIndex == 5 || params.dataIndex == 11) && that.echartR2Fd) {
  4220. that.echartR2Fd = false
  4221. setTimeout(() => {
  4222. option.dataZoom[0].endValue = option.dataZoom[0].endValue + 6
  4223. option.dataZoom[0].startValue = option.dataZoom[0].startValue + 6
  4224. myChart.setOption(option);
  4225. // 防止勿刷新做的防抖
  4226. setTimeout(() => {
  4227. that.echartR2Fd = true
  4228. }, 2000)
  4229. }, 1900);
  4230. // 如果是17表示到了最后一个,那么重新来一遍
  4231. } else if (params.dataIndex == 17 && that.echartR2Fd) {
  4232. that.echartR2Fd = false
  4233. setTimeout(() => {
  4234. option.dataZoom[0].endValue = 0
  4235. option.dataZoom[0].startValue = 5
  4236. myChart.setOption(option);
  4237. // 防止勿刷新做的防抖
  4238. setTimeout(() => {
  4239. that.echartR2Fd = true
  4240. }, 2000)
  4241. }, 1900)
  4242. }
  4243. })
  4244. let option = {
  4245. color: ['#80F1BE', '#fec42c', '#dd4444'],
  4246. title: {
  4247. textStyle: {
  4248. color: '#69C0FF',
  4249. fontSize: 16,
  4250. fontWeight: 500
  4251. },
  4252. top: '10',
  4253. left: '10'
  4254. },
  4255. dataZoom: [
  4256. {
  4257. // start: 9,//默认为@
  4258. // end: 100,//黑认认为1@0
  4259. type: "slider",
  4260. show: false,
  4261. // xAxisIndex: [0]
  4262. handlesize: 0,//滑动条的 左右2个滑动条的大小
  4263. startValue: 5,// 初始显示值
  4264. endValue: 0,// 结束显示值
  4265. height: 10,//组件高度
  4266. left: "5%",
  4267. right: "4%",//右边的距离
  4268. bottom: "25%",//底边的距离
  4269. borderColor: "#939",
  4270. fillerColor: "#269cdb",
  4271. borderRadius: 5,
  4272. backgroundColor: "#33384b",//两边未选中的滑动条区域的额色
  4273. showDataShadow: false,//是否显示数据阴影
  4274. showDetail: false,//即拖拽时候是否显示详细数值信息
  4275. truerealtime: true,//是否实时更新
  4276. filterMode: "filter"
  4277. }, {
  4278. type: 'inside',
  4279. show: true,
  4280. start: 1,
  4281. end: 100,
  4282. zoomOnMouseWheel: false, //滚轮是否触发缩放
  4283. moveOnMouseMove: false, //鼠标滚轮触发滚动
  4284. }
  4285. ],
  4286. legend: {
  4287. top: 10,
  4288. data: ['正偏差', '容差', '负偏差'],
  4289. textStyle: {
  4290. fontSize: 20,
  4291. color: '#fff'
  4292. }
  4293. },
  4294. textStyle: {
  4295. color: '#fff',
  4296. },
  4297. tooltip: {
  4298. show: true,
  4299. trigger: "axis",
  4300. textStyle: {
  4301. color: '#FFF', // 文字的颜色
  4302. fontSize: '20', // 文字字体大小
  4303. },
  4304. formatter: data => {
  4305. 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]}亿`
  4306. },
  4307. axisPointer: {
  4308. type: 'cross',
  4309. },
  4310. // axisPointer: {
  4311. // lineStyle: {
  4312. // type: 'dashed',
  4313. // width: 2,
  4314. // color: 'rgba(255,255,255,0.6)'
  4315. // },
  4316. // animation: true
  4317. // }
  4318. },
  4319. grid: {
  4320. top: '10%',
  4321. right: '4%',
  4322. left: '5%',
  4323. bottom: '5%',
  4324. },
  4325. yAxis: {
  4326. name: '亿元',
  4327. splitLine: {
  4328. show: true,
  4329. lineStyle: {
  4330. color: '#68b4dd66',
  4331. type: 'dashed',
  4332. },
  4333. },
  4334. axisLine: {
  4335. show: false
  4336. },
  4337. axisLabel: {
  4338. show: true,
  4339. formatter: '{value}',
  4340. textStyle: {
  4341. color: '#fff',
  4342. fontSize: '15'
  4343. },
  4344. },
  4345. nameTextStyle: {
  4346. color: '#fff',
  4347. fontSize: 15,
  4348. },
  4349. },
  4350. xAxis: {
  4351. data: right5[0].map(item => item[0]),
  4352. axisLine: {
  4353. show: true, //隐藏X轴轴线
  4354. lineStyle: {
  4355. color: '#005094',
  4356. width: 1,
  4357. },
  4358. },
  4359. splitLine: {
  4360. show: true,
  4361. lineStyle: {
  4362. color: '#68b4dd66',
  4363. type: 'dashed',
  4364. },
  4365. },
  4366. axisTick: {
  4367. show: false, //隐藏X轴刻度
  4368. },
  4369. axisLabel: {
  4370. show: true,
  4371. // rotate: 40,
  4372. padding: [0, 0, 0, 0],
  4373. textStyle: {
  4374. color: '#fff', //X轴文字颜色
  4375. fontSize: 15,
  4376. },
  4377. },
  4378. },
  4379. series: [
  4380. {
  4381. name: '正偏差',
  4382. type: 'scatter',
  4383. itemStyle: itemStyle,
  4384. data: right5[0],
  4385. symbolSize: function (data) {
  4386. return Math.sqrt(data[1]) * 9;
  4387. },
  4388. },
  4389. {
  4390. name: '容差',
  4391. type: 'scatter',
  4392. itemStyle: itemStyle,
  4393. data: right5[1],
  4394. symbolSize: function (data) {
  4395. return Math.sqrt(data[1]) * 8;
  4396. },
  4397. },
  4398. {
  4399. name: '负偏差',
  4400. type: 'scatter',
  4401. itemStyle: itemStyle,
  4402. data: right5[2],
  4403. symbolSize: function (data) {
  4404. return Math.sqrt(data[1]) * 7;
  4405. },
  4406. }
  4407. ]
  4408. }
  4409. myChart.on('click', function (param) {
  4410. that.showChartLTipDouble(param.name)
  4411. })
  4412. myChart.setOption(option)
  4413. tools.loopShowTooltip(myChart, option, {
  4414. interval: 2000,
  4415. loopSeries: true,
  4416. })
  4417. },
  4418. initChartR3 () {
  4419. let that = this
  4420. let myChart = echarts.init(this.$refs['echartR3'])
  4421. myChart.on('showTip', (params) => {
  4422. // 如果是7或者15并且满足防抖则切换
  4423. if ((params.dataIndex == 5 || params.dataIndex == 11) && that.echartR3Fd) {
  4424. that.echartR3Fd = false
  4425. setTimeout(() => {
  4426. option.dataZoom[0].endValue = option.dataZoom[0].endValue + 6
  4427. option.dataZoom[0].startValue = option.dataZoom[0].startValue + 6
  4428. myChart.setOption(option);
  4429. // 防止勿刷新做的防抖
  4430. setTimeout(() => {
  4431. that.echartR3Fd = true
  4432. }, 2000)
  4433. }, 7900);
  4434. // 如果是17表示到了最后一个,那么重新来一遍
  4435. } else if (params.dataIndex == 17 && that.echartR3Fd) {
  4436. that.echartR3Fd = false
  4437. setTimeout(() => {
  4438. option.dataZoom[0].endValue = 0
  4439. option.dataZoom[0].startValue = 5
  4440. myChart.setOption(option);
  4441. // 防止勿刷新做的防抖
  4442. setTimeout(() => {
  4443. that.echartR3Fd = true
  4444. }, 2000)
  4445. }, 7900)
  4446. }
  4447. })
  4448. let option = {
  4449. tooltip: {
  4450. formatter: data => {
  4451. 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}亿`
  4452. },
  4453. trigger: 'axis',
  4454. axisPointer: {
  4455. type: 'cross',
  4456. },
  4457. position: (params) => {
  4458. return [params[0] + 10, 60]
  4459. },
  4460. textStyle: {
  4461. color: '#FFF', // 文字的颜色
  4462. fontSize: '20', // 文字字体大小
  4463. },
  4464. confine: true
  4465. },
  4466. dataZoom: [
  4467. {
  4468. // start: 9,//默认为@
  4469. // end: 100,//黑认认为1@0
  4470. type: "slider",
  4471. show: false,
  4472. // xAxisIndex: [0]
  4473. handlesize: 0,//滑动条的 左右2个滑动条的大小
  4474. startValue: 5,// 初始显示值
  4475. endValue: 0,// 结束显示值
  4476. height: 10,//组件高度
  4477. left: "5%",
  4478. right: "4%",//右边的距离
  4479. bottom: "25%",//底边的距离
  4480. borderColor: "#939",
  4481. fillerColor: "#269cdb",
  4482. borderRadius: 5,
  4483. backgroundColor: "#33384b",//两边未选中的滑动条区域的额色
  4484. showDataShadow: false,//是否显示数据阴影
  4485. showDetail: false,//即拖拽时候是否显示详细数值信息
  4486. truerealtime: true,//是否实时更新
  4487. filterMode: "filter"
  4488. }, {
  4489. type: 'inside',
  4490. show: true,
  4491. start: 1,
  4492. end: 100,
  4493. zoomOnMouseWheel: false, //滚轮是否触发缩放
  4494. moveOnMouseMove: false, //鼠标滚轮触发滚动
  4495. }
  4496. ],
  4497. grid: {
  4498. top: '25%',
  4499. right: '3%',
  4500. left: '10%',
  4501. bottom: '15%',
  4502. },
  4503. legend: {
  4504. data: ["高风险", "中风险", '低风险'],
  4505. x: 'center',
  4506. y: '15px',
  4507. textStyle: {
  4508. // color: 'rgba(250,250,250,0.6)',
  4509. color: '#fff',
  4510. fontSize: "20",
  4511. },
  4512. },
  4513. xAxis: {
  4514. data: right4.map(item => item.name),
  4515. axisLine: {
  4516. show: true, //隐藏X轴轴线
  4517. lineStyle: {
  4518. color: '#005094',
  4519. width: 1,
  4520. },
  4521. },
  4522. axisTick: {
  4523. show: false, //隐藏X轴刻度
  4524. },
  4525. axisLabel: {
  4526. show: true,
  4527. rotate: 40,
  4528. textStyle: {
  4529. color: '#fff',//'rgba(255,255,255,0.6)', //X轴文字颜色
  4530. fontSize: '15'
  4531. },
  4532. },
  4533. },
  4534. yAxis: [
  4535. {
  4536. type: 'value',
  4537. name: '亿元',
  4538. nameTextStyle: {
  4539. color: 'rgba(255,255,255,0.6)',
  4540. },
  4541. splitLine: {
  4542. show: true,
  4543. lineStyle: {
  4544. color: '#68b4dd66',
  4545. type: 'dashed',
  4546. },
  4547. },
  4548. axisLine: {
  4549. show: true,
  4550. lineStyle: {
  4551. color: '#3D7495',
  4552. },
  4553. },
  4554. axisLabel: {
  4555. show: true,
  4556. textStyle: {
  4557. color: '#fff',
  4558. fontSize: '15'
  4559. },
  4560. },
  4561. nameTextStyle: {
  4562. color: '#fff',
  4563. fontSize: 15,
  4564. },
  4565. },
  4566. ],
  4567. series: [
  4568. {
  4569. name: '高风险',
  4570. type: 'bar',
  4571. stack: 'Ad',
  4572. barWidth: 10,
  4573. itemStyle: {
  4574. normal: {
  4575. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4576. {
  4577. offset: 0,
  4578. color: '#CADD62',
  4579. },
  4580. {
  4581. offset: 1,
  4582. color: '#082550',
  4583. },
  4584. ]),
  4585. },
  4586. },
  4587. data: right6.map(item => item.value),
  4588. },
  4589. {
  4590. name: '中风险',
  4591. type: 'bar',
  4592. stack: 'Ad',
  4593. barWidth: 10,
  4594. itemStyle: {
  4595. normal: {
  4596. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4597. {
  4598. offset: 0,
  4599. color: '#4D6FF6',
  4600. },
  4601. {
  4602. offset: 1,
  4603. color: '#082550',
  4604. },
  4605. ]),
  4606. },
  4607. },
  4608. data: right6.map(item => item.value2),
  4609. },
  4610. {
  4611. name: '低风险',
  4612. type: 'bar',
  4613. stack: 'Ad',
  4614. barWidth: 10,
  4615. itemStyle: {
  4616. normal: {
  4617. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4618. {
  4619. offset: 0,
  4620. color: '#52BF80',
  4621. },
  4622. {
  4623. offset: 1,
  4624. color: '#082550',
  4625. },
  4626. ]),
  4627. },
  4628. },
  4629. data: right6.map(item => item.value3),
  4630. },
  4631. ],
  4632. }
  4633. myChart.setOption(option)
  4634. tools.loopShowTooltip(myChart, option, {
  4635. interval: 8000,
  4636. loopSeries: true,
  4637. })
  4638. },
  4639. initChartR4 () {
  4640. let myChart = echarts.init(this.$refs['echartR4'])
  4641. option = {
  4642. title: {
  4643. text: ''
  4644. },
  4645. // legend: {
  4646. // data: ['安全风险', '付款风险', '合同风险', '结算风险', '进度风险', '质量风险'],
  4647. // textStyle: {
  4648. // color: '#9DB9EB',
  4649. // },
  4650. // top: 'center',
  4651. // right:'50',
  4652. // orient: 'vertical', // vertical 竖着
  4653. // },
  4654. radar: {
  4655. // shape: 'circle',
  4656. center: ['50%', '50%'],
  4657. radius: 135,
  4658. indicator: [
  4659. { name: '安全风险', max: 100000 },
  4660. { name: '付款风险', max: 100000 },
  4661. { name: '合同风险', max: 100000 },
  4662. { name: '结算风险', max: 100000 },
  4663. { name: '进度风险', max: 100000 },
  4664. { name: '质量风险', max: 100000 },
  4665. ],
  4666. axisLine: { // 设置雷达图中间射线的颜色
  4667. lineStyle: {
  4668. color: '#887d33',
  4669. },
  4670. },
  4671. splitLine: { //网格颜色设置
  4672. show: true,
  4673. lineStyle: {
  4674. width: 1,
  4675. color: ['#871b1a', '#638f41', '#d29e35', '#b6802b']
  4676. // color: '#000',
  4677. // color:(color)=>{
  4678. // }
  4679. },
  4680. },
  4681. name: { //修改indicator文字的颜色
  4682. textStyle: {
  4683. color: "#fff",
  4684. fontSize: '20'
  4685. }
  4686. },
  4687. splitNumber: 4, //有几个圈
  4688. splitArea: { //设置图表颜色,show的值为true
  4689. show: true,
  4690. areaStyle: {
  4691. // color:"#c1ddf8", //一般设置方式
  4692. //设置渐变背景色 new echarts.graphic.LinearGradient(a,b,c,d,arr)
  4693. //a ,b,c,d值可为0,1 a:1表示arr中的颜色右到左;c:1 arr中的颜色左到右
  4694. //b:1表示arr中的颜色下到上;d:1表示arr中的颜色上到下
  4695. // color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  4696. // { offset: 0, color: '#887D33' }, // 0% 处的颜色
  4697. // { offset: 0.75, color: '#7D4216' }, // 0% 处的颜色
  4698. // { offset: 1, color: '#430705' }// 100% 处的颜色
  4699. // ], false)
  4700. color: ['#638f41', '#887d33', '#7d4216', '#430705'],
  4701. }
  4702. }
  4703. },
  4704. series: [
  4705. {
  4706. name: '',
  4707. type: 'radar',
  4708. symbol: 'circle', // 单个数值点的样式,还可以取值'rect','angle'等
  4709. symbolSize: 0, // 数值点的大小
  4710. data: [
  4711. {
  4712. value: right7[0],
  4713. name: '安全风险',
  4714. itemStyle: { //该数值区域样式设置
  4715. normal: {
  4716. color: 'rgb(44,198,255,0.8)', //背景颜色,还需设置areaStyle
  4717. lineStyle: {
  4718. color: 'rgb(44,198,255,0.8)', //边框颜色
  4719. },
  4720. },
  4721. },
  4722. label: { //显示value中具体的数值
  4723. normal: {
  4724. show: false,
  4725. textStyle: { //更改数值样式
  4726. color: '#43EDE3'
  4727. }
  4728. },
  4729. },
  4730. areaStyle: { //设置区域背景颜色透明度
  4731. normal: {
  4732. width: 1,
  4733. opacity: 0.8,
  4734. },
  4735. },
  4736. }
  4737. ]
  4738. }
  4739. ]
  4740. };
  4741. // tools.loopShowTooltip(myChart, option, {
  4742. // interval: 2000,
  4743. // loopSeries: true,
  4744. // });
  4745. myChart.setOption(option)
  4746. },
  4747. initChartR5 () {
  4748. let myChart = echarts.init(this.$refs['echartR5'])
  4749. let option = {
  4750. tooltip: {
  4751. formatter: data => {
  4752. 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}亿`
  4753. },
  4754. trigger: 'axis',
  4755. axisPointer: {
  4756. type: 'cross',
  4757. },
  4758. textStyle: {
  4759. color: '#FFF', // 文字的颜色
  4760. fontSize: '20', // 文字字体大小
  4761. },
  4762. },
  4763. grid: {
  4764. top: '15%',
  4765. right: '3%',
  4766. left: '5%',
  4767. bottom: '35',
  4768. },
  4769. legend: {
  4770. data: ["预算额", "合同额", "结算额", "支付额"],
  4771. x: 'center',
  4772. y: '10px',
  4773. textStyle: {
  4774. // color: 'rgba(250,250,250,0.6)',
  4775. color: '#fff',
  4776. fontSize: "20",
  4777. },
  4778. },
  4779. xAxis: {
  4780. data: ['设备费', '设计费', '施工费', '材料费'],
  4781. axisLine: {
  4782. show: true, //隐藏X轴轴线
  4783. lineStyle: {
  4784. color: '#005094',
  4785. width: 1,
  4786. },
  4787. },
  4788. axisTick: {
  4789. show: false, //隐藏X轴刻度
  4790. },
  4791. axisLabel: {
  4792. show: true,
  4793. // rotate: 40,
  4794. textStyle: {
  4795. color: '#fff',//'rgba(255,255,255,0.6)', //X轴文字颜色
  4796. fontSize: '15', // 文字字体大小
  4797. },
  4798. },
  4799. },
  4800. yAxis: [
  4801. {
  4802. type: 'value',
  4803. name: '亿元',
  4804. nameTextStyle: {
  4805. color: 'rgba(255,255,255,0.6)',
  4806. },
  4807. splitLine: {
  4808. show: true,
  4809. lineStyle: {
  4810. color: '#68b4dd66',
  4811. type: 'dashed',
  4812. },
  4813. },
  4814. axisLine: {
  4815. show: true,
  4816. lineStyle: {
  4817. color: '#3D7495',
  4818. },
  4819. },
  4820. axisLabel: {
  4821. show: true,
  4822. textStyle: {
  4823. color: '#fff',
  4824. fontSize: '15', // 文字字体大小
  4825. },
  4826. },
  4827. nameTextStyle: {
  4828. color: '#fff',
  4829. fontSize: 15,
  4830. },
  4831. },
  4832. ],
  4833. series: [
  4834. {
  4835. name: '预算额',
  4836. type: 'bar',
  4837. barWidth: 10,
  4838. itemStyle: {
  4839. normal: {
  4840. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4841. {
  4842. offset: 0,
  4843. color: '#71D5FF',
  4844. },
  4845. {
  4846. offset: 1,
  4847. color: '#082550',
  4848. },
  4849. ]),
  4850. },
  4851. },
  4852. data: right8.map(item => item.value),
  4853. },
  4854. {
  4855. name: '合同额',
  4856. type: 'bar',
  4857. barWidth: 10,
  4858. itemStyle: {
  4859. normal: {
  4860. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4861. {
  4862. offset: 0,
  4863. color: '#4D6FF6',
  4864. },
  4865. {
  4866. offset: 1,
  4867. color: '#082550',
  4868. },
  4869. ]),
  4870. },
  4871. },
  4872. data: right8.map(item => item.value2),
  4873. },
  4874. {
  4875. name: '结算额',
  4876. type: 'bar',
  4877. barWidth: 10,
  4878. itemStyle: {
  4879. normal: {
  4880. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4881. {
  4882. offset: 0,
  4883. color: '#877CFC',
  4884. },
  4885. {
  4886. offset: 1,
  4887. color: '#082550',
  4888. },
  4889. ]),
  4890. },
  4891. },
  4892. data: right8.map(item => item.value3),
  4893. },
  4894. {
  4895. name: '支付额',
  4896. type: 'bar',
  4897. barWidth: 10,
  4898. itemStyle: {
  4899. normal: {
  4900. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  4901. {
  4902. offset: 0,
  4903. color: '#52BF80',
  4904. },
  4905. {
  4906. offset: 1,
  4907. color: '#082550',
  4908. },
  4909. ]),
  4910. },
  4911. },
  4912. data: right8.map(item => item.value4),
  4913. },
  4914. ],
  4915. }
  4916. myChart.setOption(option)
  4917. tools.loopShowTooltip(myChart, option, {
  4918. interval: 2000,
  4919. loopSeries: true,
  4920. })
  4921. },
  4922. },
  4923. })