humanResources.js 126 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251
  1. Vue.use(scroll)
  2. let app = new Vue({
  3. el: "#app",
  4. data() {
  5. return {
  6. title: "人才中心双选服务平台",
  7. treeList: [{
  8. name: "岗位发布",
  9. flag: true,
  10. src: "./images/humanResources/post.png",
  11. onSrc: "./images/humanResources/post_on.png",
  12. style: {
  13. top: "65%",
  14. left: "13%",
  15. backgroundImage: "url(./images/humanResources/icon_bg_blue.png)"
  16. },
  17. onStyle: {
  18. top: "65%",
  19. left: "13%",
  20. backgroundImage: "url(./images/humanResources/iconBg_yellow.png)"
  21. }
  22. },
  23. {
  24. name: "自主报名",
  25. flag: false,
  26. src: "./images/humanResources/notes.png",
  27. onSrc: "./images/humanResources/notes_on.png",
  28. style: {
  29. top: "30%",
  30. left: "22%",
  31. backgroundImage: "url(./images/humanResources/icon_bg_blue.png)"
  32. },
  33. onStyle: {
  34. top: "30%",
  35. left: "22%",
  36. backgroundImage: "url(./images/humanResources/iconBg_yellow.png)"
  37. }
  38. },
  39. {
  40. name: "资格审查",
  41. flag: false,
  42. src: "./images/humanResources/qualification.png",
  43. onSrc: "./images/humanResources/qualification_on.png",
  44. style: {
  45. top: "125px",
  46. left: "calc(50% - 202px)",
  47. backgroundImage: "url(./images/humanResources/icon_bg_blue.png)"
  48. },
  49. onStyle: {
  50. top: "125px",
  51. left: "calc(50% - 202px)",
  52. backgroundImage: "url(./images/humanResources/iconBg_yellow.png)"
  53. }
  54. },
  55. {
  56. name: "综合测评",
  57. flag: false,
  58. src: "./images/humanResources/comprehensive.png",
  59. onSrc: "./images/humanResources/comprehensive_on.png",
  60. style: {
  61. top: "30%",
  62. right: "22%",
  63. backgroundImage: "url(./images/humanResources/icon_bg_blue.png)"
  64. },
  65. onStyle: {
  66. top: "30%",
  67. right: "22%",
  68. backgroundImage: "url(./images/humanResources/iconBg_yellow.png)"
  69. }
  70. },
  71. {
  72. name: "录用公示",
  73. flag: false,
  74. src: "./images/humanResources/publicity.png",
  75. onSrc: "./images/humanResources/publicity_on.png",
  76. style: {
  77. top: "65%",
  78. right: "13%",
  79. backgroundImage: "url(./images/humanResources/icon_bg_blue.png)"
  80. },
  81. onStyle: {
  82. top: "65%",
  83. right: "13%",
  84. backgroundImage: "url(./images/humanResources/iconBg_yellow.png)"
  85. }
  86. },
  87. ],
  88. treeIndex: 0,
  89. rollFlag: true,
  90. config1: {
  91. waitTime: 7000,
  92. header: ["双选单位", "双选岗位", "双选人数", "报名人数", "发布时间"],
  93. headerHeight: 55,
  94. columnWidth: [230, 170],
  95. rowNum: 10,
  96. data: [
  97. ["西山煤电屯兰矿", '井下普工', '50', '100', "2023.07.01"],
  98. ["西山煤电斜沟煤矿", '井下钻探工', '10', '30', "2023.07.01"],
  99. ["汾西矿业高阳煤矿", '井下安全检查员', '5', '10', "2023.07.01"],
  100. ["汾西矿业柳湾煤矿", '井下设备管理员', '10', '50', "2023.07.01"],
  101. ["霍州煤电辛置煤矿", '矿井维修电工', '10', '30', "2023.07.01"],
  102. ["霍州煤电恒兴煤业", '生产调度员', '4', '10', "2023.07.01"],
  103. ["霍州煤电吕梁山煤电公司", '汽车驾驶员', '5', '10', "2023.07.01"],
  104. ["山煤国际凌志达煤业", '电工', '5', '16', "2023.07.01"],
  105. ["华晋焦煤沙曲一号煤矿", '井下普工', '40', '120', "2023.07.01"],
  106. ["山西焦化", '技术员', '2', '12', "2023.07.01"],
  107. ["汾西矿业高阳煤矿", '井下安全检查员', '5', '10', "2023.07.01"],
  108. ],
  109. align: ["center", "center", "center", "center", "center"],
  110. headerBGC: "#69c1ff2d",
  111. oddRowBGC: "rgba(105, 193, 255, 0)",
  112. evenRowBGC: "#69c1ff21",
  113. hoverPause: false,
  114. },
  115. configIndex: 1,
  116. config2: {
  117. waitTime: 2000,
  118. header: ["序号", "单位名称", "双选岗位数"],
  119. headerHeight: 55,
  120. rowNum: 5,
  121. data: [
  122. // ["<span class='yellow'>01</span>", "<span class='yellow'>西山煤电</span>", "<span class='yellow'>30个</span>"],
  123. // ["<span class='red'>02</span>", "<span class='red'>山煤国际</span>", "<span class='red'>25个</span>"],
  124. // ["<span class='green'>03</span>", "<span class='green'>汾西矿业</span>", "<span class='green'>20个</span>"],
  125. // ["04", "汾西矿业", "10个"],
  126. // ["05", "汾西矿业", "8个"],
  127. // ["<span class='yellow'>01</span>", "<span class='yellow'>西山煤电</span>", "<span class='yellow'>30个</span>"],
  128. // ["<span class='red'>02</span>", "<span class='red'>山煤国际</span>", "<span class='red'>25个</span>"],
  129. // ["<span class='green'>03</span>", "<span class='green'>汾西矿业</span>", "<span class='green'>20个</span>"],
  130. // ["06", "汾西矿业", "4个"],
  131. // ["07", "山煤国际", "4个"],
  132. ],
  133. align: ["center", "center", "center", "center", "center"],
  134. headerBGC: "#69c1ff2d",
  135. oddRowBGC: "rgba(105, 193, 255, 0)",
  136. evenRowBGC: "#69c1ff21",
  137. carousel: 'page'
  138. },
  139. targetIndex: 0,
  140. classChange: false,
  141. listData: [{
  142. 'title': '无缝滚动第一行无缝滚动第一行',
  143. 'date': '2017-12-16'
  144. }, {
  145. 'title': '无缝滚动第二行无缝滚动第二行',
  146. 'date': '2017-12-16'
  147. }, {
  148. 'title': '无缝滚动第三行无缝滚动第三行',
  149. 'date': '2017-12-16'
  150. }, {
  151. 'title': '无缝滚动第四行无缝滚动第四行',
  152. 'date': '2017-12-16'
  153. }, {
  154. 'title': '无缝滚动第五行无缝滚动第五行',
  155. 'date': '2017-12-16'
  156. }, {
  157. 'title': '无缝滚动第六行无缝滚动第六行',
  158. 'date': '2017-12-16'
  159. }, {
  160. 'title': '无缝滚动第七行无缝滚动第七行',
  161. 'date': '2017-12-16'
  162. }, {
  163. 'title': '无缝滚动第八行无缝滚动第八行',
  164. 'date': '2017-12-16'
  165. }, {
  166. 'title': '无缝滚动第九行无缝滚动第九行',
  167. 'date': '2017-12-16'
  168. }],
  169. classOption: {
  170. step: 9
  171. },
  172. configMark: {
  173. waitTime: 2000,
  174. header: ["头像", "姓名", "报名岗位", "时间"],
  175. rowNum: 6,
  176. headerHeight: 55,
  177. columnWidth: [120],
  178. data: [
  179. ["<img class='list_img' src='./images/header/1.jpg' alt=''>", "<span class=''>程嘉鑫</span>", "<span class=''>技术员</span>", "<span class=''>2023.07.29</span>"],
  180. ["<img class='list_img' src='./images/header/2.jpg' alt=''>", "<span class=''>池富婕</span>", "<span class=''>生产调度员</span>", "<span class=''>2023.07.26</span>"],
  181. ["<img class='list_img' src='./images/header/3.jpg' alt=''>", "<span class=''>邓文奇</span>", "<span class=''>井下钻探工</span>", "<span class=''>2023.07.18</span>"],
  182. ["<img class='list_img' src='./images/header/4.jpg' alt=''>", "<span class=''>翟世佳</span>", "<span class=''>井下钻探工</span>", "<span class=''>2023.07.11</span>"],
  183. ["<img class='list_img' src='./images/header/5.jpg' alt=''>", "<span class=''>丁一帆</span>", "<span class=''>生产调度员</span>", "<span class=''>2023.07.08</span>"],
  184. ["<img class='list_img' src='./images/header/6.jpg' alt=''>", "<span class=''>董明霞</span>", "<span class=''>生产调度员</span>", "<span class=''>2023.07.01</span>"],
  185. ["<img class='list_img' src='./images/header/7.jpg' alt=''>", "<span class=''>杜沛宣</span>", "<span class=''>技术员</span>", "<span class=''>2023.06.29</span>"],
  186. ["<img class='list_img' src='./images/header/8.jpg' alt=''>", "<span class=''>樊宇浩</span>", "<span class=''>技术员</span>", "<span class=''>2023.07.29</span>"],
  187. ["<img class='list_img' src='./images/header/9.jpg' alt=''>", "<span class=''>冯凯</span>", "<span class=''>井下钻探工</span>", "<span class=''>2023.07.26</span>"],
  188. ["<img class='list_img' src='./images/header/10.png' alt=''>", "<span class=''>耿越</span>", "<span class=''>生产调度员</span>", "<span class=''>2023.07.18</span>"],
  189. ],
  190. align: ["center", "center", "center", "center", "center"],
  191. headerBGC: "#69c1ff2d",
  192. oddRowBGC: "rgba(105, 193, 255, 0)",
  193. evenRowBGC: "#69c1ff21",
  194. },
  195. configInterview: {
  196. waitTime: 2000,
  197. header: ["序号", "姓名", "地点", "双选单位", "时间"],
  198. headerHeight: 55,
  199. columnWidth: [90, 120, 170, 200],
  200. rowNum: 6,
  201. data: [
  202. ],
  203. align: ["center", "center", "center", "center", "center"],
  204. headerBGC: "#69c1ff2d",
  205. oddRowBGC: "rgba(105, 193, 255, 0)",
  206. evenRowBGC: "#69c1ff21",
  207. hoverPause: false,
  208. },
  209. configInterviewElse: {
  210. waitTime: 2000,
  211. header: ["序号", "姓名", "地点", "双选单位", "时间"],
  212. headerHeight: 55,
  213. columnWidth: [240, 320, 370, 460, 480],
  214. rowNum: 25,
  215. data: [],
  216. align: ["center", "center", "center", "center", "center"],
  217. headerBGC: "#69c1ff2d",
  218. oddRowBGC: "rgba(105, 193, 255, 0)",
  219. evenRowBGC: "#69c1ff21",
  220. },
  221. configWritten: {
  222. waitTime: 2000,
  223. hoverPause: false,
  224. header: ["序号", "姓名", "地点", "双选单位", "时间"],
  225. headerHeight: 55,
  226. columnWidth: [90, 120, 170, 200],
  227. rowNum: 6,
  228. data: [
  229. ],
  230. align: ["center", "center", "center", "center", "center"],
  231. headerBGC: "#69c1ff2d",
  232. oddRowBGC: "rgba(105, 193, 255, 0)",
  233. evenRowBGC: "#69c1ff21",
  234. },
  235. mainList: [{
  236. name: "双选场次",
  237. value: 0,
  238. unit: "场",
  239. icon: "./images/humanResources/times.png"
  240. },
  241. {
  242. name: "参与人数",
  243. value: 0,
  244. unit: "人",
  245. icon: "./images/humanResources/user.png"
  246. }
  247. ],
  248. employmentList1: {
  249. waitTime: 2000,
  250. header: ["序号", "姓名", "性别", "身份证号", "拟录用单位"],
  251. rowNum: 5,
  252. headerHeight: 55,
  253. columnWidth: [100, 140, 100, 280],
  254. data: [],
  255. align: ["center", "center", "center", "center", "center"],
  256. headerBGC: "#69c1ff2d",
  257. oddRowBGC: "rgba(105, 193, 255, 0)",
  258. evenRowBGC: "#69c1ff21",
  259. hoverPause: false,
  260. },
  261. employmentList2: {
  262. waitTime: 2000,
  263. header: ["序号", "姓名", "性别", "身份证号", "拟录用单位"],
  264. rowNum: 5,
  265. headerHeight: 55,
  266. columnWidth: [100, 140, 100, 280],
  267. data: [],
  268. align: ["center", "center", "center", "center", "center"],
  269. headerBGC: "#69c1ff2d",
  270. oddRowBGC: "rgba(105, 193, 255, 0)",
  271. evenRowBGC: "#69c1ff21",
  272. hoverPause: false,
  273. },
  274. employmentList3: {
  275. waitTime: 2000,
  276. header: ["序号", "姓名", "性别", "身份证号", "拟录用单位"],
  277. rowNum: 5,
  278. headerHeight: 55,
  279. columnWidth: [100, 140, 100, 280],
  280. data: [],
  281. align: ["center", "center", "center", "center", "center"],
  282. headerBGC: "#69c1ff2d",
  283. oddRowBGC: "rgba(105, 193, 255, 0)",
  284. evenRowBGC: "#69c1ff21",
  285. hoverPause: false,
  286. },
  287. typeList: {
  288. waitTime: 2000,
  289. header: ["单位名称", "岗位名称", "报名人数"],
  290. rowNum: 6,
  291. headerHeight: 55,
  292. columnWidth: [100, 200, 400,],
  293. data: [
  294. ["汾西矿业", "综合管理岗", "40"],
  295. ["西山煤电", "综合管理岗", "35"],
  296. ["西山煤电", "财务管理岗", "30"],
  297. ["汾西矿业", "综合管理岗", "25"],
  298. ["西山煤电", "综合管理岗", "20"],
  299. ["西山煤电", "财务管理岗", "15"],
  300. ["汾西矿业", "综合管理岗", "10"],
  301. ],
  302. align: ["center", "center", "center", "center", "center"],
  303. index: true,
  304. headerBGC: "#69c1ff2d",
  305. oddRowBGC: "rgba(105, 193, 255, 0)",
  306. evenRowBGC: "#69c1ff21",
  307. hoverPause: false,
  308. },
  309. vitaEcharts: null,
  310. newList: [],
  311. allTimeList: [],
  312. showMark: false,
  313. showSelect: false,
  314. showMonth: false,
  315. monthList,
  316. monthItem: "08",
  317. timeList1: ["2022-08", "2023-08"],
  318. timeList2: ["2022-08", "2023-08"],
  319. from: "",
  320. type: 0,
  321. echartsIndex: 1,
  322. downholeFlag: true,
  323. markStyle: {
  324. bottom: "4%",
  325. right: "5%"
  326. },
  327. rightList: [{
  328. name: "当前数",
  329. flag: true,
  330. num1: 0,
  331. num2: 0,
  332. num3: "0%",
  333. }, {
  334. name: "累计数",
  335. flag: false,
  336. num1: 0,
  337. num2: 0,
  338. num3: "0%",
  339. }],
  340. rightIndex: 0,
  341. leftList: [{
  342. name: "双选岗位",
  343. flag: true
  344. }, {
  345. name: "双选岗位类别",
  346. flag: false
  347. }],
  348. leftIndex: 0,
  349. roseEcharts: null,
  350. leftFlag: true,
  351. rollTitle: "西山煤电屯兰矿井下普工工双选公告",
  352. leftTime: null,
  353. rightTime: null,
  354. recruitInfoList: [],
  355. recruitInfoIndex: 0,
  356. vitaData: {
  357. x: ['4月', '5月', '6月', '7月', '8月', '9月'],
  358. y: [56, 32, 64, 81, 43, 13]
  359. },
  360. isChangeList: false,
  361. imageList: ["./images/humanResources/ppt1.jpg", "", ""],
  362. imageIndex: 0,
  363. imageFlag: false,
  364. pageFlag: true,
  365. hecharts: null,
  366. leftErrorList: [],
  367. // leftErrorList: ["信息不完整", "信息有误", "任职条件不符", "出勤不足", "工作年限不符"],
  368. isShowList: true,
  369. isListEnd: 0,
  370. // address: "西山煤电屯兰矿。",
  371. interviewIndex: 0,
  372. examinationIndex: 0,
  373. showInterview: true, // 面试
  374. showExamination: true, //笔试
  375. noticeList: [],
  376. noticeIndex: 0,
  377. isShowInfoList: false,
  378. recruitTypeMax: 0,
  379. recruitTypeList: [],
  380. showBigList: true,
  381. rightData: [],
  382. noticIndex: 0,
  383. noticList: [],
  384. noticTime: null,
  385. configDataIndex: 1,
  386. itemClass: "item_content_6_false",
  387. dataFlag: true,
  388. lineRight1: null,
  389. lineRight2: null,
  390. lineRight3: null,
  391. lineRight4: null,
  392. lineRight5: null,
  393. listChange: null,
  394. mianshiTime: null,
  395. bishiTime: null,
  396. noteListIndex: 0,
  397. mianBiTime: null,
  398. }
  399. },
  400. beforeCreate() {
  401. // 跳转地址
  402. let AddUrl = location.protocol + "//" + location.host + "/ierp"
  403. // return
  404. if (!window.location.search) {
  405. // alert("链接已失效,请重新打开")
  406. window.location.href = AddUrl
  407. }
  408. let arr = window.location.search.split("&")
  409. let dataList = []
  410. arr.forEach(item => {
  411. dataList.push(item.split("=")[1])
  412. })
  413. window.user = dataList[0]
  414. let newDate = new Date().getTime()
  415. let authorityType = window.sessionStorage.getItem("authorityType") || false
  416. // console.log(newDate);
  417. // console.log(parseInt(dataList[1]));
  418. // console.log(parseInt(dataList[1]) + 30000 >= newDate);
  419. // return
  420. var diff = Math.abs(newDate - parseInt(dataList[1])); // 获取两个时间戳的差值(以毫秒为单位)
  421. var diffInSeconds = Math.floor(diff / 1000); // 将差值转换为秒数
  422. let effective = diffInSeconds <= 30; // 判断差值是否在30秒以内
  423. console.log(diff);
  424. console.log(diffInSeconds);
  425. console.log(effective);
  426. debugger
  427. if (!authorityType) {
  428. if (!effective) {
  429. console.log("链接已失效,请重新打开");
  430. window.location.href = AddUrl
  431. } else {
  432. console.log("链接未失效")
  433. window.sessionStorage.setItem("authorityType", true)
  434. }
  435. }
  436. },
  437. beforeDestroy() {
  438. window.sessionStorage.removeItem("authorityType")
  439. },
  440. created() {
  441. let date = new Date()
  442. let year = date.getFullYear()
  443. let month = date.getMonth() + 1
  444. if (month < 10) {
  445. month = "0" + month
  446. this.timeList1 = [year + "-" + month, year + "-" + (month)]
  447. this.timeList2 = [year + "-" + month, year + "-" + (month)]
  448. } else {
  449. this.timeList1 = [year + "-" + (month), year + "-" + (month)]
  450. this.timeList2 = [year + "-" + (month), year + "-" + (month)]
  451. }
  452. this.newList = listToChange(yearList, monthList)
  453. this.employmentList3.data = employmentList
  454. if (employmentList.length % 2 != 0) {
  455. employmentList.push([])
  456. }
  457. employmentList.forEach((item, index) => {
  458. if (index % 2 == 0) {
  459. this.employmentList1.data.push(item)
  460. } else {
  461. this.employmentList2.data.push(item)
  462. }
  463. })
  464. this.keyDown()
  465. },
  466. watch: {
  467. imageIndex() {
  468. let that = this
  469. if (this.imageIndex == this.imageList.length) {
  470. that.downhole.dispose()
  471. that.vitaEcharts.dispose()
  472. setTimeout(() => {
  473. let pageBtm = that.$refs.pageBtm
  474. that.initDownholeEcharts(pageBtm, { x: admissionList.x, y1: admissionList.y1, y2: admissionList.y2, y3: admissionList.y3 })
  475. let vita = that.$refs.vita
  476. that.initVitaEcharts(vita)
  477. })
  478. this.imageIndex = 0
  479. this.imageFlag = false
  480. }
  481. },
  482. },
  483. mounted() {
  484. let that = this;
  485. this.$nextTick(() => {
  486. setInterval(() => {
  487. let that = this
  488. that.treeList.forEach(item => {
  489. item.flag = false
  490. })
  491. if (that.treeIndex >= that.treeList.length - 1) {
  492. that.treeIndex = 0
  493. } else {
  494. that.treeIndex = that.treeIndex + 1
  495. }
  496. that.treeList[that.treeIndex].flag = true
  497. }, 5000)
  498. localEnvAppToken().then(res => {
  499. localStorage.setItem("app_token", res.app_token)
  500. getLocalEnvAccessToken().then(res => {
  501. localStorage.setItem("access_token", res.access_token)
  502. that.getPlayers()
  503. that.getPostDetail()
  504. that.getHalfYearDelivcv()
  505. that.getHotDelivcv()
  506. that.arrToListArr()
  507. that.getDelivcvAndApply()
  508. that.getRecruitType()
  509. that.getFailReason()
  510. that.getQualAudits()
  511. that.getNoticePerson()
  512. that.getNotice()
  513. that.getDoubleChoice()
  514. that.getPositionAll()
  515. that.getTotalRate()
  516. })
  517. }).catch(err => {
  518. this.isChangeList = true
  519. this.isShowInfoList = true
  520. let pageBtm = this.$refs.pageBtm
  521. this.initDownholeEcharts(pageBtm, { x: admissionList.x, y1: admissionList.y1, y2: admissionList.y2, y3: admissionList.y3 })
  522. let vita = this.$refs.vita
  523. that.initVitaEcharts(vita)
  524. setTimeout(() => {
  525. let itemContent = document.getElementById("itemContent")
  526. if (itemContent) {
  527. let target = itemContent.getElementsByClassName("row-item")
  528. let targetList = target.item(0)
  529. targetList.style.background = "#302e2d50"
  530. targetList.style.color = "#E1AF27"
  531. }
  532. }, 10)
  533. })
  534. })
  535. this.leftTime = setInterval(() => {
  536. that.leftList.forEach((item, index) => {
  537. item.flag = !item.flag
  538. if (item.flag) {
  539. if (index == 0) {
  540. that.leftFlag = true
  541. // that.timeList2 = [that.allTimeList[1][1], that.allTimeList[1][0]]
  542. that.getPositionAll()
  543. } else {
  544. that.leftFlag = false
  545. // that.timeList2 = [that.allTimeList[0][1], that.allTimeList[0][0]]
  546. that.getRecruitType()
  547. setTimeout(() => {
  548. let leftChange = that.$refs.leftChange
  549. that.initThreeBig(leftChange)
  550. })
  551. }
  552. }
  553. })
  554. }, 15000)
  555. this.rightTime = setInterval(() => {
  556. that.rightList.forEach((item, index) => {
  557. item.flag = !item.flag
  558. if (item.flag) {
  559. that.rightIndex = index
  560. }
  561. })
  562. }, 5000)
  563. },
  564. methods: {
  565. handleClickIcon(item, index) {
  566. let that = this;
  567. if (index == 1) {
  568. that.mianBiTime && clearInterval(that.mianBiTime)
  569. if (that.showBigList) {
  570. that.configInterview.rowNum = 20
  571. that.configWritten.rowNum = 20
  572. that.employmentList3.rowNum = 20
  573. that.configInterview.columnWidth = []
  574. that.configInterview.columnWidth = [240, 320, 370, 460, 480]
  575. that.configWritten.columnWidth = []
  576. that.configWritten.columnWidth = [240, 320, 370, 460, 480]
  577. that.employmentList3.columnWidth = []
  578. that.employmentList3.columnWidth = [240, 320, 370, 460, 480]
  579. that.leftTime && clearInterval(that.leftTime)
  580. that.rightTime && clearInterval(that.rightTime)
  581. if (that.roseEcharts) {
  582. that.roseEcharts.dispose()
  583. }
  584. if (that.configInterviewElse.data.length <= that.configInterviewElse.rowNum) {
  585. that.mianBiTime = setInterval(() => {
  586. that.getNoticePerson()
  587. }, 1000 * 60 * 5)
  588. }
  589. setTimeout(() => {
  590. that.showBigList = false
  591. }, 10)
  592. } else {
  593. that.configInterview.rowNum = 6
  594. that.configWritten.rowNum = 6
  595. that.configInterview.columnWidth = [90, 120, 170, 200]
  596. that.configWritten.columnWidth = [90, 120, 170, 200]
  597. that.leftFlag = true
  598. that.leftList = [{
  599. name: "双选岗位",
  600. flag: true
  601. }, {
  602. name: "双选岗位类别",
  603. flag: false
  604. }]
  605. setTimeout(() => {
  606. that.showBigList = true
  607. that.leftTime = setInterval(() => {
  608. that.leftList.forEach((item, index) => {
  609. item.flag = !item.flag
  610. if (item.flag) {
  611. if (index == 0) {
  612. that.leftFlag = true
  613. // that.timeList2 = [that.allTimeList[1][1], that.allTimeList[1][0]]
  614. that.getPositionAll()
  615. } else {
  616. that.leftFlag = false
  617. // that.timeList2 = [that.allTimeList[0][1], that.allTimeList[0][0]]
  618. that.getRecruitType()
  619. setTimeout(() => {
  620. let leftChange = that.$refs.leftChange
  621. that.initThreeBig(leftChange)
  622. })
  623. }
  624. }
  625. })
  626. }, 15000)
  627. }, 10)
  628. }
  629. setTimeout(() => {
  630. if (that.showBigList) {
  631. let total = 0
  632. that.rightData.forEach(item => {
  633. total = total + item.value
  634. })
  635. return new Promise(() => {
  636. that.getFailReason()
  637. that.getHalfYearDelivcv()
  638. })
  639. }
  640. }, 15)
  641. } else {
  642. that.dataFlag = !that.dataFlag
  643. that.leftTime && clearInterval(that.leftTime)
  644. that.leftTime = setInterval(() => {
  645. that.leftList.forEach((item, index) => {
  646. item.flag = !item.flag
  647. if (item.flag) {
  648. if (index == 0) {
  649. that.leftFlag = true
  650. // that.timeList2 = [that.allTimeList[1][1], that.allTimeList[1][0]]
  651. that.getPositionAll()
  652. } else {
  653. that.leftFlag = false
  654. // that.timeList2 = [that.allTimeList[0][1], that.allTimeList[0][0]]
  655. that.getRecruitType()
  656. setTimeout(() => {
  657. let leftChange = that.$refs.leftChange
  658. that.initThreeBig(leftChange)
  659. })
  660. }
  661. }
  662. })
  663. }, 15000)
  664. that.rightTime && clearInterval(that.rightTime)
  665. that.rightTime = setInterval(() => {
  666. that.rightList.forEach((item, index) => {
  667. item.flag = !item.flag
  668. if (item.flag) {
  669. that.rightIndex = index
  670. }
  671. })
  672. }, 5000)
  673. that.getPlayers()
  674. that.getPostDetail()
  675. that.getHalfYearDelivcv()
  676. that.getHotDelivcv()
  677. that.arrToListArr()
  678. that.getDelivcvAndApply()
  679. that.getRecruitType()
  680. that.getFailReason()
  681. that.getQualAudits()
  682. that.getNoticePerson()
  683. that.getNotice()
  684. that.getDoubleChoice()
  685. that.getPositionAll()
  686. that.getTotalRate()
  687. }
  688. },
  689. // 监听键盘
  690. keyDown() {
  691. let that = this;
  692. document.onkeydown = (e) => {
  693. //事件对象兼容
  694. if (this.imageFlag) {
  695. let e1 = e || event || window.event || arguments.callee.caller.arguments[0]
  696. //键盘按键判断:左箭头-37;上箭头-38;右箭头-39;下箭头-40
  697. if (e1 && e1.keyCode == 37) {
  698. if (that.imageIndex != 0) {
  699. that.imageIndex = that.imageIndex - 1
  700. }
  701. } else if (e1 && e1.keyCode == 38) {
  702. // that.imageIndex = that.imageIndex - 1
  703. if (that.imageIndex != 0) {
  704. that.imageIndex = that.imageIndex - 1
  705. }
  706. } else if (e1 && e1.keyCode == 33) {
  707. // that.imageIndex = that.imageIndex - 1
  708. if (that.imageIndex != 0) {
  709. that.imageIndex = that.imageIndex - 1
  710. }
  711. } else if (e1 && e1.keyCode == 39) {
  712. that.imageIndex = that.imageIndex + 1
  713. } else if (e1 && e1.keyCode == 40) {
  714. that.imageIndex = that.imageIndex + 1
  715. } else if (e1 && e1.keyCode == 34) {
  716. that.imageIndex = that.imageIndex + 1
  717. }
  718. }
  719. }
  720. },
  721. handleChangeImage() {
  722. this.imageIndex += 1
  723. },
  724. fullScreen() {
  725. let docElm = document.documentElement;
  726. if (docElm.requestFullscreen) {
  727. docElm.requestFullscreen();
  728. } else if (docElm.msRequestFullscreen) {
  729. docElm.msRequestFullscreen();
  730. } else if (docElm.mozRequestFullScreen) {
  731. docElm.mozRequestFullScreen();
  732. } else if (docElm.webkitRequestFullScreen) {
  733. docElm.webkitRequestFullScreen();
  734. }
  735. this.imageFlag = true
  736. this.pageFlag = false
  737. },
  738. initDownholeEcharts(el, data) {
  739. if (this.downhole) {
  740. this.downhole.dispose()
  741. }
  742. this.downhole = echarts.init(el);
  743. let series = []
  744. let grid = {
  745. top: "15%",
  746. bottom: 50, //也可设置left和right设置距离来控制图表的大小
  747. left: "3%",
  748. right: "1%"
  749. }
  750. option = {
  751. tooltip: {
  752. backgroundColor: 'rgba(0, 0, 0, 0.3)',
  753. borderColor: "rgba(0,0,0,0.5)",
  754. show: true,
  755. trigger: 'axis',
  756. textStyle: {
  757. fontSize: 30,
  758. color: '#A3E2F4'
  759. },
  760. axisPointer: { // 坐标轴指示器,坐标轴触发有效
  761. type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  762. }
  763. },
  764. grid,
  765. legend: {
  766. data: ["需求人数", "报名人数", "录用人数"],
  767. align: 'left',
  768. itemGap: 50,
  769. right: 500,
  770. y: '2%',
  771. icon: 'rect',
  772. textStyle: {
  773. color: "#fff",
  774. fontSize: 30
  775. }
  776. },
  777. xAxis: {
  778. axisTick: {
  779. show: false,
  780. },
  781. axisLine: {
  782. show: false,
  783. },
  784. axisLabel: {
  785. interval: 0,
  786. show: true,
  787. fontSize: 30,
  788. textStyle: {
  789. color: "#fff" //X轴文字颜色
  790. },
  791. },
  792. data: data.x,
  793. },
  794. yAxis: {
  795. type: "value",
  796. name: "人",
  797. gridIndex: 0,
  798. // splitNumber: 4,
  799. splitLine: {
  800. show: false,
  801. lineStyle: {
  802. color: '#A3C0DF',
  803. width: 1
  804. },
  805. },
  806. nameTextStyle: {
  807. fontSize: 30,
  808. },
  809. axisTick: {
  810. show: false
  811. },
  812. axisLine: {
  813. show: false,
  814. lineStyle: {
  815. color: '#A3C0DF'
  816. }
  817. },
  818. axisLabel: {
  819. show: true,
  820. margin: 14,
  821. fontSize: 28,
  822. textStyle: {
  823. color: "#fff" //X轴文字颜色
  824. }
  825. },
  826. },
  827. series: [{
  828. type: 'bar',
  829. name: "需求人数",
  830. barWidth: 26,
  831. itemStyle: {
  832. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
  833. offset: 1,
  834. color: '#40A9FF',
  835. },
  836. {
  837. offset: 0,
  838. color: '#082049',
  839. },
  840. ]),
  841. },
  842. data: data.y1,
  843. }, {
  844. type: 'bar',
  845. name: "报名人数",
  846. barWidth: 26,
  847. itemStyle: {
  848. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
  849. offset: 1,
  850. color: '#EAE179',
  851. },
  852. {
  853. offset: 0,
  854. color: '#082049',
  855. },
  856. ]),
  857. },
  858. data: data.y2,
  859. }, {
  860. type: 'bar',
  861. name: "录用人数",
  862. barWidth: 26,
  863. itemStyle: {
  864. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
  865. offset: 1,
  866. color: '#6A83FF',
  867. },
  868. {
  869. offset: 0,
  870. color: '#082049',
  871. },
  872. ]),
  873. },
  874. data: data.y3,
  875. }]
  876. };
  877. this.downhole.setOption(option);
  878. tools.loopShowTooltip(this.downhole, option, {
  879. nterval: 2000,
  880. loopSeries: true,
  881. });
  882. },
  883. scrollChange(index) {
  884. let that = this;
  885. this.itemClass = "item_content_6",
  886. this.rollFlag = false;
  887. if (that.noteListIndex >= this.config1.data.length - 1) {
  888. that.noteListIndex = 0
  889. this.recruitInfoIndex = 0
  890. } else {
  891. that.noteListIndex += 1
  892. that.recruitInfoIndex += 1
  893. }
  894. // this.address = this.config1.data[listIndex][0] + "。"
  895. if (this.config1.data[that.noteListIndex][0] && this.config1.data[that.noteListIndex][1]) {
  896. this.rollTitle = this.config1.data[that.noteListIndex][0] + this.config1.data[that.noteListIndex][1] + "双选公告"
  897. }
  898. setTimeout(() => {
  899. this.rollFlag = true
  900. })
  901. },
  902. initRightCycle(el, data) {
  903. var getvalue = [data];
  904. let chat = echarts.init(el)
  905. option = {
  906. title: {
  907. text: getvalue + '%',
  908. textStyle: {
  909. color: '#fff',
  910. fontSize: 20
  911. },
  912. itemGap: 20,
  913. left: '55%',
  914. top: '38%'
  915. },
  916. // tooltip: {
  917. // formatter: function (params) {
  918. // return '<span style="color: #fff;">综合得分:' + getvalue + '分</span>';
  919. // }
  920. // },
  921. angleAxis: {
  922. max: 100,
  923. clockwise: true, // 逆时针
  924. // 隐藏刻度线
  925. show: false
  926. },
  927. radiusAxis: {
  928. type: 'category',
  929. show: true,
  930. axisLabel: {
  931. show: false,
  932. },
  933. axisLine: {
  934. show: false,
  935. },
  936. axisTick: {
  937. show: false
  938. },
  939. },
  940. polar: {
  941. center: ['70%', '50%'],
  942. radius: ['60%', '75%'],
  943. // radius: '100%' //图形大小
  944. },
  945. series: [{
  946. type: 'bar',
  947. data: getvalue,
  948. showBackground: true,
  949. backgroundStyle: {
  950. color: '#BDEBFF',
  951. },
  952. coordinateSystem: 'polar',
  953. roundCap: true,
  954. barWidth: 30,
  955. itemStyle: {
  956. normal: {
  957. opacity: 1,
  958. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  959. offset: 0,
  960. color: '#25BFFF'
  961. }, {
  962. offset: 1,
  963. color: '#5284DE'
  964. }]),
  965. shadowBlur: 5,
  966. shadowColor: '#2A95F9',
  967. }
  968. },
  969. }]
  970. };
  971. chat.setOption(option)
  972. },
  973. initLineRight(el, data, type) {
  974. console.log(data);
  975. let that = this;
  976. let myChart
  977. if (type) {
  978. if (that[type]) {
  979. that[type].dispose()
  980. }
  981. that[type] = echarts.init(el);
  982. } else {
  983. myChart = echarts.init(el);
  984. }
  985. let nameList = ["a"];
  986. let valueList = [data.value];
  987. let total = data.total; // 数据总数
  988. var category = nameList.map((item, index) => {
  989. return {
  990. value: valueList[index],
  991. itemStyle: {
  992. color: new echarts.graphic.LinearGradient(
  993. 1,
  994. 0,
  995. 0,
  996. 1, [{
  997. offset: 0,
  998. color: "#40A9FF50",
  999. },
  1000. {
  1001. offset: 1,
  1002. color: "#40A9FF",
  1003. },
  1004. ],
  1005. false
  1006. ),
  1007. },
  1008. };
  1009. });
  1010. var totalList = [];
  1011. var totalBorderList = [];
  1012. nameList.map((item, index) => {
  1013. totalList.push({
  1014. value: total,
  1015. itemStyle: {
  1016. color: "rgba(51, 147, 236, 0.29)",
  1017. },
  1018. });
  1019. totalBorderList.push({
  1020. value: total,
  1021. itemStyle: {
  1022. borderColor: "rgba(51, 147, 236, 0.29)",
  1023. color: "transparent",
  1024. },
  1025. });
  1026. });
  1027. var datas = [];
  1028. category.forEach((value) => {
  1029. datas.push(value.value);
  1030. });
  1031. if (total == 0) {
  1032. total += 1
  1033. }
  1034. option = {
  1035. // backgroundColor: 'rgb(231,238,249)',
  1036. xAxis: {
  1037. max: total,
  1038. splitLine: {
  1039. show: false,
  1040. },
  1041. axisLine: {
  1042. show: false,
  1043. },
  1044. axisLabel: {
  1045. show: false,
  1046. },
  1047. axisTick: {
  1048. show: false,
  1049. },
  1050. },
  1051. grid: {
  1052. left: "1%",
  1053. top: 20, // 设置条形图的边距
  1054. right: "40%",
  1055. bottom: 20,
  1056. },
  1057. yAxis: [{
  1058. type: "category",
  1059. inverse: false,
  1060. data: nameList,
  1061. axisLine: {
  1062. show: false,
  1063. },
  1064. axisTick: {
  1065. show: false,
  1066. },
  1067. axisLabel: {
  1068. show: false,
  1069. },
  1070. },],
  1071. series: [{
  1072. // 内
  1073. type: "bar",
  1074. barWidth: 16,
  1075. barGap: "20%",
  1076. silent: true,
  1077. // label: {
  1078. // normal: {
  1079. // formatter: (item) => {
  1080. // return `${item['name']}:${item['value']} `;
  1081. // },
  1082. // textStyle: {
  1083. // color: 'rgba(105, 120, 136, 1)',
  1084. // fontSize: 14,
  1085. // },
  1086. // position: [0, '-25px'],
  1087. // show: true,
  1088. // },
  1089. // },
  1090. data: category,
  1091. z: 1,
  1092. itemStyle: {
  1093. normal: {
  1094. color: new echarts.graphic.LinearGradient(
  1095. 1,
  1096. 0,
  1097. 0,
  1098. 1, [{
  1099. offset: 0,
  1100. color: "rgba(81, 193, 156, 1)",
  1101. },
  1102. {
  1103. offset: 1,
  1104. color: "rgba(234, 177, 100, 1)",
  1105. },
  1106. ],
  1107. false
  1108. ),
  1109. },
  1110. },
  1111. animationEasing: "elasticOut",
  1112. },
  1113. {
  1114. // 分隔
  1115. type: "pictorialBar",
  1116. itemStyle: {
  1117. normal: {
  1118. color: "#143362",
  1119. },
  1120. },
  1121. symbolRepeat: "fixed",
  1122. symbolMargin: 8,
  1123. symbol: "rect",
  1124. symbolClip: false,
  1125. symbolSize: [4, 20],
  1126. symbolPosition: "start",
  1127. symbolOffset: [0, -2],
  1128. symbolBoundingData: total,
  1129. data: [total, total, total, total],
  1130. z: 2,
  1131. animationEasing: "elasticOut",
  1132. },
  1133. {
  1134. // label
  1135. type: "pictorialBar",
  1136. symbolBoundingData: total,
  1137. itemStyle: {
  1138. normal: {
  1139. color: "none",
  1140. },
  1141. },
  1142. label: {
  1143. normal: {
  1144. formatter: (params) => {
  1145. var text;
  1146. if (total == 0) {
  1147. text = `0 人 | 0%`;
  1148. return text
  1149. }
  1150. if (params.value >= 10) {
  1151. if (((params.value / total) * 100).toFixed(0) < 10) {
  1152. text = `${(" " + params.value)}人 | ${data.point}`;
  1153. } else {
  1154. text = `${(params.value)}人 | ${data.point}`;
  1155. }
  1156. } else {
  1157. text = `${(" " + params.value)}人 | ${data.point}`;
  1158. }
  1159. return text;
  1160. },
  1161. textStyle: {
  1162. // 图列内容样式
  1163. fontSize: "30",
  1164. fontWeight: 800,
  1165. },
  1166. position: "right",
  1167. offset: [0, -3],
  1168. distance: 10, // 向右偏移位置
  1169. show: true,
  1170. color: "#FFF",
  1171. },
  1172. },
  1173. data: datas,
  1174. z: 0,
  1175. },
  1176. {
  1177. name: "外框",
  1178. type: "bar",
  1179. barGap: "-130%", // 设置外框粗细
  1180. data: totalBorderList,
  1181. barWidth: 26,
  1182. itemStyle: {
  1183. normal: {
  1184. // barBorderRadius: [5, 5, 5, 5],
  1185. borderWidth: 1, // 边框宽度
  1186. borderColor: "rgb(51, 147, 236)", // 边框色
  1187. color: "rgb(231,238,249)",
  1188. },
  1189. },
  1190. z: 0,
  1191. },
  1192. ],
  1193. };
  1194. //轮播
  1195. // tools.loopShowTooltip(leftEcharts1, option, {
  1196. // interval: 2000,
  1197. // loopSeries: true,
  1198. // });
  1199. //注册
  1200. if (type) {
  1201. that[type].setOption(option);
  1202. } else {
  1203. myChart.setOption(option);
  1204. }
  1205. },
  1206. initVitaEcharts(el, data) {
  1207. let that = this;
  1208. if (this.vitaEcharts) {
  1209. this.vitaEcharts.dispose()
  1210. }
  1211. this.vitaEcharts = echarts.init(el)
  1212. let dataList = [...that.vitaData.y]
  1213. let max = dataList.sort(function (a, b) {
  1214. return b - a
  1215. })[0]
  1216. let maxList = []
  1217. this.vitaData.x.forEach(item => {
  1218. maxList.push(max)
  1219. })
  1220. option = {
  1221. tooltip: {
  1222. show: true,
  1223. backgroundColor: 'rgba(0, 0, 0, 0.3)',
  1224. borderColor: "rgba(0,0,0,0.5)",
  1225. trigger: 'axis',
  1226. textStyle: {
  1227. fontSize: 30,
  1228. color: '#A3E2F4'
  1229. },
  1230. axisPointer: { // 坐标轴指示器,坐标轴触发有效
  1231. type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  1232. },
  1233. formatter: "{a} : {c}人"
  1234. },
  1235. animation: true,
  1236. grid: {
  1237. top: "12%",
  1238. bottom: "8%",
  1239. right: "2%"
  1240. },
  1241. xAxis: {
  1242. data: that.vitaData.x,
  1243. axisLine: {
  1244. show: false //隐藏X轴轴线
  1245. },
  1246. axisTick: {
  1247. show: false //隐藏X轴轴线
  1248. },
  1249. splitLine: {
  1250. show: false,
  1251. lineStyle: {
  1252. color: "rgba(77, 128, 254, 0.2)",
  1253. width: 2
  1254. }
  1255. },
  1256. axisLabel: {
  1257. show: true,
  1258. interval: 0,
  1259. fontSize: 24,
  1260. textStyle: {
  1261. color: "#fff" //X轴文字颜色
  1262. }
  1263. }
  1264. },
  1265. yAxis: [{
  1266. name: "报名/人",
  1267. type: "value",
  1268. gridIndex: 0,
  1269. min: 0,
  1270. max: 100,
  1271. interval: 25,
  1272. // splitNumber: 4,
  1273. splitLine: {
  1274. show: false,
  1275. lineStyle: {
  1276. color: "rgba(77, 128, 254, 0.2)",
  1277. width: 2
  1278. }
  1279. },
  1280. axisTick: {
  1281. show: false
  1282. },
  1283. nameTextStyle: {
  1284. fontSize: 28,
  1285. color: "#B6BFCE"
  1286. },
  1287. axisLine: {
  1288. show: false,
  1289. lineStyle: {
  1290. color: "rgba(77, 128, 254, 0.2)"
  1291. }
  1292. },
  1293. axisLabel: {
  1294. show: true,
  1295. margin: 14,
  1296. fontSize: 26,
  1297. textStyle: {
  1298. color: "#65D5FF"
  1299. }
  1300. }
  1301. }],
  1302. series: [{
  1303. name: "报名人数",
  1304. type: "bar",
  1305. barWidth: 16,
  1306. itemStyle: {
  1307. normal: {
  1308. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1309. offset: 1,
  1310. color: "#004E8E"
  1311. },
  1312. {
  1313. offset: 0,
  1314. color: "#40A9FF"
  1315. }
  1316. ])
  1317. }
  1318. },
  1319. data: that.vitaData.y,
  1320. z: 10,
  1321. zlevel: 0
  1322. },
  1323. {
  1324. // 分隔
  1325. type: "pictorialBar",
  1326. itemStyle: {
  1327. normal: {
  1328. color: "#0F375F"
  1329. }
  1330. },
  1331. symbolRepeat: "fixed",
  1332. symbolMargin: 6,
  1333. symbol: "rect",
  1334. symbolClip: true,
  1335. symbolSize: [18, 2],
  1336. symbolPosition: "start",
  1337. symbolOffset: [1, 1],
  1338. data: that.vitaData.y,
  1339. width: 2,
  1340. z: 0,
  1341. zlevel: 1
  1342. },
  1343. {
  1344. name: "外框",
  1345. type: "bar",
  1346. barGap: "-110%", // 设置外框粗细
  1347. data: maxList,
  1348. barWidth: 16,
  1349. itemStyle: {
  1350. normal: {
  1351. color: "transparent", // 填充色
  1352. // barBorderRadius: 0, //圆角半径
  1353. label: {
  1354. // 标签显示位置
  1355. show: false,
  1356. position: "top" // insideTop 或者横向的 insideLeft
  1357. }
  1358. }
  1359. },
  1360. z: 0
  1361. },
  1362. {
  1363. name: "背影",
  1364. type: "line",
  1365. smooth: true, //平滑曲线显示
  1366. showAllSymbol: false, //显示所有图形。
  1367. symbolSize: 0,
  1368. lineStyle: {
  1369. width: 0
  1370. },
  1371. areaStyle: {
  1372. color: "rgba(0, 151, 251, 0.1)"
  1373. },
  1374. data: that.vitaData.y,
  1375. z: 5
  1376. }
  1377. ],
  1378. dataZoom: [{
  1379. type: "slider",
  1380. show: false,
  1381. xAxisIndex: [0],
  1382. endValue: 12,
  1383. startValue: 0
  1384. }]
  1385. }
  1386. this.vitaEcharts.setOption(option)
  1387. tools.loopShowTooltip(this.vitaEcharts, option, {
  1388. nterval: 2000,
  1389. loopSeries: true,
  1390. });
  1391. },
  1392. initRoseEcharts(el, myData = {
  1393. number: ['10', '13', '20'],
  1394. titlename: ["地面", "辅助", "一线"],
  1395. }) {
  1396. this.roseEcharts = echarts.init(el)
  1397. var colorArr = ["#218de0", "#01cbb3", "#85e647", "#5d5cda", "#f6d54a", "#f845f1"];
  1398. var colorAlpha = ['rgba(60,170,211,0.05)', 'rgba(1,203,179,0.05)', 'rgba(133,230,71,0.05)', 'rgba(93,92,218,0.05)', 'rgba(5,197,176,0.05)', 'rgba(194,153,39,0.05)'];
  1399. var myProperty = {
  1400. titlefontsize: 30,
  1401. polarradius: '60%',
  1402. pieradius: '60%',
  1403. length1: 10,
  1404. length2: 55,
  1405. };
  1406. var data = [];
  1407. var total = 0;
  1408. for (var i = 0; i < myData.number.length; i++) {
  1409. total += (Number)(myData.number[i]);
  1410. }
  1411. for (let index = 0; index < myData.titlename.length; index++) {
  1412. data.push({
  1413. value: myData.number[index],
  1414. name: myData.titlename[index],
  1415. itemStyle: {
  1416. normal: {
  1417. borderColor: colorArr[index],
  1418. borderWidth: 2,
  1419. shadowBlur: 20,
  1420. shadowColor: colorArr[index],
  1421. shadowOffsetx: 25,
  1422. shadowOffsety: 20,
  1423. color: colorAlpha[index]
  1424. }
  1425. },
  1426. label: {
  1427. normal: {
  1428. formatter: ['{b|{b}: {c}个}', '{d| {d}%}'].join('\n'), //join函数将数组中的元素用选择的分隔符拼接成一个字符串
  1429. rich: {
  1430. b: {
  1431. color: colorArr[index],
  1432. fontSize: myProperty.titlefontsize,
  1433. lineHeight: 20
  1434. },
  1435. d: {
  1436. color: '#d0fffc',
  1437. fontSize: myProperty.titlefontsize, //手动输入的字体大小
  1438. height: 50,
  1439. align: 'center', //这里是控制文本的位置 此时是居中
  1440. },
  1441. },
  1442. }
  1443. },
  1444. })
  1445. }
  1446. option = {
  1447. grid: {
  1448. left: -100,
  1449. top: 50,
  1450. bottom: 10,
  1451. right: 10,
  1452. containLabel: true
  1453. },
  1454. tooltip: {
  1455. show: true,
  1456. backgroundColor: 'rgba(0, 0, 0, 0.3)',
  1457. borderColor: "rgba(0,0,0,0.5)",
  1458. trigger: 'item',
  1459. textStyle: {
  1460. fontSize: 30,
  1461. color: '#A3E2F4'
  1462. },
  1463. },
  1464. polar: {
  1465. // radius: ['0%','60%'],
  1466. //radius:[0,200]
  1467. radius: myProperty.polarradius,
  1468. },
  1469. angleAxis: {
  1470. interval: 1,
  1471. type: 'category',
  1472. data: [],
  1473. z: 10,
  1474. axisLine: {
  1475. show: false,
  1476. lineStyle: {
  1477. color: "#0B4A6B",
  1478. width: 1,
  1479. type: "solid"
  1480. },
  1481. },
  1482. axisLabel: {
  1483. interval: 0,
  1484. show: true,
  1485. color: "#0B4A6B",
  1486. margin: 8,
  1487. fontSize: 16
  1488. },
  1489. },
  1490. radiusAxis: {
  1491. min: 20,
  1492. max: 120,
  1493. interval: 20,
  1494. axisLine: {
  1495. show: false,
  1496. lineStyle: {
  1497. color: "#0B3E5E",
  1498. width: 1,
  1499. type: "solid"
  1500. },
  1501. },
  1502. axisLabel: {
  1503. formatter: '{value} %',
  1504. show: false,
  1505. padding: [0, 0, 20, 0],
  1506. color: "#0B3E5E",
  1507. fontSize: 16
  1508. },
  1509. splitLine: {
  1510. lineStyle: {
  1511. color: "#07385e",
  1512. width: 2,
  1513. type: "dashed"
  1514. }
  1515. },
  1516. },
  1517. calculable: true,
  1518. series: [{
  1519. stack: 'a',
  1520. type: 'pie',
  1521. radius: myProperty.pieradius,
  1522. roseType: 'radius',
  1523. zlevel: 10,
  1524. startAngle: 100,
  1525. labelLine: {
  1526. normal: {
  1527. show: true,
  1528. length: myProperty.length1,
  1529. length2: myProperty.length2,
  1530. lineStyle: {
  1531. color: '#0096b1'
  1532. }
  1533. },
  1534. emphasis: {
  1535. show: false
  1536. }
  1537. },
  1538. data: data,
  1539. },]
  1540. };
  1541. this.roseEcharts.setOption(option)
  1542. tools.loopShowTooltip(this.roseEcharts, option, {
  1543. nterval: 2000,
  1544. loopSeries: true,
  1545. });
  1546. },
  1547. initChartsBig(arr = [
  1548. {
  1549. name: '地面',
  1550. y: 10,
  1551. sliced: false,
  1552. selected: false,
  1553. },
  1554. {
  1555. name: '辅助',
  1556. y: 10,
  1557. sliced: false,
  1558. selected: false,
  1559. },
  1560. {
  1561. name: '一线',
  1562. y: 10,
  1563. sliced: false,
  1564. selected: false,
  1565. },
  1566. ]) {
  1567. let left5 = arr
  1568. var chartData = left5
  1569. var timer = null;
  1570. var i = 0;
  1571. let that = this
  1572. var option = {
  1573. colors: [
  1574. "#D9E1F2",
  1575. "#B4C6E7",
  1576. "#8EA9DB",
  1577. "#305496",
  1578. "#203764",
  1579. ],
  1580. chart: {
  1581. type: 'pie',
  1582. backgroundColor: 'rgba(0,0,0,0)',
  1583. options3d: {
  1584. enabled: true,
  1585. alpha: 45,
  1586. //beta: 0
  1587. },
  1588. events: {
  1589. // load,图表加载完成时触发
  1590. load: function () {
  1591. var chart = this;
  1592. var points = chart.series[0].points;
  1593. var len = points.length;
  1594. timer && clearInterval(timer);
  1595. timer = setInterval(function () {
  1596. autoTooltip(points[i]);
  1597. chartData.forEach((item, index) => {
  1598. item.sliced = false
  1599. item.selected = false
  1600. if (index == i) {
  1601. item.sliced = true
  1602. item.selected = true
  1603. }
  1604. })
  1605. chart.update({
  1606. series: [{
  1607. type: 'pie',
  1608. name: '占比',
  1609. data: chartData
  1610. }]
  1611. })
  1612. i++;
  1613. if (i === len) {
  1614. i = 0;
  1615. chartData.forEach((item, index) => {
  1616. item.sliced = false
  1617. item.selected = false
  1618. })
  1619. chart.update({
  1620. series: [{
  1621. type: 'pie',
  1622. name: '占比',
  1623. data: chartData
  1624. }]
  1625. })
  1626. }
  1627. }, 1000);
  1628. },
  1629. legendItemClick: function (event) {
  1630. return true;
  1631. }
  1632. }
  1633. },
  1634. credits: {
  1635. enabled: false //去掉hightchats水印
  1636. },
  1637. legend: {
  1638. align: 'right', //横向位置
  1639. verticalAlign: 'middle', // 纵向位置
  1640. layout: "vertical", //横排还是竖排
  1641. x: 10,
  1642. y: 100,
  1643. symbolWidth: 30,
  1644. itemStyle: {
  1645. fontSize: '30px',
  1646. color: '#fff',
  1647. x: 20,
  1648. fontWeight: 0,
  1649. fontFamily: 'Microsoft YaHei'
  1650. },
  1651. },
  1652. title: {
  1653. enabled: false,
  1654. text: "",
  1655. },
  1656. tooltip: {
  1657. crosshairs: false,
  1658. trigger: "axis",
  1659. backgroundColor: 'rgba(0, 0, 0, 0.5)',
  1660. borderColor: "rgba(0,0,0,0.5)",
  1661. style: {
  1662. fontSize: 30,
  1663. color: '#A3E2F4',
  1664. fontWeight: 0,
  1665. },
  1666. axisPointer: {
  1667. lineStyle: {
  1668. color: "#ddd",
  1669. },
  1670. },
  1671. formatter: function (e) {
  1672. this.percentage = this.percentage.toFixed(2) //Math.round(this.percentage)
  1673. return `${this.key}:<b><b>${this.y}</b>(${this.percentage}%)</b></b>`
  1674. },
  1675. },
  1676. plotOptions: {
  1677. pie: {
  1678. allowPointSelect: true,
  1679. showInLegend: true, // 图例
  1680. cursor: 'pointer',
  1681. size: 350,
  1682. innerSize: 0, //环形图中间空白,0为饼图
  1683. depth: 80, //立体高度
  1684. slicedOffset: 40, //动画距离
  1685. dataLabels: {
  1686. enabled: false, // 是否展示指示线
  1687. format: '{point.name}: {point.percentage}'
  1688. }
  1689. },
  1690. },
  1691. series: [{
  1692. type: 'pie',
  1693. name: '占比',
  1694. center: ['50%', '50%'],
  1695. point: {
  1696. events: {
  1697. mouseOver: function (e) { //鼠标移入停止轮播并且找到移入的当前数据设为选中
  1698. chartData.forEach((item, index) => {
  1699. item.sliced = false
  1700. item.selected = false
  1701. })
  1702. chartData[e.target.index].sliced = true
  1703. chartData[e.target.index].selected = true
  1704. chart.update({
  1705. series: [{
  1706. type: 'pie',
  1707. name: '占比',
  1708. point: {
  1709. events: {
  1710. click: function (e) {
  1711. that.showChartLTipDouble(e.point.name)
  1712. }
  1713. }
  1714. },
  1715. data: chartData
  1716. }]
  1717. })
  1718. timer && clearInterval(timer);
  1719. },
  1720. mouseOut: function () { // 鼠标移出后需要继续执行轮播
  1721. var points = chart.series[0].points;
  1722. var len = points.length;
  1723. timer && clearInterval(timer);
  1724. timer = setInterval(function () {
  1725. autoTooltip(points[i]);
  1726. chartData.forEach((item, index) => {
  1727. item.sliced = false
  1728. item.selected = false
  1729. if (index == i) {
  1730. item.sliced = true
  1731. item.selected = true
  1732. }
  1733. })
  1734. chart.update({
  1735. series: [{
  1736. type: 'pie',
  1737. name: '占比',
  1738. data: chartData
  1739. }]
  1740. })
  1741. i++;
  1742. if (i === len) {
  1743. i = 0;
  1744. chartData.forEach((item, index) => {
  1745. item.sliced = false
  1746. item.selected = false
  1747. })
  1748. chart.update({
  1749. series: [{
  1750. type: 'pie',
  1751. name: '占比',
  1752. data: chartData
  1753. }]
  1754. })
  1755. }
  1756. }, 2000);
  1757. }
  1758. }
  1759. },
  1760. data: chartData
  1761. }]
  1762. }
  1763. if (that.hecharts) {
  1764. that.hecharts.destroy();
  1765. }
  1766. that.hecharts = Highcharts.chart('echartL2', option);
  1767. function autoTooltip(point) {
  1768. that.hecharts.tooltip.refresh(point);
  1769. }
  1770. },
  1771. initThreeBig(el) {
  1772. let that = this
  1773. this.roseEcharts = echarts.init(el)
  1774. var placeHolderStyle = {
  1775. normal: {
  1776. label: {
  1777. show: false
  1778. },
  1779. labelLine: {
  1780. show: false
  1781. },
  1782. color: "rgba(0,0,0,0)",
  1783. borderWidth: 0
  1784. },
  1785. emphasis: {
  1786. color: "rgba(0,0,0,0)",
  1787. borderWidth: 0
  1788. }
  1789. };
  1790. var dataStyle = {
  1791. normal: {
  1792. formatter: function (res) {
  1793. return res.data.value
  1794. },
  1795. position: 'center',
  1796. show: true,
  1797. textStyle: {
  1798. fontSize: '35',
  1799. fontWeight: 'bolder',
  1800. color: '#fff'
  1801. }
  1802. }
  1803. };
  1804. option = {
  1805. title: [{
  1806. text: '地面',
  1807. left: '19%',
  1808. top: '70%',
  1809. textAlign: 'center',
  1810. textStyle: {
  1811. fontWeight: 'normal',
  1812. fontSize: '30',
  1813. color: '#fff',
  1814. textAlign: 'center',
  1815. },
  1816. }, {
  1817. text: '辅助',
  1818. left: '49%',
  1819. top: '70%',
  1820. textAlign: 'center',
  1821. textStyle: {
  1822. color: '#fff',
  1823. fontWeight: 'normal',
  1824. fontSize: '30',
  1825. textAlign: 'center',
  1826. },
  1827. }, {
  1828. text: '一线',
  1829. left: '79%',
  1830. top: '70%',
  1831. textAlign: 'center',
  1832. textStyle: {
  1833. color: '#fff',
  1834. fontWeight: 'normal',
  1835. fontSize: '30',
  1836. textAlign: 'center',
  1837. },
  1838. }],
  1839. series: [{
  1840. type: 'pie',
  1841. hoverAnimation: false, //鼠标经过的特效
  1842. // radius: ['55%', '61%'],
  1843. radius: ['45%', '50%'],
  1844. center: ['20%', '50%'],
  1845. startAngle: 225,
  1846. labelLine: {
  1847. normal: {
  1848. show: false
  1849. }
  1850. },
  1851. label: {
  1852. normal: {
  1853. position: 'center'
  1854. }
  1855. },
  1856. data: [{
  1857. value: that.recruitTypeList[0] || 0,
  1858. itemStyle: {
  1859. normal: {
  1860. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1861. offset: 0,
  1862. color: '#99da69'
  1863. }, {
  1864. offset: 1,
  1865. color: '#01babc'
  1866. }]),
  1867. }
  1868. },
  1869. label: dataStyle,
  1870. }, {
  1871. value: that.recruitTypeMax || 0,
  1872. itemStyle: placeHolderStyle,
  1873. },
  1874. ]
  1875. },
  1876. {
  1877. type: 'pie',
  1878. hoverAnimation: false, //鼠标经过的特效
  1879. radius: ['45%', '50%'],
  1880. center: ['50%', '50%'],
  1881. startAngle: 225,
  1882. labelLine: {
  1883. normal: {
  1884. show: false
  1885. }
  1886. },
  1887. label: {
  1888. normal: {
  1889. position: 'center'
  1890. }
  1891. },
  1892. data: [{
  1893. value: that.recruitTypeList[1] || 0,
  1894. itemStyle: {
  1895. normal: {
  1896. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1897. offset: 0,
  1898. color: '#FBAB7E'
  1899. }, {
  1900. offset: 1,
  1901. color: '#F7CE68'
  1902. }]),
  1903. }
  1904. },
  1905. label: dataStyle,
  1906. }, {
  1907. value: that.recruitTypeMax || 0,
  1908. itemStyle: placeHolderStyle,
  1909. },
  1910. ]
  1911. },
  1912. {
  1913. type: 'pie',
  1914. hoverAnimation: false,
  1915. // radius: ['55%', '61%'],
  1916. radius: ['45%', '50%'],
  1917. center: ['80%', '50%'],
  1918. startAngle: 225,
  1919. labelLine: {
  1920. normal: {
  1921. show: false
  1922. }
  1923. },
  1924. label: {
  1925. normal: {
  1926. position: 'center'
  1927. }
  1928. },
  1929. data: [{
  1930. value: that.recruitTypeList[2] || 0,
  1931. itemStyle: {
  1932. normal: {
  1933. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1934. offset: 0,
  1935. color: '#9f3edd'
  1936. }, {
  1937. offset: 1,
  1938. color: '#4897f6'
  1939. }]),
  1940. }
  1941. },
  1942. label: dataStyle,
  1943. }, {
  1944. value: that.recruitTypeMax || 0,
  1945. itemStyle: placeHolderStyle,
  1946. },
  1947. ]
  1948. },
  1949. //外圈的边框
  1950. {
  1951. // name: '总人数',
  1952. type: 'pie',
  1953. hoverAnimation: false, //鼠标经过的特效
  1954. radius: ['51%', '52%'],
  1955. center: ['20%', '50%'],
  1956. startAngle: 225,
  1957. labelLine: {
  1958. normal: {
  1959. show: false
  1960. }
  1961. },
  1962. label: {
  1963. normal: {
  1964. position: 'center'
  1965. }
  1966. },
  1967. data: [{
  1968. value: 12,
  1969. itemStyle: {
  1970. normal: {
  1971. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1972. offset: 0,
  1973. color: '#01babc'
  1974. }, {
  1975. offset: 1,
  1976. color: '#99da69'
  1977. }]),
  1978. }
  1979. },
  1980. }, {
  1981. value: 4,
  1982. itemStyle: placeHolderStyle,
  1983. },
  1984. ]
  1985. },
  1986. {
  1987. // name: '总人数',
  1988. type: 'pie',
  1989. hoverAnimation: false, //鼠标经过的特效
  1990. // radius: ['61%', '62%'],
  1991. radius: ['51%', '52%'],
  1992. center: ['50%', '50%'],
  1993. startAngle: 225,
  1994. labelLine: {
  1995. normal: {
  1996. show: false
  1997. }
  1998. },
  1999. label: {
  2000. normal: {
  2001. position: 'center'
  2002. }
  2003. },
  2004. data: [{
  2005. value: 15,
  2006. itemStyle: {
  2007. normal: {
  2008. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  2009. offset: 0,
  2010. color: '#FBAB7E'
  2011. }, {
  2012. offset: 1,
  2013. color: '#F7CE68'
  2014. }]),
  2015. }
  2016. },
  2017. }, {
  2018. value: 5,
  2019. itemStyle: placeHolderStyle,
  2020. },
  2021. ]
  2022. },
  2023. {
  2024. type: 'pie',
  2025. hoverAnimation: false,
  2026. // radius: ['61%', '62%'],
  2027. radius: ['51%', '52%'],
  2028. center: ['80%', '50%'],
  2029. startAngle: 225,
  2030. labelLine: {
  2031. normal: {
  2032. show: false
  2033. }
  2034. },
  2035. label: {
  2036. normal: {
  2037. position: 'center'
  2038. }
  2039. },
  2040. data: [{
  2041. value: 9,
  2042. itemStyle: {
  2043. normal: {
  2044. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  2045. offset: 0,
  2046. color: '#4897f6'
  2047. }, {
  2048. offset: 1,
  2049. color: '#9f3edd'
  2050. }]),
  2051. }
  2052. },
  2053. }, {
  2054. value: 3,
  2055. itemStyle: placeHolderStyle,
  2056. },
  2057. ]
  2058. },
  2059. ]
  2060. };
  2061. this.roseEcharts.setOption(option)
  2062. // tools.loopShowTooltip(this.roseEcharts, option, {
  2063. // nterval: 2000,
  2064. // loopSeries: true,
  2065. // });
  2066. },
  2067. handleClick(from, type) {
  2068. this.handleMark()
  2069. let that = this;
  2070. this.from = from
  2071. this.type = type
  2072. this.newList = []
  2073. if (that.from == "timeList2" && that.leftFlag) {
  2074. this.newList = that.allTimeList[1]
  2075. } else if (that.from == "timeList2" && !that.leftFlag) {
  2076. this.newList = that.allTimeList[0]
  2077. } else if (that.from == "timeList1") {
  2078. this.newList = that.allTimeList[2]
  2079. }
  2080. // let that = this;
  2081. if (from == "timeList1" && type == 1) {
  2082. that.markStyle = {
  2083. right: "1%",
  2084. bottom: "4%"
  2085. }
  2086. } else if (from == "timeList1" && type == 0) {
  2087. that.markStyle = {
  2088. right: "5%",
  2089. bottom: "4%"
  2090. }
  2091. } else if (from == "timeList2" && type == 0) {
  2092. that.markStyle = {
  2093. right: "87%",
  2094. bottom: "43%"
  2095. }
  2096. } else if (from == "timeList2" && type == 1) {
  2097. that.markStyle = {
  2098. right: "84%",
  2099. bottom: "43%"
  2100. }
  2101. }
  2102. this.showMark = true
  2103. this.showSelect = true
  2104. },
  2105. handleMark() {
  2106. this.showMark = false
  2107. this.showSelect = false
  2108. this.showMonth = false
  2109. },
  2110. handleOption(item) {
  2111. let that = this
  2112. this[this.from][this.type] = item
  2113. this.handleMark()
  2114. if (this.from == "timeList2") {
  2115. if (that.from == "timeList2" && that.leftFlag) {
  2116. this.getPositionAll()
  2117. } else {
  2118. that.getRecruitType()
  2119. }
  2120. }
  2121. if (this.from == "timeList1") {
  2122. this.getDelivcvAndApply()
  2123. }
  2124. },
  2125. handleMonthOption(item) {
  2126. this.monthItem = item
  2127. this.handleMark()
  2128. },
  2129. handleMonth() {
  2130. this.handleMark()
  2131. this.showMark = true
  2132. this.showMonth = true
  2133. },
  2134. ortherEcharts(el, data) {
  2135. this.vitaEcharts = echarts.init(el);
  2136. option = {
  2137. tooltip: {
  2138. show: true,
  2139. trigger: 'axis',
  2140. textStyle: {
  2141. fontSize: 30,
  2142. color: '#A3E2F4'
  2143. },
  2144. axisPointer: { // 坐标轴指示器,坐标轴触发有效
  2145. type: 'none' // 默认为直线,可选为:'line' | 'shadow'
  2146. }
  2147. },
  2148. grid: {
  2149. top: '8%',
  2150. left: '1%',
  2151. right: '1%',
  2152. bottom: '8%',
  2153. containLabel: true,
  2154. },
  2155. xAxis: [{
  2156. type: 'category',
  2157. boundaryGap: false,
  2158. axisLine: { //坐标轴轴线相关设置。数学上的x轴
  2159. show: false,
  2160. lineStyle: {
  2161. color: '#233e64'
  2162. },
  2163. },
  2164. axisLabel: { //坐标轴刻度标签的相关设置
  2165. textStyle: {
  2166. color: '#fff',
  2167. fontSize: 26,
  2168. margin: 15,
  2169. },
  2170. },
  2171. axisTick: { show: false, },
  2172. data: ['6.1', '6.2', '6.3', '6.4', '6.5', '6.6', '6.7'],
  2173. }],
  2174. yAxis: [{
  2175. type: 'value',
  2176. min: 0,
  2177. max: 140,
  2178. splitLine: {
  2179. show: true,
  2180. lineStyle: {
  2181. color: '#233e64'
  2182. }
  2183. },
  2184. axisLine: { show: false, },
  2185. axisLabel: {
  2186. margin: 20,
  2187. textStyle: {
  2188. color: '#fff',
  2189. fontSize: 24,
  2190. },
  2191. },
  2192. axisTick: { show: false, },
  2193. }],
  2194. series: [{
  2195. name: '异常流量',
  2196. type: 'line',
  2197. smooth: true, //是否平滑曲线显示
  2198. symbol: 'circle', // 默认是空心圆(中间是白色的),改成实心圆
  2199. symbolSize: 0,
  2200. lineStyle: {
  2201. normal: {
  2202. color: "#3deaff" // 线条颜色
  2203. }
  2204. },
  2205. areaStyle: { //区域填充样式
  2206. normal: {
  2207. //线性渐变,前4个参数分别是x0,y0,x2,y2(范围0~1);相当于图形包围盒中的百分比。如果最后一个参数是‘true’,则该四个值是绝对像素位置。
  2208. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  2209. { offset: 0, color: 'rgba(61,234,255, 0.9)' },
  2210. { offset: 0.7, color: 'rgba(61,234,255, 0.1)' }
  2211. ], false),
  2212. shadowColor: 'rgba(53,142,215, 0.9)', //阴影颜色
  2213. shadowBlur: 20 //shadowBlur设图形阴影的模糊大小。配合shadowColor,shadowOffsetX/Y, 设置图形的阴影效果。
  2214. }
  2215. },
  2216. data: [90, 105, 84, 125, 110, 92, 98]
  2217. }]
  2218. };
  2219. this.vitaEcharts.setOption(option);
  2220. tools.loopShowTooltip(this.vitaEcharts, option, {
  2221. nterval: 2000,
  2222. loopSeries: true,
  2223. });
  2224. },
  2225. hanleIcon() {
  2226. this.vitaEcharts.dispose()
  2227. this.downholeFlag = !this.downholeFlag
  2228. if (this.downholeFlag) {
  2229. setTimeout(() => {
  2230. let vita = this.$refs.vita
  2231. this.initVitaEcharts(vita)
  2232. })
  2233. }
  2234. // if (this.echartsIndex == 1) {
  2235. // this.ortherEcharts(vita)
  2236. // this.echartsIndex = 2
  2237. // } else {
  2238. // this.echartsIndex = 1
  2239. // }
  2240. },
  2241. handleChangeType(type, index) {
  2242. let that = this;
  2243. if (type) {
  2244. that.rightTime && clearInterval(that.rightTime)
  2245. that.rightList.forEach(item => {
  2246. item.flag = false
  2247. })
  2248. that.rightList[index].flag = true
  2249. that.rightIndex = index
  2250. this.rightTime = setInterval(() => {
  2251. that.rightList.forEach((item, index) => {
  2252. item.flag = !item.flag
  2253. if (item.flag) {
  2254. that.rightIndex = index
  2255. }
  2256. })
  2257. }, 5000)
  2258. } else {
  2259. that.leftTime && clearInterval(that.leftTime)
  2260. that.leftList.forEach(item => {
  2261. item.flag = false
  2262. })
  2263. that.leftList[index].flag = true
  2264. that.leftIndex = index
  2265. if (index == 0) {
  2266. that.leftFlag = true
  2267. // that.timeList2 = [that.allTimeList[1][1], that.allTimeList[1][0]]
  2268. that.getPositionAll()
  2269. } else {
  2270. that.leftFlag = false
  2271. // that.timeList2 = [that.allTimeList[0][1], that.allTimeList[0][0]]
  2272. that.getRecruitType()
  2273. setTimeout(() => {
  2274. let leftChange = that.$refs.leftChange
  2275. that.initThreeBig(leftChange)
  2276. })
  2277. }
  2278. that.leftTime = setInterval(() => {
  2279. that.leftList.forEach((item, index) => {
  2280. item.flag = !item.flag
  2281. if (item.flag) {
  2282. if (index == 0) {
  2283. that.leftFlag = true
  2284. // that.timeList2 = [that.allTimeList[1][1], that.allTimeList[1][0]]
  2285. that.getPositionAll()
  2286. } else {
  2287. that.leftFlag = false
  2288. // that.timeList2 = [that.allTimeList[0][1], that.allTimeList[0][0]]
  2289. that.getRecruitType()
  2290. setTimeout(() => {
  2291. let leftChange = that.$refs.leftChange
  2292. that.initThreeBig(leftChange)
  2293. })
  2294. }
  2295. }
  2296. })
  2297. }, 15000)
  2298. }
  2299. },
  2300. getPlayers() {
  2301. let that = this;
  2302. let data = {
  2303. flag: that.dataFlag
  2304. };
  2305. fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/Players", data).then(res => {
  2306. if (res) {
  2307. that.mainList[1].value = res.value
  2308. }
  2309. })
  2310. },
  2311. getPostDetail() {
  2312. let that = this;
  2313. let data = {
  2314. flag: that.dataFlag
  2315. };
  2316. that.isShowInfoList = false
  2317. that.recruitInfoIndex = 0
  2318. that.recruitInfoList = []
  2319. that.rollTitle = ""
  2320. that.listChange && clearInterval(that.listChange)
  2321. fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/PostDetail", data).then(res => {
  2322. let list = []
  2323. let a = []
  2324. if (res) {
  2325. if (res.data.length != 0) {
  2326. res.data.forEach((item, index) => {
  2327. list.push([item[0], item[1], item[2], item[3], item[4]])
  2328. a[index] = []
  2329. let arr = item[5].split("&")
  2330. if (arr[0].length == 2) {
  2331. arr.shift()
  2332. }
  2333. arr.forEach(i => {
  2334. let infos = i.split("\r")
  2335. let obj = {
  2336. title: infos[0],
  2337. content: infos[1]
  2338. }
  2339. a[index].push(obj)
  2340. })
  2341. })
  2342. that.config1.data = list
  2343. that.recruitInfoList.push(...a)
  2344. that.isShowInfoList = true
  2345. that.itemClass = "item_content_99"
  2346. if (that.config1.data.length <= that.config1.rowNum) {
  2347. that.listChange = setInterval(() => {
  2348. // that.configDataIndex
  2349. if (that.configDataIndex >= that.config1.data.length) {
  2350. that.configDataIndex = 1
  2351. that.itemClass = "item_content_99"
  2352. that.funChangeList(0)
  2353. that.recruitInfoIndex = 0
  2354. return
  2355. }
  2356. that.itemClass = "item_content_" + (that.configDataIndex + 5)
  2357. that.funChangeList(that.configDataIndex)
  2358. // that.recruitInfoIndex = that.configDataIndex
  2359. that.configDataIndex += 1
  2360. that.recruitInfoIndex += 1
  2361. }, that.config1.waitTime)
  2362. } else {
  2363. setTimeout(() => {
  2364. // that.classChange = true
  2365. that.itemClass = "item_content_6"
  2366. setTimeout(() => {
  2367. let itemContent = document.getElementById("itemContent")
  2368. if (itemContent) {
  2369. let target = itemContent.getElementsByClassName("row-item")
  2370. let targetList = target.item(0)
  2371. targetList.style.background = "#302e2d50"
  2372. targetList.style.color = "#E1AF27"
  2373. }
  2374. }, 0)
  2375. }, 5000);
  2376. }
  2377. that.funChangeList(0)
  2378. } else {
  2379. that.config1.data = list
  2380. that.itemClass = "item_content_6"
  2381. that.listChange && clearInterval(that.listChange)
  2382. setTimeout(() => {
  2383. let itemContent = document.getElementById("itemContent")
  2384. if (itemContent) {
  2385. let target = itemContent.getElementsByClassName("row-item")
  2386. let targetList = target.item(0)
  2387. targetList.style.background = "#302e2d50"
  2388. targetList.style.color = "#E1AF27"
  2389. }
  2390. }, 0)
  2391. }
  2392. }
  2393. setTimeout(() => {
  2394. this.recruitInfoList.forEach(item => {
  2395. // if(item.content){
  2396. // console.log(item.content.split("\n"));
  2397. // }
  2398. item.forEach(i => {
  2399. i.infos = i.content.split("\n").filter(Boolean)
  2400. })
  2401. })
  2402. that.isShowInfoList = true
  2403. })
  2404. })
  2405. },
  2406. handleBR(item) {
  2407. return item
  2408. },
  2409. funChangeList(idnex) {
  2410. let listIndex = idnex
  2411. // this.address = this.config1.data[listIndex][0] + "。"
  2412. this.rollTitle = this.config1.data[listIndex][0] + this.config1.data[listIndex][1] + "双选公告" || ""
  2413. setTimeout(() => {
  2414. this.rollFlag = true
  2415. })
  2416. },
  2417. getHalfYearDelivcv() {
  2418. let that = this;
  2419. let data = {
  2420. flag: that.dataFlag
  2421. };
  2422. fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/HalfYearDelivcv", data).then(res => {
  2423. if (res) {
  2424. let list = []
  2425. res.forEach(item => {
  2426. if (item.key == "月份") {
  2427. // that.vitaData.x = item.value
  2428. item.value.forEach(i => {
  2429. list.push(i + "月")
  2430. })
  2431. }
  2432. if (item.key == "数量") {
  2433. that.vitaData.y = item.value
  2434. }
  2435. })
  2436. that.vitaData.x = list
  2437. let vita = this.$refs.vita
  2438. that.initVitaEcharts(vita)
  2439. }
  2440. }).catch(err => {
  2441. let vita = this.$refs.vita
  2442. that.initVitaEcharts(vita)
  2443. })
  2444. },
  2445. getHotDelivcv() {
  2446. let that = this;
  2447. let data = {
  2448. flag: that.dataFlag
  2449. };
  2450. fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/HotDelivcv", data).then(res => {
  2451. if (res) {
  2452. that.typeList.data = res.data
  2453. }
  2454. })
  2455. },
  2456. arrToListArr() {
  2457. this.isChangeList = false
  2458. let that = this;
  2459. let data = {
  2460. flag: that.dataFlag
  2461. }
  2462. fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/Delivcv", data).then(res => {
  2463. let imageList = []
  2464. let nameList = []
  2465. let stationList = []
  2466. let timeList = []
  2467. let dataList = []
  2468. if (res) {
  2469. res.data.forEach(item => {
  2470. if (item.key == "头像地址") {
  2471. imageList.push(...item.value)
  2472. }
  2473. if (item.key == "姓名") {
  2474. nameList.push(...item.value)
  2475. }
  2476. if (item.key == "投递岗位") {
  2477. stationList.push(...item.value)
  2478. }
  2479. if (item.key == "申请时间") {
  2480. timeList.push(...item.value)
  2481. }
  2482. })
  2483. nameList.forEach((item, index) => {
  2484. dataList.push(["<img class='list_img' src='" + imageList[index] + "' alt=''>", item, stationList[index], timeList[index]])
  2485. })
  2486. this.configMark.data = dataList
  2487. this.isChangeList = true
  2488. delete imageList
  2489. delete nameList
  2490. delete stationList
  2491. delete timeList
  2492. }
  2493. })
  2494. },
  2495. getDelivcvAndApply() {
  2496. let that = this;
  2497. let data = {
  2498. flag: that.dataFlag,
  2499. data1: that.timeList1[0],
  2500. data2: that.timeList1[1]
  2501. };
  2502. let pageBtm = this.$refs.pageBtm
  2503. fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/DelivcvAndApply", data).then(res => {
  2504. if (res) {
  2505. res.data.forEach(item => {
  2506. if (item.key == "单位名称") {
  2507. admissionList.x = item.value
  2508. }
  2509. if (item.key == "招聘人数") {
  2510. admissionList.y1 = item.value
  2511. }
  2512. if (item.key == "报名人数") {
  2513. admissionList.y2 = item.value
  2514. }
  2515. if (item.key == "录用人数") {
  2516. admissionList.y3 = item.value
  2517. }
  2518. if (item.key == "开始时间") {
  2519. that.allTimeList[2] = that.getYearMonth(item.value)
  2520. }
  2521. })
  2522. this.initDownholeEcharts(pageBtm, { x: admissionList.x, y1: admissionList.y1, y2: admissionList.y2, y3: admissionList.y3 })
  2523. }
  2524. })
  2525. },
  2526. isRendering(data, type, key, flag) {
  2527. let that = this;
  2528. if (that[type] == 0) {
  2529. that[key].data = data
  2530. setTimeout(() => {
  2531. that[flag] = true
  2532. }, 10)
  2533. that[type] = 1
  2534. } else {
  2535. if (data[0][1] != that[key].data[0][1] || data[0][2] != that[key].data[0][2] || data[0][3] != that[key].data[0][3]) {
  2536. that[flag] = false
  2537. that[key].data = data
  2538. setTimeout(() => {
  2539. that[flag] = true
  2540. }, 10)
  2541. }
  2542. }
  2543. },
  2544. getRecruitType() {
  2545. let that = this;
  2546. let data = {
  2547. flag: that.dataFlag,
  2548. start: that.timeList2[0],
  2549. end: that.timeList2[1],
  2550. }
  2551. that.recruitTypeList = []
  2552. fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/RecruitType", data).then(res => {
  2553. if (res) {
  2554. res.data.forEach(item => {
  2555. if (item.key == "一线") {
  2556. that.recruitTypeList[2] = item.value
  2557. that.recruitTypeMax += item.value
  2558. } else if (item.key == "地面") {
  2559. that.recruitTypeList[0] = item.value
  2560. that.recruitTypeMax += item.value
  2561. } else if (item.key == "辅助") {
  2562. that.recruitTypeList[1] = item.value
  2563. that.recruitTypeMax += item.value
  2564. } else if (item.key == "开始时间") {
  2565. that.allTimeList[0] = that.getYearMonth(item.value)
  2566. }
  2567. })
  2568. let leftChange = that.$refs.leftChange
  2569. if (leftChange) {
  2570. that.initThreeBig(leftChange)
  2571. }
  2572. that.leftTime && clearInterval(that.leftTime)
  2573. that.leftTime = setInterval(() => {
  2574. that.leftList.forEach((item, index) => {
  2575. item.flag = !item.flag
  2576. if (item.flag) {
  2577. if (index == 0) {
  2578. that.leftFlag = true
  2579. // that.timeList2 = [that.allTimeList[1][1], that.allTimeList[1][0]]
  2580. that.getPositionAll()
  2581. } else {
  2582. that.leftFlag = false
  2583. // that.timeList2 = [that.allTimeList[0][1], that.allTimeList[0][0]]
  2584. that.getRecruitType()
  2585. setTimeout(() => {
  2586. let leftChange = that.$refs.leftChange
  2587. that.initThreeBig(leftChange)
  2588. })
  2589. }
  2590. }
  2591. })
  2592. }, 15000)
  2593. }
  2594. })
  2595. },
  2596. getYearMonth(date) {
  2597. // 获取指定日期的年份和月份
  2598. let targetDate = new Date(date);
  2599. let targetYear = targetDate.getFullYear();
  2600. let targetMonth = targetDate.getMonth() + 1; // 月份从0开始计数,需要加1
  2601. // 获取当前日期的年份和月份
  2602. let currentDate = new Date();
  2603. let currentYear = currentDate.getFullYear();
  2604. let currentMonth = currentDate.getMonth() + 1; // 月份从0开始计数,需要加1
  2605. // 定义结果数组
  2606. let result = [];
  2607. // 循环遍历年份和月份,从目标日期到当前日期
  2608. for (let year = targetYear; year <= currentYear; year++) {
  2609. // 起始月份为目标年份的起始月份,结束月份为当前年份的结束月份
  2610. let startMonth = (year === targetYear) ? targetMonth : 1;
  2611. let endMonth = (year === currentYear) ? currentMonth : 12;
  2612. // 循环遍历月份,并将年份和月份添加到结果中
  2613. for (let month = startMonth; month <= endMonth; month++) {
  2614. let formattedMonth = month.toString().padStart(2, '0'); // 格式化为两位数的月份
  2615. result.push(`${year}-${formattedMonth}`);
  2616. }
  2617. }
  2618. // 输出全部的年月
  2619. return result.reverse()
  2620. },
  2621. getFailReason() {
  2622. let that = this;
  2623. let data = {
  2624. flag: that.dataFlag
  2625. };
  2626. // leftErrorList:["信息不完整","信息有误","任职条件不符","出勤不足","工作年限不符"]
  2627. fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/FailReason", data).then(res => {
  2628. if (res) {
  2629. if (res.data.length != 0) {
  2630. let dataList = []
  2631. let total = 0
  2632. // dataList.forEach(item => {
  2633. // total = total + item.value
  2634. // })
  2635. // that.rightData.push(...dataList)
  2636. res.data.forEach((item, index) => {
  2637. let obj = {}
  2638. item.forEach(i => {
  2639. if (i.key == "不通过原因") {
  2640. that.leftErrorList[index] = i.value
  2641. }
  2642. if (i.key == "百分比") {
  2643. obj.point = i.value
  2644. }
  2645. if (i.key == "不通过数量") {
  2646. obj.value = i.value
  2647. dataList[index] = obj
  2648. total = total + i.value
  2649. }
  2650. })
  2651. })
  2652. let echartsErrorBox = that.$refs.echartsErrorBox
  2653. setTimeout(() => {
  2654. for (const child of echartsErrorBox.children) {
  2655. const index = Array.prototype.indexOf.call(echartsErrorBox.children, child);
  2656. let title = "lineRight" + (index + 1)
  2657. that.initLineRight(child.children[1], { value: dataList[index].value, point: dataList[index].point, total }, title)
  2658. }
  2659. }, 10)
  2660. }
  2661. }
  2662. })
  2663. },
  2664. getQualAudits() {
  2665. let that = this;
  2666. let data = {
  2667. flag: that.dataFlag
  2668. };
  2669. fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/QualAudits", data).then(res => {
  2670. if (res) {
  2671. res.data.forEach(item => {
  2672. if (item.key == "当前总人数") {
  2673. that.rightList[0].num1 = item.value
  2674. }
  2675. if (item.key == "通过总人数") {
  2676. that.rightList[0].num2 = item.value
  2677. }
  2678. if (item.key == "当前通过率") {
  2679. that.rightList[0].num3 = item.value
  2680. }
  2681. })
  2682. }
  2683. })
  2684. },
  2685. getNo(arr) {
  2686. if (Array.isArray(arr)) {
  2687. arr.forEach((item, index) => {
  2688. if (index <= 8) {
  2689. item.unshift("0" + (index + 1))
  2690. } else {
  2691. item.unshift((index + 1).toString())
  2692. }
  2693. })
  2694. }
  2695. return arr
  2696. },
  2697. getNoticePerson(type = 3) {
  2698. let that = this;
  2699. if (type == 1) {
  2700. that.showExamination = false
  2701. } else if (type == 2) {
  2702. that.showInterview = false
  2703. } else {
  2704. this.showExamination = false
  2705. this.showInterview = false
  2706. }
  2707. let year = new Date().getFullYear()
  2708. let data = {
  2709. flag: that.dataFlag,
  2710. year,
  2711. month: 0
  2712. }
  2713. fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/assessmentarrangement", data).then(res => {
  2714. if (res) {
  2715. for (let key in res) {
  2716. if (Array.isArray(res[key])) {
  2717. res[key].forEach(item => {
  2718. // item.splice(item.length - 2, 1);
  2719. if (item[item.length - 1]) {
  2720. item[item.length - 1] = item[item.length - 1].replaceAll("年", "-")
  2721. item[item.length - 1] = item[item.length - 1].replaceAll("月", "-")
  2722. item[item.length - 1] = item[item.length - 1].replaceAll("日", " ")
  2723. item[item.length - 1] = item[item.length - 1].replaceAll("/", "-")
  2724. item[item.length - 1] = item[item.length - 1].replaceAll("|", "-")
  2725. }
  2726. })
  2727. }
  2728. }
  2729. let arr = []
  2730. let len = false
  2731. if (res.bishiList.length != 0) {
  2732. arr.push(...that.getNo(res.bishiList))
  2733. if (arr.length % 2 == 0) {
  2734. arr.push([])
  2735. len = true
  2736. }
  2737. res.bishiList = []
  2738. res.bishiList = arr.filter((_, index) => index % 2 === 0);
  2739. res.mianshiList = arr.filter((_, index) => index % 2 !== 0);
  2740. that.configInterviewElse.data = [...arr]
  2741. if (len) {
  2742. that.configInterviewElse.data.pop()
  2743. }
  2744. } else if (res.mianshiList.length != 0) {
  2745. arr.push(...that.getNo(res.mianshiList))
  2746. if (arr.length % 2 != 0) {
  2747. arr.push([])
  2748. len = true
  2749. }
  2750. res.mianshiList = []
  2751. res.bishiList = arr.filter((_, index) => index % 2 === 0);
  2752. res.mianshiList = arr.filter((_, index) => index % 2 !== 0);
  2753. that.configInterviewElse.data = [...arr]
  2754. if (len) {
  2755. that.configInterviewElse.data.pop()
  2756. }
  2757. }
  2758. if (type == 1) {
  2759. that.configWritten.data = res.bishiList
  2760. // that.configWritten.data = that.getNo(res.bishiList)
  2761. setTimeout(() => {
  2762. that.showExamination = true
  2763. }, 10)
  2764. } else if (type == 2) {
  2765. that.configInterview.data = res.mianshiList
  2766. // that.configInterview.data = that.getNo(res.mianshiList)
  2767. setTimeout(() => {
  2768. that.showInterview = true
  2769. }, 10)
  2770. } else {
  2771. that.configWritten.data = res.bishiList
  2772. // that.configWritten.data = that.getNo(res.bishiList)
  2773. that.configInterview.data = res.mianshiList
  2774. // that.configInterview.data = that.getNo(res.mianshiList)
  2775. setTimeout(() => {
  2776. that.showInterview = true
  2777. that.showExamination = true
  2778. }, 10)
  2779. if (that.configWritten.data.length <= that.configWritten.rowNum) {
  2780. that.bishiTime && clearInterval(that.bishiTime)
  2781. that.bishiTime = setInterval(() => {
  2782. console.log("笔试面试数据更新");
  2783. that.getNoticePerson(1)
  2784. }, (10000 * 6 * 5))
  2785. }
  2786. if (that.configInterview.data.length <= that.configInterview.rowNum) {
  2787. that.mianshiTime && clearInterval(that.mianshiTime)
  2788. that.mianshiTime = setInterval(() => {
  2789. console.log("笔试面试数据更新");
  2790. that.getNoticePerson(2)
  2791. }, (10000 * 6 * 5))
  2792. }
  2793. }
  2794. }
  2795. })
  2796. },
  2797. scrollChangeList(index) {
  2798. let that = this;
  2799. if (that.noticList.length != 1) {
  2800. if (index + that.employmentList1.rowNum == that.employmentList1.data.length + 1) {
  2801. if (that.noticIndex >= that.noticList.length - 1) {
  2802. that.noticIndex = 0
  2803. } else {
  2804. that.noticIndex += 1
  2805. }
  2806. if (that.noticList[that.noticIndex]) {
  2807. that.employmentList1.data = []
  2808. that.employmentList2.data = []
  2809. that.employmentList3.data = []
  2810. that.isShowList = false
  2811. that.noticList[that.noticIndex].noticeUserList.forEach((item, index) => {
  2812. if (index % 2 == 0) {
  2813. that.employmentList1.data.push(item)
  2814. } else {
  2815. that.employmentList2.data.push(item)
  2816. }
  2817. })
  2818. that.employmentList3.data.push(...that.noticList[that.noticIndex].noticeUserList)
  2819. if (that.employmentList1.rowNum >= that.employmentList1.data.length) {
  2820. setTimeout(() => {
  2821. that.scrollChangeList(0)
  2822. }, 10000)
  2823. }
  2824. setTimeout(() => {
  2825. that.isShowList = true
  2826. }, 10)
  2827. }
  2828. }
  2829. }
  2830. },
  2831. changeCardNo(str) {
  2832. let arr = []
  2833. let list = []
  2834. if (str.length != 0) {
  2835. arr = str.split("")
  2836. for (let i = 0; i <= arr.length - 1; i++) {
  2837. if (i < 5) {
  2838. list.push(arr[i])
  2839. } else if (i > 5 && i < 14) {
  2840. list.push("*")
  2841. } else {
  2842. list.push(arr[i])
  2843. }
  2844. }
  2845. }
  2846. return list.join("")
  2847. },
  2848. changeNoticList(arr) {
  2849. let list = []
  2850. let that = this;
  2851. if (Array.isArray(arr)) {
  2852. arr.forEach((item, index) => {
  2853. let a = []
  2854. if (Array.isArray(item)) {
  2855. list.push(a)
  2856. return
  2857. }
  2858. if (index <= 8) {
  2859. a = ["0" + (index + 1), item.name, item.sex, item.cardno, item.org1]
  2860. } else {
  2861. a = [(index + 1).toString(), item.name, item.sex, item.cardno, item.org1]
  2862. }
  2863. list.push(a)
  2864. })
  2865. }
  2866. return list
  2867. },
  2868. getNotice() {
  2869. let that = this;
  2870. let data = {
  2871. flag: that.dataFlag
  2872. };
  2873. this.isShowList = false
  2874. that.noticIndex = 0
  2875. that.employmentList1.data = []
  2876. that.employmentList2.data = []
  2877. that.employmentList3.data = []
  2878. that.noticList = []
  2879. fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/getNotice", data).then(res => {
  2880. if (res && res.length != 0) {
  2881. res.forEach((item, index) => {
  2882. if (item.noticeUserList.length % 2 != 0) {
  2883. item.noticeUserList.push([])
  2884. }
  2885. let obj = {
  2886. noticeDataList: item.noticeDataList,
  2887. noticeUserList: that.changeNoticList(item.noticeUserList)
  2888. }
  2889. that.noticList.push(obj)
  2890. })
  2891. if (that.noticList[that.noticIndex]) {
  2892. that.noticList[that.noticIndex].noticeUserList.forEach((item, index) => {
  2893. if (index % 2 == 0) {
  2894. that.employmentList1.data.push(item)
  2895. } else {
  2896. that.employmentList2.data.push(item)
  2897. }
  2898. })
  2899. that.employmentList3.data.push(...that.noticList[that.noticIndex].noticeUserList)
  2900. }
  2901. if (res.length != 1) {
  2902. // that.noticIndex += 1
  2903. if (that.employmentList2.data.length <= that.employmentList2.rowNum) {
  2904. that.noticTime = setInterval(() => {
  2905. that.employmentList1.data = []
  2906. that.employmentList2.data = []
  2907. that.employmentList3.data = []
  2908. that.isShowList = false
  2909. if (that.noticList[that.noticIndex]) {
  2910. that.noticList[that.noticIndex].noticeUserList.forEach((item, index) => {
  2911. if (index % 2 == 0) {
  2912. that.employmentList1.data.push(item)
  2913. } else {
  2914. that.employmentList2.data.push(item)
  2915. }
  2916. })
  2917. that.employmentList3.data.push(...that.noticList[that.noticIndex].noticeUserList)
  2918. }
  2919. // that.noticIndex += 1
  2920. // if (that.noticIndex > that.noticList.length - 1) {
  2921. // that.noticIndex = 0
  2922. // }
  2923. setTimeout(() => {
  2924. that.isShowList = true
  2925. }, 10)
  2926. }, that.employmentList2.data.length * 2000)
  2927. }
  2928. }
  2929. setTimeout(() => {
  2930. that.isShowList = true
  2931. })
  2932. }
  2933. })
  2934. // that.noticeList = res.data
  2935. },
  2936. getDoubleChoice() {
  2937. let that = this;
  2938. let data = {
  2939. flag: that.dataFlag
  2940. }
  2941. fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/DoubleChoice", data).then(res => {
  2942. if (res) {
  2943. that.mainList[0].value = res.value
  2944. }
  2945. })
  2946. },
  2947. getPositionAll() {
  2948. let that = this;
  2949. let data = {
  2950. flag: that.dataFlag,
  2951. start: that.timeList2[0],
  2952. end: that.timeList2[1],
  2953. }
  2954. // this.leftTime && clearInterval(this.leftTime)
  2955. fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/PositionAll", data).then(res => {
  2956. that.leftFlag = false
  2957. that.config2.data = []
  2958. let lastList = []
  2959. let topList = []
  2960. let mainList = []
  2961. if (res) {
  2962. if (res.date) {
  2963. that.allTimeList[1] = that.getYearMonth(res.date.value)
  2964. }
  2965. res.data.forEach((item, index) => {
  2966. if (index <= 8) {
  2967. item.unshift("0" + (index + 1))
  2968. } else {
  2969. item.unshift((index + 1).toString())
  2970. }
  2971. })
  2972. if (res.data.length > 5) {
  2973. for (let i = 0; i < 3; i++) {
  2974. let color;
  2975. if (i == 0) {
  2976. color = "yellow"
  2977. } else if (i == 1) {
  2978. color = "red"
  2979. } else {
  2980. color = "green"
  2981. }
  2982. topList.push(["<span class='" + color + "'>" + res.data[i][0] + "</span>", "<span class='" + color + "'>" + res.data[i][1] + "</span>", "<span class='" + color + "'>" + res.data[i][2] + "</span>"])
  2983. }
  2984. res.data.splice(0, 3)
  2985. mainList.push(...spArr(res.data, 2))
  2986. mainList.forEach(item => {
  2987. item.unshift(...topList)
  2988. if (item.length < 5) {
  2989. item.push(["", "", ""])
  2990. }
  2991. lastList.push(...item)
  2992. })
  2993. } else if (res.data.length <= 5 && res.data.length >= 3) {
  2994. for (let i = 0; i < 3; i++) {
  2995. let color;
  2996. if (i == 0) {
  2997. color = "yellow"
  2998. } else if (i == 1) {
  2999. color = "red"
  3000. } else {
  3001. color = "green"
  3002. }
  3003. topList.push(["<span class='" + color + "'>" + res.data[i][0] + "</span>", "<span class='" + color + "'>" + res.data[i][1] + "</span>", "<span class='" + color + "'>" + res.data[i][2] + "</span>"])
  3004. }
  3005. res.data.splice(0, 3)
  3006. lastList.push(...topList, ...res.data)
  3007. } else if (res.data.length < 3) {
  3008. for (let i = 0; i < res.data.length; i++) {
  3009. let color;
  3010. if (i == 0) {
  3011. color = "yellow"
  3012. } else if (i == 1) {
  3013. color = "red"
  3014. } else {
  3015. color = "green"
  3016. }
  3017. lastList.push(["<span class='" + color + "'>" + res.data[i][0] + "</span>", "<span class='" + color + "'>" + res.data[i][1] + "</span>", "<span class='" + color + "'>" + res.data[i][2] + "</span>"])
  3018. }
  3019. }
  3020. that.config2.data = lastList
  3021. that.leftTime && clearInterval(that.leftTime)
  3022. that.leftTime = setTimeout(() => {
  3023. that.leftFlag = true
  3024. that.leftTime = setInterval(() => {
  3025. that.leftList.forEach((item, index) => {
  3026. item.flag = !item.flag
  3027. if (item.flag) {
  3028. if (index == 0) {
  3029. that.leftFlag = true
  3030. // that.timeList2 = [that.allTimeList[1][1], that.allTimeList[1][0]]
  3031. that.getPositionAll()
  3032. } else {
  3033. that.leftFlag = false
  3034. // that.timeList2 = [that.allTimeList[0][1], that.allTimeList[0][0]]
  3035. that.getRecruitType()
  3036. setTimeout(() => {
  3037. let leftChange = that.$refs.leftChange
  3038. that.initThreeBig(leftChange)
  3039. })
  3040. }
  3041. }
  3042. })
  3043. }, 15000)
  3044. }, 10)
  3045. }
  3046. })
  3047. },
  3048. getTotalRate() {
  3049. let that = this;
  3050. let data = {
  3051. flag: that.dataFlag
  3052. };
  3053. fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/TotalRate", data).then(res => {
  3054. if (res) {
  3055. // that.rightList
  3056. res.data.forEach(item => {
  3057. if (item.key == "累计人数") {
  3058. that.rightList[1].num1 = item.value
  3059. }
  3060. if (item.key == "累计通过人数") {
  3061. that.rightList[1].num2 = item.value
  3062. }
  3063. if (item.key == "通过率") {
  3064. that.rightList[1].num3 = item.value
  3065. }
  3066. })
  3067. }
  3068. })
  3069. },
  3070. scrollChangeListW(index) {
  3071. let that = this;
  3072. if (index + that.configInterview.rowNum == that.configInterview.data.length) {
  3073. console.log("笔试更新");
  3074. setTimeout(() => {
  3075. that.getNoticePerson(1)
  3076. }, 1700)
  3077. }
  3078. },
  3079. scrollChangeListIn(index) {
  3080. let that = this;
  3081. if (index + that.configInterview.rowNum == that.configInterview.data.length) {
  3082. console.log("面试更新");
  3083. setTimeout(() => {
  3084. that.getNoticePerson(2)
  3085. }, 1700)
  3086. }
  3087. },
  3088. scrollChangeListElse(index) {
  3089. let that = this;
  3090. if (index + that.configInterviewElse.rowNum == that.configInterviewElse.data.length) {
  3091. console.log("面试更新");
  3092. setTimeout(() => {
  3093. that.getNoticePerson()
  3094. }, 1700)
  3095. }
  3096. },
  3097. },
  3098. })