humanResources.js 126 KB

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