humanResources.js 123 KB

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