index4.js 49 KB

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