humanResources.js 103 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534
  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. this.rollFlag = false
  2629. let listIndex = idnex;
  2630. // this.address = this.config1.data[listIndex][0] + "。"
  2631. this.rollTitle =
  2632. this.config1.data[listIndex][0] +
  2633. this.config1.data[listIndex][1] +
  2634. "双选公告" || "";
  2635. setTimeout(() => {
  2636. this.rollFlag = true;
  2637. });
  2638. },
  2639. getHalfYearDelivcv() {
  2640. let that = this;
  2641. let data = {
  2642. flag: that.dataFlag,
  2643. };
  2644. fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/HalfYearDelivcv", data)
  2645. .then((res) => {
  2646. if (res) {
  2647. let list = [];
  2648. res.forEach((item) => {
  2649. if (item.key == "月份") {
  2650. // that.vitaData.x = item.value
  2651. item.value.forEach((i) => {
  2652. list.push(i + "月");
  2653. });
  2654. }
  2655. if (item.key == "数量") {
  2656. that.vitaData.y = item.value;
  2657. }
  2658. });
  2659. that.vitaData.x = list;
  2660. let vita = this.$refs.vita;
  2661. that.initVitaEcharts(vita);
  2662. }
  2663. })
  2664. .catch((err) => {
  2665. let vita = this.$refs.vita;
  2666. that.initVitaEcharts(vita);
  2667. });
  2668. },
  2669. getHotDelivcv() {
  2670. let that = this;
  2671. let data = {
  2672. flag: that.dataFlag,
  2673. };
  2674. fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/HotDelivcv", data).then(
  2675. (res) => {
  2676. if (res) {
  2677. that.typeList.data = res.data;
  2678. }
  2679. }
  2680. );
  2681. },
  2682. arrToListArr() {
  2683. this.isChangeList = false;
  2684. let that = this;
  2685. let data = {
  2686. flag: that.dataFlag,
  2687. };
  2688. fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/Delivcv", data).then(
  2689. (res) => {
  2690. let imageList = [];
  2691. let nameList = [];
  2692. let stationList = [];
  2693. let timeList = [];
  2694. let dataList = [];
  2695. if (res) {
  2696. res.data.forEach((item) => {
  2697. if (item.key == "头像地址") {
  2698. imageList.push(...item.value);
  2699. }
  2700. if (item.key == "姓名") {
  2701. nameList.push(...item.value);
  2702. }
  2703. if (item.key == "投递岗位") {
  2704. stationList.push(...item.value);
  2705. }
  2706. if (item.key == "申请时间") {
  2707. timeList.push(...item.value);
  2708. }
  2709. });
  2710. nameList.forEach((item, index) => {
  2711. dataList.push([
  2712. "<img class='list_img' src='" + imageList[index] + "' alt=''>",
  2713. item,
  2714. stationList[index],
  2715. timeList[index],
  2716. ]);
  2717. });
  2718. this.configMark.data = dataList;
  2719. this.isChangeList = true;
  2720. delete imageList;
  2721. delete nameList;
  2722. delete stationList;
  2723. delete timeList;
  2724. }
  2725. }
  2726. );
  2727. },
  2728. getDelivcvAndApply() {
  2729. let that = this;
  2730. let data = {
  2731. flag: that.dataFlag,
  2732. data1: that.timeList1[0],
  2733. data2: that.timeList1[1],
  2734. };
  2735. let pageBtm = this.$refs.pageBtm;
  2736. fetchPostMethods(
  2737. "/ierp/kapi/v2/mdnb/mdnb_control/DelivcvAndApply",
  2738. data
  2739. ).then((res) => {
  2740. if (res) {
  2741. res.data.forEach((item) => {
  2742. if (item.key == "单位名称") {
  2743. admissionList.x = item.value;
  2744. }
  2745. if (item.key == "招聘人数") {
  2746. admissionList.y1 = item.value;
  2747. }
  2748. if (item.key == "报名人数") {
  2749. admissionList.y2 = item.value;
  2750. }
  2751. if (item.key == "录用人数") {
  2752. admissionList.y3 = item.value;
  2753. }
  2754. if (item.key == "开始时间") {
  2755. that.allTimeList[2] = that.getYearMonth(item.value);
  2756. }
  2757. });
  2758. this.initDownholeEcharts(pageBtm, {
  2759. x: admissionList.x,
  2760. y1: admissionList.y1,
  2761. y2: admissionList.y2,
  2762. y3: admissionList.y3,
  2763. });
  2764. }
  2765. });
  2766. },
  2767. isRendering(data, type, key, flag) {
  2768. let that = this;
  2769. if (that[type] == 0) {
  2770. that[key].data = data;
  2771. setTimeout(() => {
  2772. that[flag] = true;
  2773. }, 10);
  2774. that[type] = 1;
  2775. } else {
  2776. if (
  2777. data[0][1] != that[key].data[0][1] ||
  2778. data[0][2] != that[key].data[0][2] ||
  2779. data[0][3] != that[key].data[0][3]
  2780. ) {
  2781. that[flag] = false;
  2782. that[key].data = data;
  2783. setTimeout(() => {
  2784. that[flag] = true;
  2785. }, 10);
  2786. }
  2787. }
  2788. },
  2789. getRecruitType() {
  2790. let that = this;
  2791. let data = {
  2792. flag: that.dataFlag,
  2793. start: that.timeList2[0],
  2794. end: that.timeList2[1],
  2795. };
  2796. that.recruitTypeList = [];
  2797. fetchPostMethods(
  2798. "/ierp/kapi/v2/mdnb/mdnb_control/RecruitType",
  2799. data
  2800. ).then((res) => {
  2801. if (res) {
  2802. res.data.forEach((item) => {
  2803. if (item.key == "一线") {
  2804. that.recruitTypeList[2] = item.value;
  2805. that.recruitTypeMax += item.value;
  2806. } else if (item.key == "地面") {
  2807. that.recruitTypeList[0] = item.value;
  2808. that.recruitTypeMax += item.value;
  2809. } else if (item.key == "辅助") {
  2810. that.recruitTypeList[1] = item.value;
  2811. that.recruitTypeMax += item.value;
  2812. } else if (item.key == "开始时间") {
  2813. that.allTimeList[0] = that.getYearMonth(item.value);
  2814. }
  2815. });
  2816. let leftChange = that.$refs.leftChange;
  2817. if (leftChange) {
  2818. that.initThreeBig(leftChange);
  2819. }
  2820. that.leftTime && clearInterval(that.leftTime);
  2821. that.leftTime = setInterval(() => {
  2822. that.leftList.forEach((item, index) => {
  2823. item.flag = !item.flag;
  2824. if (item.flag) {
  2825. if (index == 0) {
  2826. that.leftFlag = true;
  2827. // that.timeList2 = [that.allTimeList[1][1], that.allTimeList[1][0]]
  2828. that.getPositionAll();
  2829. } else {
  2830. that.leftFlag = false;
  2831. // that.timeList2 = [that.allTimeList[0][1], that.allTimeList[0][0]]
  2832. that.getRecruitType();
  2833. setTimeout(() => {
  2834. let leftChange = that.$refs.leftChange;
  2835. that.initThreeBig(leftChange);
  2836. });
  2837. }
  2838. }
  2839. });
  2840. }, 15000);
  2841. }
  2842. });
  2843. },
  2844. getYearMonth(date) {
  2845. // 获取指定日期的年份和月份
  2846. let targetDate = new Date(date);
  2847. let targetYear = targetDate.getFullYear();
  2848. let targetMonth = targetDate.getMonth() + 1; // 月份从0开始计数,需要加1
  2849. // 获取当前日期的年份和月份
  2850. let currentDate = new Date();
  2851. let currentYear = currentDate.getFullYear();
  2852. let currentMonth = currentDate.getMonth() + 1; // 月份从0开始计数,需要加1
  2853. // 定义结果数组
  2854. let result = [];
  2855. // 循环遍历年份和月份,从目标日期到当前日期
  2856. for (let year = targetYear; year <= currentYear; year++) {
  2857. // 起始月份为目标年份的起始月份,结束月份为当前年份的结束月份
  2858. let startMonth = year === targetYear ? targetMonth : 1;
  2859. let endMonth = year === currentYear ? currentMonth : 12;
  2860. // 循环遍历月份,并将年份和月份添加到结果中
  2861. for (let month = startMonth; month <= endMonth; month++) {
  2862. let formattedMonth = month.toString().padStart(2, "0"); // 格式化为两位数的月份
  2863. result.push(`${year}-${formattedMonth}`);
  2864. }
  2865. }
  2866. // 输出全部的年月
  2867. return result.reverse();
  2868. },
  2869. getFailReason() {
  2870. let that = this;
  2871. let data = {
  2872. flag: that.dataFlag,
  2873. };
  2874. // leftErrorList:["信息不完整","信息有误","任职条件不符","出勤不足","工作年限不符"]
  2875. fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/FailReason", data).then(
  2876. (res) => {
  2877. if (res) {
  2878. if (res.data.length != 0) {
  2879. let dataList = [];
  2880. let total = 0;
  2881. // dataList.forEach(item => {
  2882. // total = total + item.value
  2883. // })
  2884. // that.rightData.push(...dataList)
  2885. res.data.forEach((item, index) => {
  2886. let obj = {};
  2887. item.forEach((i) => {
  2888. if (i.key == "不通过原因") {
  2889. that.leftErrorList[index] = i.value;
  2890. }
  2891. if (i.key == "百分比") {
  2892. obj.point = i.value;
  2893. }
  2894. if (i.key == "不通过数量") {
  2895. obj.value = i.value;
  2896. dataList[index] = obj;
  2897. total = total + i.value;
  2898. }
  2899. });
  2900. });
  2901. let echartsErrorBox = that.$refs.echartsErrorBox;
  2902. setTimeout(() => {
  2903. for (const child of echartsErrorBox.children) {
  2904. const index = Array.prototype.indexOf.call(
  2905. echartsErrorBox.children,
  2906. child
  2907. );
  2908. let title = "lineRight" + (index + 1);
  2909. that.initLineRight(
  2910. child.children[1],
  2911. {
  2912. value: dataList[index].value,
  2913. point: dataList[index].point,
  2914. total,
  2915. },
  2916. title
  2917. );
  2918. }
  2919. }, 100);
  2920. }
  2921. }
  2922. }
  2923. );
  2924. },
  2925. getQualAudits() {
  2926. let that = this;
  2927. let data = {
  2928. flag: that.dataFlag,
  2929. };
  2930. fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/QualAudits", data).then(
  2931. (res) => {
  2932. if (res) {
  2933. res.data.forEach((item) => {
  2934. if (item.key == "当前总人数") {
  2935. that.rightList[0].num1 = item.value;
  2936. }
  2937. if (item.key == "通过总人数") {
  2938. that.rightList[0].num2 = item.value;
  2939. }
  2940. if (item.key == "当前通过率") {
  2941. that.rightList[0].num3 = item.value;
  2942. }
  2943. });
  2944. }
  2945. }
  2946. );
  2947. },
  2948. getNo(arr) {
  2949. if (Array.isArray(arr)) {
  2950. arr.forEach((item, index) => {
  2951. if (index <= 8) {
  2952. item.unshift("0" + (index + 1));
  2953. } else {
  2954. item.unshift((index + 1).toString());
  2955. }
  2956. });
  2957. }
  2958. return arr;
  2959. },
  2960. getNoticePerson(type = 3) {
  2961. let that = this;
  2962. if (type == 1) {
  2963. that.showExamination = false;
  2964. } else if (type == 2) {
  2965. that.showInterview = false;
  2966. } else {
  2967. this.showExamination = false;
  2968. this.showInterview = false;
  2969. }
  2970. let year = new Date().getFullYear();
  2971. let data = {
  2972. flag: that.dataFlag,
  2973. year,
  2974. month: 0,
  2975. };
  2976. fetchPostMethods(
  2977. "/ierp/kapi/v2/mdnb/mdnb_control/assessmentarrangement",
  2978. data
  2979. ).then((res) => {
  2980. if (res) {
  2981. for (let key in res) {
  2982. if (Array.isArray(res[key])) {
  2983. res[key].forEach((item) => {
  2984. // item.splice(item.length - 2, 1);
  2985. if (item[item.length - 1]) {
  2986. item[item.length - 1] = item[item.length - 1].replaceAll(
  2987. "年",
  2988. "-"
  2989. );
  2990. item[item.length - 1] = item[item.length - 1].replaceAll(
  2991. "月",
  2992. "-"
  2993. );
  2994. item[item.length - 1] = item[item.length - 1].replaceAll(
  2995. "日",
  2996. " "
  2997. );
  2998. item[item.length - 1] = item[item.length - 1].replaceAll(
  2999. "/",
  3000. "-"
  3001. );
  3002. item[item.length - 1] = item[item.length - 1].replaceAll(
  3003. "|",
  3004. "-"
  3005. );
  3006. }
  3007. });
  3008. }
  3009. }
  3010. let arr = [];
  3011. let len = false;
  3012. if (res.bishiList.length != 0) {
  3013. arr.push(...that.getNo(res.bishiList));
  3014. if (arr.length % 2 == 0) {
  3015. arr.push([]);
  3016. len = true;
  3017. }
  3018. res.bishiList = [];
  3019. res.bishiList = arr.filter((_, index) => index % 2 === 0);
  3020. res.mianshiList = arr.filter((_, index) => index % 2 !== 0);
  3021. that.configInterviewElse.data = [...arr];
  3022. if (len) {
  3023. that.configInterviewElse.data.pop();
  3024. }
  3025. } else if (res.mianshiList.length != 0) {
  3026. arr.push(...that.getNo(res.mianshiList));
  3027. if (arr.length % 2 != 0) {
  3028. arr.push([]);
  3029. len = true;
  3030. }
  3031. res.mianshiList = [];
  3032. res.bishiList = arr.filter((_, index) => index % 2 === 0);
  3033. res.mianshiList = arr.filter((_, index) => index % 2 !== 0);
  3034. that.configInterviewElse.data = [...arr];
  3035. if (len) {
  3036. that.configInterviewElse.data.pop();
  3037. }
  3038. }
  3039. if (type == 1) {
  3040. that.configWritten.data = res.bishiList;
  3041. // that.configWritten.data = that.getNo(res.bishiList)
  3042. setTimeout(() => {
  3043. that.showExamination = true;
  3044. }, 10);
  3045. } else if (type == 2) {
  3046. that.configInterview.data = res.mianshiList;
  3047. // that.configInterview.data = that.getNo(res.mianshiList)
  3048. setTimeout(() => {
  3049. that.showInterview = true;
  3050. }, 10);
  3051. } else {
  3052. that.configWritten.data = res.bishiList;
  3053. // that.configWritten.data = that.getNo(res.bishiList)
  3054. that.configInterview.data = res.mianshiList;
  3055. // that.configInterview.data = that.getNo(res.mianshiList)
  3056. setTimeout(() => {
  3057. that.showInterview = true;
  3058. that.showExamination = true;
  3059. }, 10);
  3060. if (that.configWritten.data.length <= that.configWritten.rowNum) {
  3061. that.bishiTime && clearInterval(that.bishiTime);
  3062. that.bishiTime = setInterval(() => {
  3063. console.log("笔试面试数据更新");
  3064. that.getNoticePerson(1);
  3065. }, 10000 * 6 * 5);
  3066. }
  3067. if (
  3068. that.configInterview.data.length <= that.configInterview.rowNum
  3069. ) {
  3070. that.mianshiTime && clearInterval(that.mianshiTime);
  3071. that.mianshiTime = setInterval(() => {
  3072. console.log("笔试面试数据更新");
  3073. that.getNoticePerson(2);
  3074. }, 10000 * 6 * 5);
  3075. }
  3076. }
  3077. }
  3078. });
  3079. },
  3080. scrollChangeList(index) {
  3081. let that = this;
  3082. if (that.noticList.length != 1) {
  3083. if (
  3084. index + that.employmentList1.rowNum ==
  3085. that.employmentList1.data.length + 1 ||
  3086. index == 0
  3087. ) {
  3088. if (that.noticIndex >= that.noticList.length - 1) {
  3089. that.noticIndex = 0;
  3090. } else {
  3091. that.noticIndex += 1;
  3092. }
  3093. if (that.noticList[that.noticIndex]) {
  3094. that.employmentList1.data = [];
  3095. that.employmentList2.data = [];
  3096. that.employmentList3.data = [];
  3097. that.isShowList = false;
  3098. that.noticList[that.noticIndex].noticeUserList.forEach(
  3099. (item, index) => {
  3100. if (index % 2 == 0) {
  3101. that.employmentList1.data.push(item);
  3102. } else {
  3103. that.employmentList2.data.push(item);
  3104. }
  3105. }
  3106. );
  3107. that.employmentList3.data.push(
  3108. ...that.noticList[that.noticIndex].noticeUserList
  3109. );
  3110. if (
  3111. that.employmentList1.rowNum >= that.employmentList1.data.length
  3112. ) {
  3113. setTimeout(() => {
  3114. that.scrollChangeList(0);
  3115. }, 10000);
  3116. }
  3117. setTimeout(() => {
  3118. that.isShowList = true;
  3119. }, 10);
  3120. }
  3121. }
  3122. }
  3123. },
  3124. changeCardNo(str) {
  3125. let arr = [];
  3126. let list = [];
  3127. if (str.length != 0) {
  3128. arr = str.split("");
  3129. for (let i = 0; i <= arr.length - 1; i++) {
  3130. if (i < 5) {
  3131. list.push(arr[i]);
  3132. } else if (i > 5 && i < 14) {
  3133. list.push("*");
  3134. } else {
  3135. list.push(arr[i]);
  3136. }
  3137. }
  3138. }
  3139. return list.join("");
  3140. },
  3141. changeNoticList(arr) {
  3142. let list = [];
  3143. let that = this;
  3144. if (Array.isArray(arr)) {
  3145. arr.forEach((item, index) => {
  3146. let a = [];
  3147. if (Array.isArray(item)) {
  3148. list.push(a);
  3149. return;
  3150. }
  3151. if (index <= 8) {
  3152. a = [
  3153. "0" + (index + 1),
  3154. item.name,
  3155. item.sex,
  3156. item.cardno,
  3157. item.org1,
  3158. ];
  3159. } else {
  3160. a = [
  3161. (index + 1).toString(),
  3162. item.name,
  3163. item.sex,
  3164. item.cardno,
  3165. item.org1,
  3166. ];
  3167. }
  3168. list.push(a);
  3169. });
  3170. }
  3171. return list;
  3172. },
  3173. getNotice() {
  3174. let that = this;
  3175. let data = {
  3176. flag: that.dataFlag,
  3177. };
  3178. this.isShowList = false;
  3179. that.noticIndex = 0;
  3180. that.employmentList1.data = [];
  3181. that.employmentList2.data = [];
  3182. that.employmentList3.data = [];
  3183. that.noticList = [];
  3184. fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/getNotice", data).then(
  3185. (res) => {
  3186. if (res && res.length != 0) {
  3187. res.forEach((item, index) => {
  3188. if (item.noticeUserList.length % 2 != 0) {
  3189. item.noticeUserList.push([]);
  3190. }
  3191. let obj = {
  3192. noticeDataList: item.noticeDataList,
  3193. noticeUserList: that.changeNoticList(item.noticeUserList),
  3194. };
  3195. that.noticList.push(obj);
  3196. });
  3197. if (that.noticList[that.noticIndex]) {
  3198. that.noticList[that.noticIndex].noticeUserList.forEach(
  3199. (item, index) => {
  3200. if (index % 2 == 0) {
  3201. that.employmentList1.data.push(item);
  3202. } else {
  3203. that.employmentList2.data.push(item);
  3204. }
  3205. }
  3206. );
  3207. that.employmentList3.data.push(
  3208. ...that.noticList[that.noticIndex].noticeUserList
  3209. );
  3210. }
  3211. if (res.length != 1) {
  3212. // that.noticIndex += 1
  3213. if (
  3214. that.employmentList2.data.length <= that.employmentList2.rowNum
  3215. ) {
  3216. that.noticTime = setInterval(() => {
  3217. that.employmentList1.data = [];
  3218. that.employmentList2.data = [];
  3219. that.employmentList3.data = [];
  3220. that.isShowList = false;
  3221. if (that.noticList[that.noticIndex]) {
  3222. that.noticList[that.noticIndex].noticeUserList.forEach(
  3223. (item, index) => {
  3224. if (index % 2 == 0) {
  3225. that.employmentList1.data.push(item);
  3226. } else {
  3227. that.employmentList2.data.push(item);
  3228. }
  3229. }
  3230. );
  3231. that.employmentList3.data.push(
  3232. ...that.noticList[that.noticIndex].noticeUserList
  3233. );
  3234. }
  3235. // that.noticIndex += 1
  3236. // if (that.noticIndex > that.noticList.length - 1) {
  3237. // that.noticIndex = 0
  3238. // }
  3239. setTimeout(() => {
  3240. that.isShowList = true;
  3241. }, 10);
  3242. }, that.employmentList2.data.length * 2000);
  3243. }
  3244. }
  3245. setTimeout(() => {
  3246. that.isShowList = true;
  3247. });
  3248. }
  3249. }
  3250. );
  3251. // that.noticeList = res.data
  3252. },
  3253. getDoubleChoice() {
  3254. let that = this;
  3255. let data = {
  3256. flag: that.dataFlag,
  3257. };
  3258. fetchPostMethods(
  3259. "/ierp/kapi/v2/mdnb/mdnb_control/DoubleChoice",
  3260. data
  3261. ).then((res) => {
  3262. if (res) {
  3263. that.mainList[0].value = res.value;
  3264. }
  3265. });
  3266. },
  3267. getPositionAll() {
  3268. let that = this;
  3269. let data = {
  3270. flag: that.dataFlag,
  3271. start: that.timeList2[0],
  3272. end: that.timeList2[1],
  3273. };
  3274. // this.leftTime && clearInterval(this.leftTime)
  3275. fetchPostMethods(
  3276. "/ierp/kapi/v2/mdnb/mdnb_control/PositionAll",
  3277. data
  3278. ).then((res) => {
  3279. if (res.data) {
  3280. res.data.sort((a, b) => b[1] - a[1]);
  3281. }
  3282. setTimeout(() => {
  3283. that.leftFlag = false;
  3284. that.config2.data = [];
  3285. let lastList = [];
  3286. let topList = [];
  3287. let mainList = [];
  3288. if (res) {
  3289. if (res.date) {
  3290. that.allTimeList[1] = that.getYearMonth(res.date.value);
  3291. }
  3292. res.data.forEach((item, index) => {
  3293. if (index <= 8) {
  3294. item.unshift("0" + (index + 1));
  3295. } else {
  3296. item.unshift((index + 1).toString());
  3297. }
  3298. });
  3299. if (res.data.length > 5) {
  3300. for (let i = 0; i < 3; i++) {
  3301. let color;
  3302. if (i == 0) {
  3303. color = "yellow";
  3304. } else if (i == 1) {
  3305. color = "red";
  3306. } else {
  3307. color = "green";
  3308. }
  3309. topList.push([
  3310. "<span class='" + color + "'>" + res.data[i][0] + "</span>",
  3311. "<span class='" + color + "'>" + res.data[i][1] + "</span>",
  3312. "<span class='" + color + "'>" + res.data[i][2] + "</span>",
  3313. ]);
  3314. }
  3315. res.data.splice(0, 3);
  3316. mainList.push(...spArr(res.data, 2));
  3317. mainList.forEach((item) => {
  3318. item.unshift(...topList);
  3319. if (item.length < 5) {
  3320. item.push(["", "", ""]);
  3321. }
  3322. lastList.push(...item);
  3323. });
  3324. } else if (res.data.length <= 5 && res.data.length >= 3) {
  3325. for (let i = 0; i < 3; i++) {
  3326. let color;
  3327. if (i == 0) {
  3328. color = "yellow";
  3329. } else if (i == 1) {
  3330. color = "red";
  3331. } else {
  3332. color = "green";
  3333. }
  3334. topList.push([
  3335. "<span class='" + color + "'>" + res.data[i][0] + "</span>",
  3336. "<span class='" + color + "'>" + res.data[i][1] + "</span>",
  3337. "<span class='" + color + "'>" + res.data[i][2] + "</span>",
  3338. ]);
  3339. }
  3340. res.data.splice(0, 3);
  3341. lastList.push(...topList, ...res.data);
  3342. } else if (res.data.length < 3) {
  3343. for (let i = 0; i < res.data.length; i++) {
  3344. let color;
  3345. if (i == 0) {
  3346. color = "yellow";
  3347. } else if (i == 1) {
  3348. color = "red";
  3349. } else {
  3350. color = "green";
  3351. }
  3352. lastList.push([
  3353. "<span class='" + color + "'>" + res.data[i][0] + "</span>",
  3354. "<span class='" + color + "'>" + res.data[i][1] + "</span>",
  3355. "<span class='" + color + "'>" + res.data[i][2] + "</span>",
  3356. ]);
  3357. }
  3358. }
  3359. that.config2.data = lastList;
  3360. that.leftTime && clearInterval(that.leftTime);
  3361. that.leftTime = setTimeout(() => {
  3362. that.leftFlag = true;
  3363. that.leftTime = setInterval(() => {
  3364. that.leftList.forEach((item, index) => {
  3365. item.flag = !item.flag;
  3366. if (item.flag) {
  3367. if (index == 0) {
  3368. that.leftFlag = true;
  3369. // that.timeList2 = [that.allTimeList[1][1], that.allTimeList[1][0]]
  3370. that.getPositionAll();
  3371. } else {
  3372. that.leftFlag = false;
  3373. // that.timeList2 = [that.allTimeList[0][1], that.allTimeList[0][0]]
  3374. that.getRecruitType();
  3375. setTimeout(() => {
  3376. let leftChange = that.$refs.leftChange;
  3377. that.initThreeBig(leftChange);
  3378. });
  3379. }
  3380. }
  3381. });
  3382. }, 15000);
  3383. }, 10);
  3384. }
  3385. }, 0);
  3386. });
  3387. },
  3388. getTotalRate() {
  3389. let that = this;
  3390. let data = {
  3391. flag: that.dataFlag,
  3392. };
  3393. fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/TotalRate", data).then(
  3394. (res) => {
  3395. if (res) {
  3396. // that.rightList
  3397. res.data.forEach((item) => {
  3398. if (item.key == "累计人数") {
  3399. that.rightList[1].num1 = item.value;
  3400. }
  3401. if (item.key == "累计通过人数") {
  3402. that.rightList[1].num2 = item.value;
  3403. }
  3404. if (item.key == "通过率") {
  3405. that.rightList[1].num3 = item.value;
  3406. }
  3407. });
  3408. }
  3409. }
  3410. );
  3411. },
  3412. scrollChangeListW(index) {
  3413. let that = this;
  3414. if (
  3415. index + that.configInterview.rowNum ==
  3416. that.configInterview.data.length
  3417. ) {
  3418. console.log("笔试更新");
  3419. setTimeout(() => {
  3420. that.getNoticePerson(1);
  3421. }, 1700);
  3422. }
  3423. },
  3424. scrollChangeListIn(index) {
  3425. let that = this;
  3426. if (
  3427. index + that.configInterview.rowNum ==
  3428. that.configInterview.data.length
  3429. ) {
  3430. console.log("面试更新");
  3431. setTimeout(() => {
  3432. that.getNoticePerson(2);
  3433. }, 1700);
  3434. }
  3435. },
  3436. scrollChangeListElse(index) {
  3437. let that = this;
  3438. if (
  3439. index + that.configInterviewElse.rowNum ==
  3440. that.configInterviewElse.data.length
  3441. ) {
  3442. console.log("面试更新");
  3443. setTimeout(() => {
  3444. that.getNoticePerson();
  3445. }, 1700);
  3446. }
  3447. },
  3448. },
  3449. });