jjyx.vue 97 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421
  1. <template>
  2. <div>
  3. <!-- 阴影背景
  4. <div class="bj_left"><img src="@/assets/images/sprhbj-left.png"/></div>
  5. <div class="bj_right"><img src="@/assets/images/sprhbj-right.png"/></div>-->
  6. <div class="bj_bottom"><img src="@/assets/images/sprhbj-bottom.png"/></div>
  7. <!--头部开始-->
  8. <div class="header">
  9. <h1>城市运行一网统管指挥中心</h1>
  10. </div>
  11. <!--头部结束-->
  12. <!-- 小头部 开始 -->
  13. <div class="nav_min">
  14. <div class="top_txt">
  15. <b>汽开区</b>
  16. <span>小雨</span>
  17. <span>9~16℃</span>
  18. </div>
  19. <div class="top_txt top_txt2">
  20. <span>{{ currentTime }}</span>
  21. <!-- <span>星期六</span>
  22. <b>11:16:58</b> -->
  23. </div>
  24. </div>
  25. <!-- 小头部 结束 -->
  26. <!-- 中间内容 开始 -->
  27. <div class="qkq_con">
  28. <!--左侧开始-->
  29. <div class="con_left_e">
  30. <div class="con_div">
  31. <div class="qkq_tit ">规模以上工业增加值</div>
  32. <div class="qkq_jjyx_div">
  33. <div id="qkq_zjz1_1"></div>
  34. <div id="qkq_zjz2_1"></div>
  35. </div>
  36. </div>
  37. <div class="con_div">
  38. <div class="qkq_tit ">固定资产投资额</div>
  39. <div class="qkq_jjyx_div">
  40. <div id="qkq_zjz1_2"></div>
  41. <div id="qkq_zjz2_2"></div>
  42. </div>
  43. </div>
  44. <div class="con_div">
  45. <div class="qkq_tit ">民间投资额</div>
  46. <div class="qkq_jjyx_div">
  47. <div id="qkq_zjz1_3"></div>
  48. <div id="qkq_zjz2_3"></div>
  49. </div>
  50. </div>
  51. </div>
  52. <div class="con_left_f">
  53. <div class="con_div clearfix">
  54. <div class="con_left_l fl">
  55. <div class="qkq_tit ">政策法规</div>
  56. <div class="qkq_zcfg">
  57. <p>汽开区的一些政策法规的列表展示<span>2024-01-01</span></p>
  58. <p>汽开区的一些政策法规的列表展示<span>2024-01-01</span></p>
  59. <p>汽开区的一些政策法规的列表展示<span>2024-01-01</span></p>
  60. <p>汽开区的一些政策法规的列表展示<span>2024-01-01</span></p>
  61. <p>汽开区的一些政策法规的列表展示<span>2024-01-01</span></p>
  62. <p>汽开区的一些政策法规的列表展示<span>2024-01-01</span></p>
  63. <p>汽开区的一些政策法规的列表展示<span>2024-01-01</span></p>
  64. <p>汽开区的一些政策法规的列表展示<span>2024-01-01</span></p>
  65. <p>汽开区的一些政策法规的列表展示<span>2024-01-01</span></p>
  66. <p>汽开区的一些政策法规的列表展示<span>2024-01-01</span></p>
  67. <p>汽开区的一些政策法规的列表展示<span>2024-01-01</span></p>
  68. <p>汽开区的一些政策法规的列表展示<span>2024-01-01</span></p>
  69. <p>汽开区的一些政策法规的列表展示<span>2024-01-01</span></p>
  70. <p>汽开区的一些政策法规的列表展示<span>2024-01-01</span></p>
  71. <p>汽开区的一些政策法规的列表展示<span>2024-01-01</span></p>
  72. <p>汽开区的一些政策法规的列表展示<span>2024-01-01</span></p>
  73. </div>
  74. </div>
  75. <div class="con_left_r fr">
  76. <div class="qkq_tit ">主要经济指标</div>
  77. <div class="qkq_zcfg" id="scrollContent">
  78. <p>汽开区的一些主要经济指标的列表展示<i class="up">9.0%</i></p>
  79. <p>汽开区的一些主要经济指标的列表展示<i class="up">9.0%</i></p>
  80. <p>汽开区的一些主要经济指标的列表展示<i class="down">9.0%</i></p>
  81. <p>汽开区的一些主要经济指标的列表展示<i class="down">9.0%</i></p>
  82. <p>汽开区的一些主要经济指标的列表展示<i class="up">9.0%</i></p>
  83. <p>汽开区的一些主要经济指标的列表展示<i class="down">9.0%</i></p>
  84. <p>汽开区的一些主要经济指标的列表展示<i class="up">9.0%</i></p>
  85. <p>汽开区的一些主要经济指标的列表展示<i class="up">9.0%</i></p>
  86. <p>汽开区的一些主要经济指标的列表展示<i class="up">9.0%</i></p>
  87. <p>汽开区的一些主要经济指标的列表展示<i class="down">9.0%</i></p>
  88. <p>汽开区的一些主要经济指标的列表展示<i class="down">9.0%</i></p>
  89. <p>汽开区的一些主要经济指标的列表展示<i class="up">9.0%</i></p>
  90. <p>汽开区的一些主要经济指标的列表展示<i class="down">9.0%</i></p>
  91. <p>汽开区的一些主要经济指标的列表展示<i class="up">9.0%</i></p>
  92. </div>
  93. </div>
  94. </div>
  95. <div class="con_div">
  96. <div class="qkq_tit ">本年度主要经济指标增长额</div>
  97. <div id="qkq_jdt"></div>
  98. </div>
  99. <div class="con_div">
  100. <div class="qkq_tit ">全省进出口总值对比</div>
  101. <div id="qkq_kxt"></div>
  102. </div>
  103. </div>
  104. <div class="con_left_g">
  105. <div class="con_div">
  106. <div class="qkq_tit ">规模以上工业增加值</div>
  107. <div class="qkq_jjyx_div">
  108. <div id="qkq_zjz1_4"></div>
  109. <div id="qkq_zjz2_4"></div>
  110. </div>
  111. </div>
  112. <div class="con_div">
  113. <div class="qkq_tit ">固定资产投资额</div>
  114. <div class="qkq_jjyx_div">
  115. <div id="qkq_zjz1_5"></div>
  116. <div id="qkq_zjz2_5"></div>
  117. </div>
  118. </div>
  119. <div class="con_div">
  120. <div class="qkq_tit ">民间投资额</div>
  121. <div class="qkq_jjyx_div">
  122. <div id="qkq_zjz1_6"></div>
  123. <div id="qkq_zjz2_6"></div>
  124. </div>
  125. </div>
  126. </div>
  127. <!--左侧结束-->
  128. </div>
  129. <!-- 中间内容 结束 -->
  130. <!--底部开始-->
  131. <div class="footer">
  132. <div class="nav-bottom">
  133. <div class="nav-bottom-left">
  134. <div class="nav-li-left on" @click="handleNavigation('jjyx')">
  135. <span>经济运行</span>
  136. </div>
  137. <div class="nav-li-left" @click="handleNavigation('csgl')">
  138. <span>城市管理</span>
  139. </div>
  140. <div class="nav-li-left" @click="handleNavigation('jtzl')">
  141. <span>交通治理</span>
  142. </div>
  143. <div class="nav-li-left" @click="handleNavigation('jczl')">
  144. <span>基层治理</span>
  145. </div>
  146. </div>
  147. <div class="nav-home-middle" @click="homePage('weather')">
  148. <img src="@/assets/images/home-btn.png"/>
  149. <a>返回首页</a>
  150. </div>
  151. <div class="nav-bottom-right">
  152. <div class="nav-li-right" @click="handleNavigation('yshj_new')">
  153. <span>营商环境</span>
  154. </div>
  155. <div class="nav-li-right" @click="handleNavigation('yshj')">
  156. <span>政务运行</span>
  157. </div>
  158. <div class="nav-li-right" @click="handleNavigation('aqyj')">
  159. <span>安全应急</span>
  160. </div>
  161. <div class="nav-li-right" @click="handleNavigation('fwyq')">
  162. <span>服务一汽</span>
  163. </div>
  164. </div>
  165. </div>
  166. </div>
  167. <!--底部开始-->
  168. </div>
  169. </template>
  170. <script>
  171. import * as echarts from 'echarts'
  172. import $ from 'jquery'
  173. import jQuery from 'jquery'
  174. import "@/assets/images/qkq_body.css";
  175. import "@/assets/images/qkq_index.css";
  176. import "@/assets/images/qkq_sprh.css";
  177. import {
  178. getCameraList
  179. } from "@/api/system/camera";
  180. import supermap from "@/views/supermap/supermap";
  181. export default {
  182. name: "jjyx",
  183. components: {
  184. supermap
  185. },
  186. data() {
  187. return {
  188. dropdownVisible: false,
  189. cameras: [],
  190. sltProps: null,
  191. currentTime: '',
  192. btnOne: true,
  193. btnTwo: false
  194. };
  195. // 可根据实际情况添加更多设备列表
  196. },
  197. created() {
  198. },
  199. mounted() {
  200. this.qkq_zjz1_1();
  201. this.qkq_zjz2_1();
  202. this.qkq_zjz1_2();
  203. this.qkq_zjz2_2();
  204. this.qkq_zjz1_3();
  205. this.qkq_zjz2_3();
  206. this.qkq_zjz1_4();
  207. this.qkq_zjz2_4();
  208. this.qkq_zjz1_5();
  209. this.qkq_zjz2_5();
  210. this.qkq_zjz1_6();
  211. this.qkq_zjz2_6();
  212. this.getCurrentTime();
  213. this.qkq_jdt();
  214. this.qkq_kxt();
  215. // 每秒刷新时间
  216. setInterval(() => {
  217. this.getCurrentTime();
  218. }, 1000);
  219. },
  220. methods: {
  221. sltHandle() {
  222. this.btnOne = true
  223. this.btnTwo = false
  224. this.$refs.supermap.getSupermap(null, null, null, "slt", null, null)
  225. },
  226. yxtHandle() {
  227. this.btnTwo = true
  228. this.btnOne = false
  229. this.$refs.supermap.getSupermap(null, null, null, "yxt", null, null)
  230. },
  231. handleNavigation(route) {
  232. this.$router.push({
  233. path: route
  234. });
  235. },
  236. homePage(route) {
  237. this.$router.push({
  238. path: route
  239. });
  240. },
  241. cameraList() {
  242. getCameraList().then(response => {
  243. this.cameras = response.data;
  244. })
  245. },
  246. toggleDropdown(event) {
  247. this.dropdownVisible = !this.dropdownVisible;
  248. },
  249. qkq_zjz1_1() {
  250. //一汽红旗项目服务局
  251. var myChart = echarts.init(document.getElementById('qkq_zjz1_1'));
  252. let angle = 0; //角度,用来做简单的动画效果的
  253. var data = [{
  254. value: "10",
  255. itemStyle: {
  256. color: "#ffbf00"
  257. }
  258. },
  259. {
  260. value: "100",
  261. itemStyle: {
  262. color: "#fc465"
  263. }
  264. }
  265. ];
  266. var dataTotal = Number(data[1].value) + Number(data[0].value)
  267. var dataArr = [{
  268. value: Number(data[0].value),
  269. name: '增加值',
  270. itemStyle: {
  271. normal: {
  272. color: "#5a98ed"
  273. }
  274. }
  275. }, {
  276. value: Number(data[1].value),
  277. name: '总数',
  278. itemStyle: {
  279. normal: {
  280. color: "#1a3b72"
  281. }
  282. }
  283. }]
  284. var option = {
  285. title: [
  286. {
  287. text: '工业增加值',
  288. left: '49%',
  289. top: '40%',
  290. textAlign: 'center',
  291. textBaseline: 'middle',
  292. textStyle: {
  293. color: '#66b1ff',
  294. fontWeight: 'normal',
  295. fontSize: 16
  296. }
  297. }, {
  298. text: Math.floor((data[1].value / dataTotal) * 100) + '%',
  299. left: '49%',
  300. top: '55%',
  301. textAlign: 'center',
  302. textBaseline: 'middle',
  303. textStyle: {
  304. color: '#ffff00',
  305. fontWeight: 'normal',
  306. fontSize: 18
  307. }
  308. }],
  309. series: [
  310. {
  311. name: 'ring5',
  312. type: 'custom',
  313. coordinateSystem: 'none',
  314. renderItem: function (params, api) {
  315. return {
  316. type: 'arc',
  317. shape: {
  318. cx: api.getWidth() / 2,
  319. cy: api.getHeight() / 2,
  320. r: (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.7,
  321. startAngle: ((0 + angle) * Math.PI) / 180,
  322. endAngle: ((90 + angle) * Math.PI) / 180,
  323. },
  324. style: {
  325. stroke: '#fddb00',
  326. fill: 'transparent',
  327. lineWidth: 1.5,
  328. },
  329. silent: true,
  330. };
  331. },
  332. data: [0],
  333. },
  334. {
  335. name: 'ring5',
  336. type: 'custom',
  337. coordinateSystem: 'none',
  338. renderItem: function (params, api) {
  339. return {
  340. type: 'arc',
  341. shape: {
  342. cx: api.getWidth() / 2,
  343. cy: api.getHeight() / 2,
  344. r: (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.7,
  345. startAngle: ((180 + angle) * Math.PI) / 180,
  346. endAngle: ((270 + angle) * Math.PI) / 180,
  347. },
  348. style: {
  349. stroke: '#fddb00',
  350. fill: 'transparent',
  351. lineWidth: 1.5,
  352. },
  353. silent: true,
  354. };
  355. },
  356. data: [0],
  357. },
  358. {
  359. name: 'ring5',
  360. type: 'custom',
  361. coordinateSystem: 'none',
  362. renderItem: function (params, api) {
  363. return {
  364. type: 'arc',
  365. shape: {
  366. cx: api.getWidth() / 2,
  367. cy: api.getHeight() / 2,
  368. r: (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.75,
  369. startAngle: ((270 + -angle) * Math.PI) / 180,
  370. endAngle: ((40 + -angle) * Math.PI) / 180,
  371. },
  372. style: {
  373. stroke: '#0CD3DB',
  374. fill: 'transparent',
  375. lineWidth: 1.5,
  376. },
  377. silent: true,
  378. };
  379. },
  380. data: [0],
  381. },
  382. {
  383. name: 'ring5',
  384. type: 'custom',
  385. coordinateSystem: 'none',
  386. renderItem: function (params, api) {
  387. return {
  388. type: 'arc',
  389. shape: {
  390. cx: api.getWidth() / 2,
  391. cy: api.getHeight() / 2,
  392. r: (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.75,
  393. startAngle: ((90 + -angle) * Math.PI) / 180,
  394. endAngle: ((220 + -angle) * Math.PI) / 180,
  395. },
  396. style: {
  397. stroke: '#0CD3DB',
  398. fill: 'transparent',
  399. lineWidth: 1.5,
  400. },
  401. silent: true,
  402. };
  403. },
  404. data: [0],
  405. },
  406. {
  407. name: 'ring5',
  408. type: 'custom',
  409. coordinateSystem: 'none',
  410. renderItem: function (params, api) {
  411. let x0 = api.getWidth() / 2;
  412. let y0 = api.getHeight() / 2;
  413. let r = (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.75;
  414. let point = getCirlPoint(x0, y0, r, 90 + -angle);
  415. return {
  416. type: 'circle',
  417. shape: {
  418. cx: point.x,
  419. cy: point.y,
  420. r: 4,
  421. },
  422. style: {
  423. stroke: '#0CD3DB', //粉
  424. fill: '#0CD3DB',
  425. },
  426. silent: true,
  427. };
  428. },
  429. data: [0],
  430. },
  431. {
  432. name: 'ring5', //绿点
  433. type: 'custom',
  434. coordinateSystem: 'none',
  435. renderItem: function (params, api) {
  436. let x0 = api.getWidth() / 2;
  437. let y0 = api.getHeight() / 2;
  438. let r = (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.75;
  439. let point = getCirlPoint(x0, y0, r, 270 + -angle);
  440. return {
  441. type: 'circle',
  442. shape: {
  443. cx: point.x,
  444. cy: point.y,
  445. r: 4,
  446. },
  447. style: {
  448. stroke: '#0CD3DB', //绿
  449. fill: '#0CD3DB',
  450. },
  451. silent: true,
  452. };
  453. },
  454. data: [0],
  455. },
  456. {
  457. radius: ['45%', '60%'],
  458. name: '',
  459. type: 'pie',
  460. selectedOffset: 16,
  461. startAngle: 90,
  462. z: 3,
  463. labelLine: {
  464. normal: {
  465. length: 15,
  466. length2: 22,
  467. lineStyle: {
  468. width: 2
  469. }
  470. }
  471. },
  472. label: {
  473. normal: {
  474. textStyle: {
  475. fontSize: 14
  476. },
  477. formatter: function (params) {
  478. return params.name + '\n' + params.value
  479. }
  480. }
  481. },
  482. data: dataArr
  483. }]
  484. };
  485. myChart.setOption(option, true);
  486. if (option) {
  487. myChart.setOption(option);
  488. }
  489. //获取圆上面某点的坐标(x0,y0表示坐标,r半径,angle角度)
  490. function getCirlPoint(x0, y0, r, angle) {
  491. let x1 = x0 + r * Math.cos((angle * Math.PI) / 180);
  492. let y1 = y0 + r * Math.sin((angle * Math.PI) / 180);
  493. return {
  494. x: x1,
  495. y: y1,
  496. };
  497. }
  498. function draw() {
  499. angle = angle + 3;
  500. myChart.setOption(option, true);
  501. //window.requestAnimationFrame(draw);
  502. }
  503. setInterval(function () {
  504. //用setInterval做动画感觉有问题
  505. draw();
  506. }, 100);
  507. },
  508. qkq_zjz2_1() {
  509. var myChart = echarts.init(document.getElementById('qkq_zjz2_1'));
  510. let xData = ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
  511. let yData = [25, 100, 50, 45, 75, 25, 100, 50, 45, 75, 25, 100, 50, 45, 75]
  512. let barData = [25, 60, 50, 45, 75, 25, 60, 50, 45, 75, 25, 60, 50, 45, 75]
  513. function calMax(arr) {
  514. let max = 0;
  515. arr.forEach((el) => {
  516. el.forEach((el1) => {
  517. if (!(el1 === undefined || el1 === '')) {
  518. if (Number(max) < Number(el1)) {
  519. max = Number(el1);
  520. }
  521. }
  522. })
  523. })
  524. let maxint = Math.ceil(max / 9.5);
  525. //不让最高的值超过最上面的刻度
  526. let maxval = maxint * 10;
  527. //让显示的刻度是整数
  528. return maxval;
  529. }
  530. var max = Math.ceil(calMax([yData]) / 50) * 50;
  531. var max1 = Math.ceil(calMax([barData]) / 50) * 50;
  532. var option = {
  533. legend: {
  534. left: '1%',
  535. textStyle: {
  536. color: "#fff",
  537. fontSize: 12
  538. },
  539. },
  540. grid: {
  541. left: '1%',
  542. top: 60,
  543. right: 0,
  544. bottom: 0,
  545. containLabel: true
  546. },
  547. tooltip: {
  548. trigger: 'axis'
  549. },
  550. xAxis: {
  551. data: xData,
  552. axisTick: {
  553. show: false
  554. },
  555. axisLabel: {
  556. color: 'rgba(204, 234, 255, 1)'
  557. },
  558. axisLine: {
  559. lineStyle: {
  560. color: 'rgba(18, 255, 255, 0.5)'
  561. }
  562. }
  563. },
  564. yAxis: [{
  565. max: max1,
  566. name: '2024年',
  567. nameTextStyle: {
  568. align: 'left',
  569. color: 'rgba(204, 234, 255, 1)'
  570. },
  571. axisLabel: {
  572. color: 'rgba(204, 234, 255, 1)'
  573. },
  574. axisTick: {
  575. show: false
  576. },
  577. axisLine: {
  578. show: false
  579. },
  580. splitLine: {
  581. lineStyle: {
  582. type: 'dashed',
  583. color: 'rgba(18, 255, 255, 0.5)'
  584. }
  585. }
  586. }, {
  587. max: max,
  588. name: '2023年',
  589. position: 'right',
  590. nameTextStyle: {
  591. align: 'right',
  592. color: 'rgba(204, 234, 255, 1)'
  593. },
  594. axisLabel: {
  595. color: 'rgba(204, 234, 255, 1)'
  596. },
  597. axisTick: {
  598. show: false
  599. },
  600. axisLine: {
  601. show: false
  602. },
  603. splitLine: {
  604. lineStyle: {
  605. type: 'dashed',
  606. color: 'rgba(18, 255, 255, 0.5)'
  607. }
  608. }
  609. }],
  610. series: [
  611. {
  612. name: '2024年',
  613. type: 'bar',
  614. data: barData,
  615. barWidth: 10,
  616. yAxisIndex: 0,
  617. itemStyle: {
  618. normal: {
  619. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  620. offset: 0,
  621. color: '#1D82FF'
  622. }, {
  623. offset: 1,
  624. color: '#00FFF6'
  625. }]),
  626. barBorderRadius: [4, 4, 0, 0]
  627. }
  628. }
  629. },
  630. {
  631. name: '2023年',
  632. type: 'line',
  633. data: yData,
  634. yAxisIndex: 1,
  635. smooth: true,
  636. symbol: 'none',
  637. itemStyle: {
  638. normal: {
  639. lineStyle: {
  640. color: {
  641. // 两端添加透明度,模拟两端线收缩
  642. colorStops: [{
  643. offset: 0,
  644. color: 'rgba(255, 227, 168, 0)' // 0% 处的颜色
  645. }, {
  646. offset: 0.2,
  647. color: 'rgba(255, 227, 168, 1)' // 100% 处的颜色
  648. }, {
  649. offset: 0.8,
  650. color: 'rgba(255, 227, 168, 1)' // 100% 处的颜色
  651. }, {
  652. offset: 1,
  653. color: 'rgba(255, 227, 168, 0)'
  654. }]
  655. },
  656. shadowColor: 'rgba(255, 120, 0, 1)',
  657. shadowBlur: 8
  658. },
  659. areaStyle: {
  660. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  661. offset: 0,
  662. color: 'rgba(197, 106, 255, 0.6)'
  663. }, {
  664. offset: 0.6,
  665. color: 'rgba(255, 120, 0, 0)'
  666. }]),
  667. }
  668. }
  669. }
  670. },
  671. {
  672. type: 'lines',
  673. coordinateSystem: 'cartesian2d',
  674. data: barData.map((item, index) => {
  675. return {
  676. coords: [
  677. [index, 0],
  678. [index, item - 4]
  679. ]
  680. };
  681. }),
  682. effect: {
  683. show: true,
  684. period: 2.5,
  685. trailLength: 0.5, //控制拖尾长度
  686. symbolSize: [15, 2],
  687. symbol: this.$store.state.common.echarts_baseStreamer,
  688. loop: true,
  689. color: '#fff' //流光颜色
  690. },
  691. lineStyle: {
  692. width: 0,
  693. opacity: 0.6,
  694. curveness: 0
  695. },
  696. z: 999
  697. },
  698. ]
  699. };
  700. if (option) {
  701. myChart.setOption(option);
  702. }
  703. },
  704. qkq_zjz1_2() {
  705. //一汽红旗项目服务局
  706. var myChart = echarts.init(document.getElementById('qkq_zjz1_2'));
  707. let angle = 0; //角度,用来做简单的动画效果的
  708. var data = [{
  709. value: "10",
  710. itemStyle: {
  711. color: "#ffbf00"
  712. }
  713. },
  714. {
  715. value: "100",
  716. itemStyle: {
  717. color: "#fc465"
  718. }
  719. }
  720. ];
  721. var dataTotal = Number(data[1].value) + Number(data[0].value)
  722. var dataArr = [{
  723. value: Number(data[0].value),
  724. name: '增加值',
  725. itemStyle: {
  726. normal: {
  727. color: "#5a98ed"
  728. }
  729. }
  730. }, {
  731. value: Number(data[1].value),
  732. name: '总数',
  733. itemStyle: {
  734. normal: {
  735. color: "#1a3b72"
  736. }
  737. }
  738. }]
  739. var option = {
  740. title: [{
  741. text: '工业增加值',
  742. left: '49%',
  743. top: '40%',
  744. textAlign: 'center',
  745. textBaseline: 'middle',
  746. textStyle: {
  747. color: '#66b1ff',
  748. fontWeight: 'normal',
  749. fontSize: 16
  750. }
  751. }, {
  752. text: Math.floor((data[1].value / dataTotal) * 100) + '%',
  753. left: '49%',
  754. top: '55%',
  755. textAlign: 'center',
  756. textBaseline: 'middle',
  757. textStyle: {
  758. color: '#ffff00',
  759. fontWeight: 'normal',
  760. fontSize: 18
  761. }
  762. }],
  763. series: [
  764. {
  765. name: 'ring5',
  766. type: 'custom',
  767. coordinateSystem: 'none',
  768. renderItem: function (params, api) {
  769. return {
  770. type: 'arc',
  771. shape: {
  772. cx: api.getWidth() / 2,
  773. cy: api.getHeight() / 2,
  774. r: (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.7,
  775. startAngle: ((0 + angle) * Math.PI) / 180,
  776. endAngle: ((90 + angle) * Math.PI) / 180,
  777. },
  778. style: {
  779. stroke: '#fddb00',
  780. fill: 'transparent',
  781. lineWidth: 1.5,
  782. },
  783. silent: true,
  784. };
  785. },
  786. data: [0],
  787. },
  788. {
  789. name: 'ring5',
  790. type: 'custom',
  791. coordinateSystem: 'none',
  792. renderItem: function (params, api) {
  793. return {
  794. type: 'arc',
  795. shape: {
  796. cx: api.getWidth() / 2,
  797. cy: api.getHeight() / 2,
  798. r: (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.7,
  799. startAngle: ((180 + angle) * Math.PI) / 180,
  800. endAngle: ((270 + angle) * Math.PI) / 180,
  801. },
  802. style: {
  803. stroke: '#fddb00',
  804. fill: 'transparent',
  805. lineWidth: 1.5,
  806. },
  807. silent: true,
  808. };
  809. },
  810. data: [0],
  811. },
  812. {
  813. name: 'ring5',
  814. type: 'custom',
  815. coordinateSystem: 'none',
  816. renderItem: function (params, api) {
  817. return {
  818. type: 'arc',
  819. shape: {
  820. cx: api.getWidth() / 2,
  821. cy: api.getHeight() / 2,
  822. r: (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.75,
  823. startAngle: ((270 + -angle) * Math.PI) / 180,
  824. endAngle: ((40 + -angle) * Math.PI) / 180,
  825. },
  826. style: {
  827. stroke: '#0CD3DB',
  828. fill: 'transparent',
  829. lineWidth: 1.5,
  830. },
  831. silent: true,
  832. };
  833. },
  834. data: [0],
  835. },
  836. {
  837. name: 'ring5',
  838. type: 'custom',
  839. coordinateSystem: 'none',
  840. renderItem: function (params, api) {
  841. return {
  842. type: 'arc',
  843. shape: {
  844. cx: api.getWidth() / 2,
  845. cy: api.getHeight() / 2,
  846. r: (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.75,
  847. startAngle: ((90 + -angle) * Math.PI) / 180,
  848. endAngle: ((220 + -angle) * Math.PI) / 180,
  849. },
  850. style: {
  851. stroke: '#0CD3DB',
  852. fill: 'transparent',
  853. lineWidth: 1.5,
  854. },
  855. silent: true,
  856. };
  857. },
  858. data: [0],
  859. },
  860. {
  861. name: 'ring5',
  862. type: 'custom',
  863. coordinateSystem: 'none',
  864. renderItem: function (params, api) {
  865. let x0 = api.getWidth() / 2;
  866. let y0 = api.getHeight() / 2;
  867. let r = (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.75;
  868. let point = getCirlPoint(x0, y0, r, 90 + -angle);
  869. return {
  870. type: 'circle',
  871. shape: {
  872. cx: point.x,
  873. cy: point.y,
  874. r: 4,
  875. },
  876. style: {
  877. stroke: '#0CD3DB', //粉
  878. fill: '#0CD3DB',
  879. },
  880. silent: true,
  881. };
  882. },
  883. data: [0],
  884. },
  885. {
  886. name: 'ring5', //绿点
  887. type: 'custom',
  888. coordinateSystem: 'none',
  889. renderItem: function (params, api) {
  890. let x0 = api.getWidth() / 2;
  891. let y0 = api.getHeight() / 2;
  892. let r = (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.75;
  893. let point = getCirlPoint(x0, y0, r, 270 + -angle);
  894. return {
  895. type: 'circle',
  896. shape: {
  897. cx: point.x,
  898. cy: point.y,
  899. r: 4,
  900. },
  901. style: {
  902. stroke: '#0CD3DB', //绿
  903. fill: '#0CD3DB',
  904. },
  905. silent: true,
  906. };
  907. },
  908. data: [0],
  909. },
  910. {
  911. radius: ['50%', '65%'],
  912. name: '',
  913. type: 'pie',
  914. selectedOffset: 16,
  915. startAngle: 90,
  916. z: 3,
  917. labelLine: {
  918. normal: {
  919. length: 15,
  920. length2: 22,
  921. lineStyle: {
  922. width: 2
  923. }
  924. }
  925. },
  926. label: {
  927. normal: {
  928. textStyle: {
  929. fontSize: 14
  930. },
  931. formatter: function (params) {
  932. return params.name + '\n' + params.value
  933. }
  934. }
  935. },
  936. data: dataArr
  937. }]
  938. };
  939. myChart.setOption(option, true);
  940. if (option) {
  941. myChart.setOption(option);
  942. }
  943. //获取圆上面某点的坐标(x0,y0表示坐标,r半径,angle角度)
  944. function getCirlPoint(x0, y0, r, angle) {
  945. let x1 = x0 + r * Math.cos((angle * Math.PI) / 180);
  946. let y1 = y0 + r * Math.sin((angle * Math.PI) / 180);
  947. return {
  948. x: x1,
  949. y: y1,
  950. };
  951. }
  952. function draw() {
  953. angle = angle + 3;
  954. myChart.setOption(option, true);
  955. //window.requestAnimationFrame(draw);
  956. }
  957. setInterval(function () {
  958. //用setInterval做动画感觉有问题
  959. draw();
  960. }, 100);
  961. },
  962. qkq_zjz2_2() {
  963. var myChart = echarts.init(document.getElementById('qkq_zjz2_2'));
  964. let xData = ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
  965. let yData = [25, 100, 50, 45, 75, 25, 100, 50, 45, 75, 25, 100, 50, 45, 75]
  966. let barData = [25, 60, 50, 45, 75, 25, 60, 50, 45, 75, 25, 60, 50, 45, 75]
  967. function calMax(arr) {
  968. let max = 0;
  969. arr.forEach((el) => {
  970. el.forEach((el1) => {
  971. if (!(el1 === undefined || el1 === '')) {
  972. if (Number(max) < Number(el1)) {
  973. max = Number(el1);
  974. }
  975. }
  976. })
  977. })
  978. let maxint = Math.ceil(max / 9.5);
  979. //不让最高的值超过最上面的刻度
  980. let maxval = maxint * 10;
  981. //让显示的刻度是整数
  982. return maxval;
  983. }
  984. var max = Math.ceil(calMax([yData]) / 50) * 50;
  985. var max1 = Math.ceil(calMax([barData]) / 50) * 50;
  986. var option = {
  987. legend: {
  988. left: '1%',
  989. textStyle: {
  990. color: "#fff",
  991. fontSize: 12
  992. },
  993. },
  994. grid: {
  995. left: '1%',
  996. top: 60,
  997. right: 0,
  998. bottom: 0,
  999. containLabel: true
  1000. },
  1001. tooltip: {
  1002. trigger: 'axis'
  1003. },
  1004. xAxis: {
  1005. data: xData,
  1006. axisTick: {
  1007. show: false
  1008. },
  1009. axisLabel: {
  1010. color: 'rgba(204, 234, 255, 1)'
  1011. },
  1012. axisLine: {
  1013. lineStyle: {
  1014. color: 'rgba(18, 255, 255, 0.5)'
  1015. }
  1016. }
  1017. },
  1018. yAxis: [{
  1019. max: max1,
  1020. name: '2024年',
  1021. nameTextStyle: {
  1022. align: 'left',
  1023. color: 'rgba(204, 234, 255, 1)'
  1024. },
  1025. axisLabel: {
  1026. color: 'rgba(204, 234, 255, 1)'
  1027. },
  1028. axisTick: {
  1029. show: false
  1030. },
  1031. axisLine: {
  1032. show: false
  1033. },
  1034. splitLine: {
  1035. lineStyle: {
  1036. type: 'dashed',
  1037. color: 'rgba(18, 255, 255, 0.5)'
  1038. }
  1039. }
  1040. }, {
  1041. max: max,
  1042. name: '2023年',
  1043. position: 'right',
  1044. nameTextStyle: {
  1045. align: 'right',
  1046. color: 'rgba(204, 234, 255, 1)'
  1047. },
  1048. axisLabel: {
  1049. color: 'rgba(204, 234, 255, 1)'
  1050. },
  1051. axisTick: {
  1052. show: false
  1053. },
  1054. axisLine: {
  1055. show: false
  1056. },
  1057. splitLine: {
  1058. lineStyle: {
  1059. type: 'dashed',
  1060. color: 'rgba(18, 255, 255, 0.5)'
  1061. }
  1062. }
  1063. }],
  1064. series: [{
  1065. name: '2024年',
  1066. type: 'bar',
  1067. data: barData,
  1068. barWidth: 10,
  1069. yAxisIndex: 0,
  1070. itemStyle: {
  1071. normal: {
  1072. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1073. offset: 0,
  1074. color: '#1D82FF'
  1075. }, {
  1076. offset: 1,
  1077. color: '#00FFF6'
  1078. }]),
  1079. barBorderRadius: [4, 4, 0, 0]
  1080. }
  1081. }
  1082. }, {
  1083. name: '2023年',
  1084. type: 'line',
  1085. data: yData,
  1086. yAxisIndex: 1,
  1087. smooth: true,
  1088. symbol: 'none',
  1089. itemStyle: {
  1090. normal: {
  1091. lineStyle: {
  1092. color: {
  1093. // 两端添加透明度,模拟两端线收缩
  1094. colorStops: [{
  1095. offset: 0,
  1096. color: 'rgba(255, 227, 168, 0)' // 0% 处的颜色
  1097. }, {
  1098. offset: 0.2,
  1099. color: 'rgba(255, 227, 168, 1)' // 100% 处的颜色
  1100. }, {
  1101. offset: 0.8,
  1102. color: 'rgba(255, 227, 168, 1)' // 100% 处的颜色
  1103. }, {
  1104. offset: 1,
  1105. color: 'rgba(255, 227, 168, 0)'
  1106. }]
  1107. },
  1108. shadowColor: 'rgba(255, 120, 0, 1)',
  1109. shadowBlur: 8
  1110. },
  1111. areaStyle: {
  1112. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1113. offset: 0,
  1114. color: 'rgba(197, 106, 255, 0.6)'
  1115. }, {
  1116. offset: 0.6,
  1117. color: 'rgba(255, 120, 0, 0)'
  1118. }]),
  1119. }
  1120. }
  1121. }
  1122. },
  1123. {
  1124. type: 'lines',
  1125. coordinateSystem: 'cartesian2d',
  1126. data: barData.map((item, index) => {
  1127. return {
  1128. coords: [
  1129. [index, 0],
  1130. [index, item - 4]
  1131. ]
  1132. };
  1133. }),
  1134. effect: {
  1135. show: true,
  1136. period: 2.5,
  1137. trailLength: 0.5, //控制拖尾长度
  1138. symbolSize: [15, 2],
  1139. symbol: this.$store.state.common.echarts_baseStreamer,
  1140. loop: true,
  1141. color: '#fff' //流光颜色
  1142. },
  1143. lineStyle: {
  1144. width: 0,
  1145. opacity: 0.6,
  1146. curveness: 0
  1147. },
  1148. z: 999
  1149. },]
  1150. };
  1151. if (option) {
  1152. myChart.setOption(option);
  1153. }
  1154. },
  1155. qkq_zjz1_3() {
  1156. //一汽红旗项目服务局
  1157. var myChart = echarts.init(document.getElementById('qkq_zjz1_3'));
  1158. let angle = 0; //角度,用来做简单的动画效果的
  1159. var data = [{
  1160. value: "10",
  1161. itemStyle: {
  1162. color: "#ffbf00"
  1163. }
  1164. },
  1165. {
  1166. value: "100",
  1167. itemStyle: {
  1168. color: "#fc465"
  1169. }
  1170. }
  1171. ];
  1172. var dataTotal = Number(data[1].value) + Number(data[0].value)
  1173. var dataArr = [{
  1174. value: Number(data[0].value),
  1175. name: '增加值',
  1176. itemStyle: {
  1177. normal: {
  1178. color: "#5a98ed"
  1179. }
  1180. }
  1181. }, {
  1182. value: Number(data[1].value),
  1183. name: '总数',
  1184. itemStyle: {
  1185. normal: {
  1186. color: "#1a3b72"
  1187. }
  1188. }
  1189. }]
  1190. var option = {
  1191. title: [{
  1192. text: '工业增加值',
  1193. left: '49%',
  1194. top: '40%',
  1195. textAlign: 'center',
  1196. textBaseline: 'middle',
  1197. textStyle: {
  1198. color: '#66b1ff',
  1199. fontWeight: 'normal',
  1200. fontSize: 16
  1201. }
  1202. }, {
  1203. text: Math.floor((data[1].value / dataTotal) * 100) + '%',
  1204. left: '49%',
  1205. top: '55%',
  1206. textAlign: 'center',
  1207. textBaseline: 'middle',
  1208. textStyle: {
  1209. color: '#ffff00',
  1210. fontWeight: 'normal',
  1211. fontSize: 18
  1212. }
  1213. }],
  1214. series: [
  1215. {
  1216. name: 'ring5',
  1217. type: 'custom',
  1218. coordinateSystem: 'none',
  1219. renderItem: function (params, api) {
  1220. return {
  1221. type: 'arc',
  1222. shape: {
  1223. cx: api.getWidth() / 2,
  1224. cy: api.getHeight() / 2,
  1225. r: (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.7,
  1226. startAngle: ((0 + angle) * Math.PI) / 180,
  1227. endAngle: ((90 + angle) * Math.PI) / 180,
  1228. },
  1229. style: {
  1230. stroke: '#fddb00',
  1231. fill: 'transparent',
  1232. lineWidth: 1.5,
  1233. },
  1234. silent: true,
  1235. };
  1236. },
  1237. data: [0],
  1238. },
  1239. {
  1240. name: 'ring5',
  1241. type: 'custom',
  1242. coordinateSystem: 'none',
  1243. renderItem: function (params, api) {
  1244. return {
  1245. type: 'arc',
  1246. shape: {
  1247. cx: api.getWidth() / 2,
  1248. cy: api.getHeight() / 2,
  1249. r: (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.7,
  1250. startAngle: ((180 + angle) * Math.PI) / 180,
  1251. endAngle: ((270 + angle) * Math.PI) / 180,
  1252. },
  1253. style: {
  1254. stroke: '#fddb00',
  1255. fill: 'transparent',
  1256. lineWidth: 1.5,
  1257. },
  1258. silent: true,
  1259. };
  1260. },
  1261. data: [0],
  1262. },
  1263. {
  1264. name: 'ring5',
  1265. type: 'custom',
  1266. coordinateSystem: 'none',
  1267. renderItem: function (params, api) {
  1268. return {
  1269. type: 'arc',
  1270. shape: {
  1271. cx: api.getWidth() / 2,
  1272. cy: api.getHeight() / 2,
  1273. r: (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.75,
  1274. startAngle: ((270 + -angle) * Math.PI) / 180,
  1275. endAngle: ((40 + -angle) * Math.PI) / 180,
  1276. },
  1277. style: {
  1278. stroke: '#0CD3DB',
  1279. fill: 'transparent',
  1280. lineWidth: 1.5,
  1281. },
  1282. silent: true,
  1283. };
  1284. },
  1285. data: [0],
  1286. },
  1287. {
  1288. name: 'ring5',
  1289. type: 'custom',
  1290. coordinateSystem: 'none',
  1291. renderItem: function (params, api) {
  1292. return {
  1293. type: 'arc',
  1294. shape: {
  1295. cx: api.getWidth() / 2,
  1296. cy: api.getHeight() / 2,
  1297. r: (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.75,
  1298. startAngle: ((90 + -angle) * Math.PI) / 180,
  1299. endAngle: ((220 + -angle) * Math.PI) / 180,
  1300. },
  1301. style: {
  1302. stroke: '#0CD3DB',
  1303. fill: 'transparent',
  1304. lineWidth: 1.5,
  1305. },
  1306. silent: true,
  1307. };
  1308. },
  1309. data: [0],
  1310. },
  1311. {
  1312. name: 'ring5',
  1313. type: 'custom',
  1314. coordinateSystem: 'none',
  1315. renderItem: function (params, api) {
  1316. let x0 = api.getWidth() / 2;
  1317. let y0 = api.getHeight() / 2;
  1318. let r = (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.75;
  1319. let point = getCirlPoint(x0, y0, r, 90 + -angle);
  1320. return {
  1321. type: 'circle',
  1322. shape: {
  1323. cx: point.x,
  1324. cy: point.y,
  1325. r: 4,
  1326. },
  1327. style: {
  1328. stroke: '#0CD3DB', //粉
  1329. fill: '#0CD3DB',
  1330. },
  1331. silent: true,
  1332. };
  1333. },
  1334. data: [0],
  1335. },
  1336. {
  1337. name: 'ring5', //绿点
  1338. type: 'custom',
  1339. coordinateSystem: 'none',
  1340. renderItem: function (params, api) {
  1341. let x0 = api.getWidth() / 2;
  1342. let y0 = api.getHeight() / 2;
  1343. let r = (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.75;
  1344. let point = getCirlPoint(x0, y0, r, 270 + -angle);
  1345. return {
  1346. type: 'circle',
  1347. shape: {
  1348. cx: point.x,
  1349. cy: point.y,
  1350. r: 4,
  1351. },
  1352. style: {
  1353. stroke: '#0CD3DB', //绿
  1354. fill: '#0CD3DB',
  1355. },
  1356. silent: true,
  1357. };
  1358. },
  1359. data: [0],
  1360. },
  1361. {
  1362. radius: ['50%', '65%'],
  1363. name: '',
  1364. type: 'pie',
  1365. selectedOffset: 16,
  1366. startAngle: 90,
  1367. z: 3,
  1368. labelLine: {
  1369. normal: {
  1370. length: 15,
  1371. length2: 22,
  1372. lineStyle: {
  1373. width: 2
  1374. }
  1375. }
  1376. },
  1377. label: {
  1378. normal: {
  1379. textStyle: {
  1380. fontSize: 14
  1381. },
  1382. formatter: function (params) {
  1383. return params.name + '\n' + params.value
  1384. }
  1385. }
  1386. },
  1387. data: dataArr
  1388. }]
  1389. };
  1390. myChart.setOption(option, true);
  1391. if (option) {
  1392. myChart.setOption(option);
  1393. }
  1394. //获取圆上面某点的坐标(x0,y0表示坐标,r半径,angle角度)
  1395. function getCirlPoint(x0, y0, r, angle) {
  1396. let x1 = x0 + r * Math.cos((angle * Math.PI) / 180);
  1397. let y1 = y0 + r * Math.sin((angle * Math.PI) / 180);
  1398. return {
  1399. x: x1,
  1400. y: y1,
  1401. };
  1402. }
  1403. function draw() {
  1404. angle = angle + 3;
  1405. myChart.setOption(option, true);
  1406. //window.requestAnimationFrame(draw);
  1407. }
  1408. setInterval(function () {
  1409. //用setInterval做动画感觉有问题
  1410. draw();
  1411. }, 100);
  1412. },
  1413. qkq_zjz2_3() {
  1414. var myChart = echarts.init(document.getElementById('qkq_zjz2_3'));
  1415. let xData = ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
  1416. let yData = [25, 100, 50, 45, 75, 25, 100, 50, 45, 75, 25, 100, 50, 45, 75]
  1417. let barData = [25, 60, 50, 45, 75, 25, 60, 50, 45, 75, 25, 60, 50, 45, 75]
  1418. function calMax(arr) {
  1419. let max = 0;
  1420. arr.forEach((el) => {
  1421. el.forEach((el1) => {
  1422. if (!(el1 === undefined || el1 === '')) {
  1423. if (Number(max) < Number(el1)) {
  1424. max = Number(el1);
  1425. }
  1426. }
  1427. })
  1428. })
  1429. let maxint = Math.ceil(max / 9.5);
  1430. //不让最高的值超过最上面的刻度
  1431. let maxval = maxint * 10;
  1432. //让显示的刻度是整数
  1433. return maxval;
  1434. }
  1435. var max = Math.ceil(calMax([yData]) / 50) * 50;
  1436. var max1 = Math.ceil(calMax([barData]) / 50) * 50;
  1437. var option = {
  1438. legend: {
  1439. left: '1%',
  1440. textStyle: {
  1441. color: "#fff",
  1442. fontSize: 12
  1443. },
  1444. },
  1445. grid: {
  1446. left: '1%',
  1447. top: 60,
  1448. right: 0,
  1449. bottom: 0,
  1450. containLabel: true
  1451. },
  1452. tooltip: {
  1453. trigger: 'axis'
  1454. },
  1455. xAxis: {
  1456. data: xData,
  1457. axisTick: {
  1458. show: false
  1459. },
  1460. axisLabel: {
  1461. color: 'rgba(204, 234, 255, 1)'
  1462. },
  1463. axisLine: {
  1464. lineStyle: {
  1465. color: 'rgba(18, 255, 255, 0.5)'
  1466. }
  1467. }
  1468. },
  1469. yAxis: [{
  1470. max: max1,
  1471. name: '2024年',
  1472. nameTextStyle: {
  1473. align: 'left',
  1474. color: 'rgba(204, 234, 255, 1)'
  1475. },
  1476. axisLabel: {
  1477. color: 'rgba(204, 234, 255, 1)'
  1478. },
  1479. axisTick: {
  1480. show: false
  1481. },
  1482. axisLine: {
  1483. show: false
  1484. },
  1485. splitLine: {
  1486. lineStyle: {
  1487. type: 'dashed',
  1488. color: 'rgba(18, 255, 255, 0.5)'
  1489. }
  1490. }
  1491. }, {
  1492. max: max,
  1493. name: '2023年',
  1494. position: 'right',
  1495. nameTextStyle: {
  1496. align: 'right',
  1497. color: 'rgba(204, 234, 255, 1)'
  1498. },
  1499. axisLabel: {
  1500. color: 'rgba(204, 234, 255, 1)'
  1501. },
  1502. axisTick: {
  1503. show: false
  1504. },
  1505. axisLine: {
  1506. show: false
  1507. },
  1508. splitLine: {
  1509. lineStyle: {
  1510. type: 'dashed',
  1511. color: 'rgba(18, 255, 255, 0.5)'
  1512. }
  1513. }
  1514. }],
  1515. series: [{
  1516. name: '2024年',
  1517. type: 'bar',
  1518. data: barData,
  1519. barWidth: 10,
  1520. yAxisIndex: 0,
  1521. itemStyle: {
  1522. normal: {
  1523. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1524. offset: 0,
  1525. color: '#1D82FF'
  1526. }, {
  1527. offset: 1,
  1528. color: '#00FFF6'
  1529. }]),
  1530. barBorderRadius: [4, 4, 0, 0]
  1531. }
  1532. }
  1533. }, {
  1534. name: '2023年',
  1535. type: 'line',
  1536. data: yData,
  1537. yAxisIndex: 1,
  1538. smooth: true,
  1539. symbol: 'none',
  1540. itemStyle: {
  1541. normal: {
  1542. lineStyle: {
  1543. color: {
  1544. // 两端添加透明度,模拟两端线收缩
  1545. colorStops: [{
  1546. offset: 0,
  1547. color: 'rgba(255, 227, 168, 0)' // 0% 处的颜色
  1548. }, {
  1549. offset: 0.2,
  1550. color: 'rgba(255, 227, 168, 1)' // 100% 处的颜色
  1551. }, {
  1552. offset: 0.8,
  1553. color: 'rgba(255, 227, 168, 1)' // 100% 处的颜色
  1554. }, {
  1555. offset: 1,
  1556. color: 'rgba(255, 227, 168, 0)'
  1557. }]
  1558. },
  1559. shadowColor: 'rgba(255, 120, 0, 1)',
  1560. shadowBlur: 8
  1561. },
  1562. areaStyle: {
  1563. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1564. offset: 0,
  1565. color: 'rgba(197, 106, 255, 0.6)'
  1566. }, {
  1567. offset: 0.6,
  1568. color: 'rgba(255, 120, 0, 0)'
  1569. }]),
  1570. }
  1571. }
  1572. }
  1573. },
  1574. {
  1575. type: 'lines',
  1576. coordinateSystem: 'cartesian2d',
  1577. data: barData.map((item, index) => {
  1578. return {
  1579. coords: [
  1580. [index, 0],
  1581. [index, item - 4]
  1582. ]
  1583. };
  1584. }),
  1585. effect: {
  1586. show: true,
  1587. period: 2.5,
  1588. trailLength: 0.5, //控制拖尾长度
  1589. symbolSize: [15, 2],
  1590. symbol: this.$store.state.common.echarts_baseStreamer,
  1591. loop: true,
  1592. color: '#fff' //流光颜色
  1593. },
  1594. lineStyle: {
  1595. width: 0,
  1596. opacity: 0.6,
  1597. curveness: 0
  1598. },
  1599. z: 999
  1600. },]
  1601. };
  1602. if (option) {
  1603. myChart.setOption(option);
  1604. }
  1605. },
  1606. qkq_zjz1_4() {
  1607. //一汽红旗项目服务局
  1608. var myChart = echarts.init(document.getElementById('qkq_zjz1_4'));
  1609. let angle = 0; //角度,用来做简单的动画效果的
  1610. var data = [{
  1611. value: "10",
  1612. itemStyle: {
  1613. color: "#ffbf00"
  1614. }
  1615. },
  1616. {
  1617. value: "100",
  1618. itemStyle: {
  1619. color: "#fc465"
  1620. }
  1621. }
  1622. ];
  1623. var dataTotal = Number(data[1].value) + Number(data[0].value)
  1624. var dataArr = [{
  1625. value: Number(data[0].value),
  1626. name: '增加值',
  1627. itemStyle: {
  1628. normal: {
  1629. color: "#5a98ed"
  1630. }
  1631. }
  1632. }, {
  1633. value: Number(data[1].value),
  1634. name: '总数',
  1635. itemStyle: {
  1636. normal: {
  1637. color: "#1a3b72"
  1638. }
  1639. }
  1640. }]
  1641. var option = {
  1642. title: [{
  1643. text: '工业增加值',
  1644. left: '49%',
  1645. top: '40%',
  1646. textAlign: 'center',
  1647. textBaseline: 'middle',
  1648. textStyle: {
  1649. color: '#66b1ff',
  1650. fontWeight: 'normal',
  1651. fontSize: 16
  1652. }
  1653. }, {
  1654. text: Math.floor((data[1].value / dataTotal) * 100) + '%',
  1655. left: '49%',
  1656. top: '55%',
  1657. textAlign: 'center',
  1658. textBaseline: 'middle',
  1659. textStyle: {
  1660. color: '#ffff00',
  1661. fontWeight: 'normal',
  1662. fontSize: 18
  1663. }
  1664. }],
  1665. series: [
  1666. {
  1667. name: 'ring5',
  1668. type: 'custom',
  1669. coordinateSystem: 'none',
  1670. renderItem: function (params, api) {
  1671. return {
  1672. type: 'arc',
  1673. shape: {
  1674. cx: api.getWidth() / 2,
  1675. cy: api.getHeight() / 2,
  1676. r: (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.7,
  1677. startAngle: ((0 + angle) * Math.PI) / 180,
  1678. endAngle: ((90 + angle) * Math.PI) / 180,
  1679. },
  1680. style: {
  1681. stroke: '#fddb00',
  1682. fill: 'transparent',
  1683. lineWidth: 1.5,
  1684. },
  1685. silent: true,
  1686. };
  1687. },
  1688. data: [0],
  1689. },
  1690. {
  1691. name: 'ring5',
  1692. type: 'custom',
  1693. coordinateSystem: 'none',
  1694. renderItem: function (params, api) {
  1695. return {
  1696. type: 'arc',
  1697. shape: {
  1698. cx: api.getWidth() / 2,
  1699. cy: api.getHeight() / 2,
  1700. r: (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.7,
  1701. startAngle: ((180 + angle) * Math.PI) / 180,
  1702. endAngle: ((270 + angle) * Math.PI) / 180,
  1703. },
  1704. style: {
  1705. stroke: '#fddb00',
  1706. fill: 'transparent',
  1707. lineWidth: 1.5,
  1708. },
  1709. silent: true,
  1710. };
  1711. },
  1712. data: [0],
  1713. },
  1714. {
  1715. name: 'ring5',
  1716. type: 'custom',
  1717. coordinateSystem: 'none',
  1718. renderItem: function (params, api) {
  1719. return {
  1720. type: 'arc',
  1721. shape: {
  1722. cx: api.getWidth() / 2,
  1723. cy: api.getHeight() / 2,
  1724. r: (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.75,
  1725. startAngle: ((270 + -angle) * Math.PI) / 180,
  1726. endAngle: ((40 + -angle) * Math.PI) / 180,
  1727. },
  1728. style: {
  1729. stroke: '#0CD3DB',
  1730. fill: 'transparent',
  1731. lineWidth: 1.5,
  1732. },
  1733. silent: true,
  1734. };
  1735. },
  1736. data: [0],
  1737. },
  1738. {
  1739. name: 'ring5',
  1740. type: 'custom',
  1741. coordinateSystem: 'none',
  1742. renderItem: function (params, api) {
  1743. return {
  1744. type: 'arc',
  1745. shape: {
  1746. cx: api.getWidth() / 2,
  1747. cy: api.getHeight() / 2,
  1748. r: (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.75,
  1749. startAngle: ((90 + -angle) * Math.PI) / 180,
  1750. endAngle: ((220 + -angle) * Math.PI) / 180,
  1751. },
  1752. style: {
  1753. stroke: '#0CD3DB',
  1754. fill: 'transparent',
  1755. lineWidth: 1.5,
  1756. },
  1757. silent: true,
  1758. };
  1759. },
  1760. data: [0],
  1761. },
  1762. {
  1763. name: 'ring5',
  1764. type: 'custom',
  1765. coordinateSystem: 'none',
  1766. renderItem: function (params, api) {
  1767. let x0 = api.getWidth() / 2;
  1768. let y0 = api.getHeight() / 2;
  1769. let r = (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.75;
  1770. let point = getCirlPoint(x0, y0, r, 90 + -angle);
  1771. return {
  1772. type: 'circle',
  1773. shape: {
  1774. cx: point.x,
  1775. cy: point.y,
  1776. r: 4,
  1777. },
  1778. style: {
  1779. stroke: '#0CD3DB', //粉
  1780. fill: '#0CD3DB',
  1781. },
  1782. silent: true,
  1783. };
  1784. },
  1785. data: [0],
  1786. },
  1787. {
  1788. name: 'ring5', //绿点
  1789. type: 'custom',
  1790. coordinateSystem: 'none',
  1791. renderItem: function (params, api) {
  1792. let x0 = api.getWidth() / 2;
  1793. let y0 = api.getHeight() / 2;
  1794. let r = (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.75;
  1795. let point = getCirlPoint(x0, y0, r, 270 + -angle);
  1796. return {
  1797. type: 'circle',
  1798. shape: {
  1799. cx: point.x,
  1800. cy: point.y,
  1801. r: 4,
  1802. },
  1803. style: {
  1804. stroke: '#0CD3DB', //绿
  1805. fill: '#0CD3DB',
  1806. },
  1807. silent: true,
  1808. };
  1809. },
  1810. data: [0],
  1811. },
  1812. {
  1813. radius: ['50%', '65%'],
  1814. name: '',
  1815. type: 'pie',
  1816. selectedOffset: 16,
  1817. startAngle: 90,
  1818. z: 3,
  1819. labelLine: {
  1820. normal: {
  1821. length: 15,
  1822. length2: 22,
  1823. lineStyle: {
  1824. width: 2
  1825. }
  1826. }
  1827. },
  1828. label: {
  1829. normal: {
  1830. textStyle: {
  1831. fontSize: 14
  1832. },
  1833. formatter: function (params) {
  1834. return params.name + '\n' + params.value
  1835. }
  1836. }
  1837. },
  1838. data: dataArr
  1839. }]
  1840. };
  1841. myChart.setOption(option, true);
  1842. if (option) {
  1843. myChart.setOption(option);
  1844. }
  1845. //获取圆上面某点的坐标(x0,y0表示坐标,r半径,angle角度)
  1846. function getCirlPoint(x0, y0, r, angle) {
  1847. let x1 = x0 + r * Math.cos((angle * Math.PI) / 180);
  1848. let y1 = y0 + r * Math.sin((angle * Math.PI) / 180);
  1849. return {
  1850. x: x1,
  1851. y: y1,
  1852. };
  1853. }
  1854. function draw() {
  1855. angle = angle + 3;
  1856. myChart.setOption(option, true);
  1857. //window.requestAnimationFrame(draw);
  1858. }
  1859. setInterval(function () {
  1860. //用setInterval做动画感觉有问题
  1861. draw();
  1862. }, 100);
  1863. },
  1864. qkq_zjz2_4() {
  1865. var myChart = echarts.init(document.getElementById('qkq_zjz2_4'));
  1866. let xData = ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
  1867. let yData = [25, 100, 50, 45, 75, 25, 100, 50, 45, 75, 25, 100, 50, 45, 75]
  1868. let barData = [25, 60, 50, 45, 75, 25, 60, 50, 45, 75, 25, 60, 50, 45, 75]
  1869. function calMax(arr) {
  1870. let max = 0;
  1871. arr.forEach((el) => {
  1872. el.forEach((el1) => {
  1873. if (!(el1 === undefined || el1 === '')) {
  1874. if (Number(max) < Number(el1)) {
  1875. max = Number(el1);
  1876. }
  1877. }
  1878. })
  1879. })
  1880. let maxint = Math.ceil(max / 9.5);
  1881. //不让最高的值超过最上面的刻度
  1882. let maxval = maxint * 10;
  1883. //让显示的刻度是整数
  1884. return maxval;
  1885. }
  1886. var max = Math.ceil(calMax([yData]) / 50) * 50;
  1887. var max1 = Math.ceil(calMax([barData]) / 50) * 50;
  1888. var option = {
  1889. legend: {
  1890. left: '1%',
  1891. textStyle: {
  1892. color: "#fff",
  1893. fontSize: 12
  1894. },
  1895. },
  1896. grid: {
  1897. left: '1%',
  1898. top: 60,
  1899. right: 0,
  1900. bottom: 0,
  1901. containLabel: true
  1902. },
  1903. tooltip: {
  1904. trigger: 'axis'
  1905. },
  1906. xAxis: {
  1907. data: xData,
  1908. axisTick: {
  1909. show: false
  1910. },
  1911. axisLabel: {
  1912. color: 'rgba(204, 234, 255, 1)'
  1913. },
  1914. axisLine: {
  1915. lineStyle: {
  1916. color: 'rgba(18, 255, 255, 0.5)'
  1917. }
  1918. }
  1919. },
  1920. yAxis: [{
  1921. max: max1,
  1922. name: '2024年',
  1923. nameTextStyle: {
  1924. align: 'left',
  1925. color: 'rgba(204, 234, 255, 1)'
  1926. },
  1927. axisLabel: {
  1928. color: 'rgba(204, 234, 255, 1)'
  1929. },
  1930. axisTick: {
  1931. show: false
  1932. },
  1933. axisLine: {
  1934. show: false
  1935. },
  1936. splitLine: {
  1937. lineStyle: {
  1938. type: 'dashed',
  1939. color: 'rgba(18, 255, 255, 0.5)'
  1940. }
  1941. }
  1942. }, {
  1943. max: max,
  1944. name: '2023年',
  1945. position: 'right',
  1946. nameTextStyle: {
  1947. align: 'right',
  1948. color: 'rgba(204, 234, 255, 1)'
  1949. },
  1950. axisLabel: {
  1951. color: 'rgba(204, 234, 255, 1)'
  1952. },
  1953. axisTick: {
  1954. show: false
  1955. },
  1956. axisLine: {
  1957. show: false
  1958. },
  1959. splitLine: {
  1960. lineStyle: {
  1961. type: 'dashed',
  1962. color: 'rgba(18, 255, 255, 0.5)'
  1963. }
  1964. }
  1965. }],
  1966. series: [{
  1967. name: '2024年',
  1968. type: 'bar',
  1969. data: barData,
  1970. barWidth: 10,
  1971. yAxisIndex: 0,
  1972. itemStyle: {
  1973. normal: {
  1974. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1975. offset: 0,
  1976. color: '#1D82FF'
  1977. }, {
  1978. offset: 1,
  1979. color: '#00FFF6'
  1980. }]),
  1981. barBorderRadius: [4, 4, 0, 0]
  1982. }
  1983. }
  1984. }, {
  1985. name: '2023年',
  1986. type: 'line',
  1987. data: yData,
  1988. yAxisIndex: 1,
  1989. smooth: true,
  1990. symbol: 'none',
  1991. itemStyle: {
  1992. normal: {
  1993. lineStyle: {
  1994. color: {
  1995. // 两端添加透明度,模拟两端线收缩
  1996. colorStops: [{
  1997. offset: 0,
  1998. color: 'rgba(255, 227, 168, 0)' // 0% 处的颜色
  1999. }, {
  2000. offset: 0.2,
  2001. color: 'rgba(255, 227, 168, 1)' // 100% 处的颜色
  2002. }, {
  2003. offset: 0.8,
  2004. color: 'rgba(255, 227, 168, 1)' // 100% 处的颜色
  2005. }, {
  2006. offset: 1,
  2007. color: 'rgba(255, 227, 168, 0)'
  2008. }]
  2009. },
  2010. shadowColor: 'rgba(255, 120, 0, 1)',
  2011. shadowBlur: 8
  2012. },
  2013. areaStyle: {
  2014. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  2015. offset: 0,
  2016. color: 'rgba(197, 106, 255, 0.6)'
  2017. }, {
  2018. offset: 0.6,
  2019. color: 'rgba(255, 120, 0, 0)'
  2020. }]),
  2021. }
  2022. }
  2023. }
  2024. },
  2025. {
  2026. type: 'lines',
  2027. coordinateSystem: 'cartesian2d',
  2028. data: barData.map((item, index) => {
  2029. return {
  2030. coords: [
  2031. [index, 0],
  2032. [index, item - 4]
  2033. ]
  2034. };
  2035. }),
  2036. effect: {
  2037. show: true,
  2038. period: 2.5,
  2039. trailLength: 0.5, //控制拖尾长度
  2040. symbolSize: [15, 2],
  2041. symbol: this.$store.state.common.echarts_baseStreamer,
  2042. loop: true,
  2043. color: '#fff' //流光颜色
  2044. },
  2045. lineStyle: {
  2046. width: 0,
  2047. opacity: 0.6,
  2048. curveness: 0
  2049. },
  2050. z: 999
  2051. },]
  2052. };
  2053. if (option) {
  2054. myChart.setOption(option);
  2055. }
  2056. },
  2057. qkq_zjz1_5() {
  2058. //一汽红旗项目服务局
  2059. var myChart = echarts.init(document.getElementById('qkq_zjz1_5'));
  2060. let angle = 0; //角度,用来做简单的动画效果的
  2061. var data = [{
  2062. value: "10",
  2063. itemStyle: {
  2064. color: "#ffbf00"
  2065. }
  2066. },
  2067. {
  2068. value: "100",
  2069. itemStyle: {
  2070. color: "#fc465"
  2071. }
  2072. }
  2073. ];
  2074. var dataTotal = Number(data[1].value) + Number(data[0].value)
  2075. var dataArr = [{
  2076. value: Number(data[0].value),
  2077. name: '增加值',
  2078. itemStyle: {
  2079. normal: {
  2080. color: "#5a98ed"
  2081. }
  2082. }
  2083. }, {
  2084. value: Number(data[1].value),
  2085. name: '总数',
  2086. itemStyle: {
  2087. normal: {
  2088. color: "#1a3b72"
  2089. }
  2090. }
  2091. }]
  2092. var option = {
  2093. title: [{
  2094. text: '工业增加值',
  2095. left: '49%',
  2096. top: '40%',
  2097. textAlign: 'center',
  2098. textBaseline: 'middle',
  2099. textStyle: {
  2100. color: '#66b1ff',
  2101. fontWeight: 'normal',
  2102. fontSize: 16
  2103. }
  2104. }, {
  2105. text: Math.floor((data[1].value / dataTotal) * 100) + '%',
  2106. left: '49%',
  2107. top: '55%',
  2108. textAlign: 'center',
  2109. textBaseline: 'middle',
  2110. textStyle: {
  2111. color: '#ffff00',
  2112. fontWeight: 'normal',
  2113. fontSize: 18
  2114. }
  2115. }],
  2116. series: [
  2117. {
  2118. name: 'ring5',
  2119. type: 'custom',
  2120. coordinateSystem: 'none',
  2121. renderItem: function (params, api) {
  2122. return {
  2123. type: 'arc',
  2124. shape: {
  2125. cx: api.getWidth() / 2,
  2126. cy: api.getHeight() / 2,
  2127. r: (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.7,
  2128. startAngle: ((0 + angle) * Math.PI) / 180,
  2129. endAngle: ((90 + angle) * Math.PI) / 180,
  2130. },
  2131. style: {
  2132. stroke: '#fddb00',
  2133. fill: 'transparent',
  2134. lineWidth: 1.5,
  2135. },
  2136. silent: true,
  2137. };
  2138. },
  2139. data: [0],
  2140. },
  2141. {
  2142. name: 'ring5',
  2143. type: 'custom',
  2144. coordinateSystem: 'none',
  2145. renderItem: function (params, api) {
  2146. return {
  2147. type: 'arc',
  2148. shape: {
  2149. cx: api.getWidth() / 2,
  2150. cy: api.getHeight() / 2,
  2151. r: (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.7,
  2152. startAngle: ((180 + angle) * Math.PI) / 180,
  2153. endAngle: ((270 + angle) * Math.PI) / 180,
  2154. },
  2155. style: {
  2156. stroke: '#fddb00',
  2157. fill: 'transparent',
  2158. lineWidth: 1.5,
  2159. },
  2160. silent: true,
  2161. };
  2162. },
  2163. data: [0],
  2164. },
  2165. {
  2166. name: 'ring5',
  2167. type: 'custom',
  2168. coordinateSystem: 'none',
  2169. renderItem: function (params, api) {
  2170. return {
  2171. type: 'arc',
  2172. shape: {
  2173. cx: api.getWidth() / 2,
  2174. cy: api.getHeight() / 2,
  2175. r: (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.75,
  2176. startAngle: ((270 + -angle) * Math.PI) / 180,
  2177. endAngle: ((40 + -angle) * Math.PI) / 180,
  2178. },
  2179. style: {
  2180. stroke: '#0CD3DB',
  2181. fill: 'transparent',
  2182. lineWidth: 1.5,
  2183. },
  2184. silent: true,
  2185. };
  2186. },
  2187. data: [0],
  2188. },
  2189. {
  2190. name: 'ring5',
  2191. type: 'custom',
  2192. coordinateSystem: 'none',
  2193. renderItem: function (params, api) {
  2194. return {
  2195. type: 'arc',
  2196. shape: {
  2197. cx: api.getWidth() / 2,
  2198. cy: api.getHeight() / 2,
  2199. r: (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.75,
  2200. startAngle: ((90 + -angle) * Math.PI) / 180,
  2201. endAngle: ((220 + -angle) * Math.PI) / 180,
  2202. },
  2203. style: {
  2204. stroke: '#0CD3DB',
  2205. fill: 'transparent',
  2206. lineWidth: 1.5,
  2207. },
  2208. silent: true,
  2209. };
  2210. },
  2211. data: [0],
  2212. },
  2213. {
  2214. name: 'ring5',
  2215. type: 'custom',
  2216. coordinateSystem: 'none',
  2217. renderItem: function (params, api) {
  2218. let x0 = api.getWidth() / 2;
  2219. let y0 = api.getHeight() / 2;
  2220. let r = (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.75;
  2221. let point = getCirlPoint(x0, y0, r, 90 + -angle);
  2222. return {
  2223. type: 'circle',
  2224. shape: {
  2225. cx: point.x,
  2226. cy: point.y,
  2227. r: 4,
  2228. },
  2229. style: {
  2230. stroke: '#0CD3DB', //粉
  2231. fill: '#0CD3DB',
  2232. },
  2233. silent: true,
  2234. };
  2235. },
  2236. data: [0],
  2237. },
  2238. {
  2239. name: 'ring5', //绿点
  2240. type: 'custom',
  2241. coordinateSystem: 'none',
  2242. renderItem: function (params, api) {
  2243. let x0 = api.getWidth() / 2;
  2244. let y0 = api.getHeight() / 2;
  2245. let r = (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.75;
  2246. let point = getCirlPoint(x0, y0, r, 270 + -angle);
  2247. return {
  2248. type: 'circle',
  2249. shape: {
  2250. cx: point.x,
  2251. cy: point.y,
  2252. r: 4,
  2253. },
  2254. style: {
  2255. stroke: '#0CD3DB', //绿
  2256. fill: '#0CD3DB',
  2257. },
  2258. silent: true,
  2259. };
  2260. },
  2261. data: [0],
  2262. },
  2263. {
  2264. radius: ['50%', '65%'],
  2265. name: '',
  2266. type: 'pie',
  2267. selectedOffset: 16,
  2268. startAngle: 90,
  2269. z: 3,
  2270. labelLine: {
  2271. normal: {
  2272. length: 15,
  2273. length2: 22,
  2274. lineStyle: {
  2275. width: 2
  2276. }
  2277. }
  2278. },
  2279. label: {
  2280. normal: {
  2281. textStyle: {
  2282. fontSize: 14
  2283. },
  2284. formatter: function (params) {
  2285. return params.name + '\n' + params.value
  2286. }
  2287. }
  2288. },
  2289. data: dataArr
  2290. }]
  2291. };
  2292. myChart.setOption(option, true);
  2293. if (option) {
  2294. myChart.setOption(option);
  2295. }
  2296. //获取圆上面某点的坐标(x0,y0表示坐标,r半径,angle角度)
  2297. function getCirlPoint(x0, y0, r, angle) {
  2298. let x1 = x0 + r * Math.cos((angle * Math.PI) / 180);
  2299. let y1 = y0 + r * Math.sin((angle * Math.PI) / 180);
  2300. return {
  2301. x: x1,
  2302. y: y1,
  2303. };
  2304. }
  2305. function draw() {
  2306. angle = angle + 3;
  2307. myChart.setOption(option, true);
  2308. //window.requestAnimationFrame(draw);
  2309. }
  2310. setInterval(function () {
  2311. //用setInterval做动画感觉有问题
  2312. draw();
  2313. }, 100);
  2314. },
  2315. qkq_zjz2_5() {
  2316. var myChart = echarts.init(document.getElementById('qkq_zjz2_5'));
  2317. let xData = ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
  2318. let yData = [25, 100, 50, 45, 75, 25, 100, 50, 45, 75, 25, 100, 50, 45, 75]
  2319. let barData = [25, 60, 50, 45, 75, 25, 60, 50, 45, 75, 25, 60, 50, 45, 75]
  2320. function calMax(arr) {
  2321. let max = 0;
  2322. arr.forEach((el) => {
  2323. el.forEach((el1) => {
  2324. if (!(el1 === undefined || el1 === '')) {
  2325. if (Number(max) < Number(el1)) {
  2326. max = Number(el1);
  2327. }
  2328. }
  2329. })
  2330. })
  2331. let maxint = Math.ceil(max / 9.5);
  2332. //不让最高的值超过最上面的刻度
  2333. let maxval = maxint * 10;
  2334. //让显示的刻度是整数
  2335. return maxval;
  2336. }
  2337. var max = Math.ceil(calMax([yData]) / 50) * 50;
  2338. var max1 = Math.ceil(calMax([barData]) / 50) * 50;
  2339. var option = {
  2340. legend: {
  2341. left: '1%',
  2342. textStyle: {
  2343. color: "#fff",
  2344. fontSize: 12
  2345. },
  2346. },
  2347. grid: {
  2348. left: '1%',
  2349. top: 60,
  2350. right: 0,
  2351. bottom: 0,
  2352. containLabel: true
  2353. },
  2354. tooltip: {
  2355. trigger: 'axis'
  2356. },
  2357. xAxis: {
  2358. data: xData,
  2359. axisTick: {
  2360. show: false
  2361. },
  2362. axisLabel: {
  2363. color: 'rgba(204, 234, 255, 1)'
  2364. },
  2365. axisLine: {
  2366. lineStyle: {
  2367. color: 'rgba(18, 255, 255, 0.5)'
  2368. }
  2369. }
  2370. },
  2371. yAxis: [{
  2372. max: max1,
  2373. name: '2024年',
  2374. nameTextStyle: {
  2375. align: 'left',
  2376. color: 'rgba(204, 234, 255, 1)'
  2377. },
  2378. axisLabel: {
  2379. color: 'rgba(204, 234, 255, 1)'
  2380. },
  2381. axisTick: {
  2382. show: false
  2383. },
  2384. axisLine: {
  2385. show: false
  2386. },
  2387. splitLine: {
  2388. lineStyle: {
  2389. type: 'dashed',
  2390. color: 'rgba(18, 255, 255, 0.5)'
  2391. }
  2392. }
  2393. }, {
  2394. max: max,
  2395. name: '2023年',
  2396. position: 'right',
  2397. nameTextStyle: {
  2398. align: 'right',
  2399. color: 'rgba(204, 234, 255, 1)'
  2400. },
  2401. axisLabel: {
  2402. color: 'rgba(204, 234, 255, 1)'
  2403. },
  2404. axisTick: {
  2405. show: false
  2406. },
  2407. axisLine: {
  2408. show: false
  2409. },
  2410. splitLine: {
  2411. lineStyle: {
  2412. type: 'dashed',
  2413. color: 'rgba(18, 255, 255, 0.5)'
  2414. }
  2415. }
  2416. }],
  2417. series: [{
  2418. name: '2024年',
  2419. type: 'bar',
  2420. data: barData,
  2421. barWidth: 10,
  2422. yAxisIndex: 0,
  2423. itemStyle: {
  2424. normal: {
  2425. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  2426. offset: 0,
  2427. color: '#1D82FF'
  2428. }, {
  2429. offset: 1,
  2430. color: '#00FFF6'
  2431. }]),
  2432. barBorderRadius: [4, 4, 0, 0]
  2433. }
  2434. }
  2435. }, {
  2436. name: '2023年',
  2437. type: 'line',
  2438. data: yData,
  2439. yAxisIndex: 1,
  2440. smooth: true,
  2441. symbol: 'none',
  2442. itemStyle: {
  2443. normal: {
  2444. lineStyle: {
  2445. color: {
  2446. // 两端添加透明度,模拟两端线收缩
  2447. colorStops: [{
  2448. offset: 0,
  2449. color: 'rgba(255, 227, 168, 0)' // 0% 处的颜色
  2450. }, {
  2451. offset: 0.2,
  2452. color: 'rgba(255, 227, 168, 1)' // 100% 处的颜色
  2453. }, {
  2454. offset: 0.8,
  2455. color: 'rgba(255, 227, 168, 1)' // 100% 处的颜色
  2456. }, {
  2457. offset: 1,
  2458. color: 'rgba(255, 227, 168, 0)'
  2459. }]
  2460. },
  2461. shadowColor: 'rgba(255, 120, 0, 1)',
  2462. shadowBlur: 8
  2463. },
  2464. areaStyle: {
  2465. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  2466. offset: 0,
  2467. color: 'rgba(197, 106, 255, 0.6)'
  2468. }, {
  2469. offset: 0.6,
  2470. color: 'rgba(255, 120, 0, 0)'
  2471. }]),
  2472. }
  2473. }
  2474. }
  2475. },
  2476. {
  2477. type: 'lines',
  2478. coordinateSystem: 'cartesian2d',
  2479. data: barData.map((item, index) => {
  2480. return {
  2481. coords: [
  2482. [index, 0],
  2483. [index, item - 4]
  2484. ]
  2485. };
  2486. }),
  2487. effect: {
  2488. show: true,
  2489. period: 2.5,
  2490. trailLength: 0.5, //控制拖尾长度
  2491. symbolSize: [15, 2],
  2492. symbol: this.$store.state.common.echarts_baseStreamer,
  2493. loop: true,
  2494. color: '#fff' //流光颜色
  2495. },
  2496. lineStyle: {
  2497. width: 0,
  2498. opacity: 0.6,
  2499. curveness: 0
  2500. },
  2501. z: 999
  2502. },]
  2503. };
  2504. if (option) {
  2505. myChart.setOption(option);
  2506. }
  2507. },
  2508. qkq_zjz1_6() {
  2509. //一汽红旗项目服务局
  2510. var myChart = echarts.init(document.getElementById('qkq_zjz1_6'));
  2511. let angle = 0; //角度,用来做简单的动画效果的
  2512. var data = [{
  2513. value: "10",
  2514. itemStyle: {
  2515. color: "#ffbf00"
  2516. }
  2517. },
  2518. {
  2519. value: "100",
  2520. itemStyle: {
  2521. color: "#fc465"
  2522. }
  2523. }
  2524. ];
  2525. var dataTotal = Number(data[1].value) + Number(data[0].value)
  2526. var dataArr = [{
  2527. value: Number(data[0].value),
  2528. name: '增加值',
  2529. itemStyle: {
  2530. normal: {
  2531. color: "#5a98ed"
  2532. }
  2533. }
  2534. }, {
  2535. value: Number(data[1].value),
  2536. name: '总数',
  2537. itemStyle: {
  2538. normal: {
  2539. color: "#1a3b72"
  2540. }
  2541. }
  2542. }]
  2543. var option = {
  2544. title: [{
  2545. text: '工业增加值',
  2546. left: '49%',
  2547. top: '40%',
  2548. textAlign: 'center',
  2549. textBaseline: 'middle',
  2550. textStyle: {
  2551. color: '#66b1ff',
  2552. fontWeight: 'normal',
  2553. fontSize: 16
  2554. }
  2555. }, {
  2556. text: Math.floor((data[1].value / dataTotal) * 100) + '%',
  2557. left: '49%',
  2558. top: '55%',
  2559. textAlign: 'center',
  2560. textBaseline: 'middle',
  2561. textStyle: {
  2562. color: '#ffff00',
  2563. fontWeight: 'normal',
  2564. fontSize: 18
  2565. }
  2566. }],
  2567. series: [
  2568. {
  2569. name: 'ring5',
  2570. type: 'custom',
  2571. coordinateSystem: 'none',
  2572. renderItem: function (params, api) {
  2573. return {
  2574. type: 'arc',
  2575. shape: {
  2576. cx: api.getWidth() / 2,
  2577. cy: api.getHeight() / 2,
  2578. r: (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.7,
  2579. startAngle: ((0 + angle) * Math.PI) / 180,
  2580. endAngle: ((90 + angle) * Math.PI) / 180,
  2581. },
  2582. style: {
  2583. stroke: '#fddb00',
  2584. fill: 'transparent',
  2585. lineWidth: 1.5,
  2586. },
  2587. silent: true,
  2588. };
  2589. },
  2590. data: [0],
  2591. },
  2592. {
  2593. name: 'ring5',
  2594. type: 'custom',
  2595. coordinateSystem: 'none',
  2596. renderItem: function (params, api) {
  2597. return {
  2598. type: 'arc',
  2599. shape: {
  2600. cx: api.getWidth() / 2,
  2601. cy: api.getHeight() / 2,
  2602. r: (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.7,
  2603. startAngle: ((180 + angle) * Math.PI) / 180,
  2604. endAngle: ((270 + angle) * Math.PI) / 180,
  2605. },
  2606. style: {
  2607. stroke: '#fddb00',
  2608. fill: 'transparent',
  2609. lineWidth: 1.5,
  2610. },
  2611. silent: true,
  2612. };
  2613. },
  2614. data: [0],
  2615. },
  2616. {
  2617. name: 'ring5',
  2618. type: 'custom',
  2619. coordinateSystem: 'none',
  2620. renderItem: function (params, api) {
  2621. return {
  2622. type: 'arc',
  2623. shape: {
  2624. cx: api.getWidth() / 2,
  2625. cy: api.getHeight() / 2,
  2626. r: (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.75,
  2627. startAngle: ((270 + -angle) * Math.PI) / 180,
  2628. endAngle: ((40 + -angle) * Math.PI) / 180,
  2629. },
  2630. style: {
  2631. stroke: '#0CD3DB',
  2632. fill: 'transparent',
  2633. lineWidth: 1.5,
  2634. },
  2635. silent: true,
  2636. };
  2637. },
  2638. data: [0],
  2639. },
  2640. {
  2641. name: 'ring5',
  2642. type: 'custom',
  2643. coordinateSystem: 'none',
  2644. renderItem: function (params, api) {
  2645. return {
  2646. type: 'arc',
  2647. shape: {
  2648. cx: api.getWidth() / 2,
  2649. cy: api.getHeight() / 2,
  2650. r: (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.75,
  2651. startAngle: ((90 + -angle) * Math.PI) / 180,
  2652. endAngle: ((220 + -angle) * Math.PI) / 180,
  2653. },
  2654. style: {
  2655. stroke: '#0CD3DB',
  2656. fill: 'transparent',
  2657. lineWidth: 1.5,
  2658. },
  2659. silent: true,
  2660. };
  2661. },
  2662. data: [0],
  2663. },
  2664. {
  2665. name: 'ring5',
  2666. type: 'custom',
  2667. coordinateSystem: 'none',
  2668. renderItem: function (params, api) {
  2669. let x0 = api.getWidth() / 2;
  2670. let y0 = api.getHeight() / 2;
  2671. let r = (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.75;
  2672. let point = getCirlPoint(x0, y0, r, 90 + -angle);
  2673. return {
  2674. type: 'circle',
  2675. shape: {
  2676. cx: point.x,
  2677. cy: point.y,
  2678. r: 4,
  2679. },
  2680. style: {
  2681. stroke: '#0CD3DB', //粉
  2682. fill: '#0CD3DB',
  2683. },
  2684. silent: true,
  2685. };
  2686. },
  2687. data: [0],
  2688. },
  2689. {
  2690. name: 'ring5', //绿点
  2691. type: 'custom',
  2692. coordinateSystem: 'none',
  2693. renderItem: function (params, api) {
  2694. let x0 = api.getWidth() / 2;
  2695. let y0 = api.getHeight() / 2;
  2696. let r = (Math.min(api.getWidth(), api.getHeight()) / 2) * 0.75;
  2697. let point = getCirlPoint(x0, y0, r, 270 + -angle);
  2698. return {
  2699. type: 'circle',
  2700. shape: {
  2701. cx: point.x,
  2702. cy: point.y,
  2703. r: 4,
  2704. },
  2705. style: {
  2706. stroke: '#0CD3DB', //绿
  2707. fill: '#0CD3DB',
  2708. },
  2709. silent: true,
  2710. };
  2711. },
  2712. data: [0],
  2713. },
  2714. {
  2715. radius: ['50%', '65%'],
  2716. name: '',
  2717. type: 'pie',
  2718. selectedOffset: 16,
  2719. startAngle: 90,
  2720. z: 3,
  2721. labelLine: {
  2722. normal: {
  2723. length: 15,
  2724. length2: 22,
  2725. lineStyle: {
  2726. width: 2
  2727. }
  2728. }
  2729. },
  2730. label: {
  2731. normal: {
  2732. textStyle: {
  2733. fontSize: 14
  2734. },
  2735. formatter: function (params) {
  2736. return params.name + '\n' + params.value
  2737. }
  2738. }
  2739. },
  2740. data: dataArr
  2741. }]
  2742. };
  2743. myChart.setOption(option, true);
  2744. if (option) {
  2745. myChart.setOption(option);
  2746. }
  2747. //获取圆上面某点的坐标(x0,y0表示坐标,r半径,angle角度)
  2748. function getCirlPoint(x0, y0, r, angle) {
  2749. let x1 = x0 + r * Math.cos((angle * Math.PI) / 180);
  2750. let y1 = y0 + r * Math.sin((angle * Math.PI) / 180);
  2751. return {
  2752. x: x1,
  2753. y: y1,
  2754. };
  2755. }
  2756. function draw() {
  2757. angle = angle + 3;
  2758. myChart.setOption(option, true);
  2759. //window.requestAnimationFrame(draw);
  2760. }
  2761. setInterval(function () {
  2762. //用setInterval做动画感觉有问题
  2763. draw();
  2764. }, 100);
  2765. },
  2766. qkq_zjz2_6() {
  2767. var myChart = echarts.init(document.getElementById('qkq_zjz2_6'));
  2768. let xData = ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
  2769. let yData = [25, 100, 50, 45, 75, 25, 100, 50, 45, 75, 25, 100, 50, 45, 75]
  2770. let barData = [25, 60, 50, 45, 75, 25, 60, 50, 45, 75, 25, 60, 50, 45, 75]
  2771. function calMax(arr) {
  2772. let max = 0;
  2773. arr.forEach((el) => {
  2774. el.forEach((el1) => {
  2775. if (!(el1 === undefined || el1 === '')) {
  2776. if (Number(max) < Number(el1)) {
  2777. max = Number(el1);
  2778. }
  2779. }
  2780. })
  2781. })
  2782. let maxint = Math.ceil(max / 9.5);
  2783. //不让最高的值超过最上面的刻度
  2784. let maxval = maxint * 10;
  2785. //让显示的刻度是整数
  2786. return maxval;
  2787. }
  2788. var max = Math.ceil(calMax([yData]) / 50) * 50;
  2789. var max1 = Math.ceil(calMax([barData]) / 50) * 50;
  2790. var option = {
  2791. legend: {
  2792. left: '1%',
  2793. textStyle: {
  2794. color: "#fff",
  2795. fontSize: 12
  2796. },
  2797. },
  2798. grid: {
  2799. left: '1%',
  2800. top: 60,
  2801. right: 0,
  2802. bottom: 0,
  2803. containLabel: true
  2804. },
  2805. tooltip: {
  2806. trigger: 'axis'
  2807. },
  2808. xAxis: {
  2809. data: xData,
  2810. axisTick: {
  2811. show: false
  2812. },
  2813. axisLabel: {
  2814. color: 'rgba(204, 234, 255, 1)'
  2815. },
  2816. axisLine: {
  2817. lineStyle: {
  2818. color: 'rgba(18, 255, 255, 0.5)'
  2819. }
  2820. }
  2821. },
  2822. yAxis: [{
  2823. max: max1,
  2824. name: '2024年',
  2825. nameTextStyle: {
  2826. align: 'left',
  2827. color: 'rgba(204, 234, 255, 1)'
  2828. },
  2829. axisLabel: {
  2830. color: 'rgba(204, 234, 255, 1)'
  2831. },
  2832. axisTick: {
  2833. show: false
  2834. },
  2835. axisLine: {
  2836. show: false
  2837. },
  2838. splitLine: {
  2839. lineStyle: {
  2840. type: 'dashed',
  2841. color: 'rgba(18, 255, 255, 0.5)'
  2842. }
  2843. }
  2844. }, {
  2845. max: max,
  2846. name: '2023年',
  2847. position: 'right',
  2848. nameTextStyle: {
  2849. align: 'right',
  2850. color: 'rgba(204, 234, 255, 1)'
  2851. },
  2852. axisLabel: {
  2853. color: 'rgba(204, 234, 255, 1)'
  2854. },
  2855. axisTick: {
  2856. show: false
  2857. },
  2858. axisLine: {
  2859. show: false
  2860. },
  2861. splitLine: {
  2862. lineStyle: {
  2863. type: 'dashed',
  2864. color: 'rgba(18, 255, 255, 0.5)'
  2865. }
  2866. }
  2867. }],
  2868. series: [{
  2869. name: '2024年',
  2870. type: 'bar',
  2871. data: barData,
  2872. barWidth: 10,
  2873. yAxisIndex: 0,
  2874. itemStyle: {
  2875. normal: {
  2876. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  2877. offset: 0,
  2878. color: '#1D82FF'
  2879. }, {
  2880. offset: 1,
  2881. color: '#00FFF6'
  2882. }]),
  2883. barBorderRadius: [4, 4, 0, 0]
  2884. }
  2885. }
  2886. }, {
  2887. name: '2023年',
  2888. type: 'line',
  2889. data: yData,
  2890. yAxisIndex: 1,
  2891. smooth: true,
  2892. symbol: 'none',
  2893. itemStyle: {
  2894. normal: {
  2895. lineStyle: {
  2896. color: {
  2897. // 两端添加透明度,模拟两端线收缩
  2898. colorStops: [{
  2899. offset: 0,
  2900. color: 'rgba(255, 227, 168, 0)' // 0% 处的颜色
  2901. }, {
  2902. offset: 0.2,
  2903. color: 'rgba(255, 227, 168, 1)' // 100% 处的颜色
  2904. }, {
  2905. offset: 0.8,
  2906. color: 'rgba(255, 227, 168, 1)' // 100% 处的颜色
  2907. }, {
  2908. offset: 1,
  2909. color: 'rgba(255, 227, 168, 0)'
  2910. }]
  2911. },
  2912. shadowColor: 'rgba(255, 120, 0, 1)',
  2913. shadowBlur: 8
  2914. },
  2915. areaStyle: {
  2916. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  2917. offset: 0,
  2918. color: 'rgba(197, 106, 255, 0.6)'
  2919. }, {
  2920. offset: 0.6,
  2921. color: 'rgba(255, 120, 0, 0)'
  2922. }]),
  2923. }
  2924. }
  2925. }
  2926. },
  2927. {
  2928. type: 'lines',
  2929. coordinateSystem: 'cartesian2d',
  2930. data: barData.map((item, index) => {
  2931. return {
  2932. coords: [
  2933. [index, 0],
  2934. [index, item - 4]
  2935. ]
  2936. };
  2937. }),
  2938. effect: {
  2939. show: true,
  2940. period: 2.5,
  2941. trailLength: 0.5, //控制拖尾长度
  2942. symbolSize: [15, 2],
  2943. symbol: this.$store.state.common.echarts_baseStreamer,
  2944. loop: true,
  2945. color: '#fff' //流光颜色
  2946. },
  2947. lineStyle: {
  2948. width: 0,
  2949. opacity: 0.6,
  2950. curveness: 0
  2951. },
  2952. z: 999
  2953. },]
  2954. };
  2955. if (option) {
  2956. myChart.setOption(option);
  2957. }
  2958. },
  2959. qkq_jdt() {
  2960. var myChart = echarts.init(document.getElementById('qkq_jdt'));
  2961. //亮色图片
  2962. var uploadedDataURL1 = "/asset/get/s/4CJ7_TCzJkXXblRL.png";
  2963. var uploadedDataURL2 = "/asset/get/s/QekC70YLG_BZZXae.png";
  2964. var baifenbi = [0.333, 0.444, 0.555, 0.777, 0.888, 0.922];
  2965. var grayBar = [1, 1, 1, 1, 1, 1];
  2966. var paiming = [6, 5, 4, 3, 2, 1];
  2967. var zongjine = [2000, 3000, 4000, 5000, 6000, 7000];
  2968. var xingm = ['实际经济指标的目标1', '实际经济指标的目标2', '实际经济指标的目标3', '实际经济指标的目标4', '实际经济指标的目标5', '实际经济指标的目标6'];
  2969. var option = {
  2970. color: ['#61A8FF'], //进度条颜色
  2971. grid: {
  2972. left: '2%', //如果离左边太远就用这个......
  2973. right: '0%',
  2974. bottom: '-15%',
  2975. top: '5%',
  2976. containLabel: true
  2977. },
  2978. xAxis: [
  2979. {
  2980. show: false,
  2981. },
  2982. //由于下边X轴已经是百分比刻度了,所以需要在顶部加一个X轴,刻度是金额,也隐藏掉
  2983. {
  2984. show: false,
  2985. }
  2986. ],
  2987. yAxis: {
  2988. type: 'category',
  2989. axisLabel: {
  2990. show: false, //让Y轴数据不显示
  2991. },
  2992. itemStyle: {},
  2993. axisTick: {
  2994. show: false, //隐藏Y轴刻度
  2995. },
  2996. axisLine: {
  2997. show: false, //隐藏Y轴线段
  2998. },
  2999. data: xingm,
  3000. },
  3001. series: [
  3002. //背景色--------------------我是分割线君------------------------------//
  3003. {
  3004. show: true,
  3005. type: 'bar',
  3006. barGap: '-100%',
  3007. barWidth: '40%', //统计条宽度
  3008. itemStyle: {
  3009. normal: {
  3010. color: 'rgba(56,112,252,0.17)'
  3011. },
  3012. },
  3013. z: 1,
  3014. data: grayBar,
  3015. },
  3016. //蓝条--------------------我是分割线君------------------------------//
  3017. {
  3018. show: true,
  3019. type: 'bar',
  3020. barGap: '-100%',
  3021. barWidth: '40%', //统计条宽度
  3022. itemStyle: {
  3023. normal: {
  3024. color: {
  3025. type: 'bar',
  3026. colorStops: [{
  3027. offset: 0,
  3028. color: '#39A7FC' // 0% 处的颜色
  3029. }, {
  3030. offset: 1,
  3031. color: '#00FBFF' // 100% 处的颜色
  3032. }],
  3033. globalCoord: false, // 缺省为 false
  3034. }
  3035. },
  3036. },
  3037. max: 1,
  3038. label: {
  3039. normal: {
  3040. show: true,
  3041. textStyle: {
  3042. color: '#b73838', //百分比颜色
  3043. },
  3044. position: 'inside',
  3045. //百分比格式
  3046. formatter: function (data) {
  3047. return (baifenbi[data.dataIndex] * 100).toFixed(1) + '%';
  3048. },
  3049. }
  3050. },
  3051. labelLine: {
  3052. show: false,
  3053. },
  3054. z: 2,
  3055. data: baifenbi,
  3056. },
  3057. //数据条--------------------我是分割线君------------------------------//
  3058. {
  3059. show: true,
  3060. type: 'bar',
  3061. xAxisIndex: 1, //代表使用第二个X轴刻度!!!!!!!!!!!!!!!!!!!!!!!!
  3062. barGap: '-100%',
  3063. barWidth: '35%', //统计条宽度
  3064. itemStyle: {
  3065. normal: {
  3066. barBorderRadius: 200,
  3067. color: 'rgba(22,203,115,0.05)'
  3068. },
  3069. },
  3070. label: {
  3071. normal: {
  3072. show: true,
  3073. //label 的position位置可以是top bottom left,right,也可以是固定值
  3074. //在这里需要上下统一对齐,所以用固定值
  3075. position: ['0', '-130%'],
  3076. rich: { //富文本
  3077. white: { //自定义颜色
  3078. color: '#ffffff',
  3079. },
  3080. start1: {
  3081. backgroundColor: {
  3082. image: uploadedDataURL1,
  3083. }
  3084. },
  3085. start2: {
  3086. backgroundColor: { //这里可以添加你想自定义的图片
  3087. image: uploadedDataURL2,
  3088. },
  3089. },
  3090. green: {
  3091. color: '#70DDA7',
  3092. },
  3093. yellow: {
  3094. color: '#CCB877',
  3095. },
  3096. red: {
  3097. color: '#BC3C47',
  3098. },
  3099. gray: {
  3100. color: '#727CBA'
  3101. }
  3102. },
  3103. formatter: function (data) {
  3104. //富文本固定格式{colorName|这里填你想要写的内容}
  3105. if (paiming[data.dataIndex] == 1) {
  3106. return '{start1|}{red|' + paiming[data.dataIndex] + ' ' + xingm[data.dataIndex] + '}' + ' ' + '{white| 经济指标的目标:}{gray|' + zongjine[data.dataIndex] + '}{white|元}';
  3107. } else if (paiming[data.dataIndex] == 2) {
  3108. return '{start1|}{yellow|' + paiming[data.dataIndex] + ' ' + xingm[data.dataIndex] + '}' + ' ' + '{white| 经济指标的目标:}{gray|' + zongjine[data.dataIndex] + '}{white|元}';
  3109. } else if (paiming[data.dataIndex] == 3) {
  3110. return '{start1|}{green|' + paiming[data.dataIndex] + ' ' + xingm[data.dataIndex] + '}' + ' ' + '{white| 经济指标的目标:}{gray|' + zongjine[data.dataIndex] + '}{white|元}';
  3111. } else {
  3112. return '{start2|}{white|' + paiming[data.dataIndex] + ' ' + xingm[data.dataIndex] + '}' + ' ' + '{white| 经济指标的目标:}{gray|' + zongjine[data.dataIndex] + '}{white|元}';
  3113. }
  3114. },
  3115. }
  3116. },
  3117. data: zongjine
  3118. },
  3119. {
  3120. type: 'lines',
  3121. coordinateSystem: 'cartesian2d',
  3122. data: baifenbi.map((item, index) => {
  3123. return {
  3124. coords: [
  3125. [0, index],
  3126. [item, index],
  3127. ]
  3128. };
  3129. }),
  3130. effect: {
  3131. show: true,
  3132. period: 2.5,
  3133. trailLength: 0.5, //控制拖尾长度
  3134. symbolSize: [15, 8],
  3135. symbol: this.$store.state.common.echarts_baseStreamer,
  3136. loop: true,
  3137. color: '#fff' //流光颜色
  3138. },
  3139. lineStyle: {
  3140. width: 0,
  3141. opacity: 0.6,
  3142. curveness: 0
  3143. },
  3144. z: 99
  3145. },
  3146. ]
  3147. };
  3148. if (option) {
  3149. myChart.setOption(option);
  3150. }
  3151. },
  3152. qkq_kxt() {
  3153. var myChart = echarts.init(document.getElementById('qkq_kxt'));
  3154. var option = {
  3155. legend: {
  3156. // right: '30',
  3157. data: ['今年', '去年'],
  3158. textStyle: {
  3159. color: "#fff",
  3160. fontSize: 16
  3161. },
  3162. },
  3163. grid: {
  3164. top: '14%',
  3165. bottom: '10%',
  3166. right: '30',
  3167. left: '30'
  3168. },
  3169. tooltip: {
  3170. trigger: 'axis',
  3171. formatter: function (p) {
  3172. if (p.seriesType === 'line') return '';
  3173. return `${p[0].name}<br/>${p[0].marker}计划:${p[0].value[1] + "-" + p[0].value[2]}万元<br/>${p[0].marker}实际:${p[0].value[3] + "-" + p[0].value[4]}万元`
  3174. }
  3175. },
  3176. xAxis: {
  3177. axisLabel: {
  3178. color: 'rgba(204, 234, 255, 1)'
  3179. },
  3180. axisLine: {
  3181. lineStyle: {
  3182. color: 'rgba(4, 38, 65, 0.5)'
  3183. }
  3184. },
  3185. data: [
  3186. '一月',
  3187. '二月',
  3188. '三月',
  3189. '四月',
  3190. '五月',
  3191. '六月',
  3192. '七月',
  3193. '八月',
  3194. '九月',
  3195. '十月',
  3196. '十一月',
  3197. '十二月'
  3198. ]
  3199. },
  3200. yAxis: {
  3201. type: 'value',
  3202. scale: true,
  3203. max: 12,
  3204. min: 0,
  3205. interval: 4,
  3206. axisLabel: {
  3207. color: 'rgba(204, 234, 255, 1)'
  3208. },
  3209. axisLine: {
  3210. lineStyle: {
  3211. color: 'rgba(4, 38, 65, 0.5)'
  3212. }
  3213. },
  3214. },
  3215. series: [
  3216. {
  3217. name: "今年",
  3218. type: 'candlestick',
  3219. itemStyle: {
  3220. color: '#1D82FF',
  3221. color0: '#1D82FF',
  3222. borderColor: '#1D82FF',
  3223. borderColor0: '#1D82FF'
  3224. },
  3225. data: [
  3226. [0, 0, 0, 0],
  3227. [0, 0, 0, 0],
  3228. [3, 4, 2, 5],
  3229. [4, 6, 3, 7],
  3230. [7, 9, 5, 10],
  3231. [5, 8, 4, 9],
  3232. [6, 6.5, 5, 7.5],
  3233. [0, 0, 0, 0],
  3234. [6, 9, 5, 10],
  3235. [4, 6, 3, 7],
  3236. [5, 7, 4, 8],
  3237. [6, 9, 5, 10],
  3238. [6.5, 9, 5.5, 10],
  3239. ]
  3240. },
  3241. {
  3242. name: '去年',
  3243. type: 'line',
  3244. smooth: true,
  3245. data: [0, 0, 3, 6, 7, 5, 6, 0, 6, 4, 7, 9, 6.5],
  3246. itemStyle: {
  3247. color: '#ff0000'
  3248. },
  3249. lineStyle: {
  3250. color: '#ff0000'
  3251. },
  3252. z: 10
  3253. }
  3254. ]
  3255. };
  3256. if (option) {
  3257. myChart.setOption(option);
  3258. }
  3259. },
  3260. getCurrentTime() {
  3261. const now = new Date();
  3262. const year = now.getFullYear();
  3263. const month = now.getMonth() + 1;
  3264. const date = now.getDate();
  3265. const day = now.getDay();
  3266. const weekDays = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
  3267. const hour = now.getHours();
  3268. const minute = now.getMinutes();
  3269. const second = now.getSeconds();
  3270. const formattedMonth = month < 10 ? `0${month}` : month;
  3271. const formattedDate = date < 10 ? `0${date}` : date;
  3272. const formattedHour = hour < 10 ? `0${hour}` : hour;
  3273. const formattedMinute = minute < 10 ? `0${minute}` : minute;
  3274. const formattedSecond = second < 10 ? `0${second}` : second;
  3275. this.currentTime =
  3276. `${year}年${formattedMonth}月${formattedDate}日 ${weekDays[day]} ${formattedHour}:${formattedMinute}:${formattedSecond}`;
  3277. },
  3278. }
  3279. };
  3280. // import '@/assets/images/leftnav.js';
  3281. $(function () {
  3282. var Accordion = function (el, multiple) {
  3283. this.el = el || {};
  3284. this.multiple = multiple || false;
  3285. // Variables privadas
  3286. var links = this.el.find('.link');
  3287. // Evento
  3288. links.on('click', {
  3289. el: this.el,
  3290. multiple: this.multiple
  3291. }, this.dropdown)
  3292. };
  3293. Accordion.prototype.dropdown = function (e) {
  3294. var $el = e.data.el;
  3295. let $this = $(this);
  3296. let $next = $this.next();
  3297. $next.slideToggle();
  3298. $this.parent().toggleClass('open');
  3299. if (!e.data.multiple) {
  3300. $el.find('.submenu').not($next).slideUp().parent().removeClass('open');
  3301. }
  3302. };
  3303. var accordion = new Accordion($('#accordion'), false);
  3304. $('.submenu li').click(function () {
  3305. $(this).addClass('current').siblings('li').removeClass('current');
  3306. });
  3307. });
  3308. </script>
  3309. <style>
  3310. /* 添加你的CSS样式 */
  3311. </style>