user.vue 107 KB

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