index3.js 75 KB

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