| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812 |
- <template>
- <div class="content-box">
- <div class="treeV">
- <el-input
- v-model="searchInput.department"
- :clearable="true"
- @clear="getDepartment"
- @input="getDepartment"
- placeholder="请输入部门名称"
- class="searchTree"
- >
- <template #prefix>
- <el-icon class="el-input__icon"><search /></el-icon>
- </template>
- </el-input>
- <el-tree
- :data="dataSource"
- node-key="id"
- default-expand-all
- :expand-on-click-node="false"
- >
- <template #default="{ node, data }">
- <span class="custom-tree-node">
- <div class="title" @click="nodeClick(node, data)">
- <img src="@/assets/images/folder.png" alt="" />
- <!-- <img src="@/assets/images/document.png" alt="" /> -->
- <span :class="data.id == departmentId ? 'nodeClick' : ''">{{
- data.name
- }}</span>
- </div>
- <el-dropdown
- @command="handleCommand"
- :hide-on-click="false"
- trigger="click"
- >
- <span class="el-dropdown-link">
- <img src="@/assets/images/edit.png" alt="" />
- </span>
- <template #dropdown>
- <el-dropdown-menu>
- <el-dropdown-item
- command="a"
- @click="amendBMClick(node, data)"
- >修改部门</el-dropdown-item
- >
- <el-dropdown-item command="b" @click="addBMClick(node, data)"
- >新建子部门</el-dropdown-item
- >
- <!-- <el-dropdown-item command="c">删除</el-dropdown-item> -->
- </el-dropdown-menu>
- </template>
- </el-dropdown>
- </span>
- </template>
- </el-tree>
- </div>
- <!-- 主页面 -->
- <div class="userRight" v-if="homeShow">
- <div class="left">
- <!-- <el-icon :size="23" class="camera"><VideoCameraFilled /></el-icon> -->
- <span>用户管理</span>
- <span> | {{ treeNodeName }}</span>
- <span>/ 共有{{ total }}人</span>
- </div>
- <div class="scorll">
- <div class="middle">
- <div class="filter">
- <div class="condition">
- <el-input
- v-model="searchInput.keyWord"
- :clearable="true"
- @clear="searchBtn"
- placeholder="请输入用户姓名"
- style="width: 240px"
- >
- <template #prefix>
- <el-icon class="el-input__icon"><search /></el-icon>
- </template>
- </el-input>
- </div>
- <el-button
- color="rgba(0, 97, 255, 1)"
- type="primary"
- class="search"
- @click="searchBtn"
- >
- <span>查询</span></el-button
- >
- </div>
- <!-- 按钮列表 -->
- <div class="gongneng">
- <el-button
- type="primary"
- color="rgba(0, 97, 255, 1)"
- @click="addMemberClick"
- plain
- >添加成员</el-button
- >
- <el-button
- type="primary"
- color="rgba(0, 97, 255, 1)"
- @click="moveMemberClick"
- plain
- >移动成员</el-button
- >
- <el-dropdown>
- <el-button color="rgba(0, 97, 255, 1)" plain>批量操作</el-button>
- <template #dropdown>
- <el-dropdown-menu>
- <el-dropdown-item @click="addBatchClick"
- >批量导入</el-dropdown-item
- >
- <!-- <el-dropdown-item @click="delBatchClick"
- >批量删除</el-dropdown-item
- > -->
- </el-dropdown-menu>
- </template>
- </el-dropdown>
- <!-- <el-button
- type="primary"
- color="rgba(0, 97, 255, 1)"
- @click="closeAccountClick"
- plain
- >注销账号</el-button
- > -->
- <el-button
- type="primary"
- color="rgba(0, 97, 255, 1)"
- @click="delDelClick"
- plain
- >勾选删除</el-button
- >
- <el-tooltip
- class="box-item"
- effect="dark"
- content="根据当前选中的部门、查询中的用户姓名进行导出"
- placement="top-start"
- >
- <el-button
- type="primary"
- color="rgba(0, 97, 255, 1)"
- @click="importExcel"
- plain
- >导出用户</el-button
- >
- </el-tooltip>
- <el-button
- type="primary"
- color="rgba(0, 97, 255, 1)"
- @click="DelRecordClick"
- plain
- >删除记录</el-button
- >
- </div>
- </div>
- <div class="footer" v-loading="loading">
- <el-table
- :row-class-name="tableRowClassName"
- :data="tableData.list"
- @selection-change="handleSelectionChange"
- style="width: 100%"
- :header-cell-style="{
- background: 'rgba(240, 243, 247, 1)',
- height: '50px',
- border: 0,
- }"
- >
- <el-table-column align="center" type="selection" width="80" />
- <el-table-column align="center" prop="name" label="姓名" />
- <el-table-column align="center" prop="identity" label="身份" />
- <el-table-column align="center" prop="department" label="部门" />
- <el-table-column align="center" prop="cardNo" label="学号" />
- <el-table-column align="center" prop="img" label="人脸照片">
- <template #default="{ row }">
- <div class="img">
- <img @click="imgClick(row)" :src="row.headImage" alt="" />
- </div>
- </template>
- </el-table-column>
- <el-table-column align="center" label="操作" width="200">
- <template #default="scope">
- <div class="edit">
- <div class="look" @click="editClick(scope.row)">编辑</div>
- </div>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <!-- 分页组件 -->
- <div class="pageSize">
- <span></span>
- <el-pagination
- background
- :current-page="currentPage"
- :page-size="pageSize"
- layout="total, prev, pager, next, jumper, slot"
- :total="total"
- @update:current-page="handleCurrentChange"
- />
- </div>
- </div>
- </div>
- <!-- 添加成员 -->
- <div class="addMember" v-if="addMemberShow">
- <div class="left">
- <img src="@/assets/images/close.png" alt="" @click="addMemberConcel" />
- <span class="add">{{ addMemberTitle }}</span>
- </div>
- <div class="content">
- <div class="form">
- <el-form
- ref="addMemberRef"
- :model="addMemberRuleForm"
- :rules="addMemberRules"
- label-width="90px"
- class="demo-ruleForm"
- :size="formSize"
- label-position="right"
- status-icon
- >
- <div class="title">
- <img src="@/assets/images/basicInfo.png" alt="" />
- <span>基本信息</span>
- </div>
- <el-form-item label="学号 :" prop="serialNumber">
- <el-input
- :disabled="addMemberTitle == '编辑成员' ? true : false"
- v-model="addMemberRuleForm.serialNumber"
- placeholder="请输学号"
- clearable
- style="width: 500px"
- />
- </el-form-item>
- <el-form-item label="姓名 :" prop="name">
- <el-input
- v-model="addMemberRuleForm.name"
- placeholder="请输入姓名"
- clearable
- style="width: 500px"
- />
- </el-form-item>
- <el-form-item label="身份 :" prop="identity">
- <el-select
- v-model="addMemberRuleForm.identity"
- placeholder="请选择身份"
- style="width: 500px"
- @change="identityChange"
- >
- <el-option
- v-for="i in identityData"
- :label="i.name"
- :value="i.id"
- />
- </el-select>
- </el-form-item>
- <el-form-item
- v-if="addMemberRuleForm.identity != 1"
- label="职务 :"
- :prop="addMemberRuleForm.identity == 3 ? 'duty' : ''"
- >
- <el-tooltip
- class="box-item"
- effect="dark"
- content="请先选择身份"
- placement="top-start"
- >
- <el-select
- v-model="addMemberRuleForm.duty"
- placeholder="请选择职务"
- style="width: 500px"
- >
- <el-option
- v-for="i in postData"
- :label="i.name"
- :value="`${i.id}`"
- />
- </el-select>
- </el-tooltip>
-
- </el-form-item>
- <el-form-item label="身份证号 :" prop="icCard">
- <el-input
- v-model="addMemberRuleForm.icCard"
- placeholder="请输入身份证号"
- clearable
- style="width: 500px"
- />
- </el-form-item>
- <el-form-item label="性别 :" prop="sex">
- <el-radio-group v-model="addMemberRuleForm.sex">
- <el-radio :label="1">男</el-radio>
- <el-radio :label="2">女</el-radio>
- </el-radio-group>
- </el-form-item>
- <el-form-item label="部门 :" prop="department">
- <!-- <el-cascader
- v-model="addMemberRuleForm.department"
- style="width: 500px"
- filterable
- clearable
- :options="dataSource"
- :props="{ label: 'name', value: 'id' }"
- :show-all-levels="false"
- /> -->
- <el-tree-select
- v-model="addMemberRuleForm.department"
- :data="dataSource"
- default-expand-all
- check-strictly
- :render-after-expand="false"
- style="width: 500px"
- :props="{ label: 'name', value: 'id' }"
- />
- </el-form-item>
- <el-form-item label="人脸照片 :" prop="facePhoto">
- <div class="facePhoto">
- <div v-if="addMemberRuleForm.facePhoto">
- <img
- @click="imgClick(addMemberRuleForm.facePhoto)"
- :src="addMemberRuleForm.facePhoto"
- alt="facePhotoImg"
- />
- </div>
- <el-upload
- class="avatar-uploader"
- action="#"
- :auto-upload="false"
- :on-preview="handlePreview"
- :on-remove="handleRemove"
- :on-change="handleChange"
- :http-request="handleUpload"
- :before-upload="beforeAvatarUpload"
- ref="upload"
- :limit="1"
- :on-exceed="handleExceed"
- >
- <template #trigger>
- <el-button :icon="Camera">上传图片</el-button>
- </template>
- <template #tip>
- <div class="el-upload__tip">
- 支持扩展名:.jpg
- .png,五官清晰无遮挡,名字+后缀,大小不超过2M
- </div>
- </template>
- </el-upload>
- </div>
- </el-form-item>
- <el-form-item
- v-if="addMemberRuleForm.identity != 1"
- label="年级 :"
- :prop="(addMemberRuleForm.identity == 3 && addMemberRuleForm.duty!=1) ? '' : 'grade'"
- >
- <el-select
- v-model="addMemberRuleForm.grade"
- placeholder="请选择年级"
- style="width: 500px"
- @change="classsListChange"
- >
- <el-option
- v-for="i in gradeData"
- :label="i.name"
- :value="i.id"
- />
- </el-select>
- </el-form-item>
- <el-form-item
- v-if="addMemberRuleForm.identity != 1"
- label="班级 :"
- :prop="(addMemberRuleForm.identity == 3&& addMemberRuleForm.duty!=1) ? '' : 'class'"
- >
- <el-select
- v-model="addMemberRuleForm.class"
- placeholder="请选择班级"
- style="width: 500px"
- >
- <el-option
- v-for="i in classsData"
- :label="i.name"
- :value="i.id"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="时间组 :" prop="timeGroupId">
- <el-select
- v-model="addMemberRuleForm.timeGroupId"
- placeholder="请选择时间"
- style="width: 500px"
- >
- <el-option
- v-for="i in timeGroupList"
- :label="i.name"
- :value="i.id"
- />
- </el-select>
- </el-form-item>
- <el-form-item
- v-if="
- addMemberRuleForm.identity != 2 &&
- addMemberRuleForm.identity != 1 &&
- addMemberRuleForm.identity != 3
- "
- label="学院 :"
- prop="institute"
- >
- <el-input
- v-model="addMemberRuleForm.institute"
- placeholder="请输入学院"
- clearable
- style="width: 500px"
- />
- </el-form-item>
- <el-form-item
- v-if="
- addMemberRuleForm.identity != 2 &&
- addMemberRuleForm.identity != 1 &&
- addMemberRuleForm.identity != 3
- "
- label="专业 :"
- prop="specialty"
- >
- <el-input
- v-model="addMemberRuleForm.specialty"
- placeholder="请输入专业"
- clearable
- style="width: 500px"
- />
- </el-form-item>
- <el-form-item label="校区 :" prop="school">
- <el-input
- v-model="addMemberRuleForm.school"
- placeholder="请输入校区"
- clearable
- style="width: 500px"
- />
- </el-form-item>
- <el-form-item label="宿舍号 :" prop="dormitory">
- <el-input
- v-model="addMemberRuleForm.dormitory"
- placeholder="请输入宿舍号"
- clearable
- style="width: 500px"
- />
- </el-form-item>
- <el-form-item
- v-if="addMemberRuleForm.identity != 2"
- label="手机号 :"
- prop="phone"
- >
- <el-input
- v-model="addMemberRuleForm.phone"
- placeholder="请输入手机号"
- clearable
- style="width: 500px"
- />
- </el-form-item>
- <el-form-item
- v-if="
- addMemberRuleForm.identity != 3 &&
- addMemberRuleForm.identity != 2
- "
- label="关联人 :"
- prop="contact"
- >
- <el-select
- v-model="addMemberRuleForm.contact"
- popper-class="more-tag-data"
- multiple
- filterable
- remote
- :remote-method="conteactMethod"
- :loading="conteactLoading"
- placeholder="请选择关联人"
- style="width: 500px"
- >
- <el-option
- v-for="item in conteactListData"
- :key="item.id"
- :label="`${item.name}·${item.id}`"
- :value="`${item.name}·${item.id}`"
- >
- <span style="float: left">{{ item.name }}</span>
- <span
- style="
- float: right;
- color: var(--el-text-color-secondary);
- font-size: 13px;
- "
- >{{ item.id }}</span
- >
- </el-option>
- </el-select>
- </el-form-item>
- <div class="title">
- <img src="@/assets/images/basicInfo.png" alt="" />
- <span>其他信息</span>
- </div>
- <el-form-item label="职称 :" prop="jobName">
- <el-input
- v-model="addMemberRuleForm.jobName"
- placeholder="请输入职称"
- clearable
- style="width: 500px"
- />
- </el-form-item>
- <el-form-item label="家庭地址 :" prop="houseAddress">
- <el-input
- v-model="addMemberRuleForm.houseAddress"
- placeholder="请输入家庭地址"
- clearable
- style="width: 500px"
- />
- </el-form-item>
- <el-form-item label="民族 :" prop="nation">
- <el-input
- v-model="addMemberRuleForm.nation"
- placeholder="请输入民族"
- clearable
- style="width: 500px"
- />
- </el-form-item>
- <el-form-item label="生源地 :" prop="originOfStudent">
- <el-input
- v-model="addMemberRuleForm.originOfStudent"
- placeholder="请输入生源地"
- clearable
- style="width: 500px"
- />
- </el-form-item>
- <el-form-item label="毕业学院 :" prop="graduateCollege">
- <el-input
- v-model="addMemberRuleForm.graduateCollege"
- placeholder="请输入毕业学院"
- clearable
- style="width: 500px"
- />
- </el-form-item>
- <el-form-item class="options">
- <el-button
- color="rgba(41, 109, 227, 1)"
- class="queding"
- type="primary"
- @click="confirmAddMember(addMemberRef)"
- >
- 确认
- </el-button>
- <el-button @click="addMemberConcel(addMemberRef)">取消</el-button>
- </el-form-item>
- </el-form>
- </div>
- </div>
- </div>
- <!-- 批量添加 -->
- <div class="addMember" v-if="addBatchShow">
- <div class="left">
- <img src="@/assets/images/close.png" alt="" @click="addBatchConcel" />
- <span class="add">批量添加</span>
- </div>
- <div class="content">
- <div class="form">
- <div class="imgUpload" v-loading="allImgShow" element-loading-text="导入中...">
- <el-upload
- style="width: 500px"
- class="upload-demo"
- ref="upload2"
- drag
- action="#"
- :on-preview="handlePreview2"
- :on-remove="handleRemove2"
- :on-change="handleChange2"
- :http-request="handleUpload2"
- :before-upload="beforeAvatarUpload2"
- :limit="1"
- :on-exceed="handleExceed2"
- >
- <el-icon class="el-icon--upload"><upload-filled /></el-icon>
- <div class="el-upload__text">
- <span style="font-size: 20px">点击上传或拖拽文件</span><br /><em
- >请按照标准模板填写信息</em
- >
- </div>
- <!-- <template #tip>
- <div class="el-upload__tip">
- jpg/png files with a size less than 500kb
- </div>
- </template> -->
- </el-upload>
- <el-upload
- style="width: 500px"
- class="img-upload-demo"
- drag
- action="#"
- multiple
- ref="allImgUpload"
- :on-preview="handlePreviewImgUpload"
- :on-remove="handleRemoveImgUpload"
- :on-change="handleChangeImgUpload"
- :http-request="handleUploadImgUpload"
- :before-upload="beforeAvatarUploadImgUpload"
- :on-success="handleSuccessImgUpload"
- >
- <el-icon class="el-icon--upload"><upload-filled /></el-icon>
- <div class="el-upload__text">
- <span style="font-size: 20px">点击上传图片文件夹</span><br />
- <em> 图片格式为jpeg/jpg/png格式且每张图片不能超过2MB </em>
- </div>
- <!-- <template #tip>
- <div class="el-upload__tip">
- jpg/png files with a size less than 500kb
- </div>
- </template> -->
- </el-upload>
- </div>
- <!-- <input
- ref="Folder"
- type="file"
- @change="uploadFloder"
- webkitdirectory
- /> -->
- <div class="startImport">
- <el-button
- type="primary"
- color="rgba(0, 97, 255, 1)"
- @click="bulkImport"
- plain
- >开始导入</el-button
- >
- <span
- style="width: 120px;margin-left:20px;cursor: pointer;color:rgba(0, 97, 255, 1)"
- @click="resetImport"
- >重置</span
- >
- <span class="downLoad" @click="downLoadtempAdd">下载模板</span>
- </div>
- <!-- <div class="tableTitle">导入历史</div>
- <div class="footer">
- <el-table
- :row-class-name="tableRowClassName"
- :data="addBatchData.list"
- @selection-change="handleSelectionChange"
- :header-cell-style="{
- background: 'rgba(240, 243, 247, 1)',
- height: '45px',
- border: 0,
- }"
- >
- <el-table-column
- align="center "
- prop="userName"
- label="操作管理员"
- />
- <el-table-column
- width="160"
- align="center"
- prop="time"
- label="上传时间"
- />
- <el-table-column align="center" prop="status" label="导入状态" />
- <el-table-column
- align="center"
- prop="userPhone"
- label="导入成功"
- />
- <el-table-column
- align="center"
- prop="userPhone"
- label="导入失败"
- />
- <el-table-column align="center" label="失败列表" width="200">
- <template #default="scope">
- <div class="edit">
- <div class="look" @click="lookClick(scope.row)">
- 点击查看
- </div>
- </div>
- </template>
- </el-table-column>
- </el-table>
- <div class="pageSize">
- <span></span>
- <el-pagination
- background
- :current-page="addBatch_currentPage"
- :page-size="addBatch_pageSize"
- layout="total, prev, pager, next, jumper, slot"
- :total="addBatch_total"
- @update:current-page="handleAddBatch"
- />
- </div>
- </div> -->
- </div>
- </div>
- </div>
- <!-- 删除记录页面 -->
- <div class="delRecord" v-if="delRecordShow">
- <div class="left">
- <img src="@/assets/images/close.png" alt="" @click="delRecordClose" />
- <span class="add">{{ addMemberTitle }}</span>
- </div>
- <div class="scorll">
- <div class="footer" v-loading="loading">
- <el-table
- :row-class-name="tableRowClassName"
- :data="delRecordDatas"
- @selection-change="handleSelectionChange"
- style="width: 100%"
- :header-cell-style="{
- background: 'rgba(240, 243, 247, 1)',
- height: '50px',
- border: 0,
- }"
- >
- <el-table-column align="center" prop="name" label="姓名" />
- <el-table-column align="center" prop="identityStr" label="身份" />
- <el-table-column align="center" prop="departmentStr" label="部门" />
- <el-table-column align="center" prop="cardNo" label="学号" />
- <el-table-column align="center" prop="img" label="人脸照片">
- <template #default="{ row }">
- <div class="img">
- <img @click="imgClick(row)" :src="row.headImage" alt="" />
- </div>
- </template>
- </el-table-column>
- <!-- <el-table-column align="center" label="操作" width="200">
- <template #default="scope">
- <div class="edit">
- <div class="look" @click="editClick(scope.row)">编辑</div>
- </div>
- </template>
- </el-table-column> -->
- </el-table>
- </div>
- <!-- 分页组件 -->
- <div class="pageSize">
- <span></span>
- <el-pagination
- background
- :current-page="delRecordCurrentPage"
- :page-size="delRecordPageSize"
- layout="total, prev, pager, next, jumper, slot"
- :total="delRecordTotal"
- @update:current-page="handleCurrentChange"
- />
- </div>
- </div>
- </div>
- <!-- 批量删除 -->
- <div class="addMember" v-if="delBatchShow">
- <div class="left">
- <img src="@/assets/images/close.png" alt="" @click="delBatchConcel" />
- <span class="add">批量删除</span>
- </div>
- <div class="content">
- <div class="form">
- <el-upload
- style="width: 500px"
- class="upload-demo"
- drag
- action="#"
- multiple
- :on-preview="handlePreview3"
- :on-remove="handleRemove3"
- :on-change="handleChange3"
- :http-request="handleUpload3"
- :before-upload="beforeAvatarUpload3"
- >
- <el-icon class="el-icon--upload"><upload-filled /></el-icon>
- <div class="el-upload__text">
- <span style="font-size: 20px">点击上传或拖拽文件</span><br /><em
- >务必按照我们的标准模板填写信息</em
- >
- </div>
- <!-- <template #tip>
- <div class="el-upload__tip">
- jpg/png files with a size less than 500kb
- </div>
- </template> -->
- </el-upload>
- <div class="startImport">
- <el-button
- type="primary"
- color="rgba(0, 97, 255, 1)"
- @click="addClick"
- plain
- >开始执行批量删除</el-button
- >
- <span class="downLoad">下载模板</span>
- </div>
- <div class="tableTitle">导入历史</div>
- <div class="footer">
- <el-table
- :row-class-name="tableRowClassName"
- :data="delBatchData.list"
- @selection-change="handleSelectionChange"
- :header-cell-style="{
- background: 'rgba(240, 243, 247, 1)',
- height: '45px',
- border: 0,
- }"
- >
- <el-table-column
- align="center "
- prop="userName"
- label="操作管理员"
- />
- <el-table-column align="center" prop="time" label="上传时间" />
- <el-table-column align="center" prop="status" label="导入状态" />
- <el-table-column
- align="center"
- prop="userPhone"
- label="导入成功"
- />
- <el-table-column
- align="center"
- prop="userPhone"
- label="导入失败"
- />
- <el-table-column align="center" label="失败列表" width="200">
- <template #default="scope">
- <div class="edit">
- <div class="look" @click="lookClick(scope.row)">
- 点击查看
- </div>
- <!-- <el-popconfirm
- width="220"
- confirm-button-text="确认"
- cancel-button-text="取消"
- :icon="InfoFilled"
- icon-color="#f89626"
- title="是否删除此房型?"
- @confirm="del(scope.row)"
- @cancel="cancelEvent"
- >
- <template #reference>
- <div class="del">删除</div>
- </template>
- </el-popconfirm> -->
- </div>
- </template>
- </el-table-column>
- </el-table>
- <div class="pageSize">
- <span></span>
- <el-pagination
- background
- :current-page="delBatch_currentPage"
- :page-size="delBatch_pageSize"
- layout="total, prev, pager, next, jumper, slot"
- :total="delBatch_total"
- @update:current-page="handleDelBatch"
- />
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- 修改部门 -->
- <el-dialog
- class="amendBMDialog"
- v-model="amendBMVisible"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- title="修改部门"
- align-center
- width="500"
- :before-close="cancelAmendBM"
- >
- <el-form
- ref="amendBMRef"
- :model="amendBMRuleForm"
- :rules="amendBMRules"
- label-width="90px"
- class="demo-ruleForm"
- :size="formSize"
- label-position="left"
- status-icon
- >
- <el-form-item label="部门名称 :" prop="department">
- <el-input
- v-model.trim="amendBMRuleForm.department"
- placeholder="请输入部门名称"
- clearable
- style="width: 340px"
- />
- </el-form-item>
- <div class="option">
- <el-button
- color="rgba(41, 109, 227, 1)"
- class="queding"
- type="primary"
- @click="confirmAmendBM(amendBMRef)"
- >
- 确认
- </el-button>
- <el-button @click="cancelAmendBM(amendBMRef)">取消</el-button>
- </div>
- </el-form>
- </el-dialog>
- <!-- 新建子部门 -->
- <el-dialog
- class="amendBMDialog"
- v-model="addBMVisible"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- title="新建子部门"
- align-center
- width="500"
- :before-close="cancelAddBM"
- >
- <el-form
- ref="addBMRef"
- :model="addBMRuleForm"
- :rules="addBMRules"
- label-width="90px"
- class="demo-ruleForm"
- :size="formSize"
- label-position="left"
- status-icon
- >
- <el-form-item label="部门名称 :" prop="department">
- <el-input
- v-model.trim="addBMRuleForm.department"
- placeholder="请输入部门名称"
- clearable
- style="width: 340px"
- />
- </el-form-item>
- <div class="option">
- <el-button
- color="rgba(41, 109, 227, 1)"
- class="queding"
- type="primary"
- @click="confirmAddBM(addBMRef)"
- >
- 确认
- </el-button>
- <el-button @click="cancelAddBM(addBMRef)">取消</el-button>
- </div>
- </el-form>
- </el-dialog>
- <!-- 移动成员 -->
- <el-dialog
- class="moveMemberDialog"
- v-model="moveMemberVisible"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- title="移动选择用户至"
- align-center
- width="650"
- :before-close="cancelMoveMember"
- >
- <div class="move">
- <div class="moveLeft">
- <el-input
- v-model="moveSearchInput"
- :clearable="true"
- @clear="getMoveData"
- @input="getMoveData"
- placeholder="请输入部门"
- class="searchTree"
- style="width: 260px"
- >
- <template #prefix>
- <el-icon class="el-input__icon"><search /></el-icon>
- </template>
- </el-input>
- <el-tree
- ref="moveTree"
- :data="moveData"
- node-key="id"
- default-expand-all
- :expand-on-click-node="false"
- show-checkbox
- check-strictly
- @check-change="moveCheckChange"
- >
- <template #default="{ node, data }">
- <span class="custom-tree-node">
- <div class="title">
- <img src="@/assets/images/folder.png" alt="" />
- <!-- <img src="@/assets/images/document.png" alt="" /> -->
- <span>{{ data.name }}</span>
- </div>
- </span>
- </template>
- </el-tree>
- </div>
- <div class="moveRight">
- <div class="sel">已选择 :</div>
- <ul
- class="infinite-list"
- style="overflow: auto"
- infinite-scroll-immediate="false"
- >
- <li
- v-for="(i, index) in treeSelData.list"
- :key="index"
- class="infinite-list-item"
- >
- <span style="margin-left: 19px">{{ i.label }}</span>
- <el-icon @click="cancelTreeSel(i)">
- <Close />
- </el-icon>
- <!-- <i class="el-icon-close" @click="cancelCheck(i)"></i> -->
- </li>
- </ul>
- </div>
- </div>
- <div class="options">
- <el-button
- color="rgba(41, 109, 227, 1)"
- class="queding"
- type="primary"
- @click="confirmMoveMember"
- >
- 确认
- </el-button>
- <el-button @click="cancelMoveMember">取消</el-button>
- </div>
- </el-dialog>
- <!-- 注销账号 -->
- <!-- <el-dialog
- class="closeAccount"
- v-model="closeAccountVisible"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- title="注销账号"
- align-center
- width="500"
- :before-close="cancelCloseAccount"
- >
- <div class="content">
- <img src="@/assets/images/warning.png" alt="" />
- <span
- >选中的用户将会被注销账号,注销后相应的功能将无法使用,确定要操作吗?</span
- >
- </div>
- <div class="option">
- <el-button
- color="rgba(41, 109, 227, 1)"
- class="queding"
- type="primary"
- @click="confirmCloseAccount"
- >
- 确认
- </el-button>
- <el-button @click="cancelCloseAccount">取消</el-button>
- </div>
- </el-dialog> -->
- <!-- 勾选删除 -->
- <el-dialog
- class="closeAccount"
- v-model="selDelVisible"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- title="勾选删除"
- align-center
- width="500"
- :before-close="cancelSelDel"
- >
- <div class="content">
- <img src="@/assets/images/warning.png" alt="" />
- <span>是否删除勾选的用户?</span>
- </div>
- <div class="option">
- <el-button
- color="rgba(41, 109, 227, 1)"
- class="queding"
- type="primary"
- @click="confirmSelDel"
- >
- 确认
- </el-button>
- <el-button @click="cancelSelDel">取消</el-button>
- </div>
- </el-dialog>
- <div class="bgImg" v-if="bgImg">
- <el-carousel
- @click="bgImg = false"
- ref="bgImgs"
- indicator-position
- arrow="always"
- :autoplay="false"
- trigger
- >
- <el-carousel-item>
- <img :src="showImg" alt="" />
- </el-carousel-item>
- </el-carousel>
- </div>
- </div>
- </template>
- <script setup>
- import {
- ref,
- reactive,
- watch,
- nextTick,
- onBeforeMount,
- onUnmounted,
- } from "vue";
- import COS from "cos-js-sdk-v5";
- import { useRouter } from "vue-router";
- import { ElMessage, ElMessageBox, genFileId } from "element-plus";
- import { Camera } from "@element-plus/icons-vue";
- import { dayjs } from "element-plus";
- import lodash from "lodash";
- import axios from "axios";
- import compressImg from "@/utils/compressImg.js";
- import eds from "@/utils/eds.js";
- import { useStore } from "vuex";
- const store = useStore();
- const api = ref("");
- const router = useRouter();
- // 树形结构
- const dataSource = ref([
- {
- id: 1,
- label: "万载县第三中学",
- children: [
- {
- id: 2,
- label: "教职工",
- children: [
- {
- id: 121,
- label: "院领导",
- },
- {
- id: 122,
- label: "董事会办公室",
- },
- {
- id: 123,
- label: "团委",
- },
- {
- id: 124,
- label: "科技园",
- },
- ],
- },
- {
- id: 3,
- label: "学生",
- children: [
- {
- id: 131,
- label: "设计与技术学院",
- },
- {
- id: 132,
- label: "商学院",
- },
- ],
- },
- {
- id: 4,
- label: "临时人员",
- children: [
- {
- id: 141,
- label: "维修",
- },
- {
- id: 142,
- label: "商品",
- },
- ],
- },
- {
- id: 5,
- label: "司机",
- },
- {
- id: 6,
- label: "食堂",
- children: [
- {
- id: 9,
- label: "一食堂",
- },
- {
- id: 10,
- label: "二食堂",
- },
- ],
- },
- ],
- },
- ]);
- // 被点击的树形节点 id
- const treeNodeId = ref();
- const treeNodeName = ref();
- // 主页面数据(----------------------------------------------)
- // 表格数据
- const loading = ref(false);
- const tableData = reactive({
- list: [
- // {
- // userName: "张三",
- // type: "越界",
- // position: "教学楼",
- // img: "https://nimg.ws.126.net/?url=http%3A%2F%2Fdingyue.ws.126.net%2F2021%2F1123%2F77d07411j00r30gwf004dc000go00b4m.jpg&thumbnail=660x2147483647&quality=80&type=jpg",
- // remark: "请规范好学生行为",
- // status: "已处理",
- // time: "2023-12-02 11:05:30",
- // },
- ],
- });
- const searchInput = reactive({
- keyWord: "", // 姓名或学号关键字
- department: "", // 部门
- }); // 搜索按钮数据
- const homeShow = ref(true);
- const currentPage = ref(1); // 当前页
- const pageSize = ref(7);
- const total = ref(8); // 当前总数
- // 修改部门 (----------------------------------------------)
- const amendBMVisible = ref(false);
- const amendBMRef = ref();
- const amendBMRuleForm = reactive({
- department: "", // 部门
- id: "",
- parentId: "",
- });
- // 表单验证
- const amendBMRules = reactive({
- department: [
- { required: true, message: "部门名称不能为空", trigger: "blur" },
- ],
- });
- // 新建子部门 (----------------------------------------------)
- const addBMVisible = ref(false);
- const addBMRef = ref();
- const addBMRuleForm = reactive({
- department: "", // 部门
- id: "",
- });
- // 表单验证
- const addBMRules = reactive({
- department: [
- { required: true, message: "部门名称不能为空", trigger: "blur" },
- ],
- });
- // 添加成员页面 (---------------------------------------------)
- const addMemberShow = ref(false);
- const addMemberTitle = ref("添加成员");
- const addMemberRef = ref();
- const addMemberRuleForm = reactive({
- serialNumber: "", // 学号
- name: "", // 姓名
- identity: "", // 身份
- icCard: "", // 身份证号
- sex: "", // 性别
- department: "", // 部门
- facePhoto: "", // 人脸照片
- facePhoto: "", // 人脸照片
- compressFacePhoto: "", // 压缩的人脸照片
- grade: "", // 年级
- institute: "", // 学院
- specialty: "", // 专业
- class: "", // 班级
- school: "", // 校区
- dormitory: "", // 宿舍号
- phone: "", // 手机号
- contact: [], // 联系人
- timeGroupId: "", // 时间组
- // 其他信息
- jobName: "", // 职称
- houseAddress: "", // 家庭地址
- nation: "", // 民族
- originOfStudent: "", // 生源地
- graduateCollege: "", // 毕业学院
- duty: "", // 职务
- id: "",
- });
- const identityData = ref(); // 身份下拉数据
- const gradeData = ref(); // 年级下拉数据
- const classsData = ref(); // 班级下拉数据
- const postData = ref(); // 职务下拉数据
- const timeGroupList = ref(); // 时间组下拉数据
- const conteactListData = ref(); // 联系人下拉数据
- const conteactListCurrentPage = ref(1); // 联系人下拉当前页数
- const conteactListPageCount = ref(10); // 联系人下拉一页数据条数
- const conteactListTotalPage = ref(); // 联系人总共多少页,判断滚动到底是否还要加载
- const conteactListInput = ref(); // 联系人下拉框中的搜索字段
- const conteactLoading = ref(false); // 联系人下拉框搜索时加载
- const upload = ref(); // 人脸照片
- // 表单验证
- const checkPhone=(rule, value, callback)=>{
- var reg = /^(0|\+?86|17951)?(13[0-9]|15[012356789]|17[013678]|18[0-9]|14[57])[0-9]{8}$/
- if (!reg.test(value)) {
- callback(new Error("手机号格式不对"));
- } else {
- callback();
- }
- }
- const checkIccard=(rule, value, callback)=>{
- var reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
- if (!reg.test(value)) {
- callback(new Error("身份证号格式不对"));
- } else {
- callback();
- }
- }
- const addMemberRules = reactive({
- serialNumber: [{ required: true, message: "学号不能为空", trigger: "blur" }],
- name: [{ required: true, message: "姓名不能为空", trigger: "blur" }],
- identity: [{ required: true, message: "身份不能为空", trigger: "change" }],
- icCard: [{ required: true, message: "身份证号不能为空", trigger: "blur" },{ validator: checkIccard, trigger: "blur" }],
- sex: [{ required: true, message: "性别不能为空", trigger: "blur" }],
- department: [{ required: true, message: "部门不能为空", trigger: "change" }],
- facePhoto: [{ required: true, message: "人脸照片不能为空", trigger: "blur" }],
- grade: [{ required: true, message: "年级不能为空", trigger: "change" }],
- // institute: [{ required: true, message: "学院不能为空", trigger: "blur" }],
- // specialty: [{ required: true, message: "专业不能为空", trigger: "blur" }],
- class: [{ required: true, message: "班级不能为空", trigger: "change" }],
- // school: [{ required: true, message: "校区不能为空", trigger: "blur" }],
- // dormitory: [{ required: true, message: "宿舍号不能为空", trigger: "blur" }],
- phone: [{ required: true, message: "手机号不能为空", trigger: "blur" },
- { validator: checkPhone, trigger: "blur" }],
- contact: [{ required: true, message: "关联人不能为空", trigger: "blur" }],
- // jobName: [{ required: true, message: "职称不能为空", trigger: "blur" }],
- houseAddress: [
- // { required: true, message: "家庭地址不能为空", trigger: "blur" },
- ],
- // nation: [{ required: true, message: "民族不能为空", trigger: "blur" }],
- originOfStudent: [
- // { required: true, message: "生源地不能为空", trigger: "blur" },
- ],
- graduateCollege: [
- // { required: true, message: "毕业学院不能为空", trigger: "blur" },
- ],
- duty: [{ required: true, message: "职务不能为空", trigger: "blur" }],
- timeGroupId: [{ required: true, message: "时间组不能为空", trigger: "blur" }],
- });
- // 批量添加 (-----------------------------------------)
- const addBatchShow = ref(false);
- const addBatchData = reactive({
- list: [
- {
- userName: "张三",
- status: "已处理",
- time: "2023-12-02 11:05:30",
- },
- {
- userName: "王卿",
- status: "已处理",
- time: "2023-12-02 11:05:30",
- },
- {
- userName: "李明",
- status: "已处理",
- time: "2023-12-02 11:05:30",
- },
- {
- userName: "涂涂",
- status: "已处理",
- time: "2023-12-02 11:05:30",
- },
- {
- userName: "小红",
- status: "已处理",
- time: "2023-12-02 11:05:30",
- },
- {
- userName: "小明",
- status: "已处理",
- time: "2023-12-02 11:05:30",
- },
- {
- userName: "例子",
- status: "已处理",
- time: "2023-12-02 11:05:30",
- },
- ],
- });
- const addBatch_currentPage = ref(1); // 当前页
- const addBatch_pageSize = ref(7);
- const addBatch_total = ref(8); // 当前总数
- const upload2 = ref(); // ref 导入文件ref
- const allImgUpload = ref(); // ref 导入图片ref
- const allImgNum = ref(0); // 导入图片的数量
- const allImgShow = ref(false); // 导入时的加载
- const upload2File = ref(); // 批量导入的文件
- const uploadImgList = ref(); // 批量导入的图片列表
- // 批量删除(--------------------------------------------)
- const delBatchShow = ref(false);
- const delBatchData = reactive({
- list: [
- {
- userName: "张三",
- status: "已处理",
- time: "2023-12-02 11:05:30",
- },
- {
- userName: "王卿",
- status: "已处理",
- time: "2023-12-02 11:05:30",
- },
- {
- userName: "李明",
- status: "已处理",
- time: "2023-12-02 11:05:30",
- },
- {
- userName: "涂涂",
- status: "已处理",
- time: "2023-12-02 11:05:30",
- },
- {
- userName: "小红",
- status: "已处理",
- time: "2023-12-02 11:05:30",
- },
- {
- userName: "小明",
- status: "已处理",
- time: "2023-12-02 11:05:30",
- },
- {
- userName: "例子",
- status: "已处理",
- time: "2023-12-02 11:05:30",
- },
- ],
- });
- const delBatch_currentPage = ref(1); // 当前页
- const delBatch_pageSize = ref(7);
- const delBatch_total = ref(8); // 当前总数
- // 移动成员(-----------------------------------------------)
- const moveData = ref(); // 树形数据
- const selectData = reactive({ list: [] }); // 要移动的成员列表
- const moveMemberVisible = ref(false);
- const moveTree = ref();
- const moveSearchInput = ref(); // 移动部门中关键字搜索
- const treeSelData = reactive({ list: [] }); //
- // 删除记录页面
- const delRecordDatas=ref() // 删除记录
- const delRecordTotal=ref()// 删除记录数量
- const delRecordCurrentPage=ref(1)
- const delRecordPageSize=ref(8)
- const delRecordShow = ref(false);
- // 勾选删除
- const selDelVisible = ref(false);
- // 查看表格图片 (----------------------------------------------)
- const bgImg = ref(false);
- const showImg = ref();
- const imgClick = (row) => {
- console.log(typeof row);
- if (typeof row == "string") {
- bgImg.value = true;
- showImg.value = row;
- } else {
- bgImg.value = true;
- showImg.value = row.headImage;
- }
- };
- // 查看用户分页列表
- const getList = async () => {
- loading.value = true;
- let data = {
- currentPage: currentPage.value,
- pageCount: pageSize.value,
- departmentId: treeNodeId.value,
- name: searchInput.keyWord,
- };
- let res = await axios({
- method: "get",
- url: api.value + "/wanzai/api/smartUser/queryPageSmartUser",
- headers: {
- // token: sessionStorage.getItem("token"),
- // user_head: sessionStorage.getItem("userhead"),
- },
- params: data,
- });
- console.log(res, JSON.parse(eds.decryptDes(res.data.data)), "用户列表");
- if (res.data.code == 200) {
- loading.value = false;
- tableData.list = JSON.parse(eds.decryptDes(res.data.data)).list;
- total.value = JSON.parse(eds.decryptDes(res.data.data)).totalCount;
- // ElMessage({
- // type: "success",
- // showClose: true,
- // message: res.data.message,
- // center: true,
- // });
- } else {
- loading.value = false;
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- // 获取部门树形结构
- const getDepartment = async () => {
- let data = {
- name: searchInput.department,
- };
- let res = await axios({
- method: "get",
- url: api.value + "/wanzai/api/smartDepartment/queryDepartmentTree",
- headers: {
- // token: sessionStorage.getItem("token"),
- // user_head: sessionStorage.getItem("userhead"),
- },
- params: data,
- });
- console.log(res, JSON.parse(eds.decryptDes(res.data.data)), "部门树形数据");
- if (res.data.code == 200) {
- loading.value = false;
- if (treeNodeId.value && treeNodeName.value) {
- } else {
- treeNodeId.value = JSON.parse(eds.decryptDes(res.data.data))[0].id;
- treeNodeName.value = JSON.parse(eds.decryptDes(res.data.data))[0].name;
- getList();
- }
- dataSource.value = JSON.parse(eds.decryptDes(res.data.data));
- // ElMessage({
- // type: "success",
- // showClose: true,
- // message: res.data.message,
- // center: true,
- // });
- } else {
- loading.value = false;
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- // 部门节点被点击
- const nodeClick = (node, data) => {
- treeNodeId.value = data.id;
- treeNodeName.value = data.name;
- getList();
- console.log(data);
- };
- // 搜索功能
- const searchBtn = lodash.debounce(async () => {
- getList();
- }, 300);
- // 修改部门(------------------------------------------------)
- const amendBMClick = (node, data) => {
- amendBMVisible.value = true;
- amendBMRuleForm.department = data.name;
- amendBMRuleForm.id = data.id;
- amendBMRuleForm.parentId = data.parentId;
- console.log(node, data, "修改部门");
- };
- const confirmAmendBM = async (formEl) => {
- if (!formEl) return;
- await formEl.validate(async (valid, fields) => {
- if (valid) {
- if (valid) {
- let data = {
- id: amendBMRuleForm.id,
- name: amendBMRuleForm.department,
- parentId: amendBMRuleForm.parentId,
- };
- let res = await axios({
- method: "post",
- url:
- api.value + "/wanzai/api/smartDepartment/updateSmartDepartmentById",
- headers: {
- // token: sessionStorage.getItem("token"),
- // user_head: sessionStorage.getItem("userhead"),
- },
- data: data,
- });
- console.log(res, "修改部门");
- if (res.data.code == 200) {
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- amendBMVisible.value = false;
- getDepartment();
- console.log(treeNodeId.value, amendBMRuleForm.id);
- if (treeNodeId.value == amendBMRuleForm.id) {
- treeNodeName.value = amendBMRuleForm.department;
- getList();
- }
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- } else {
- console.log("error submit!", fields);
- }
- } else {
- console.log("error submit!", fields);
- }
- });
- };
- const cancelAmendBM = () => {
- amendBMVisible.value = false;
- amendBMRef.value.resetFields();
- };
- // 新建子部门(------------------------------------------------)
- const addBMClick = (node, data) => {
- addBMVisible.value = true;
- addBMRuleForm.id = data.id;
- addBMRuleForm.department = "";
- console.log(node, data, "新建子部门");
- };
- const confirmAddBM = async (formEl) => {
- if (!formEl) return;
- await formEl.validate(async (valid, fields) => {
- if (valid) {
- let data = {
- name: addBMRuleForm.department,
- parentId: addBMRuleForm.id,
- };
- let res = await axios({
- method: "post",
- url: api.value + "/wanzai/api/smartDepartment/insertSmartDepartment",
- headers: {
- // token: sessionStorage.getItem("token"),
- // user_head: sessionStorage.getItem("userhead"),
- },
- data: data,
- });
- console.log(res, "添加子部门");
- if (res.data.code == 200) {
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- addBMVisible.value = false;
- getDepartment();
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- } else {
- console.log("error submit!", fields);
- }
- });
- };
- const cancelAddBM = () => {
- addBMVisible.value = false;
- };
- //删除按钮(---------------------------------------------------)
- const del = async (row) => {
- let data = {
- id: row.id,
- };
- // let res = await axios({
- // method: "post",
- // url: api.value + "/mhotel/housedelHouser.action",
- // headers: {
- // // token: sessionStorage.getItem("token"),
- // // user_head: sessionStorage.getItem("userhead"),
- // },
- // params: data,
- // });
- // if (res.data.code == 200) {
- // if (tableData.list.length == 1 && currentPage.value != 1) {
- // currentPage.value = currentPage.value - 1;
- // }
- // getList();
- // ElMessage({
- // type: "success",
- // showClose: true,
- // message: res.data.message,
- // center: true,
- // });
- // } else {
- // ElMessage({
- // type: "error",
- // showClose: true,
- // message: res.data.message,
- // center: true,
- // });
- // }
- // console.log(res);
- };
- // 添加成员(---------------------------------------------------)
- // 获取身份数据下拉、年级数据下拉、班级数据下拉、新增时间组
- const classDataList = async () => {
- let identity = await axios({
- method: "get",
- url: api.value + "/wanzai/api/smartIdentity/querySmartIdentitys",
- headers: {
- // token: sessionStorage.getItem("token"),
- // user_head: sessionStorage.getItem("userhead"),
- },
- // params: data,
- });
- console.log(identity,JSON.parse(eds.decryptDes(identity.data.data)), "身份下拉数据");
- identityData.value = JSON.parse(eds.decryptDes(identity.data.data));
- let grade = await axios({
- method: "get",
- url: api.value + "/wanzai/api/smartGrade/querySmartGrades",
- headers: {
- // token: sessionStorage.getItem("token"),
- // user_head: sessionStorage.getItem("userhead"),
- },
- // params: data,
- });
- console.log(grade, "年级下拉数据");
- gradeData.value = JSON.parse(eds.decryptDes(grade.data.data));
- let timeGroupId = await axios({
- method: "get",
- url: api.value + "/wanzai/api/smartUser/timeGroups",
- headers: {
- // token: sessionStorage.getItem("token"),
- // user_head: sessionStorage.getItem("userhead"),
- },
- // params: data,
- });
- console.log(timeGroupId, "时间组下拉数据");
- timeGroupList.value = JSON.parse(eds.decryptDes(timeGroupId.data.data));
- };
- // 联系人分页数据
- const studentList = async () => {
- console.log(conteactListInput.value, "加载");
- let data = {
- currentPage: conteactListCurrentPage.value,
- pageCount: conteactListPageCount.value,
- name: conteactListInput.value,
- };
- let res = await axios({
- method: "get",
- url: api.value + "/wanzai/api/smartScore/querySmartSecordPage",
- headers: {
- // token: sessionStorage.getItem("token"),
- // user_head: sessionStorage.getItem("userhead"),
- },
- params: data,
- });
- console.log(res, JSON.parse(eds.decryptDes(res.data.data)), "联系人数据");
- conteactListData.value = JSON.parse(eds.decryptDes(res.data.data)).list;
- conteactListTotalPage.value = JSON.parse(
- eds.decryptDes(res.data.data)
- ).totalPage;
- };
- // 职务分页数据
- const postList = async () => {
- let data = {
- identityId: addMemberRuleForm.identity,
- };
- let post = await axios({
- method: "get",
- url: api.value + "/wanzai/api/smartDuties/queryDutiesByIdentity",
- headers: {
- // token: sessionStorage.getItem("token"),
- // user_head: sessionStorage.getItem("userhead"),
- },
- params: data,
- });
- console.log(post);
- if (post.data.code == 200) {
- console.log(
- post,
- JSON.parse(eds.decryptDes(post.data.data)),
- "职务下拉数据"
- );
- postData.value = JSON.parse(eds.decryptDes(post.data.data));
- } else {
- postData.value = [];
- }
- };
- // 班级下拉数据
- const classsList = async () => {
- let data = {
- gradeId: addMemberRuleForm.grade,
- };
- let classs = await axios({
- method: "get",
- url: api.value + "/wanzai/api/smartClass/querySmartClasss",
- headers: {
- // token: sessionStorage.getItem("token"),
- // user_head: sessionStorage.getItem("userhead"),
- },
- params: data,
- });
- console.log(classs, "班级下拉数据");
- if(classs.data.code==200){
- classsData.value = JSON.parse(eds.decryptDes(classs.data.data));
- }
- };
- // 改变身份加载职务数据
- const identityChange = () => {
- addMemberRuleForm.duty = "";
- addMemberRuleForm.contact = [];
- addMemberRuleForm.class = "";
- addMemberRuleForm.grade = "";
- // addMemberRuleForm.phone = "";
- if (addMemberRuleForm.identity) {
- postList();
- }
- };
- // 切换年级加载班级数据
- const classsListChange = (value) => {
- addMemberRuleForm.class = "";
- if (addMemberRuleForm.grade) {
- classsList();
- }
- };
- // 联系人分页触底加载更多
- const addStudentListScroll = () => {
- nextTick(() => {
- const domElementNode = document.querySelector(
- ".more-tag-data .el-select-dropdown__wrap"
- );
- console.log(domElementNode);
- // 注册下拉滚动事件
- if (domElementNode) {
- domElementNode.addEventListener("scroll", async () => {
- const isBottom =
- domElementNode.scrollHeight - domElementNode.scrollTop <=
- domElementNode.clientHeight;
- if (isBottom) {
- if (conteactListCurrentPage.value < conteactListTotalPage.value) {
- conteactListCurrentPage.value++;
- console.log(conteactListInput.value, "滚动里面");
- let data = {
- currentPage: conteactListCurrentPage.value,
- pageCount: conteactListPageCount.value,
- name: conteactListInput.value,
- };
- let res = await axios({
- method: "get",
- url: api.value + "/wanzai/api/smartScore/querySmartSecordPage",
- headers: {
- // token: sessionStorage.getItem("token"),
- // user_head: sessionStorage.getItem("userhead"),
- },
- params: data,
- });
- console.log(res, "联系人数据");
- conteactListData.value = [
- ...conteactListData.value,
- ...JSON.parse(eds.decryptDes(res.data.data)).list,
- ];
- } else {
- console.log("数据全部加载完成");
- }
- }
- });
- }
- });
- };
- // 联系人下拉框搜索时加载
- const conteactMethod = (query) => {
- console.log(query);
- conteactListInput.value = query;
- conteactListCurrentPage.value = 1;
- studentList();
- };
- // 添加成员弹窗
- const addMemberClick = () => {
- addMemberTitle.value = "添加成员";
- conteactListCurrentPage.value=1 // 联系人分页重新赋值为1
- homeShow.value = false;
- addMemberShow.value = true;
- delRecordShow.value=false
- studentList();
- addStudentListScroll();
- addMemberRuleForm.serialNumber = "";
- addMemberRuleForm.name = "";
- addMemberRuleForm.identity = "";
- addMemberRuleForm.icCard = "";
- addMemberRuleForm.sex = "";
- addMemberRuleForm.department = "";
- addMemberRuleForm.facePhoto = "";
- addMemberRuleForm.compressFacePhoto = "";
- addMemberRuleForm.grade = "";
- addMemberRuleForm.institute = "";
- addMemberRuleForm.specialty = "";
- addMemberRuleForm.class = "";
- addMemberRuleForm.timeGroupId = "";
- addMemberRuleForm.school = "";
- addMemberRuleForm.dormitory = "";
- addMemberRuleForm.phone = "";
- addMemberRuleForm.contact = [];
- addMemberRuleForm.jobName = "";
- addMemberRuleForm.houseAddress = "";
- addMemberRuleForm.nation = "";
- addMemberRuleForm.originOfStudent = "";
- addMemberRuleForm.graduateCollege = "";
- addMemberRuleForm.duty = "";
- nextTick(() => {
- addMemberRef.value.resetFields();
- });
- };
- // 编辑成员弹窗
- const editClick = (row) => {
- addMemberTitle.value = "编辑成员";
- conteactListCurrentPage.value=1 // 联系人分页重新赋值为1
- homeShow.value = false;
- addMemberShow.value = true;
- delRecordShow.value=false
- studentList();
- addStudentListScroll();
- console.log(row, "编辑");
- addMemberRuleForm.serialNumber = row.cardNo; // 学号
- addMemberRuleForm.name = row.name; // 姓名
- addMemberRuleForm.identity = row.identityId; // 身份ID
- nextTick(() => {
- postList();
- });
- addMemberRuleForm.icCard = row.idCard; // 身份证
- addMemberRuleForm.sex = row.sexId; // 性别 女:0男:1
- addMemberRuleForm.department = row.departmentId; // 部门ID
- addMemberRuleForm.facePhoto = row.headImage; // 人脸照片
- addMemberRuleForm.grade = Number(row.grade); // 年级
- nextTick(() => {
- classsList();
- });
- addMemberRuleForm.institute = row.college; // 学院
- addMemberRuleForm.specialty = row.speciality; // 专业
- addMemberRuleForm.class = row.schoolClass; // 班级
- addMemberRuleForm.timeGroupId = row.timeGroupId; // 时间组
- addMemberRuleForm.school = row.campus; // 校区
- addMemberRuleForm.dormitory = row.dormitoryNumber; // 宿舍号
- addMemberRuleForm.phone = row.phone; // 手机号
- if (row.affiliate) {
- let arr=[]
- row.affiliates.forEach(item=>{
- arr.push(`${item.name}·${item.id}`)
- })
- addMemberRuleForm.contact = arr; // 联系人
- } else {
- addMemberRuleForm.contact = [];
- }
- addMemberRuleForm.jobName = row.title; // 职称
- addMemberRuleForm.houseAddress = row.address; // 家庭住址
- addMemberRuleForm.nation = row.nation; // 民族
- addMemberRuleForm.originOfStudent = row.ofStudent; // 生源地
- addMemberRuleForm.graduateCollege = row.graduate; // 毕业学校
- addMemberRuleForm.duty = row.duties; // 职务
- addMemberRuleForm.id = row.id;
- };
- // 确定添加成员
- const confirmAddMember = async (formEl) => {
- if (!formEl) return;
- await formEl.validate(async (valid, fields) => {
- if (valid) {
- console.log( addMemberRuleForm.contact);
- let arr=[]
- addMemberRuleForm.contact.forEach(item=>{
- let index = item.split("·")
- arr.push(index[1])
- })
- console.log(arr);
- let data = {
- cardNo: addMemberRuleForm.serialNumber, // 学号
- name: addMemberRuleForm.name, // 姓名
- identityId: addMemberRuleForm.identity, // 身份ID
- idCard: addMemberRuleForm.icCard, // 身份证
- sexId: addMemberRuleForm.sex, // 性别 女:0男:1
- departmentId: addMemberRuleForm.department, // 部门ID
- headImage: addMemberRuleForm.facePhoto, // 人脸照片
- grade: addMemberRuleForm.grade, // 年级
- college: addMemberRuleForm.institute, // 学院
- speciality: addMemberRuleForm.specialty, // 专业
- schoolClass: addMemberRuleForm.class, // 班级
- timeGroupId: addMemberRuleForm.timeGroupId, // 时间组
- campus: addMemberRuleForm.school, // 校区
- dormitoryNumber: addMemberRuleForm.dormitory, // 宿舍号
- phone: addMemberRuleForm.phone, // 手机号
- affiliate: arr, // 联系人
- title: addMemberRuleForm.jobName, // 职称
- address: addMemberRuleForm.houseAddress, // 家庭住址
- nation: addMemberRuleForm.nation, // 民族
- ofStudent: addMemberRuleForm.originOfStudent, // 生源地
- graduate: addMemberRuleForm.graduateCollege, // 毕业学校
- duties: addMemberRuleForm.duty, // 职务
- };
- let res = "";
- if (addMemberRuleForm.id) {
- data.id = addMemberRuleForm.id;
- res = await axios({
- method: "post",
- url: api.value + "/wanzai/api/smartUser/updateSmartUserById",
- headers: {
- // token: sessionStorage.getItem("token"),
- // user_head: sessionStorage.getItem("userhead"),
- },
- data: data,
- });
- console.log(res, "编辑用户");
- } else {
- res = await axios({
- method: "post",
- url: api.value + "/wanzai/api/smartUser/insertSmartUser",
- headers: {
- // token: sessionStorage.getItem("token"),
- // user_head: sessionStorage.getItem("userhead"),
- },
- data: data,
- });
- console.log(res, "新增用户");
- }
- if (res.data.code == 200) {
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- homeShow.value = true;
- addMemberShow.value = false;
- delRecordShow.value=false
- addMemberRef.value.resetFields();
- getList();
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- } else {
- console.log("error submit!", fields);
- }
- });
- };
- const addMemberConcel = () => {
- addMemberShow.value = false;
- homeShow.value = true;
- delRecordShow.value=false
- addMemberRef.value.resetFields();
- addMemberRuleForm.id = "";
- };
- // 移出照片
- const handleRemove = (uploadFile, uploadFiles) => {
- console.log(uploadFile.uid, uploadFiles);
- addMemberRuleForm.facePhoto = "";
- };
- // 点击图片的查看按钮
- const handlePreview = (file) => {
- // imgUrl.value = file.url;
- // imgVisible.value = true;
- // console.log(file, "00000000");
- };
- // 限制上传图片的大小
- // const beforeAvatarUpload = (rawFile) => {
- // console.log(rawFile, 33333);
- // if (rawFile.type !== "image/jpeg" && rawFile.type !== "image/png") {
- // ElMessage.error("图片格式必须为JPG/PNG格式!");
- // return false;
- // } else if (rawFile.size / 1024 > 150) {
- // ElMessage.error("图片的大小不能超过150kb!");
- // return false;
- // }
- // return true;
- // };
- // 添加照片时往fileList列表中添加图片信息
- const handleChange = async (file, fileLists) => {
- console.log(file, "1111");
- if (file.raw.type == "image/jpeg" || file.raw.type == "image/png") {
- if (file.size / 1024 / 1024 <= 2) {
- const cos = new COS({
- SecretId: "AKIDCPVZdcWIxgHpy5FYxVyPiqkZGrhdXUBg",
- SecretKey: "NkyCN3cz97qKaeXLvHOGxOcdS8f184pL",
- SecurityToken: "1306339220",
- Bucket: "wanzai-1306339220",
- Region: "ap-shanghai",
- });
- const files = file.raw;
- console.log(files);
- // 压缩图片
- // console.log(compressImg);
- var compressImgFile = await compressImg.compressImg(files);
- // console.log(compressImgFile, "压缩图片");
- const compressKey = "Compress" + file.raw.name; // 设置上传到 COS 后的文件名
- cos.putObject(
- {
- Bucket: "wanzai-1306339220",
- Region: "ap-shanghai",
- Key: compressKey,
- Body: compressImgFile,
- onProgress: function (progressData) {
- console.log(JSON.stringify(progressData));
- },
- },
- function (err, data) {
- if (err) {
- console.error(err);
- } else {
- console.log(data, "压缩图片获取成功");
- addMemberRuleForm.facePhoto = "https://" + data.Location;
- // 成功
- }
- }
- );
- // 上传cos桶
- const key = file.raw.name; // 设置上传到 COS 后的文件名
- cos.putObject(
- {
- Bucket: "wanzai-1306339220",
- Region: "ap-shanghai",
- Key: key,
- Body: files,
- onProgress: function (progressData) {
- console.log(JSON.stringify(progressData));
- },
- },
- function (err, data) {
- if (err) {
- console.error(err);
- } else {
- console.log(data, "图片获取成功");
- addMemberRuleForm.compressFacePhoto = "https://" + data.Location;
- // 成功
- }
- }
- );
- } else {
- ElMessage.error("图片的大小不能超过2M!");
- }
- } else {
- ElMessage.error("图片格式必须为JPG/PNG格式!");
- }
- };
- // 可以获取图片参数
- const handleUpload = async (file) => {
- console.log(file, "22222222");
- };
- // 当头像被另外图片替换时调用此函数
- const handleExceed = (files) => {
- upload.value.clearFiles();
- const file = files[0];
- file.uid = genFileId();
- upload.value.handleStart(file);
- };
- // // 确定编辑
- // const confirmEdit = (formEl) => {
- // if (!formEl) return;
- // formEl.validate(async (valid, fields) => {
- // if (valid) {
- // }
- // });
- // };
- // 批量添加 (------------------------------------------------------)
- const addBatchClick = () => {
- addBatchShow.value = true;
- homeShow.value = false;
- delRecordShow.value=false
- nextTick(() => {
- const Ele = document.querySelector(".img-upload-demo .el-upload__input");
- Ele["webkitdirectory"] = true;
- });
- };
- const addBatchConcel = () => {
- homeShow.value = true;
- addBatchShow.value = false;
- delRecordShow.value=false
- upload2File.value = "";
- uploadImgList.value = "";
- allImgUpload.value.clearFiles();
- upload2.value.clearFiles();
- };
- // 打开删除记录页面
- const DelRecordClick=async ()=>{
- delRecordShow.value=true
- delBatchShow.value = false;
- homeShow.value = false;
- addMemberTitle.value='删除记录'
- let data = {
- currentPage:delRecordCurrentPage.value,
- pageCount:delRecordPageSize.value,
- };
- let res = await axios({
- method: "get",
- url: api.value + "/wanzai/api/smartUser/queryUserDeletePage",
- headers: {
- // token: sessionStorage.getItem("token"),
- // user_head: sessionStorage.getItem("userhead"),
- },
- params: data,
- });
- console.log(res, JSON.parse(eds.decryptDes(res.data.data)), "删除记录分页");
- if (res.data.code == 200) {
- delRecordDatas.value = JSON.parse(eds.decryptDes(res.data.data)).list;
- delRecordTotal.value = JSON.parse(eds.decryptDes(res.data.data)).totalCount;
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- }
- // 关闭删除记录页面
- const delRecordClose=()=>{
- delRecordShow.value=false
- delBatchShow.value = false;
- homeShow.value = true;
- }
- // 批量导入模板下载
- const downLoadtempAdd = async () => {
- let res = await axios({
- method: "get",
- url: api.value + "/wanzai/api/smartUser/downloadUserExcel",
- headers: {
- // token: sessionStorage.getItem("token"),
- // user_head: sessionStorage.getItem("userhead"),
- },
- // params: data,
- });
- console.log(
- res,
- JSON.parse(eds.decryptDes(res.data.data)),
- "批量导入模板下载"
- );
- if (res.data.code == 200) {
- var downloadPath = JSON.parse(eds.decryptDes(res.data.data));
- // window.open(downloadPath);
- window.location.href = downloadPath;
- var downloadLink = document.createElement("a");
- downloadLink.style.display = "none"; // 使其隐藏
- downloadLink.href = downloadPath;
- downloadLink.download = "";
- downloadLink.click();
- document.body.appendChild(downloadLink);
- document.body.removeChild(downloadLink);
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- loading.value = false;
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- // 移出照片
- const handleRemove2 = (uploadFile, uploadFiles) => {
- // console.log(uploadFile.uid, uploadFiles);
- // fileList.list = fileList.list.filter((item) => {
- // return item.uid != uploadFile.uid;
- // });
- // ruleForm.fileListJson = fileList.list;
- upload2File.value = "";
- };
- // 点击图片的查看按钮
- const handlePreview2 = (file) => {
- // imgUrl.value = file.url;
- // imgVisible.value = true;
- console.log(file);
- };
- // 限制上传图片的大小
- const beforeAvatarUpload2 = (rawFile) => {
- console.log(rawFile.type, "文件类型");
- if (
- rawFile.type !==
- "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
- ) {
- ElMessage.error("文件格式必须为xlsx格式!");
- return false;
- } else if (rawFile.size / 1024 / 1024 > 100) {
- ElMessage.error("文件的大小不能超过100MB!");
- return false;
- }
- return true;
- };
- // 添加照片时往fileList列表中添加图片信息
- const handleChange2 = async (file, fileLists) => {
- console.log(file, "1111");
- // fileList.list.push(file);
- upload2File.value = file.raw;
- };
- // 可以获取图片参数
- const handleUpload2 = async (file) => {
- // if (fileList.list.length >= 6) {
- // ElMessage.error("最多可上传6张图片!");
- // return false;
- // }
- console.log(file, "22222222");
- // let data = new FormData();
- // data.set("files", file.file);
- // let res = await axios({
- // method: "post",
- // url: api.value + "/file/cos/upload",
- // headers: {},
- // data: data,
- // });
- // console.log(res, "图片上传成功详情图");
- // if (res.data.code == 1) {
- // // res.data.data.uid = file.file.uid;
- // // console.log([res.data.data]);
- // let arr = {
- // uid: file.file.uid,
- // url: res.data.data,
- // };
- // fileList.list = fileList.list.concat([arr]);
- // ruleForm.fileListJson = fileList.list;
- // }
- };
- // 上传文件时覆盖上一个文件
- const handleExceed2 = (files) => {
- upload2.value.clearFiles();
- const file = files[0];
- file.uid = genFileId();
- upload2.value.handleStart(file);
- };
- // 移出照片
- const handleRemoveImgUpload = (uploadFile, uploadFiles) => {
- // console.log(uploadFile.uid, uploadFiles);
- // fileList.list = fileList.list.filter((item) => {
- // return item.uid != uploadFile.uid;
- // });
- // ruleForm.fileListJson = fileList.list;
- };
- // 点击图片的查看按钮
- const handlePreviewImgUpload = (file) => {
- // imgUrl.value = file.url;
- // imgVisible.value = true;
- console.log(file);
- };
- // 限制上传图片的大小
- const beforeAvatarUploadImgUpload = (rawFile) => {
- // console.log(rawFile.type, "文件类型");
- // console.log(rawFile.type == "image/jpeg",rawFile.type == "image/png");
-
- if (rawFile.type == "image/jpeg" || rawFile.type == "image/png") {
- if (rawFile.size / 1024 / 1024 > 2) {
- ElMessage.error("图片的大小不能超过2MB!");
- return false;
- }
- } else {
- ElMessage.error("文件格式必须为jpg或png格式!");
- return false;
- }
- return true;
- };
- // 添加照片时往fileList列表中添加图片信息
- const handleChangeImgUpload = async (file, fileLists) => {
- // console.log(file, "重新上传图片");
- // fileList.list.push(file);
- uploadImgList.value = "";
- // allImgUpload.value.clearFiles();
- };
- // 可以获取图片参数
- const handleUploadImgUpload = async (file) => {
- // console.log(file, "22222222");
- const cos = new COS({
- SecretId: "AKIDCPVZdcWIxgHpy5FYxVyPiqkZGrhdXUBg",
- SecretKey: "NkyCN3cz97qKaeXLvHOGxOcdS8f184pL",
- SecurityToken: "1306339220",
- Bucket: "wanzai-1306339220",
- Region: "ap-shanghai",
- });
- const files = file.file;
- // console.log(files);
- const compressKey = file.file.name; // 设置上传到 COS 后的文件名
- cos.putObject(
- {
- Bucket: "wanzai-1306339220",
- Region: "ap-shanghai",
- Key: compressKey,
- Body: files,
- onProgress: function (progressData) {
- // console.log(JSON.stringify(progressData));
- },
- },
- function (err, data) {
- if (err) {
- console.error(err);
- } else {
- // console.log(data, "图片获取成功");
- uploadImgList.value =
- uploadImgList.value + "," + "https://" + data.Location;
- // 成功
- }
- }
- );
- };
- // 文件上传成功时的钩子
- const handleSuccessImgUpload = (response, uploadFile, uploadFiles) => {
- // console.log(response,uploadFile,uploadFiles,"上传成功");
- console.log(uploadFiles.length, "上传成功");
- };
- // 重置按钮 重置上传文件
- const resetImport=()=>{
- upload2File.value = "";
- uploadImgList.value = "";
- allImgUpload.value.clearFiles();
- upload2.value.clearFiles();
- }
- // 批量导入按钮
- const bulkImport = async () => {
- allImgShow.value=true;
- if (upload2File.value && uploadImgList.value) {
- } else {
- allImgShow.value=false;
- ElMessage({
- type: "warning",
- showClose: true,
- message: "上传文件或图片不能为空",
- center: true,
- });
- return false;
- }
- // uploadImgList.value = uploadImgList.value.slice(1);
- console.log(uploadImgList.value, "拼接好的图片地址");
- console.log(upload2File.value, "导入的文件");
- const formData = new FormData();
- formData.append("file", upload2File.value);
- formData.append("headImage", uploadImgList.value);
- let res = await axios({
- method: "post",
- url: api.value + "/wanzai/api/smartUser/importExcelUsers",
- headers: {
- // token: sessionStorage.getItem("token"),
- // user_head: sessionStorage.getItem("userhead"),
- },
- data: formData,
- });
- console.log(res, "确定批量导入");
- if (res.data.code == 200) {
- getList();
- upload2File.value = "";
- uploadImgList.value = "";
- allImgUpload.value.clearFiles();
- upload2.value.clearFiles();
- allImgShow.value=false;
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- allImgShow.value=false;
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- // 分页
- const handleAddBatch = (value) => {
- // console.log(value);
- addBatch_currentPage.value = value;
- };
- // 批量删除 (------------------------------------------------------)
- const delBatchClick = () => {
- delBatchShow.value = true;
- homeShow.value = false;
- delRecordShow.value=false
- };
- const delBatchConcel = () => {
- homeShow.value = true;
- delBatchShow.value = false;
- delRecordShow.value=false
- };
- // 移出照片
- const handleRemove3 = (uploadFile, uploadFiles) => {
- // console.log(uploadFile.uid, uploadFiles);
- // fileList.list = fileList.list.filter((item) => {
- // return item.uid != uploadFile.uid;
- // });
- // ruleForm.fileListJson = fileList.list;
- };
- // 点击图片的查看按钮
- const handlePreview3 = (file) => {
- // imgUrl.value = file.url;
- // imgVisible.value = true;
- console.log(file);
- };
- // 限制上传图片的大小
- const beforeAvatarUpload3 = (rawFile) => {
- console.log(rawFile.type, "文件类型");
- if (
- rawFile.type !==
- "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
- ) {
- ElMessage.error("文件格式必须为xlsx格式!");
- return false;
- } else if (rawFile.size / 1024 / 1024 > 100) {
- ElMessage.error("图片的大小不能超过100MB!");
- return false;
- }
- return true;
- };
- // 添加照片时往fileList列表中添加图片信息
- const handleChange3 = async (file, fileLists) => {
- console.log(file, "1111");
- // fileList.list.push(file);
- };
- // 可以获取图片参数
- const handleUpload3 = async (file) => {
- // if (fileList.list.length >= 6) {
- // ElMessage.error("最多可上传6张图片!");
- // return false;
- // }
- console.log(file, "22222222");
- // let data = new FormData();
- // data.set("files", file.file);
- // let res = await axios({
- // method: "post",
- // url: api.value + "/file/cos/upload",
- // headers: {},
- // data: data,
- // });
- // console.log(res, "图片上传成功详情图");
- // if (res.data.code == 1) {
- // // res.data.data.uid = file.file.uid;
- // // console.log([res.data.data]);
- // let arr = {
- // uid: file.file.uid,
- // url: res.data.data,
- // };
- // fileList.list = fileList.list.concat([arr]);
- // ruleForm.fileListJson = fileList.list;
- // }
- };
- // 分页
- const handleDelBatch = (value) => {
- // console.log(value);
- delBatch_currentPage.value = value;
- };
- // 移动成员 (----------------------------------------------------------------)
- // 首页表格多选框功能
- const handleSelectionChange = (val) => {
- console.log(val);
- selectData.list = val;
- };
- // 获取移动成员中的部门信息
- const getMoveData = async () => {
- let data = {
- name: moveSearchInput.value,
- };
- let res = await axios({
- method: "get",
- url: api.value + "/wanzai/api/smartDepartment/queryDepartmentTree",
- headers: {
- // token: sessionStorage.getItem("token"),
- // user_head: sessionStorage.getItem("userhead"),
- },
- params: data,
- });
- console.log(res, "部门树形数据");
- if (res.data.code == 200) {
- moveData.value = JSON.parse(eds.decryptDes(res.data.data));
- // 判断有没有右边有没有勾选好的部门,有就重新给树形图自动勾上
- if (treeSelData.list.length) {
- moveTree.value.setCheckedNodes(treeSelData.list);
- }
- // ElMessage({
- // type: "success",
- // showClose: true,
- // message: res.data.message,
- // center: true,
- // });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- // 打开移动弹窗
- const moveMemberClick = async () => {
- if (selectData.list.length) {
- moveMemberVisible.value = true;
- getMoveData();
- } else {
- ElMessage({
- type: "warning",
- showClose: true,
- message: "请先选择需要移动的用户",
- center: true,
- });
- }
- };
- const cancelMoveMember = () => {
- moveMemberVisible.value = false;
- moveTree.value.setCheckedKeys([]);
- treeSelData.list = [];
- };
- // 移动成员里面勾选的
- const moveCheckChange = (data, checked, indeterminate) => {
- console.log(data, checked, indeterminate, "移动成员勾选");
- if (treeSelData.list.length) {
- if (data.id == treeSelData.list[0].id) {
- treeSelData.list = [];
- }
- }
- if (checked) {
- let arr = {
- id: data.id,
- label: data.name,
- };
- treeSelData.list = [arr];
- // console.log(treeSelData.list);
- moveTree.value.setCheckedKeys([]); // 删除所有选中节点
- moveTree.value.setCheckedNodes([arr]); // 选中已选中节点
- } else {
- console.log("取消勾选");
- }
- };
- // 移动确定勾选
- const confirmMoveMember = async () => {
- let userId = [];
- selectData.list.forEach((i) => {
- userId.push(i.id);
- });
- let data = {
- userIds: userId,
- departmentId: treeSelData.list[0].id,
- };
- let res = await axios({
- method: "post",
- url: api.value + "/wanzai/api/smartUser/changeDepartment",
- headers: {
- // token: sessionStorage.getItem("token"),
- // user_head: sessionStorage.getItem("userhead"),
- },
- data: data,
- });
- console.log(res, "部门树形数据");
- if (res.data.code == 200) {
- moveMemberVisible.value = false;
- getList();
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- // 移动取消勾选
- const cancelTreeSel = (i) => {
- console.log(i);
- moveTree.value.setCheckedKeys([]);
- treeSelData.list = [];
- // treeSelData.list = treeSelData.list.filter((item) => {
- // return item.id != i.id;
- // });
- // let arr = [];
- // treeSelData.list.forEach((item) => {
- // arr.push(item.id);
- // });
- // moveTree.value.setCheckedKeys(arr);
- };
- // 注销账号 (--------------------------------------------------------------------)
- // const closeAccountClick = () => {
- // if (selectData.list.length) {
- // closeAccountVisible.value = true;
- // } else {
- // ElMessage({
- // type: "warning",
- // showClose: true,
- // message: "请先选择需要注销的用户",
- // center: true,
- // });
- // }
- // };
- // const cancelCloseAccount = () => {
- // closeAccountVisible.value = false;
- // };
- // 勾选删除 (--------------------------------------------------------------------)
- const delDelClick = () => {
- if (selectData.list.length) {
- selDelVisible.value = true;
- } else {
- ElMessage({
- type: "warning",
- showClose: true,
- message: "请先选择需要删除的用户",
- center: true,
- });
- }
- };
- // 确定删除
- const confirmSelDel = async () => {
- let userId = [];
- selectData.list.forEach((i) => {
- userId.push(i.id);
- });
- let data = {
- userIds: userId,
- };
- let res = await axios({
- method: "post",
- url: api.value + "/wanzai/api/smartUser/deleteSmartUserById",
- headers: {
- // token: sessionStorage.getItem("token"),
- // user_head: sessionStorage.getItem("userhead"),
- },
- data: data,
- });
- console.log(res, "删除成功");
- if (res.data.code == 200) {
- selDelVisible.value = false;
- if (
- selectData.list.length == tableData.list.length &&
- currentPage.value != 1
- ) {
- currentPage.value = currentPage.value - 1;
- }
- getList();
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- const cancelSelDel = () => {
- selDelVisible.value = false;
- };
- //导出功能
- const importExcel = async () => {
- let data = {
- departmentId: treeNodeId.value,
- name: searchInput.keyWord,
- };
- let res = await axios({
- method: "get",
- url: api.value + "/wanzai/api/smartUser/smartUserExport",
- headers: {
- // token: sessionStorage.getItem("token"),
- // user_head: sessionStorage.getItem("userhead"),
- },
- params: data,
- responseType: "blob",
- });
- console.log(res, "导出用户");
- if (res.status == 200) {
- let name = `用户信息表`;
- var content = res.data;
- var datas = new Blob([content]);
- var downloadUrl = window.URL.createObjectURL(datas);
- var anchor = document.createElement("a");
- anchor.href = downloadUrl;
- anchor.download = name + ".xlsx";
- anchor.click();
- window.URL.revokeObjectURL(datas);
- ElMessage({
- type: "success",
- showClose: true,
- message: "导出成功",
- center: true,
- });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- // 表格斑马纹颜色修改
- const tableRowClassName = ({ row, rowIndex }) => {
- if (rowIndex % 2 === 0) {
- return "even";
- } else if (rowIndex % 2 !== 0) {
- return "odd";
- }
- return "";
- };
- // 分页
- const handleCurrentChange = (value) => {
- // console.log(value);
- currentPage.value = value;
- getList();
- };
- onBeforeMount(async () => {
- api.value = store.state.user.api;
- getDepartment(); // 左边部门树形结构
- classDataList(); // 添加成员中 获取身份数据下拉、年级数据下拉、班级数据下拉
- postList(); // 职务数据
- });
- onUnmounted(() => {
- // document.removeEventListener("keyup", Enters);
- });
- </script>
- <style scoped lang="scss">
- .content-box {
- min-width: 1200px;
- width: calc(100vw - 260px);
- height: calc(100vh - 105px);
- margin: 20px auto;
- // background-color: #fff;
- // color: #fff;
- display: flex;
- align-items: center;
- justify-content: center;
- // box-shadow: 0px 3px 10px rgba(0, 97, 255, 0.2);
- .searchTree {
- width: 220px;
- margin: 20px 12px;
- :deep(.el-input__wrapper) {
- background-color: rgba(230, 230, 230, 1);
- }
- }
- .treeV {
- width: 247px;
- height: 100%;
- overflow: auto;
- margin-right: 20px;
- border-radius: 8px;
- box-shadow: 0px 3px 10px rgba(0, 97, 255, 0.2);
- background-color: #fff;
- :deep(.el-tree-node__content) {
- cursor: auto;
- .custom-tree-node {
- flex: 1;
- display: flex;
- align-items: center;
- justify-content: space-between;
- font-size: 14px;
- padding-right: 8px;
- .title {
- display: flex;
- align-items: center;
- cursor: pointer;
- }
- .nodeClick {
- color: rgb(0, 97, 255);
- }
- img {
- width: 1.2em;
- height: 1.2em;
- margin: 0 5px 0 0;
- }
- }
- }
- }
- // 主页面
- .userRight {
- flex: 1;
- height: 100%;
- border-radius: 8px;
- box-shadow: 0px 3px 10px rgba(0, 97, 255, 0.2);
- background-color: #fff;
- .scorll {
- overflow: auto;
- height: calc(100% - 61px);
- }
- .left {
- // width: calc(100wh - 40px);
- display: flex;
- align-items: center;
- height: 60px;
- padding: 0 30px;
- border-bottom: 1px solid #ccc;
- color: rgb(0, 0, 0);
- font-size: 20px;
- font-weight: 600;
- span:nth-child(2) {
- }
- span:nth-child(3) {
- margin-left: 20px;
- font-size: 14px;
- color: rgba(128, 128, 128, 1);
- }
- }
- .middle {
- width: 96%;
- margin: 0 auto;
- color: #000;
- // border-bottom: 1px solid rgb(231, 231, 231);
- .filter {
- display: flex;
- flex-wrap: wrap;
- align-items: center;
- margin: 10px 0 0 0;
- .search {
- color: #fff;
- }
- .condition {
- display: flex;
- align-items: center;
- margin: 10px 30px 10px 0;
- :deep(.el-input .el-input__inner) {
- font-size: 14px;
- }
- span {
- margin: 0 10px 0 0;
- }
- }
- }
- .gongneng {
- margin: 10px 0 20px 0;
- span {
- color: #fff;
- }
- .el-button {
- margin-right: 10px;
- }
- .el-dropdown {
- margin: 0 10px;
- }
- }
- :deep(.cont) {
- width: 60%;
- margin: 20px auto;
- }
- :deep(.download) {
- display: flex;
- align-items: center;
- margin: 10px;
- }
- :deep(.download span) {
- font-size: 16px;
- margin-left: 20px;
- }
- :deep(.cont .el-button) {
- margin-left: 60px;
- margin-bottom: 30px;
- }
- :deep(.cont .accomplish) {
- width: 100%;
- display: flex;
- justify-content: center;
- }
- :deep(.cont .accomplish .el-button) {
- width: 50%;
- margin: 0;
- }
- }
- .footer {
- width: 96%;
- height: calc(100% - 205px);
- margin: 10px auto 25px;
- min-height: 300px;
- .el-table--fit {
- height: 100% !important;
- :deep(.el-table__header-wrapper) {
- background-color: #000;
- font-size: 14px;
- tr {
- // color: #000;
- }
- }
- :deep(.el-table__row) {
- height: 50px;
- font-size: 14px;
- // color: #000;
- &:hover {
- td {
- background-color: rgba(223, 236, 254, 1);
- }
- }
- }
- :deep(.el-table__row):nth-child(2n) {
- .el-table-fixed-column--right {
- background-color: rgba(240, 243, 247, 1);
- }
- }
- :deep(.el-table__row td) {
- padding: 0;
- border: 0;
- .img {
- display: flex;
- align-items: center;
- justify-content: center;
- margin: 5px 0;
- img {
- width: 60px;
- height: 60px;
- cursor: pointer;
- }
- }
- }
- .el-button--primary {
- margin-left: 5px;
- }
- :deep(.el-table__body .even) {
- background-color: #fff;
- }
- :deep(.el-table__body .odd) {
- background-color: rgba(240, 243, 247, 1);
- }
- :deep(.edit) {
- display: flex;
- align-items: center;
- justify-content: center;
- color: rgba(111, 182, 184, 1);
- }
- :deep(.look) {
- padding: 0 10px;
- cursor: pointer;
- color: rgba(30, 125, 251, 1);
- }
- .del {
- padding: 0 10px;
- color: rgba(212, 48, 48, 1);
- cursor: pointer;
- }
- // :deep(.look):hover {
- // color: red;
- // }
- // :deep(.del):hover {
- // color: red;
- // }
- }
- }
- }
- // 添加成员页面
- .addMember {
- flex: 1;
- height: 100%;
- min-width: 900px;
- // margin-right: 20px;
- border-radius: 8px;
- box-shadow: 0px 3px 10px rgba(0, 97, 255, 0.2);
- .left {
- // width: calc(100wh - 40px);
- display: flex;
- align-items: center;
- height: 60px;
- padding: 0 30px;
- border-bottom: 1px solid #ccc;
- color: rgb(0, 0, 0);
- font-size: 20px;
- font-weight: 600;
- img {
- width: 18px;
- height: 18px;
- cursor: pointer;
- }
- .add {
- margin-left: 20px !important;
- font-size: 20px !important;
- color: rgba(0, 0, 0, 1) !important;
- }
- }
- .title {
- display: flex;
- align-items: center;
- height: 60px;
- color: rgb(0, 0, 0);
- font-size: 20px;
- font-weight: 600;
- img {
- width: 29px;
- height: 20px;
- margin-right: 5px;
- }
- .add {
- margin-left: 20px !important;
- font-size: 20px !important;
- color: rgba(0, 0, 0, 1) !important;
- }
- }
- .content {
- padding: 0 30px;
- height: calc(100% - 61px);
- // margin: 10px 0 0 0;
- .form {
- height: 100%;
- overflow: auto;
- .el-form-item {
- .facePhoto {
- img {
- width: 80px;
- // height:50px;
- }
- }
- :deep(.el-upload-list) {
- display: none;
- }
- }
- .imgUpload {
- margin-top: 5px;
- display: flex;
- .upload-demo {
- margin-right: 10px;
- }
- .img-upload-demo {
- :deep(.el-upload-list) {
- // display: none;
- max-height: 130px;
- overflow: auto;
- // 整个滚动条
- &::-webkit-scrollbar-track {
- background-color: #daeeff;
- }
- // 滚动条的滚动区域(轨道)
- &::-webkit-scrollbar {
- background-color: #0888f8;
- height: 3px;
- width: 4px;
- }
- }
- }
- }
- .startImport {
- .el-button {
- width: 500px;
- height: 42px;
- }
- .downLoad {
- color: rgba(0, 97, 255, 1);
- font-size: 14px;
- margin-left: 15px;
- cursor: pointer;
- }
- }
- .tableTitle {
- font-size: 14px;
- margin-top: 10px;
- }
- .footer {
- width: 99%;
- height: 360px;
- margin: 10px auto 30px;
- .el-table--fit {
- height: 100%;
- :deep(.el-table__header-wrapper) {
- background-color: #000;
- font-size: 14px;
- tr {
- color: #000;
- }
- }
- :deep(.el-table__row) {
- height: 45px;
- font-size: 14px;
- color: #000;
- &:hover {
- td {
- background-color: rgba(223, 236, 254, 1);
- }
- }
- }
- :deep(.el-table__row):nth-child(2n) {
- .el-table-fixed-column--right {
- background-color: rgba(240, 243, 247, 1);
- }
- }
- :deep(.el-table__row td) {
- padding: 0;
- border: 0;
- }
- .el-button--primary {
- margin-left: 5px;
- }
- :deep(.el-table__body .even) {
- background-color: #fff;
- }
- :deep(.el-table__body .odd) {
- background-color: rgba(240, 243, 247, 1);
- }
- :deep(.edit) {
- display: flex;
- align-items: center;
- justify-content: center;
- color: rgba(111, 182, 184, 1);
- }
- :deep(.look) {
- padding: 0 10px;
- cursor: pointer;
- color: rgba(30, 125, 251, 1);
- }
- .del {
- padding: 0 10px;
- color: rgba(212, 48, 48, 1);
- cursor: pointer;
- }
- // :deep(.look):hover {
- // color: red;
- // }
- // :deep(.del):hover {
- // color: red;
- // }
- }
- .pageSize {
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin: 20px 30px 0;
- span {
- color: #000;
- }
- .el-pagination {
- // width: 1600px;
- :deep(.el-pagination__total) {
- color: #000;
- }
- :deep(.el-pagination__goto) {
- color: #000;
- }
- :deep(.el-pagination__classifier) {
- color: #000;
- }
- :deep(.el-input__wrapper) {
- border: 1px solid rgba(0, 0, 0, 1);
- border-radius: 5px;
- box-shadow: none;
- }
- :deep(.el-pager li) {
- margin: 0 5px;
- border: 1px solid rgba(0, 0, 0, 1);
- border-radius: 5px;
- background-color: transparent;
- }
- :deep(.el-pager li.is-active) {
- // background-color: rgba(0, 97, 255, 0.8);
- border: 1px solid rgba(0, 97, 255, 1);
- color: rgba(0, 97, 255, 1);
- }
- :deep(.btn-prev) {
- margin-right: 5px;
- border: 1px solid rgba(0, 0, 0, 1);
- border-radius: 5px;
- background-color: transparent;
- }
- :deep(.btn-next) {
- margin-left: 5px;
- border: 1px solid rgba(0, 0, 0, 1);
- border-radius: 5px;
- background-color: transparent;
- }
- }
- }
- }
- }
- // 整个滚动条
- .form::-webkit-scrollbar-track {
- background-color: #daeeff;
- }
- // 滚动条的滚动区域(轨道)
- .form::-webkit-scrollbar {
- background-color: #0888f8;
- height: 3px;
- width: 4px;
- }
- // 滚动条的可拖拽部分(滑块)
- // .form::-webkit-scrollbar-thumb {
- // background: #57b2ff;
- // border-radius: 4px;
- // height: 3px;
- // width: 4px;
- // }
- }
- }
- // 删除记录页面
- .delRecord {
- flex: 1;
- height: 100%;
- border-radius: 8px;
- box-shadow: 0px 3px 10px rgba(0, 97, 255, 0.2);
- background-color: #fff;
- .scorll {
- overflow: auto;
- height: calc(100% - 61px);
- }
- .left {
- // width: calc(100wh - 40px);
- display: flex;
- align-items: center;
- height: 60px;
- padding: 0 30px;
- border-bottom: 1px solid #ccc;
- color: rgb(0, 0, 0);
- font-size: 20px;
- font-weight: 600;
- img{
- width: 18px;
- height: 18px;
- }
- .add{
- margin-left: 20px;
- }
- }
- .middle {
- width: 96%;
- margin: 0 auto;
- color: #000;
- }
-
- .footer {
- width: 96%;
- height: calc(100% - 100px);
- margin: 15px auto 25px;
- min-height: 300px;
- .el-table--fit {
- height: 100% !important;
- :deep(.el-table__header-wrapper) {
- background-color: #000;
- font-size: 14px;
- tr {
- // color: #000;
- }
- }
- :deep(.el-table__row) {
- height: 50px;
- font-size: 14px;
- // color: #000;
- &:hover {
- td {
- background-color: rgba(223, 236, 254, 1);
- }
- }
- }
- :deep(.el-table__row):nth-child(2n) {
- .el-table-fixed-column--right {
- background-color: rgba(240, 243, 247, 1);
- }
- }
- :deep(.el-table__row td) {
- padding: 0;
- border: 0;
- .img {
- display: flex;
- align-items: center;
- justify-content: center;
- margin: 5px 0;
- img {
- width: 60px;
- height: 60px;
- cursor: pointer;
- }
- }
- }
- .el-button--primary {
- margin-left: 5px;
- }
- :deep(.el-table__body .even) {
- background-color: #fff;
- }
- :deep(.el-table__body .odd) {
- background-color: rgba(240, 243, 247, 1);
- }
- :deep(.edit) {
- display: flex;
- align-items: center;
- justify-content: center;
- color: rgba(111, 182, 184, 1);
- }
- :deep(.look) {
- padding: 0 10px;
- cursor: pointer;
- color: rgba(30, 125, 251, 1);
- }
- .del {
- padding: 0 10px;
- color: rgba(212, 48, 48, 1);
- cursor: pointer;
- }
- // :deep(.look):hover {
- // color: red;
- // }
- // :deep(.del):hover {
- // color: red;
- // }
- }
- }
- }
- .bgImg {
- position: absolute;
- left: 0;
- top: 0;
- z-index: 99999999;
- width: 100%;
- height: 100%;
- background-color: rgba(255, 255, 255, 0.8);
- // border-radius: 50px;
- :deep(.el-carousel__container) {
- width: 100%;
- height: calc(100vh);
- .el-carousel__item {
- display: flex;
- justify-content: center;
- img {
- height: 100%;
- }
- }
- }
- }
- // 修改部门
- :deep(.amendBMDialog) {
- // height: 600px;
- overflow: hidden;
- border-radius: 11px;
- .el-dialog__header {
- border-radius: 11px 11px 0 0;
- background: rgba(245, 249, 255, 1);
- font-weight: 600;
- height: 60px;
- padding: 0 20px;
- line-height: 60px;
- margin: 0;
- border-bottom: 1px solid rgba(230, 230, 230, 1);
- .el-dialog__headerbtn {
- outline: none;
- }
- }
- .el-dialog__body {
- padding: 0px 20px 20px 20px;
- // height: 200px;
- // display: flex;
- // flex-direction: column-reverse;
- .el-form-item {
- margin: 40px 0;
- }
- .option {
- display: flex;
- flex-direction: row-reverse;
- align-items: center;
- margin: 10px 0;
- .queding {
- margin-left: 20px;
- }
- }
- }
- }
- // 移动成员
- :deep(.moveMemberDialog) {
- // height: 600px;
- overflow: hidden;
- border-radius: 11px;
- .el-dialog__header {
- border-radius: 11px 11px 0 0;
- background: rgba(245, 249, 255, 1);
- font-weight: 600;
- height: 60px;
- padding: 0 20px;
- line-height: 60px;
- margin: 0;
- border-bottom: 1px solid rgba(230, 230, 230, 1);
- .el-dialog__headerbtn {
- outline: none;
- }
- }
- .el-dialog__body {
- padding: 0px 20px 20px 20px;
- height: 550px;
- // display: flex;
- // flex-direction: column-reverse;
- .move {
- display: flex;
- .moveLeft {
- width: 280px;
- height: 96%;
- margin-right: 20px;
- border-radius: 8px;
- // box-shadow: 0px 3px 10px rgba(0, 97, 255, 0.2);
- .el-tree {
- height: 430px;
- // border: 1px solid red;
- overflow: auto;
- }
- .el-tree-node__content {
- .custom-tree-node {
- flex: 1;
- display: flex;
- align-items: center;
- justify-content: space-between;
- font-size: 14px;
- padding-right: 8px;
- .title {
- display: flex;
- align-items: center;
- }
- img {
- width: 1.2em;
- height: 1.2em;
- margin: 0 5px 0 0;
- }
- }
- }
- }
- .moveRight {
- margin: 20px 0 0 0;
- flex: 1;
- .sel {
- margin-bottom: 10px;
- }
- ul {
- // width: 316px;
- height: 95%;
- list-style: none;
- padding: 0;
- margin: 0;
- border-left: 1px solid rgba(230, 230, 230, 1);
- box-sizing: border-box;
- overflow: auto;
- li {
- display: flex;
- justify-content: space-between;
- padding-right: 17px;
- align-items: center;
- margin-top: 5px;
- .el-icon-close {
- cursor: pointer;
- width: 10px;
- height: 10px;
- }
- }
- }
- }
- }
- .options {
- margin: 15px 0;
- display: flex;
- flex-direction: row-reverse;
- .queding {
- margin-left: 20px;
- }
- }
- .option {
- display: flex;
- flex-direction: row-reverse;
- align-items: center;
- margin: 10px 0;
- .queding {
- margin-left: 20px;
- }
- }
- }
- }
- // 注销账号
- :deep(.closeAccount) {
- // height: 600px;
- overflow: hidden;
- border-radius: 11px;
- .el-dialog__header {
- border-radius: 11px 11px 0 0;
- background: rgba(245, 249, 255, 1);
- font-weight: 600;
- height: 60px;
- padding: 0 20px;
- line-height: 60px;
- margin: 0;
- border-bottom: 1px solid rgba(230, 230, 230, 1);
- .el-dialog__headerbtn {
- outline: none;
- }
- }
- .el-dialog__body {
- padding: 0px 20px 20px 20px;
- // height: 200px;
- // display: flex;
- // flex-direction: column-reverse;
- .content {
- height: 80px;
- font-size: 16px;
- padding: 20px 30px;
- display: flex;
- img {
- width: 25px;
- height: 25px;
- margin: 0 8px 0 0;
- }
- }
- .option {
- display: flex;
- flex-direction: row-reverse;
- align-items: center;
- margin: 10px 0;
- .queding {
- margin-left: 20px;
- }
- }
- }
- }
- .pageSize {
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin: 0 30px;
- span {
- color: #000;
- }
- .el-pagination {
- // width: 1600px;
- :deep(.el-pagination__total) {
- color: #000;
- }
- :deep(.el-pagination__goto) {
- color: #000;
- }
- :deep(.el-pagination__classifier) {
- color: #000;
- }
- :deep(.el-input__wrapper) {
- border: 1px solid rgba(0, 0, 0, 1);
- border-radius: 5px;
- box-shadow: none;
- }
- :deep(.el-pager li) {
- margin: 0 5px;
- border: 1px solid rgba(0, 0, 0, 1);
- border-radius: 5px;
- background-color: transparent;
- }
- :deep(.el-pager li.is-active) {
- // background-color: rgba(0, 97, 255, 0.8);
- border: 1px solid rgba(0, 97, 255, 1);
- color: rgba(0, 97, 255, 1);
- }
- :deep(.btn-prev) {
- margin-right: 5px;
- border: 1px solid rgba(0, 0, 0, 1);
- border-radius: 5px;
- background-color: transparent;
- }
- :deep(.btn-next) {
- margin-left: 5px;
- border: 1px solid rgba(0, 0, 0, 1);
- border-radius: 5px;
- background-color: transparent;
- }
- }
- }
- }
- .el-input {
- width: 192px;
- }
- </style>
- <style lang="scss">
- //添加成员 联系人下拉框样式
- .more-tag-data {
- // border: 1px solid red;
- .el-select-dropdown__wrap {
- height: 200px;
- }
- }
- </style>
|