index3.js 72 KB

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