index3.js 49 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552
  1. let barImg =
  2. 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAtCAYAAAA6GuKaAAAAAXNSR0IArs4c6QAADNRJREFUaEPNmXmQFNd9x9/Zr3u6Z2ZndzkiLeYwYhctJUtgC8GGQ46MBLYsjAURQnKSckWKkz+SkuWUnarElqtSsV2W/Kccq+Kq6EIFGAwpEEFSWIRYgQKSIrFiF3EsBskcuztX3+/oVPfMLMMesKxklbtq6tXMTk9/+rff/v6OB8HEDzjxU4fOjCbyGxO5cP05Ezm/xlkPfF3w13PRsWAhAMurfytX1nb/8ne79SpQurp2xutYwOOCHy907Xt1awxahkOAQQCBEJ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55dlEOQxpWJG+6JvBKX8vt4D/7VxgrVH/LCPr8pr7Vj5AGto7jhz9OAOKcKRVV774rlE0zUR+mHfB2/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. showTip: false,
  8. tipNum: '',
  9. time: '',
  10. year: '2022',
  11. config1: {
  12. number: [100],
  13. content: '{nt}个',
  14. },
  15. centerData: '',
  16. storageRecordConfig: {
  17. header: ['', '时间', '所属集团', '工作情况'],
  18. headerBGC: '#05507b33',
  19. oddRowBGC: '#69c0ff0f',
  20. evenRowBGC: '',
  21. headerHeight: '40',
  22. rowNum: 4,
  23. align: ['center','center','center','center'],
  24. data: [
  25. ['<span class="lightOut"><span class="light yellow"></span></span>', '2022.12.07', '山西三元煤业股份有限公司', '中层管理人数改革有待改善'],
  26. ['<span class="lightOut"><span class="light green"></span></span>', '2023.01.04', '山西煤炭运销集团三元石窟煤业有限公司', '全员劳动生产率增速显著高于人员增速'],
  27. ['<span class="lightOut"><span class="light green"></span></span>', '2023.01.04', '山西煤炭运销集团三元石窟煤业有限公司', '人工成本利润率增长且总人数下降'],
  28. ['<span class="lightOut"><span class="light green"></span></span>', '2023.01.04', '山西煤炭运销集团三元石窟煤业有限公司', '总人数压减成效突出'],
  29. ['<span class="lightOut"><span class="light yellow"></span></span>', '2023.01.05', '山西三元福达煤业有限公司', '集团人数增长速度较快'],
  30. ['<span class="lightOut"><span class="light green"></span></span>', '2023.01.06', '长治市聚通能源发展有限公司', '本部机构压减成效明显'],
  31. ['<span class="lightOut"><span class="light yellow"></span></span>', '2022.12.07', '长治三元中能煤业有限公司', '人工成本利润率显著降低'],
  32. ['<span class="lightOut"><span class="light green"></span></span>', '2023.01.08', '山西马堡煤业有限公司', '人工成本利润率显著降低'],
  33. ['<span class="lightOut"><span class="light green"></span></span>', '2022.11.07', '山西长治郊区三元南耀小常煤业有限公司', '人工成本利润率显著增长且总人数不变'],
  34. ['<span class="lightOut"><span class="light yellow"></span></span>', '2022.11.07', '山西长治王庄煤业有限责任公司', '人工成本利润率显著降低'],
  35. ['<span class="lightOut"><span class="light red"></span></span>', '2023.01.10', '山西长治王庄煤业有限责任公司', '年利润亏损但年薪酬增长'],
  36. ['<span class="lightOut"><span class="light green"></span></span>', '2022.12.07', '山西煤炭运销集团三元古韩荆宝煤业有限公司', '人工成本利润率增长且总人数不变'],
  37. ['<span class="lightOut"><span class="light green"></span></span>', '2023.01.12', '长治县三元王庄华泰水泥有限公司', '人工成本利润率增长且总人数不变']
  38. ],
  39. },
  40. storageRecordConfig2: {
  41. header: ['企业名称', '预警内容', '数据抓取日期', '累计未获取数据日期'],
  42. headerBGC: '#05507b33',
  43. oddRowBGC: '#05507b33',
  44. evenRowBGC: '',
  45. headerHeight: '40',
  46. rowNum: 4,
  47. align: ['center', 'center', 'center', 'center'],
  48. data: [
  49. ['山西焦煤', '经营业绩考核延迟更新', '2022.12.01-12.31', '3天'],
  50. ['山西文旅', '六定长效机制情况未更新', '2022.12.01-12.31', '7天'],
  51. ['大地控股', '经营业绩考核延迟更新', '2022.12.01-12.31', '3天'],
  52. ['国际能源', '六定长效机制情况未更新', '2022.12.01-12.31', '1天'],
  53. ['山西焦煤', '经营业绩考核延迟更新', '2022.12.01-12.31', '3天'],
  54. ['山西焦煤', '六定长效机制情况未更新', '2022.12.01-12.31', '3天'],
  55. ],
  56. },
  57. companyList: companyList,
  58. companyListTitle: companyListTitle,
  59. commonOption: {
  60. title: {
  61. text: 'xxx',
  62. x: 'center',
  63. y: '3%',
  64. textStyle: {
  65. color: '#69C0FF',
  66. fontSize: 24,
  67. },
  68. },
  69. tooltip: {
  70. trigger: 'axis',
  71. axisPointer: {
  72. type: 'shadow',
  73. },
  74. },
  75. grid: {
  76. top: '22%',
  77. right: '5%',
  78. left: '8%',
  79. bottom: '26%',
  80. },
  81. legend: {
  82. data: '',
  83. top: '12%',
  84. right: '5%',
  85. textStyle: {
  86. color: 'rgba(250,250,250,0.6)',
  87. fontSize: 14,
  88. },
  89. },
  90. xAxis: {
  91. data: companyList.map(item => item.name),
  92. axisLine: {
  93. show: true, //隐藏X轴轴线
  94. lineStyle: {
  95. color: '#005094',
  96. width: 1,
  97. },
  98. },
  99. axisTick: {
  100. show: false, //隐藏X轴刻度
  101. },
  102. axisLabel: {
  103. show: true,
  104. rotate: 15,
  105. textStyle: {
  106. color: 'rgba(255,255,255,0.6)', //X轴文字颜色
  107. fontSize: 16,
  108. },
  109. },
  110. },
  111. yAxis: [
  112. {
  113. type: 'value',
  114. nameTextStyle: {
  115. color: '#ebf8ac',
  116. fontSize: 16,
  117. },
  118. splitLine: {
  119. show: true,
  120. lineStyle: {
  121. color: '#68b4dd66',
  122. type: 'dashed',
  123. },
  124. },
  125. axisLine: {
  126. show: false,
  127. },
  128. axisLabel: {
  129. show: true,
  130. textStyle: {
  131. color: 'rgba(250,250,250,0.6)',
  132. fontSize: 16,
  133. },
  134. },
  135. },
  136. ],
  137. },
  138. }
  139. },
  140. mounted () {
  141. this.time = formatDate()
  142. this.timer = setInterval(() => {
  143. this.time = formatDate()
  144. }, 1000)
  145. this.centerData = data
  146. // 左侧图表
  147. this.initChartL1()
  148. this.initChartL2()
  149. this.initChartL3()
  150. this.initChartL4()
  151. this.initChartL5()
  152. this.initChartL6()
  153. this.initChartL7()
  154. this.initChartL8()
  155. // 中间图表
  156. this.initChartC1()
  157. this.initChartC2()
  158. // 右侧图表
  159. this.initChartR1()
  160. this.initChartR2()
  161. this.initChartR3()
  162. this.initChartR4()
  163. this.initChartR5()
  164. this.initChartR6()
  165. this.initChartR7()
  166. this.initChartR8()
  167. },
  168. beforeDestroy () {
  169. if (this.timer) {
  170. clearInterval(this.timer);
  171. }
  172. },
  173. methods: {
  174. handleShowTip (index) {
  175. this.showTip = true
  176. this.tipNum = index
  177. },
  178. handleGoPage (url) {
  179. if (url.length) {
  180. window.location.href = url
  181. }
  182. },
  183. handleGoBack () {
  184. window.history.go(-1)
  185. },
  186. numFormat (value) {
  187. if (!value) return '0'
  188. var intPart = Number(value).toFixed(0) // 获取整数部分
  189. var intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') // 将整数部分逢三一断
  190. var floatPart = '.00' // 预定义小数部分
  191. var value2Array = value.toString().split('.')
  192. // =2表示数据有小数位
  193. if (value2Array.length === 2) {
  194. floatPart = value2Array[1].toString() // 拿到小数部分
  195. if (floatPart.length === 1) {
  196. // 补0
  197. return intPartFormat + '.' + floatPart + '0'
  198. } else {
  199. return intPartFormat + '.' + floatPart
  200. }
  201. } else {
  202. return intPartFormat
  203. }
  204. },
  205. initChartL1 () {
  206. let myChart = echarts.init(this.$refs['echartL1'])
  207. let option = {
  208. ..._.cloneDeep(this.commonOption),
  209. series: [
  210. {
  211. name: '当前各三级企业本部机构数',
  212. type: 'bar',
  213. barWidth: 15,
  214. itemStyle: {
  215. normal: {
  216. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  217. {
  218. offset: 0,
  219. color: '#69c0ff',
  220. },
  221. {
  222. offset: 1,
  223. color: '#082550',
  224. },
  225. ]),
  226. },
  227. },
  228. data: dataL1[0],
  229. },
  230. ],
  231. }
  232. option.title.text = '各三级企业本部机构数'
  233. option.legend.data = ['当前各三级企业本部机构数']
  234. option.yAxis.push({
  235. splitLine: {
  236. show: false,
  237. },
  238. axisLine: {
  239. show: false,
  240. },
  241. })
  242. myChart.setOption(option)
  243. },
  244. initChartL2 () {
  245. let myChart = echarts.init(this.$refs['echartL2'])
  246. let option = {
  247. ..._.cloneDeep(this.commonOption),
  248. series: [
  249. {
  250. name: '当前各三级企业所属架构数',
  251. type: 'bar',
  252. barWidth: 15,
  253. itemStyle: {
  254. normal: {
  255. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  256. {
  257. offset: 0,
  258. color: '#69c0ff',
  259. },
  260. {
  261. offset: 1,
  262. color: '#082550',
  263. },
  264. ]),
  265. },
  266. },
  267. data: dataL2[0]
  268. }
  269. ],
  270. }
  271. option.title.text = '各三级企业所属架构数'
  272. option.legend.data = ['当前各三级企业所属架构数']
  273. option.yAxis.push({
  274. splitLine: {
  275. show: false,
  276. },
  277. axisLine: {
  278. show: false,
  279. },
  280. })
  281. myChart.setOption(option)
  282. },
  283. initChartL3 () {
  284. let myChart = echarts.init(this.$refs['echartL3'])
  285. console.log(this.commonOption, "this.commonOption")
  286. let option = {
  287. ..._.cloneDeep(this.commonOption),
  288. series: [
  289. {
  290. name: '当前总部中层管理人数',
  291. type: 'bar',
  292. barWidth: 15,
  293. itemStyle: {
  294. normal: {
  295. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  296. {
  297. offset: 0,
  298. color: '#5e7ae9',
  299. },
  300. {
  301. offset: 1,
  302. color: '#082550',
  303. },
  304. ]),
  305. },
  306. },
  307. data: dataL3[0],
  308. },
  309. ],
  310. }
  311. option.title.text = '各三级企业本部中层管理人数'
  312. option.legend.data = ['当前总部中层管理人数']
  313. option.yAxis.push({
  314. type: 'value',
  315. axisLine: {
  316. show: false,
  317. },
  318. splitLine: {
  319. show: false,
  320. },
  321. })
  322. myChart.setOption(option)
  323. },
  324. initChartL4 () {
  325. let myChart = echarts.init(this.$refs['echartL4'])
  326. let option = {
  327. ..._.cloneDeep(this.commonOption),
  328. series: [
  329. {
  330. name: '当前管理人员数',
  331. type: 'bar',
  332. barWidth: 12,
  333. smooth: true, //平滑曲线显示
  334. showAllSymbol: true, //显示所有图形。
  335. symbol: 'circle', //标记的图形为实心圆
  336. symbolSize: 8, //标记的大小
  337. smooth: false,
  338. itemStyle: {
  339. //折线拐点标志的样式
  340. color: '#B889EA',
  341. borderColor: '#B889EA',
  342. width: 2,
  343. shadowColor: '#B889EA',
  344. shadowBlur: 4,
  345. },
  346. lineStyle: {
  347. color: '#B889EA',
  348. width: 2,
  349. },
  350. data: dataL4[0],
  351. },
  352. {
  353. name: '管理人员数占总人数比值',
  354. yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
  355. type: 'line',
  356. itemStyle: {
  357. normal: {
  358. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  359. {
  360. offset: 0,
  361. color: '#69c0ff',
  362. },
  363. {
  364. offset: 1,
  365. color: '#082550',
  366. },
  367. ]),
  368. },
  369. },
  370. data: dataL4[1],
  371. markLine: {
  372. data: [
  373. {
  374. name: '管理人员比值核定上限',
  375. yAxis: 15,
  376. lineStyle: {
  377. color: '#fff',
  378. },
  379. label: {
  380. formatter: '{b}',
  381. position: 'middle',
  382. color: '#fff',
  383. },
  384. }
  385. ],
  386. label: {
  387. distance: [20, 8],
  388. },
  389. },
  390. },
  391. ],
  392. }
  393. option.title.text = '各三级企业管理人员数'
  394. option.legend.data = ['当前管理人员数', '管理人员数占总人数比值']
  395. option.legend.show = true
  396. option.tooltip = {
  397. trigger: 'axis',
  398. formatter: '{a0}:{c0}' + '<br/>' + '{a1}:{c1}' + '%'
  399. }
  400. option.yAxis.push({
  401. max: 20,
  402. type: 'value',
  403. axisLine: {
  404. show: false,
  405. },
  406. splitLine: {
  407. show: false,
  408. },
  409. axisLabel: {
  410. show: true,
  411. formatter: '{value} %',
  412. textStyle: {
  413. color: 'rgba(250,250,250,0.6)',
  414. },
  415. },
  416. })
  417. myChart.setOption(option)
  418. },
  419. initChartL5 () {
  420. let myChart = echarts.init(this.$refs['echartL5'])
  421. let option = {
  422. ..._.cloneDeep(this.commonOption),
  423. series: [
  424. {
  425. name: '各三级企业总人数',
  426. type: 'bar',
  427. barWidth: 15,
  428. itemStyle: {
  429. normal: {
  430. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  431. {
  432. offset: 0,
  433. color: '#69c0ff',
  434. },
  435. {
  436. offset: 1,
  437. color: '#082550',
  438. },
  439. ]),
  440. },
  441. },
  442. data: dataL5[0],
  443. },
  444. {
  445. name: '去年同期人数变化率',
  446. type: 'line',
  447. yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
  448. smooth: true, //平滑曲线显示
  449. showAllSymbol: true, //显示所有图形。
  450. symbol: 'circle', //标记的图形为实心圆
  451. symbolSize: 8, //标记的大小
  452. smooth: false,
  453. itemStyle: {
  454. //折线拐点标志的样式
  455. color: '#b889ea',
  456. borderColor: '#b889ea',
  457. width: 2,
  458. shadowColor: '#b889ea',
  459. shadowBlur: 4,
  460. },
  461. lineStyle: {
  462. color: '#b889ea',
  463. width: 2,
  464. },
  465. data: dataL5[1],
  466. },
  467. ],
  468. }
  469. option.title.text = '各三级企业总人数'
  470. option.legend.data = ['各三级企业总人数', '去年同期人数变化率']
  471. option.legend.show = true
  472. option.tooltip = {
  473. trigger: 'axis',
  474. formatter: '{a0}:{c0}' + '<br/>' + '{a1}:{c1}' + '%'
  475. }
  476. option.yAxis.push({
  477. type: 'value',
  478. axisLine: {
  479. show: false,
  480. },
  481. splitLine: {
  482. show: false,
  483. },
  484. axisLabel: {
  485. show: true,
  486. formatter: '{value} %',
  487. textStyle: {
  488. color: 'rgba(250,250,250,0.6)',
  489. },
  490. },
  491. })
  492. myChart.setOption(option)
  493. },
  494. initChartL6 () {
  495. let myChart = echarts.init(this.$refs['echartL6'])
  496. let option = {
  497. ..._.cloneDeep(this.commonOption),
  498. series: [
  499. {
  500. name: '本部员额数',
  501. type: 'bar',
  502. barWidth: 15,
  503. itemStyle: {
  504. normal: {
  505. barBorderRadius: [10, 10, 0, 0],
  506. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  507. {
  508. offset: 0,
  509. color: '#43ede3',
  510. },
  511. {
  512. offset: 1,
  513. color: '#082550',
  514. },
  515. ]),
  516. },
  517. },
  518. data: dataL6[0],
  519. },
  520. ],
  521. }
  522. option.title.text = '各三级企业本部员额数'
  523. option.legend.data = ['本部员额数']
  524. option.legend.show = true
  525. option.yAxis.push({
  526. splitLine: {
  527. show: false,
  528. },
  529. axisLine: {
  530. show: false,
  531. },
  532. })
  533. myChart.setOption(option)
  534. },
  535. initChartL7 () {
  536. let myChart = echarts.init(this.$refs['echartL7'])
  537. let option = {
  538. ..._.cloneDeep(this.commonOption),
  539. series: [
  540. {
  541. name: '人数变化',
  542. type: 'line',
  543. barWidth: 15,
  544. itemStyle: {
  545. normal: {
  546. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  547. {
  548. offset: 0,
  549. color: '#43ede3',
  550. },
  551. {
  552. offset: 1,
  553. color: '#43ede3',
  554. },
  555. ]),
  556. },
  557. },
  558. // markLine: {
  559. // data: [{ type: 'average', name: 'Avg' }],
  560. // },
  561. data: dataL7[0],
  562. },
  563. {
  564. name: '全员劳动生产率同比变化',
  565. type: 'line',
  566. barWidth: 15,
  567. // yAxisIndex: 1,
  568. itemStyle: {
  569. normal: {
  570. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  571. {
  572. offset: 0,
  573. color: '#b889ea',
  574. },
  575. {
  576. offset: 1,
  577. color: '#b889ea',
  578. },
  579. ]),
  580. },
  581. },
  582. data: dataL7[1],
  583. },
  584. ],
  585. }
  586. option.title.text = '人数变化和全员劳动生产率变化率分析'
  587. option.legend.data = ['人数变化', '全员劳动生产率同比变化']
  588. option.legend.show = true
  589. option.tooltip = {
  590. trigger: 'axis',
  591. formatter: '{a0}:{c0}' + '%' + '<br/>' + '{a1}:{c1}' + '%'
  592. }
  593. option.yAxis = [
  594. {
  595. type: 'value',
  596. axisLine: {
  597. show: false,
  598. },
  599. splitLine: {
  600. show: true,
  601. lineStyle: {
  602. color: '#68b4dd66',
  603. type: 'dashed',
  604. },
  605. },
  606. axisLabel: {
  607. show: true,
  608. formatter: '{value} %',
  609. textStyle: {
  610. color: 'rgba(250,250,250,0.6)',
  611. },
  612. },
  613. },
  614. {
  615. type: 'value',
  616. axisLine: {
  617. show: false,
  618. },
  619. splitLine: {
  620. show: false,
  621. },
  622. axisLabel: {
  623. show: true,
  624. formatter: '{value} %',
  625. textStyle: {
  626. color: 'rgba(250,250,250,0.6)',
  627. },
  628. },
  629. }
  630. ]
  631. myChart.setOption(option)
  632. },
  633. initChartL8 () {
  634. let myChart = echarts.init(this.$refs['echartL8'])
  635. let option = {
  636. ..._.cloneDeep(this.commonOption),
  637. series: [
  638. {
  639. name: '人数变化',
  640. type: 'line',
  641. barWidth: 15,
  642. itemStyle: {
  643. normal: {
  644. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  645. {
  646. offset: 0,
  647. color: '#43ede3',
  648. },
  649. {
  650. offset: 1,
  651. color: '#43ede3',
  652. },
  653. ]),
  654. },
  655. },
  656. // markLine: {
  657. // data: [{ type: 'average', name: 'Avg' }],
  658. // },
  659. data: dataL8[0],
  660. },
  661. {
  662. name: '人工成本利润率同比变化',
  663. type: 'line',
  664. barWidth: 15,
  665. // yAxisIndex: 1,
  666. itemStyle: {
  667. normal: {
  668. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  669. {
  670. offset: 0,
  671. color: '#b889ea',
  672. },
  673. {
  674. offset: 1,
  675. color: '#b889ea',
  676. },
  677. ]),
  678. },
  679. },
  680. data: dataL8[1],
  681. },
  682. ],
  683. }
  684. option.title.text = '人数变化和人工利润率变化分析'
  685. option.legend.data = ['人数变化', '人工成本利润率同比变化']
  686. option.legend.show = true
  687. option.tooltip = {
  688. trigger: 'axis',
  689. formatter: '{a0}:{c0}' + '%' + '<br/>' + '{a1}:{c1}' + '%'
  690. }
  691. option.yAxis = [
  692. {
  693. type: 'value',
  694. axisLine: {
  695. show: false,
  696. },
  697. splitLine: {
  698. show: true,
  699. lineStyle: {
  700. color: '#68b4dd66',
  701. type: 'dashed',
  702. },
  703. },
  704. axisLabel: {
  705. show: true,
  706. formatter: '{value} %',
  707. textStyle: {
  708. color: 'rgba(250,250,250,0.6)',
  709. },
  710. },
  711. },
  712. {
  713. type: 'value',
  714. axisLine: {
  715. show: false,
  716. },
  717. splitLine: {
  718. show: false,
  719. },
  720. axisLabel: {
  721. show: true,
  722. formatter: '{value} %',
  723. textStyle: {
  724. color: 'rgba(250,250,250,0.6)',
  725. },
  726. },
  727. }
  728. ]
  729. myChart.setOption(option)
  730. },
  731. // 中间图表---------------------------------------------开始
  732. initChartC1 () {
  733. let myChart = echarts.init(this.$refs['echartC1'])
  734. let option = {
  735. ..._.cloneDeep(this.commonOption),
  736. color: ['#69c0ff'],
  737. series: [
  738. {
  739. name: '全员劳动生产率(万/人)',
  740. type: 'bar',
  741. barWidth: 12,
  742. smooth: true, //平滑曲线显示
  743. showAllSymbol: true, //显示所有图形。
  744. symbol: 'circle', //标记的图形为实心圆
  745. symbolSize: 8, //标记的大小
  746. smooth: false,
  747. itemStyle: {
  748. color: params => {
  749. if (params.value < 0 && dataC1[1][params.dataIndex] < 0) {
  750. return 'red'
  751. } else if (params.value < 0) {
  752. return 'yellow'
  753. } else {
  754. return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  755. {
  756. offset: 0,
  757. color: '#69c0ff',
  758. },
  759. {
  760. offset: 1,
  761. color: '#082550',
  762. },
  763. ])
  764. }
  765. },
  766. },
  767. lineStyle: {
  768. color: '#B889EA',
  769. width: 2,
  770. },
  771. data: dataC1[0],
  772. markLine: {
  773. data: [
  774. {
  775. name: '省属企业平均水平',
  776. yAxis: 50.13,
  777. lineStyle: {
  778. color: '#fff',
  779. },
  780. label: {
  781. formatter: '{b}',
  782. position: 'middle',
  783. color: '#fff',
  784. },
  785. },
  786. {
  787. name: '央企平均水平',
  788. yAxis: 69.4,
  789. lineStyle: {
  790. color: '#fff',
  791. },
  792. label: {
  793. formatter: '{b}',
  794. position: 'middle',
  795. color: '#fff',
  796. },
  797. },
  798. ],
  799. label: {
  800. distance: [20, 8],
  801. },
  802. },
  803. },
  804. {
  805. name: '全员劳动生产率同比变化',
  806. yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
  807. type: 'line',
  808. itemStyle: {
  809. normal: {
  810. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  811. {
  812. offset: 0,
  813. color: '#69c0ff',
  814. },
  815. {
  816. offset: 1,
  817. color: '#082550',
  818. },
  819. ]),
  820. },
  821. },
  822. data: dataC1[1],
  823. },
  824. ],
  825. }
  826. option.title.text = '各三级全员劳动生产率'
  827. option.legend.data = ['全员劳动生产率同比变化', '全员劳动生产率(万/人)']
  828. option.legend.show = true
  829. option.tooltip = {
  830. trigger: 'axis',
  831. formatter: '{a0}:{c0}' + '<br/>' + '{a1}:{c1}' + '%'
  832. }
  833. option.yAxis.push({
  834. type: 'value',
  835. axisLine: {
  836. show: false,
  837. },
  838. splitLine: {
  839. show: false,
  840. },
  841. axisLabel: {
  842. show: true,
  843. formatter: '{value} %',
  844. textStyle: {
  845. color: 'rgba(250,250,250,0.6)',
  846. },
  847. },
  848. })
  849. myChart.setOption(option)
  850. tools.loopShowTooltip(myChart, option, {
  851. nterval: 2000,
  852. loopSeries: true,
  853. });
  854. },
  855. initChartC2 () {
  856. let myChart = echarts.init(this.$refs['echartC2'])
  857. let option = {
  858. ..._.cloneDeep(this.commonOption),
  859. color: ['#69c0ff'],
  860. series: [
  861. {
  862. name: '人工成本利润率同比变化',
  863. type: 'line',
  864. yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
  865. smooth: true, //平滑曲线显示
  866. showAllSymbol: true, //显示所有图形。
  867. symbol: 'circle', //标记的图形为实心圆
  868. symbolSize: 8, //标记的大小
  869. smooth: false,
  870. itemStyle: {
  871. //折线拐点标志的样式
  872. color: '#B889EA',
  873. borderColor: '#B889EA',
  874. width: 2,
  875. shadowColor: '#B889EA',
  876. shadowBlur: 4,
  877. },
  878. lineStyle: {
  879. color: '#B889EA',
  880. width: 2,
  881. },
  882. data: dataC2[0],
  883. },
  884. {
  885. name: '人工成本利润率',
  886. type: 'bar',
  887. barWidth: 15,
  888. itemStyle: {
  889. color: params => {
  890. if (params.value < 0 && dataC2[1][params.dataIndex] < 0) {
  891. return 'red'
  892. } else if (params.value < 0) {
  893. return 'yellow'
  894. } else {
  895. return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  896. {
  897. offset: 0,
  898. color: '#69c0ff',
  899. },
  900. {
  901. offset: 1,
  902. color: '#082550',
  903. },
  904. ])
  905. }
  906. },
  907. },
  908. data: dataC2[1],
  909. markLine: {
  910. data: [
  911. {
  912. name: '省属企业平均水平',
  913. yAxis: 67.09,
  914. lineStyle: {
  915. color: '#fff',
  916. },
  917. label: {
  918. formatter: '{b}',
  919. position: 'end',
  920. color: '#fff',
  921. },
  922. },
  923. {
  924. name: '央企平均水平',
  925. yAxis: 81,
  926. lineStyle: {
  927. color: '#fff',
  928. },
  929. label: {
  930. formatter: '{b}',
  931. position: 'middle',
  932. color: '#fff',
  933. },
  934. },
  935. ],
  936. label: {
  937. distance: [20, 8],
  938. },
  939. },
  940. },
  941. ],
  942. }
  943. option.title.text = '各三级人工成本利润率'
  944. option.legend.data = ['人工成本利润率同比变化', '人工成本利润率']
  945. option.legend.show = true
  946. option.tooltip = {
  947. trigger: 'axis',
  948. formatter: '{a0}:{c0}' + '%' + '<br/>' + '{a1}:{c1}' + '%'
  949. }
  950. option.grid.right = '15%'
  951. option.yAxis = [
  952. {
  953. axisLine: {
  954. show: false,
  955. },
  956. splitLine: {
  957. show: true,
  958. lineStyle: {
  959. color: '#68b4dd66',
  960. type: 'dashed',
  961. },
  962. },
  963. axisLabel: {
  964. show: true,
  965. formatter: '{value} %',
  966. textStyle: {
  967. color: 'rgba(250,250,250,0.6)',
  968. },
  969. },
  970. },
  971. {
  972. splitLine: {
  973. show: false,
  974. },
  975. axisLine: {
  976. show: false,
  977. },
  978. axisLabel: {
  979. show: true,
  980. formatter: '{value} %',
  981. textStyle: {
  982. color: 'rgba(250,250,250,0.6)',
  983. },
  984. },
  985. }
  986. ]
  987. myChart.setOption(option)
  988. tools.loopShowTooltip(myChart, option, {
  989. nterval: 2000,
  990. loopSeries: true,
  991. });
  992. },
  993. // 右侧图表---------------------------------------------开始
  994. initChartR1 () {
  995. let myChart = echarts.init(this.$refs['echartR1'])
  996. let commonOptions = this.commonOption
  997. commonOptions.yAxis[0].splitNumber = 2
  998. let option = {
  999. ..._.cloneDeep(commonOptions),
  1000. series: [
  1001. {
  1002. name: '招聘需求公告次数',
  1003. type: 'bar',
  1004. barWidth: 15,
  1005. itemStyle: {
  1006. normal: {
  1007. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1008. {
  1009. offset: 0,
  1010. color: '#69c0ff',
  1011. },
  1012. {
  1013. offset: 1,
  1014. color: '#082550',
  1015. },
  1016. ]),
  1017. },
  1018. },
  1019. data: dataR1[0],
  1020. },
  1021. {
  1022. name: '招聘需求公告累计招聘人次',
  1023. type: 'bar',
  1024. barWidth: 15,
  1025. itemStyle: {
  1026. normal: {
  1027. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1028. {
  1029. offset: 0,
  1030. color: '#43ede3',
  1031. },
  1032. {
  1033. offset: 1,
  1034. color: '#082550',
  1035. },
  1036. ]),
  1037. },
  1038. },
  1039. data: dataR1[1],
  1040. },
  1041. ],
  1042. }
  1043. option.title.text = '各三级企业招聘需求公告人次情况'
  1044. option.legend.data = ['招聘需求公告次数', '招聘需求公告累计招聘人次']
  1045. option.legend.show = true
  1046. option.yAxis.push({
  1047. splitLine: {
  1048. show: false,
  1049. },
  1050. axisLine: {
  1051. show: false,
  1052. },
  1053. })
  1054. myChart.setOption(option)
  1055. },
  1056. initChartR2 () {
  1057. let myChart = echarts.init(this.$refs['echartR2'])
  1058. let commonOptions = this.commonOption
  1059. commonOptions.yAxis[0].splitNumber = 2
  1060. let option = {
  1061. ..._.cloneDeep(commonOptions),
  1062. series: [
  1063. {
  1064. name: '录用结果公示次数',
  1065. type: 'bar',
  1066. barWidth: 15,
  1067. itemStyle: {
  1068. normal: {
  1069. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1070. {
  1071. offset: 0,
  1072. color: '#69c0ff',
  1073. },
  1074. {
  1075. offset: 1,
  1076. color: '#082550',
  1077. },
  1078. ]),
  1079. },
  1080. },
  1081. data: dataR2[0],
  1082. },
  1083. {
  1084. name: '录用结果公示累计公示人数',
  1085. type: 'bar',
  1086. barWidth: 15,
  1087. itemStyle: {
  1088. normal: {
  1089. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1090. {
  1091. offset: 0,
  1092. color: '#45DAD1',
  1093. },
  1094. {
  1095. offset: 1,
  1096. color: '#082550',
  1097. },
  1098. ]),
  1099. },
  1100. },
  1101. data: dataR2[1],
  1102. },
  1103. ],
  1104. }
  1105. option.title.text = '各三级企业录用结果公示人次'
  1106. option.legend.data = ['录用结果公示次数', '录用结果公示累计公示人数']
  1107. option.legend.show = true
  1108. option.yAxis.push({
  1109. type: 'value',
  1110. axisLine: {
  1111. show: false,
  1112. },
  1113. splitLine: {
  1114. show: false,
  1115. },
  1116. })
  1117. myChart.setOption(option)
  1118. },
  1119. initChartR3 () {
  1120. let myChart = echarts.init(this.$refs['echartR3'])
  1121. let commonOptions = this.commonOption
  1122. commonOptions.yAxis[0].splitNumber = 2
  1123. let option = {
  1124. ..._.cloneDeep(commonOptions),
  1125. series: [
  1126. {
  1127. name: '2022年利润(万)',
  1128. type: 'bar',
  1129. barWidth: 15,
  1130. itemStyle: {
  1131. normal: {
  1132. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1133. {
  1134. offset: 0,
  1135. color: '#69c0ff',
  1136. },
  1137. {
  1138. offset: 1,
  1139. color: '#082550',
  1140. },
  1141. ]),
  1142. },
  1143. },
  1144. data: dataR3[0],
  1145. },
  1146. {
  1147. name: '2022年累计招聘数',
  1148. yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
  1149. type: 'bar',
  1150. barWidth: 15,
  1151. itemStyle: {
  1152. normal: {
  1153. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1154. {
  1155. offset: 0,
  1156. color: '#45DAD1',
  1157. },
  1158. {
  1159. offset: 1,
  1160. color: '#082550',
  1161. },
  1162. ]),
  1163. },
  1164. },
  1165. data: dataR3[1],
  1166. },
  1167. ],
  1168. }
  1169. option.title.text = '各三级企业年利润与招聘情况分析'
  1170. option.legend.data = ['2022年利润(万)', '2022年累计招聘数']
  1171. option.legend.show = true
  1172. option.yAxis[0].max = function (value) {
  1173. if (Math.abs(value.max) > Math.abs(value.min)) {
  1174. return (Math.abs(value.max) * 1.2).toFixed(2);
  1175. } else {
  1176. return (Math.abs(value.min) * 1.2).toFixed(2);
  1177. }
  1178. }
  1179. option.yAxis[0].min = function (value) {
  1180. if (Math.abs(value.max) > Math.abs(value.min)) {
  1181. return (-Math.abs(value.max) * 1.2).toFixed(2);
  1182. } else {
  1183. return (-Math.abs(value.min) * 1.2).toFixed(2);
  1184. }
  1185. }
  1186. option.yAxis.push({
  1187. splitLine: {
  1188. show: false,
  1189. },
  1190. axisLine: {
  1191. show: false,
  1192. },
  1193. axisLabel: {
  1194. show: true,
  1195. formatter: '{value}',
  1196. textStyle: {
  1197. color: 'rgba(250,250,250,0.6)',
  1198. },
  1199. },
  1200. max: function (value) {
  1201. if (Math.abs(value.max) > Math.abs(value.min)) {
  1202. return (Math.abs(value.max) * 1.2).toFixed(2);
  1203. } else {
  1204. return (Math.abs(value.min) * 1.2).toFixed(2);
  1205. }
  1206. },
  1207. min: function (value) {
  1208. if (Math.abs(value.max) > Math.abs(value.min)) {
  1209. return (-Math.abs(value.max) * 1.2).toFixed(2);
  1210. } else {
  1211. return (-Math.abs(value.min) * 1.2).toFixed(2);
  1212. }
  1213. }
  1214. })
  1215. // option.yAxis = [
  1216. // {
  1217. // max: function (val) {
  1218. // if (Math.abs(val.max) > Math.abs(val.min)) {
  1219. // return (Math.abs(val.max) * 1.2).toFixed(0)
  1220. // } else {
  1221. // return (Math.abs(val.min) * 1.2).toFixed(0)
  1222. // }
  1223. // },
  1224. // min: function (val) {
  1225. // if (Math.abs(val.max) > Math.abs(val.min)) {
  1226. // return (-Math.abs(val.max) * 1.2).toFixed(0)
  1227. // } else {
  1228. // return (Math.abs(val.min) * 1.2).toFixed(0)
  1229. // }
  1230. // },
  1231. // splitLine: {
  1232. // show: false,
  1233. // },
  1234. // axisLine: {
  1235. // show: false,
  1236. // },
  1237. // axisLabel: {
  1238. // show: true,
  1239. // formatter: '{value}',
  1240. // textStyle: {
  1241. // color: 'rgba(250,250,250,0.6)',
  1242. // },
  1243. // },
  1244. // }
  1245. // ]
  1246. myChart.setOption(option)
  1247. },
  1248. initChartR4 () {
  1249. let myChart = echarts.init(this.$refs['echartR4'])
  1250. let commonOptions = this.commonOption
  1251. commonOptions.yAxis[0].splitNumber = 2
  1252. let option = {
  1253. ..._.cloneDeep(commonOptions),
  1254. series: [
  1255. {
  1256. name: '2022年退出人数',
  1257. type: 'bar',
  1258. barWidth: 15,
  1259. itemStyle: {
  1260. normal: {
  1261. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1262. {
  1263. offset: 0,
  1264. color: '#69c0ff',
  1265. },
  1266. {
  1267. offset: 1,
  1268. color: '#082550',
  1269. },
  1270. ]),
  1271. },
  1272. },
  1273. data: dataR4[0],
  1274. },
  1275. {
  1276. name: '2022年累计招聘人数',
  1277. type: 'bar',
  1278. barWidth: 15,
  1279. itemStyle: {
  1280. normal: {
  1281. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1282. {
  1283. offset: 0,
  1284. color: '#45DAD1',
  1285. },
  1286. {
  1287. offset: 1,
  1288. color: '#082550',
  1289. },
  1290. ]),
  1291. },
  1292. },
  1293. data: dataR4[1],
  1294. },
  1295. ],
  1296. }
  1297. option.title.text = '各三级企业"退二进一"完成情况'
  1298. option.legend.data = ['2022年退出人数', '2022年累计招聘人数']
  1299. option.legend.show = true
  1300. option.yAxis.push({
  1301. splitLine: {
  1302. show: false,
  1303. },
  1304. axisLine: {
  1305. show: false,
  1306. },
  1307. })
  1308. myChart.setOption(option)
  1309. },
  1310. initChartR5 () {
  1311. let myChart = echarts.init(this.$refs['echartR5'])
  1312. let option = {
  1313. ..._.cloneDeep(this.commonOption),
  1314. series: [
  1315. {
  1316. name: '去年同期在岗职工平均薪酬',
  1317. type: 'bar',
  1318. barWidth: 15,
  1319. itemStyle: {
  1320. normal: {
  1321. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1322. {
  1323. offset: 0,
  1324. color: '#69c0ff',
  1325. },
  1326. {
  1327. offset: 1,
  1328. color: '#082550',
  1329. },
  1330. ]),
  1331. },
  1332. },
  1333. data: dataR5[0],
  1334. },
  1335. {
  1336. name: '在岗职工平均薪酬',
  1337. type: 'bar',
  1338. barWidth: 15,
  1339. itemStyle: {
  1340. normal: {
  1341. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1342. {
  1343. offset: 0,
  1344. color: '#6682F5',
  1345. },
  1346. {
  1347. offset: 1,
  1348. color: '#082550',
  1349. },
  1350. ]),
  1351. },
  1352. },
  1353. data: dataR5[1],
  1354. }
  1355. ],
  1356. }
  1357. option.title.text = '各三级企业在岗职工平均薪酬'
  1358. option.legend.data = ['去年同期在岗职工平均薪酬', '在岗职工平均薪酬']
  1359. option.legend.show = true
  1360. option.yAxis.push({
  1361. splitLine: {
  1362. show: false,
  1363. },
  1364. axisLine: {
  1365. show: false,
  1366. },
  1367. })
  1368. myChart.setOption(option)
  1369. },
  1370. initChartR6 () {
  1371. let myChart = echarts.init(this.$refs['echartR6'])
  1372. let option = {
  1373. ..._.cloneDeep(this.commonOption),
  1374. series: [
  1375. {
  1376. name: '2022年利润累计涨幅率',
  1377. type: 'line',
  1378. smooth: true, //平滑曲线显示
  1379. showAllSymbol: true, //显示所有图形。
  1380. symbol: 'circle', //标记的图形为实心圆
  1381. symbolSize: 8, //标记的大小
  1382. smooth: false,
  1383. itemStyle: {
  1384. //折线拐点标志的样式
  1385. color: '#B889EA',
  1386. borderColor: '#B889EA',
  1387. width: 2,
  1388. shadowColor: '#B889EA',
  1389. shadowBlur: 4,
  1390. },
  1391. lineStyle: {
  1392. color: '#B889EA',
  1393. width: 2,
  1394. },
  1395. data: dataR6[0],
  1396. },
  1397. {
  1398. name: '2022年薪酬累计涨幅率',
  1399. type: 'line',
  1400. barWidth: 15,
  1401. yAxisIndex: 1,
  1402. itemStyle: {
  1403. normal: {
  1404. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1405. {
  1406. offset: 0,
  1407. color: '#69C0FF',
  1408. },
  1409. {
  1410. offset: 1,
  1411. color: '#082550',
  1412. },
  1413. ]),
  1414. },
  1415. },
  1416. data: dataR6[1],
  1417. },
  1418. ],
  1419. }
  1420. option.title.text = '各三级企业利润与薪酬变动情况'
  1421. option.legend.data = ['2022年利润累计涨幅率', '2022年薪酬累计涨幅率']
  1422. option.tooltip = {
  1423. trigger: 'axis',
  1424. formatter: '{a0}:{c0}' + '%' + '<br/>' + '{a1}:{c1}' + '%'
  1425. }
  1426. option.yAxis = [
  1427. {
  1428. splitLine: {
  1429. show: true,
  1430. lineStyle: {
  1431. color: '#68b4dd66',
  1432. type: 'dashed',
  1433. },
  1434. },
  1435. axisLine: {
  1436. show: false,
  1437. },
  1438. axisLabel: {
  1439. show: true,
  1440. formatter: '{value} %',
  1441. textStyle: {
  1442. color: 'rgba(250,250,250,0.6)',
  1443. },
  1444. },
  1445. },
  1446. {
  1447. splitLine: {
  1448. show: false,
  1449. },
  1450. axisLine: {
  1451. show: false,
  1452. },
  1453. axisLabel: {
  1454. show: true,
  1455. formatter: '{value} %',
  1456. textStyle: {
  1457. color: 'rgba(250,250,250,0.6)',
  1458. },
  1459. },
  1460. }
  1461. ]
  1462. myChart.setOption(option)
  1463. },
  1464. initChartR7 () {
  1465. let myChart = echarts.init(this.$refs['echartR7'])
  1466. let option = {
  1467. ..._.cloneDeep(this.commonOption),
  1468. series: [
  1469. {
  1470. name: '全员绩效考核完成率',
  1471. type: 'bar',
  1472. barWidth: 15,
  1473. itemStyle: {
  1474. normal: {
  1475. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1476. {
  1477. offset: 0,
  1478. color: '#B889EA',
  1479. },
  1480. {
  1481. offset: 1,
  1482. color: '#082550',
  1483. },
  1484. ]),
  1485. },
  1486. },
  1487. data: dataR7[0],
  1488. },
  1489. ],
  1490. }
  1491. option.title.text = '各三级企业全员绩效考核 '
  1492. // option.legend.data = ['劳动合同签约完成率', '目标值']
  1493. option.tooltip = {
  1494. trigger: 'axis',
  1495. formatter: '{a0}:{c0}' + '%'
  1496. }
  1497. option.yAxis[0].axisLabel = {
  1498. show: true,
  1499. formatter: '{value} %',
  1500. textStyle: {
  1501. color: 'rgba(250,250,250,0.6)',
  1502. },
  1503. }
  1504. myChart.setOption(option)
  1505. },
  1506. initChartR8 () {
  1507. let myChart = echarts.init(this.$refs['echartR8'])
  1508. let option = {
  1509. ..._.cloneDeep(this.commonOption),
  1510. series: [
  1511. {
  1512. name: '任期制契约化完成率',
  1513. type: 'bar',
  1514. barWidth: 15,
  1515. itemStyle: {
  1516. normal: {
  1517. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1518. {
  1519. offset: 0,
  1520. color: '#43ede3',
  1521. },
  1522. {
  1523. offset: 1,
  1524. color: '#082550',
  1525. },
  1526. ]),
  1527. },
  1528. },
  1529. data: dataR8[0],
  1530. },
  1531. ],
  1532. }
  1533. option.title.text = '各三级企业任期制契约化完成率'
  1534. option.tooltip = {
  1535. trigger: 'axis',
  1536. formatter: '{a0}:{c0}' + '%'
  1537. }
  1538. option.yAxis[0].axisLabel = {
  1539. show: true,
  1540. formatter: '{value} %',
  1541. textStyle: {
  1542. color: 'rgba(250,250,250,0.6)',
  1543. },
  1544. }
  1545. myChart.setOption(option)
  1546. },
  1547. },
  1548. })