cokingCoalD.js 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539
  1. let app = new Vue({
  2. el: '#app',
  3. data () {
  4. return {
  5. companyList: [
  6. { name: '核心人力-1' },
  7. { name: '核心人力-2' },
  8. { name: '内部人才市场' },
  9. { name: '薪酬福利' },
  10. { name: '培训' }
  11. ],
  12. config5: {
  13. header: ["单位名称", "平均工资涨幅"],
  14. data: [
  15. ["山焦财务", "-1%"],
  16. ["山焦担保", "4%"],
  17. ["山焦股份", "6%"],
  18. ["山焦国华", "-20%"],
  19. ["山焦国华", "9%"],
  20. ["山焦财务", "-1%"],
  21. ["山焦担保", "4%"],
  22. ["山焦股份", "6%"],
  23. ["山焦国华", "-20%"],
  24. ["山焦国华", "9%"]
  25. ],
  26. align: ["center", "center", "center", "center"],
  27. headerBGC: "#153A62",
  28. oddRowBGC: "#061F42",
  29. evenRowBGC: "#0C284A",
  30. },
  31. }
  32. },
  33. mounted () {
  34. setTimeout(() => {
  35. this.budgetECharts();
  36. this.salaryECharts();
  37. this.aiQualityECharts1();
  38. this.aiQualityECharts2();
  39. })
  40. },
  41. methods: {
  42. aiQualityECharts1 () {
  43. let chart = echarts.init(document.getElementById("aiQuality1"));
  44. let option = {
  45. grid: {
  46. top: 30,
  47. right: 40,
  48. left: 75,
  49. bottom: 50,
  50. },
  51. tooltip: {
  52. show: true,
  53. trigger: "axis",
  54. axisPointer: {
  55. // 坐标轴指示器,坐标轴触发有效
  56. type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
  57. },
  58. },
  59. xAxis: {
  60. data: ["集团本部", "山焦财务", "山焦担保", "山焦股份", "山焦国华", "山焦机电", "山焦人力", "山焦民爆", "山焦事业", "山焦投资"],
  61. axisTick: {
  62. show: false,
  63. },
  64. // x轴的字体颜色
  65. axisLabel: {
  66. interval: 0,
  67. rotate: 40,
  68. textStyle: {
  69. color: "white",
  70. },
  71. },
  72. //y轴线的颜色以及宽度
  73. axisLine: {
  74. show: true,
  75. lineStyle: {
  76. color: "#1E5389",
  77. width: 1,
  78. type: "solid",
  79. },
  80. },
  81. },
  82. yAxis: {
  83. name: "单位吨:工",
  84. nameTextStyle: {//y轴上方单位的颜色
  85. color: '#fff',
  86. },
  87. axisTick: {
  88. lineStyle: {
  89. color: "#18416F",
  90. },
  91. },
  92. // y轴的字体颜色
  93. axisLabel: {
  94. textStyle: {
  95. color: "white",
  96. },
  97. },
  98. splitLine: {
  99. show: true,
  100. lineStyle: {
  101. color: "#204561",
  102. width: 1,
  103. type: "dotted",
  104. },
  105. },
  106. //y轴线的颜色以及宽度
  107. axisLine: {
  108. show: true,
  109. lineStyle: {
  110. color: "#1E5389",
  111. width: 1,
  112. type: "solid",
  113. },
  114. },
  115. },
  116. series: [
  117. {
  118. name: "",
  119. type: "bar",
  120. data: [1200, 680, 562, 268, 717, 843, 987, 126, 723, 569],
  121. showBackground: true,
  122. backgroundStyle: {
  123. color: "#18416F",
  124. },
  125. barWidth: "10%",
  126. itemStyle: {
  127. barBorderRadius: [10, 10, 0, 0],
  128. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  129. {
  130. offset: 0,
  131. color: "#13445D",
  132. }, //柱图渐变色
  133. {
  134. offset: 1,
  135. color: "#45DAD1",
  136. },
  137. ]),
  138. },
  139. }
  140. ],
  141. legend: {
  142. data: ["入池人数", "出池人数"],
  143. textStyle: {
  144. // 图列内容样式
  145. color: "#fff", // 字体颜色
  146. // fontSize: "10",
  147. },
  148. right: 30,
  149. icon: "roundRect",
  150. // 小图标的宽高
  151. itemHeight: 5,
  152. },
  153. };
  154. chart.setOption(option);
  155. tools.loopShowTooltip(chart, option, {
  156. nterval: 2000,
  157. loopSeries: true,
  158. });
  159. },
  160. aiQualityECharts2 () {
  161. let chart = echarts.init(document.getElementById("aiQuality2"));
  162. let option = {
  163. grid: {
  164. top: 30,
  165. right: 40,
  166. left: 75,
  167. bottom: 50,
  168. },
  169. tooltip: {
  170. show: true,
  171. trigger: "axis",
  172. axisPointer: {
  173. // 坐标轴指示器,坐标轴触发有效
  174. type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
  175. },
  176. },
  177. xAxis: {
  178. data: ["集团本部", "山焦财务", "山焦担保", "山焦股份", "山焦国华", "山焦机电", "山焦人力", "山焦民爆", "山焦事业", "山焦投资"],
  179. axisTick: {
  180. show: false,
  181. },
  182. // x轴的字体颜色
  183. axisLabel: {
  184. interval: 0,
  185. rotate: 40,
  186. textStyle: {
  187. color: "white",
  188. },
  189. },
  190. //y轴线的颜色以及宽度
  191. axisLine: {
  192. show: true,
  193. lineStyle: {
  194. color: "#1E5389",
  195. width: 1,
  196. type: "solid",
  197. },
  198. },
  199. },
  200. yAxis: {
  201. name: "单位吨:人",
  202. nameTextStyle: {//y轴上方单位的颜色
  203. color: '#fff'
  204. },
  205. axisTick: {
  206. lineStyle: {
  207. color: "#18416F",
  208. },
  209. },
  210. // y轴的字体颜色
  211. axisLabel: {
  212. textStyle: {
  213. color: "white",
  214. },
  215. },
  216. splitLine: {
  217. show: true,
  218. lineStyle: {
  219. color: "#204561",
  220. width: 1,
  221. type: "dotted",
  222. },
  223. },
  224. //y轴线的颜色以及宽度
  225. axisLine: {
  226. show: true,
  227. lineStyle: {
  228. color: "#1E5389",
  229. width: 1,
  230. type: "solid",
  231. },
  232. },
  233. },
  234. series: [
  235. {
  236. name: "",
  237. type: "bar",
  238. data: [1200, 680, 562, 268, 717, 843, 987, 126, 723, 569],
  239. showBackground: true,
  240. backgroundStyle: {
  241. color: "#18416F",
  242. },
  243. barWidth: "10%",
  244. itemStyle: {
  245. barBorderRadius: [10, 10, 0, 0],
  246. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  247. {
  248. offset: 0,
  249. color: "#02355C",
  250. }, //柱图渐变色
  251. {
  252. offset: 1,
  253. color: "#40A9FF",
  254. },
  255. ]),
  256. },
  257. }
  258. ],
  259. legend: {
  260. data: ["入池人数", "出池人数"],
  261. textStyle: {
  262. // 图列内容样式
  263. color: "#fff", // 字体颜色
  264. // fontSize: "10",
  265. },
  266. right: 30,
  267. icon: "roundRect",
  268. // 小图标的宽高
  269. itemHeight: 5,
  270. },
  271. };
  272. chart.setOption(option);
  273. tools.loopShowTooltip(chart, option, {
  274. nterval: 2000,
  275. loopSeries: true,
  276. });
  277. },
  278. budgetECharts () {
  279. let chart = echarts.init(document.getElementById("budget"));
  280. let option = {
  281. grid: {
  282. top: 35,
  283. right: 40,
  284. left: 60,
  285. bottom: 50,
  286. },
  287. tooltip: {
  288. show: true,
  289. trigger: "axis",
  290. axisPointer: {
  291. lineStyle: {
  292. color: "#ddd",
  293. },
  294. },
  295. },
  296. legend: {
  297. textStyle: {
  298. // 图列内容样式
  299. color: "#fff", // 字体颜色
  300. // fontSize: "10",
  301. },
  302. right: 30,
  303. icon: "roundRect",
  304. // 小图标的宽高
  305. itemHeight: 5,
  306. },
  307. xAxis: {
  308. type: "category",
  309. data: ["集团公司", "山焦西山", "山焦汾西", "山焦霍州", '山焦山煤', '山焦华晋', '山焦焦化', '山焦民爆'],
  310. boundaryGap: false,
  311. splitLine: {
  312. show: false,
  313. interval: "auto",
  314. },
  315. axisTick: {
  316. show: false,
  317. },
  318. axisLine: {
  319. lineStyle: {
  320. color: "#7ECEF4",
  321. },
  322. },
  323. axisLabel: {
  324. interval: 0,
  325. rotate: 40,
  326. margin: 10,
  327. textStyle: {
  328. // fontSize: 10,
  329. color: "#fff",
  330. },
  331. },
  332. },
  333. yAxis: {
  334. type: "value",
  335. splitLine: {
  336. show: true,
  337. lineStyle: {
  338. color: "#204561",
  339. width: 1,
  340. type: "dotted",
  341. },
  342. },
  343. axisTick: {
  344. show: false,
  345. },
  346. axisLine: {
  347. lineStyle: {
  348. color: "#7ECEF4",
  349. },
  350. },
  351. axisLabel: {
  352. margin: 10,
  353. textStyle: {
  354. fontSize: 10,
  355. color: "#fff",
  356. },
  357. },
  358. },
  359. series: [
  360. {
  361. name: "",
  362. type: "line",
  363. smooth: false,
  364. showSymbol: false,
  365. symbol: "circle",
  366. symbolSize: 6,
  367. data: ["1100", "400", "608", "811", '358', '698', '125', '765'],
  368. areaStyle: {
  369. normal: {
  370. color: new echarts.graphic.LinearGradient(
  371. 0,
  372. 0,
  373. 0,
  374. 1,
  375. [
  376. {
  377. offset: 0,
  378. color: "#40A9FF",
  379. },
  380. {
  381. offset: 1,
  382. color: "#051F41",
  383. },
  384. ],
  385. false
  386. ),
  387. },
  388. },
  389. itemStyle: {
  390. normal: {
  391. color: "#40A9FF",
  392. },
  393. },
  394. lineStyle: {
  395. normal: {
  396. width: 2,
  397. },
  398. },
  399. }
  400. ],
  401. };
  402. chart.setOption(option);
  403. tools.loopShowTooltip(chart, option, {
  404. nterval: 2000,
  405. loopSeries: true,
  406. });
  407. },
  408. salaryECharts () {
  409. let chart = echarts.init(document.getElementById("salary"));
  410. let option = {
  411. grid: {
  412. top: 35,
  413. right: 40,
  414. left: 60,
  415. bottom: 50,
  416. },
  417. tooltip: {
  418. show: true,
  419. trigger: "axis",
  420. axisPointer: {
  421. lineStyle: {
  422. color: "#ddd",
  423. },
  424. },
  425. },
  426. legend: {
  427. textStyle: {
  428. // 图列内容样式
  429. color: "#fff", // 字体颜色
  430. // fontSize: "10",
  431. },
  432. right: 30,
  433. icon: "roundRect",
  434. // 小图标的宽高
  435. itemHeight: 5,
  436. },
  437. xAxis: {
  438. type: "category",
  439. data: ["集团公司", "山焦西山", "山焦汾西", "山焦霍州", '山焦山煤', '山焦华晋', '山焦焦化', '山焦民爆'],
  440. boundaryGap: false,
  441. splitLine: {
  442. show: false,
  443. interval: "auto",
  444. },
  445. axisTick: {
  446. show: false,
  447. },
  448. axisLine: {
  449. lineStyle: {
  450. color: "#7ECEF4",
  451. },
  452. },
  453. axisLabel: {
  454. interval: 0,
  455. rotate: 40,
  456. margin: 10,
  457. textStyle: {
  458. // fontSize: 10,
  459. color: "#fff",
  460. },
  461. },
  462. },
  463. yAxis: {
  464. type: "value",
  465. splitLine: {
  466. show: true,
  467. lineStyle: {
  468. color: "#204561",
  469. width: 1,
  470. type: "dotted",
  471. },
  472. },
  473. axisTick: {
  474. show: false,
  475. },
  476. axisLine: {
  477. lineStyle: {
  478. color: "#7ECEF4",
  479. },
  480. },
  481. axisLabel: {
  482. margin: 10,
  483. textStyle: {
  484. fontSize: 10,
  485. color: "#fff",
  486. },
  487. },
  488. },
  489. series: [
  490. {
  491. name: "",
  492. type: "line",
  493. smooth: false,
  494. showSymbol: false,
  495. symbol: "circle",
  496. symbolSize: 6,
  497. data: ['8000', '5000', '3500', '9000', '6000', '18000', '7500', '4500'],
  498. areaStyle: {
  499. normal: {
  500. color: new echarts.graphic.LinearGradient(
  501. 0,
  502. 0,
  503. 0,
  504. 1,
  505. [
  506. {
  507. offset: 0,
  508. color: "#45DAD1",
  509. },
  510. {
  511. offset: 1,
  512. color: "#051F41",
  513. },
  514. ],
  515. false
  516. ),
  517. },
  518. },
  519. itemStyle: {
  520. normal: {
  521. color: "#45DAD1",
  522. },
  523. },
  524. lineStyle: {
  525. normal: {
  526. width: 2,
  527. },
  528. },
  529. }
  530. ],
  531. };
  532. chart.setOption(option);
  533. tools.loopShowTooltip(chart, option, {
  534. nterval: 2000,
  535. loopSeries: true,
  536. });
  537. },
  538. },
  539. })