index2.js 74 KB

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