cokingCoalC.js 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  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. }
  13. },
  14. mounted () {
  15. setTimeout(() => {
  16. this.aiQualityECharts();
  17. });
  18. },
  19. methods: {
  20. aiQualityECharts () {
  21. let chart = echarts.init(document.getElementById("aiQuality"));
  22. let option = {
  23. grid: {
  24. top: 35,
  25. right: 40,
  26. left: 60,
  27. bottom: 20,
  28. },
  29. tooltip: {
  30. show: true,
  31. trigger: "axis",
  32. axisPointer: {
  33. // 坐标轴指示器,坐标轴触发有效
  34. type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
  35. },
  36. },
  37. xAxis: {
  38. data: ["集团本部", "山焦财务", "山焦担保", "山焦股份", "山焦国华", "山焦机电", "山焦人力", "山焦民爆", "山焦事业", "山焦投资"],
  39. axisTick: {
  40. show: false,
  41. },
  42. // x轴的字体颜色
  43. axisLabel: {
  44. textStyle: {
  45. color: "white",
  46. },
  47. },
  48. //y轴线的颜色以及宽度
  49. axisLine: {
  50. show: true,
  51. lineStyle: {
  52. color: "#1E5389",
  53. width: 1,
  54. type: "solid",
  55. },
  56. },
  57. },
  58. yAxis: {
  59. axisTick: {
  60. lineStyle: {
  61. color: "#18416F",
  62. },
  63. },
  64. // y轴的字体颜色
  65. axisLabel: {
  66. textStyle: {
  67. color: "white",
  68. },
  69. },
  70. splitLine: {
  71. show: true,
  72. lineStyle: {
  73. color: "#204561",
  74. width: 1,
  75. type: "dotted",
  76. },
  77. },
  78. //y轴线的颜色以及宽度
  79. axisLine: {
  80. show: true,
  81. lineStyle: {
  82. color: "#1E5389",
  83. width: 1,
  84. type: "solid",
  85. },
  86. },
  87. },
  88. series: [
  89. {
  90. name: "入池人数",
  91. type: "bar",
  92. data: [1200, 680, 562, 268, 717, 843, 987, 126, 723, 569],
  93. showBackground: true,
  94. backgroundStyle: {
  95. color: "#18416F",
  96. },
  97. barWidth: "10%",
  98. itemStyle: {
  99. barBorderRadius: [10, 10, 0, 0],
  100. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  101. {
  102. offset: 0,
  103. color: "#00F4FD",
  104. }, //柱图渐变色
  105. {
  106. offset: 1,
  107. color: "#061C4F",
  108. },
  109. ]),
  110. },
  111. },
  112. {
  113. name: "出池人数",
  114. type: "bar",
  115. data: [658, 1125, 658, 999, 643, 675, 743, 724, 733, 725],
  116. showBackground: true,
  117. backgroundStyle: {
  118. color: "#18416F",
  119. },
  120. barWidth: "10%",
  121. itemStyle: {
  122. barBorderRadius: [10, 10, 0, 0],
  123. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  124. {
  125. offset: 0,
  126. color: "#F55002",
  127. }, //柱图渐变色
  128. {
  129. offset: 1,
  130. color: "#0B0243",
  131. },
  132. ]),
  133. },
  134. },
  135. ],
  136. legend: {
  137. data: ["入池人数", "出池人数"],
  138. textStyle: {
  139. // 图列内容样式
  140. color: "#fff", // 字体颜色
  141. // fontSize: "10",
  142. },
  143. right: 30,
  144. icon: "roundRect",
  145. // 小图标的宽高
  146. itemHeight: 5,
  147. },
  148. };
  149. chart.setOption(option);
  150. tools.loopShowTooltip(chart, option, {
  151. nterval: 2000,
  152. loopSeries: true,
  153. });
  154. }
  155. },
  156. })