humanResources.js 125 KB

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