index3.js 72 KB

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