yshj.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878
  1. <template>
  2. <div>
  3. <div class="map">
  4. <img src="@/assets/images/qkq_mapbg.png"/>
  5. </div>
  6. <!-- 阴影背景 -->
  7. <div class="bj_left"><img src="@/assets/images/sprhbj-left.png"/></div>
  8. <div class="bj_right"><img src="@/assets/images/sprhbj-right.png"/></div>
  9. <div class="bj_bottom"><img src="@/assets/images/sprhbj-bottom.png"/></div>
  10. <!--头部开始-->
  11. <div class="header">
  12. <h1>城市运行一网统管指挥中心</h1>
  13. </div>
  14. <!--头部结束-->
  15. <!-- 中间开始 -->
  16. <div class="center-bar">
  17. <div class="center-list">
  18. <h4>事项可网办率</h4>
  19. <h5>94.85%</h5>
  20. </div>
  21. <div class="center-list">
  22. <h4>办件率</h4>
  23. <h5>869件</h5>
  24. </div>
  25. <div class="center-list">
  26. <h4>锁定提前办结效率</h4>
  27. <h5>98.57%</h5>
  28. </div>
  29. <div class="center-list">
  30. <h4>承诺提前办结效率</h4>
  31. <h5>94.85%</h5>
  32. </div>
  33. <div class="center-list">
  34. <h4>逾期率</h4>
  35. <h5>0%</h5>
  36. </div>
  37. <div class="center-list">
  38. <h4>平均办理时间</h4>
  39. <h5>0天1小时36分</h5>
  40. </div>
  41. </div>
  42. <!-- 中间结束 -->
  43. <!--左侧开始-->
  44. <div class="left_con">
  45. <div class="top_txt">
  46. <b>汽开区</b>
  47. <span>小雨</span>
  48. <span>9~16℃</span>
  49. </div>
  50. <!-- 土地资源 -->
  51. <!-- 区域办件量TOP -->
  52. <div class="qkq_tdzy">
  53. <div class="qkq_tit">区域办件量TOP</div>
  54. <div class="selectDate">
  55. <!-- <span class="_selectData">程锦街道</span>-->
  56. <!-- <a class="icon_more" @click="smalClick(this)"-->
  57. <!-- ><img src="@/assets/images/down.png"-->
  58. <!-- /></a>-->
  59. <!-- <div class="_moreMenu">-->
  60. <!-- <ul>-->
  61. <!-- <li class="change">东风街道</li>-->
  62. <!-- <li>锦城街道</li>-->
  63. <!-- </ul>-->
  64. <!-- </div>-->
  65. </div>
  66. </div>
  67. <div
  68. id="sprh-zyfb"
  69. style="margin: 10px auto; width: 350px; height: 240px"
  70. ></div>
  71. <!-- 区域办件量TOP -->
  72. <!-- 办件趋势统计 -->
  73. <div class="qkq_tdzy">
  74. <div class="qkq_tit ">办件趋势统计</div>
  75. </div>
  76. <div
  77. id="sprh-bjqstj"
  78. style="margin: 10px auto; width: 350px; height: 300px"
  79. ></div>
  80. <!-- 办件趋势统计 -->
  81. </div>
  82. <!--左侧结束-->
  83. <!--右侧开始-->
  84. <div class="right_con">
  85. <div class="top_txt">
  86. <span>2024.04.20</span>
  87. <span>星期六</span>
  88. <b>11:16:58</b>
  89. </div>
  90. <!-- 事项办件量Top10 -->
  91. <div class="qkq_tdzy">
  92. <div class="qkq_tit ">事项办件量Top10</div>
  93. </div>
  94. <div
  95. id="sprh-sxbjl10"
  96. style="margin: 10px auto; width: 350px; height: 260px"
  97. ></div>
  98. <!-- 事项办件量Top10 -->
  99. <!-- 事项办件率Top10 -->
  100. <div class="qkq_tdzy">
  101. <div class="qkq_tit ">事项办件率Top10</div>
  102. </div>
  103. <div
  104. id="sprh-sxbjl-top"
  105. style="margin: 10px auto; width: 350px; height: 260px"
  106. ></div>
  107. <!-- 事项办件率Top10 -->
  108. </div>
  109. <!--右侧结束-->
  110. <!--底部开始-->
  111. <div class="footer">
  112. <div class="nav-bottom">
  113. <div class="nav-bottom-left">
  114. <div class="nav-li-left">
  115. <span>经济运行</span>
  116. </div>
  117. <div class="nav-li-left">
  118. <span>城市管理</span>
  119. </div>
  120. <div class="nav-li-left" @click="serviceFAW('jtzl')">
  121. <span>交通治理</span>
  122. </div>
  123. <div class="nav-li-left" @click="serviceFAW('jczl')">
  124. <span>基层治理</span>
  125. </div>
  126. </div>
  127. <div class="nav-home-middle" @click="homePage('weather')">
  128. <img src="@/assets/images/home-btn.png"/>
  129. <a>返回首页</a>
  130. </div>
  131. <div class="nav-bottom-right">
  132. <div class="nav-li-right">
  133. <span>营商环境</span>
  134. </div>
  135. <div class="nav-li-right on">
  136. <span>政务运行</span>
  137. </div>
  138. <div class="nav-li-right " @click="serviceFAW('sprh')">
  139. <span>安全应急</span>
  140. </div>
  141. <div class="nav-li-right">
  142. <span>服务一汽</span>
  143. </div>
  144. </div>
  145. </div>
  146. </div>
  147. <!--底部开始-->
  148. </div>
  149. </template>
  150. <script>
  151. import * as echarts from 'echarts'
  152. import $ from 'jquery'
  153. import jQuery from 'jquery'
  154. import "@/assets/images/qkq_body.css";
  155. import "@/assets/images/qkq_index.css";
  156. import "@/assets/images/qkq_sprh.css";
  157. export default {
  158. name: "yshj",
  159. data() {
  160. return {}
  161. },
  162. created() {
  163. },
  164. mounted() {
  165. this.regionTop();
  166. this.trend();
  167. this.matterUpTop();
  168. this.matterTop();
  169. },
  170. methods: {
  171. homePage(route) {
  172. this.$router.push({path: route});
  173. },
  174. serviceFAW(route) {
  175. this.$router.push({path: route});
  176. },
  177. smalClick(val) {
  178. var node = $(val).next();
  179. if (node.is(":hidden")) {
  180. //如果node是隐藏的则显示node元素,否则隐藏
  181. node.show();
  182. } else {
  183. node.hide();
  184. }
  185. },
  186. regionTop() {
  187. var myChart = echarts.init(document.getElementById('sprh-zyfb'));
  188. let data = [
  189. {value: 0, label: '前程街道'},
  190. {value: 0, label: '富民街道'},
  191. {value: 0, label: '广兴街道'},
  192. {value: 0, label: '东风街道'},
  193. {value: 0, label: '锦绣街道'},
  194. {value: 0, label: '锦城街道'}
  195. ];
  196. let option = {
  197. grid: {
  198. top: 10,
  199. left: 33,
  200. right: 20,
  201. bottom: 5,
  202. containLabel: true
  203. },
  204. xAxis: {
  205. type: 'value',
  206. show: false
  207. },
  208. yAxis: {
  209. show: true,
  210. inverse: true,
  211. type: 'category',
  212. axisLine: {
  213. show: false
  214. }
  215. },
  216. series: [
  217. {
  218. name: 'label',
  219. type: 'bar',
  220. barWidth: 10,
  221. yAxisIndex: 0,
  222. label: {
  223. show: true,
  224. position: 2,
  225. color: '#fff',
  226. fontSize: 12
  227. },
  228. data: data.map((item) => {
  229. return {
  230. value: 0,
  231. label: {
  232. formatter() {
  233. return item.label;
  234. }
  235. }
  236. };
  237. })
  238. },
  239. {
  240. name: 'value',
  241. type: 'bar',
  242. barWidth: 10,
  243. barMinHeight: 10,
  244. yAxisIndex: 0,
  245. label: {
  246. show: true,
  247. position: 'right',
  248. color: '#00d5e1',
  249. fontSize: 12,
  250. rich: {
  251. value: {
  252. color: '#00e1ce'
  253. }
  254. },
  255. formatter({
  256. value
  257. }) {
  258. return `{value|${value}个}`;
  259. }
  260. },
  261. itemStyle: {
  262. barBorderRadius: 3
  263. },
  264. data: data.map(({value}, index) => {
  265. let color = new echarts.graphic.LinearGradient(1, 0, 0, 1, [{
  266. offset: 1,
  267. color: '#004eaf'
  268. }, {
  269. offset: 0,
  270. color: '#089aa2'
  271. }], false);
  272. return {
  273. value,
  274. label: {color},
  275. itemStyle: {color}
  276. };
  277. })
  278. }
  279. ]
  280. };
  281. let updateInterval = 1000; // 更新间隔,单位:毫秒
  282. let updateRegionTop = () => {
  283. data.forEach((item) => {
  284. item.value += Math.floor(Math.random() * 10); // 模拟逐渐增加的数据
  285. if (item.value >= 100) {
  286. item.value = 0; // 当增加到1000时重新开始
  287. }
  288. });
  289. option.series[1].data = data.map(({value}, index) => {
  290. let color = new echarts.graphic.LinearGradient(1, 0, 0, 1, [{
  291. offset: 1,
  292. color: '#004eaf'
  293. }, {
  294. offset: 0,
  295. color: '#089aa2'
  296. }], false);
  297. return {
  298. value,
  299. label: {color},
  300. itemStyle: {color}
  301. };
  302. });
  303. myChart.setOption(option);
  304. };
  305. updateRegionTop(); // 首次更新数据
  306. let timer = setInterval(updateRegionTop, updateInterval);
  307. },
  308. trend() {
  309. //办件趋势
  310. var myChart = echarts.init(document.getElementById('sprh-bjqstj'));
  311. var monthData = [];
  312. var lineData = [];
  313. for (var i = 1; i <= 12; i++) {
  314. monthData.push(i + '月');
  315. var lineNumber = Math.floor(Math.random() * 10000);
  316. lineData.push(lineNumber);
  317. }
  318. let option = {
  319. tooltip: {
  320. trigger: 'axis',
  321. axisPointer: {
  322. type: 'shadow',
  323. },
  324. },
  325. grid: {
  326. top: '5%',
  327. left: '15%',
  328. right: '5%',
  329. bottom: '25%',
  330. // containLabel: true
  331. },
  332. xAxis: [
  333. {
  334. type: 'category',
  335. boundaryGap: false,
  336. axisLine: {
  337. show: true, //隐藏X轴轴线
  338. lineStyle: {
  339. color: '#502297',
  340. width: 1,
  341. type: 'dashed',
  342. },
  343. },
  344. splitLine: {
  345. show: true,
  346. interval: 'auto',
  347. lineStyle: {
  348. color: ['#502297'],
  349. type: 'dashed',
  350. },
  351. },
  352. axisLabel: {
  353. show: true,
  354. textStyle: {
  355. color: '#FFFFFF', //X轴文字颜色
  356. fontSize: 12,
  357. },
  358. margin: 12,
  359. interval: 0,
  360. },
  361. axisTick: {
  362. show: false,
  363. },
  364. data: monthData,
  365. },
  366. ],
  367. yAxis: [
  368. {
  369. splitNumber: 6,
  370. splitLine: {
  371. show: true,
  372. interval: 'auto',
  373. lineStyle: {
  374. color: ['#502297'],
  375. type: 'dashed',
  376. },
  377. },
  378. axisTick: {
  379. show: false,
  380. },
  381. axisLine: {
  382. lineStyle: {
  383. color: '#502297',
  384. width: 1,
  385. type: 'dashed',
  386. },
  387. },
  388. axisLabel: {
  389. show: true,
  390. textStyle: {
  391. color: '#ffffff',
  392. },
  393. },
  394. },
  395. ],
  396. series: [
  397. {
  398. name: '成绩',
  399. type: 'line',
  400. symbol: 'circle', // 默认是空心圆(中间是白色的),改成实心圆
  401. showAllSymbol: true,
  402. smooth: true,
  403. symbolSize: 8,
  404. lineStyle: {
  405. normal: {
  406. color: '#FE7B00', // 线条颜色
  407. },
  408. borderColor: '#ffffff',
  409. },
  410. itemStyle: {
  411. color: '#ffffff',
  412. borderColor: '#FE7B00',
  413. borderWidth: 2,
  414. },
  415. areaStyle: {
  416. //区域填充样式
  417. normal: {
  418. //线性渐变,前4个参数分别是x0,y0,x2,y2(范围0~1);相当于图形包围盒中的百分比。如果最后一个参数是‘true’,则该四个值是绝对像素位置。
  419. color: new echarts.graphic.LinearGradient(
  420. 0,
  421. 0,
  422. 0,
  423. 1,
  424. [
  425. {
  426. offset: 0,
  427. color: 'rgba(125, 14, 255, 0.4)',
  428. },
  429. {
  430. offset: 1,
  431. color: 'rgba(116, 0, 216, 0.1)',
  432. },
  433. ],
  434. false
  435. ),
  436. },
  437. },
  438. data: lineData,
  439. },
  440. ],
  441. };
  442. var currentIndex = -1;
  443. var timer = setInterval(function () {
  444. // 生成新的随机数据
  445. currentIndex++;
  446. if (currentIndex >= 12) {
  447. currentIndex = 0;
  448. for (var i = 0; i < lineData.length; i++) {
  449. lineData[i] = Math.floor(Math.random() * 1000);
  450. }
  451. } else {
  452. lineData[currentIndex] = Math.floor(Math.random() * 1000);
  453. }
  454. // 更新 option 中的数据
  455. option.series[0].data = lineData;
  456. // 重新渲染图表
  457. myChart.setOption(option);
  458. }, 1000); // 每秒更新一次数据
  459. if (option) {
  460. myChart.setOption(option);
  461. }
  462. },
  463. matterUpTop() {
  464. var myChart = echarts.init(document.getElementById('sprh-sxbjl10'));
  465. var datas = [{
  466. "value": 30,
  467. "name": "特种设备安全管.."
  468. },
  469. {
  470. "value": 20,
  471. "name": "特种设备使用登.."
  472. },
  473. {
  474. "value": 10,
  475. "name": "特种设备安全管2.."
  476. },
  477. {
  478. "value": 40,
  479. "name": "一孩、二孩、三孩.."
  480. },
  481. {
  482. "value": 50,
  483. "name": "失业登记"
  484. },
  485. {
  486. "value": 60,
  487. "name": "医师执业注册(.."
  488. },
  489. {
  490. "value": 70,
  491. "name": "残疾人证新办"
  492. },
  493. {
  494. "value": 80,
  495. "name": "护士执业注册(.."
  496. },
  497. {
  498. "value": 90,
  499. "name": "失业登记2"
  500. },
  501. {
  502. "value": 100,
  503. "name": "一孩、二孩、三孩1.. "
  504. }
  505. ]
  506. var maxArr = (new Array(datas.length)).fill(100);
  507. let option = {
  508. grid: {
  509. left: 0,
  510. right: 0,
  511. bottom: 0,
  512. top: 0,
  513. containLabel: true
  514. },
  515. tooltip: {
  516. trigger: 'item',
  517. axisPointer: {
  518. type: 'none'
  519. },
  520. formatter: function (params) {
  521. return params[0].name + ' : ' + params[0].value
  522. }
  523. },
  524. xAxis: {
  525. show: false,
  526. type: 'value'
  527. },
  528. yAxis: [{
  529. type: 'category',
  530. inverse: true,
  531. axisLabel: {
  532. show: true,
  533. align: 'right',
  534. textStyle: {
  535. fontSize: 14,
  536. color: '#ffffff',
  537. rich: {
  538. index: {
  539. color: '#9d9d9d',
  540. fontWeight: 'bold',
  541. fontStyle: 'italic'
  542. },
  543. index1: {
  544. color: '#f8777b',
  545. fontWeight: 'bold',
  546. fontStyle: 'italic'
  547. },
  548. index2: {
  549. color: '#ffa145',
  550. fontWeight: 'bold',
  551. fontStyle: 'italic'
  552. },
  553. index3: {
  554. color: '#6ade8d',
  555. fontWeight: 'bold',
  556. fontStyle: 'italic'
  557. },
  558. name: {
  559. width: 7 * 14,
  560. align: 'left',
  561. textAlign: 'left'
  562. }
  563. }
  564. },
  565. formatter: (name) => {
  566. var index = (datas.map(item => item.name)).indexOf(name) + 1;
  567. return [
  568. '{' + (index > 3 ? 'index' : 'index' + index) + '|' + index + '}',
  569. '{name|' + name + '}'
  570. ].join(' ')
  571. }
  572. },
  573. splitLine: {
  574. show: false
  575. },
  576. axisTick: {
  577. show: false
  578. },
  579. axisLine: {
  580. show: false
  581. },
  582. data: datas.map(item => item.name)
  583. },
  584. {
  585. type: 'category',
  586. inverse: true,
  587. axisTick: 'none',
  588. axisLine: 'none',
  589. show: true,
  590. axisLabel: {
  591. textStyle: {
  592. color: '#3196fa',
  593. fontSize: '12'
  594. },
  595. formatter: '{value}'
  596. },
  597. data: datas.map(item => item.value)
  598. }
  599. ],
  600. series: [{
  601. name: '值',
  602. type: 'bar',
  603. zlevel: 1,
  604. itemStyle: {
  605. normal: {
  606. barBorderRadius: 5,
  607. color: '#3196fa',
  608. },
  609. emphasis: {
  610. shadowBlur: 10,
  611. shadowColor: 'rgba(0, 0, 0, 0.5)'
  612. }
  613. },
  614. barWidth: 10,
  615. data: datas
  616. },
  617. {
  618. name: '背景',
  619. type: 'bar',
  620. barWidth: 10,
  621. barGap: '-100%',
  622. data: maxArr,
  623. itemStyle: {
  624. normal: {
  625. color: '#042039',
  626. barBorderRadius: 5,
  627. }
  628. },
  629. }
  630. ]
  631. };
  632. setInterval(function () {
  633. // 更新数据和名字,并重新渲染图表
  634. datas.forEach(function (item) {
  635. item.value = Math.floor(Math.random() * 100); // 随机生成新的值
  636. });
  637. myChart.setOption({
  638. yAxis: [{
  639. data: datas.map(item => item.name)
  640. }, {
  641. data: datas.map(item => item.value)
  642. }],
  643. series: [{
  644. data: datas
  645. },
  646. {
  647. data: maxArr
  648. }
  649. ]
  650. });
  651. }, 1000); // 每隔3秒钟更新一次数据
  652. // 初次渲染图表
  653. if (option) {
  654. myChart.setOption(option);
  655. }
  656. },
  657. matterTop() {
  658. var myChart = echarts.init(document.getElementById('sprh-sxbjl-top'));
  659. var datas = [{
  660. "value": 0,
  661. "name": "民办学校的举办.."
  662. },
  663. {
  664. "value": 0,
  665. "name": "失业登记.."
  666. },
  667. {
  668. "value": 0,
  669. "name": "民办学校的终止.."
  670. },
  671. {
  672. "value": 0,
  673. "name": "医师执业注册(.."
  674. },
  675. {
  676. "value": 0,
  677. "name": "一孩、二孩、三孩.."
  678. },
  679. {
  680. "value": 0,
  681. "name": "药品零售企业许.."
  682. },
  683. {
  684. "value": 0,
  685. "name": "护士执业注册"
  686. },
  687. {
  688. "value": 0,
  689. "name": "残疾人证新办"
  690. },
  691. {
  692. "value": 0,
  693. "name": "医疗广告审查"
  694. },
  695. {
  696. "value": 0,
  697. "name": "变更施工单位项.."
  698. },
  699. ]
  700. var maxArr = (new Array(datas.length)).fill(100);
  701. let option = {
  702. grid: {
  703. left: 0,
  704. right: 0,
  705. bottom: 0,
  706. top: 0,
  707. containLabel: true
  708. },
  709. tooltip: {
  710. trigger: 'item',
  711. axisPointer: {
  712. type: 'none'
  713. },
  714. formatter: function (params) {
  715. return params[0].name + ' : ' + params[0].value
  716. }
  717. },
  718. xAxis: {
  719. show: false,
  720. type: 'value'
  721. },
  722. yAxis: [{
  723. type: 'category',
  724. inverse: true,
  725. axisLabel: {
  726. show: true,
  727. align: 'right',
  728. textStyle: {
  729. fontSize: 14,
  730. color: '#ffffff',
  731. rich: {
  732. index: {
  733. color: '#9d9d9d',
  734. fontWeight: 'bold',
  735. fontStyle: 'italic'
  736. },
  737. index1: {
  738. color: '#f8777b',
  739. fontWeight: 'bold',
  740. fontStyle: 'italic'
  741. },
  742. index2: {
  743. color: '#ffa145',
  744. fontWeight: 'bold',
  745. fontStyle: 'italic'
  746. },
  747. index3: {
  748. color: '#6ade8d',
  749. fontWeight: 'bold',
  750. fontStyle: 'italic'
  751. },
  752. name: {
  753. width: 7 * 14,
  754. align: 'left',
  755. textAlign: 'left'
  756. }
  757. }
  758. },
  759. formatter: (name) => {
  760. var index = (datas.map(item => item.name)).indexOf(name) + 1;
  761. return [
  762. '{' + (index > 3 ? 'index' : 'index' + index) + '|' + index + '}',
  763. '{name|' + name + '}'
  764. ].join(' ')
  765. }
  766. },
  767. splitLine: {
  768. show: false
  769. },
  770. axisTick: {
  771. show: false
  772. },
  773. axisLine: {
  774. show: false
  775. },
  776. data: datas.map(item => item.name)
  777. }, {
  778. type: 'category',
  779. inverse: true,
  780. axisTick: 'none',
  781. axisLine: 'none',
  782. show: true,
  783. axisLabel: {
  784. textStyle: {
  785. color: '#3196fa',
  786. fontSize: '12'
  787. },
  788. formatter: '{value}%'
  789. },
  790. data: datas.map(item => item.value)
  791. }],
  792. series: [{
  793. name: '值',
  794. type: 'bar',
  795. zlevel: 1,
  796. itemStyle: {
  797. normal: {
  798. barBorderRadius: 5,
  799. color: '#3196fa',
  800. },
  801. },
  802. barWidth: 10,
  803. data: datas
  804. },
  805. {
  806. name: '背景',
  807. type: 'bar',
  808. barWidth: 10,
  809. barGap: '-100%',
  810. data: maxArr,
  811. itemStyle: {
  812. normal: {
  813. color: '#042039',
  814. barBorderRadius: 5,
  815. }
  816. },
  817. },
  818. ]
  819. };
  820. if (option) {
  821. myChart.setOption(option);
  822. }
  823. // 设置定时器,每隔一段时间更新数据并重绘图表
  824. setInterval(function () {
  825. // 更新数据和名字,并重新渲染图表
  826. datas.forEach(function (item) {
  827. item.value = Math.floor(Math.random() * 100); // 随机生成新的值
  828. });
  829. myChart.setOption({
  830. yAxis: [{
  831. data: datas.map(item => item.name)
  832. }, {
  833. data: datas.map(item => item.value)
  834. }],
  835. series: [{
  836. data: datas
  837. },
  838. {
  839. data: maxArr
  840. }
  841. ]
  842. });
  843. }, 1000); // 每隔3秒钟更新一次数据
  844. },
  845. },
  846. };
  847. </script>
  848. <style scoped>
  849. /* Your CSS styles here */
  850. </style>