cokingCoalA.js 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451
  1. let app = new Vue({
  2. el: '#app',
  3. data () {
  4. return {
  5. year: '2022',
  6. storageRecordConfig: {
  7. header: ['项目名称', '投资金额', '所属产业', '项目进度', '完成比例'],
  8. headerBGC: '#05507b33',
  9. oddRowBGC: '#69c0ff0f',
  10. evenRowBGC: '',
  11. headerHeight: '40',
  12. rowNum: 4,
  13. align: ['center'],
  14. data: [
  15. ['工程建设项目', '21.2亿', '煤炭', '终止', '2.3%'],
  16. ['工程建设项目', '21.2亿', '煤炭', '退出', '2.3%'],
  17. ['工程建设项目', '21.2亿', '煤炭', '进行中', '2.3%'],
  18. ['工程建设项目', '21.2亿', '煤炭', '进行中', '2.3%'],
  19. ['工程建设项目', '21.2亿', '煤炭', '进行中', '2.3%'],
  20. ['工程建设项目', '21.2亿', '煤炭', '进行中', '2.3%'],
  21. ],
  22. },
  23. storageRecordConfig2: {
  24. header: ['项目名称', '投资金额', '所属产业', '项目进度', '完成比例'],
  25. headerBGC: '#05507b33',
  26. oddRowBGC: '#05507b33',
  27. evenRowBGC: '',
  28. headerHeight: '40',
  29. rowNum: 4,
  30. align: ['center'],
  31. data: [
  32. ['工程建设项目', '21.2亿', '煤炭', '终止', '2.3%'],
  33. ['工程建设项目', '21.2亿', '煤炭', '退出', '2.3%'],
  34. ['工程建设项目', '21.2亿', '煤炭', '进行中', '2.3%'],
  35. ['工程建设项目', '21.2亿', '煤炭', '进行中', '2.3%'],
  36. ['工程建设项目', '21.2亿', '煤炭', '进行中', '2.3%'],
  37. ['工程建设项目', '21.2亿', '煤炭', '进行中', '2.3%'],
  38. ],
  39. },
  40. companyList: [
  41. { name: '核心人力-1' },
  42. { name: '核心人力-2' },
  43. { name: '内部人才市场' },
  44. { name: '薪酬福利' },
  45. { name: '培训' }
  46. ],
  47. }
  48. },
  49. mounted () {
  50. // 左侧图表
  51. // this.initChartL1()
  52. // this.initChartL2()
  53. // this.initChartR1()
  54. setTimeout(() => {
  55. this.aiQualityECharts();
  56. });
  57. },
  58. methods: {
  59. aiQualityECharts () {
  60. let chart = echarts.init(document.getElementById("aiQuality"));
  61. let option = {
  62. grid: {
  63. top: 35,
  64. right: 40,
  65. left: 60,
  66. bottom: 20,
  67. },
  68. tooltip: {
  69. show: true,
  70. trigger: "axis",
  71. axisPointer: {
  72. // 坐标轴指示器,坐标轴触发有效
  73. type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
  74. },
  75. },
  76. xAxis: {
  77. data: ["集团本部", "山焦财务", "山焦担保", "山焦股份", "山焦国华", "山焦机电", "山焦人力", "山焦民爆", "山焦事业", "山焦投资"],
  78. axisTick: {
  79. show: false,
  80. },
  81. // x轴的字体颜色
  82. axisLabel: {
  83. textStyle: {
  84. color: "white",
  85. },
  86. },
  87. //y轴线的颜色以及宽度
  88. axisLine: {
  89. show: true,
  90. lineStyle: {
  91. color: "#1E5389",
  92. width: 1,
  93. type: "solid",
  94. },
  95. },
  96. },
  97. yAxis: {
  98. axisTick: {
  99. lineStyle: {
  100. color: "#18416F",
  101. },
  102. },
  103. // y轴的字体颜色
  104. axisLabel: {
  105. textStyle: {
  106. color: "white",
  107. },
  108. },
  109. splitLine: {
  110. show: true,
  111. lineStyle: {
  112. color: "#204561",
  113. width: 1,
  114. type: "dotted",
  115. },
  116. },
  117. //y轴线的颜色以及宽度
  118. axisLine: {
  119. show: true,
  120. lineStyle: {
  121. color: "#1E5389",
  122. width: 1,
  123. type: "solid",
  124. },
  125. },
  126. },
  127. series: [
  128. {
  129. name: "入池人数",
  130. type: "bar",
  131. data: [1200, 680, 562, 268, 717, 843, 987, 126, 723, 569],
  132. showBackground: true,
  133. backgroundStyle: {
  134. color: "#18416F",
  135. },
  136. barWidth: "10%",
  137. itemStyle: {
  138. barBorderRadius: [10, 10, 0, 0],
  139. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  140. {
  141. offset: 0,
  142. color: "#00F4FD",
  143. }, //柱图渐变色
  144. {
  145. offset: 1,
  146. color: "#061C4F",
  147. },
  148. ]),
  149. },
  150. },
  151. {
  152. name: "出池人数",
  153. type: "bar",
  154. data: [658, 1125, 658, 999, 643, 675, 743, 724, 733, 725],
  155. showBackground: true,
  156. backgroundStyle: {
  157. color: "#18416F",
  158. },
  159. barWidth: "10%",
  160. itemStyle: {
  161. barBorderRadius: [10, 10, 0, 0],
  162. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  163. {
  164. offset: 0,
  165. color: "#F55002",
  166. }, //柱图渐变色
  167. {
  168. offset: 1,
  169. color: "#0B0243",
  170. },
  171. ]),
  172. },
  173. },
  174. ],
  175. legend: {
  176. data: ["入池人数", "出池人数"],
  177. textStyle: {
  178. // 图列内容样式
  179. color: "#fff", // 字体颜色
  180. // fontSize: "10",
  181. },
  182. right: 30,
  183. icon: "roundRect",
  184. // 小图标的宽高
  185. itemHeight: 5,
  186. },
  187. };
  188. chart.setOption(option);
  189. tools.loopShowTooltip(chart, option, {
  190. nterval: 2000,
  191. loopSeries: true,
  192. });
  193. },
  194. initChartL1 () {
  195. let myChart = echarts.init(this.$refs['echartL1'])
  196. let option = {
  197. grid: {
  198. left: '10%',
  199. top: '18%',
  200. bottom: '12%',
  201. right: '8%',
  202. },
  203. tooltip: {
  204. trigger: 'axis',
  205. axisPointer: {
  206. type: 'shadow',
  207. },
  208. },
  209. xAxis: {
  210. data: ['2018年', '2019年', '2020年', '2021年', '2022年', '2023年'],
  211. axisLine: {
  212. show: true, //隐藏X轴轴线
  213. lineStyle: {
  214. color: '#3D7495',
  215. width: 1,
  216. },
  217. },
  218. axisTick: {
  219. show: false, //隐藏X轴刻度
  220. },
  221. axisLabel: {
  222. show: true,
  223. textStyle: {
  224. color: 'rgba(255,255,255,0.6)', //X轴文字颜色
  225. },
  226. },
  227. },
  228. yAxis: [
  229. {
  230. type: 'value',
  231. name: '亿元',
  232. nameTextStyle: {
  233. color: '#FFF',
  234. },
  235. splitLine: {
  236. show: true,
  237. lineStyle: {
  238. color: '#68b4dd66',
  239. type: 'dashed',
  240. },
  241. },
  242. axisLine: {
  243. show: true,
  244. lineStyle: {
  245. color: '#3D7495'
  246. }
  247. },
  248. axisLabel: {
  249. show: true,
  250. textStyle: {
  251. color: 'rgba(250,250,250,0.6)',
  252. },
  253. },
  254. }
  255. ],
  256. series: [
  257. {
  258. type: 'pictorialBar',
  259. barCategoryGap: '0%',
  260. symbol: 'path://M0,10 L10,10 C5.5,10 5.5,5 5,0 C4.5,5 4.5,10 0,10 z',
  261. label: {
  262. show: true,
  263. position: 'top',
  264. distance: 5,
  265. color: '#08DFFE',
  266. fontSize: 12,
  267. },
  268. itemStyle: {
  269. normal: {
  270. color: {
  271. type: 'linear',
  272. x: 0,
  273. y: 0,
  274. x2: 0,
  275. y2: 1,
  276. colorStops: [
  277. {
  278. offset: 0,
  279. color: '#9A11FF',
  280. },
  281. {
  282. offset: 1,
  283. color: '#08DFFE',
  284. },
  285. ],
  286. global: false, // 缺省为 false
  287. },
  288. },
  289. emphasis: {
  290. opacity: 1,
  291. },
  292. },
  293. data: [123, 60, 25, 18, 12, 9],
  294. },
  295. ],
  296. }
  297. myChart.setOption(option)
  298. },
  299. initChartL2 () {
  300. let myChart = echarts.init(this.$refs['echartL2'])
  301. let option = {
  302. tooltip: {
  303. trigger: 'axis',
  304. axisPointer: {
  305. type: 'shadow',
  306. },
  307. },
  308. grid: {
  309. top: '16%',
  310. right: '3%',
  311. left: '10%',
  312. bottom: '10%',
  313. },
  314. legend: {
  315. top: '1',
  316. right: '10',
  317. textStyle: {
  318. color: 'rgba(250,250,250,0.6)',
  319. },
  320. },
  321. xAxis: {
  322. data: ['山西焦煤', '山西文旅', '潞安化工', '晋能控股', '山西建投'],
  323. axisLine: {
  324. show: true, //隐藏X轴轴线
  325. lineStyle: {
  326. color: '#005094',
  327. width: 1,
  328. },
  329. },
  330. axisTick: {
  331. show: false, //隐藏X轴刻度
  332. },
  333. axisLabel: {
  334. show: true,
  335. textStyle: {
  336. color: 'rgba(255,255,255,0.6)', //X轴文字颜色
  337. },
  338. },
  339. },
  340. yAxis: [
  341. {
  342. type: 'value',
  343. nameTextStyle: {
  344. color: '#ebf8ac',
  345. },
  346. splitLine: {
  347. show: true,
  348. lineStyle: {
  349. color: '#68b4dd66',
  350. type: 'dashed',
  351. },
  352. },
  353. axisLine: {
  354. show: true,
  355. lineStyle: {
  356. color: '#3D7495'
  357. }
  358. },
  359. axisLabel: {
  360. show: true,
  361. textStyle: {
  362. color: 'rgba(250,250,250,0.6)',
  363. },
  364. },
  365. },
  366. ],
  367. series: [
  368. {
  369. name: '计划投资',
  370. type: 'bar',
  371. barWidth: 15,
  372. itemStyle: {
  373. normal: {
  374. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  375. {
  376. offset: 0,
  377. color: '#69c0ff',
  378. },
  379. {
  380. offset: 1,
  381. color: '#082550',
  382. },
  383. ]),
  384. },
  385. },
  386. data: [900, 600, 500, 450, 500],
  387. },
  388. {
  389. name: '实际投资',
  390. type: 'bar',
  391. barWidth: 15,
  392. itemStyle: {
  393. normal: {
  394. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  395. {
  396. offset: 0,
  397. color: '#957DFF',
  398. },
  399. {
  400. offset: 1,
  401. color: '#082550',
  402. },
  403. ]),
  404. },
  405. },
  406. data: [500, 900, 600, 800, 450],
  407. },
  408. ],
  409. }
  410. myChart.setOption(option)
  411. },
  412. initChartR1 () {
  413. let myChart = echarts.init(this.$refs['echartR1'])
  414. let option = {
  415. tooltip: {
  416. trigger: 'item'
  417. },
  418. legend: {
  419. top: 'center',
  420. orient: 'vertical',
  421. right: '2%',
  422. textStyle: {
  423. color: '#9DB9EB'
  424. }
  425. },
  426. series: [
  427. {
  428. name: '',
  429. type: 'pie',
  430. radius: ['55%', '80%'],
  431. labelLine: {
  432. normal: {
  433. lineStyle: {
  434. width: 1
  435. }
  436. }
  437. },
  438. data: [
  439. { value: 1048, name: '煤炭' },
  440. { value: 735, name: '火电' },
  441. { value: 580, name: '焦化' },
  442. { value: 484, name: '风电' },
  443. ]
  444. }
  445. ]
  446. }
  447. myChart.setOption(option)
  448. },
  449. },
  450. })