index4.js 74 KB

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