investHomeGroup.js 152 KB

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