index4.js 49 KB

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