investHome3.js 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987
  1. let app = new Vue({
  2. el: '#app',
  3. data () {
  4. return {
  5. time: '',
  6. timer: '',
  7. config5: {
  8. waitTime: 2000,
  9. header: ["风险类型", "风险说明", '提出人', '时间', '风险等级'],
  10. data: [
  11. ["风险等级", "WBS:012工程", "杨志宇", "2022.9.12", '<span class="lightOut"><span class="blue">一级</span></span>'],
  12. ["风险等级", "WBS:012工程", "杨志宇", "2022.9.12", '<span class="lightOut"><span class="yellow">二级</span></span>'],
  13. ["风险等级", "WBS:012工程", "杨志宇", "2022.9.12", '<span class="lightOut"><span class="pink">三级</span></span>'],
  14. ["风险等级", "WBS:012工程", "杨志宇", "2022.9.12", '<span class="lightOut"><span class="blue">一级</span></span>'],
  15. ["风险等级", "WBS:012工程", "杨志宇", "2022.9.12", '<span class="lightOut"><span class="yellow">二级</span></span>'],
  16. ["风险等级", "WBS:012工程", "杨志宇", "2022.9.12", '<span class="lightOut"><span class="pink">三级</span></span>']
  17. ],
  18. align: ["center", "center", "center", "center", "center"],
  19. headerBGC: "#1C537D",
  20. oddRowBGC: "#09335C"
  21. },
  22. }
  23. },
  24. created () {
  25. this.time = formatDate()
  26. this.timer = setInterval(() => {
  27. this.time = formatDate()
  28. }, 1000)
  29. },
  30. beforeDestroy () {
  31. if (this.timer) {
  32. clearInterval(this.timer);
  33. }
  34. },
  35. mounted () {
  36. setTimeout(() => {
  37. this.initChartL1()
  38. this.initChartL2()
  39. this.initChartL3()
  40. this.initChartL4()
  41. // this.initChartL5()
  42. this.initChartL6()
  43. this.initChartL7()
  44. this.aiQualityECharts();
  45. this.aiQualityECharts2();
  46. this.aiQualityECharts5();
  47. })
  48. },
  49. methods: {
  50. aiQualityECharts5 () {
  51. let chart = echarts.init(document.getElementById("aiQuality5"));
  52. let option = {
  53. grid: {
  54. top: 35,
  55. right: 40,
  56. left: 60,
  57. bottom: 20,
  58. },
  59. tooltip: {
  60. show: true,
  61. trigger: "axis",
  62. axisPointer: {
  63. // 坐标轴指示器,坐标轴触发有效
  64. type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
  65. },
  66. },
  67. xAxis: {
  68. data: ["集团本部", "晋能控股", "潞安化工"],
  69. axisTick: {
  70. show: false,
  71. },
  72. // x轴的字体颜色
  73. axisLabel: {
  74. textStyle: {
  75. color: "white",
  76. },
  77. },
  78. //y轴线的颜色以及宽度
  79. axisLine: {
  80. show: true,
  81. lineStyle: {
  82. color: "#1E5389",
  83. width: 1,
  84. type: "solid",
  85. },
  86. },
  87. },
  88. yAxis: {
  89. name: '亿元',
  90. nameTextStyle: {//y轴上方单位的颜色
  91. color: '#fff',
  92. },
  93. axisTick: {
  94. lineStyle: {
  95. color: "#18416F",
  96. },
  97. },
  98. // y轴的字体颜色
  99. axisLabel: {
  100. textStyle: {
  101. color: "white",
  102. },
  103. },
  104. splitLine: {
  105. show: false,
  106. lineStyle: {
  107. color: "#204561",
  108. width: 1,
  109. type: "dotted",
  110. },
  111. },
  112. //y轴线的颜色以及宽度
  113. axisLine: {
  114. show: true,
  115. lineStyle: {
  116. color: "#1E5389",
  117. width: 1,
  118. type: "solid",
  119. },
  120. },
  121. },
  122. series: [
  123. {
  124. name: "计划投资额",
  125. type: "bar",
  126. data: [1200, 680, 562, 268, 717, 843, 987, 126, 723, 569],
  127. showBackground: false,
  128. backgroundStyle: {
  129. color: "#18416F",
  130. },
  131. barWidth: "10%",
  132. itemStyle: {
  133. barBorderRadius: [10, 10, 0, 0],
  134. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  135. {
  136. offset: 0,
  137. color: "#132543",
  138. }, //柱图渐变色
  139. {
  140. offset: 1,
  141. color: "#897DFF",
  142. },
  143. ]),
  144. },
  145. },
  146. {
  147. name: "实际投资额",
  148. type: "bar",
  149. data: [658, 1125, 658, 999, 643, 675, 743, 724, 733, 725],
  150. showBackground: false,
  151. backgroundStyle: {
  152. color: "#18416F",
  153. },
  154. barWidth: "10%",
  155. itemStyle: {
  156. barBorderRadius: [10, 10, 0, 0],
  157. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  158. {
  159. offset: 0,
  160. color: "#132543",
  161. }, //柱图渐变色
  162. {
  163. offset: 1,
  164. color: "#FED95B",
  165. },
  166. ]),
  167. },
  168. },
  169. ],
  170. legend: {
  171. data: ["计划投资额", "实际投资额"],
  172. textStyle: {
  173. // 图列内容样式
  174. color: "#fff", // 字体颜色
  175. // fontSize: "10",
  176. },
  177. right: 30,
  178. icon: "roundRect",
  179. // 小图标的宽高
  180. itemHeight: 5,
  181. },
  182. };
  183. chart.setOption(option);
  184. tools.loopShowTooltip(chart, option, {
  185. interval: 2000,
  186. loopSeries: true,
  187. });
  188. },
  189. initChartL7 () {
  190. let myChart = echarts.init(this.$refs['tl7'])
  191. let option = {
  192. grid: {
  193. top: 0,
  194. right: 0,
  195. left: 0,
  196. bottom: 0,
  197. },
  198. tooltip: {
  199. trigger: 'item',
  200. position: [10, 10],
  201. extraCssText: 'width:130px;height:30px;',
  202. },
  203. color: ['#6682f5', '#40A9FF'],
  204. legend: {
  205. // icon: 'circle',
  206. bottom: 0,
  207. left: 'center',
  208. // itemHeight: 10,
  209. // itemWidth: 10,
  210. textStyle: {
  211. color: '#9DB9EB',
  212. },
  213. },
  214. graphic: {
  215. elements: [{
  216. type: "text",
  217. left: "center",
  218. top: "77%",
  219. style: {
  220. text: "投资类别",
  221. textAlign: "center",
  222. fill: "#fff",
  223. fontSize: 15,
  224. fontWeight: 500
  225. }
  226. }]
  227. },
  228. series: [
  229. {
  230. center: ['50%', '40%'],
  231. radius: ['45%', '60%'],
  232. name: '',
  233. type: 'pie',
  234. labelLine: {
  235. normal: {
  236. lineStyle: {
  237. width: 1,
  238. },
  239. },
  240. },
  241. label: {
  242. show: false,
  243. position: 'center'
  244. },
  245. data: [
  246. { value: 1048, name: '数据1' },
  247. { value: 735, name: '数据2' }
  248. ],
  249. },
  250. ],
  251. }
  252. tools.loopShowTooltip(myChart, option, {
  253. interval: 2000,
  254. loopSeries: true,
  255. });
  256. myChart.setOption(option)
  257. },
  258. initChartL1 () {
  259. let myChart = echarts.init(this.$refs['tl1'])
  260. let option = {
  261. grid: {
  262. top: 0,
  263. right: 0,
  264. left: 0,
  265. bottom: 0,
  266. },
  267. tooltip: {
  268. trigger: 'item',
  269. },
  270. color: ['#6682f5', '#40A9FF'],
  271. legend: {
  272. // icon: 'circle',
  273. bottom: 0,
  274. left: 'center',
  275. // itemHeight: 10,
  276. // itemWidth: 10,
  277. textStyle: {
  278. color: '#9DB9EB',
  279. },
  280. },
  281. graphic: {
  282. elements: [{
  283. type: "text",
  284. left: "center",
  285. top: "77%",
  286. style: {
  287. text: "投资类别",
  288. textAlign: "center",
  289. fill: "#fff",
  290. fontSize: 15,
  291. fontWeight: 500
  292. }
  293. }]
  294. },
  295. series: [
  296. {
  297. center: ['50%', '40%'],
  298. radius: ['45%', '60%'],
  299. name: '',
  300. type: 'pie',
  301. labelLine: {
  302. normal: {
  303. lineStyle: {
  304. width: 1,
  305. },
  306. },
  307. },
  308. label: {
  309. show: false,
  310. position: 'center'
  311. },
  312. data: [
  313. { value: 1048, name: '数据1' },
  314. { value: 735, name: '数据2' }
  315. ],
  316. },
  317. ],
  318. }
  319. tools.loopShowTooltip(myChart, option, {
  320. interval: 2000,
  321. loopSeries: true,
  322. });
  323. myChart.setOption(option)
  324. },
  325. initChartL2 () {
  326. let myChart = echarts.init(this.$refs['tl2'])
  327. let option = {
  328. grid: {
  329. top: 0,
  330. right: 0,
  331. left: 0,
  332. bottom: 0,
  333. },
  334. tooltip: {
  335. trigger: 'item',
  336. },
  337. color: ['#40A9FF', '#45DAD1'],
  338. legend: {
  339. bottom: 0,
  340. left: 'center',
  341. textStyle: {
  342. color: '#9DB9EB',
  343. },
  344. },
  345. graphic: {
  346. elements: [{
  347. type: "text",
  348. left: "center",
  349. top: "77%",
  350. style: {
  351. text: "投资阶段",
  352. textAlign: "center",
  353. fill: "#fff",
  354. fontSize: 15,
  355. fontWeight: 500
  356. }
  357. }]
  358. },
  359. series: [
  360. {
  361. center: ['50%', '40%'],
  362. radius: ['45%', '60%'],
  363. name: '',
  364. type: 'pie',
  365. labelLine: {
  366. normal: {
  367. lineStyle: {
  368. width: 1,
  369. },
  370. },
  371. },
  372. label: {
  373. show: false,
  374. position: 'center'
  375. },
  376. data: [
  377. { value: 1048, name: '数据1' },
  378. { value: 735, name: '数据2' }
  379. ],
  380. },
  381. ],
  382. }
  383. tools.loopShowTooltip(myChart, option, {
  384. interval: 2500,
  385. loopSeries: true,
  386. });
  387. myChart.setOption(option)
  388. },
  389. initChartL3 () {
  390. let myChart = echarts.init(this.$refs['tl3'])
  391. let option = {
  392. grid: {
  393. top: 0,
  394. right: 0,
  395. left: 0,
  396. bottom: 0,
  397. },
  398. tooltip: {
  399. trigger: 'item',
  400. },
  401. color: ['#40A9FF', '#8BA2FF'],
  402. legend: {
  403. bottom: 0,
  404. left: 'center',
  405. textStyle: {
  406. color: '#9DB9EB',
  407. },
  408. },
  409. graphic: {
  410. elements: [{
  411. type: "text",
  412. left: "center",
  413. top: "77%",
  414. style: {
  415. text: "管理类别",
  416. textAlign: "center",
  417. fill: "#fff",
  418. fontSize: 15,
  419. fontWeight: 500
  420. }
  421. }]
  422. },
  423. series: [
  424. {
  425. center: ['50%', '40%'],
  426. radius: ['45%', '60%'],
  427. name: '',
  428. type: 'pie',
  429. labelLine: {
  430. normal: {
  431. lineStyle: {
  432. width: 1,
  433. },
  434. },
  435. },
  436. label: {
  437. show: false,
  438. position: 'center'
  439. },
  440. data: [
  441. { value: 1048, name: '数据1' },
  442. { value: 735, name: '数据2' }
  443. ],
  444. },
  445. ],
  446. }
  447. tools.loopShowTooltip(myChart, option, {
  448. interval: 3000,
  449. loopSeries: true,
  450. });
  451. myChart.setOption(option)
  452. },
  453. initChartL4 () {
  454. let myChart = echarts.init(this.$refs['tl4'])
  455. let option = {
  456. grid: {
  457. top: 0,
  458. right: 0,
  459. left: 0,
  460. bottom: 0,
  461. },
  462. tooltip: {
  463. trigger: 'item',
  464. },
  465. color: ['#45DAD1', '#40A9FF'],
  466. legend: {
  467. bottom: 0,
  468. left: 'center',
  469. textStyle: {
  470. color: '#9DB9EB',
  471. },
  472. },
  473. graphic: {
  474. elements: [{
  475. type: "text",
  476. left: "center",
  477. top: "77%",
  478. style: {
  479. text: "投资领域",
  480. textAlign: "center",
  481. fill: "#fff",
  482. fontSize: 15,
  483. fontWeight: 500
  484. }
  485. }]
  486. },
  487. series: [
  488. {
  489. center: ['50%', '40%'],
  490. radius: ['45%', '60%'],
  491. name: '',
  492. type: 'pie',
  493. labelLine: {
  494. normal: {
  495. lineStyle: {
  496. width: 1,
  497. },
  498. },
  499. },
  500. label: {
  501. show: false,
  502. position: 'center'
  503. },
  504. data: [
  505. { value: 1048, name: '数据1' },
  506. { value: 735, name: '数据2' }
  507. ],
  508. },
  509. ],
  510. }
  511. tools.loopShowTooltip(myChart, option, {
  512. interval: 3500,
  513. loopSeries: true,
  514. });
  515. myChart.setOption(option)
  516. },
  517. initChartL5 () {
  518. let myChart = echarts.init(this.$refs['cl1'])
  519. let option = {
  520. grid: {
  521. top: 0,
  522. right: 0,
  523. left: 0,
  524. bottom: 0,
  525. },
  526. tooltip: {
  527. trigger: 'item',
  528. },
  529. color: ['#45DAD1', '#40A9FF'],
  530. legend: {
  531. bottom: 0,
  532. left: 'center',
  533. textStyle: {
  534. color: '#9DB9EB',
  535. },
  536. },
  537. graphic: {
  538. elements: [{
  539. type: "text",
  540. left: "center",
  541. top: "77%",
  542. style: {
  543. text: "投资情况",
  544. textAlign: "center",
  545. fill: "#fff",
  546. fontSize: 15,
  547. fontWeight: 500
  548. }
  549. }]
  550. },
  551. series: [
  552. {
  553. center: ['50%', '40%'],
  554. radius: ['45%', '60%'],
  555. name: '',
  556. type: 'pie',
  557. labelLine: {
  558. normal: {
  559. lineStyle: {
  560. width: 1,
  561. },
  562. },
  563. },
  564. label: {
  565. show: false,
  566. position: 'center'
  567. },
  568. data: [
  569. { value: 1048, name: '数据1' },
  570. { value: 735, name: '数据2' }
  571. ],
  572. },
  573. ],
  574. }
  575. tools.loopShowTooltip(myChart, option, {
  576. interval: 4000,
  577. loopSeries: true,
  578. });
  579. myChart.setOption(option)
  580. },
  581. initChartL6 () {
  582. let myChart = echarts.init(this.$refs['cr1'])
  583. option = {
  584. title: {
  585. text: ''
  586. },
  587. legend: {
  588. data: ['类型1', '类型2', '类型3', '类型4', '类型5'],
  589. bottom: 0,
  590. left: 'center',
  591. textStyle: {
  592. color: '#9DB9EB',
  593. },
  594. },
  595. splitArea: { // 坐标轴在 grid 区域中的分隔区域,默认不显示。
  596. show: true,
  597. areaStyle: { // 分隔区域的样式设置。
  598. color: ['yellow'],
  599. // 分隔区域颜色。分隔区域会按数组中颜色的顺序依次循环设置颜色。默认是一个深浅的间隔色。
  600. }
  601. },
  602. radar: {
  603. // shape: 'circle',
  604. center: ['50%', '50%'],
  605. radius: 60,
  606. indicator: [
  607. { name: '类型1', max: 100000 },
  608. { name: '类型2', max: 100000 },
  609. { name: '类型3', max: 100000 },
  610. { name: '类型4', max: 100000 },
  611. { name: '类型5', max: 100000 },
  612. ],
  613. axisLine: { // 设置雷达图中间射线的颜色
  614. lineStyle: {
  615. color: '#c0c0c0',
  616. },
  617. },
  618. splitLine: { //网格颜色设置
  619. show: true,
  620. lineStyle: {
  621. width: 1,
  622. color: '#1e83e4',
  623. },
  624. },
  625. splitArea: { //设置图表颜色,show的值为true
  626. show: false,
  627. areaStyle: {
  628. // color:"#c1ddf8", //一般设置方式
  629. //设置渐变背景色 new echarts.graphic.LinearGradient(a,b,c,d,arr)
  630. //a ,b,c,d值可为0,1 a:1表示arr中的颜色右到左;c:1 arr中的颜色左到右
  631. //b:1表示arr中的颜色下到上;d:1表示arr中的颜色上到下
  632. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  633. { offset: 0, color: '#c1ddf8' }, // 0% 处的颜色
  634. { offset: 1, color: '#1e83e4' }// 100% 处的颜色
  635. ], false)
  636. }
  637. }
  638. },
  639. series: [
  640. {
  641. name: '',
  642. type: 'radar',
  643. symbol: 'circle', // 单个数值点的样式,还可以取值'rect','angle'等
  644. symbolSize: 0, // 数值点的大小
  645. data: [
  646. {
  647. value: [4200, 3000, 20000, 35000, 50000, 18000],
  648. name: '类型1',
  649. itemStyle: { //该数值区域样式设置
  650. normal: {
  651. color: '#2CC6FF', //背景颜色,还需设置areaStyle
  652. lineStyle: {
  653. color: '#2CC6FF', //边框颜色
  654. },
  655. },
  656. },
  657. label: { //显示value中具体的数值
  658. normal: {
  659. show: false,
  660. textStyle: { //更改数值样式
  661. color: '#43EDE3'
  662. }
  663. },
  664. },
  665. areaStyle: { //设置区域背景颜色透明度
  666. normal: {
  667. width: 1,
  668. opacity: 0.8,
  669. },
  670. },
  671. },
  672. {
  673. value: [8000, 3000, 38000, 76000, 32000, 71000],
  674. name: '类型2',
  675. itemStyle: { //该数值区域样式设置
  676. normal: {
  677. color: '#D87AFF', //背景颜色,还需设置areaStyle
  678. lineStyle: {
  679. color: '#2CC6FF', //边框颜色
  680. },
  681. },
  682. },
  683. label: { //显示value中具体的数值
  684. normal: {
  685. show: false,
  686. textStyle: { //更改数值样式
  687. color: '#43EDE3'
  688. }
  689. },
  690. },
  691. areaStyle: { //设置区域背景颜色透明度
  692. normal: {
  693. width: 1,
  694. opacity: 0.8,
  695. },
  696. },
  697. }
  698. ]
  699. }
  700. ]
  701. };
  702. tools.loopShowTooltip(myChart, option, {
  703. interval: 2000,
  704. loopSeries: true,
  705. });
  706. myChart.setOption(option)
  707. },
  708. aiQualityECharts () {
  709. let chart = echarts.init(document.getElementById("aiQuality"));
  710. let option = {
  711. grid: {
  712. top: 35,
  713. right: 40,
  714. left: 60,
  715. bottom: 20,
  716. },
  717. tooltip: {
  718. show: true,
  719. trigger: "axis",
  720. axisPointer: {
  721. // 坐标轴指示器,坐标轴触发有效
  722. type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
  723. },
  724. },
  725. xAxis: {
  726. data: ["集团本部", "晋能控股", "潞安化工", "华阳新材", "山西文旅", "太重集团", "山焦人力", "华远陆港", "汾酒集团", "云时代"],
  727. axisTick: {
  728. show: false,
  729. },
  730. // x轴的字体颜色
  731. axisLabel: {
  732. textStyle: {
  733. color: "white",
  734. },
  735. },
  736. //y轴线的颜色以及宽度
  737. axisLine: {
  738. show: true,
  739. lineStyle: {
  740. color: "#1E5389",
  741. width: 1,
  742. type: "solid",
  743. },
  744. },
  745. },
  746. yAxis: {
  747. name: '亿元',
  748. nameTextStyle: {//y轴上方单位的颜色
  749. color: '#fff',
  750. },
  751. axisTick: {
  752. lineStyle: {
  753. color: "#18416F",
  754. },
  755. },
  756. // y轴的字体颜色
  757. axisLabel: {
  758. textStyle: {
  759. color: "white",
  760. },
  761. },
  762. splitLine: {
  763. show: false,
  764. lineStyle: {
  765. color: "#204561",
  766. width: 1,
  767. type: "dotted",
  768. },
  769. },
  770. //y轴线的颜色以及宽度
  771. axisLine: {
  772. show: true,
  773. lineStyle: {
  774. color: "#1E5389",
  775. width: 1,
  776. type: "solid",
  777. },
  778. },
  779. },
  780. series: [
  781. {
  782. name: "计划投资额",
  783. type: "bar",
  784. data: [1200, 680, 562, 268, 717, 843, 987, 126, 723, 569],
  785. showBackground: false,
  786. backgroundStyle: {
  787. color: "#18416F",
  788. },
  789. barWidth: "10%",
  790. itemStyle: {
  791. barBorderRadius: [10, 10, 0, 0],
  792. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  793. {
  794. offset: 0,
  795. color: "#132543",
  796. }, //柱图渐变色
  797. {
  798. offset: 1,
  799. color: "#897DFF",
  800. },
  801. ]),
  802. },
  803. },
  804. {
  805. name: "实际投资额",
  806. type: "bar",
  807. data: [658, 1125, 658, 999, 643, 675, 743, 724, 733, 725],
  808. showBackground: false,
  809. backgroundStyle: {
  810. color: "#18416F",
  811. },
  812. barWidth: "10%",
  813. itemStyle: {
  814. barBorderRadius: [10, 10, 0, 0],
  815. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  816. {
  817. offset: 0,
  818. color: "#132543",
  819. }, //柱图渐变色
  820. {
  821. offset: 1,
  822. color: "#FED95B",
  823. },
  824. ]),
  825. },
  826. },
  827. ],
  828. legend: {
  829. data: ["计划投资额", "实际投资额"],
  830. textStyle: {
  831. // 图列内容样式
  832. color: "#fff", // 字体颜色
  833. // fontSize: "10",
  834. },
  835. right: 30,
  836. icon: "roundRect",
  837. // 小图标的宽高
  838. itemHeight: 5,
  839. },
  840. };
  841. chart.setOption(option);
  842. tools.loopShowTooltip(chart, option, {
  843. interval: 2000,
  844. loopSeries: true,
  845. });
  846. },
  847. aiQualityECharts2 () {
  848. let chart = echarts.init(document.getElementById("aiQuality2"));
  849. let option = {
  850. grid: {
  851. top: 35,
  852. right: 40,
  853. left: 60,
  854. bottom: 20,
  855. },
  856. tooltip: {
  857. show: true,
  858. trigger: "axis",
  859. axisPointer: {
  860. // 坐标轴指示器,坐标轴触发有效
  861. type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
  862. },
  863. },
  864. xAxis: {
  865. data: ["工程费用", "设备费用", "人员费用", "材料费用", "管理费用"],
  866. axisTick: {
  867. show: false,
  868. },
  869. // x轴的字体颜色
  870. axisLabel: {
  871. textStyle: {
  872. color: "white",
  873. },
  874. },
  875. //y轴线的颜色以及宽度
  876. axisLine: {
  877. show: true,
  878. lineStyle: {
  879. color: "#1E5389",
  880. width: 1,
  881. type: "solid",
  882. },
  883. },
  884. },
  885. yAxis: {
  886. name: '亿元',
  887. nameTextStyle: {//y轴上方单位的颜色
  888. color: '#fff',
  889. },
  890. axisTick: {
  891. lineStyle: {
  892. color: "#18416F",
  893. },
  894. },
  895. // y轴的字体颜色
  896. axisLabel: {
  897. textStyle: {
  898. color: "white",
  899. },
  900. },
  901. splitLine: {
  902. show: false,
  903. lineStyle: {
  904. color: "#204561",
  905. width: 1,
  906. type: "dotted",
  907. },
  908. },
  909. //y轴线的颜色以及宽度
  910. axisLine: {
  911. show: true,
  912. lineStyle: {
  913. color: "#1E5389",
  914. width: 1,
  915. type: "solid",
  916. },
  917. },
  918. },
  919. series: [
  920. {
  921. name: "预算金额",
  922. type: "bar",
  923. data: [843, 987, 126, 723, 569],
  924. showBackground: false,
  925. backgroundStyle: {
  926. color: "#18416F",
  927. },
  928. barWidth: "10%",
  929. itemStyle: {
  930. barBorderRadius: [10, 10, 0, 0],
  931. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  932. {
  933. offset: 0,
  934. color: "#132543",
  935. }, //柱图渐变色
  936. {
  937. offset: 1,
  938. color: "#40A9FF",
  939. },
  940. ]),
  941. },
  942. },
  943. {
  944. name: "实际金额",
  945. type: "bar",
  946. data: [675, 743, 724, 733, 725],
  947. showBackground: false,
  948. backgroundStyle: {
  949. color: "#18416F",
  950. },
  951. barWidth: "10%",
  952. itemStyle: {
  953. barBorderRadius: [10, 10, 0, 0],
  954. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  955. {
  956. offset: 0,
  957. color: "#132543",
  958. }, //柱图渐变色
  959. {
  960. offset: 1,
  961. color: "#45DAD1",
  962. },
  963. ]),
  964. },
  965. },
  966. ],
  967. legend: {
  968. data: ["预算金额", "实际金额"],
  969. textStyle: {
  970. // 图列内容样式
  971. color: "#fff", // 字体颜色
  972. // fontSize: "10",
  973. },
  974. right: 30,
  975. icon: "roundRect",
  976. // 小图标的宽高
  977. itemHeight: 5,
  978. },
  979. };
  980. chart.setOption(option);
  981. tools.loopShowTooltip(chart, option, {
  982. interval: 2000,
  983. loopSeries: true,
  984. });
  985. }
  986. },
  987. })