humanResources.js 123 KB

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