index2.js 74 KB

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