index3.js 75 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458
  1. let barImg =
  2. 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAtCAYAAAA6GuKaAAAAAXNSR0IArs4c6QAADNRJREFUaEPNmXmQFNd9x9/Zr3u6Z2ZndzkiLeYwYhctJUtgC8GGQ46MBLYsjAURQnKSckW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'#app',
  5. data () {
  6. return {
  7. start: 0,
  8. end: 9,
  9. touch: true,
  10. timeCommon: '',
  11. echartC1: {
  12. national: '',
  13. province: ''
  14. },
  15. echartC2: {
  16. national: '',
  17. province: ''
  18. },
  19. titleName: '',
  20. twinkle7: [],
  21. twinkle8: [],
  22. twinkleR6: [],
  23. showTip: false,
  24. tipNum: '',
  25. time: '',
  26. year: '2022',
  27. config1: {
  28. number: [100],
  29. content: '{nt}个',
  30. },
  31. centerData: '',
  32. storageRecordConfig: {
  33. header: ['', '公司名称', '工作情况'],
  34. headerBGC: '#05507b33',
  35. oddRowBGC: '#69c0ff0f',
  36. evenRowBGC: '',
  37. headerHeight: '50',
  38. rowNum: 4,
  39. align: ['center', 'center', 'center', 'center'],
  40. data: [],
  41. },
  42. storageRecordConfig2: {
  43. header: ['企业名称', '预警内容', '数据抓取日期', '累计未获取数据日期'],
  44. headerBGC: '#05507b33',
  45. oddRowBGC: '#05507b33',
  46. evenRowBGC: '',
  47. headerHeight: '50',
  48. rowNum: 4,
  49. align: ['center', 'center', 'center', 'center'],
  50. data: [],
  51. },
  52. companyList: companyList,
  53. companyListTitle: companyListTitle,
  54. commonOption: []
  55. }
  56. },
  57. beforeMount () {
  58. },
  59. mounted () {
  60. this.getUrlParams()
  61. this.time = formatDate()
  62. this.timer = setInterval(() => {
  63. this.time = formatDate()
  64. }, 1000)
  65. this.centerData = data
  66. },
  67. beforeDestroy () {
  68. clearInterval(this.timer);
  69. clearInterval(this.timeCommon);
  70. },
  71. methods: {
  72. change () {
  73. if (this.end < this.companyList.length) {
  74. this.start += 9
  75. this.end += 9
  76. } else {
  77. this.start = 0
  78. this.end = 9
  79. }
  80. },
  81. judgeCarousel () {
  82. let a = {
  83. title: {
  84. text: 'xxx',
  85. x: 'center',
  86. y: '3%',
  87. textStyle: {
  88. color: '#69C0FF',
  89. fontSize: 24,
  90. },
  91. },
  92. tooltip: {
  93. trigger: 'axis',
  94. axisPointer: {
  95. type: 'shadow',
  96. },
  97. },
  98. grid: {
  99. top: '22%',
  100. right: '5%',
  101. left: '8%',
  102. bottom: '25%',
  103. },
  104. legend: {
  105. data: '',
  106. top: '12%',
  107. right: '5%',
  108. textStyle: {
  109. color: 'rgba(250,250,250,0.6)',
  110. fontSize: 16,
  111. },
  112. },
  113. xAxis: {
  114. // data: companyList.map(item => item.name),
  115. data: '',
  116. axisLine: {
  117. show: true, //隐藏X轴轴线
  118. lineStyle: {
  119. color: '#005094',
  120. width: 1,
  121. },
  122. },
  123. axisTick: {
  124. show: false, //隐藏X轴刻度
  125. },
  126. axisLabel: {
  127. show: true,
  128. rotate: 15,
  129. textStyle: {
  130. color: 'rgba(255,255,255,0.6)', //X轴文字颜色
  131. fontSize: 16,
  132. },
  133. },
  134. },
  135. yAxis: [
  136. {
  137. type: 'value',
  138. nameTextStyle: {
  139. color: '#ebf8ac',
  140. fontSize: 16,
  141. },
  142. splitLine: {
  143. show: true,
  144. lineStyle: {
  145. color: '#68b4dd66',
  146. type: 'dashed',
  147. },
  148. },
  149. axisLine: {
  150. show: false,
  151. },
  152. axisLabel: {
  153. show: true,
  154. textStyle: {
  155. color: 'rgba(250,250,250,0.6)',
  156. fontSize: 16,
  157. },
  158. },
  159. },
  160. ],
  161. }
  162. a.xAxis.data = this.companyList.map(item => item.name)
  163. if (this.companyList.length > 18) {
  164. a.dataZoom = [
  165. {
  166. // start: 9,//默认为@
  167. // end: 100,//黑认认为1@0
  168. type: "slider",
  169. show: false,
  170. // xAxisIndex: [0]
  171. handlesize: 0,//滑动条的 左右2个滑动条的大小
  172. startValue: 17,// 初始显示值
  173. endValue: 0,// 结束显示值
  174. height: 10,//组件高度
  175. left: "5%",
  176. right: "4%",//右边的距离
  177. bottom: "25%",//底边的距离
  178. borderColor: "#939",
  179. fillerColor: "#269cdb",
  180. borderRadius: 5,
  181. backgroundColor: "#33384b",//两边未选中的滑动条区域的额色
  182. showDataShadow: false,//是否显示数据阴影
  183. showDetail: false,//即拖拽时候是否显示详细数值信息
  184. truerealtime: true,//是否实时更新
  185. filterMode: "filter"
  186. }, {
  187. type: 'inside',
  188. show: true,
  189. start: 1,
  190. end: 100
  191. }
  192. ]
  193. }
  194. this.commonOption = a
  195. },
  196. generateEcharts () {
  197. // 左侧图表
  198. this.initChartL1()
  199. // this.initChartL2()
  200. this.initChartL3()
  201. // this.initChartL4()
  202. // this.initChartL5()
  203. this.initChartL6()
  204. // this.initChartL7()
  205. // this.initChartL8()
  206. // 中间图表
  207. this.initChartC1()
  208. this.initChartC2()
  209. // 右侧图表
  210. // this.initChartR1()
  211. // this.initChartR2()
  212. // this.initChartR3()
  213. this.initChartR4()
  214. this.initChartR5()
  215. // this.initChartR6()
  216. this.initChartR7()
  217. // this.initChartR8()
  218. },
  219. // 获取地址栏参数
  220. getUrlParams (id) {
  221. let url = window.location.href
  222. // 通过 ? 分割获取后面的参数字符串
  223. let urlStr = url.split('?')[1]
  224. // 创建空对象存储参数
  225. let obj = {};
  226. // 再通过 & 将每一个参数单独分割出来
  227. let paramsArr = urlStr.split('&')
  228. for (let i = 0, len = paramsArr.length; i < len; i++) {
  229. // 再通过 = 将每一个参数分割为 key:value 的形式
  230. let arr = paramsArr[i].split('=')
  231. obj[arr[0]] = arr[1];
  232. }
  233. this.access_token = obj.access_token
  234. this.orgNumber = obj.id
  235. this.titleName = decodeURIComponent(obj.name)
  236. // Promise.all([this.getData(), this.getInstitutional()])
  237. // .then((arr) => {
  238. // this.generateEcharts()
  239. // })
  240. // .catch((err) => console.log(err));
  241. this.getInstitutional()
  242. },
  243. // 获取组织机构
  244. getInstitutional () {
  245. return new Promise((resolve, err) => {
  246. let value = {
  247. access_token: this.access_token,
  248. "Data": {
  249. "paramType": "ORG",
  250. "orgNumber": this.orgNumber
  251. // "orgNumber": '1494979736584079360'
  252. }
  253. }
  254. post('/ierp/kapi/v2/mdnb/mdnb_das/Data/CockpitScreen', value).then(res => {
  255. this.companyList = res.data.map(item => {
  256. return { name: item.orgName, id: item.orgNumber }
  257. })
  258. this.getData()
  259. this.judgeCarousel()
  260. resolve(1);
  261. })
  262. });
  263. },
  264. getData () {
  265. let that = this
  266. return new Promise((resolve, err) => {
  267. let value = {
  268. access_token: this.access_token,
  269. "Data": {
  270. "paramType": "DATA",
  271. "orgNumber": this.orgNumber
  272. }
  273. }
  274. post('/ierp/kapi/v2/mdnb/mdnb_das/Data/CockpitScreen', value).then(res => {
  275. res.orgData = res.data[0]
  276. // 定机构
  277. // 弹窗
  278. // return
  279. // 左侧图表
  280. tipData.analysis[0] = res.orgData.area1.intAnalysis.map(item => item.analysis)
  281. //各二级企业本部机构数
  282. dataL1[0] = []
  283. dataL1[1] = []
  284. dataL1[2] = []
  285. res.orgData.area1.card1.forEach(item => {
  286. dataL1[0].push(item['ZBPZ0010'])
  287. dataL1[1].push(item['ZBPZ0088'])
  288. dataL1[2].push(item['ZBPZ0089'])
  289. })
  290. // 各二级企业所属架构数
  291. dataL2[0] = []
  292. res.orgData.area1.card2.forEach(item => {
  293. dataL2[0].push(item['ZBPZ0024'])
  294. })
  295. // 定职数
  296. // 弹窗
  297. // 左侧图表
  298. tipData.analysis[2] = res.orgData.area2.intAnalysis.map(item => item.analysis)
  299. //各二级企业本部中层管理人数
  300. dataL3[0] = []
  301. res.orgData.area2.card1.forEach(item => {
  302. dataL3[0].push(item['ZBPZ0091'])
  303. })
  304. // 各二级企业管理人员数
  305. dataL4[1] = []
  306. dataL4[0] = []
  307. dataL4[2] = []
  308. res.orgData.area2.card1.forEach(item => {
  309. dataL4[1].push(item['ZBPZ0091'])
  310. dataL4[0].push(item['ZBPZ0093'])
  311. dataL4[2].push(item['ZBPZ0092'])
  312. })
  313. // 定员额
  314. // 弹窗
  315. tipData.analysis[1] = res.orgData.area3.intAnalysis.map(item => item.analysis)
  316. // 各二级企业总人数
  317. dataL5[0] = []
  318. dataL5[1] = []
  319. dataL5[2] = []
  320. res.orgData.area3.card1.forEach(item => {
  321. dataL5[0].push(item['ZBPZ0006'])
  322. dataL5[1].push(item['ZBPZ0050'])
  323. dataL5[2].push(item['ZBPZ0051'])
  324. })
  325. // 各二级企业本部员额数
  326. dataL6[0] = []
  327. dataL6[2] = []
  328. dataL6[1] = []
  329. res.orgData.area3.card2.forEach(item => {
  330. dataL6[0].push(item['ZBPZ0031'])
  331. dataL6[2].push(item['ZBPZ0094'])
  332. dataL6[1].push(item['ZBPZ0095'])
  333. })
  334. // 人数变化和全员劳动生产率变化率分析
  335. dataL7[0] = []
  336. dataL7[1] = []
  337. res.orgData.area3.card3.forEach(item => {
  338. dataL7[0].push(item['ZBPZ0050'])
  339. dataL7[1].push(item['ZBPZ0039'])
  340. })
  341. // 人数变化和人工利润率变化分析
  342. dataL8[0] = []
  343. dataL8[1] = []
  344. res.orgData.area3.card4.forEach(item => {
  345. dataL8[0].push(item['ZBPZ0050'])
  346. dataL8[1].push(item['ZBPZ0041'])
  347. })
  348. // 定机制
  349. // 弹窗
  350. tipData.analysis[6] = res.orgData.area4.intAnalysis.map(item => item.analysis)
  351. // 各二级企业招聘需求公告人次情况
  352. dataR1[0] = []
  353. dataR1[1] = []
  354. res.orgData.area4.card1.forEach(item => {
  355. dataR1[0].push(item['ZBPZ0057'])
  356. dataR1[1].push(item['ZBPZ0058'])
  357. })
  358. // 各二级企业录用结果公示人次
  359. dataR2[0] = []
  360. dataR2[1] = []
  361. res.orgData.area4.card2.forEach(item => {
  362. dataR2[0].push(item['ZBPZ0059'])
  363. dataR2[1].push(item['ZBPZ0060'])
  364. })
  365. // 各二级企业年利润与招聘情况分析
  366. dataR3[0] = []
  367. dataR3[1] = []
  368. res.orgData.area4.card3.forEach(item => {
  369. dataR3[0].push(item['ZBPZ0054'])
  370. dataR3[1].push(item['ZBPZ0055'])
  371. })
  372. // 各二级企业"退二进一"完成情况
  373. dataR4[0] = []
  374. dataR4[1] = []
  375. res.orgData.area4.card4.forEach(item => {
  376. dataR4[0].push(item['ZBPZ0056'])
  377. dataR4[1].push(item['ZBPZ0055'])
  378. })
  379. // 定薪酬
  380. // 弹窗
  381. tipData.analysis[5] = res.orgData.area5.intAnalysis.map(item => item.analysis)
  382. // 各二级企业在岗职工平均薪酬
  383. dataR5[0] = []
  384. dataR5[1] = []
  385. res.orgData.area5.card1.forEach(item => {
  386. dataR5[0].push(item['ZBPZ0063'])
  387. dataR5[1].push(item['ZBPZ0064'])
  388. })
  389. // 各二级企业利润与薪酬变动情况
  390. dataR6[0] = []
  391. dataR6[1] = []
  392. res.orgData.area5.card2.forEach(item => {
  393. dataR6[0].push(item['ZBPZ0061'])
  394. dataR6[1].push(item['ZBPZ0062'])
  395. })
  396. // 定任期
  397. // 弹窗
  398. tipData.analysis[6] = res.orgData.area6.intAnalysis.map(item => item.analysis)
  399. // 各二级企业全员绩效考核
  400. dataR7[0] = []
  401. res.orgData.area6.card1.forEach(item => {
  402. dataR7[0].push(item['ZBPZ0066'])
  403. })
  404. // 各二级企业任期制契约化考核完成率
  405. dataR8[0] = []
  406. res.orgData.area6.card2.forEach(item => {
  407. dataR8[0].push(item['ZBPZ0065'])
  408. })
  409. // 中间
  410. // 架岗人员
  411. this.centerData.info.value1 = res.orgData.area7.ZBPZ0037
  412. this.centerData.info.value2 = res.orgData.area7.ZBPZ0038
  413. this.centerData.info.value3 = res.orgData.area7.ZBPZ0006
  414. // 六定改革成效
  415. this.centerData.changeInfo[0].value1 = res.orgData.area8.ZBPZ0067
  416. this.centerData.changeInfo[0].value2 = res.orgData.area8.ZBPZ0068
  417. this.centerData.changeInfo[0].value3 = res.orgData.area8.ZBPZ0069
  418. this.centerData.changeInfo[2].value1 = res.orgData.area8.ZBPZ0074
  419. this.centerData.changeInfo[2].value2 = res.orgData.area8.ZBPZ0075
  420. this.centerData.changeInfo[2].value3 = res.orgData.area8.ZBPZ0076
  421. this.centerData.changeInfo[1].value1 = res.orgData.area8.ZBPZ0071
  422. this.centerData.changeInfo[1].value2 = res.orgData.area8.ZBPZ0072
  423. this.centerData.changeInfo[1].value3 = res.orgData.area8.ZBPZ0073
  424. // 核心指标监测
  425. // 弹窗
  426. tipData.analysis[3] = res.orgData.area9.intAnalysis.map(item => item.analysis)
  427. // 各二级企业全员劳动生产率
  428. dataC1[0] = []
  429. dataC1[1] = []
  430. res.orgData.area9.card1.forEach(item => {
  431. dataC1[0].push(item['ZBPZ0035'])
  432. dataC1[1].push(item['ZBPZ0039'])
  433. })
  434. // 各二级企业人工成本利润率
  435. dataC2[1] = []
  436. dataC2[0] = []
  437. res.orgData.area9.card2.forEach(item => {
  438. dataC2[1].push(item['ZBPZ0040'])
  439. dataC2[0].push(item['ZBPZ0041'])
  440. })
  441. this.echartC1.national = res.orgData.area9.card1[0].ZBPZ0097
  442. this.echartC1.province = res.orgData.area9.card1[0].ZBPZ0096
  443. this.echartC2.national = res.orgData.area9.card2[0].ZBPZ0099
  444. this.echartC2.province = res.orgData.area9.card2[0].ZBPZ0098
  445. // 分析预警中心
  446. // 工作台分析
  447. this.storageRecordConfig.data = []
  448. res.orgData.area10.card1.forEach(item => {
  449. this.storageRecordConfig.data.push(['<span class="lightOut"><span class="light ' + (item.lightsup === '0' ? 'red' : item.lightsup === '1' ? 'yellow' : 'green') + '"></span></span>', item.enterprise, item.work])
  450. })
  451. this.storageRecordConfig = { ...this.storageRecordConfig }
  452. // 数据库预警
  453. // this.storageRecordConfig2.data = []
  454. // res.orgData.area10.card2.forEach(item => {
  455. // this.storageRecordConfig.data.push(['<span class="lightOut"><span class="light ' + (item.lightsup === '0' ? 'red' : item.lightsup === '1' ? 'yellow' : 'green') + '"></span></span>', item.warning, item.date])
  456. // })
  457. // 数据整理
  458. dataL7[0].forEach((item, index) => {
  459. if (dataL7[1][index] < 0 && dataL7[0][index] > 0) {
  460. let obj = { value: [this.companyList[index].name, dataL7[0][index]], symbolSize: 15 }
  461. this.twinkle7.push(obj)
  462. }
  463. })
  464. // if (dataL8[1][params.dataIndex] < 0 && params.value > 0) {
  465. dataL8[0].forEach((item, index) => {
  466. if (dataL8[1][index] < 0 && dataL8[0][index] > 0) {
  467. let obj = { value: [this.companyList[index].name, dataL8[0][index]], symbolSize: 15 }
  468. this.twinkle8.push(obj)
  469. }
  470. })
  471. // params.value > 0 && fjxdataL2[0][params.dataIndex] < 0
  472. // fjxdataL2[0].forEach((item, index) => {
  473. // if (fjxdataL2[1][index] > 0 && fjxdataL2[0][index] < 0) {
  474. // let obj = { value: [this.companyList[index].name, fjxdataL2[1][index]], symbolSize: 15 }
  475. // this.twinkleR6.push(obj)
  476. // }
  477. // })
  478. this.generateEcharts()
  479. if (this.companyList.length > 18) {
  480. this.timeCommon = setInterval(() => {
  481. if (that.touch) {
  482. if (that.commonOption.dataZoom[0].startValue < that.companyList.length) {
  483. that.commonOption.dataZoom[0].endValue += 18
  484. that.commonOption.dataZoom[0].startValue += 18
  485. } else {
  486. that.commonOption.dataZoom[0].endValue = 0
  487. that.commonOption.dataZoom[0].startValue = 18
  488. }
  489. that.generateEcharts()
  490. }
  491. }, 15000)
  492. }
  493. resolve(1)
  494. })
  495. });
  496. },
  497. handleShowTip (index) {
  498. this.showTip = true
  499. this.tipNum = index
  500. },
  501. handleGoPage (id, name) {
  502. if (name == '山西三元煤业股份有限公司') {
  503. window.location.href = './index4SY.html?id=' + id + `&access_token=${this.access_token}` + `&name=${name}`
  504. } else {
  505. window.location.href = './index4.html?id=' + id + `&access_token=${this.access_token}` + `&name=${name}`
  506. }
  507. },
  508. handleGoBack () {
  509. window.history.go(-1)
  510. },
  511. numFormat (value) {
  512. if (!value) return '0'
  513. // var intPart = Number(value).toFixed(0) // 获取整数部分
  514. var intPart = parseInt(value)// 获取整数部分
  515. var intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') // 将整数部分逢三一断
  516. var floatPart = '.00' // 预定义小数部分
  517. var value2Array = value.toString().split('.')
  518. // =2表示数据有小数位
  519. if (value2Array.length === 2) {
  520. floatPart = value2Array[1].toString() // 拿到小数部分
  521. if (floatPart.length === 1) {
  522. // 补0
  523. return intPartFormat + '.' + floatPart + '0'
  524. } else {
  525. return intPartFormat + '.' + floatPart
  526. }
  527. } else {
  528. return intPartFormat
  529. }
  530. },
  531. initChartL1 () {
  532. let myChart = echarts.init(this.$refs['echartL1'])
  533. let option = {
  534. ..._.cloneDeep(this.commonOption),
  535. color: [
  536. {
  537. x: 0,
  538. y: 0,
  539. x2: 0,
  540. y2: 1,
  541. colorStops: [{
  542. offset: 0,
  543. color: '#5e7ae9',
  544. },
  545. {
  546. offset: 1,
  547. color: '#082550',
  548. },],
  549. }
  550. ],
  551. series: [
  552. {
  553. name: '六个三级企业本部机构数核定上限',
  554. type: 'line',
  555. // yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
  556. smooth: true, //平滑曲线显示
  557. showAllSymbol: true, //显示所有图形。
  558. symbol: 'circle', //标记的图形为实心圆
  559. symbolSize: 8, //标记的大小
  560. smooth: false,
  561. itemStyle: {
  562. //折线拐点标志的样式
  563. color: '#fbe138',
  564. borderColor: '#fbe138',
  565. width: 2,
  566. shadowColor: '#fbe138',
  567. shadowBlur: 4,
  568. },
  569. lineStyle: {
  570. color: '#fbe138',
  571. width: 2,
  572. },
  573. data: dataL1[2],
  574. },
  575. {
  576. name: '六定改革前各三级企业本部机构数',
  577. type: 'bar',
  578. barWidth: 15,
  579. itemStyle: {
  580. normal: {
  581. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  582. {
  583. offset: 0,
  584. color: '#43ede3',
  585. },
  586. {
  587. offset: 1,
  588. color: '#082550',
  589. },
  590. ]),
  591. },
  592. },
  593. data: dataL1[0],
  594. },
  595. {
  596. name: '当前各三级企业本部机构数',
  597. type: 'bar',
  598. barWidth: 15,
  599. itemStyle: {
  600. normal: {
  601. color: params => {
  602. if (params.value > dataL1[2][params.dataIndex]) {
  603. return 'yellow'
  604. } else {
  605. return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  606. {
  607. offset: 0,
  608. color: '#5e7ae9',
  609. },
  610. {
  611. offset: 1,
  612. color: '#082550',
  613. },
  614. ])
  615. }
  616. },
  617. },
  618. },
  619. data: dataL1[1],
  620. },
  621. ],
  622. // tooltip: {
  623. // trigger: 'item',
  624. // position: 'top'
  625. // },
  626. }
  627. option.title.text = '本部机构数'
  628. option.legend.data = ['六定改革前各三级企业本部机构数', '当前各三级企业本部机构数', '六个三级企业本部机构数核定上限']
  629. option.yAxis.push({
  630. splitLine: {
  631. show: false,
  632. },
  633. axisLine: {
  634. show: false,
  635. },
  636. })
  637. myChart.setOption(option)
  638. },
  639. initChartL2 () {
  640. let myChart = echarts.init(this.$refs['echartL2'])
  641. let option = {
  642. ..._.cloneDeep(this.commonOption),
  643. color: [
  644. {
  645. x: 0,
  646. y: 0,
  647. x2: 0,
  648. y2: 1,
  649. colorStops: [{
  650. offset: 0,
  651. color: '#69c0ff',
  652. },
  653. {
  654. offset: 1,
  655. color: '#082550',
  656. },],
  657. }
  658. ],
  659. series: [
  660. {
  661. name: '当前各三级企业所属架构数',
  662. type: 'bar',
  663. barWidth: 15,
  664. itemStyle: {
  665. normal: {
  666. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  667. {
  668. offset: 0,
  669. color: '#69c0ff',
  670. },
  671. {
  672. offset: 1,
  673. color: '#082550',
  674. },
  675. ]),
  676. },
  677. },
  678. data: dataL2[0]
  679. }
  680. ],
  681. }
  682. option.title.text = '各三级企业所属架构数'
  683. option.legend.data = ['当前各三级企业所属架构数']
  684. option.yAxis.push({
  685. splitLine: {
  686. show: false,
  687. },
  688. axisLine: {
  689. show: false,
  690. },
  691. })
  692. myChart.setOption(option)
  693. },
  694. initChartL3 () {
  695. let myChart = echarts.init(this.$refs['echartL3'])
  696. let option = {
  697. ..._.cloneDeep(this.commonOption),
  698. color: [
  699. {
  700. x: 0,
  701. y: 0,
  702. x2: 0,
  703. y2: 1,
  704. colorStops: [{
  705. offset: 0,
  706. color: '#6480f3',
  707. },
  708. {
  709. offset: 1,
  710. color: '#082550',
  711. },],
  712. }
  713. ],
  714. series: [
  715. {
  716. name: '六定改革前各三级本部中层管理人数',
  717. type: 'bar',
  718. barWidth: 15,
  719. label: {
  720. normal: {
  721. show: true,
  722. position: 'top',
  723. textStyle: {
  724. color: '#69c0ff',
  725. fontStyle: 'normal',
  726. textAlign: 'left',
  727. fontSize: 16,
  728. },
  729. formatter: function (data) {
  730. if (data.name == '云时代') {
  731. return data.value
  732. } else {
  733. return ''
  734. }
  735. }
  736. }
  737. },
  738. itemStyle: {
  739. normal: {
  740. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  741. {
  742. offset: 0,
  743. color: '#6480f3',
  744. },
  745. {
  746. offset: 1,
  747. color: '#082550',
  748. },
  749. ]),
  750. },
  751. },
  752. data: dataL4[0],
  753. },
  754. {
  755. name: '当前各三级本部中层管理人数',
  756. type: 'bar',
  757. barWidth: 15,
  758. label: {
  759. normal: {
  760. show: true,
  761. position: 'top',
  762. textStyle: {
  763. color: '#6480f3',
  764. fontStyle: 'normal',
  765. textAlign: 'left',
  766. fontSize: 16,
  767. },
  768. formatter: function (data) {
  769. if (data.name == '云时代') {
  770. return data.value
  771. } else {
  772. return ''
  773. }
  774. }
  775. }
  776. },
  777. itemStyle: {
  778. normal: {
  779. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  780. {
  781. offset: 0,
  782. color: '#43ede3',
  783. },
  784. {
  785. offset: 1,
  786. color: '#082550',
  787. },
  788. ]),
  789. },
  790. },
  791. data: dataL4[1],
  792. },
  793. {
  794. name: '各三级本部中层管理人数核定上限',
  795. type: 'line',
  796. // yAxisIndex: 1,
  797. smooth: true, //平滑曲线显示
  798. showAllSymbol: true, //显示所有图形。
  799. symbol: 'circle', //标记的图形为实心圆
  800. symbolSize: 8, //标记的大小
  801. smooth: false,
  802. label: {
  803. normal: {
  804. show: true,
  805. position: 'top',
  806. textStyle: {
  807. color: '#fbe138',
  808. fontStyle: 'normal',
  809. textAlign: 'left',
  810. fontSize: 16,
  811. },
  812. formatter: function (data) {
  813. if (data.name == '云时代') {
  814. return data.value
  815. } else {
  816. return ''
  817. }
  818. }
  819. }
  820. },
  821. itemStyle: {
  822. //折线拐点标志的样式
  823. color: '#fbe138',
  824. borderColor: '#fbe138',
  825. width: 2,
  826. shadowColor: '#fbe138',
  827. shadowBlur: 4,
  828. },
  829. lineStyle: {
  830. color: '#fbe138',
  831. width: 2,
  832. },
  833. data: dataL4[2],
  834. },
  835. ],
  836. }
  837. option.title.text = '各三级企业本部中层管理人数'
  838. option.legend.data = ['六定改革前各三级本部中层管理人数', '当前各三级本部中层管理人数', '各三级本部中层管理人数核定上限']
  839. option.yAxis.push({
  840. type: 'value',
  841. axisLine: {
  842. show: false,
  843. },
  844. splitLine: {
  845. show: false,
  846. },
  847. })
  848. myChart.setOption(option)
  849. },
  850. initChartL4 () {
  851. let myChart = echarts.init(this.$refs['echartL4'])
  852. let option = {
  853. ..._.cloneDeep(this.commonOption),
  854. color: [
  855. {
  856. x: 0,
  857. y: 0,
  858. x2: 0,
  859. y2: 1,
  860. colorStops: [{
  861. offset: 0,
  862. color: '#6480f3',
  863. },
  864. {
  865. offset: 1,
  866. color: '#082550',
  867. },],
  868. }
  869. ],
  870. series: [
  871. {
  872. name: '六定改革前各三级本部中层管理人数',
  873. type: 'bar',
  874. barWidth: 15,
  875. label: {
  876. normal: {
  877. show: true,
  878. position: 'top',
  879. textStyle: {
  880. color: '#69c0ff',
  881. fontStyle: 'normal',
  882. textAlign: 'left',
  883. fontSize: 16,
  884. },
  885. formatter: function (data) {
  886. if (data.name == '云时代') {
  887. return data.value
  888. } else {
  889. return ''
  890. }
  891. }
  892. }
  893. },
  894. itemStyle: {
  895. normal: {
  896. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  897. {
  898. offset: 0,
  899. color: '#6480f3',
  900. },
  901. {
  902. offset: 1,
  903. color: '#082550',
  904. },
  905. ]),
  906. },
  907. },
  908. data: dataL4[0],
  909. },
  910. {
  911. name: '当前各三级本部中层管理人数',
  912. type: 'bar',
  913. barWidth: 15,
  914. label: {
  915. normal: {
  916. show: true,
  917. position: 'top',
  918. textStyle: {
  919. color: '#6480f3',
  920. fontStyle: 'normal',
  921. textAlign: 'left',
  922. fontSize: 16,
  923. },
  924. formatter: function (data) {
  925. if (data.name == '云时代') {
  926. return data.value
  927. } else {
  928. return ''
  929. }
  930. }
  931. }
  932. },
  933. itemStyle: {
  934. normal: {
  935. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  936. {
  937. offset: 0,
  938. color: '#43ede3',
  939. },
  940. {
  941. offset: 1,
  942. color: '#082550',
  943. },
  944. ]),
  945. },
  946. },
  947. data: dataL4[1],
  948. },
  949. {
  950. name: '各三级本部中层管理人数核定上限',
  951. type: 'line',
  952. // yAxisIndex: 1,
  953. smooth: true, //平滑曲线显示
  954. showAllSymbol: true, //显示所有图形。
  955. symbol: 'circle', //标记的图形为实心圆
  956. symbolSize: 8, //标记的大小
  957. smooth: false,
  958. label: {
  959. normal: {
  960. show: true,
  961. position: 'top',
  962. textStyle: {
  963. color: '#fbe138',
  964. fontStyle: 'normal',
  965. textAlign: 'left',
  966. fontSize: 16,
  967. },
  968. formatter: function (data) {
  969. if (data.name == '云时代') {
  970. return data.value
  971. } else {
  972. return ''
  973. }
  974. }
  975. }
  976. },
  977. itemStyle: {
  978. //折线拐点标志的样式
  979. color: '#fbe138',
  980. borderColor: '#fbe138',
  981. width: 2,
  982. shadowColor: '#fbe138',
  983. shadowBlur: 4,
  984. },
  985. lineStyle: {
  986. color: '#fbe138',
  987. width: 2,
  988. },
  989. data: dataL4[2],
  990. },
  991. ],
  992. }
  993. option.title.text = '各三级企业本部中层管理人数'
  994. option.legend.data = ['六定改革前各三级本部中层管理人数', '当前各三级本部中层管理人数', '各三级本部中层管理人数核定上限']
  995. option.legend.show = true
  996. // option.yAxis.push({
  997. // splitLine: {
  998. // show: false,
  999. // },
  1000. // axisLine: {
  1001. // show: false,
  1002. // },
  1003. // })
  1004. myChart.setOption(option)
  1005. },
  1006. initChartL5 () {
  1007. let myChart = echarts.init(this.$refs['echartL5'])
  1008. let option = {
  1009. ..._.cloneDeep(this.commonOption),
  1010. color: [
  1011. {
  1012. x: 0,
  1013. y: 0,
  1014. x2: 0,
  1015. y2: 1,
  1016. colorStops: [{
  1017. offset: 0,
  1018. color: '#69c0ff',
  1019. },
  1020. {
  1021. offset: 1,
  1022. color: '#082550',
  1023. },],
  1024. }
  1025. ],
  1026. series: [
  1027. {
  1028. name: '各三级企业总人数',
  1029. type: 'bar',
  1030. barWidth: 15,
  1031. itemStyle: {
  1032. normal: {
  1033. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1034. {
  1035. offset: 0,
  1036. color: '#69c0ff',
  1037. },
  1038. {
  1039. offset: 1,
  1040. color: '#082550',
  1041. },
  1042. ]),
  1043. },
  1044. },
  1045. data: dataL5[0],
  1046. },
  1047. {
  1048. name: '人数变化率',
  1049. type: 'line',
  1050. yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
  1051. smooth: true, //平滑曲线显示
  1052. showAllSymbol: true, //显示所有图形。
  1053. symbol: 'circle', //标记的图形为实心圆
  1054. symbolSize: 8, //标记的大小
  1055. smooth: false,
  1056. itemStyle: {
  1057. //折线拐点标志的样式
  1058. color: '#b889ea',
  1059. borderColor: '#b889ea',
  1060. width: 2,
  1061. shadowColor: '#b889ea',
  1062. shadowBlur: 4,
  1063. },
  1064. lineStyle: {
  1065. color: '#b889ea',
  1066. width: 2,
  1067. },
  1068. data: dataL5[1],
  1069. },
  1070. ],
  1071. }
  1072. option.title.text = '各三级企业总人数'
  1073. option.legend.data = ['各三级企业总人数', '人数变化率']
  1074. option.legend.show = true
  1075. option.tooltip = {
  1076. trigger: 'axis',
  1077. formatter: '{a0}:{c0}' + '<br/>' + '{a1}:{c1}' + '%'
  1078. }
  1079. option.yAxis.push({
  1080. type: 'value',
  1081. axisLine: {
  1082. show: false,
  1083. },
  1084. splitLine: {
  1085. show: false,
  1086. },
  1087. axisLabel: {
  1088. show: true,
  1089. formatter: '{value} %',
  1090. textStyle: {
  1091. color: 'rgba(250,250,250,0.6)',
  1092. },
  1093. },
  1094. })
  1095. myChart.setOption(option)
  1096. },
  1097. initChartL6 () {
  1098. let myChart = echarts.init(this.$refs['echartL6'])
  1099. let option = {
  1100. ..._.cloneDeep(this.commonOption),
  1101. color: [
  1102. {
  1103. x: 0,
  1104. y: 0,
  1105. x2: 0,
  1106. y2: 1,
  1107. colorStops: [{
  1108. offset: 0,
  1109. color: '#43ede3',
  1110. },
  1111. {
  1112. offset: 1,
  1113. color: '#082550',
  1114. },],
  1115. }
  1116. ],
  1117. series: [
  1118. {
  1119. name: '各三级企业本部员额数',
  1120. type: 'bar',
  1121. barWidth: 15,
  1122. itemStyle: {
  1123. color: params => {
  1124. if (params.value > dataL6[1][params.dataIndex]) {
  1125. return 'red'
  1126. } else {
  1127. return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1128. {
  1129. offset: 0,
  1130. color: '#43ede3',
  1131. },
  1132. {
  1133. offset: 1,
  1134. color: '#082550',
  1135. },
  1136. ])
  1137. }
  1138. },
  1139. },
  1140. data: dataL6[0],
  1141. },
  1142. {
  1143. name: '六定改革前各三级企业本部员额数',
  1144. type: 'bar',
  1145. barWidth: 15,
  1146. itemStyle: {
  1147. normal: {
  1148. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1149. {
  1150. offset: 0,
  1151. color: '#5e7ae9',
  1152. },
  1153. {
  1154. offset: 1,
  1155. color: '#082550',
  1156. },
  1157. ]),
  1158. },
  1159. },
  1160. data: dataL6[2],
  1161. },
  1162. {
  1163. name: '各三级企业本部员额数核定上限',
  1164. type: 'line',
  1165. yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
  1166. smooth: true, //平滑曲线显示
  1167. showAllSymbol: true, //显示所有图形。
  1168. symbol: 'circle', //标记的图形为实心圆
  1169. symbolSize: 8, //标记的大小
  1170. smooth: false,
  1171. itemStyle: {
  1172. //折线拐点标志的样式
  1173. color: '#fbe138',
  1174. borderColor: '#fbe138',
  1175. width: 2,
  1176. shadowColor: '#fbe138',
  1177. shadowBlur: 4,
  1178. },
  1179. lineStyle: {
  1180. color: '#fbe138',
  1181. width: 2,
  1182. },
  1183. data: dataL6[1],
  1184. },
  1185. ],
  1186. }
  1187. option.title.text = '各三级企业本部员额数'
  1188. option.legend.data = ['各三级企业本部员额数', '六定改革前各三级企业本部员额数', '各三级企业本部员额数核定上限']
  1189. option.legend.show = true
  1190. option.yAxis.push({
  1191. splitLine: {
  1192. show: false,
  1193. },
  1194. axisLine: {
  1195. show: false,
  1196. },
  1197. })
  1198. myChart.setOption(option)
  1199. },
  1200. initChartL7 () {
  1201. let myChart = echarts.init(this.$refs['echartL7'])
  1202. let option = {
  1203. ..._.cloneDeep(this.commonOption),
  1204. color: ['#43ede3'],
  1205. series: [
  1206. {
  1207. name: '人数变化',
  1208. type: 'line',
  1209. barWidth: 15,
  1210. showAllSymbol: true, //显示所有图形。
  1211. symbol: 'circle', //标记的图形为实心圆
  1212. symbolSize: 15, //标记的大小
  1213. smooth: false,
  1214. itemStyle: {
  1215. color: params => {
  1216. if (dataL7[1][params.dataIndex] < 0 && params.value > 0) {
  1217. return 'red'
  1218. } else {
  1219. return '#43ede3'
  1220. }
  1221. },
  1222. },
  1223. // markLine: {
  1224. // data: [{ type: 'average', name: 'Avg' }],
  1225. // },
  1226. data: dataL7[0],
  1227. },
  1228. {
  1229. name: '全员劳动生产率同比变化',
  1230. type: 'line',
  1231. barWidth: 15,
  1232. // yAxisIndex: 1,
  1233. showAllSymbol: true, //显示所有图形。
  1234. symbol: 'circle', //标记的图形为实心圆
  1235. symbolSize: 15, //标记的大小
  1236. smooth: false,
  1237. itemStyle: {
  1238. //折线拐点标志的样式
  1239. color: '#b889ea',
  1240. borderColor: '#b889ea',
  1241. width: 2,
  1242. shadowColor: '#b889ea',
  1243. shadowBlur: 4,
  1244. },
  1245. data: dataL7[1],
  1246. },
  1247. {
  1248. type: 'effectScatter',
  1249. coordinateSystem: 'cartesian2d',
  1250. showEffectOn: 'render',
  1251. rippleEffect: {
  1252. period: 10,
  1253. scale: 4,
  1254. brushType: 'stroke'
  1255. },
  1256. hoverAnimation: true,
  1257. itemStyle: {
  1258. color: 'red'
  1259. },
  1260. lineStyle: {
  1261. color: '#43ede3',
  1262. width: 2,
  1263. },
  1264. data: this.twinkle7,
  1265. },
  1266. ],
  1267. }
  1268. option.title.text = '人数变化和全员劳动生产率变化率分析'
  1269. option.legend.data = ['人数变化', '全员劳动生产率同比变化']
  1270. option.legend.show = true
  1271. option.tooltip = {
  1272. trigger: 'axis',
  1273. formatter: '{a0}:{c0}' + '%' + '<br/>' + '{a1}:{c1}' + '%'
  1274. }
  1275. option.yAxis = [
  1276. {
  1277. type: 'value',
  1278. axisLine: {
  1279. show: false,
  1280. },
  1281. splitLine: {
  1282. show: true,
  1283. lineStyle: {
  1284. color: '#68b4dd66',
  1285. type: 'dashed',
  1286. },
  1287. },
  1288. axisLabel: {
  1289. show: true,
  1290. formatter: '{value} %',
  1291. textStyle: {
  1292. color: 'rgba(250,250,250,0.6)',
  1293. },
  1294. },
  1295. },
  1296. {
  1297. type: 'value',
  1298. axisLine: {
  1299. show: false,
  1300. },
  1301. splitLine: {
  1302. show: false,
  1303. },
  1304. axisLabel: {
  1305. show: true,
  1306. formatter: '{value} %',
  1307. textStyle: {
  1308. color: 'rgba(250,250,250,0.6)',
  1309. },
  1310. },
  1311. }
  1312. ]
  1313. myChart.setOption(option)
  1314. },
  1315. initChartL8 () {
  1316. let myChart = echarts.init(this.$refs['echartL8'])
  1317. let option = {
  1318. ..._.cloneDeep(this.commonOption),
  1319. color: ['#43ede3'],
  1320. series: [
  1321. {
  1322. name: '人数变化',
  1323. type: 'line',
  1324. barWidth: 15,
  1325. showAllSymbol: true, //显示所有图形。
  1326. symbol: 'circle', //标记的图形为实心圆
  1327. symbolSize: 15, //标记的大小
  1328. smooth: false,
  1329. itemStyle: {
  1330. color: params => {
  1331. if (dataL8[1][params.dataIndex] < 0 && params.value > 0) {
  1332. return 'red'
  1333. } else {
  1334. return '#43ede3'
  1335. }
  1336. },
  1337. },
  1338. lineStyle: {
  1339. color: '#43ede3',
  1340. width: 2,
  1341. },
  1342. // markLine: {
  1343. // data: [{ type: 'average', name: 'Avg' }],
  1344. // },
  1345. data: dataL8[0],
  1346. },
  1347. {
  1348. name: '人工成本利润率同比变化',
  1349. type: 'line',
  1350. barWidth: 15,
  1351. // yAxisIndex: 1,
  1352. showAllSymbol: true, //显示所有图形。
  1353. symbol: 'circle', //标记的图形为实心圆
  1354. symbolSize: 15, //标记的大小
  1355. smooth: false,
  1356. itemStyle: {
  1357. //折线拐点标志的样式
  1358. color: '#b889ea',
  1359. borderColor: '#b889ea',
  1360. width: 2,
  1361. shadowColor: '#b889ea',
  1362. shadowBlur: 4,
  1363. },
  1364. data: dataL8[1],
  1365. },
  1366. {
  1367. type: 'effectScatter',
  1368. coordinateSystem: 'cartesian2d',
  1369. showEffectOn: 'render',
  1370. rippleEffect: {
  1371. period: 10,
  1372. scale: 4,
  1373. brushType: 'stroke'
  1374. },
  1375. hoverAnimation: true,
  1376. itemStyle: {
  1377. color: 'red'
  1378. },
  1379. lineStyle: {
  1380. color: '#43ede3',
  1381. width: 2,
  1382. },
  1383. data: this.twinkle8,
  1384. },
  1385. ],
  1386. }
  1387. option.title.text = '人数变化和人工利润率变化分析'
  1388. option.legend.data = ['人数变化', '人工成本利润率同比变化']
  1389. option.legend.show = true
  1390. option.tooltip = {
  1391. trigger: 'axis',
  1392. formatter: '{a0}:{c0}' + '%' + '<br/>' + '{a1}:{c1}' + '%'
  1393. }
  1394. option.yAxis = [
  1395. {
  1396. type: 'value',
  1397. axisLine: {
  1398. show: false,
  1399. },
  1400. splitLine: {
  1401. show: true,
  1402. lineStyle: {
  1403. color: '#68b4dd66',
  1404. type: 'dashed',
  1405. },
  1406. },
  1407. axisLabel: {
  1408. show: true,
  1409. formatter: '{value} %',
  1410. textStyle: {
  1411. color: 'rgba(250,250,250,0.6)',
  1412. },
  1413. },
  1414. },
  1415. {
  1416. type: 'value',
  1417. axisLine: {
  1418. show: false,
  1419. },
  1420. splitLine: {
  1421. show: false,
  1422. },
  1423. axisLabel: {
  1424. show: true,
  1425. formatter: '{value} %',
  1426. textStyle: {
  1427. color: 'rgba(250,250,250,0.6)',
  1428. },
  1429. },
  1430. }
  1431. ]
  1432. myChart.setOption(option)
  1433. },
  1434. // 中间图表---------------------------------------------开始
  1435. initChartC1 () {
  1436. let myChart = echarts.init(this.$refs['echartC1'])
  1437. let option = {
  1438. ..._.cloneDeep(this.commonOption),
  1439. color: [
  1440. {
  1441. x: 0,
  1442. y: 0,
  1443. x2: 0,
  1444. y2: 1,
  1445. colorStops: [{
  1446. offset: 0,
  1447. color: '#69c0ff',
  1448. },
  1449. {
  1450. offset: 1,
  1451. color: '#082550',
  1452. },],
  1453. }
  1454. ],
  1455. series: [
  1456. {
  1457. name: '全员劳动生产率(万/人)',
  1458. type: 'bar',
  1459. barWidth: 12,
  1460. smooth: true, //平滑曲线显示
  1461. showAllSymbol: true, //显示所有图形。
  1462. symbol: 'circle', //标记的图形为实心圆
  1463. symbolSize: 8, //标记的大小
  1464. smooth: false,
  1465. itemStyle: {
  1466. color: params => {
  1467. if (params.value < 0 && dataC1[1][params.dataIndex] < 0) {
  1468. return 'red'
  1469. } else if (params.value > this.echartC1.province) {
  1470. return 'green'
  1471. } else {
  1472. return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1473. {
  1474. offset: 0,
  1475. color: '#69c0ff',
  1476. },
  1477. {
  1478. offset: 1,
  1479. color: '#082550',
  1480. },
  1481. ])
  1482. }
  1483. },
  1484. },
  1485. lineStyle: {
  1486. color: '#B889EA',
  1487. width: 2,
  1488. },
  1489. data: dataC1[0],
  1490. markLine: {
  1491. data: [
  1492. {
  1493. name: '省属企业平均水平',
  1494. yAxis: this.echartC1.national,
  1495. lineStyle: {
  1496. color: '#fff',
  1497. },
  1498. label: {
  1499. formatter: '{b}',
  1500. position: 'end',
  1501. padding: [20, 100, 10, 30],
  1502. color: '#fff',
  1503. },
  1504. },
  1505. {
  1506. name: '央企平均水平',
  1507. yAxis: this.echartC1.province,
  1508. lineStyle: {
  1509. color: '#fff',
  1510. },
  1511. label: {
  1512. formatter: '{b}',
  1513. position: 'end',
  1514. padding: [-4, 150, 10, 30],
  1515. color: '#fff',
  1516. },
  1517. },
  1518. ],
  1519. label: {
  1520. distance: [20, 8],
  1521. },
  1522. },
  1523. },
  1524. {
  1525. name: '全员劳动生产率同比变化',
  1526. yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
  1527. type: 'line',
  1528. itemStyle: {
  1529. normal: {
  1530. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1531. {
  1532. offset: 0,
  1533. color: '#69c0ff',
  1534. },
  1535. {
  1536. offset: 1,
  1537. color: '#082550',
  1538. },
  1539. ]),
  1540. },
  1541. },
  1542. data: dataC1[1],
  1543. },
  1544. ],
  1545. }
  1546. option.title.text = '各三级企业全员劳动生产率'
  1547. option.legend.data = ['全员劳动生产率(万/人)', '全员劳动生产率同比变化']
  1548. option.legend.show = true
  1549. option.grid.right = '15%'
  1550. option.tooltip = {
  1551. trigger: 'axis',
  1552. formatter: '{a0}:{c0}' + '<br/>' + '{a1}:{c1}' + '%'
  1553. }
  1554. option.yAxis.push({
  1555. type: 'value',
  1556. axisLine: {
  1557. show: false,
  1558. },
  1559. splitLine: {
  1560. show: false,
  1561. },
  1562. axisLabel: {
  1563. show: true,
  1564. formatter: '{value} %',
  1565. textStyle: {
  1566. color: 'rgba(250,250,250,0.6)',
  1567. },
  1568. },
  1569. })
  1570. myChart.setOption(option)
  1571. tools.loopShowTooltip(myChart, option, {
  1572. nterval: 2000,
  1573. loopSeries: true,
  1574. });
  1575. },
  1576. initChartC2 () {
  1577. let myChart = echarts.init(this.$refs['echartC2'])
  1578. let option = {
  1579. ..._.cloneDeep(this.commonOption),
  1580. color: [
  1581. {
  1582. x: 0,
  1583. y: 0,
  1584. x2: 0,
  1585. y2: 1,
  1586. colorStops: [{
  1587. offset: 0,
  1588. color: '#69c0ff',
  1589. },
  1590. {
  1591. offset: 1,
  1592. color: '#082550',
  1593. },],
  1594. }
  1595. ],
  1596. series: [
  1597. {
  1598. name: '人工成本利润率同比变化',
  1599. type: 'line',
  1600. yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
  1601. smooth: true, //平滑曲线显示
  1602. showAllSymbol: true, //显示所有图形。
  1603. symbol: 'circle', //标记的图形为实心圆
  1604. symbolSize: 8, //标记的大小
  1605. smooth: false,
  1606. itemStyle: {
  1607. //折线拐点标志的样式
  1608. color: '#B889EA',
  1609. borderColor: '#B889EA',
  1610. width: 2,
  1611. shadowColor: '#B889EA',
  1612. shadowBlur: 4,
  1613. },
  1614. lineStyle: {
  1615. color: '#B889EA',
  1616. width: 2,
  1617. },
  1618. data: dataC2[0],
  1619. },
  1620. {
  1621. name: '人工成本利润率',
  1622. type: 'bar',
  1623. barWidth: 15,
  1624. itemStyle: {
  1625. color: params => {
  1626. if (params.value < 0 && dataC2[1][params.dataIndex] < 0) {
  1627. return 'red'
  1628. } else if (params.value > this.echartC2.province) {
  1629. return 'green'
  1630. } else {
  1631. return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1632. {
  1633. offset: 0,
  1634. color: '#69c0ff',
  1635. },
  1636. {
  1637. offset: 1,
  1638. color: '#082550',
  1639. },
  1640. ])
  1641. }
  1642. },
  1643. },
  1644. data: dataC2[1],
  1645. markLine: {
  1646. data: [
  1647. {
  1648. name: '省属企业平均水平',
  1649. yAxis: this.echartC2.province,
  1650. lineStyle: {
  1651. color: '#fff',
  1652. },
  1653. label: {
  1654. formatter: '{b}',
  1655. position: 'end',
  1656. padding: [24, 100, 10, 30],
  1657. color: '#fff',
  1658. },
  1659. },
  1660. {
  1661. name: '央企平均水平',
  1662. yAxis: this.echartC2.national,
  1663. lineStyle: {
  1664. color: '#fff',
  1665. },
  1666. label: {
  1667. formatter: '{b}',
  1668. position: 'end',
  1669. padding: [-24, 200, 10, 30],
  1670. color: '#fff',
  1671. },
  1672. },
  1673. ],
  1674. label: {
  1675. distance: [20, 8],
  1676. },
  1677. },
  1678. },
  1679. ],
  1680. }
  1681. option.title.text = '各三级企业人工成本利润率'
  1682. option.legend.data = ['人工成本利润率', '人工成本利润率同比变化']
  1683. option.legend.show = true
  1684. option.tooltip = {
  1685. trigger: 'axis',
  1686. formatter: '{a0}:{c0}' + '%' + '<br/>' + '{a1}:{c1}' + '%'
  1687. }
  1688. option.grid.right = '15%'
  1689. option.yAxis = [
  1690. {
  1691. axisLine: {
  1692. show: false,
  1693. },
  1694. splitLine: {
  1695. show: true,
  1696. lineStyle: {
  1697. color: '#68b4dd66',
  1698. type: 'dashed',
  1699. },
  1700. },
  1701. axisLabel: {
  1702. show: true,
  1703. formatter: '{value} %',
  1704. textStyle: {
  1705. color: 'rgba(250,250,250,0.6)',
  1706. },
  1707. },
  1708. },
  1709. {
  1710. splitLine: {
  1711. show: false,
  1712. },
  1713. axisLine: {
  1714. show: false,
  1715. },
  1716. axisLabel: {
  1717. show: true,
  1718. formatter: '{value} %',
  1719. textStyle: {
  1720. color: 'rgba(250,250,250,0.6)',
  1721. },
  1722. },
  1723. }
  1724. ]
  1725. myChart.setOption(option)
  1726. tools.loopShowTooltip(myChart, option, {
  1727. nterval: 2000,
  1728. loopSeries: true,
  1729. });
  1730. },
  1731. // 右侧图表---------------------------------------------开始
  1732. initChartR1 () {
  1733. let myChart = echarts.init(this.$refs['echartR1'])
  1734. let commonOptions = this.commonOption
  1735. commonOptions.yAxis[0].splitNumber = 2
  1736. let option = {
  1737. ..._.cloneDeep(commonOptions),
  1738. series: [
  1739. {
  1740. name: '招聘需求公告次数',
  1741. type: 'bar',
  1742. barWidth: 15,
  1743. itemStyle: {
  1744. normal: {
  1745. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1746. {
  1747. offset: 0,
  1748. color: '#69c0ff',
  1749. },
  1750. {
  1751. offset: 1,
  1752. color: '#082550',
  1753. },
  1754. ]),
  1755. },
  1756. },
  1757. data: dataR1[0],
  1758. },
  1759. {
  1760. name: '招聘需求公告累计公开招聘人数',
  1761. type: 'bar',
  1762. barWidth: 15,
  1763. itemStyle: {
  1764. normal: {
  1765. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1766. {
  1767. offset: 0,
  1768. color: '#43ede3',
  1769. },
  1770. {
  1771. offset: 1,
  1772. color: '#082550',
  1773. },
  1774. ]),
  1775. },
  1776. },
  1777. data: dataR1[1],
  1778. },
  1779. ],
  1780. }
  1781. option.title.text = '各三级企业招聘需求公告人次情况'
  1782. option.legend.data = ['招聘需求公告次数', '招聘需求公告累计公开招聘人数']
  1783. option.legend.show = true
  1784. option.yAxis.push({
  1785. splitLine: {
  1786. show: false,
  1787. },
  1788. axisLine: {
  1789. show: false,
  1790. },
  1791. })
  1792. myChart.setOption(option)
  1793. },
  1794. initChartR2 () {
  1795. let myChart = echarts.init(this.$refs['echartR2'])
  1796. let commonOptions = this.commonOption
  1797. commonOptions.yAxis[0].splitNumber = 2
  1798. let option = {
  1799. ..._.cloneDeep(commonOptions),
  1800. series: [
  1801. {
  1802. name: '录用结果公示次数',
  1803. type: 'bar',
  1804. barWidth: 15,
  1805. itemStyle: {
  1806. normal: {
  1807. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1808. {
  1809. offset: 0,
  1810. color: '#69c0ff',
  1811. },
  1812. {
  1813. offset: 1,
  1814. color: '#082550',
  1815. },
  1816. ]),
  1817. },
  1818. },
  1819. data: dataR2[0],
  1820. },
  1821. {
  1822. name: '录用结果公示累计公示人数',
  1823. type: 'bar',
  1824. barWidth: 15,
  1825. itemStyle: {
  1826. normal: {
  1827. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1828. {
  1829. offset: 0,
  1830. color: '#45DAD1',
  1831. },
  1832. {
  1833. offset: 1,
  1834. color: '#082550',
  1835. },
  1836. ]),
  1837. },
  1838. },
  1839. data: dataR2[1],
  1840. },
  1841. ],
  1842. }
  1843. option.title.text = '各三级企业录用结果公示人次'
  1844. option.legend.data = ['录用结果公示次数', '录用结果公示累计公示人数']
  1845. option.legend.show = true
  1846. option.yAxis.push({
  1847. type: 'value',
  1848. axisLine: {
  1849. show: false,
  1850. },
  1851. splitLine: {
  1852. show: false,
  1853. },
  1854. })
  1855. myChart.setOption(option)
  1856. },
  1857. initChartR3 () {
  1858. let myChart = echarts.init(this.$refs['echartR3'])
  1859. let commonOptions = this.commonOption
  1860. commonOptions.yAxis[0].splitNumber = 2
  1861. let option = {
  1862. ..._.cloneDeep(commonOptions),
  1863. color: [
  1864. {
  1865. x: 0,
  1866. y: 0,
  1867. x2: 0,
  1868. y2: 1,
  1869. colorStops: [{
  1870. offset: 0,
  1871. color: '#45DAD1',
  1872. },
  1873. {
  1874. offset: 1,
  1875. color: '#082550',
  1876. },],
  1877. }
  1878. ],
  1879. series: [
  1880. {
  1881. name: '年利润(万)',
  1882. type: 'bar',
  1883. barWidth: 15,
  1884. itemStyle: {
  1885. normal: {
  1886. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1887. {
  1888. offset: 0,
  1889. color: '#69c0ff',
  1890. },
  1891. {
  1892. offset: 1,
  1893. color: '#082550',
  1894. },
  1895. ]),
  1896. },
  1897. },
  1898. data: dataR3[0],
  1899. },
  1900. {
  1901. name: '2022年累计招聘数',
  1902. yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
  1903. type: 'bar',
  1904. barWidth: 15,
  1905. itemStyle: {
  1906. color: params => {
  1907. if (params.value > 0 && dataR3[0][params.dataIndex] < 0) {
  1908. return 'red'
  1909. } else {
  1910. return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1911. {
  1912. offset: 0,
  1913. color: '#45DAD1',
  1914. },
  1915. {
  1916. offset: 1,
  1917. color: '#082550',
  1918. },
  1919. ])
  1920. }
  1921. },
  1922. },
  1923. data: dataR3[1],
  1924. },
  1925. ],
  1926. }
  1927. option.title.text = '各三级企业年利润与招聘情况分析'
  1928. option.legend.data = ['年利润(万)', '2022年累计招聘数']
  1929. option.legend.show = true
  1930. option.yAxis[0].max = function (value) {
  1931. if (Math.abs(value.max) > Math.abs(value.min)) {
  1932. return (Math.abs(value.max) * 1.2).toFixed(2);
  1933. } else {
  1934. return (Math.abs(value.min) * 1.2).toFixed(2);
  1935. }
  1936. }
  1937. option.yAxis[0].min = function (value) {
  1938. if (Math.abs(value.max) > Math.abs(value.min)) {
  1939. return (-Math.abs(value.max) * 1.2).toFixed(2);
  1940. } else {
  1941. return (-Math.abs(value.min) * 1.2).toFixed(2);
  1942. }
  1943. }
  1944. option.yAxis.push({
  1945. splitLine: {
  1946. show: false,
  1947. },
  1948. axisLine: {
  1949. show: false,
  1950. },
  1951. axisLabel: {
  1952. show: true,
  1953. formatter: '{value}',
  1954. textStyle: {
  1955. color: 'rgba(250,250,250,0.6)',
  1956. },
  1957. },
  1958. max: function (value) {
  1959. if (Math.abs(value.max) > Math.abs(value.min)) {
  1960. return (Math.abs(value.max) * 1.2).toFixed(2);
  1961. } else {
  1962. return (Math.abs(value.min) * 1.2).toFixed(2);
  1963. }
  1964. },
  1965. min: function (value) {
  1966. if (Math.abs(value.max) > Math.abs(value.min)) {
  1967. return (-Math.abs(value.max) * 1.2).toFixed(2);
  1968. } else {
  1969. return (-Math.abs(value.min) * 1.2).toFixed(2);
  1970. }
  1971. }
  1972. })
  1973. // option.yAxis = [
  1974. // {
  1975. // max: function (val) {
  1976. // if (Math.abs(val.max) > Math.abs(val.min)) {
  1977. // return (Math.abs(val.max) * 1.2).toFixed(0)
  1978. // } else {
  1979. // return (Math.abs(val.min) * 1.2).toFixed(0)
  1980. // }
  1981. // },
  1982. // min: function (val) {
  1983. // if (Math.abs(val.max) > Math.abs(val.min)) {
  1984. // return (-Math.abs(val.max) * 1.2).toFixed(0)
  1985. // } else {
  1986. // return (Math.abs(val.min) * 1.2).toFixed(0)
  1987. // }
  1988. // },
  1989. // splitLine: {
  1990. // show: false,
  1991. // },
  1992. // axisLine: {
  1993. // show: false,
  1994. // },
  1995. // axisLabel: {
  1996. // show: true,
  1997. // formatter: '{value}',
  1998. // textStyle: {
  1999. // color: 'rgba(250,250,250,0.6)',
  2000. // },
  2001. // },
  2002. // }
  2003. // ]
  2004. myChart.setOption(option)
  2005. },
  2006. initChartR4 () {
  2007. let myChart = echarts.init(this.$refs['echartR4'])
  2008. let commonOptions = this.commonOption
  2009. commonOptions.yAxis[0].splitNumber = 2
  2010. let option = {
  2011. ..._.cloneDeep(commonOptions),
  2012. color: [
  2013. {
  2014. x: 0,
  2015. y: 0,
  2016. x2: 0,
  2017. y2: 1,
  2018. colorStops: [{
  2019. offset: 0,
  2020. color: '#6480f3',
  2021. },
  2022. {
  2023. offset: 1,
  2024. color: '#082550',
  2025. },],
  2026. }
  2027. ],
  2028. series: [
  2029. {
  2030. name: '2022年退出人数和2023年当前累计退出人数之和',
  2031. type: 'bar',
  2032. barWidth: 15,
  2033. itemStyle: {
  2034. normal: {
  2035. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  2036. {
  2037. offset: 0,
  2038. color: '#69c0ff',
  2039. },
  2040. {
  2041. offset: 1,
  2042. color: '#082550',
  2043. },
  2044. ]),
  2045. },
  2046. },
  2047. data: dataR4[0],
  2048. },
  2049. {
  2050. name: '2022年招聘人数和2023年当前累计招聘人数之和',
  2051. type: 'bar',
  2052. barWidth: 15,
  2053. itemStyle: {
  2054. normal: {
  2055. color: params => {
  2056. if (dataR4[0][params.dataIndex] / 2 < params.value) {
  2057. return 'red'
  2058. }
  2059. else {
  2060. return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  2061. {
  2062. offset: 0,
  2063. color: '#6480f3',
  2064. },
  2065. {
  2066. offset: 1,
  2067. color: '#082550',
  2068. },
  2069. ])
  2070. }
  2071. },
  2072. },
  2073. },
  2074. data: dataR4[1],
  2075. },
  2076. ],
  2077. }
  2078. option.title.text = '各三级企业"退二进一"完成情况'
  2079. option.legend.data = ['2022年退出人数和2023年当前累计退出人数之和', '2022年招聘人数和2023年当前累计招聘人数之和']
  2080. option.legend.show = true
  2081. option.yAxis[0] = {
  2082. //type: 'log',
  2083. //min: 1,
  2084. //logBase: 3,
  2085. axisLine: {
  2086. show: false,
  2087. },
  2088. splitLine: {
  2089. show: true,
  2090. lineStyle: {
  2091. color: '#68b4dd66',
  2092. type: 'dashed',
  2093. },
  2094. },
  2095. axisLabel: {
  2096. show: true,
  2097. formatter: function (value) {
  2098. return value === 1 ? 0 : value
  2099. },
  2100. textStyle: {
  2101. color: 'rgba(250,250,250,0.6)',
  2102. },
  2103. },
  2104. }
  2105. myChart.setOption(option)
  2106. },
  2107. initChartR5 () {
  2108. let myChart = echarts.init(this.$refs['echartR5'])
  2109. let option = {
  2110. ..._.cloneDeep(this.commonOption),
  2111. series: [
  2112. {
  2113. name: '去年同期在岗职工平均薪酬',
  2114. type: 'bar',
  2115. barWidth: 15,
  2116. itemStyle: {
  2117. normal: {
  2118. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  2119. {
  2120. offset: 0,
  2121. color: '#69c0ff',
  2122. },
  2123. {
  2124. offset: 1,
  2125. color: '#082550',
  2126. },
  2127. ]),
  2128. },
  2129. },
  2130. data: dataR5[0],
  2131. },
  2132. {
  2133. name: '在岗职工平均薪酬',
  2134. type: 'bar',
  2135. barWidth: 15,
  2136. itemStyle: {
  2137. normal: {
  2138. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  2139. {
  2140. offset: 0,
  2141. color: '#6682F5',
  2142. },
  2143. {
  2144. offset: 1,
  2145. color: '#082550',
  2146. },
  2147. ]),
  2148. },
  2149. },
  2150. data: dataR5[1],
  2151. }
  2152. ],
  2153. }
  2154. option.title.text = '各三级企业在岗职工平均薪酬'
  2155. option.legend.data = ['去年同期在岗职工平均薪酬', '在岗职工平均薪酬']
  2156. option.legend.show = true
  2157. option.yAxis.push({
  2158. splitLine: {
  2159. show: false,
  2160. },
  2161. axisLine: {
  2162. show: false,
  2163. },
  2164. })
  2165. myChart.setOption(option)
  2166. },
  2167. initChartR6 () {
  2168. let myChart = echarts.init(this.$refs['echartR6'])
  2169. let option = {
  2170. ..._.cloneDeep(this.commonOption),
  2171. color: ['#69c0ff'],
  2172. series: [
  2173. {
  2174. name: '2022年利润累计涨幅率',
  2175. type: 'line',
  2176. smooth: true, //平滑曲线显示
  2177. showAllSymbol: true, //显示所有图形。
  2178. symbol: 'circle', //标记的图形为实心圆
  2179. symbolSize: 8, //标记的大小
  2180. smooth: false,
  2181. itemStyle: {
  2182. //折线拐点标志的样式
  2183. color: '#B889EA',
  2184. borderColor: '#B889EA',
  2185. width: 2,
  2186. shadowColor: '#B889EA',
  2187. shadowBlur: 4,
  2188. },
  2189. lineStyle: {
  2190. color: '#B889EA',
  2191. width: 2,
  2192. },
  2193. data: dataR6[0],
  2194. },
  2195. {
  2196. name: '2022年薪酬累计涨幅率',
  2197. type: 'line',
  2198. barWidth: 15,
  2199. yAxisIndex: 1,
  2200. showAllSymbol: true, //显示所有图形。
  2201. symbol: 'circle', //标记的图形为实心圆
  2202. symbolSize: 12, //标记的大小
  2203. smooth: false,
  2204. itemStyle: {
  2205. color: params => {
  2206. if (params.value > 0 && dataR6[0][params.dataIndex] < 0) {
  2207. return 'yellow'
  2208. } else {
  2209. return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  2210. {
  2211. offset: 0,
  2212. color: '#69c0ff',
  2213. },
  2214. {
  2215. offset: 1,
  2216. color: '#082550',
  2217. },
  2218. ])
  2219. }
  2220. },
  2221. },
  2222. data: dataR6[1],
  2223. },
  2224. {
  2225. yAxisIndex: 1,
  2226. type: 'effectScatter',
  2227. coordinateSystem: 'cartesian2d',
  2228. showEffectOn: 'render',
  2229. rippleEffect: {
  2230. period: 10,
  2231. scale: 4,
  2232. brushType: 'stroke'
  2233. },
  2234. hoverAnimation: true,
  2235. itemStyle: {
  2236. color: 'yellow'
  2237. },
  2238. lineStyle: {
  2239. color: '#43ede3',
  2240. width: 2,
  2241. },
  2242. data: this.twinkleR6,
  2243. },
  2244. ],
  2245. }
  2246. option.title.text = '各三级企业利润与薪酬变动情况'
  2247. option.legend.data = ['2022年利润累计涨幅率', '2022年薪酬累计涨幅率']
  2248. option.tooltip = {
  2249. trigger: 'axis',
  2250. formatter: '{a0}:{c0}' + '%' + '<br/>' + '{a1}:{c1}' + '%'
  2251. }
  2252. option.yAxis = [
  2253. {
  2254. max: function (value) {
  2255. if (Math.abs(value.max) > Math.abs(value.min)) {
  2256. return (Math.abs(value.max) * 1.2).toFixed(2);
  2257. } else {
  2258. return (Math.abs(value.min) * 1.2).toFixed(2);
  2259. }
  2260. },
  2261. min: function (value) {
  2262. if (Math.abs(value.max) > Math.abs(value.min)) {
  2263. return (-Math.abs(value.max) * 1.2).toFixed(2);
  2264. } else {
  2265. return (-Math.abs(value.min) * 1.2).toFixed(2);
  2266. }
  2267. },
  2268. splitLine: {
  2269. show: true,
  2270. lineStyle: {
  2271. color: '#68b4dd66',
  2272. type: 'dashed',
  2273. },
  2274. },
  2275. axisLine: {
  2276. show: false,
  2277. },
  2278. axisLabel: {
  2279. show: true,
  2280. formatter: '{value} %',
  2281. textStyle: {
  2282. color: 'rgba(250,250,250,0.6)',
  2283. },
  2284. },
  2285. },
  2286. {
  2287. max: function (value) {
  2288. if (Math.abs(value.max) > Math.abs(value.min)) {
  2289. return (Math.abs(value.max) * 1.2).toFixed(2);
  2290. } else {
  2291. return (Math.abs(value.min) * 1.2).toFixed(2);
  2292. }
  2293. },
  2294. min: function (value) {
  2295. if (Math.abs(value.max) > Math.abs(value.min)) {
  2296. return (-Math.abs(value.max) * 1.2).toFixed(2);
  2297. } else {
  2298. return (-Math.abs(value.min) * 1.2).toFixed(2);
  2299. }
  2300. },
  2301. splitLine: {
  2302. show: false,
  2303. },
  2304. axisLine: {
  2305. show: false,
  2306. },
  2307. axisLabel: {
  2308. show: true,
  2309. formatter: '{value} %',
  2310. textStyle: {
  2311. color: 'rgba(250,250,250,0.6)',
  2312. },
  2313. },
  2314. }
  2315. ]
  2316. myChart.setOption(option)
  2317. },
  2318. initChartR7 () {
  2319. let myChart = echarts.init(this.$refs['echartR7'])
  2320. let option = {
  2321. ..._.cloneDeep(this.commonOption),
  2322. color: [
  2323. {
  2324. x: 0,
  2325. y: 0,
  2326. x2: 0,
  2327. y2: 1,
  2328. colorStops: [{
  2329. offset: 0,
  2330. color: '#B889EA',
  2331. },
  2332. {
  2333. offset: 1,
  2334. color: '#082550',
  2335. },],
  2336. }
  2337. ],
  2338. series: [
  2339. {
  2340. name: '全员绩效考核完成率',
  2341. type: 'bar',
  2342. barWidth: 15,
  2343. itemStyle: {
  2344. normal: {
  2345. color: params => {
  2346. if (params.value < 50) {
  2347. return 'yellow'
  2348. }
  2349. else {
  2350. return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  2351. {
  2352. offset: 0,
  2353. color: '#B889EA',
  2354. },
  2355. {
  2356. offset: 1,
  2357. color: '#082550',
  2358. },
  2359. ])
  2360. }
  2361. },
  2362. },
  2363. },
  2364. data: dataR7[0],
  2365. },
  2366. ],
  2367. }
  2368. option.title.text = '各三级企业全员绩效考核 '
  2369. // option.legend.data = ['劳动合同签约完成率', '目标值']
  2370. option.tooltip = {
  2371. trigger: 'axis',
  2372. formatter: '{a0}:{c0}' + '%'
  2373. }
  2374. option.yAxis[0].axisLabel = {
  2375. show: true,
  2376. formatter: '{value} %',
  2377. textStyle: {
  2378. color: 'rgba(250,250,250,0.6)',
  2379. },
  2380. }
  2381. myChart.setOption(option)
  2382. },
  2383. initChartR8 () {
  2384. let myChart = echarts.init(this.$refs['echartR8'])
  2385. let option = {
  2386. ..._.cloneDeep(this.commonOption),
  2387. color: [
  2388. {
  2389. x: 0,
  2390. y: 0,
  2391. x2: 0,
  2392. y2: 1,
  2393. colorStops: [{
  2394. offset: 0,
  2395. color: '#43ede3',
  2396. },
  2397. {
  2398. offset: 1,
  2399. color: '#082550',
  2400. },],
  2401. }
  2402. ],
  2403. series: [
  2404. {
  2405. name: '任期制契约化考核完成率',
  2406. type: 'bar',
  2407. barWidth: 15,
  2408. itemStyle: {
  2409. normal: {
  2410. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  2411. {
  2412. offset: 0,
  2413. color: '#43ede3',
  2414. },
  2415. {
  2416. offset: 1,
  2417. color: '#082550',
  2418. },
  2419. ]),
  2420. },
  2421. },
  2422. data: dataR8[0],
  2423. },
  2424. ],
  2425. }
  2426. option.title.text = '各三级企业任期制契约化考核完成率'
  2427. option.tooltip = {
  2428. trigger: 'axis',
  2429. formatter: '{a0}:{c0}' + '%'
  2430. }
  2431. option.yAxis[0].axisLabel = {
  2432. show: true,
  2433. formatter: '{value} %',
  2434. textStyle: {
  2435. color: 'rgba(250,250,250,0.6)',
  2436. },
  2437. }
  2438. myChart.setOption(option)
  2439. },
  2440. },
  2441. })