humanResources.js 103 KB

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