user.vue 131 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671
  1. <template>
  2. <div class="content-box">
  3. <div class="treeV">
  4. <el-input
  5. v-model="searchInput.department"
  6. :clearable="true"
  7. @clear="getDepartment"
  8. @input="getDepartment"
  9. placeholder="请输入部门名称"
  10. class="searchTree"
  11. >
  12. <template #prefix>
  13. <el-icon class="el-input__icon"><search /></el-icon>
  14. </template>
  15. </el-input>
  16. <el-tree
  17. :data="dataSource"
  18. node-key="id"
  19. :default-expanded-keys="[2, 3, 16]"
  20. :expand-on-click-node="false"
  21. >
  22. <template #default="{ node, data }">
  23. <span class="custom-tree-node">
  24. <div class="title" @click="nodeClick(node, data)">
  25. <img src="@/assets/images/folder.png" alt="" />
  26. <!-- <img src="@/assets/images/document.png" alt="" /> -->
  27. <span :class="data.id == treeNodeId ? 'nodeClick' : ''">{{
  28. data.name
  29. }}</span>
  30. </div>
  31. <el-dropdown
  32. v-if="data.isManage == 1"
  33. @command="handleCommand"
  34. :hide-on-click="false"
  35. trigger="click"
  36. >
  37. <span class="el-dropdown-link">
  38. <img src="@/assets/images/edit.png" alt="" />
  39. </span>
  40. <template #dropdown>
  41. <el-dropdown-menu>
  42. <el-dropdown-item
  43. command="a"
  44. @click="amendBMClick(node, data)"
  45. >修改部门</el-dropdown-item
  46. >
  47. <el-dropdown-item command="b" @click="addBMClick(node, data)"
  48. >新建子部门</el-dropdown-item
  49. >
  50. <!-- <el-dropdown-item command="c">删除</el-dropdown-item> -->
  51. </el-dropdown-menu>
  52. </template>
  53. </el-dropdown>
  54. </span>
  55. </template>
  56. </el-tree>
  57. </div>
  58. <!-- 主页面 -->
  59. <div class="userRight" v-if="homeShow">
  60. <div class="left">
  61. <!-- <el-icon :size="23" class="camera"><VideoCameraFilled /></el-icon> -->
  62. <span>用户管理</span>
  63. <span>&nbsp;| {{ treeNodeName }}</span>
  64. <span>/ 共有{{ total }}人</span>
  65. </div>
  66. <div class="scorll">
  67. <div class="middle">
  68. <div class="filter">
  69. <div class="condition">
  70. <el-input
  71. v-model="searchInput.keyWord"
  72. :clearable="true"
  73. @clear="searchBtn"
  74. placeholder="请输入用户姓名"
  75. style="width: 240px"
  76. >
  77. <template #prefix>
  78. <el-icon class="el-input__icon"><search /></el-icon>
  79. </template>
  80. </el-input>
  81. </div>
  82. <el-button
  83. color="rgba(0, 97, 255, 1)"
  84. type="primary"
  85. class="search"
  86. @click="searchBtn"
  87. >
  88. <span>查询</span></el-button
  89. >
  90. </div>
  91. <!-- 按钮列表 -->
  92. <div class="gongneng">
  93. <el-button
  94. type="primary"
  95. color="rgba(0, 97, 255, 1)"
  96. @click="addMemberClick"
  97. :disabled="isManage != 1"
  98. plain
  99. >添加成员</el-button
  100. >
  101. <el-button
  102. type="primary"
  103. color="rgba(0, 97, 255, 1)"
  104. @click="moveMemberClick"
  105. :disabled="isManage != 1"
  106. plain
  107. >移动成员</el-button
  108. >
  109. <el-dropdown>
  110. <el-button color="rgba(0, 97, 255, 1)" plain>批量操作</el-button>
  111. <template #dropdown>
  112. <el-dropdown-menu>
  113. <el-dropdown-item
  114. :disabled="isManage != 1"
  115. @click="addBatchClick"
  116. >批量导入</el-dropdown-item
  117. >
  118. <el-dropdown-item
  119. :disabled="isManage != 1"
  120. @click="updateBatchClick"
  121. >批量更新</el-dropdown-item
  122. >
  123. </el-dropdown-menu>
  124. </template>
  125. </el-dropdown>
  126. <!-- <el-button
  127. type="primary"
  128. color="rgba(0, 97, 255, 1)"
  129. @click="closeAccountClick"
  130. plain
  131. >注销账号</el-button
  132. > -->
  133. <el-button
  134. type="primary"
  135. color="rgba(0, 97, 255, 1)"
  136. @click="delDelClick"
  137. :disabled="isManage != 1"
  138. plain
  139. >勾选删除</el-button
  140. >
  141. <!-- <el-button-group class="ml-4">
  142. <el-tooltip
  143. class="box-item"
  144. effect="dark"
  145. content="根据当前选中的部门、查询中的用户姓名进行导出"
  146. placement="top-start"
  147. > <el-button
  148. type="primary"
  149. color="rgba(0, 97, 255, 1)"
  150. @click="importExcel"
  151. :disabled="isManage != 1"
  152. plain
  153. style="margin-right: 0;border-right: 0px ;"
  154. >导出用户</el-button
  155. >
  156. </el-tooltip>
  157. <el-button type="primary" @click="exportSettingsClick" style="border-left: 0px ;" plain color="rgba(0, 97, 255, 1)" :icon="Tools" />
  158. </el-button-group> -->
  159. <el-tooltip
  160. class="box-item"
  161. effect="dark"
  162. content="根据当前选中的部门、查询中的用户姓名进行导出"
  163. placement="top-start"
  164. >
  165. <el-button
  166. type="primary"
  167. color="rgba(0, 97, 255, 1)"
  168. @click="exportSettingsClick"
  169. :disabled="isManage != 1"
  170. plain
  171. style="margin-right: 0"
  172. >导出用户</el-button
  173. >
  174. </el-tooltip>
  175. <!-- <el-button-group class="ml-4">
  176. <el-button type="primary" @click="exportSettingsClick" style="border-left: 0px ;" plain color="rgba(0, 97, 255, 1)" :icon="Tools" />
  177. </el-button-group> -->
  178. <el-button
  179. type="primary"
  180. color="rgba(0, 97, 255, 1)"
  181. @click="DelRecordClick"
  182. :disabled="isManage != 1"
  183. plain
  184. >删除异常记录</el-button
  185. >
  186. </div>
  187. </div>
  188. <div class="footer" v-loading="loading">
  189. <el-table
  190. :row-class-name="tableRowClassName"
  191. :data="tableData.list"
  192. @selection-change="handleSelectionChange"
  193. style="width: 100%"
  194. :header-cell-style="{
  195. background: 'rgba(240, 243, 247, 1)',
  196. height: '50px',
  197. border: 0,
  198. }"
  199. >
  200. <el-table-column align="center" type="selection" width="80" />
  201. <el-table-column align="center" prop="name" label="姓名" />
  202. <el-table-column
  203. align="center"
  204. prop="timeGroupName"
  205. label="时间组"
  206. />
  207. <el-table-column align="center" prop="identity" label="身份" />
  208. <el-table-column align="center" prop="department" label="部门" />
  209. <el-table-column
  210. align="center"
  211. prop="cardNo"
  212. label="学号/电话号码"
  213. />
  214. <el-table-column align="center" prop="img" label="人脸照片">
  215. <template #default="{ row }">
  216. <div class="img" v-viewer>
  217. <img
  218. v-if="row.headImage"
  219. :src="row.headImage"
  220. alt=""
  221. />
  222. </div>
  223. </template>
  224. </el-table-column>
  225. <el-table-column align="center" label="操作" width="200">
  226. <template #default="scope" v-if="isManage == 1">
  227. <div class="edit">
  228. <div class="look" @click="editClick(scope.row)">编辑</div>
  229. </div>
  230. </template>
  231. </el-table-column>
  232. </el-table>
  233. </div>
  234. <!-- 分页组件 -->
  235. <div class="pageSize">
  236. <span></span>
  237. <el-pagination
  238. background
  239. :current-page="currentPage"
  240. :page-size="pageSize"
  241. :page-sizes="[10, 20, 50, 100]"
  242. layout="total,sizes, prev, pager, next, jumper, slot"
  243. :total="total"
  244. @size-change="handleSizeChange"
  245. @update:current-page="handleCurrentChange"
  246. />
  247. </div>
  248. </div>
  249. </div>
  250. <!-- 添加成员 -->
  251. <div class="addMember" v-if="addMemberShow">
  252. <div class="left">
  253. <img src="@/assets/images/close.png" alt="" @click="addMemberConcel" />
  254. <span class="add">{{ addMemberTitle }}</span>
  255. </div>
  256. <div class="content">
  257. <div class="form">
  258. <el-form
  259. ref="addMemberRef"
  260. :model="addMemberRuleForm"
  261. :rules="addMemberRules"
  262. label-width="90px"
  263. class="demo-ruleForm"
  264. :size="formSize"
  265. label-position="right"
  266. status-icon
  267. >
  268. <div class="title">
  269. <img src="@/assets/images/basicInfo.png" alt="" />
  270. <span>基本信息</span>
  271. </div>
  272. <el-form-item label="身份 :" prop="identity">
  273. <el-select
  274. v-model="addMemberRuleForm.identity"
  275. placeholder="请选择身份"
  276. style="width: 500px"
  277. @change="identityChange"
  278. clearable
  279. :disabled="addMemberTitle == '编辑成员' ? true : false"
  280. >
  281. <el-option
  282. v-for="i in identityData"
  283. :label="i.name"
  284. :value="i.id"
  285. />
  286. </el-select>
  287. </el-form-item>
  288. <el-form-item
  289. v-if="addMemberRuleForm.identity != 1"
  290. label="职务 :"
  291. :prop="addMemberRuleForm.identity == 3 ? 'duty' : ''"
  292. >
  293. <el-select
  294. v-model="addMemberRuleForm.duty"
  295. placeholder="先选择身份再选择职务"
  296. style="width: 500px"
  297. clearable
  298. >
  299. <el-option
  300. v-for="i in postData"
  301. :label="i.name"
  302. :value="`${i.id}`"
  303. />
  304. </el-select>
  305. <!-- <el-tooltip
  306. class="box-item"
  307. effect="dark"
  308. content="请先选择身份"
  309. placement="top-start"
  310. >
  311. </el-tooltip> -->
  312. </el-form-item>
  313. <el-form-item
  314. :key="addMemberRuleForm.identity"
  315. label="学号 :"
  316. :prop="
  317. addMemberRuleForm.identity == 1 ||
  318. addMemberRuleForm.identity == 14
  319. ? ''
  320. : 'serialNumber'
  321. "
  322. >
  323. <el-input
  324. :disabled="addMemberTitle == '编辑成员' ? true : false"
  325. v-model="addMemberRuleForm.serialNumber"
  326. placeholder="请输学号"
  327. clearable
  328. style="width: 500px"
  329. />
  330. </el-form-item>
  331. <el-form-item label="姓名 :" prop="name">
  332. <el-input
  333. v-model="addMemberRuleForm.name"
  334. placeholder="请输入姓名"
  335. clearable
  336. style="width: 500px"
  337. />
  338. </el-form-item>
  339. <el-form-item
  340. label="身份证号 :"
  341. :prop="addMemberRuleForm.identity == 1 ? '' : ''"
  342. >
  343. <el-input
  344. v-model="addMemberRuleForm.icCard"
  345. placeholder="请输入身份证号"
  346. clearable
  347. style="width: 500px"
  348. />
  349. </el-form-item>
  350. <el-form-item label="性别 :" prop="sex">
  351. <el-radio-group v-model="addMemberRuleForm.sex">
  352. <el-radio :value="1">男</el-radio>
  353. <el-radio :value="2">女</el-radio>
  354. </el-radio-group>
  355. </el-form-item>
  356. <el-form-item label="部门 :" prop="department">
  357. <!-- <el-cascader
  358. v-model="addMemberRuleForm.department"
  359. style="width: 500px"
  360. filterable
  361. clearable
  362. :options="dataSource"
  363. :props="{ label: 'name', value: 'id' }"
  364. :show-all-levels="false"
  365. /> -->
  366. <el-tree-select
  367. v-model="addMemberRuleForm.department"
  368. :data="dataSource"
  369. default-expand-all
  370. check-strictly
  371. :render-after-expand="false"
  372. style="width: 500px"
  373. :props="{ label: 'name', value: 'id' }"
  374. clearable
  375. />
  376. </el-form-item>
  377. <el-form-item
  378. label="人脸照片 :"
  379. :prop="addMemberRuleForm.identity == 1 ? '' : 'facePhoto'"
  380. >
  381. <div class="facePhoto">
  382. <div v-if="addMemberRuleForm.facePhoto" v-viewer>
  383. <!-- <img
  384. @click="imgClick(addMemberRuleForm.facePhoto)"
  385. :src="addMemberRuleForm.facePhoto"
  386. alt="facePhotoImg"
  387. /> -->
  388. <img
  389. :src="addMemberRuleForm.facePhoto"
  390. alt="facePhotoImg"
  391. />
  392. </div>
  393. <el-upload
  394. class="avatar-uploader"
  395. action="#"
  396. :auto-upload="false"
  397. :on-preview="handlePreview"
  398. :on-remove="handleRemove"
  399. :on-change="handleChange"
  400. :http-request="handleUpload"
  401. :before-upload="beforeAvatarUpload"
  402. ref="upload"
  403. :limit="1"
  404. :on-exceed="handleExceed"
  405. >
  406. <template #trigger>
  407. <el-button :icon="Camera">上传图片</el-button>
  408. </template>
  409. <template #tip>
  410. <div class="el-upload__tip">
  411. 支持扩展名:.jpg
  412. .png,五官清晰无遮挡,名字+后缀,大小不超过2M
  413. </div>
  414. </template>
  415. </el-upload>
  416. </div>
  417. </el-form-item>
  418. <el-form-item
  419. v-if="addMemberRuleForm.identity != 1"
  420. label="年级 :"
  421. :prop="
  422. addMemberRuleForm.identity == 3 && addMemberRuleForm.duty != 1
  423. ? ''
  424. : 'grade'
  425. "
  426. >
  427. <el-select
  428. v-model="addMemberRuleForm.grade"
  429. placeholder="请选择年级"
  430. style="width: 500px"
  431. @change="classsListChange"
  432. clearable
  433. >
  434. <el-option
  435. v-for="i in gradeData"
  436. :label="i.name"
  437. :value="i.id"
  438. />
  439. </el-select>
  440. </el-form-item>
  441. <el-form-item
  442. v-if="addMemberRuleForm.identity != 1"
  443. label="班级 :"
  444. :prop="
  445. addMemberRuleForm.identity == 3 && addMemberRuleForm.duty != 1
  446. ? ''
  447. : 'class'
  448. "
  449. >
  450. <el-select
  451. v-model="addMemberRuleForm.class"
  452. placeholder="请选择班级"
  453. style="width: 500px"
  454. clearable
  455. >
  456. <el-option
  457. v-for="i in classsData"
  458. :label="i.name"
  459. :value="i.id"
  460. />
  461. </el-select>
  462. </el-form-item>
  463. <el-form-item
  464. label="任课班级 :"
  465. prop="teachingClass"
  466. v-if="addMemberRuleForm.identity == 3"
  467. >
  468. <el-cascader
  469. style="width: 500px"
  470. placeholder="请选择任课班级"
  471. v-model="addMemberRuleForm.teachingClass"
  472. :options="teachingClassData"
  473. :props="teachingClassProps"
  474. @change="teachingClassChange"
  475. clearable
  476. ref="teachingClassRef"
  477. />
  478. </el-form-item>
  479. <el-form-item
  480. v-if="addMemberRuleForm.identity != 3"
  481. label="时间组 :"
  482. :prop="addMemberRuleForm.identity == 1 ? '' : 'timeGroupId'"
  483. >
  484. <el-select
  485. v-model="addMemberRuleForm.timeGroupId"
  486. placeholder="请选择时间"
  487. style="width: 500px"
  488. clearable
  489. >
  490. <el-option
  491. v-for="i in timeGroupList"
  492. :label="i.name"
  493. :value="i.id"
  494. />
  495. </el-select>
  496. </el-form-item>
  497. <el-form-item
  498. v-if="
  499. addMemberRuleForm.identity != 2 &&
  500. addMemberRuleForm.identity != 1 &&
  501. addMemberRuleForm.identity != 3
  502. "
  503. label="学院 :"
  504. prop="institute"
  505. >
  506. <el-input
  507. v-model="addMemberRuleForm.institute"
  508. placeholder="请输入学院"
  509. clearable
  510. style="width: 500px"
  511. />
  512. </el-form-item>
  513. <el-form-item
  514. v-if="
  515. addMemberRuleForm.identity != 2 &&
  516. addMemberRuleForm.identity != 1 &&
  517. addMemberRuleForm.identity != 3
  518. "
  519. label="专业 :"
  520. prop="specialty"
  521. >
  522. <el-input
  523. v-model="addMemberRuleForm.specialty"
  524. placeholder="请输入专业"
  525. clearable
  526. style="width: 500px"
  527. />
  528. </el-form-item>
  529. <el-form-item label="校区 :" prop="school">
  530. <el-input
  531. v-model="addMemberRuleForm.school"
  532. placeholder="请输入校区"
  533. clearable
  534. style="width: 500px"
  535. />
  536. </el-form-item>
  537. <el-form-item label="宿舍号 :" prop="dormitory">
  538. <el-input
  539. v-model="addMemberRuleForm.dormitory"
  540. placeholder="请输入宿舍号"
  541. clearable
  542. style="width: 500px"
  543. />
  544. </el-form-item>
  545. <el-form-item
  546. v-if="addMemberRuleForm.identity != 2"
  547. label="手机号 :"
  548. prop="phone"
  549. >
  550. <el-input
  551. v-model="addMemberRuleForm.phone"
  552. placeholder="请输入手机号"
  553. clearable
  554. style="width: 500px"
  555. />
  556. </el-form-item>
  557. <el-form-item
  558. v-if="
  559. addMemberRuleForm.identity != 3 &&
  560. addMemberRuleForm.identity != 2
  561. "
  562. label="关联人 :"
  563. prop="contact"
  564. >
  565. <el-select
  566. v-model="addMemberRuleForm.contact"
  567. popper-class="more-tag-data"
  568. multiple
  569. filterable
  570. remote
  571. :remote-method="conteactMethod"
  572. :loading="conteactLoading"
  573. placeholder="请选择关联人"
  574. style="width: 500px"
  575. >
  576. <el-option
  577. v-for="item in conteactListData"
  578. :key="item.id"
  579. :label="`${item.name}`"
  580. :value="`${item.id}`"
  581. >
  582. <span style="float: left">{{ item.name }}</span>
  583. <span
  584. style="
  585. float: right;
  586. color: var(--el-text-color-secondary);
  587. font-size: 13px;
  588. "
  589. >{{ item.cardNo }}</span
  590. >
  591. </el-option>
  592. <template #footer>
  593. <div class="addStudentMore">
  594. <el-button
  595. v-if="
  596. conteactListCurrentPage < conteactListTotalPage &&
  597. conteactListTotalPage != 0
  598. "
  599. @click="addStudentListMore"
  600. >加载更多+</el-button
  601. >
  602. </div>
  603. </template>
  604. </el-select>
  605. </el-form-item>
  606. <div class="title">
  607. <img src="@/assets/images/basicInfo.png" alt="" />
  608. <span>其他信息</span>
  609. </div>
  610. <el-form-item label="职称 :" prop="jobName">
  611. <el-input
  612. v-model="addMemberRuleForm.jobName"
  613. placeholder="请输入职称"
  614. clearable
  615. style="width: 500px"
  616. />
  617. </el-form-item>
  618. <el-form-item label="家庭地址 :" prop="houseAddress">
  619. <el-input
  620. v-model="addMemberRuleForm.houseAddress"
  621. placeholder="请输入家庭地址"
  622. clearable
  623. style="width: 500px"
  624. />
  625. </el-form-item>
  626. <el-form-item label="民族 :" prop="nation">
  627. <el-input
  628. v-model="addMemberRuleForm.nation"
  629. placeholder="请输入民族"
  630. clearable
  631. style="width: 500px"
  632. />
  633. </el-form-item>
  634. <el-form-item label="生源地 :" prop="originOfStudent">
  635. <el-input
  636. v-model="addMemberRuleForm.originOfStudent"
  637. placeholder="请输入生源地"
  638. clearable
  639. style="width: 500px"
  640. />
  641. </el-form-item>
  642. <el-form-item label="毕业学院 :" prop="graduateCollege">
  643. <el-input
  644. v-model="addMemberRuleForm.graduateCollege"
  645. placeholder="请输入毕业学院"
  646. clearable
  647. style="width: 500px"
  648. />
  649. </el-form-item>
  650. <el-form-item class="options">
  651. <el-button
  652. color="rgba(41, 109, 227, 1)"
  653. class="queding"
  654. type="primary"
  655. @click="confirmAddMember(addMemberRef)"
  656. >
  657. 确认
  658. </el-button>
  659. <el-button @click="addMemberConcel(addMemberRef)">取消</el-button>
  660. </el-form-item>
  661. </el-form>
  662. </div>
  663. </div>
  664. </div>
  665. <!-- 批量添加 -->
  666. <div
  667. class="addMember"
  668. v-if="addBatchShow"
  669. v-loading="startImprot"
  670. element-loading-text="人员信息导入中..."
  671. >
  672. <div class="left">
  673. <img src="@/assets/images/close.png" alt="" @click="addBatchConcel" />
  674. <span class="add">批量添加</span>
  675. </div>
  676. <div class="content">
  677. <div class="form">
  678. <div class="imgUpload">
  679. <el-upload
  680. style="width: 500px"
  681. class="upload-demo"
  682. ref="upload2"
  683. drag
  684. action="#"
  685. :on-preview="handlePreview2"
  686. :on-remove="handleRemove2"
  687. :on-change="handleChange2"
  688. :http-request="handleUpload2"
  689. :before-upload="beforeAvatarUpload2"
  690. :limit="1"
  691. :on-exceed="handleExceed2"
  692. >
  693. <el-icon class="el-icon--upload"><upload-filled /></el-icon>
  694. <div class="el-upload__text">
  695. <span style="font-size: 20px">点击上传或拖拽文件</span><br />
  696. <em>请按照标准模板填写信息</em><br />
  697. <em>&nbsp;</em>
  698. </div>
  699. <!-- <template #tip>
  700. <div class="el-upload__tip">
  701. jpg/png files with a size less than 500kb
  702. </div>
  703. </template> -->
  704. </el-upload>
  705. <el-upload
  706. v-loading="imgLoading"
  707. element-loading-text="图片导入中..."
  708. style="width: 500px"
  709. class="img-upload-demo"
  710. drag
  711. action="#"
  712. multiple
  713. ref="allImgUpload"
  714. :on-preview="handlePreviewImgUpload"
  715. :on-remove="handleRemoveImgUpload"
  716. :on-change="handleChangeImgUpload"
  717. :http-request="handleUploadImgUpload"
  718. :before-upload="beforeAvatarUploadImgUpload"
  719. :on-success="handleSuccessImgUpload"
  720. >
  721. <el-icon class="el-icon--upload"><upload-filled /></el-icon>
  722. <div class="el-upload__text">
  723. <span style="font-size: 20px">点击上传图片文件夹</span><br />
  724. <em> 图片格式为jpeg/jpg/png格式且每张图片不能超过2MB </em><br />
  725. <em> 上传文件夹中照片不要超过1000张 </em>
  726. </div>
  727. <!-- <template #tip>
  728. <div class="el-upload__tip">
  729. jpg/png files with a size less than 500kb
  730. </div>
  731. </template> -->
  732. </el-upload>
  733. </div>
  734. <!-- <input
  735. ref="Folder"
  736. type="file"
  737. @change="uploadFloder"
  738. webkitdirectory
  739. /> -->
  740. <div class="startImport">
  741. <el-button
  742. v-if="!imgLoading && upload2File && uploadImgList"
  743. type="primary"
  744. color="rgba(0, 97, 255, 1)"
  745. @click="bulkImport"
  746. plain
  747. >开始导入</el-button
  748. >
  749. <span
  750. v-else
  751. type="primary"
  752. color="rgba(236, 245, 255, 1)"
  753. style="
  754. display: inline-block;
  755. width: 500px;
  756. height: 42px;
  757. text-align: center;
  758. line-height: 42px;
  759. color: rgb(160, 207, 255);
  760. border: 1px solid #dcdfe6;
  761. border-radius: 4px;
  762. "
  763. plain
  764. >开始导入</span
  765. >
  766. <span
  767. style="
  768. width: 120px;
  769. margin-left: 20px;
  770. cursor: pointer;
  771. color: rgba(0, 97, 255, 1);
  772. "
  773. @click="resetImport"
  774. >重置</span
  775. >
  776. <span class="downLoad" @click="downLoadtempAdd(1)"
  777. >下载学生模板</span
  778. >
  779. <span class="downLoad" @click="downLoadtempAdd(2)"
  780. >下载教师模板</span
  781. >
  782. </div>
  783. <!-- <div class="tableTitle">导入历史</div>
  784. <div class="footer">
  785. <el-table
  786. :row-class-name="tableRowClassName"
  787. :data="addBatchData.list"
  788. @selection-change="handleSelectionChange"
  789. :header-cell-style="{
  790. background: 'rgba(240, 243, 247, 1)',
  791. height: '45px',
  792. border: 0,
  793. }"
  794. >
  795. <el-table-column
  796. align="center "
  797. prop="userName"
  798. label="操作管理员"
  799. />
  800. <el-table-column
  801. width="160"
  802. align="center"
  803. prop="time"
  804. label="上传时间"
  805. />
  806. <el-table-column align="center" prop="status" label="导入状态" />
  807. <el-table-column
  808. align="center"
  809. prop="userPhone"
  810. label="导入成功"
  811. />
  812. <el-table-column
  813. align="center"
  814. prop="userPhone"
  815. label="导入失败"
  816. />
  817. <el-table-column align="center" label="失败列表" width="200">
  818. <template #default="scope">
  819. <div class="edit">
  820. <div class="look" @click="lookClick(scope.row)">
  821. 点击查看
  822. </div>
  823. </div>
  824. </template>
  825. </el-table-column>
  826. </el-table>
  827. <div class="pageSize">
  828. <span></span>
  829. <el-pagination
  830. background
  831. :current-page="addBatch_currentPage"
  832. :page-size="addBatch_pageSize"
  833. layout="total, prev, pager, next, jumper, slot"
  834. :total="addBatch_total"
  835. @update:current-page="handleAddBatch"
  836. />
  837. </div>
  838. </div> -->
  839. </div>
  840. </div>
  841. </div>
  842. <!-- 批量更新 -->
  843. <div
  844. class="addMember"
  845. v-if="updateBatchShow"
  846. v-loading="startUpdate"
  847. element-loading-text="人员信息更新中..."
  848. >
  849. <div class="left">
  850. <img
  851. src="@/assets/images/close.png"
  852. alt=""
  853. @click="updateBatchConcel"
  854. />
  855. <span class="add">批量更新</span>
  856. </div>
  857. <div class="content">
  858. <div class="form">
  859. <div class="imgUpload">
  860. <el-upload
  861. style="width: 500px"
  862. class="upload-demo"
  863. ref="batchUpload"
  864. drag
  865. action="#"
  866. :on-preview="handlePreviewUpdate"
  867. :on-remove="handleRemoveUpdate"
  868. :on-change="handleChangeUpdate"
  869. :http-request="handleUploadUpdate"
  870. :before-upload="beforeAvatarUploadUpdate"
  871. :limit="1"
  872. :on-exceed="handleExceedUpdate"
  873. >
  874. <el-icon class="el-icon--upload"><upload-filled /></el-icon>
  875. <div class="el-upload__text">
  876. <span style="font-size: 20px">点击上传或拖拽文件</span><br />
  877. <em>请按照标准模板填写信息</em><br />
  878. <em>&nbsp;</em>
  879. </div>
  880. <!-- <template #tip>
  881. <div class="el-upload__tip">
  882. jpg/png files with a size less than 500kb
  883. </div>
  884. </template> -->
  885. </el-upload>
  886. <!-- <el-upload
  887. v-loading="imgLoading"
  888. element-loading-text="图片导入中..."
  889. style="width: 500px"
  890. class="img-upload-demo"
  891. drag
  892. action="#"
  893. multiple
  894. ref="allImgUpload"
  895. :on-preview="handlePreviewImgUpload"
  896. :on-remove="handleRemoveImgUpload"
  897. :on-change="handleChangeImgUpload"
  898. :http-request="handleUploadImgUpload"
  899. :before-upload="beforeAvatarUploadImgUpload"
  900. :on-success="handleSuccessImgUpload"
  901. >
  902. <el-icon class="el-icon--upload"><upload-filled /></el-icon>
  903. <div class="el-upload__text">
  904. <span style="font-size: 20px">点击上传图片文件夹</span><br />
  905. <em> 图片格式为jpeg/jpg/png格式且每张图片不能超过2MB </em><br />
  906. <em> 上传文件夹中照片不要超过1000张 </em>
  907. </div>
  908. </el-upload> -->
  909. </div>
  910. <div class="startImport">
  911. <el-button
  912. type="primary"
  913. color="rgba(0, 97, 255, 1)"
  914. @click="bulkUpdateImport"
  915. plain
  916. >开始更新</el-button
  917. >
  918. <!-- <span
  919. style="
  920. width: 120px;
  921. margin-left: 20px;
  922. cursor: pointer;
  923. color: rgba(0, 97, 255, 1);
  924. "
  925. @click="resetImport"
  926. >重置</span
  927. > -->
  928. <span class="downLoad" @click="downLoadtempUpdate">下载模板</span>
  929. </div>
  930. </div>
  931. </div>
  932. </div>
  933. <!-- 删除记录页面 -->
  934. <div class="delRecord" v-if="delRecordShow">
  935. <div class="left">
  936. <img src="@/assets/images/close.png" alt="" @click="delRecordClose" />
  937. <span class="add">{{ addMemberTitle }}</span>
  938. </div>
  939. <div class="scorll">
  940. <div class="footer" v-loading="loading">
  941. <el-table
  942. :row-class-name="tableRowClassName"
  943. :data="delRecordDatas"
  944. @selection-change="handleSelectionChange"
  945. style="width: 100%"
  946. :header-cell-style="{
  947. background: 'rgba(240, 243, 247, 1)',
  948. height: '50px',
  949. border: 0,
  950. }"
  951. >
  952. <el-table-column align="center" prop="name" label="姓名" />
  953. <el-table-column align="center" prop="identityStr" label="身份" />
  954. <el-table-column align="center" prop="departmentStr" label="部门" />
  955. <el-table-column align="center" prop="cardNo" label="学号" />
  956. <el-table-column align="center" prop="img" label="人脸照片">
  957. <template #default="{ row }">
  958. <div class="img" v-viewer>
  959. <img :src="row.headImage" alt="" />
  960. </div>
  961. </template>
  962. </el-table-column>
  963. <el-table-column align="center" width="400" prop="deleteReason" label="删除异常原因" />
  964. <!-- <el-table-column align="center" label="操作" width="200">
  965. <template #default="scope">
  966. <div class="edit">
  967. <div class="look" @click="editClick(scope.row)">编辑</div>
  968. </div>
  969. </template>
  970. </el-table-column> -->
  971. </el-table>
  972. </div>
  973. <!-- 分页组件 -->
  974. <div class="pageSize">
  975. <span></span>
  976. <el-pagination
  977. background
  978. :current-page="delRecordCurrentPage"
  979. :page-size="delRecordPageSize"
  980. layout="total, prev, pager, next, jumper, slot"
  981. :total="delRecordTotal"
  982. @update:current-page="handleCurrentChange"
  983. />
  984. </div>
  985. </div>
  986. </div>
  987. <!-- 批量删除 -->
  988. <div class="addMember" v-if="delBatchShow">
  989. <div class="left">
  990. <img src="@/assets/images/close.png" alt="" @click="delBatchConcel" />
  991. <span class="add">批量删除</span>
  992. </div>
  993. <div class="content">
  994. <div class="form">
  995. <el-upload
  996. style="width: 500px"
  997. class="upload-demo"
  998. drag
  999. action="#"
  1000. multiple
  1001. :on-preview="handlePreview3"
  1002. :on-remove="handleRemove3"
  1003. :on-change="handleChange3"
  1004. :http-request="handleUpload3"
  1005. :before-upload="beforeAvatarUpload3"
  1006. >
  1007. <el-icon class="el-icon--upload"><upload-filled /></el-icon>
  1008. <div class="el-upload__text">
  1009. <span style="font-size: 20px">点击上传或拖拽文件</span><br /><em
  1010. >务必按照我们的标准模板填写信息</em
  1011. >
  1012. </div>
  1013. <!-- <template #tip>
  1014. <div class="el-upload__tip">
  1015. jpg/png files with a size less than 500kb
  1016. </div>
  1017. </template> -->
  1018. </el-upload>
  1019. <div class="startImport">
  1020. <el-button
  1021. type="primary"
  1022. color="rgba(0, 97, 255, 1)"
  1023. @click="addClick"
  1024. plain
  1025. >开始执行批量删除</el-button
  1026. >
  1027. <span class="downLoad">下载模板</span>
  1028. </div>
  1029. <div class="tableTitle">导入历史</div>
  1030. <div class="footer">
  1031. <el-table
  1032. :row-class-name="tableRowClassName"
  1033. :data="delBatchData.list"
  1034. @selection-change="handleSelectionChange"
  1035. :header-cell-style="{
  1036. background: 'rgba(240, 243, 247, 1)',
  1037. height: '45px',
  1038. border: 0,
  1039. }"
  1040. >
  1041. <el-table-column
  1042. align="center "
  1043. prop="userName"
  1044. label="操作管理员"
  1045. />
  1046. <el-table-column align="center" prop="time" label="上传时间" />
  1047. <el-table-column align="center" prop="status" label="导入状态" />
  1048. <el-table-column
  1049. align="center"
  1050. prop="userPhone"
  1051. label="导入成功"
  1052. />
  1053. <el-table-column
  1054. align="center"
  1055. prop="userPhone"
  1056. label="导入失败"
  1057. />
  1058. <el-table-column align="center" label="失败列表" width="200">
  1059. <template #default="scope">
  1060. <div class="edit">
  1061. <div class="look" @click="lookClick(scope.row)">
  1062. 点击查看
  1063. </div>
  1064. <!-- <el-popconfirm
  1065. width="220"
  1066. confirm-button-text="确认"
  1067. cancel-button-text="取消"
  1068. :icon="InfoFilled"
  1069. icon-color="#f89626"
  1070. title="是否删除此房型?"
  1071. @confirm="del(scope.row)"
  1072. @cancel="cancelEvent"
  1073. >
  1074. <template #reference>
  1075. <div class="del">删除</div>
  1076. </template>
  1077. </el-popconfirm> -->
  1078. </div>
  1079. </template>
  1080. </el-table-column>
  1081. </el-table>
  1082. <div class="pageSize">
  1083. <span></span>
  1084. <el-pagination
  1085. background
  1086. :current-page="delBatch_currentPage"
  1087. :page-size="delBatch_pageSize"
  1088. layout="total, prev, pager, next, jumper, slot"
  1089. :total="delBatch_total"
  1090. @update:current-page="handleDelBatch"
  1091. />
  1092. </div>
  1093. </div>
  1094. </div>
  1095. </div>
  1096. </div>
  1097. <!-- 修改部门 -->
  1098. <el-dialog
  1099. class="amendBMDialog"
  1100. v-model="amendBMVisible"
  1101. :close-on-click-modal="false"
  1102. :close-on-press-escape="false"
  1103. title="修改部门"
  1104. align-center
  1105. width="500"
  1106. :before-close="cancelAmendBM"
  1107. >
  1108. <el-form
  1109. ref="amendBMRef"
  1110. :model="amendBMRuleForm"
  1111. :rules="amendBMRules"
  1112. label-width="90px"
  1113. class="demo-ruleForm"
  1114. :size="formSize"
  1115. label-position="left"
  1116. status-icon
  1117. >
  1118. <el-form-item label="部门名称 :" prop="department">
  1119. <el-input
  1120. v-model.trim="amendBMRuleForm.department"
  1121. placeholder="请输入部门名称"
  1122. clearable
  1123. style="width: 340px"
  1124. />
  1125. </el-form-item>
  1126. <div class="option">
  1127. <el-button
  1128. color="rgba(41, 109, 227, 1)"
  1129. class="queding"
  1130. type="primary"
  1131. @click="confirmAmendBM(amendBMRef)"
  1132. >
  1133. 确认
  1134. </el-button>
  1135. <el-button @click="cancelAmendBM(amendBMRef)">取消</el-button>
  1136. </div>
  1137. </el-form>
  1138. </el-dialog>
  1139. <!-- 新建子部门 -->
  1140. <el-dialog
  1141. class="amendBMDialog"
  1142. v-model="addBMVisible"
  1143. :close-on-click-modal="false"
  1144. :close-on-press-escape="false"
  1145. title="新建子部门"
  1146. align-center
  1147. width="500"
  1148. :before-close="cancelAddBM"
  1149. >
  1150. <el-form
  1151. ref="addBMRef"
  1152. :model="addBMRuleForm"
  1153. :rules="addBMRules"
  1154. label-width="90px"
  1155. class="demo-ruleForm"
  1156. :size="formSize"
  1157. label-position="left"
  1158. status-icon
  1159. >
  1160. <el-form-item label="部门名称 :" prop="department">
  1161. <el-input
  1162. v-model.trim="addBMRuleForm.department"
  1163. placeholder="请输入部门名称"
  1164. clearable
  1165. style="width: 340px"
  1166. />
  1167. </el-form-item>
  1168. <div class="option">
  1169. <el-button
  1170. color="rgba(41, 109, 227, 1)"
  1171. class="queding"
  1172. type="primary"
  1173. @click="confirmAddBM(addBMRef)"
  1174. >
  1175. 确认
  1176. </el-button>
  1177. <el-button @click="cancelAddBM(addBMRef)">取消</el-button>
  1178. </div>
  1179. </el-form>
  1180. </el-dialog>
  1181. <!-- 移动成员 -->
  1182. <el-dialog
  1183. class="moveMemberDialog"
  1184. v-model="moveMemberVisible"
  1185. :close-on-click-modal="false"
  1186. :close-on-press-escape="false"
  1187. title="移动选择用户至"
  1188. align-center
  1189. width="650"
  1190. :before-close="cancelMoveMember"
  1191. >
  1192. <div class="move">
  1193. <div class="moveLeft">
  1194. <el-input
  1195. v-model="moveSearchInput"
  1196. :clearable="true"
  1197. @clear="getMoveData"
  1198. @input="getMoveData"
  1199. placeholder="请输入部门"
  1200. class="searchTree"
  1201. style="width: 260px"
  1202. >
  1203. <template #prefix>
  1204. <el-icon class="el-input__icon"><search /></el-icon>
  1205. </template>
  1206. </el-input>
  1207. <el-tree
  1208. ref="moveTree"
  1209. :data="moveData"
  1210. node-key="id"
  1211. default-expand-all
  1212. :expand-on-click-node="false"
  1213. show-checkbox
  1214. check-strictly
  1215. @check-change="moveCheckChange"
  1216. >
  1217. <template #default="{ node, data }">
  1218. <span class="custom-tree-node">
  1219. <div class="title">
  1220. <img src="@/assets/images/folder.png" alt="" />
  1221. <!-- <img src="@/assets/images/document.png" alt="" /> -->
  1222. <span>{{ data.name }}</span>
  1223. </div>
  1224. </span>
  1225. </template>
  1226. </el-tree>
  1227. </div>
  1228. <div class="moveRight">
  1229. <div class="sel">已选择 :</div>
  1230. <ul
  1231. class="infinite-list"
  1232. style="overflow: auto"
  1233. infinite-scroll-immediate="false"
  1234. >
  1235. <li
  1236. v-for="(i, index) in treeSelData.list"
  1237. :key="index"
  1238. class="infinite-list-item"
  1239. >
  1240. <span style="margin-left: 19px">{{ i.label }}</span>
  1241. <el-icon @click="cancelTreeSel(i)">
  1242. <Close />
  1243. </el-icon>
  1244. <!-- <i class="el-icon-close" @click="cancelCheck(i)"></i> -->
  1245. </li>
  1246. </ul>
  1247. </div>
  1248. </div>
  1249. <div class="options">
  1250. <el-button
  1251. color="rgba(41, 109, 227, 1)"
  1252. class="queding"
  1253. type="primary"
  1254. @click="confirmMoveMember"
  1255. >
  1256. 确认
  1257. </el-button>
  1258. <el-button @click="cancelMoveMember">取消</el-button>
  1259. </div>
  1260. </el-dialog>
  1261. <!-- 用户导出设置 -->
  1262. <el-dialog
  1263. class="exportSettings"
  1264. v-model="exportSettingsVisible"
  1265. :close-on-click-modal="false"
  1266. :close-on-press-escape="false"
  1267. title="用户导出设置"
  1268. align-center
  1269. width="650"
  1270. :before-close="cancelExportSettings"
  1271. >
  1272. <div class="move">
  1273. <el-transfer
  1274. v-model="exportSettingsSel"
  1275. :titles="['未选择', '已选择导出字段']"
  1276. :left-default-checked="leftChecked"
  1277. :right-default-checked="rightChecked"
  1278. :props="{
  1279. key: 'id',
  1280. label: 'name',
  1281. }"
  1282. @change="exportSettingsChange"
  1283. :data="exportSettingsData"
  1284. />
  1285. </div>
  1286. <div class="options">
  1287. <el-button
  1288. color="rgba(41, 109, 227, 1)"
  1289. class="queding"
  1290. type="primary"
  1291. @click="confirmExportSettings"
  1292. >
  1293. 确认导出
  1294. </el-button>
  1295. <el-button @click="cancelExportSettings">取消</el-button>
  1296. </div>
  1297. </el-dialog>
  1298. <!-- 注销账号 -->
  1299. <!-- <el-dialog
  1300. class="closeAccount"
  1301. v-model="closeAccountVisible"
  1302. :close-on-click-modal="false"
  1303. :close-on-press-escape="false"
  1304. title="注销账号"
  1305. align-center
  1306. width="500"
  1307. :before-close="cancelCloseAccount"
  1308. >
  1309. <div class="content">
  1310. <img src="@/assets/images/warning.png" alt="" />
  1311. <span
  1312. >选中的用户将会被注销账号,注销后相应的功能将无法使用,确定要操作吗?</span
  1313. >
  1314. </div>
  1315. <div class="option">
  1316. <el-button
  1317. color="rgba(41, 109, 227, 1)"
  1318. class="queding"
  1319. type="primary"
  1320. @click="confirmCloseAccount"
  1321. >
  1322. 确认
  1323. </el-button>
  1324. <el-button @click="cancelCloseAccount">取消</el-button>
  1325. </div>
  1326. </el-dialog> -->
  1327. <!-- 勾选删除 -->
  1328. <el-dialog
  1329. class="closeAccount"
  1330. v-model="selDelVisible"
  1331. :close-on-click-modal="false"
  1332. :close-on-press-escape="false"
  1333. title="勾选删除"
  1334. align-center
  1335. width="500"
  1336. :before-close="cancelSelDel"
  1337. >
  1338. <div class="content">
  1339. <img src="@/assets/images/warning.png" alt="" />
  1340. <span>是否删除勾选的用户?</span>
  1341. </div>
  1342. <div class="option">
  1343. <el-button
  1344. color="rgba(41, 109, 227, 1)"
  1345. class="queding"
  1346. type="primary"
  1347. @click="confirmSelDel"
  1348. >
  1349. 确认
  1350. </el-button>
  1351. <el-button @click="cancelSelDel">取消</el-button>
  1352. </div>
  1353. </el-dialog>
  1354. <div class="bgImg" v-if="bgImg">
  1355. <el-carousel
  1356. @click="bgImg = false"
  1357. ref="bgImgs"
  1358. indicator-position
  1359. arrow="always"
  1360. :autoplay="false"
  1361. trigger
  1362. >
  1363. <el-carousel-item>
  1364. <img :src="showImg" alt="" />
  1365. </el-carousel-item>
  1366. </el-carousel>
  1367. </div>
  1368. </div>
  1369. </template>
  1370. <script setup>
  1371. import {
  1372. ref,
  1373. reactive,
  1374. watch,
  1375. nextTick,
  1376. onBeforeMount,
  1377. onUnmounted,
  1378. } from "vue";
  1379. import COS from "cos-js-sdk-v5";
  1380. import { useRouter } from "vue-router";
  1381. import { ElMessage, ElMessageBox, genFileId } from "element-plus";
  1382. import { Camera, Tools } from "@element-plus/icons-vue";
  1383. import { dayjs } from "element-plus";
  1384. import lodash from "lodash";
  1385. import axios from "axios";
  1386. import compressImg from "@/utils/compressImg.js";
  1387. import eds from "@/utils/eds.js";
  1388. import { useStore } from "vuex";
  1389. const store = useStore();
  1390. const api = ref("");
  1391. const router = useRouter();
  1392. // 树形结构
  1393. const dataSource = ref([
  1394. {
  1395. id: 1,
  1396. label: "万载县第三中学",
  1397. children: [
  1398. {
  1399. id: 2,
  1400. label: "教职工",
  1401. children: [
  1402. {
  1403. id: 121,
  1404. label: "院领导",
  1405. },
  1406. {
  1407. id: 122,
  1408. label: "董事会办公室",
  1409. },
  1410. {
  1411. id: 123,
  1412. label: "团委",
  1413. },
  1414. {
  1415. id: 124,
  1416. label: "科技园",
  1417. },
  1418. ],
  1419. },
  1420. {
  1421. id: 3,
  1422. label: "学生",
  1423. children: [
  1424. {
  1425. id: 131,
  1426. label: "设计与技术学院",
  1427. },
  1428. {
  1429. id: 132,
  1430. label: "商学院",
  1431. },
  1432. ],
  1433. },
  1434. {
  1435. id: 4,
  1436. label: "临时人员",
  1437. children: [
  1438. {
  1439. id: 141,
  1440. label: "维修",
  1441. },
  1442. {
  1443. id: 142,
  1444. label: "商品",
  1445. },
  1446. ],
  1447. },
  1448. {
  1449. id: 5,
  1450. label: "司机",
  1451. },
  1452. {
  1453. id: 6,
  1454. label: "食堂",
  1455. children: [
  1456. {
  1457. id: 9,
  1458. label: "一食堂",
  1459. },
  1460. {
  1461. id: 10,
  1462. label: "二食堂",
  1463. },
  1464. ],
  1465. },
  1466. ],
  1467. },
  1468. ]);
  1469. // 被点击的树形节点 id
  1470. const treeNodeId = ref();
  1471. const treeNodeName = ref();
  1472. const isManage = ref(); // 判断当前节点是否是编辑权限
  1473. // 主页面数据(----------------------------------------------)
  1474. // 表格数据
  1475. const loading = ref(false);
  1476. const tableData = reactive({
  1477. list: [
  1478. // {
  1479. // userName: "张三",
  1480. // type: "越界",
  1481. // position: "教学楼",
  1482. // img: "https://nimg.ws.126.net/?url=http%3A%2F%2Fdingyue.ws.126.net%2F2021%2F1123%2F77d07411j00r30gwf004dc000go00b4m.jpg&thumbnail=660x2147483647&quality=80&type=jpg",
  1483. // remark: "请规范好学生行为",
  1484. // status: "已处理",
  1485. // time: "2023-12-02 11:05:30",
  1486. // },
  1487. ],
  1488. });
  1489. const searchInput = reactive({
  1490. keyWord: "", // 姓名或学号关键字
  1491. department: "", // 部门
  1492. }); // 搜索按钮数据
  1493. const homeShow = ref(true);
  1494. const currentPage = ref(1); // 当前页
  1495. const pageSize = ref(10);
  1496. const total = ref(8); // 当前总数
  1497. // 修改部门 (----------------------------------------------)
  1498. const amendBMVisible = ref(false);
  1499. const amendBMRef = ref();
  1500. const amendBMRuleForm = reactive({
  1501. department: "", // 部门
  1502. id: "",
  1503. parentId: "",
  1504. });
  1505. // 表单验证
  1506. const amendBMRules = reactive({
  1507. department: [
  1508. { required: true, message: "部门名称不能为空", trigger: "blur" },
  1509. ],
  1510. });
  1511. // 新建子部门 (----------------------------------------------)
  1512. const addBMVisible = ref(false);
  1513. const addBMRef = ref();
  1514. const addBMRuleForm = reactive({
  1515. department: "", // 部门
  1516. id: "",
  1517. });
  1518. // 表单验证
  1519. const addBMRules = reactive({
  1520. department: [
  1521. { required: true, message: "部门名称不能为空", trigger: "blur" },
  1522. ],
  1523. });
  1524. // 添加成员页面 (---------------------------------------------)
  1525. const addMemberShow = ref(false);
  1526. const addMemberTitle = ref("添加成员");
  1527. const addMemberRef = ref();
  1528. const addMemberRuleForm = reactive({
  1529. serialNumber: "", // 学号
  1530. name: "", // 姓名
  1531. identity: "", // 身份
  1532. icCard: "", // 身份证号
  1533. sex: "", // 性别
  1534. department: "", // 部门
  1535. facePhoto: "", // 人脸照片
  1536. facePhoto: "", // 人脸照片
  1537. compressFacePhoto: "", // 压缩的人脸照片
  1538. grade: "", // 年级
  1539. class: "", // 班级
  1540. teachingClass: "", // 任课班级
  1541. institute: "", // 学院
  1542. specialty: "", // 专业
  1543. school: "", // 校区
  1544. dormitory: "", // 宿舍号
  1545. phone: "", // 手机号
  1546. contact: [], // 联系人
  1547. timeGroupId: "", // 时间组
  1548. // 其他信息
  1549. jobName: "", // 职称
  1550. houseAddress: "", // 家庭地址
  1551. nation: "", // 民族
  1552. originOfStudent: "", // 生源地
  1553. graduateCollege: "", // 毕业学院
  1554. duty: "", // 职务
  1555. id: "",
  1556. });
  1557. const identityData = ref(); // 身份下拉数据
  1558. const gradeData = ref(); // 年级下拉数据
  1559. const classsData = ref(); // 班级下拉数据
  1560. const postData = ref(); // 职务下拉数据
  1561. const timeGroupList = ref(); // 时间组下拉数据
  1562. const conteactListData = ref(); // 联系人下拉数据
  1563. const conteactListCurrentPage = ref(1); // 联系人下拉当前页数
  1564. const conteactListPageCount = ref(50); // 联系人下拉一页数据条数
  1565. const conteactListTotalPage = ref(); // 联系人总共多少页,判断滚动到底是否还要加载
  1566. const conteactListInput = ref(); // 联系人下拉框中的搜索字段
  1567. const conteactLoading = ref(false); // 联系人下拉框搜索时加载
  1568. const teachingClassRef = ref();
  1569. const teachingClassProps = {
  1570. multiple: true,
  1571. label: "name",
  1572. value: "id",
  1573. children: "children",
  1574. }; // 任课班级
  1575. const teachingClassData = ref([
  1576. {
  1577. value: 1,
  1578. label: "语文",
  1579. children: [
  1580. {
  1581. value: 2,
  1582. label: "七年级",
  1583. children: [
  1584. { value: 3, label: "一班" },
  1585. { value: 4, label: "二班" },
  1586. { value: 5, label: "三班" },
  1587. ],
  1588. },
  1589. {
  1590. value: 6,
  1591. label: "八年级",
  1592. children: [
  1593. { value: 7, label: "一班" },
  1594. { value: 8, label: "二班" },
  1595. { value: 9, label: "三班" },
  1596. ],
  1597. },
  1598. {
  1599. value: 10,
  1600. label: "九年级",
  1601. children: [
  1602. { value: 11, label: "一班" },
  1603. { value: 12, label: "二班" },
  1604. { value: 13, label: "三班" },
  1605. ],
  1606. },
  1607. ],
  1608. },
  1609. {
  1610. value: 14,
  1611. label: "数学",
  1612. children: [
  1613. {
  1614. value: 15,
  1615. label: "七年级",
  1616. children: [
  1617. { value: 16, label: "一班" },
  1618. { value: 17, label: "二班" },
  1619. { value: 18, label: "三班" },
  1620. ],
  1621. },
  1622. {
  1623. value: 19,
  1624. label: "八年级",
  1625. children: [
  1626. { value: 20, label: "一班" },
  1627. { value: 21, label: "二班" },
  1628. { value: 22, label: "三班" },
  1629. ],
  1630. },
  1631. ],
  1632. },
  1633. {
  1634. value: 23,
  1635. label: "英语",
  1636. children: [
  1637. {
  1638. value: 24,
  1639. label: "七年级",
  1640. children: [
  1641. { value: 25, label: "一班" },
  1642. { value: 26, label: "二班" },
  1643. { value: 27, label: "三班" },
  1644. ],
  1645. },
  1646. {
  1647. value: 28,
  1648. label: "八年级",
  1649. children: [
  1650. { value: 29, label: "一班" },
  1651. { value: 30, label: "二班" },
  1652. { value: 31, label: "三班" },
  1653. ],
  1654. },
  1655. ],
  1656. },
  1657. ]);
  1658. const upload = ref(); // 人脸照片
  1659. // 表单验证
  1660. const checkPhone = (rule, value, callback) => {
  1661. var reg = /^[1][0-9]{10}$/;
  1662. if (!reg.test(value)) {
  1663. callback(new Error("手机号格式不对"));
  1664. } else {
  1665. callback();
  1666. }
  1667. };
  1668. const checkIccard = (rule, value, callback) => {
  1669. var reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
  1670. if (!reg.test(value)) {
  1671. callback(new Error("身份证号格式不对"));
  1672. } else {
  1673. callback();
  1674. }
  1675. };
  1676. const addMemberRules = reactive({
  1677. serialNumber: [{ required: true, message: "学号不能为空", trigger: "blur" }],
  1678. name: [{ required: true, message: "姓名不能为空", trigger: "blur" }],
  1679. identity: [{ required: true, message: "身份不能为空", trigger: "change" }],
  1680. icCard: [
  1681. { required: true, message: "身份证号不能为空", trigger: "blur" },
  1682. { validator: checkIccard, trigger: "blur" },
  1683. ],
  1684. sex: [{ required: true, message: "性别不能为空", trigger: "blur" }],
  1685. department: [{ required: true, message: "部门不能为空", trigger: "change" }],
  1686. facePhoto: [{ required: true, message: "人脸照片不能为空", trigger: "blur" }],
  1687. grade: [{ required: true, message: "年级不能为空", trigger: "change" }],
  1688. // institute: [{ required: true, message: "学院不能为空", trigger: "blur" }],
  1689. // specialty: [{ required: true, message: "专业不能为空", trigger: "blur" }],
  1690. class: [{ required: true, message: "班级不能为空", trigger: "change" }],
  1691. teachingClass: [
  1692. { required: true, message: "任课班级不能为空", trigger: "change" },
  1693. ],
  1694. // school: [{ required: true, message: "校区不能为空", trigger: "blur" }],
  1695. // dormitory: [{ required: true, message: "宿舍号不能为空", trigger: "blur" }],
  1696. phone: [
  1697. { required: true, message: "手机号不能为空", trigger: "blur" },
  1698. { validator: checkPhone, trigger: "blur" },
  1699. ],
  1700. contact: [{ required: true, message: "关联人不能为空", trigger: "blur" }],
  1701. // jobName: [{ required: true, message: "职称不能为空", trigger: "blur" }],
  1702. houseAddress: [
  1703. // { required: true, message: "家庭地址不能为空", trigger: "blur" },
  1704. ],
  1705. // nation: [{ required: true, message: "民族不能为空", trigger: "blur" }],
  1706. originOfStudent: [
  1707. // { required: true, message: "生源地不能为空", trigger: "blur" },
  1708. ],
  1709. graduateCollege: [
  1710. // { required: true, message: "毕业学院不能为空", trigger: "blur" },
  1711. ],
  1712. duty: [{ required: true, message: "职务不能为空", trigger: "blur" }],
  1713. timeGroupId: [{ required: true, message: "时间组不能为空", trigger: "blur" }],
  1714. });
  1715. // 批量添加 (-----------------------------------------)
  1716. const addBatchShow = ref(false);
  1717. const addBatchData = reactive({
  1718. list: [
  1719. {
  1720. userName: "张三",
  1721. status: "已处理",
  1722. time: "2023-12-02 11:05:30",
  1723. },
  1724. {
  1725. userName: "王卿",
  1726. status: "已处理",
  1727. time: "2023-12-02 11:05:30",
  1728. },
  1729. {
  1730. userName: "李明",
  1731. status: "已处理",
  1732. time: "2023-12-02 11:05:30",
  1733. },
  1734. {
  1735. userName: "涂涂",
  1736. status: "已处理",
  1737. time: "2023-12-02 11:05:30",
  1738. },
  1739. {
  1740. userName: "小红",
  1741. status: "已处理",
  1742. time: "2023-12-02 11:05:30",
  1743. },
  1744. {
  1745. userName: "小明",
  1746. status: "已处理",
  1747. time: "2023-12-02 11:05:30",
  1748. },
  1749. {
  1750. userName: "例子",
  1751. status: "已处理",
  1752. time: "2023-12-02 11:05:30",
  1753. },
  1754. ],
  1755. });
  1756. const addBatch_currentPage = ref(1); // 当前页
  1757. const addBatch_pageSize = ref(7);
  1758. const addBatch_total = ref(8); // 当前总数
  1759. const upload2 = ref(); // ref 导入文件ref
  1760. const allImgUpload = ref(); // ref 导入图片ref
  1761. const imgLoading = ref(false); // 导入时判断图片全部导入成功
  1762. const startImprot = ref(false); // 开始导入时全屏加载
  1763. const upload2File = ref(); // 批量导入的文件
  1764. const uploadImgList = ref(); // 批量导入的图片列表
  1765. // 批量更新 (-----------------------------------------)
  1766. const updateBatchShow = ref(false);
  1767. const batchUpload = ref(); // ref 更新文件ref
  1768. const startUpdate = ref(false); // 开始更新时全屏加载
  1769. const batchUpdateFile = ref(); // 批量更新的文件
  1770. // 批量删除(--------------------------------------------)
  1771. const delBatchShow = ref(false);
  1772. const delBatchData = reactive({
  1773. list: [
  1774. {
  1775. userName: "张三",
  1776. status: "已处理",
  1777. time: "2023-12-02 11:05:30",
  1778. },
  1779. {
  1780. userName: "王卿",
  1781. status: "已处理",
  1782. time: "2023-12-02 11:05:30",
  1783. },
  1784. {
  1785. userName: "李明",
  1786. status: "已处理",
  1787. time: "2023-12-02 11:05:30",
  1788. },
  1789. {
  1790. userName: "涂涂",
  1791. status: "已处理",
  1792. time: "2023-12-02 11:05:30",
  1793. },
  1794. {
  1795. userName: "小红",
  1796. status: "已处理",
  1797. time: "2023-12-02 11:05:30",
  1798. },
  1799. {
  1800. userName: "小明",
  1801. status: "已处理",
  1802. time: "2023-12-02 11:05:30",
  1803. },
  1804. {
  1805. userName: "例子",
  1806. status: "已处理",
  1807. time: "2023-12-02 11:05:30",
  1808. },
  1809. ],
  1810. });
  1811. const delBatch_currentPage = ref(1); // 当前页
  1812. const delBatch_pageSize = ref(7);
  1813. const delBatch_total = ref(8); // 当前总数
  1814. // 移动成员(-----------------------------------------------)
  1815. const moveData = ref(); // 树形数据
  1816. const selectData = reactive({ list: [] }); // 要移动的成员列表
  1817. const moveMemberVisible = ref(false);
  1818. const moveTree = ref();
  1819. const moveSearchInput = ref(); // 移动部门中关键字搜索
  1820. const treeSelData = reactive({ list: [] }); //
  1821. // 用户导出设置 (-----------------------------------------------)
  1822. const exportSettingsVisible = ref(false);
  1823. const exportSettingsSel = ref([]); // 用户导出设置的选择数据
  1824. const leftChecked = ref([]); // 左边默认选择中的数据
  1825. const rightChecked = ref([]); // 右边默认选择中的数据
  1826. const exportSettingsData = ref([
  1827. { name: "姓名", id: 1 },
  1828. { name: "身份", id: 2 },
  1829. { name: "部门", id: 3 },
  1830. { name: "学号/电话号码", id: 4 },
  1831. ]); //
  1832. // 删除记录页面
  1833. const delRecordDatas = ref(); // 删除记录
  1834. const delRecordTotal = ref(); // 删除记录数量
  1835. const delRecordCurrentPage = ref(1);
  1836. const delRecordPageSize = ref(8);
  1837. const delRecordShow = ref(false);
  1838. // 勾选删除
  1839. const selDelVisible = ref(false);
  1840. // 查看表格图片 (----------------------------------------------)
  1841. const bgImg = ref(false);
  1842. const showImg = ref();
  1843. const imgClick = (row) => {
  1844. console.log(typeof row);
  1845. if (typeof row == "string") {
  1846. bgImg.value = true;
  1847. showImg.value = row;
  1848. } else {
  1849. bgImg.value = true;
  1850. showImg.value = row.headImage;
  1851. }
  1852. };
  1853. // 查看用户分页列表
  1854. const getList = async () => {
  1855. loading.value = true;
  1856. let data = {
  1857. currentPage: currentPage.value,
  1858. pageCount: pageSize.value,
  1859. departmentId: treeNodeId.value,
  1860. name: searchInput.keyWord,
  1861. };
  1862. // api.value='/smartApi'
  1863. let res = await axios({
  1864. method: "get",
  1865. url: api.value + "/wanzai/api/smartUser/queryPageSmartUser",
  1866. headers: {
  1867. token: sessionStorage.getItem("token"),
  1868. user_head: sessionStorage.getItem("userhead"),
  1869. },
  1870. params: data,
  1871. });
  1872. // console.log(res);
  1873. if (res.data.code == 200) {
  1874. console.log(res, JSON.parse(eds.decryptDes(res.data.data)), "用户列表");
  1875. loading.value = false;
  1876. let datas = JSON.parse(eds.decryptDes(res.data.data));
  1877. tableData.list = datas.list;
  1878. total.value = datas.totalCount;
  1879. } else {
  1880. loading.value = false;
  1881. ElMessage({
  1882. type: "error",
  1883. showClose: true,
  1884. message: res.data.message,
  1885. center: true,
  1886. });
  1887. }
  1888. };
  1889. // 获取部门树形结构
  1890. const getDepartment = async () => {
  1891. let data = {
  1892. name: searchInput.department,
  1893. };
  1894. let res = await axios({
  1895. method: "get",
  1896. url: api.value + "/wanzai/api/smartDepartment/queryDepartmentTree",
  1897. headers: {
  1898. token: sessionStorage.getItem("token"),
  1899. user_head: sessionStorage.getItem("userhead"),
  1900. },
  1901. params: data,
  1902. });
  1903. if (res.data.code == 200) {
  1904. console.log(res, JSON.parse(eds.decryptDes(res.data.data)), "部门树形数据");
  1905. loading.value = false;
  1906. if (treeNodeId.value && treeNodeName.value) {
  1907. } else {
  1908. treeNodeId.value = JSON.parse(eds.decryptDes(res.data.data))[0].id;
  1909. treeNodeName.value = JSON.parse(eds.decryptDes(res.data.data))[0].name;
  1910. isManage.value = JSON.parse(eds.decryptDes(res.data.data))[0].isManage;
  1911. getList();
  1912. }
  1913. dataSource.value = JSON.parse(eds.decryptDes(res.data.data));
  1914. // ElMessage({
  1915. // type: "success",
  1916. // showClose: true,
  1917. // message: res.data.message,
  1918. // center: true,
  1919. // });
  1920. } else {
  1921. loading.value = false;
  1922. if(res.data.message=='登录凭证已过期,请重新登录'){
  1923. router.push({
  1924. path: `/login`,
  1925. });
  1926. }
  1927. ElMessage({
  1928. type: "error",
  1929. showClose: true,
  1930. message: res.data.message,
  1931. center: true,
  1932. });
  1933. }
  1934. };
  1935. // 部门节点被点击
  1936. const nodeClick = (node, data) => {
  1937. treeNodeId.value = data.id;
  1938. treeNodeName.value = data.name;
  1939. isManage.value = data.isManage;
  1940. getList();
  1941. console.log(data);
  1942. };
  1943. // 搜索功能
  1944. const searchBtn = lodash.debounce(async () => {
  1945. getList();
  1946. }, 300);
  1947. // 修改部门(------------------------------------------------)
  1948. const amendBMClick = (node, data) => {
  1949. amendBMVisible.value = true;
  1950. amendBMRuleForm.department = data.name;
  1951. amendBMRuleForm.id = data.id;
  1952. amendBMRuleForm.parentId = data.parentId;
  1953. console.log(node, data, "修改部门");
  1954. };
  1955. const confirmAmendBM = async (formEl) => {
  1956. if (!formEl) return;
  1957. await formEl.validate(async (valid, fields) => {
  1958. if (valid) {
  1959. if (valid) {
  1960. let data = {
  1961. id: amendBMRuleForm.id,
  1962. name: amendBMRuleForm.department,
  1963. parentId: amendBMRuleForm.parentId,
  1964. };
  1965. let res = await axios({
  1966. method: "post",
  1967. url:
  1968. api.value + "/wanzai/api/smartDepartment/updateSmartDepartmentById",
  1969. headers: {
  1970. token: sessionStorage.getItem("token"),
  1971. user_head: sessionStorage.getItem("userhead"),
  1972. },
  1973. data: data,
  1974. });
  1975. console.log(res, "修改部门");
  1976. if (res.data.code == 200) {
  1977. ElMessage({
  1978. type: "success",
  1979. showClose: true,
  1980. message: res.data.message,
  1981. center: true,
  1982. });
  1983. amendBMVisible.value = false;
  1984. getDepartment();
  1985. console.log(treeNodeId.value, amendBMRuleForm.id);
  1986. if (treeNodeId.value == amendBMRuleForm.id) {
  1987. treeNodeName.value = amendBMRuleForm.department;
  1988. getList();
  1989. }
  1990. } else {
  1991. ElMessage({
  1992. type: "error",
  1993. showClose: true,
  1994. message: res.data.message,
  1995. center: true,
  1996. });
  1997. }
  1998. } else {
  1999. console.log("error submit!", fields);
  2000. }
  2001. } else {
  2002. console.log("error submit!", fields);
  2003. }
  2004. });
  2005. };
  2006. const cancelAmendBM = () => {
  2007. amendBMVisible.value = false;
  2008. amendBMRef.value.resetFields();
  2009. };
  2010. // 新建子部门(------------------------------------------------)
  2011. const addBMClick = (node, data) => {
  2012. addBMVisible.value = true;
  2013. addBMRuleForm.id = data.id;
  2014. addBMRuleForm.department = "";
  2015. console.log(node, data, "新建子部门");
  2016. };
  2017. const confirmAddBM = async (formEl) => {
  2018. if (!formEl) return;
  2019. await formEl.validate(async (valid, fields) => {
  2020. if (valid) {
  2021. let data = {
  2022. name: addBMRuleForm.department,
  2023. parentId: addBMRuleForm.id,
  2024. };
  2025. let res = await axios({
  2026. method: "post",
  2027. url: api.value + "/wanzai/api/smartDepartment/insertSmartDepartment",
  2028. headers: {
  2029. token: sessionStorage.getItem("token"),
  2030. user_head: sessionStorage.getItem("userhead"),
  2031. },
  2032. data: data,
  2033. });
  2034. console.log(res, "添加子部门");
  2035. if (res.data.code == 200) {
  2036. ElMessage({
  2037. type: "success",
  2038. showClose: true,
  2039. message: res.data.message,
  2040. center: true,
  2041. });
  2042. addBMVisible.value = false;
  2043. getDepartment();
  2044. } else {
  2045. ElMessage({
  2046. type: "error",
  2047. showClose: true,
  2048. message: res.data.message,
  2049. center: true,
  2050. });
  2051. }
  2052. } else {
  2053. console.log("error submit!", fields);
  2054. }
  2055. });
  2056. };
  2057. const cancelAddBM = () => {
  2058. addBMVisible.value = false;
  2059. };
  2060. //删除按钮(---------------------------------------------------)
  2061. const del = async (row) => {
  2062. let data = {
  2063. id: row.id,
  2064. };
  2065. // let res = await axios({
  2066. // method: "post",
  2067. // url: api.value + "/mhotel/housedelHouser.action",
  2068. // headers: {
  2069. // // token: sessionStorage.getItem("token"),
  2070. // // user_head: sessionStorage.getItem("userhead"),
  2071. // },
  2072. // params: data,
  2073. // });
  2074. // if (res.data.code == 200) {
  2075. // if (tableData.list.length == 1 && currentPage.value != 1) {
  2076. // currentPage.value = currentPage.value - 1;
  2077. // }
  2078. // getList();
  2079. // ElMessage({
  2080. // type: "success",
  2081. // showClose: true,
  2082. // message: res.data.message,
  2083. // center: true,
  2084. // });
  2085. // } else {
  2086. // ElMessage({
  2087. // type: "error",
  2088. // showClose: true,
  2089. // message: res.data.message,
  2090. // center: true,
  2091. // });
  2092. // }
  2093. // console.log(res);
  2094. };
  2095. // 添加成员(---------------------------------------------------)
  2096. // 获取身份数据下拉、年级数据下拉、班级数据下拉、新增时间组
  2097. const classDataList = async () => {
  2098. let identity = await axios({
  2099. method: "get",
  2100. url: api.value + "/wanzai/api/smartIdentity/querySmartIdentitys",
  2101. headers: {
  2102. token: sessionStorage.getItem("token"),
  2103. user_head: sessionStorage.getItem("userhead"),
  2104. },
  2105. // params: data,
  2106. });
  2107. console.log(
  2108. identity,
  2109. JSON.parse(eds.decryptDes(identity.data.data)),
  2110. "身份下拉数据"
  2111. );
  2112. identityData.value = JSON.parse(eds.decryptDes(identity.data.data));
  2113. let grade = await axios({
  2114. method: "get",
  2115. url: api.value + "/wanzai/api/smartGrade/querySmartGrades",
  2116. headers: {
  2117. token: sessionStorage.getItem("token"),
  2118. user_head: sessionStorage.getItem("userhead"),
  2119. },
  2120. // params: data,
  2121. });
  2122. console.log(grade, "年级下拉数据");
  2123. gradeData.value = JSON.parse(eds.decryptDes(grade.data.data));
  2124. let timeGroupId = await axios({
  2125. method: "get",
  2126. url: api.value + "/wanzai/api/smartUser/timeGroups",
  2127. headers: {
  2128. token: sessionStorage.getItem("token"),
  2129. user_head: sessionStorage.getItem("userhead"),
  2130. },
  2131. // params: data,
  2132. });
  2133. console.log(timeGroupId, "时间组下拉数据");
  2134. timeGroupList.value = JSON.parse(eds.decryptDes(timeGroupId.data.data));
  2135. };
  2136. // 联系人分页数据
  2137. const studentList = async () => {
  2138. console.log(conteactListInput.value, "加载");
  2139. let data = {
  2140. currentPage: conteactListCurrentPage.value,
  2141. pageCount: conteactListPageCount.value,
  2142. name: conteactListInput.value,
  2143. };
  2144. let res = await axios({
  2145. method: "get",
  2146. url: api.value + "/wanzai/api/smartScore/querySmartSecordPage",
  2147. headers: {
  2148. token: sessionStorage.getItem("token"),
  2149. user_head: sessionStorage.getItem("userhead"),
  2150. },
  2151. params: data,
  2152. });
  2153. console.log(res, JSON.parse(eds.decryptDes(res.data.data)), "联系人数据");
  2154. conteactListData.value = JSON.parse(eds.decryptDes(res.data.data)).list;
  2155. conteactListTotalPage.value = JSON.parse(
  2156. eds.decryptDes(res.data.data)
  2157. ).totalPage;
  2158. };
  2159. // 职务分页数据
  2160. const postList = async () => {
  2161. let data = {
  2162. identityId: addMemberRuleForm.identity,
  2163. };
  2164. let post = await axios({
  2165. method: "get",
  2166. url: api.value + "/wanzai/api/smartDuties/queryDutiesByIdentity",
  2167. headers: {
  2168. token: sessionStorage.getItem("token"),
  2169. user_head: sessionStorage.getItem("userhead"),
  2170. },
  2171. params: data,
  2172. });
  2173. console.log(post);
  2174. if (post.data.code == 200) {
  2175. console.log(
  2176. post,
  2177. JSON.parse(eds.decryptDes(post.data.data)),
  2178. "职务下拉数据"
  2179. );
  2180. postData.value = JSON.parse(eds.decryptDes(post.data.data));
  2181. } else {
  2182. postData.value = [];
  2183. }
  2184. };
  2185. // 任课班级数据
  2186. const teachingClassList = async () => {
  2187. // let data = {
  2188. // identityId: addMemberRuleForm.identity,
  2189. // };
  2190. let post = await axios({
  2191. method: "get",
  2192. url: api.value + "/wanzai/api/smartTeaching/queryTeachings",
  2193. headers: {
  2194. token: sessionStorage.getItem("token"),
  2195. user_head: sessionStorage.getItem("userhead"),
  2196. },
  2197. // params: data,
  2198. });
  2199. console.log(post, "任课班级数据");
  2200. if (post.data.code == 200) {
  2201. teachingClassData.value = post.data.data;
  2202. } else {
  2203. teachingClassData.value = [];
  2204. }
  2205. };
  2206. // 班级下拉数据
  2207. const classsList = async () => {
  2208. let data = {
  2209. gradeId: addMemberRuleForm.grade,
  2210. };
  2211. let classs = await axios({
  2212. method: "get",
  2213. url: api.value + "/wanzai/api/smartClass/querySmartClasss",
  2214. headers: {
  2215. token: sessionStorage.getItem("token"),
  2216. user_head: sessionStorage.getItem("userhead"),
  2217. },
  2218. params: data,
  2219. });
  2220. console.log(classs, "班级下拉数据");
  2221. if (classs.data.code == 200) {
  2222. classsData.value = JSON.parse(eds.decryptDes(classs.data.data));
  2223. }
  2224. };
  2225. // 改变身份加载职务数据
  2226. const identityChange = () => {
  2227. addMemberRuleForm.duty = "";
  2228. addMemberRuleForm.contact = [];
  2229. addMemberRuleForm.class = "";
  2230. addMemberRuleForm.grade = "";
  2231. // addMemberRuleForm.phone = "";
  2232. if (addMemberRuleForm.identity) {
  2233. postList();
  2234. }
  2235. };
  2236. // 切换年级加载班级数据
  2237. const classsListChange = (value) => {
  2238. addMemberRuleForm.class = "";
  2239. if (addMemberRuleForm.grade) {
  2240. classsList();
  2241. }
  2242. };
  2243. // 联系人分页触底加载更多
  2244. const addStudentListScroll = () => {
  2245. nextTick(() => {
  2246. const domElementNode = document.querySelector(
  2247. ".more-tag-data .el-select-dropdown__wrap"
  2248. );
  2249. console.log(domElementNode);
  2250. // 注册下拉滚动事件
  2251. if (domElementNode) {
  2252. domElementNode.addEventListener("scroll", async () => {
  2253. const isBottom =
  2254. domElementNode.scrollHeight - domElementNode.scrollTop <=
  2255. domElementNode.clientHeight;
  2256. if (isBottom) {
  2257. if (conteactListCurrentPage.value < conteactListTotalPage.value) {
  2258. conteactListCurrentPage.value++;
  2259. console.log(conteactListInput.value, "滚动里面");
  2260. let data = {
  2261. currentPage: conteactListCurrentPage.value,
  2262. pageCount: conteactListPageCount.value,
  2263. name: conteactListInput.value,
  2264. };
  2265. let res = await axios({
  2266. method: "get",
  2267. url: api.value + "/wanzai/api/smartScore/querySmartSecordPage",
  2268. headers: {
  2269. token: sessionStorage.getItem("token"),
  2270. user_head: sessionStorage.getItem("userhead"),
  2271. },
  2272. params: data,
  2273. });
  2274. console.log(res, "联系人数据");
  2275. conteactListData.value = [
  2276. ...conteactListData.value,
  2277. ...JSON.parse(eds.decryptDes(res.data.data)).list,
  2278. ];
  2279. } else {
  2280. console.log("数据全部加载完成");
  2281. }
  2282. }
  2283. });
  2284. }
  2285. });
  2286. };
  2287. const addStudentListMore = async () => {
  2288. if (conteactListCurrentPage.value < conteactListTotalPage.value) {
  2289. conteactListCurrentPage.value++;
  2290. console.log(conteactListInput.value, "滚动里面");
  2291. let data = {
  2292. currentPage: conteactListCurrentPage.value,
  2293. pageCount: conteactListPageCount.value,
  2294. name: conteactListInput.value,
  2295. };
  2296. let res = await axios({
  2297. method: "get",
  2298. url: api.value + "/wanzai/api/smartScore/querySmartSecordPage",
  2299. headers: {
  2300. token: sessionStorage.getItem("token"),
  2301. user_head: sessionStorage.getItem("userhead"),
  2302. },
  2303. params: data,
  2304. });
  2305. console.log(res, "联系人数据");
  2306. conteactListData.value = [
  2307. ...conteactListData.value,
  2308. ...JSON.parse(eds.decryptDes(res.data.data)).list,
  2309. ];
  2310. } else {
  2311. console.log("数据全部加载完成");
  2312. }
  2313. };
  2314. // 联系人下拉框搜索时加载
  2315. const conteactMethod = (query) => {
  2316. console.log(query);
  2317. conteactListInput.value = query;
  2318. conteactListCurrentPage.value = 1;
  2319. studentList();
  2320. };
  2321. // 添加成员弹窗
  2322. const addMemberClick = () => {
  2323. addMemberTitle.value = "添加成员";
  2324. conteactListCurrentPage.value = 1; // 联系人分页重新赋值为1
  2325. homeShow.value = false;
  2326. addMemberShow.value = true;
  2327. delRecordShow.value = false;
  2328. studentList();
  2329. addMemberRuleForm.serialNumber = "";
  2330. addMemberRuleForm.name = "";
  2331. addMemberRuleForm.identity = "";
  2332. addMemberRuleForm.icCard = "";
  2333. addMemberRuleForm.sex = "";
  2334. addMemberRuleForm.department = "";
  2335. addMemberRuleForm.facePhoto = "";
  2336. addMemberRuleForm.compressFacePhoto = "";
  2337. addMemberRuleForm.grade = "";
  2338. addMemberRuleForm.teachingClass = "";
  2339. addMemberRuleForm.institute = "";
  2340. addMemberRuleForm.specialty = "";
  2341. addMemberRuleForm.class = "";
  2342. addMemberRuleForm.timeGroupId = "";
  2343. addMemberRuleForm.school = "";
  2344. addMemberRuleForm.dormitory = "";
  2345. addMemberRuleForm.phone = "";
  2346. addMemberRuleForm.contact = [];
  2347. addMemberRuleForm.jobName = "";
  2348. addMemberRuleForm.houseAddress = "";
  2349. addMemberRuleForm.nation = "";
  2350. addMemberRuleForm.originOfStudent = "";
  2351. addMemberRuleForm.graduateCollege = "";
  2352. addMemberRuleForm.duty = "";
  2353. nextTick(() => {
  2354. addMemberRef.value.resetFields();
  2355. });
  2356. };
  2357. const teachingClassChange = (val) => {
  2358. console.log(val);
  2359. console.log(teachingClassRef.value.getCheckedNodes());
  2360. };
  2361. // 编辑成员弹窗
  2362. const editClick = (row) => {
  2363. addMemberTitle.value = "编辑成员";
  2364. conteactListCurrentPage.value = 1; // 联系人分页重新赋值为1
  2365. homeShow.value = false;
  2366. addMemberShow.value = true;
  2367. delRecordShow.value = false;
  2368. // studentList();
  2369. // addStudentListScroll();
  2370. console.log(row, "编辑");
  2371. addMemberRuleForm.serialNumber = row.cardNo; // 学号
  2372. addMemberRuleForm.name = row.name; // 姓名
  2373. addMemberRuleForm.identity = row.identityId; // 身份ID
  2374. nextTick(() => {
  2375. postList();
  2376. });
  2377. addMemberRuleForm.icCard = row.idCard; // 身份证
  2378. addMemberRuleForm.sex = row.sexId; // 性别 女:0男:1
  2379. addMemberRuleForm.department = row.departmentId; // 部门ID
  2380. addMemberRuleForm.facePhoto = row.headImage; // 人脸照片
  2381. if (row.grade) {
  2382. addMemberRuleForm.grade = Number(row.grade); // 年级
  2383. } else {
  2384. addMemberRuleForm.grade = "";
  2385. }
  2386. nextTick(() => {
  2387. classsList();
  2388. });
  2389. addMemberRuleForm.institute = row.college; // 学院
  2390. addMemberRuleForm.specialty = row.speciality; // 专业
  2391. addMemberRuleForm.class = row.schoolClass; // 班级
  2392. addMemberRuleForm.timeGroupId = row.timeGroupId; // 时间组
  2393. addMemberRuleForm.school = row.campus; // 校区
  2394. addMemberRuleForm.dormitory = row.dormitoryNumber; // 宿舍号
  2395. addMemberRuleForm.phone = row.phone; // 手机号
  2396. if (row.affiliate) {
  2397. let arr = [];
  2398. row.affiliates.forEach((item) => {
  2399. studentList().then(res=>{
  2400. conteactListData.value.unshift(item);
  2401. console.log(conteactListData.value);
  2402. })
  2403. arr.push(`${item.id}`);
  2404. });
  2405. addMemberRuleForm.contact = arr; // 联系人
  2406. } else {
  2407. addMemberRuleForm.contact = [];
  2408. }
  2409. if (row.subjectVos) {
  2410. let idArr = [];
  2411. // row.subjectVos.forEach(item=>{
  2412. // item.children.forEach(is=>{
  2413. // is.children.forEach(i=>{
  2414. // idArr.push([item.id,is.id,i.id])
  2415. // })
  2416. // })
  2417. // })
  2418. // console.log(idArr,"任课班级数据重组");
  2419. row.subjectVos.forEach((item) => {
  2420. idArr.push(item.ids);
  2421. });
  2422. console.log(idArr, "任课班级数据重组");
  2423. addMemberRuleForm.teachingClass = idArr;
  2424. } else {
  2425. addMemberRuleForm.teachingClass = [];
  2426. }
  2427. addMemberRuleForm.jobName = row.title; // 职称
  2428. addMemberRuleForm.houseAddress = row.address; // 家庭住址
  2429. addMemberRuleForm.nation = row.nation; // 民族
  2430. addMemberRuleForm.originOfStudent = row.ofStudent; // 生源地
  2431. addMemberRuleForm.graduateCollege = row.graduate; // 毕业学校
  2432. addMemberRuleForm.duty = row.duties; // 职务
  2433. addMemberRuleForm.id = row.id;
  2434. };
  2435. // 确定添加成员
  2436. const confirmAddMember = async (formEl) => {
  2437. if (!formEl) return;
  2438. await formEl.validate(async (valid, fields) => {
  2439. if (valid) {
  2440. console.log(addMemberRuleForm.contact);
  2441. let arr = [];
  2442. addMemberRuleForm.contact.forEach((item) => {
  2443. arr.push(item);
  2444. });
  2445. console.log(arr);
  2446. // 任课班级
  2447. let teachingClassArr = [];
  2448. if (addMemberRuleForm.teachingClass) {
  2449. addMemberRuleForm.teachingClass.forEach((item) => {
  2450. teachingClassArr.push({ ids: item });
  2451. });
  2452. }
  2453. let data = {
  2454. cardNo: addMemberRuleForm.serialNumber, // 学号
  2455. name: addMemberRuleForm.name, // 姓名
  2456. identityId: addMemberRuleForm.identity, // 身份ID
  2457. idCard: addMemberRuleForm.icCard, // 身份证
  2458. sexId: addMemberRuleForm.sex, // 性别 女:0男:1
  2459. departmentId: addMemberRuleForm.department, // 部门ID
  2460. headImage: addMemberRuleForm.facePhoto, // 人脸照片
  2461. grade: addMemberRuleForm.grade, // 年级
  2462. college: addMemberRuleForm.institute, // 学院
  2463. speciality: addMemberRuleForm.specialty, // 专业
  2464. schoolClass: addMemberRuleForm.class, // 班级
  2465. timeGroupId: addMemberRuleForm.timeGroupId, // 时间组
  2466. campus: addMemberRuleForm.school, // 校区
  2467. dormitoryNumber: addMemberRuleForm.dormitory, // 宿舍号
  2468. phone: addMemberRuleForm.phone, // 手机号
  2469. affiliate: arr, // 联系人
  2470. title: addMemberRuleForm.jobName, // 职称
  2471. address: addMemberRuleForm.houseAddress, // 家庭住址
  2472. nation: addMemberRuleForm.nation, // 民族
  2473. ofStudent: addMemberRuleForm.originOfStudent, // 生源地
  2474. graduate: addMemberRuleForm.graduateCollege, // 毕业学校
  2475. duties: addMemberRuleForm.duty, // 职务
  2476. };
  2477. let res = "";
  2478. if (addMemberRuleForm.id) {
  2479. data.id = addMemberRuleForm.id;
  2480. data.usr = teachingClassArr // 任课班级
  2481. res = await axios({
  2482. method: "post",
  2483. url: api.value + "/wanzai/api/smartUser/updateSmartUserById",
  2484. headers: {
  2485. token: sessionStorage.getItem("token"),
  2486. user_head: sessionStorage.getItem("userhead"),
  2487. },
  2488. data: data,
  2489. });
  2490. console.log(res, "编辑用户");
  2491. } else {
  2492. data.isr = teachingClassArr // 任课班级
  2493. res = await axios({
  2494. method: "post",
  2495. url: api.value + "/wanzai/api/smartUser/insertSmartUser",
  2496. headers: {
  2497. token: sessionStorage.getItem("token"),
  2498. user_head: sessionStorage.getItem("userhead"),
  2499. },
  2500. data: data,
  2501. });
  2502. console.log(res, "新增用户");
  2503. }
  2504. if (res.data.code == 200) {
  2505. ElMessage({
  2506. type: "success",
  2507. showClose: true,
  2508. message: res.data.message,
  2509. center: true,
  2510. });
  2511. homeShow.value = true;
  2512. addMemberShow.value = false;
  2513. delRecordShow.value = false;
  2514. addMemberRef.value.resetFields();
  2515. getList();
  2516. } else {
  2517. ElMessage({
  2518. type: "error",
  2519. showClose: true,
  2520. message: res.data.message,
  2521. center: true,
  2522. });
  2523. }
  2524. } else {
  2525. console.log("error submit!", fields);
  2526. }
  2527. });
  2528. };
  2529. const addMemberConcel = () => {
  2530. addMemberShow.value = false;
  2531. homeShow.value = true;
  2532. delRecordShow.value = false;
  2533. addMemberRef.value.resetFields();
  2534. addMemberRuleForm.id = "";
  2535. };
  2536. // 移出照片
  2537. const handleRemove = (uploadFile, uploadFiles) => {
  2538. console.log(uploadFile.uid, uploadFiles);
  2539. addMemberRuleForm.facePhoto = "";
  2540. };
  2541. // 点击图片的查看按钮
  2542. const handlePreview = (file) => {
  2543. // imgUrl.value = file.url;
  2544. // imgVisible.value = true;
  2545. // console.log(file, "00000000");
  2546. };
  2547. // 限制上传图片的大小
  2548. // const beforeAvatarUpload = (rawFile) => {
  2549. // console.log(rawFile, 33333);
  2550. // if (rawFile.type !== "image/jpeg" && rawFile.type !== "image/png") {
  2551. // ElMessage.error("图片格式必须为JPG/PNG格式!");
  2552. // return false;
  2553. // } else if (rawFile.size / 1024 > 150) {
  2554. // ElMessage.error("图片的大小不能超过150kb!");
  2555. // return false;
  2556. // }
  2557. // return true;
  2558. // };
  2559. // 添加照片时往fileList列表中添加图片信息
  2560. const handleChange = async (file, fileLists) => {
  2561. console.log(file, "1111");
  2562. if (file.raw.type == "image/jpeg" || file.raw.type == "image/png") {
  2563. if (file.size / 1024 / 1024 <= 2) {
  2564. const cos = new COS({
  2565. SecretId: "AKIDCPVZdcWIxgHpy5FYxVyPiqkZGrhdXUBg",
  2566. SecretKey: "NkyCN3cz97qKaeXLvHOGxOcdS8f184pL",
  2567. SecurityToken: "1306339220",
  2568. Bucket: "wanzai-1306339220",
  2569. Region: "ap-shanghai",
  2570. });
  2571. const files = file.raw;
  2572. console.log(files);
  2573. // 压缩图片
  2574. // console.log(compressImg);
  2575. var compressImgFile = await compressImg.compressImg(files);
  2576. // console.log(compressImgFile, "压缩图片");
  2577. const compressKey = "Compress" + file.raw.name; // 设置上传到 COS 后的文件名
  2578. cos.putObject(
  2579. {
  2580. Bucket: "wanzai-1306339220",
  2581. Region: "ap-shanghai",
  2582. Key: compressKey,
  2583. Body: compressImgFile,
  2584. onProgress: function (progressData) {
  2585. console.log(JSON.stringify(progressData));
  2586. },
  2587. },
  2588. function (err, data) {
  2589. if (err) {
  2590. console.error(err);
  2591. } else {
  2592. console.log(data, "压缩图片获取成功");
  2593. addMemberRuleForm.facePhoto = "https://" + data.Location;
  2594. // 成功
  2595. }
  2596. }
  2597. );
  2598. // 上传cos桶
  2599. const key = file.raw.name; // 设置上传到 COS 后的文件名
  2600. cos.putObject(
  2601. {
  2602. Bucket: "wanzai-1306339220",
  2603. Region: "ap-shanghai",
  2604. Key: key,
  2605. Body: files,
  2606. onProgress: function (progressData) {
  2607. console.log(JSON.stringify(progressData));
  2608. },
  2609. },
  2610. function (err, data) {
  2611. if (err) {
  2612. console.error(err);
  2613. } else {
  2614. console.log(data, "图片获取成功");
  2615. addMemberRuleForm.compressFacePhoto = "https://" + data.Location;
  2616. // 成功
  2617. }
  2618. }
  2619. );
  2620. } else {
  2621. ElMessage.error("图片的大小不能超过2M!");
  2622. }
  2623. } else {
  2624. ElMessage.error("图片格式必须为JPG/PNG格式!");
  2625. }
  2626. };
  2627. // 可以获取图片参数
  2628. const handleUpload = async (file) => {
  2629. console.log(file, "22222222");
  2630. };
  2631. // 当头像被另外图片替换时调用此函数
  2632. const handleExceed = (files) => {
  2633. upload.value.clearFiles();
  2634. const file = files[0];
  2635. file.uid = genFileId();
  2636. upload.value.handleStart(file);
  2637. };
  2638. // // 确定编辑
  2639. // const confirmEdit = (formEl) => {
  2640. // if (!formEl) return;
  2641. // formEl.validate(async (valid, fields) => {
  2642. // if (valid) {
  2643. // }
  2644. // });
  2645. // };
  2646. // 批量添加 (------------------------------------------------------)
  2647. const addBatchClick = () => {
  2648. addBatchShow.value = true;
  2649. homeShow.value = false;
  2650. delRecordShow.value = false;
  2651. nextTick(() => {
  2652. const Ele = document.querySelector(".img-upload-demo .el-upload__input");
  2653. Ele["webkitdirectory"] = true;
  2654. });
  2655. };
  2656. const addBatchConcel = () => {
  2657. homeShow.value = true;
  2658. addBatchShow.value = false;
  2659. delRecordShow.value = false;
  2660. upload2File.value = "";
  2661. uploadImgList.value = "";
  2662. allImgUpload.value.clearFiles();
  2663. upload2.value.clearFiles();
  2664. };
  2665. // 批量更新 (------------------------------------------------------)
  2666. const updateBatchClick = () => {
  2667. homeShow.value = false;
  2668. updateBatchShow.value = true;
  2669. delRecordShow.value = false;
  2670. };
  2671. const updateBatchConcel = () => {
  2672. updateBatchShow.value = false;
  2673. homeShow.value = true;
  2674. delRecordShow.value = false;
  2675. batchUpdateFile.value = "";
  2676. batchUpload.value.clearFiles();
  2677. };
  2678. // 添加文件信息
  2679. const handleChangeUpdate = async (file, fileLists) => {
  2680. console.log(file, "1111");
  2681. batchUpdateFile.value = file.raw;
  2682. };
  2683. // 可以获取文件参数
  2684. const handleUploadUpdate = async (file) => {
  2685. console.log(file, "22222222");
  2686. };
  2687. // 上传文件时覆盖上一个文件
  2688. const handleExceedUpdate = (files) => {
  2689. batchUpload.value.clearFiles();
  2690. const file = files[0];
  2691. file.uid = genFileId();
  2692. batchUpload.value.handleStart(file);
  2693. };
  2694. // 移出文件
  2695. const handleRemoveUpdate = (uploadFile, uploadFiles) => {
  2696. batchUpdateFile.value = "";
  2697. };
  2698. // 更新时限制上传文件的大小
  2699. const beforeAvatarUploadUpdate = (rawFile) => {
  2700. console.log(rawFile.type, "文件类型");
  2701. if (
  2702. rawFile.type !==
  2703. "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
  2704. ) {
  2705. ElMessage.error("文件格式必须为xlsx格式!");
  2706. return false;
  2707. } else if (rawFile.size / 1024 / 1024 > 100) {
  2708. ElMessage.error("文件的大小不能超过100MB!");
  2709. return false;
  2710. }
  2711. return true;
  2712. };
  2713. // 批量更新模板下载
  2714. const downLoadtempUpdate = async () => {
  2715. let res = await axios({
  2716. method: "get",
  2717. url: api.value + "/wanzai/api/smartUser/downloadUpdateUserExcel",
  2718. headers: {
  2719. token: sessionStorage.getItem("token"),
  2720. user_head: sessionStorage.getItem("userhead"),
  2721. },
  2722. // params: data,
  2723. });
  2724. // console.log(
  2725. // res,
  2726. // JSON.parse(eds.decryptDes(res.data.data)),
  2727. // "批量更新模板下载"
  2728. // );
  2729. if (res.data.code == 200) {
  2730. var downloadPath = JSON.parse(eds.decryptDes(res.data.data));
  2731. // window.open(downloadPath);
  2732. window.location.href = downloadPath;
  2733. var downloadLink = document.createElement("a");
  2734. downloadLink.style.display = "none"; // 使其隐藏
  2735. downloadLink.href = downloadPath;
  2736. downloadLink.download = "";
  2737. downloadLink.click();
  2738. document.body.appendChild(downloadLink);
  2739. document.body.removeChild(downloadLink);
  2740. ElMessage({
  2741. type: "success",
  2742. showClose: true,
  2743. message: res.data.message,
  2744. center: true,
  2745. });
  2746. } else {
  2747. loading.value = false;
  2748. ElMessage({
  2749. type: "error",
  2750. showClose: true,
  2751. message: res.data.message,
  2752. center: true,
  2753. });
  2754. }
  2755. };
  2756. // 开始批量更新按钮
  2757. const bulkUpdateImport = async () => {
  2758. startUpdate.value = true;
  2759. console.log(batchUpdateFile.value, "更新文件");
  2760. const formData = new FormData();
  2761. formData.append("file", batchUpdateFile.value);
  2762. let res = await axios({
  2763. method: "post",
  2764. url: api.value + "/wanzai/api/smartUser/importExcelUpdateUsers",
  2765. headers: {
  2766. token: sessionStorage.getItem("token"),
  2767. user_head: sessionStorage.getItem("userhead"),
  2768. },
  2769. data: formData,
  2770. });
  2771. console.log(res, "确定批量更新");
  2772. if (res.data.code == 200) {
  2773. getList();
  2774. batchUpdateFile.value = "";
  2775. batchUpload.value.clearFiles();
  2776. startUpdate.value = false;
  2777. ElMessage({
  2778. type: "success",
  2779. showClose: true,
  2780. message: res.data.message,
  2781. center: true,
  2782. });
  2783. } else {
  2784. startUpdate.value = false;
  2785. ElMessage({
  2786. type: "error",
  2787. showClose: true,
  2788. message: res.data.message,
  2789. center: true,
  2790. });
  2791. }
  2792. };
  2793. // 打开删除记录页面 (--------------------------------------------------)
  2794. const DelRecordClick = async () => {
  2795. delRecordShow.value = true;
  2796. delBatchShow.value = false;
  2797. homeShow.value = false;
  2798. addMemberTitle.value = "删除异常记录";
  2799. let data = {
  2800. currentPage: delRecordCurrentPage.value,
  2801. pageCount: delRecordPageSize.value,
  2802. };
  2803. let res = await axios({
  2804. method: "get",
  2805. url: api.value + "/wanzai/api/smartUser/queryUserDeletePage",
  2806. headers: {
  2807. token: sessionStorage.getItem("token"),
  2808. user_head: sessionStorage.getItem("userhead"),
  2809. },
  2810. params: data,
  2811. });
  2812. if (res.data.code == 200) {
  2813. console.log(res, JSON.parse(eds.decryptDes(res.data.data)), "删除记录分页");
  2814. delRecordDatas.value = JSON.parse(eds.decryptDes(res.data.data)).list;
  2815. delRecordTotal.value = JSON.parse(eds.decryptDes(res.data.data)).totalCount;
  2816. } else {
  2817. ElMessage({
  2818. type: "error",
  2819. showClose: true,
  2820. message: res.data.message,
  2821. center: true,
  2822. });
  2823. }
  2824. };
  2825. // 关闭删除记录页面
  2826. const delRecordClose = () => {
  2827. delRecordShow.value = false;
  2828. delBatchShow.value = false;
  2829. homeShow.value = true;
  2830. };
  2831. // 批量导入模板下载 (-------------------------------------------------)
  2832. // 用户导出设置 数据
  2833. const importSystemList = async () => {
  2834. let data = {
  2835. identityId: addMemberRuleForm.identity,
  2836. };
  2837. let post = await axios({
  2838. method: "get",
  2839. url: api.value + "/wanzai/api/smartUser/gauageOutfit",
  2840. headers: {
  2841. token: sessionStorage.getItem("token"),
  2842. user_head: sessionStorage.getItem("userhead"),
  2843. },
  2844. params: data,
  2845. });
  2846. console.log(post, "用户导出设置 数据");
  2847. if (post.data.code == 200) {
  2848. exportSettingsData.value = post.data.data;
  2849. let arr = [];
  2850. post.data.data.forEach((item) => {
  2851. arr.push(item.id);
  2852. });
  2853. exportSettingsSel.value = arr;
  2854. console.log(exportSettingsSel.value);
  2855. } else {
  2856. exportSettingsData.value = [];
  2857. }
  2858. };
  2859. const downLoadtempAdd = async (flag) => {
  2860. if (flag == 1) {
  2861. let res = await axios({
  2862. method: "get",
  2863. url: api.value + "/wanzai/api/smartUser/downloadUserExcel",
  2864. headers: {
  2865. token: sessionStorage.getItem("token"),
  2866. user_head: sessionStorage.getItem("userhead"),
  2867. },
  2868. // params: data,
  2869. });
  2870. // console.log(
  2871. // res,
  2872. // JSON.parse(eds.decryptDes(res.data.data)),
  2873. // "批量导入学生模板下载"
  2874. // );
  2875. if (res.data.code == 200) {
  2876. var downloadPath = JSON.parse(eds.decryptDes(res.data.data));
  2877. // window.open(downloadPath);
  2878. window.location.href = downloadPath;
  2879. var downloadLink = document.createElement("a");
  2880. downloadLink.style.display = "none"; // 使其隐藏
  2881. downloadLink.href = downloadPath;
  2882. downloadLink.download = "";
  2883. downloadLink.click();
  2884. document.body.appendChild(downloadLink);
  2885. document.body.removeChild(downloadLink);
  2886. ElMessage({
  2887. type: "success",
  2888. showClose: true,
  2889. message: res.data.message,
  2890. center: true,
  2891. });
  2892. } else {
  2893. loading.value = false;
  2894. ElMessage({
  2895. type: "error",
  2896. showClose: true,
  2897. message: res.data.message,
  2898. center: true,
  2899. });
  2900. }
  2901. } else {
  2902. let res = await axios({
  2903. method: "get",
  2904. url: api.value + "/wanzai/api/smartUser/downloadTeacherExcel",
  2905. headers: {
  2906. token: sessionStorage.getItem("token"),
  2907. user_head: sessionStorage.getItem("userhead"),
  2908. },
  2909. // params: data,
  2910. });
  2911. // console.log(
  2912. // res,
  2913. // JSON.parse(eds.decryptDes(res.data.data)),
  2914. // "批量导入教师模板下载"
  2915. // );
  2916. if (res.data.code == 200) {
  2917. var downloadPath = JSON.parse(eds.decryptDes(res.data.data));
  2918. // window.open(downloadPath);
  2919. window.location.href = downloadPath;
  2920. var downloadLink = document.createElement("a");
  2921. downloadLink.style.display = "none"; // 使其隐藏
  2922. downloadLink.href = downloadPath;
  2923. downloadLink.download = "";
  2924. downloadLink.click();
  2925. document.body.appendChild(downloadLink);
  2926. document.body.removeChild(downloadLink);
  2927. ElMessage({
  2928. type: "success",
  2929. showClose: true,
  2930. message: res.data.message,
  2931. center: true,
  2932. });
  2933. } else {
  2934. loading.value = false;
  2935. ElMessage({
  2936. type: "error",
  2937. showClose: true,
  2938. message: res.data.message,
  2939. center: true,
  2940. });
  2941. }
  2942. }
  2943. };
  2944. // 移出照片
  2945. const handleRemove2 = (uploadFile, uploadFiles) => {
  2946. // console.log(uploadFile.uid, uploadFiles);
  2947. // fileList.list = fileList.list.filter((item) => {
  2948. // return item.uid != uploadFile.uid;
  2949. // });
  2950. // ruleForm.fileListJson = fileList.list;
  2951. upload2File.value = "";
  2952. };
  2953. // 点击图片的查看按钮
  2954. const handlePreview2 = (file) => {
  2955. // imgUrl.value = file.url;
  2956. // imgVisible.value = true;
  2957. console.log(file);
  2958. };
  2959. // 限制上传图片的大小
  2960. const beforeAvatarUpload2 = (rawFile) => {
  2961. console.log(rawFile.type, "文件类型");
  2962. if (
  2963. rawFile.type !==
  2964. "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
  2965. ) {
  2966. ElMessage.error("文件格式必须为xlsx格式!");
  2967. return false;
  2968. } else if (rawFile.size / 1024 / 1024 > 100) {
  2969. ElMessage.error("文件的大小不能超过100MB!");
  2970. return false;
  2971. }
  2972. return true;
  2973. };
  2974. // 添加照片时往fileList列表中添加图片信息
  2975. const handleChange2 = async (file, fileLists) => {
  2976. console.log(file, "1111");
  2977. // fileList.list.push(file);
  2978. upload2File.value = file.raw;
  2979. };
  2980. // 可以获取图片参数
  2981. const handleUpload2 = async (file) => {
  2982. // if (fileList.list.length >= 6) {
  2983. // ElMessage.error("最多可上传6张图片!");
  2984. // return false;
  2985. // }
  2986. console.log(file, "22222222");
  2987. // let data = new FormData();
  2988. // data.set("files", file.file);
  2989. // let res = await axios({
  2990. // method: "post",
  2991. // url: api.value + "/file/cos/upload",
  2992. // headers: {},
  2993. // data: data,
  2994. // });
  2995. // console.log(res, "图片上传成功详情图");
  2996. // if (res.data.code == 1) {
  2997. // // res.data.data.uid = file.file.uid;
  2998. // // console.log([res.data.data]);
  2999. // let arr = {
  3000. // uid: file.file.uid,
  3001. // url: res.data.data,
  3002. // };
  3003. // fileList.list = fileList.list.concat([arr]);
  3004. // ruleForm.fileListJson = fileList.list;
  3005. // }
  3006. };
  3007. // 上传文件时覆盖上一个文件
  3008. const handleExceed2 = (files) => {
  3009. upload2.value.clearFiles();
  3010. const file = files[0];
  3011. file.uid = genFileId();
  3012. upload2.value.handleStart(file);
  3013. };
  3014. // 移出照片
  3015. const handleRemoveImgUpload = (uploadFile, uploadFiles) => {
  3016. // console.log(uploadFile.uid, uploadFiles);
  3017. // fileList.list = fileList.list.filter((item) => {
  3018. // return item.uid != uploadFile.uid;
  3019. // });
  3020. // ruleForm.fileListJson = fileList.list;
  3021. };
  3022. // 点击图片的查看按钮
  3023. const handlePreviewImgUpload = (file) => {
  3024. // imgUrl.value = file.url;
  3025. // imgVisible.value = true;
  3026. console.log(file);
  3027. };
  3028. // 限制上传图片的大小
  3029. const beforeAvatarUploadImgUpload = (rawFile) => {
  3030. // console.log(rawFile.type, "文件类型");
  3031. // console.log(rawFile.type == "image/jpeg",rawFile.type == "image/png");
  3032. if (rawFile.type == "image/jpeg" || rawFile.type == "image/png") {
  3033. if (rawFile.size / 1024 / 1024 > 2) {
  3034. ElMessage.error("图片的大小不能超过2MB!");
  3035. return false;
  3036. }
  3037. } else {
  3038. ElMessage.error("文件格式必须为jpg或png格式!");
  3039. return false;
  3040. }
  3041. return true;
  3042. };
  3043. // 添加照片时往fileList列表中添加图片信息
  3044. const handleChangeImgUpload = async (file, fileLists) => {
  3045. // console.log(file, "重新上传图片");
  3046. // fileList.list.push(file);
  3047. uploadImgList.value = "";
  3048. // allImgUpload.value.clearFiles();
  3049. };
  3050. let timer;
  3051. // 可以获取图片参数
  3052. const handleUploadImgUpload = async (file) => {
  3053. // console.log(file, "22222222");
  3054. const cos = new COS({
  3055. SecretId: "AKIDCPVZdcWIxgHpy5FYxVyPiqkZGrhdXUBg",
  3056. SecretKey: "NkyCN3cz97qKaeXLvHOGxOcdS8f184pL",
  3057. SecurityToken: "1306339220",
  3058. Bucket: "wanzai-1306339220",
  3059. Region: "ap-shanghai",
  3060. });
  3061. const files = file.file;
  3062. // console.log(files);
  3063. const compressKey = file.file.name; // 设置上传到 COS 后的文件名
  3064. cos.putObject(
  3065. {
  3066. Bucket: "wanzai-1306339220",
  3067. Region: "ap-shanghai",
  3068. Key: compressKey,
  3069. Body: files,
  3070. onProgress: function (progressData) {
  3071. // console.log(JSON.stringify(progressData));
  3072. },
  3073. },
  3074. function (err, data) {
  3075. if (err) {
  3076. console.error(err);
  3077. } else {
  3078. // console.log(data, "图片获取成功");
  3079. uploadImgList.value =
  3080. uploadImgList.value + "," + "https://" + data.Location;
  3081. // 成功
  3082. successAllImg();
  3083. }
  3084. }
  3085. );
  3086. };
  3087. const successAllImg = () => {
  3088. imgLoading.value = true;
  3089. clearTimeout(timer);
  3090. timer = setInterval(() => {
  3091. imgLoading.value = false;
  3092. }, 1000);
  3093. };
  3094. // 文件上传成功时的钩子
  3095. const handleSuccessImgUpload = (response, uploadFile, uploadFiles) => {
  3096. // console.log(response,uploadFile,uploadFiles,"上传成功");
  3097. console.log(uploadFiles.length, "上传成功");
  3098. // successAllImg()
  3099. };
  3100. // 重置按钮 重置上传文件
  3101. const resetImport = () => {
  3102. upload2File.value = "";
  3103. uploadImgList.value = "";
  3104. allImgUpload.value.clearFiles();
  3105. upload2.value.clearFiles();
  3106. };
  3107. // 批量导入按钮
  3108. const bulkImport = async () => {
  3109. // if (upload2File.value && uploadImgList.value) {
  3110. // } else {
  3111. // ElMessage({
  3112. // type: "warning",
  3113. // showClose: true,
  3114. // message: "上传文件或图片不能为空",
  3115. // center: true,
  3116. // });
  3117. // return false;
  3118. // }
  3119. startImprot.value = true;
  3120. // uploadImgList.value = uploadImgList.value.slice(1);
  3121. console.log(uploadImgList.value, "拼接好的图片地址");
  3122. console.log(upload2File.value, "导入的文件");
  3123. const formData = new FormData();
  3124. formData.append("file", upload2File.value);
  3125. formData.append("headImage", uploadImgList.value);
  3126. let res = await axios({
  3127. method: "post",
  3128. url: api.value + "/wanzai/api/smartUser/importExcelUsers",
  3129. headers: {
  3130. token: sessionStorage.getItem("token"),
  3131. user_head: sessionStorage.getItem("userhead"),
  3132. },
  3133. data: formData,
  3134. });
  3135. console.log(res, "确定批量导入");
  3136. if (res.data.code == 200) {
  3137. getList();
  3138. upload2File.value = "";
  3139. uploadImgList.value = "";
  3140. allImgUpload.value.clearFiles();
  3141. upload2.value.clearFiles();
  3142. startImprot.value = false;
  3143. ElMessage({
  3144. type: "success",
  3145. showClose: true,
  3146. message: res.data.message,
  3147. center: true,
  3148. });
  3149. } else {
  3150. startImprot.value = false;
  3151. ElMessage({
  3152. type: "error",
  3153. showClose: true,
  3154. message: res.data.message,
  3155. center: true,
  3156. });
  3157. }
  3158. };
  3159. // 分页
  3160. const handleAddBatch = (value) => {
  3161. // console.log(value);
  3162. addBatch_currentPage.value = value;
  3163. };
  3164. // 批量删除 (------------------------------------------------------)
  3165. const delBatchClick = () => {
  3166. delBatchShow.value = true;
  3167. homeShow.value = false;
  3168. delRecordShow.value = false;
  3169. };
  3170. const delBatchConcel = () => {
  3171. homeShow.value = true;
  3172. delBatchShow.value = false;
  3173. delRecordShow.value = false;
  3174. };
  3175. // 移出照片
  3176. const handleRemove3 = (uploadFile, uploadFiles) => {
  3177. // console.log(uploadFile.uid, uploadFiles);
  3178. // fileList.list = fileList.list.filter((item) => {
  3179. // return item.uid != uploadFile.uid;
  3180. // });
  3181. // ruleForm.fileListJson = fileList.list;
  3182. };
  3183. // 点击图片的查看按钮
  3184. const handlePreview3 = (file) => {
  3185. // imgUrl.value = file.url;
  3186. // imgVisible.value = true;
  3187. console.log(file);
  3188. };
  3189. // 限制上传图片的大小
  3190. const beforeAvatarUpload3 = (rawFile) => {
  3191. console.log(rawFile.type, "文件类型");
  3192. if (
  3193. rawFile.type !==
  3194. "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
  3195. ) {
  3196. ElMessage.error("文件格式必须为xlsx格式!");
  3197. return false;
  3198. } else if (rawFile.size / 1024 / 1024 > 100) {
  3199. ElMessage.error("图片的大小不能超过100MB!");
  3200. return false;
  3201. }
  3202. return true;
  3203. };
  3204. // 添加照片时往fileList列表中添加图片信息
  3205. const handleChange3 = async (file, fileLists) => {
  3206. console.log(file, "1111");
  3207. // fileList.list.push(file);
  3208. };
  3209. // 可以获取图片参数
  3210. const handleUpload3 = async (file) => {
  3211. // if (fileList.list.length >= 6) {
  3212. // ElMessage.error("最多可上传6张图片!");
  3213. // return false;
  3214. // }
  3215. console.log(file, "22222222");
  3216. // let data = new FormData();
  3217. // data.set("files", file.file);
  3218. // let res = await axios({
  3219. // method: "post",
  3220. // url: api.value + "/file/cos/upload",
  3221. // headers: {},
  3222. // data: data,
  3223. // });
  3224. // console.log(res, "图片上传成功详情图");
  3225. // if (res.data.code == 1) {
  3226. // // res.data.data.uid = file.file.uid;
  3227. // // console.log([res.data.data]);
  3228. // let arr = {
  3229. // uid: file.file.uid,
  3230. // url: res.data.data,
  3231. // };
  3232. // fileList.list = fileList.list.concat([arr]);
  3233. // ruleForm.fileListJson = fileList.list;
  3234. // }
  3235. };
  3236. // 分页
  3237. const handleDelBatch = (value) => {
  3238. // console.log(value);
  3239. delBatch_currentPage.value = value;
  3240. };
  3241. // 移动成员 (----------------------------------------------------------------)
  3242. // 首页表格多选框功能
  3243. const handleSelectionChange = (val) => {
  3244. console.log(val);
  3245. selectData.list = val;
  3246. };
  3247. // 获取移动成员中的部门信息
  3248. const getMoveData = async () => {
  3249. let data = {
  3250. name: moveSearchInput.value,
  3251. };
  3252. let res = await axios({
  3253. method: "get",
  3254. url: api.value + "/wanzai/api/smartDepartment/queryDepartmentTree",
  3255. headers: {
  3256. token: sessionStorage.getItem("token"),
  3257. user_head: sessionStorage.getItem("userhead"),
  3258. },
  3259. params: data,
  3260. });
  3261. console.log(res, "部门树形数据");
  3262. if (res.data.code == 200) {
  3263. moveData.value = JSON.parse(eds.decryptDes(res.data.data));
  3264. // 判断有没有右边有没有勾选好的部门,有就重新给树形图自动勾上
  3265. if (treeSelData.list.length) {
  3266. moveTree.value.setCheckedNodes(treeSelData.list);
  3267. }
  3268. // ElMessage({
  3269. // type: "success",
  3270. // showClose: true,
  3271. // message: res.data.message,
  3272. // center: true,
  3273. // });
  3274. } else {
  3275. ElMessage({
  3276. type: "error",
  3277. showClose: true,
  3278. message: res.data.message,
  3279. center: true,
  3280. });
  3281. }
  3282. };
  3283. // 打开移动弹窗
  3284. const moveMemberClick = async () => {
  3285. if (selectData.list.length) {
  3286. moveMemberVisible.value = true;
  3287. getMoveData();
  3288. } else {
  3289. ElMessage({
  3290. type: "warning",
  3291. showClose: true,
  3292. message: "请先选择需要移动的用户",
  3293. center: true,
  3294. });
  3295. }
  3296. };
  3297. const cancelMoveMember = () => {
  3298. moveMemberVisible.value = false;
  3299. moveTree.value.setCheckedKeys([]);
  3300. treeSelData.list = [];
  3301. };
  3302. // 移动成员里面勾选的
  3303. const moveCheckChange = (data, checked, indeterminate) => {
  3304. console.log(data, checked, indeterminate, "移动成员勾选");
  3305. if (treeSelData.list.length) {
  3306. if (data.id == treeSelData.list[0].id) {
  3307. treeSelData.list = [];
  3308. }
  3309. }
  3310. if (checked) {
  3311. let arr = {
  3312. id: data.id,
  3313. label: data.name,
  3314. };
  3315. treeSelData.list = [arr];
  3316. // console.log(treeSelData.list);
  3317. moveTree.value.setCheckedKeys([]); // 删除所有选中节点
  3318. moveTree.value.setCheckedNodes([arr]); // 选中已选中节点
  3319. } else {
  3320. console.log("取消勾选");
  3321. }
  3322. };
  3323. // 移动确定勾选
  3324. const confirmMoveMember = async () => {
  3325. let userId = [];
  3326. selectData.list.forEach((i) => {
  3327. userId.push(i.id);
  3328. });
  3329. let data = {
  3330. userIds: userId,
  3331. departmentId: treeSelData.list[0].id,
  3332. };
  3333. let res = await axios({
  3334. method: "post",
  3335. url: api.value + "/wanzai/api/smartUser/changeDepartment",
  3336. headers: {
  3337. token: sessionStorage.getItem("token"),
  3338. user_head: sessionStorage.getItem("userhead"),
  3339. },
  3340. data: data,
  3341. });
  3342. console.log(res, "部门树形数据");
  3343. if (res.data.code == 200) {
  3344. moveMemberVisible.value = false;
  3345. getList();
  3346. ElMessage({
  3347. type: "success",
  3348. showClose: true,
  3349. message: res.data.message,
  3350. center: true,
  3351. });
  3352. } else {
  3353. ElMessage({
  3354. type: "error",
  3355. showClose: true,
  3356. message: res.data.message,
  3357. center: true,
  3358. });
  3359. }
  3360. };
  3361. // 移动取消勾选
  3362. const cancelTreeSel = (i) => {
  3363. console.log(i);
  3364. moveTree.value.setCheckedKeys([]);
  3365. treeSelData.list = [];
  3366. // treeSelData.list = treeSelData.list.filter((item) => {
  3367. // return item.id != i.id;
  3368. // });
  3369. // let arr = [];
  3370. // treeSelData.list.forEach((item) => {
  3371. // arr.push(item.id);
  3372. // });
  3373. // moveTree.value.setCheckedKeys(arr);
  3374. };
  3375. // 用户导出设置 (----------------------------------------------------------------)
  3376. const exportSettingsClick = () => {
  3377. exportSettingsVisible.value = true;
  3378. };
  3379. const exportSettingsChange = (value, direction, movedKeys) => {
  3380. // console.log(exportSettingsSel.value);
  3381. console.log(value, direction, movedKeys);
  3382. };
  3383. const confirmExportSettings = async () => {
  3384. let arr = [];
  3385. exportSettingsData.value.forEach((item) => {
  3386. exportSettingsSel.value.forEach((i) => {
  3387. if (item.id == i) {
  3388. arr.push(item);
  3389. }
  3390. });
  3391. });
  3392. let data = {
  3393. departmentId: treeNodeId.value,
  3394. name: searchInput.keyWord,
  3395. gauageOutfitVos: arr,
  3396. };
  3397. let res = await axios({
  3398. method: "post",
  3399. url: api.value + "/wanzai/api/smartUser/smartUserExport",
  3400. headers: {
  3401. token: sessionStorage.getItem("token"),
  3402. user_head: sessionStorage.getItem("userhead"),
  3403. },
  3404. data: data,
  3405. responseType: "blob",
  3406. });
  3407. console.log(res, "导出用户1");
  3408. if (res.status == 200) {
  3409. let name = `用户信息表`;
  3410. var content = res.data;
  3411. var datas = new Blob([content]);
  3412. var downloadUrl = window.URL.createObjectURL(datas);
  3413. var anchor = document.createElement("a");
  3414. anchor.href = downloadUrl;
  3415. anchor.download = name + ".xlsx";
  3416. anchor.click();
  3417. window.URL.revokeObjectURL(datas);
  3418. ElMessage({
  3419. type: "success",
  3420. showClose: true,
  3421. message: "导出成功",
  3422. center: true,
  3423. });
  3424. } else {
  3425. ElMessage({
  3426. type: "error",
  3427. showClose: true,
  3428. message: res.data.message,
  3429. center: true,
  3430. });
  3431. }
  3432. };
  3433. const cancelExportSettings = () => {
  3434. exportSettingsVisible.value = false;
  3435. };
  3436. // 注销账号 (--------------------------------------------------------------------)
  3437. // const closeAccountClick = () => {
  3438. // if (selectData.list.length) {
  3439. // closeAccountVisible.value = true;
  3440. // } else {
  3441. // ElMessage({
  3442. // type: "warning",
  3443. // showClose: true,
  3444. // message: "请先选择需要注销的用户",
  3445. // center: true,
  3446. // });
  3447. // }
  3448. // };
  3449. // const cancelCloseAccount = () => {
  3450. // closeAccountVisible.value = false;
  3451. // };
  3452. // 勾选删除 (--------------------------------------------------------------------)
  3453. const delDelClick = () => {
  3454. if (selectData.list.length) {
  3455. selDelVisible.value = true;
  3456. } else {
  3457. ElMessage({
  3458. type: "warning",
  3459. showClose: true,
  3460. message: "请先选择需要删除的用户",
  3461. center: true,
  3462. });
  3463. }
  3464. };
  3465. // 确定删除
  3466. const confirmSelDel = async () => {
  3467. let userId = [];
  3468. selectData.list.forEach((i) => {
  3469. userId.push(i.id);
  3470. });
  3471. let data = {
  3472. userIds: userId,
  3473. };
  3474. let res = await axios({
  3475. method: "post",
  3476. url: api.value + "/wanzai/api/smartUser/deleteSmartUserById",
  3477. headers: {
  3478. token: sessionStorage.getItem("token"),
  3479. user_head: sessionStorage.getItem("userhead"),
  3480. },
  3481. data: data,
  3482. });
  3483. console.log(res, "删除成功");
  3484. if (res.data.code == 200) {
  3485. selDelVisible.value = false;
  3486. if (
  3487. selectData.list.length == tableData.list.length &&
  3488. currentPage.value != 1
  3489. ) {
  3490. currentPage.value = currentPage.value - 1;
  3491. }
  3492. getList();
  3493. ElMessage({
  3494. type: "success",
  3495. showClose: true,
  3496. message: res.data.message,
  3497. center: true,
  3498. });
  3499. } else {
  3500. ElMessage({
  3501. type: "error",
  3502. showClose: true,
  3503. message: res.data.message,
  3504. center: true,
  3505. });
  3506. }
  3507. };
  3508. const cancelSelDel = () => {
  3509. selDelVisible.value = false;
  3510. };
  3511. //导出功能
  3512. const importExcel = async () => {
  3513. let data = {
  3514. departmentId: treeNodeId.value,
  3515. name: searchInput.keyWord,
  3516. };
  3517. let res = await axios({
  3518. method: "get",
  3519. url: api.value + "/wanzai/api/smartUser/smartUserExport",
  3520. headers: {
  3521. token: sessionStorage.getItem("token"),
  3522. user_head: sessionStorage.getItem("userhead"),
  3523. },
  3524. params: data,
  3525. responseType: "blob",
  3526. });
  3527. console.log(res, "导出用户");
  3528. if (res.status == 200) {
  3529. let name = `用户信息表`;
  3530. var content = res.data;
  3531. var datas = new Blob([content]);
  3532. var downloadUrl = window.URL.createObjectURL(datas);
  3533. var anchor = document.createElement("a");
  3534. anchor.href = downloadUrl;
  3535. anchor.download = name + ".xlsx";
  3536. anchor.click();
  3537. window.URL.revokeObjectURL(datas);
  3538. ElMessage({
  3539. type: "success",
  3540. showClose: true,
  3541. message: "导出成功",
  3542. center: true,
  3543. });
  3544. } else {
  3545. ElMessage({
  3546. type: "error",
  3547. showClose: true,
  3548. message: res.data.message,
  3549. center: true,
  3550. });
  3551. }
  3552. };
  3553. // 表格斑马纹颜色修改
  3554. const tableRowClassName = ({ row, rowIndex }) => {
  3555. if (rowIndex % 2 === 0) {
  3556. return "even";
  3557. } else if (rowIndex % 2 !== 0) {
  3558. return "odd";
  3559. }
  3560. return "";
  3561. };
  3562. // 每页显示条数
  3563. const handleSizeChange = (value) => {
  3564. console.log(value, "每页显示条数");
  3565. pageSize.value = value;
  3566. currentPage.value = 1;
  3567. getList();
  3568. };
  3569. // 分页
  3570. const handleCurrentChange = (value) => {
  3571. // console.log(value);
  3572. currentPage.value = value;
  3573. getList();
  3574. };
  3575. const Enters = (e) => {
  3576. // console.log("按键:", e.key);
  3577. if (e.key == "Enter") {
  3578. searchBtn();
  3579. }
  3580. };
  3581. onBeforeMount(async () => {
  3582. document.addEventListener("keyup", Enters);
  3583. api.value = store.state.user.api;
  3584. getDepartment(); // 左边部门树形结构
  3585. classDataList(); // 添加成员中 获取身份数据下拉、年级数据下拉、班级数据下拉
  3586. postList(); // 职务数据
  3587. teachingClassList(); // 任课班级数据
  3588. importSystemList(); // 导出设置列表
  3589. });
  3590. onUnmounted(() => {
  3591. document.removeEventListener("keyup", Enters);
  3592. });
  3593. </script>
  3594. <style scoped lang="scss">
  3595. .content-box {
  3596. min-width: 1200px;
  3597. width: calc(100vw - 260px);
  3598. height: calc(100vh - 105px);
  3599. margin: 20px auto;
  3600. // background-color: #fff;
  3601. // color: #fff;
  3602. display: flex;
  3603. align-items: center;
  3604. justify-content: center;
  3605. // box-shadow: 0px 3px 10px rgba(0, 97, 255, 0.2);
  3606. .searchTree {
  3607. width: 220px;
  3608. margin: 20px 12px;
  3609. :deep(.el-input__wrapper) {
  3610. background-color: rgba(230, 230, 230, 1);
  3611. }
  3612. }
  3613. .treeV {
  3614. width: 247px;
  3615. height: 100%;
  3616. overflow: auto;
  3617. margin-right: 20px;
  3618. border-radius: 8px;
  3619. box-shadow: 0px 3px 10px rgba(0, 97, 255, 0.2);
  3620. background-color: #fff;
  3621. :deep(.el-tree-node__content) {
  3622. cursor: auto;
  3623. .custom-tree-node {
  3624. flex: 1;
  3625. display: flex;
  3626. align-items: center;
  3627. justify-content: space-between;
  3628. font-size: 14px;
  3629. padding-right: 8px;
  3630. .title {
  3631. display: flex;
  3632. align-items: center;
  3633. cursor: pointer;
  3634. }
  3635. .nodeClick {
  3636. color: rgb(0, 97, 255);
  3637. }
  3638. img {
  3639. width: 1.2em;
  3640. height: 1.2em;
  3641. margin: 0 5px 0 0;
  3642. }
  3643. }
  3644. }
  3645. }
  3646. // 主页面
  3647. .userRight {
  3648. flex: 1;
  3649. height: 100%;
  3650. border-radius: 8px;
  3651. box-shadow: 0px 3px 10px rgba(0, 97, 255, 0.2);
  3652. background-color: #fff;
  3653. .scorll {
  3654. overflow: auto;
  3655. height: calc(100% - 61px);
  3656. }
  3657. .left {
  3658. // width: calc(100wh - 40px);
  3659. display: flex;
  3660. align-items: center;
  3661. height: 60px;
  3662. padding: 0 30px;
  3663. border-bottom: 1px solid #ccc;
  3664. color: rgb(0, 0, 0);
  3665. font-size: 20px;
  3666. font-weight: 600;
  3667. span:nth-child(2) {
  3668. }
  3669. span:nth-child(3) {
  3670. margin-left: 20px;
  3671. font-size: 14px;
  3672. color: rgba(128, 128, 128, 1);
  3673. }
  3674. }
  3675. .middle {
  3676. width: 96%;
  3677. margin: 0 auto;
  3678. color: #000;
  3679. // border-bottom: 1px solid rgb(231, 231, 231);
  3680. .filter {
  3681. display: flex;
  3682. flex-wrap: wrap;
  3683. align-items: center;
  3684. margin: 10px 0 0 0;
  3685. .search {
  3686. color: #fff;
  3687. }
  3688. .condition {
  3689. display: flex;
  3690. align-items: center;
  3691. margin: 10px 30px 10px 0;
  3692. :deep(.el-input .el-input__inner) {
  3693. font-size: 14px;
  3694. }
  3695. span {
  3696. margin: 0 10px 0 0;
  3697. }
  3698. }
  3699. }
  3700. .gongneng {
  3701. margin: 10px 0 20px 0;
  3702. span {
  3703. color: #fff;
  3704. }
  3705. .el-button {
  3706. margin-right: 10px;
  3707. }
  3708. .el-dropdown {
  3709. margin: 0 10px;
  3710. }
  3711. }
  3712. :deep(.cont) {
  3713. width: 60%;
  3714. margin: 20px auto;
  3715. }
  3716. :deep(.download) {
  3717. display: flex;
  3718. align-items: center;
  3719. margin: 10px;
  3720. }
  3721. :deep(.download span) {
  3722. font-size: 16px;
  3723. margin-left: 20px;
  3724. }
  3725. :deep(.cont .el-button) {
  3726. margin-left: 60px;
  3727. margin-bottom: 30px;
  3728. }
  3729. :deep(.cont .accomplish) {
  3730. width: 100%;
  3731. display: flex;
  3732. justify-content: center;
  3733. }
  3734. :deep(.cont .accomplish .el-button) {
  3735. width: 50%;
  3736. margin: 0;
  3737. }
  3738. }
  3739. .footer {
  3740. width: 96%;
  3741. height: calc(100% - 205px);
  3742. margin: 10px auto 25px;
  3743. min-height: 300px;
  3744. .el-table--fit {
  3745. height: 100% !important;
  3746. :deep(.el-table__header-wrapper) {
  3747. background-color: #000;
  3748. font-size: 14px;
  3749. tr {
  3750. // color: #000;
  3751. }
  3752. }
  3753. :deep(.el-table__row) {
  3754. height: 50px;
  3755. font-size: 14px;
  3756. // color: #000;
  3757. &:hover {
  3758. td {
  3759. background-color: rgba(223, 236, 254, 1);
  3760. }
  3761. }
  3762. }
  3763. :deep(.el-table__row):nth-child(2n) {
  3764. .el-table-fixed-column--right {
  3765. background-color: rgba(240, 243, 247, 1);
  3766. }
  3767. }
  3768. :deep(.el-table__row td) {
  3769. padding: 0;
  3770. border: 0;
  3771. .img {
  3772. display: flex;
  3773. align-items: center;
  3774. justify-content: center;
  3775. margin: 5px 0;
  3776. img {
  3777. width: 60px;
  3778. height: 60px;
  3779. cursor: pointer;
  3780. }
  3781. }
  3782. }
  3783. .el-button--primary {
  3784. margin-left: 5px;
  3785. }
  3786. :deep(.el-table__body .even) {
  3787. background-color: #fff;
  3788. }
  3789. :deep(.el-table__body .odd) {
  3790. background-color: rgba(240, 243, 247, 1);
  3791. }
  3792. :deep(.edit) {
  3793. display: flex;
  3794. align-items: center;
  3795. justify-content: center;
  3796. color: rgba(111, 182, 184, 1);
  3797. }
  3798. :deep(.look) {
  3799. padding: 0 10px;
  3800. cursor: pointer;
  3801. color: rgba(30, 125, 251, 1);
  3802. }
  3803. .del {
  3804. padding: 0 10px;
  3805. color: rgba(212, 48, 48, 1);
  3806. cursor: pointer;
  3807. }
  3808. // :deep(.look):hover {
  3809. // color: red;
  3810. // }
  3811. // :deep(.del):hover {
  3812. // color: red;
  3813. // }
  3814. }
  3815. }
  3816. }
  3817. // 添加成员页面
  3818. .addMember {
  3819. flex: 1;
  3820. height: 100%;
  3821. min-width: 900px;
  3822. // margin-right: 20px;
  3823. border-radius: 8px;
  3824. box-shadow: 0px 3px 10px rgba(0, 97, 255, 0.2);
  3825. .left {
  3826. // width: calc(100wh - 40px);
  3827. display: flex;
  3828. align-items: center;
  3829. height: 60px;
  3830. padding: 0 30px;
  3831. border-bottom: 1px solid #ccc;
  3832. color: rgb(0, 0, 0);
  3833. font-size: 20px;
  3834. font-weight: 600;
  3835. img {
  3836. width: 18px;
  3837. height: 18px;
  3838. cursor: pointer;
  3839. }
  3840. .add {
  3841. margin-left: 20px !important;
  3842. font-size: 20px !important;
  3843. color: rgba(0, 0, 0, 1) !important;
  3844. }
  3845. }
  3846. .title {
  3847. display: flex;
  3848. align-items: center;
  3849. height: 60px;
  3850. color: rgb(0, 0, 0);
  3851. font-size: 20px;
  3852. font-weight: 600;
  3853. img {
  3854. width: 29px;
  3855. height: 20px;
  3856. margin-right: 5px;
  3857. }
  3858. .add {
  3859. margin-left: 20px !important;
  3860. font-size: 20px !important;
  3861. color: rgba(0, 0, 0, 1) !important;
  3862. }
  3863. }
  3864. .content {
  3865. padding: 0 30px;
  3866. height: calc(100% - 61px);
  3867. // margin: 10px 0 0 0;
  3868. .form {
  3869. height: 100%;
  3870. overflow: auto;
  3871. .el-form-item {
  3872. .facePhoto {
  3873. img {
  3874. width: 80px;
  3875. // height:50px;
  3876. }
  3877. }
  3878. :deep(.el-upload-list) {
  3879. display: none;
  3880. }
  3881. }
  3882. .imgUpload {
  3883. margin-top: 5px;
  3884. display: flex;
  3885. .upload-demo {
  3886. margin-right: 10px;
  3887. }
  3888. .img-upload-demo {
  3889. :deep(.el-upload-list) {
  3890. // display: none;
  3891. max-height: 130px;
  3892. overflow: auto;
  3893. // 整个滚动条
  3894. &::-webkit-scrollbar-track {
  3895. background-color: #daeeff;
  3896. }
  3897. // 滚动条的滚动区域(轨道)
  3898. &::-webkit-scrollbar {
  3899. background-color: #0888f8;
  3900. height: 3px;
  3901. width: 4px;
  3902. }
  3903. }
  3904. }
  3905. }
  3906. .startImport {
  3907. .el-button {
  3908. width: 500px;
  3909. height: 42px;
  3910. }
  3911. .downLoad {
  3912. color: rgba(0, 97, 255, 1);
  3913. font-size: 14px;
  3914. margin-left: 15px;
  3915. cursor: pointer;
  3916. }
  3917. }
  3918. .tableTitle {
  3919. font-size: 14px;
  3920. margin-top: 10px;
  3921. }
  3922. .footer {
  3923. width: 99%;
  3924. height: 360px;
  3925. margin: 10px auto 30px;
  3926. .el-table--fit {
  3927. height: 100%;
  3928. :deep(.el-table__header-wrapper) {
  3929. background-color: #000;
  3930. font-size: 14px;
  3931. tr {
  3932. color: #000;
  3933. }
  3934. }
  3935. :deep(.el-table__row) {
  3936. height: 45px;
  3937. font-size: 14px;
  3938. color: #000;
  3939. &:hover {
  3940. td {
  3941. background-color: rgba(223, 236, 254, 1);
  3942. }
  3943. }
  3944. }
  3945. :deep(.el-table__row):nth-child(2n) {
  3946. .el-table-fixed-column--right {
  3947. background-color: rgba(240, 243, 247, 1);
  3948. }
  3949. }
  3950. :deep(.el-table__row td) {
  3951. padding: 0;
  3952. border: 0;
  3953. }
  3954. .el-button--primary {
  3955. margin-left: 5px;
  3956. }
  3957. :deep(.el-table__body .even) {
  3958. background-color: #fff;
  3959. }
  3960. :deep(.el-table__body .odd) {
  3961. background-color: rgba(240, 243, 247, 1);
  3962. }
  3963. :deep(.edit) {
  3964. display: flex;
  3965. align-items: center;
  3966. justify-content: center;
  3967. color: rgba(111, 182, 184, 1);
  3968. }
  3969. :deep(.look) {
  3970. padding: 0 10px;
  3971. cursor: pointer;
  3972. color: rgba(30, 125, 251, 1);
  3973. }
  3974. .del {
  3975. padding: 0 10px;
  3976. color: rgba(212, 48, 48, 1);
  3977. cursor: pointer;
  3978. }
  3979. // :deep(.look):hover {
  3980. // color: red;
  3981. // }
  3982. // :deep(.del):hover {
  3983. // color: red;
  3984. // }
  3985. }
  3986. .pageSize {
  3987. display: flex;
  3988. align-items: center;
  3989. justify-content: space-between;
  3990. margin: 20px 30px 0;
  3991. span {
  3992. color: #000;
  3993. }
  3994. .el-pagination {
  3995. // width: 1600px;
  3996. :deep(.el-pagination__total) {
  3997. color: #000;
  3998. }
  3999. :deep(.el-pagination__goto) {
  4000. color: #000;
  4001. }
  4002. :deep(.el-pagination__classifier) {
  4003. color: #000;
  4004. }
  4005. :deep(.el-input__wrapper) {
  4006. border: 1px solid rgba(0, 0, 0, 1);
  4007. border-radius: 5px;
  4008. box-shadow: none;
  4009. }
  4010. :deep(.el-pager li) {
  4011. margin: 0 5px;
  4012. border: 1px solid rgba(0, 0, 0, 1);
  4013. border-radius: 5px;
  4014. background-color: transparent;
  4015. }
  4016. :deep(.el-pager li.is-active) {
  4017. // background-color: rgba(0, 97, 255, 0.8);
  4018. border: 1px solid rgba(0, 97, 255, 1);
  4019. color: rgba(0, 97, 255, 1);
  4020. }
  4021. :deep(.btn-prev) {
  4022. margin-right: 5px;
  4023. border: 1px solid rgba(0, 0, 0, 1);
  4024. border-radius: 5px;
  4025. background-color: transparent;
  4026. }
  4027. :deep(.btn-next) {
  4028. margin-left: 5px;
  4029. border: 1px solid rgba(0, 0, 0, 1);
  4030. border-radius: 5px;
  4031. background-color: transparent;
  4032. }
  4033. }
  4034. }
  4035. }
  4036. }
  4037. // 整个滚动条
  4038. .form::-webkit-scrollbar-track {
  4039. background-color: #daeeff;
  4040. }
  4041. // 滚动条的滚动区域(轨道)
  4042. .form::-webkit-scrollbar {
  4043. background-color: #0888f8;
  4044. height: 3px;
  4045. width: 4px;
  4046. }
  4047. // 滚动条的可拖拽部分(滑块)
  4048. // .form::-webkit-scrollbar-thumb {
  4049. // background: #57b2ff;
  4050. // border-radius: 4px;
  4051. // height: 3px;
  4052. // width: 4px;
  4053. // }
  4054. }
  4055. }
  4056. // 删除记录页面
  4057. .delRecord {
  4058. flex: 1;
  4059. height: 100%;
  4060. border-radius: 8px;
  4061. box-shadow: 0px 3px 10px rgba(0, 97, 255, 0.2);
  4062. background-color: #fff;
  4063. .scorll {
  4064. overflow: auto;
  4065. height: calc(100% - 61px);
  4066. }
  4067. .left {
  4068. // width: calc(100wh - 40px);
  4069. display: flex;
  4070. align-items: center;
  4071. height: 60px;
  4072. padding: 0 30px;
  4073. border-bottom: 1px solid #ccc;
  4074. color: rgb(0, 0, 0);
  4075. font-size: 20px;
  4076. font-weight: 600;
  4077. img {
  4078. width: 18px;
  4079. height: 18px;
  4080. }
  4081. .add {
  4082. margin-left: 20px;
  4083. }
  4084. }
  4085. .middle {
  4086. width: 96%;
  4087. margin: 0 auto;
  4088. color: #000;
  4089. }
  4090. .footer {
  4091. width: 96%;
  4092. height: calc(100% - 100px);
  4093. margin: 15px auto 25px;
  4094. min-height: 300px;
  4095. .el-table--fit {
  4096. height: 100% !important;
  4097. :deep(.el-table__header-wrapper) {
  4098. background-color: #000;
  4099. font-size: 14px;
  4100. tr {
  4101. // color: #000;
  4102. }
  4103. }
  4104. :deep(.el-table__row) {
  4105. height: 50px;
  4106. font-size: 14px;
  4107. // color: #000;
  4108. &:hover {
  4109. td {
  4110. background-color: rgba(223, 236, 254, 1);
  4111. }
  4112. }
  4113. }
  4114. :deep(.el-table__row):nth-child(2n) {
  4115. .el-table-fixed-column--right {
  4116. background-color: rgba(240, 243, 247, 1);
  4117. }
  4118. }
  4119. :deep(.el-table__row td) {
  4120. padding: 0;
  4121. border: 0;
  4122. .img {
  4123. display: flex;
  4124. align-items: center;
  4125. justify-content: center;
  4126. margin: 5px 0;
  4127. img {
  4128. width: 60px;
  4129. height: 60px;
  4130. cursor: pointer;
  4131. }
  4132. }
  4133. }
  4134. .el-button--primary {
  4135. margin-left: 5px;
  4136. }
  4137. :deep(.el-table__body .even) {
  4138. background-color: #fff;
  4139. }
  4140. :deep(.el-table__body .odd) {
  4141. background-color: rgba(240, 243, 247, 1);
  4142. }
  4143. :deep(.edit) {
  4144. display: flex;
  4145. align-items: center;
  4146. justify-content: center;
  4147. color: rgba(111, 182, 184, 1);
  4148. }
  4149. :deep(.look) {
  4150. padding: 0 10px;
  4151. cursor: pointer;
  4152. color: rgba(30, 125, 251, 1);
  4153. }
  4154. .del {
  4155. padding: 0 10px;
  4156. color: rgba(212, 48, 48, 1);
  4157. cursor: pointer;
  4158. }
  4159. // :deep(.look):hover {
  4160. // color: red;
  4161. // }
  4162. // :deep(.del):hover {
  4163. // color: red;
  4164. // }
  4165. }
  4166. }
  4167. }
  4168. .bgImg {
  4169. position: absolute;
  4170. left: 0;
  4171. top: 0;
  4172. z-index: 99999999;
  4173. width: 100%;
  4174. height: 100%;
  4175. background-color: rgba(255, 255, 255, 0.8);
  4176. :deep(.el-carousel__arrow) {
  4177. display: none;
  4178. }
  4179. // border-radius: 50px;
  4180. :deep(.el-carousel__container) {
  4181. width: 100%;
  4182. height: calc(100vh);
  4183. .el-carousel__item {
  4184. display: flex;
  4185. justify-content: center;
  4186. img {
  4187. height: 100%;
  4188. }
  4189. }
  4190. }
  4191. }
  4192. // 修改部门
  4193. :deep(.amendBMDialog) {
  4194. // height: 600px;
  4195. overflow: hidden;
  4196. border-radius: 11px;
  4197. .el-dialog__header {
  4198. border-radius: 11px 11px 0 0;
  4199. background: rgba(245, 249, 255, 1);
  4200. font-weight: 600;
  4201. height: 60px;
  4202. padding: 0 20px;
  4203. line-height: 60px;
  4204. margin: 0;
  4205. border-bottom: 1px solid rgba(230, 230, 230, 1);
  4206. .el-dialog__headerbtn {
  4207. outline: none;
  4208. }
  4209. }
  4210. .el-dialog__body {
  4211. padding: 0px 20px 20px 20px;
  4212. // height: 200px;
  4213. // display: flex;
  4214. // flex-direction: column-reverse;
  4215. .el-form-item {
  4216. margin: 40px 0;
  4217. }
  4218. .option {
  4219. display: flex;
  4220. flex-direction: row-reverse;
  4221. align-items: center;
  4222. margin: 10px 0;
  4223. .queding {
  4224. margin-left: 20px;
  4225. }
  4226. }
  4227. }
  4228. }
  4229. // 移动成员
  4230. :deep(.moveMemberDialog) {
  4231. // height: 600px;
  4232. overflow: hidden;
  4233. border-radius: 11px;
  4234. .el-dialog__header {
  4235. border-radius: 11px 11px 0 0;
  4236. background: rgba(245, 249, 255, 1);
  4237. font-weight: 600;
  4238. height: 60px;
  4239. padding: 0 20px;
  4240. line-height: 60px;
  4241. margin: 0;
  4242. border-bottom: 1px solid rgba(230, 230, 230, 1);
  4243. .el-dialog__headerbtn {
  4244. outline: none;
  4245. }
  4246. }
  4247. .el-dialog__body {
  4248. padding: 0px 20px 20px 20px;
  4249. height: 550px;
  4250. // display: flex;
  4251. // flex-direction: column-reverse;
  4252. .move {
  4253. display: flex;
  4254. .moveLeft {
  4255. width: 280px;
  4256. height: 96%;
  4257. margin-right: 20px;
  4258. border-radius: 8px;
  4259. // box-shadow: 0px 3px 10px rgba(0, 97, 255, 0.2);
  4260. .el-tree {
  4261. height: 430px;
  4262. // border: 1px solid red;
  4263. overflow: auto;
  4264. }
  4265. .el-tree-node__content {
  4266. .custom-tree-node {
  4267. flex: 1;
  4268. display: flex;
  4269. align-items: center;
  4270. justify-content: space-between;
  4271. font-size: 14px;
  4272. padding-right: 8px;
  4273. .title {
  4274. display: flex;
  4275. align-items: center;
  4276. }
  4277. img {
  4278. width: 1.2em;
  4279. height: 1.2em;
  4280. margin: 0 5px 0 0;
  4281. }
  4282. }
  4283. }
  4284. }
  4285. .moveRight {
  4286. margin: 20px 0 0 0;
  4287. flex: 1;
  4288. .sel {
  4289. margin-bottom: 10px;
  4290. }
  4291. ul {
  4292. // width: 316px;
  4293. height: 95%;
  4294. list-style: none;
  4295. padding: 0;
  4296. margin: 0;
  4297. border-left: 1px solid rgba(230, 230, 230, 1);
  4298. box-sizing: border-box;
  4299. overflow: auto;
  4300. li {
  4301. display: flex;
  4302. justify-content: space-between;
  4303. padding-right: 17px;
  4304. align-items: center;
  4305. margin-top: 5px;
  4306. .el-icon-close {
  4307. cursor: pointer;
  4308. width: 10px;
  4309. height: 10px;
  4310. }
  4311. }
  4312. }
  4313. }
  4314. }
  4315. .options {
  4316. margin: 15px 0;
  4317. display: flex;
  4318. flex-direction: row-reverse;
  4319. .queding {
  4320. margin-left: 20px;
  4321. }
  4322. }
  4323. .option {
  4324. display: flex;
  4325. flex-direction: row-reverse;
  4326. align-items: center;
  4327. margin: 10px 0;
  4328. .queding {
  4329. margin-left: 20px;
  4330. }
  4331. }
  4332. }
  4333. }
  4334. // 用户导出设置
  4335. :deep(.exportSettings) {
  4336. // height: 600px;
  4337. overflow: hidden;
  4338. border-radius: 11px;
  4339. .el-dialog__header {
  4340. border-radius: 11px 11px 0 0;
  4341. background: rgba(245, 249, 255, 1);
  4342. font-weight: 600;
  4343. height: 60px;
  4344. padding: 0 20px;
  4345. line-height: 60px;
  4346. margin: 0;
  4347. border-bottom: 1px solid rgba(230, 230, 230, 1);
  4348. .el-dialog__headerbtn {
  4349. outline: none;
  4350. }
  4351. }
  4352. .el-dialog__body {
  4353. padding: 0px 20px 20px 20px;
  4354. height: 550px;
  4355. // display: flex;
  4356. // flex-direction: column-reverse;
  4357. .move {
  4358. display: flex;
  4359. justify-content: center;
  4360. .el-transfer {
  4361. margin-top: 10px;
  4362. height: 100%;
  4363. .el-transfer-panel__body {
  4364. height: 458px;
  4365. .el-checkbox-group {
  4366. height: 100%;
  4367. }
  4368. }
  4369. }
  4370. }
  4371. .options {
  4372. margin: 15px 0;
  4373. display: flex;
  4374. flex-direction: row-reverse;
  4375. .queding {
  4376. margin-left: 20px;
  4377. }
  4378. }
  4379. .option {
  4380. display: flex;
  4381. flex-direction: row-reverse;
  4382. align-items: center;
  4383. margin: 10px 0;
  4384. .queding {
  4385. margin-left: 20px;
  4386. }
  4387. }
  4388. }
  4389. }
  4390. // 注销账号
  4391. :deep(.closeAccount) {
  4392. // height: 600px;
  4393. overflow: hidden;
  4394. border-radius: 11px;
  4395. .el-dialog__header {
  4396. border-radius: 11px 11px 0 0;
  4397. background: rgba(245, 249, 255, 1);
  4398. font-weight: 600;
  4399. height: 60px;
  4400. padding: 0 20px;
  4401. line-height: 60px;
  4402. margin: 0;
  4403. border-bottom: 1px solid rgba(230, 230, 230, 1);
  4404. .el-dialog__headerbtn {
  4405. outline: none;
  4406. }
  4407. }
  4408. .el-dialog__body {
  4409. padding: 0px 20px 20px 20px;
  4410. // height: 200px;
  4411. // display: flex;
  4412. // flex-direction: column-reverse;
  4413. .content {
  4414. height: 80px;
  4415. font-size: 16px;
  4416. padding: 20px 30px;
  4417. display: flex;
  4418. img {
  4419. width: 25px;
  4420. height: 25px;
  4421. margin: 0 8px 0 0;
  4422. }
  4423. }
  4424. .option {
  4425. display: flex;
  4426. flex-direction: row-reverse;
  4427. align-items: center;
  4428. margin: 10px 0;
  4429. .queding {
  4430. margin-left: 20px;
  4431. }
  4432. }
  4433. }
  4434. }
  4435. .pageSize {
  4436. display: flex;
  4437. align-items: center;
  4438. justify-content: space-between;
  4439. margin: 0 30px;
  4440. span {
  4441. color: #000;
  4442. }
  4443. .el-pagination {
  4444. // width: 1600px;
  4445. :deep(.el-pagination__total) {
  4446. color: #000;
  4447. }
  4448. :deep(.el-pagination__goto) {
  4449. color: #000;
  4450. }
  4451. :deep(.el-pagination__classifier) {
  4452. color: #000;
  4453. }
  4454. :deep(.el-input__wrapper) {
  4455. border: 1px solid rgba(0, 0, 0, 1);
  4456. border-radius: 5px;
  4457. box-shadow: none;
  4458. }
  4459. :deep(.el-pager li) {
  4460. margin: 0 5px;
  4461. border: 1px solid rgba(0, 0, 0, 1);
  4462. border-radius: 5px;
  4463. background-color: transparent;
  4464. }
  4465. :deep(.el-pager li.is-active) {
  4466. // background-color: rgba(0, 97, 255, 0.8);
  4467. border: 1px solid rgba(0, 97, 255, 1);
  4468. color: rgba(0, 97, 255, 1);
  4469. }
  4470. :deep(.btn-prev) {
  4471. margin-right: 5px;
  4472. border: 1px solid rgba(0, 0, 0, 1);
  4473. border-radius: 5px;
  4474. background-color: transparent;
  4475. }
  4476. :deep(.btn-next) {
  4477. margin-left: 5px;
  4478. border: 1px solid rgba(0, 0, 0, 1);
  4479. border-radius: 5px;
  4480. background-color: transparent;
  4481. }
  4482. }
  4483. }
  4484. }
  4485. .el-input {
  4486. width: 192px;
  4487. }
  4488. </style>
  4489. <style lang="scss">
  4490. //添加成员 联系人下拉框样式
  4491. .more-tag-data {
  4492. // border: 1px solid red;
  4493. .el-select-dropdown__wrap {
  4494. height: 200px;
  4495. }
  4496. }
  4497. .el-popper {
  4498. .addStudentMore {
  4499. text-align: center;
  4500. }
  4501. }
  4502. </style>