humanResources.js 105 KB

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