humanResources.js 125 KB

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