index2.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639
  1. let barImg =
  2. 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAtCAYAAAA6GuKaAAAAAXNSR0IArs4c6QAADNRJREFUaEPNmXmQFNd9x9/Zr3u6Z2ZndzkiLeYwYhctJUtgC8GGQ46MBLYsjAURQnKSckWKkz+SkuWUnarElqtSsV2W/Kccq+Kq6EIFGAwpEEFSWIRYgQKSIrFiF3EsBskcuztX3+/oVPfMLMMesKxklbtq6tXMTk9/+rff/v6OB8HEDzjxU4fOjCbyGxO5cP05Ezm/xlkPfF3w13PRsWAhAMurfytX1nb/8ne79SpQurp2xutYwOOCHy907Xt1awxahkOAQQCBEJXX8IOQCMQvxipQyY3EN3HFDdSArwk+HuhRgBcgMLuIEgDXxcnKc5X3Mqis9QdmKnlL85U1lZLJeiK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2/2+HaxrEStyguKlGpqWvvtq/3C4L7jb+7cLHmQn0iVV+1i6tqsa9TTbXesWssamhfHEechhyPq6fZFN589eqgnsPMlqerqaUbB9LgsLfTv6z348oTr6VrbVfXs8XcubXesur8S8Te3DO9coigxjCjuXOIMKDl3KNXwjHmL13qF/td7D+7c+kk6l+G94nX1iG3L7l1rZBqX9r1/4DnPdcTwHjGSQkgpgrhHnNW+6CG3PLivZ/+OLSJwyp+0R6yPNgBgjG48HtJEyBjZjd+3LpWbvPzEkb1P+3bBH9GNWznz8wvufMTJX+js2bd906fVjY/SmV/f3OMLX1n/52Zu6p/1du18slw4X6rNPazcDdm2xSsft/O/3/Penpc2RZx7inP305p7XBv8GhOm21f/zYZU4+R7jnZu/WH+/Kn+xj+ZNbl92Zof2QPndx3e/qsX/xATplqBM2ysUPdgjjLLIxFm8dCxNstb8uD3vmU1T763790D/zbj1o5/Kg9c2P7GCz9/DgEVCiDDeBgpPuVZ3tXBxzs1fej7q3JTp6/Lnz+zaf/zP9n1WUxNRwO/nHhqk6d4mD58Ps20eKg+cj6NqQRBOHI+HQ/XhyZJya7AJ5pPjwF+9Z0AS48LJpnIq34nAEAc2X4oP4udgDHA60Zn8TdiychmmMyu6/dbIgUBrGxfJEc8xo1n0Lg/+kPvuVwF/I97d2s4eL011mqWquP8ce0j1jesow3iR2toq3PTMXvdz2THdvjVr7YzNibpsD9cc6NztB/6f4ffQsan0xs3AAAAAElFTkSuQmCC'
  3. let app = new Vue({
  4. el: '#app',
  5. data() {
  6. return {
  7. year: '2022',
  8. config1: {
  9. number: [100],
  10. content: '{nt}个',
  11. },
  12. centerData: '',
  13. storageRecordConfig: {
  14. header: ['项目名称', '投资金额', '所属产业', '项目进度', '完成比例'],
  15. headerBGC: '#05507b33',
  16. oddRowBGC: '#69c0ff0f',
  17. evenRowBGC: '',
  18. headerHeight: '40',
  19. rowNum: 4,
  20. align: ['center'],
  21. data: [
  22. ['工程建设项目', '21.2亿', '煤炭', '终止', '2.3%'],
  23. ['工程建设项目', '21.2亿', '煤炭', '退出', '2.3%'],
  24. ['工程建设项目', '21.2亿', '煤炭', '进行中', '2.3%'],
  25. ['工程建设项目', '21.2亿', '煤炭', '进行中', '2.3%'],
  26. ['工程建设项目', '21.2亿', '煤炭', '进行中', '2.3%'],
  27. ['工程建设项目', '21.2亿', '煤炭', '进行中', '2.3%'],
  28. ],
  29. },
  30. storageRecordConfig2: {
  31. header: ['项目名称', '投资金额', '所属产业', '项目进度', '完成比例'],
  32. headerBGC: '#05507b33',
  33. oddRowBGC: '#05507b33',
  34. evenRowBGC: '',
  35. headerHeight: '40',
  36. rowNum: 4,
  37. align: ['center'],
  38. data: [
  39. ['工程建设项目', '21.2亿', '煤炭', '终止', '2.3%'],
  40. ['工程建设项目', '21.2亿', '煤炭', '退出', '2.3%'],
  41. ['工程建设项目', '21.2亿', '煤炭', '进行中', '2.3%'],
  42. ['工程建设项目', '21.2亿', '煤炭', '进行中', '2.3%'],
  43. ['工程建设项目', '21.2亿', '煤炭', '进行中', '2.3%'],
  44. ['工程建设项目', '21.2亿', '煤炭', '进行中', '2.3%'],
  45. ],
  46. },
  47. companyList: companyList,
  48. commonOption: {
  49. title: {
  50. text: 'xxx',
  51. x: 'center',
  52. y: '3%',
  53. textStyle: {
  54. color: '#69C0FF',
  55. fontSize: 24,
  56. },
  57. },
  58. tooltip: {
  59. trigger: 'axis',
  60. axisPointer: {
  61. type: 'shadow',
  62. },
  63. },
  64. grid: {
  65. top: '22%',
  66. right: '3%',
  67. left: '3%',
  68. bottom: '20%',
  69. },
  70. legend: {
  71. data: '',
  72. top: '12%',
  73. right: '10',
  74. textStyle: {
  75. color: 'rgba(250,250,250,0.6)',
  76. fontSize: 16,
  77. },
  78. },
  79. xAxis: {
  80. data: companyList.map(item => item.name),
  81. axisLine: {
  82. show: true, //隐藏X轴轴线
  83. lineStyle: {
  84. color: '#005094',
  85. width: 1,
  86. },
  87. },
  88. axisTick: {
  89. show: false, //隐藏X轴刻度
  90. },
  91. axisLabel: {
  92. show: true,
  93. rotate: 15,
  94. textStyle: {
  95. color: 'rgba(255,255,255,0.6)', //X轴文字颜色
  96. fontSize: 16,
  97. },
  98. },
  99. },
  100. yAxis: [
  101. {
  102. type: 'value',
  103. nameTextStyle: {
  104. color: '#ebf8ac',
  105. fontSize: 16,
  106. },
  107. splitLine: {
  108. show: true,
  109. lineStyle: {
  110. color: '#68b4dd66',
  111. type: 'dashed',
  112. },
  113. },
  114. axisLine: {
  115. show: false,
  116. },
  117. axisLabel: {
  118. show: true,
  119. textStyle: {
  120. color: 'rgba(250,250,250,0.6)',
  121. fontSize: 16,
  122. },
  123. },
  124. },
  125. ],
  126. },
  127. }
  128. },
  129. mounted() {
  130. this.centerData = data
  131. // 左侧图表
  132. this.initChartL1()
  133. this.initChartL2()
  134. this.initChartL3()
  135. // 中间图标
  136. this.initChartC1()
  137. this.initChartC2()
  138. // 右侧图表
  139. this.initChartR1()
  140. this.initChartR2()
  141. this.initChartR3()
  142. },
  143. methods: {
  144. numFormat(value) {
  145. if (!value) return '0'
  146. var intPart = Number(value).toFixed(0) // 获取整数部分
  147. var intPartFormat = intPart.toString()
  148. .replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') // 将整数部分逢三一断
  149. var floatPart = '.00' // 预定义小数部分
  150. var value2Array = value.toString().split('.')
  151. // =2表示数据有小数位
  152. if (value2Array.length === 2) {
  153. floatPart = value2Array[1].toString() // 拿到小数部分
  154. if (floatPart.length === 1) {
  155. // 补0
  156. return intPartFormat + '.' + floatPart + '0'
  157. } else {
  158. return intPartFormat + '.' + floatPart
  159. }
  160. } else {
  161. return intPartFormat
  162. }
  163. },
  164. // 左侧侧图表---------------------------------------------开始
  165. initChartL1() {
  166. let myChart = echarts.init(this.$refs['echartL1'])
  167. let option = {
  168. ...this.commonOption,
  169. series: [
  170. {
  171. name: '',
  172. type: 'bar',
  173. barWidth: 10,
  174. itemStyle: {
  175. normal: {
  176. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  177. {
  178. offset: 0,
  179. color: '#69c0ff',
  180. },
  181. {
  182. offset: 1,
  183. color: '#082550',
  184. },
  185. ]),
  186. },
  187. },
  188. data: [16, 14, 16, 12, 15, 12, 17],
  189. },
  190. {
  191. data: [16, 14, 16, 12, 15, 12, 17],
  192. type: 'pictorialBar',
  193. barMaxWidth: '20',
  194. symbolPosition: 'end',
  195. symbol: 'image://' + barImg,
  196. symbolOffset: ['0', '-25'],
  197. symbolSize: [35, 35],
  198. zlevel: 2,
  199. },
  200. ],
  201. }
  202. option.title.text = '当前各二级企业本部机构数'
  203. myChart.setOption(option)
  204. },
  205. initChartL2() {
  206. let myChart = echarts.init(this.$refs['echartL2'])
  207. let option = {
  208. ...this.commonOption,
  209. series: [
  210. {
  211. name: '人数',
  212. type: 'line',
  213. yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
  214. smooth: true, //平滑曲线显示
  215. showAllSymbol: true, //显示所有图形。
  216. symbol: 'circle', //标记的图形为实心圆
  217. symbolSize: 8, //标记的大小
  218. smooth: false,
  219. itemStyle: {
  220. //折线拐点标志的样式
  221. color: '#69c0ff',
  222. borderColor: '#69c0ff',
  223. width: 2,
  224. shadowColor: '#69c0ff',
  225. shadowBlur: 4,
  226. },
  227. lineStyle: {
  228. color: '#69c0ff',
  229. width: 2,
  230. },
  231. areaStyle: {
  232. //区域填充样式
  233. normal: {
  234. color: new echarts.graphic.LinearGradient(
  235. 0,
  236. 0,
  237. 0,
  238. 1,
  239. [
  240. {
  241. offset: 0,
  242. color: '#69c0ff',
  243. },
  244. {
  245. offset: 1,
  246. color: 'rgba(0,0,0,0)',
  247. },
  248. ],
  249. false
  250. ),
  251. },
  252. },
  253. data: [60, 50, 40, 90, 30, 55, 40, 20, 50, 40, 40, 55, 40, 30, 50, 40, 35, 40],
  254. }
  255. ],
  256. }
  257. option.title.text = '当前各二级企业中层管理人员人数'
  258. option.legend.data = ['人数']
  259. option.yAxis.push({
  260. splitLine: {
  261. show: false,
  262. },
  263. axisLine: {
  264. show: false,
  265. },
  266. })
  267. myChart.setOption(option)
  268. },
  269. initChartL3() {
  270. let myChart = echarts.init(this.$refs['echartL3'])
  271. let option = {
  272. ...this.commonOption,
  273. series: [
  274. {
  275. name: '',
  276. type: 'bar',
  277. barWidth: 10,
  278. itemStyle: {
  279. normal: {
  280. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  281. {
  282. offset: 0,
  283. color: '#43ede3',
  284. },
  285. {
  286. offset: 1,
  287. color: '#082550',
  288. },
  289. ]),
  290. },
  291. },
  292. data: [50, 40, 60, 20, 45, 30, 60, 40, 45, 40, 50, 20, 60, 80, 45, 70, 50, 40],
  293. },
  294. {
  295. data: [50, 40, 60, 20, 45, 30, 60, 40, 45, 40, 50, 20, 60, 80, 45, 70, 50, 40],
  296. type: 'pictorialBar',
  297. barMaxWidth: '20',
  298. symbolPosition: 'end',
  299. symbol: 'image://' + barImg,
  300. symbolOffset: ['0', '-25'],
  301. symbolSize: [35, 35],
  302. zlevel: 2,
  303. },
  304. ],
  305. }
  306. option.title.text = '当前各二级企业本部员额数'
  307. myChart.setOption(option)
  308. },
  309. // 中间图表---------------------------------------------开始
  310. initChartC1() {
  311. let myChart = echarts.init(this.$refs['echartC1'])
  312. let option = {
  313. ..._.cloneDeep(this.commonOption),
  314. series: [
  315. {
  316. name: '全员劳动生产率',
  317. type: 'line',
  318. yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
  319. smooth: true, //平滑曲线显示
  320. showAllSymbol: true, //显示所有图形。
  321. symbol: 'circle', //标记的图形为实心圆
  322. symbolSize: 8, //标记的大小
  323. smooth: false,
  324. itemStyle: {
  325. //折线拐点标志的样式
  326. color: '#B889EA',
  327. borderColor: '#B889EA',
  328. width: 2,
  329. shadowColor: '#B889EA',
  330. shadowBlur: 4,
  331. },
  332. lineStyle: {
  333. color: '#B889EA',
  334. width: 2,
  335. },
  336. data: [60, 50, 80, 80, 90, 55, 40, 60, 50, 80, 90, 55, 40, 60, 50, 90, 55, 40],
  337. },
  338. {
  339. name: '全员劳动生产率同比',
  340. type: 'bar',
  341. barWidth: 15,
  342. itemStyle: {
  343. normal: {
  344. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  345. {
  346. offset: 0,
  347. color: '#69c0ff',
  348. },
  349. {
  350. offset: 1,
  351. color: '#082550',
  352. },
  353. ]),
  354. },
  355. },
  356. data: [50, 40, 60, 20, 45, 30, 60, 100, 45, 40, 50, 20, 60, 80, 45, 70, 50, 40],
  357. },
  358. ],
  359. }
  360. option.title.text = '各集团全员劳动生产率情况'
  361. option.legend.data = ['全员劳动生产率同比', '全员劳动生产率']
  362. option.legend.show = true
  363. option.yAxis.push({
  364. splitLine: {
  365. show: false,
  366. },
  367. axisLine: {
  368. show: false,
  369. },
  370. })
  371. myChart.setOption(option)
  372. },
  373. initChartC2() {
  374. let myChart = echarts.init(this.$refs['echartC2'])
  375. let option = {
  376. ..._.cloneDeep(this.commonOption),
  377. series: [
  378. {
  379. name: '计划招聘数',
  380. type: 'line',
  381. yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
  382. smooth: true, //平滑曲线显示
  383. showAllSymbol: true, //显示所有图形。
  384. symbol: 'circle', //标记的图形为实心圆
  385. symbolSize: 8, //标记的大小
  386. smooth: false,
  387. itemStyle: {
  388. //折线拐点标志的样式
  389. color: '#B889EA',
  390. borderColor: '#B889EA',
  391. width: 2,
  392. shadowColor: '#B889EA',
  393. shadowBlur: 4,
  394. },
  395. lineStyle: {
  396. color: '#B889EA',
  397. width: 2,
  398. },
  399. data: [60, 50, 80, 80, 90, 55, 40, 60, 50, 80, 90, 55, 40, 60, 50, 90, 55, 40],
  400. },
  401. {
  402. name: '年利润亿元',
  403. type: 'bar',
  404. barWidth: 15,
  405. itemStyle: {
  406. normal: {
  407. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  408. {
  409. offset: 0,
  410. color: '#69c0ff',
  411. },
  412. {
  413. offset: 1,
  414. color: '#082550',
  415. },
  416. ]),
  417. },
  418. },
  419. data: [50, 40, 60, 20, 45, 30, 60, 100, 45, 40, 50, 20, 60, 80, 45, 70, 50, 40],
  420. },
  421. ],
  422. }
  423. option.title.text = '各省属企业年利润与当前计划招聘人数'
  424. option.legend.data = ['年利润亿元', '计划招聘数']
  425. option.legend.show = true
  426. option.yAxis.push({
  427. splitLine: {
  428. show: false,
  429. },
  430. axisLine: {
  431. show: false,
  432. },
  433. })
  434. myChart.setOption(option)
  435. },
  436. // 右侧图表---------------------------------------------开始
  437. initChartR1() {
  438. let myChart = echarts.init(this.$refs['echartR1'])
  439. let option = {
  440. ...this.commonOption,
  441. series: [
  442. {
  443. name: '公开招聘数',
  444. type: 'line',
  445. yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
  446. smooth: true, //平滑曲线显示
  447. showAllSymbol: true, //显示所有图形。
  448. symbol: 'circle', //标记的图形为实心圆
  449. symbolSize: 8, //标记的大小
  450. smooth: false,
  451. itemStyle: {
  452. //折线拐点标志的样式
  453. color: '#B889EA',
  454. borderColor: '#B889EA',
  455. width: 2,
  456. shadowColor: '#B889EA',
  457. shadowBlur: 4,
  458. },
  459. lineStyle: {
  460. color: '#B889EA',
  461. width: 2,
  462. },
  463. data: [60, 50, 80, 80, 90, 55, 40, 60, 50, 80, 90, 55, 40, 60, 50, 90, 55, 40],
  464. },
  465. {
  466. name: '退出人数',
  467. type: 'bar',
  468. barWidth: 10,
  469. itemStyle: {
  470. normal: {
  471. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  472. {
  473. offset: 0,
  474. color: '#69C0FF',
  475. },
  476. {
  477. offset: 1,
  478. color: '#082550',
  479. },
  480. ]),
  481. },
  482. },
  483. data: [50, 40, 60, 20, 45, 30, 60, 100, 45, 40, 50, 20, 60, 80, 45, 70, 50, 40],
  484. },
  485. ],
  486. }
  487. option.title.text = '当前各二级企业退出人数与公开招聘人数对比'
  488. option.legend.data = ['退出人数', '公开招聘数']
  489. option.yAxis.push({
  490. splitLine: {
  491. show: false,
  492. },
  493. axisLine: {
  494. show: false,
  495. },
  496. })
  497. myChart.setOption(option)
  498. },
  499. initChartR2() {
  500. let myChart = echarts.init(this.$refs['echartR2'])
  501. let option = {
  502. ...this.commonOption,
  503. series: [
  504. {
  505. name: '薪酬',
  506. type: 'line',
  507. yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
  508. smooth: true, //平滑曲线显示
  509. showAllSymbol: true, //显示所有图形。
  510. symbol: 'circle', //标记的图形为实心圆
  511. symbolSize: 8, //标记的大小
  512. smooth: false,
  513. itemStyle: {
  514. //折线拐点标志的样式
  515. color: '#B889EA',
  516. borderColor: '#B889EA',
  517. width: 2,
  518. shadowColor: '#B889EA',
  519. shadowBlur: 4,
  520. },
  521. lineStyle: {
  522. color: '#B889EA',
  523. width: 2,
  524. },
  525. areaStyle: {
  526. //区域填充样式
  527. normal: {
  528. color: new echarts.graphic.LinearGradient(
  529. 0,
  530. 0,
  531. 0,
  532. 1,
  533. [
  534. {
  535. offset: 0,
  536. color: '#B889EA',
  537. },
  538. {
  539. offset: 1,
  540. color: 'rgba(0,0,0,0)',
  541. },
  542. ],
  543. false
  544. ),
  545. },
  546. },
  547. data: [60, 50, 40, 90, 30, 55, 40, 20, 50, 40, 40, 55, 40, 30, 50, 40, 35, 40],
  548. }
  549. ],
  550. }
  551. option.title.text = '当前各二级企业在岗职工平均薪酬'
  552. option.legend.data = ['薪酬']
  553. option.legend.show = true
  554. myChart.setOption(option)
  555. },
  556. initChartR3() {
  557. let myChart = echarts.init(this.$refs['echartR3'])
  558. let option = {
  559. ...this.commonOption,
  560. series: [
  561. {
  562. name: '任期值',
  563. type: 'line',
  564. yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
  565. smooth: true, //平滑曲线显示
  566. showAllSymbol: true, //显示所有图形。
  567. symbol: 'circle', //标记的图形为实心圆
  568. symbolSize: 8, //标记的大小
  569. smooth: false,
  570. itemStyle: {
  571. //折线拐点标志的样式
  572. color: '#fbe138',
  573. borderColor: '#fbe138',
  574. width: 2,
  575. shadowColor: '#fbe138',
  576. shadowBlur: 4,
  577. },
  578. lineStyle: {
  579. color: '#fbe138',
  580. width: 2,
  581. },
  582. data: [60, 50, 80, 80, 90, 55, 40, 60, 50, 80, 90, 55, 40, 60, 50, 90, 55, 40],
  583. },
  584. {
  585. name: '全员劳动合同签约率',
  586. type: 'bar',
  587. barWidth: 10,
  588. itemStyle: {
  589. normal: {
  590. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  591. {
  592. offset: 0,
  593. color: '#69C0FF',
  594. },
  595. {
  596. offset: 1,
  597. color: '#082550',
  598. },
  599. ]),
  600. },
  601. },
  602. data: [50, 40, 60, 20, 45, 30, 60, 100, 45, 40, 50, 20, 60, 80, 45, 70, 50, 40],
  603. },
  604. {
  605. name: '全员绩效考核',
  606. type: 'bar',
  607. barWidth: 10,
  608. itemStyle: {
  609. normal: {
  610. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  611. {
  612. offset: 0,
  613. color: '#43ede3',
  614. },
  615. {
  616. offset: 1,
  617. color: '#082550',
  618. },
  619. ]),
  620. },
  621. },
  622. data: [60, 50, 40, 90, 30, 55, 40, 20, 50, 40, 40, 55, 40, 30, 50, 40, 35, 40],
  623. },
  624. ],
  625. }
  626. option.title.text = '当前各二级企业本部员额数'
  627. option.legend.data = ['全员劳动合同签约率','全员绩效考核', '任期值']
  628. option.yAxis.push({
  629. splitLine: {
  630. show: false,
  631. },
  632. axisLine: {
  633. show: false,
  634. },
  635. })
  636. myChart.setOption(option)
  637. },
  638. },
  639. })