investHome3.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777
  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.aiQualityECharts();
  44. this.aiQualityECharts2();
  45. })
  46. },
  47. methods: {
  48. initChartL1 () {
  49. let myChart = echarts.init(this.$refs['tl1'])
  50. let option = {
  51. grid: {
  52. top: 0,
  53. right: 0,
  54. left: 0,
  55. bottom: 0,
  56. },
  57. tooltip: {
  58. trigger: 'item',
  59. },
  60. color: ['#6682f5', '#40A9FF'],
  61. legend: {
  62. // icon: 'circle',
  63. bottom: 0,
  64. left: 'center',
  65. // itemHeight: 10,
  66. // itemWidth: 10,
  67. textStyle: {
  68. color: '#9DB9EB',
  69. },
  70. },
  71. graphic: {
  72. elements: [{
  73. type: "text",
  74. left: "center",
  75. top: "77%",
  76. style: {
  77. text: "投资类别",
  78. textAlign: "center",
  79. fill: "#fff",
  80. fontSize: 15,
  81. fontWeight: 500
  82. }
  83. }]
  84. },
  85. series: [
  86. {
  87. center: ['50%', '40%'],
  88. radius: ['45%', '60%'],
  89. name: '',
  90. type: 'pie',
  91. labelLine: {
  92. normal: {
  93. lineStyle: {
  94. width: 1,
  95. },
  96. },
  97. },
  98. label: {
  99. show: false,
  100. position: 'center'
  101. },
  102. data: [
  103. { value: 1048, name: '数据1' },
  104. { value: 735, name: '数据2' }
  105. ],
  106. },
  107. ],
  108. }
  109. tools.loopShowTooltip(myChart, option, {
  110. interval: 2000,
  111. loopSeries: true,
  112. });
  113. myChart.setOption(option)
  114. },
  115. initChartL2 () {
  116. let myChart = echarts.init(this.$refs['tl2'])
  117. let option = {
  118. grid: {
  119. top: 0,
  120. right: 0,
  121. left: 0,
  122. bottom: 0,
  123. },
  124. tooltip: {
  125. trigger: 'item',
  126. },
  127. color: ['#40A9FF', '#45DAD1'],
  128. legend: {
  129. bottom: 0,
  130. left: 'center',
  131. textStyle: {
  132. color: '#9DB9EB',
  133. },
  134. },
  135. graphic: {
  136. elements: [{
  137. type: "text",
  138. left: "center",
  139. top: "77%",
  140. style: {
  141. text: "投资阶段",
  142. textAlign: "center",
  143. fill: "#fff",
  144. fontSize: 15,
  145. fontWeight: 500
  146. }
  147. }]
  148. },
  149. series: [
  150. {
  151. center: ['50%', '40%'],
  152. radius: ['45%', '60%'],
  153. name: '',
  154. type: 'pie',
  155. labelLine: {
  156. normal: {
  157. lineStyle: {
  158. width: 1,
  159. },
  160. },
  161. },
  162. label: {
  163. show: false,
  164. position: 'center'
  165. },
  166. data: [
  167. { value: 1048, name: '数据1' },
  168. { value: 735, name: '数据2' }
  169. ],
  170. },
  171. ],
  172. }
  173. tools.loopShowTooltip(myChart, option, {
  174. interval: 2500,
  175. loopSeries: true,
  176. });
  177. myChart.setOption(option)
  178. },
  179. initChartL3 () {
  180. let myChart = echarts.init(this.$refs['tl3'])
  181. let option = {
  182. grid: {
  183. top: 0,
  184. right: 0,
  185. left: 0,
  186. bottom: 0,
  187. },
  188. tooltip: {
  189. trigger: 'item',
  190. },
  191. color: ['#40A9FF', '#8BA2FF'],
  192. legend: {
  193. bottom: 0,
  194. left: 'center',
  195. textStyle: {
  196. color: '#9DB9EB',
  197. },
  198. },
  199. graphic: {
  200. elements: [{
  201. type: "text",
  202. left: "center",
  203. top: "77%",
  204. style: {
  205. text: "管理类别",
  206. textAlign: "center",
  207. fill: "#fff",
  208. fontSize: 15,
  209. fontWeight: 500
  210. }
  211. }]
  212. },
  213. series: [
  214. {
  215. center: ['50%', '40%'],
  216. radius: ['45%', '60%'],
  217. name: '',
  218. type: 'pie',
  219. labelLine: {
  220. normal: {
  221. lineStyle: {
  222. width: 1,
  223. },
  224. },
  225. },
  226. label: {
  227. show: false,
  228. position: 'center'
  229. },
  230. data: [
  231. { value: 1048, name: '数据1' },
  232. { value: 735, name: '数据2' }
  233. ],
  234. },
  235. ],
  236. }
  237. tools.loopShowTooltip(myChart, option, {
  238. interval: 3000,
  239. loopSeries: true,
  240. });
  241. myChart.setOption(option)
  242. },
  243. initChartL4 () {
  244. let myChart = echarts.init(this.$refs['tl4'])
  245. let option = {
  246. grid: {
  247. top: 0,
  248. right: 0,
  249. left: 0,
  250. bottom: 0,
  251. },
  252. tooltip: {
  253. trigger: 'item',
  254. },
  255. color: ['#45DAD1', '#40A9FF'],
  256. legend: {
  257. bottom: 0,
  258. left: 'center',
  259. textStyle: {
  260. color: '#9DB9EB',
  261. },
  262. },
  263. graphic: {
  264. elements: [{
  265. type: "text",
  266. left: "center",
  267. top: "77%",
  268. style: {
  269. text: "投资领域",
  270. textAlign: "center",
  271. fill: "#fff",
  272. fontSize: 15,
  273. fontWeight: 500
  274. }
  275. }]
  276. },
  277. series: [
  278. {
  279. center: ['50%', '40%'],
  280. radius: ['45%', '60%'],
  281. name: '',
  282. type: 'pie',
  283. labelLine: {
  284. normal: {
  285. lineStyle: {
  286. width: 1,
  287. },
  288. },
  289. },
  290. label: {
  291. show: false,
  292. position: 'center'
  293. },
  294. data: [
  295. { value: 1048, name: '数据1' },
  296. { value: 735, name: '数据2' }
  297. ],
  298. },
  299. ],
  300. }
  301. tools.loopShowTooltip(myChart, option, {
  302. interval: 3500,
  303. loopSeries: true,
  304. });
  305. myChart.setOption(option)
  306. },
  307. initChartL5 () {
  308. let myChart = echarts.init(this.$refs['cl1'])
  309. let option = {
  310. grid: {
  311. top: 0,
  312. right: 0,
  313. left: 0,
  314. bottom: 0,
  315. },
  316. tooltip: {
  317. trigger: 'item',
  318. },
  319. color: ['#45DAD1', '#40A9FF'],
  320. legend: {
  321. bottom: 0,
  322. left: 'center',
  323. textStyle: {
  324. color: '#9DB9EB',
  325. },
  326. },
  327. graphic: {
  328. elements: [{
  329. type: "text",
  330. left: "center",
  331. top: "77%",
  332. style: {
  333. text: "投资情况",
  334. textAlign: "center",
  335. fill: "#fff",
  336. fontSize: 15,
  337. fontWeight: 500
  338. }
  339. }]
  340. },
  341. series: [
  342. {
  343. center: ['50%', '40%'],
  344. radius: ['45%', '60%'],
  345. name: '',
  346. type: 'pie',
  347. labelLine: {
  348. normal: {
  349. lineStyle: {
  350. width: 1,
  351. },
  352. },
  353. },
  354. label: {
  355. show: false,
  356. position: 'center'
  357. },
  358. data: [
  359. { value: 1048, name: '数据1' },
  360. { value: 735, name: '数据2' }
  361. ],
  362. },
  363. ],
  364. }
  365. tools.loopShowTooltip(myChart, option, {
  366. interval: 4000,
  367. loopSeries: true,
  368. });
  369. myChart.setOption(option)
  370. },
  371. initChartL6 () {
  372. let myChart = echarts.init(this.$refs['cr1'])
  373. option = {
  374. title: {
  375. text: ''
  376. },
  377. legend: {
  378. data: ['类型1', '类型2', '类型3', '类型4', '类型5'],
  379. bottom: 0,
  380. left: 'center',
  381. textStyle: {
  382. color: '#9DB9EB',
  383. },
  384. },
  385. splitArea: { // 坐标轴在 grid 区域中的分隔区域,默认不显示。
  386. show: true,
  387. areaStyle: { // 分隔区域的样式设置。
  388. color: ['yellow'],
  389. // 分隔区域颜色。分隔区域会按数组中颜色的顺序依次循环设置颜色。默认是一个深浅的间隔色。
  390. }
  391. },
  392. radar: {
  393. // shape: 'circle',
  394. center: ['50%', '50%'],
  395. radius: 60,
  396. indicator: [
  397. { name: '类型1', max: 100000 },
  398. { name: '类型2', max: 100000 },
  399. { name: '类型3', max: 100000 },
  400. { name: '类型4', max: 100000 },
  401. { name: '类型5', max: 100000 },
  402. ],
  403. axisLine: { // 设置雷达图中间射线的颜色
  404. lineStyle: {
  405. color: '#c0c0c0',
  406. },
  407. },
  408. splitLine: { //网格颜色设置
  409. show: true,
  410. lineStyle: {
  411. width: 1,
  412. color: '#1e83e4',
  413. },
  414. },
  415. splitArea: { //设置图表颜色,show的值为true
  416. show: false,
  417. areaStyle: {
  418. // color:"#c1ddf8", //一般设置方式
  419. //设置渐变背景色 new echarts.graphic.LinearGradient(a,b,c,d,arr)
  420. //a ,b,c,d值可为0,1 a:1表示arr中的颜色右到左;c:1 arr中的颜色左到右
  421. //b:1表示arr中的颜色下到上;d:1表示arr中的颜色上到下
  422. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  423. { offset: 0, color: '#c1ddf8' }, // 0% 处的颜色
  424. { offset: 1, color: '#1e83e4' }// 100% 处的颜色
  425. ], false)
  426. }
  427. }
  428. },
  429. series: [
  430. {
  431. name: '',
  432. type: 'radar',
  433. symbol: 'circle', // 单个数值点的样式,还可以取值'rect','angle'等
  434. symbolSize: 0, // 数值点的大小
  435. data: [
  436. {
  437. value: [4200, 3000, 20000, 35000, 50000, 18000],
  438. name: '类型1',
  439. itemStyle: { //该数值区域样式设置
  440. normal: {
  441. color: '#2CC6FF', //背景颜色,还需设置areaStyle
  442. lineStyle: {
  443. color: '#2CC6FF', //边框颜色
  444. },
  445. },
  446. },
  447. label: { //显示value中具体的数值
  448. normal: {
  449. show: false,
  450. textStyle: { //更改数值样式
  451. color: '#43EDE3'
  452. }
  453. },
  454. },
  455. areaStyle: { //设置区域背景颜色透明度
  456. normal: {
  457. width: 1,
  458. opacity: 0.8,
  459. },
  460. },
  461. },
  462. {
  463. value: [8000, 3000, 38000, 76000, 32000, 71000],
  464. name: '类型2',
  465. itemStyle: { //该数值区域样式设置
  466. normal: {
  467. color: '#D87AFF', //背景颜色,还需设置areaStyle
  468. lineStyle: {
  469. color: '#2CC6FF', //边框颜色
  470. },
  471. },
  472. },
  473. label: { //显示value中具体的数值
  474. normal: {
  475. show: false,
  476. textStyle: { //更改数值样式
  477. color: '#43EDE3'
  478. }
  479. },
  480. },
  481. areaStyle: { //设置区域背景颜色透明度
  482. normal: {
  483. width: 1,
  484. opacity: 0.8,
  485. },
  486. },
  487. }
  488. ]
  489. }
  490. ]
  491. };
  492. tools.loopShowTooltip(myChart, option, {
  493. interval: 2000,
  494. loopSeries: true,
  495. });
  496. myChart.setOption(option)
  497. },
  498. aiQualityECharts () {
  499. let chart = echarts.init(document.getElementById("aiQuality"));
  500. let option = {
  501. grid: {
  502. top: 35,
  503. right: 40,
  504. left: 60,
  505. bottom: 20,
  506. },
  507. tooltip: {
  508. show: true,
  509. trigger: "axis",
  510. axisPointer: {
  511. // 坐标轴指示器,坐标轴触发有效
  512. type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
  513. },
  514. },
  515. xAxis: {
  516. data: ["集团本部", "晋能控股", "潞安化工", "华阳新材", "山西文旅", "太重集团", "山焦人力", "华远陆港", "汾酒集团", "云时代"],
  517. axisTick: {
  518. show: false,
  519. },
  520. // x轴的字体颜色
  521. axisLabel: {
  522. textStyle: {
  523. color: "white",
  524. },
  525. },
  526. //y轴线的颜色以及宽度
  527. axisLine: {
  528. show: true,
  529. lineStyle: {
  530. color: "#1E5389",
  531. width: 1,
  532. type: "solid",
  533. },
  534. },
  535. },
  536. yAxis: {
  537. name: '亿元',
  538. nameTextStyle: {//y轴上方单位的颜色
  539. color: '#fff',
  540. },
  541. axisTick: {
  542. lineStyle: {
  543. color: "#18416F",
  544. },
  545. },
  546. // y轴的字体颜色
  547. axisLabel: {
  548. textStyle: {
  549. color: "white",
  550. },
  551. },
  552. splitLine: {
  553. show: false,
  554. lineStyle: {
  555. color: "#204561",
  556. width: 1,
  557. type: "dotted",
  558. },
  559. },
  560. //y轴线的颜色以及宽度
  561. axisLine: {
  562. show: true,
  563. lineStyle: {
  564. color: "#1E5389",
  565. width: 1,
  566. type: "solid",
  567. },
  568. },
  569. },
  570. series: [
  571. {
  572. name: "计划投资额",
  573. type: "bar",
  574. data: [1200, 680, 562, 268, 717, 843, 987, 126, 723, 569],
  575. showBackground: false,
  576. backgroundStyle: {
  577. color: "#18416F",
  578. },
  579. barWidth: "10%",
  580. itemStyle: {
  581. barBorderRadius: [10, 10, 0, 0],
  582. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  583. {
  584. offset: 0,
  585. color: "#132543",
  586. }, //柱图渐变色
  587. {
  588. offset: 1,
  589. color: "#897DFF",
  590. },
  591. ]),
  592. },
  593. },
  594. {
  595. name: "实际投资额",
  596. type: "bar",
  597. data: [658, 1125, 658, 999, 643, 675, 743, 724, 733, 725],
  598. showBackground: false,
  599. backgroundStyle: {
  600. color: "#18416F",
  601. },
  602. barWidth: "10%",
  603. itemStyle: {
  604. barBorderRadius: [10, 10, 0, 0],
  605. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  606. {
  607. offset: 0,
  608. color: "#132543",
  609. }, //柱图渐变色
  610. {
  611. offset: 1,
  612. color: "#FED95B",
  613. },
  614. ]),
  615. },
  616. },
  617. ],
  618. legend: {
  619. data: ["计划投资额", "实际投资额"],
  620. textStyle: {
  621. // 图列内容样式
  622. color: "#fff", // 字体颜色
  623. // fontSize: "10",
  624. },
  625. right: 30,
  626. icon: "roundRect",
  627. // 小图标的宽高
  628. itemHeight: 5,
  629. },
  630. };
  631. chart.setOption(option);
  632. tools.loopShowTooltip(chart, option, {
  633. interval: 2000,
  634. loopSeries: true,
  635. });
  636. },
  637. aiQualityECharts2 () {
  638. let chart = echarts.init(document.getElementById("aiQuality2"));
  639. let option = {
  640. grid: {
  641. top: 35,
  642. right: 40,
  643. left: 60,
  644. bottom: 20,
  645. },
  646. tooltip: {
  647. show: true,
  648. trigger: "axis",
  649. axisPointer: {
  650. // 坐标轴指示器,坐标轴触发有效
  651. type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
  652. },
  653. },
  654. xAxis: {
  655. data: ["工程费用", "设备费用", "人员费用", "材料费用", "管理费用"],
  656. axisTick: {
  657. show: false,
  658. },
  659. // x轴的字体颜色
  660. axisLabel: {
  661. textStyle: {
  662. color: "white",
  663. },
  664. },
  665. //y轴线的颜色以及宽度
  666. axisLine: {
  667. show: true,
  668. lineStyle: {
  669. color: "#1E5389",
  670. width: 1,
  671. type: "solid",
  672. },
  673. },
  674. },
  675. yAxis: {
  676. name: '亿元',
  677. nameTextStyle: {//y轴上方单位的颜色
  678. color: '#fff',
  679. },
  680. axisTick: {
  681. lineStyle: {
  682. color: "#18416F",
  683. },
  684. },
  685. // y轴的字体颜色
  686. axisLabel: {
  687. textStyle: {
  688. color: "white",
  689. },
  690. },
  691. splitLine: {
  692. show: false,
  693. lineStyle: {
  694. color: "#204561",
  695. width: 1,
  696. type: "dotted",
  697. },
  698. },
  699. //y轴线的颜色以及宽度
  700. axisLine: {
  701. show: true,
  702. lineStyle: {
  703. color: "#1E5389",
  704. width: 1,
  705. type: "solid",
  706. },
  707. },
  708. },
  709. series: [
  710. {
  711. name: "预算金额",
  712. type: "bar",
  713. data: [843, 987, 126, 723, 569],
  714. showBackground: false,
  715. backgroundStyle: {
  716. color: "#18416F",
  717. },
  718. barWidth: "10%",
  719. itemStyle: {
  720. barBorderRadius: [10, 10, 0, 0],
  721. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  722. {
  723. offset: 0,
  724. color: "#132543",
  725. }, //柱图渐变色
  726. {
  727. offset: 1,
  728. color: "#40A9FF",
  729. },
  730. ]),
  731. },
  732. },
  733. {
  734. name: "实际金额",
  735. type: "bar",
  736. data: [675, 743, 724, 733, 725],
  737. showBackground: false,
  738. backgroundStyle: {
  739. color: "#18416F",
  740. },
  741. barWidth: "10%",
  742. itemStyle: {
  743. barBorderRadius: [10, 10, 0, 0],
  744. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  745. {
  746. offset: 0,
  747. color: "#132543",
  748. }, //柱图渐变色
  749. {
  750. offset: 1,
  751. color: "#45DAD1",
  752. },
  753. ]),
  754. },
  755. },
  756. ],
  757. legend: {
  758. data: ["预算金额", "实际金额"],
  759. textStyle: {
  760. // 图列内容样式
  761. color: "#fff", // 字体颜色
  762. // fontSize: "10",
  763. },
  764. right: 30,
  765. icon: "roundRect",
  766. // 小图标的宽高
  767. itemHeight: 5,
  768. },
  769. };
  770. chart.setOption(option);
  771. tools.loopShowTooltip(chart, option, {
  772. interval: 2000,
  773. loopSeries: true,
  774. });
  775. }
  776. },
  777. })