index7.js 75 KB

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