user.vue 126 KB

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