| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504 |
- <template>
- <div class="content-box">
- <div class="treeV">
- <el-input
- v-model="searchInput.keyWord"
- :clearable="true"
- @clear="searchBtn"
- 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">
- <img src="@/assets/images/folder.png" alt="" />
- <!-- <img src="@/assets/images/document.png" alt="" /> -->
- <span>{{ node.label }}</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>/ 共有56622人</span>
- </div>
- <div>
- <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)" @click="addClick" 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-button
- type="primary"
- color="rgba(0, 97, 255, 1)"
- @click="addClick"
- 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="userName" label="姓名" />
- <el-table-column align="center" prop="position" label="学号" />
- <el-table-column align="center" prop="img" label="人脸照片">
- <template #default="{ row }">
- <div class="img">
- <img @click="imgClick(row)" :src="row.img" 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">添加成员</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
- 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"
- multiple
- placeholder="请选择身份"
- style="width: 500px"
- >
- <el-option label="教职工" value="1" />
- <el-option label="学生" value="2" />
- <el-option label="门卫" value="3" />
- <el-option label="领导" value="4" />
- </el-select>
- </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.radio">
- <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-select
- v-model="addMemberRuleForm.department"
- multiple
- placeholder="请选择部门"
- style="width: 500px"
- >
- <el-option label="教职工" value="1" />
- <el-option label="学生" value="2" />
- <el-option label="门卫" value="3" />
- <el-option label="领导" value="4" />
- </el-select>
- </el-form-item>
- <el-form-item label="人脸照片 :" prop="facePhoto">
- <div class="facePhoto">
- <div v-if="addMemberRuleForm.facePhoto">
- <img :src="addMemberRuleForm.facePhoto" alt="facePhotoImg" />
- </div>
- <el-upload
- class="avatar-uploader"
- action="#"
- :on-preview="handlePreview"
- :on-remove="handleRemove"
- :on-change="handleChange"
- :http-request="handleUpload"
- :before-upload="beforeAvatarUpload"
- >
- <template #trigger>
- <el-button :icon="Camera">上传图片</el-button>
- </template>
- <template #tip>
- <div class="el-upload__tip">
- 支持扩展名:.jpg .png,五官清晰无遮挡,名字+后缀
- </div>
- </template>
- </el-upload>
- </div>
- </el-form-item>
- <el-form-item label="年级 :" prop="grade">
- <el-select
- v-model="addMemberRuleForm.grade"
- multiple
- placeholder="请选择年级"
- style="width: 500px"
- >
- <el-option label="七年级" value="1" />
- </el-select>
- </el-form-item>
- <el-form-item label="学院 :" prop="institute">
- <el-select
- v-model="addMemberRuleForm.institute"
- multiple
- placeholder="请选择学院"
- style="width: 500px"
- >
- <el-option label="万载三中" value="1" />
- </el-select>
- </el-form-item>
- <el-form-item label="专业 :" prop="specialty">
- <el-select
- v-model="addMemberRuleForm.specialty"
- multiple
- placeholder="请选择专业"
- style="width: 500px"
- >
- <el-option label="计算机" value="1" />
- </el-select>
- </el-form-item>
- <el-form-item label="班级 :" prop="class">
- <el-select
- v-model="addMemberRuleForm.class"
- multiple
- placeholder="请选择班级"
- style="width: 500px"
- >
- <el-option label="(1)班" value="1" />
- </el-select>
- </el-form-item>
- <el-form-item label="校区 :" prop="school">
- <el-select
- v-model="addMemberRuleForm.school"
- multiple
- placeholder="请选择校区"
- style="width: 500px"
- >
- <el-option label="靖安校区" value="1" />
- </el-select>
- </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 label="手机号 :" prop="phone">
- <el-input
- v-model="addMemberRuleForm.phone"
- placeholder="请输入手机号"
- clearable
- style="width: 500px"
- />
- </el-form-item>
- <el-form-item label="联系人 :" prop="contact">
- <el-select
- v-model="addMemberRuleForm.contact"
- multiple
- placeholder="请选择联系人"
- style="width: 500px"
- >
- <el-option
- v-for="item in options"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- />
- </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 label="职务 :" prop="duty">
- <el-input
- v-model="addMemberRuleForm.duty"
- 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="confirmEdit(editRef)"
- >
- 确认
- </el-button>
- <el-button @click="cancelEdit(editRef)">取消</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">
- <el-upload
- style="width: 500px"
- class="upload-demo"
- drag
- action="#"
- multiple
- :on-preview="handlePreview2"
- :on-remove="handleRemove2"
- :on-change="handleChange2"
- :http-request="handleUpload2"
- :before-upload="beforeAvatarUpload2"
- >
- <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="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 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="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="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="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="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="searchBtn"
- 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="dataSource"
- 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>{{ node.label }}</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 { useRouter } from "vue-router";
- import { ElMessage, ElMessageBox } from "element-plus";
- import { Camera } from "@element-plus/icons-vue";
- import { dayjs } from "element-plus";
- import lodash from "lodash";
- import axios from "axios";
- 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: "二食堂",
- },
- ],
- },
- ],
- },
- ]);
- // 主页面数据(----------------------------------------------)
- // 表格数据
- 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",
- },
- {
- 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",
- },
- {
- 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",
- },
- {
- 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",
- },
- {
- 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",
- },
- {
- 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",
- },
- {
- 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: "",
- createTime: "",
- }); // 搜索按钮数据
- const homeShow = ref(true);
- const currentPage = ref(1); // 当前页
- const pageSize = ref(10);
- const total = ref(8); // 当前总数
- // 修改部门 (----------------------------------------------)
- const amendBMVisible = ref(false);
- const amendBMRef = ref();
- const amendBMRuleForm = reactive({
- department: "", // 部门
- id: "",
- });
- // 表单验证
- 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 addMemberRef = ref();
- const addMemberRuleForm = reactive({
- serialNumber: "", // 编号
- name: "", // 姓名
- identity: "", // 身份
- icCard: "", // 身份证号
- sex: "", // 性别
- department: "", // 部门
- facePhoto: "", // 人脸照片
- grade: "", // 年级
- institute: "", // 学院
- specialty: "", // 专业
- class: "", // 班级
- school: "", // 校区
- dormitory: "", // 宿舍号
- phone: "", // 手机号
- contact: "", // 联系人
- // 其他信息
- jobName: "", // 职称
- houseAddress: "", // 家庭地址
- nation: "", // 民族
- originOfStudent: "", // 生源地
- graduateCollege: "", // 毕业学院
- duty: "", // 职务
- id: "",
- });
- // 表单验证
- const addMemberRules = reactive({
- serialNumber: [{ required: true, message: "编号不能为空", trigger: "blur" }],
- name: [{ required: true, message: "姓名不能为空", trigger: "blur" }],
- identity: [{ required: true, message: "身份不能为空", trigger: "blur" }],
- icCard: [{ required: true, message: "身份证号不能为空", trigger: "blur" }],
- sex: [{ required: true, message: "性别不能为空", trigger: "blur" }],
- department: [{ required: true, message: "部门不能为空", trigger: "blur" }],
- facePhoto: [{ required: true, message: "人脸照片不能为空", trigger: "blur" }],
- grade: [{ required: true, message: "年级不能为空", trigger: "blur" }],
- institute: [{ required: true, message: "学院不能为空", trigger: "blur" }],
- specialty: [{ required: true, message: "专业不能为空", trigger: "blur" }],
- class: [{ required: true, message: "班级不能为空", trigger: "blur" }],
- school: [{ required: true, message: "校区不能为空", trigger: "blur" }],
- dormitory: [{ required: true, message: "宿舍号不能为空", trigger: "blur" }],
- phone: [{ required: true, message: "手机号不能为空", 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" }],
- });
- // 批量添加 (-----------------------------------------)
- 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 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 selectData = reactive({ list: [] });
- const moveMemberVisible = ref(false);
- const moveTree = ref();
- const moveSearchInput = ref();
- const treeSelData = reactive({ list: [] });
- // 注销账号
- const closeAccountVisible = ref(false);
- // 勾选删除
- const selDelVisible = ref(false);
- // 查看表格图片 (----------------------------------------------)
- const bgImg = ref(false);
- const showImg = ref();
- const imgClick = (row) => {
- bgImg.value = true;
- showImg.value = row.img;
- };
- // 查看房型列表
- const getList = async () => {
- // loading.value = true;
- // let data = {
- // page: currentPage.value,
- // rows: pageSize.value,
- // hName: searchInput.keyWord, // 房型名称
- // managerId: sessionStorage.getItem("token"),
- // };
- // let res = await axios({
- // method: "post",
- // url: api.value + "/mhotel/housequeryPage.action",
- // headers: {
- // // token: sessionStorage.getItem("token"),
- // // user_head: sessionStorage.getItem("userhead"),
- // },
- // params: data,
- // });
- // console.log(res, "房型管理");
- // if (res.data.code == 200) {
- // loading.value = false;
- // tableData.list = res.data.data.pageList;
- // total.value = res.data.data.total;
- // // 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 searchBtn = lodash.debounce(async () => {
- getList();
- }, 300);
- // 修改部门(------------------------------------------------)
- const amendBMClick = (node, data) => {
- amendBMRuleForm.department = data.label;
- amendBMVisible.value = true;
- console.log(node, data, "修改部门");
- };
- const confirmAmendBM = async (formEl) => {
- if (!formEl) return;
- await formEl.validate((valid, fields) => {
- if (valid) {
- console.log("submit!");
- } else {
- console.log("error submit!", fields);
- }
- });
- };
- const cancelAmendBM = () => {
- amendBMVisible.value = false;
- };
- // 新建子部门(------------------------------------------------)
- const addBMClick = (node, data) => {
- addBMVisible.value = true;
- console.log(node, data, "修改部门");
- };
- 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 addMemberClick = () => {
- homeShow.value = false;
- addMemberShow.value = true;
- };
- const addMemberConcel = () => {
- addMemberShow.value = false;
- homeShow.value = true;
- };
- // 移出照片
- const handleRemove = (uploadFile, uploadFiles) => {
- console.log(uploadFile.uid, uploadFiles);
- // fileList.list = fileList.list.filter((item) => {
- // return item.uid != uploadFile.uid;
- // });
- // ruleForm.fileListJson = fileList.list;
- };
- // 点击图片的查看按钮
- 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 / 1024 > 10) {
- ElMessage.error("图片的大小不能超过10MB!");
- return false;
- }
- return true;
- };
- // 添加照片时往fileList列表中添加图片信息
- const handleChange = async (file, fileLists) => {
- console.log(file, "1111");
- // fileList.list.push(file);
- };
- // 可以获取图片参数
- const handleUpload = async (file) => {
- // if (fileList.list.length >= 6) {
- // ElMessage.error("最多可上传6张图片!");
- // return false;
- // }
- console.log(file, "22222222");
- addMemberRuleForm.facePhoto = file.file;
- // 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 confirmEdit = (formEl) => {
- if (!formEl) return;
- formEl.validate(async (valid, fields) => {
- if (valid) {
- }
- });
- };
- // 批量添加 (------------------------------------------------------)
- const addBatchClick = () => {
- addBatchShow.value = true;
- homeShow.value = false;
- };
- const addBatchConcel = () => {
- homeShow.value = true;
- addBatchShow.value = false;
- };
- // 移出照片
- const handleRemove2 = (uploadFile, uploadFiles) => {
- // console.log(uploadFile.uid, uploadFiles);
- // fileList.list = fileList.list.filter((item) => {
- // return item.uid != uploadFile.uid;
- // });
- // ruleForm.fileListJson = fileList.list;
- };
- // 点击图片的查看按钮
- 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);
- };
- // 可以获取图片参数
- 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 handleAddBatch = (value) => {
- // console.log(value);
- addBatch_currentPage.value = value;
- };
- // 批量删除 (------------------------------------------------------)
- const delBatchClick = () => {
- delBatchShow.value = true;
- homeShow.value = false;
- };
- const delBatchConcel = () => {
- homeShow.value = true;
- delBatchShow.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 moveMemberClick = () => {
- if (selectData.list.length) {
- moveMemberVisible.value = true;
- } 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, "移动成员勾选");
- // console.log(moveTree.value.getCheckedKeys());
- if (checked) {
- let arr = {
- id: data.id,
- label: data.label,
- };
- treeSelData.list.push(arr);
- console.log(treeSelData.list);
- }
- };
- // 移动取消勾选
- const cancelTreeSel = (i) => {
- console.log(i);
- 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 cancelSelDel = () => {
- selDelVisible.value = false;
- };
- //导出功能
- // const importExcel = async () => {
- // if (searchInput.createTime == null) {
- // searchInput.createTime = "";
- // }
- // let data = new FormData();
- // data.set("car_number", searchInput.carnumber);
- // data.set("create_time", searchInput.createTime);
- // let res = await axios({
- // method: "post",
- // url: api.value + "/carBook/cinfotoExcel.action",
- // headers: {
- // token: sessionStorage.getItem("token"),
- // },
- // data: data,
- // });
- // // console.log(res, "导出账号");
- // if (res.data.code == 200) {
- // // const elt = document.createElement("a");
- // // elt.setAttribute(
- // // "href",
- // // "https://chtech.ncjti.edu.cn/carstop" + res.data.downurl
- // // );
- // // elt.setAttribute("download", "file.png");
- // // elt.style.display = "none";
- // // document.body.appendChild(elt);
- // // elt.click();
- // var downloadPath = "https://chtech.ncjti.edu.cn/carstop" + res.data.downurl;
- // console.log("获得地址数据:", 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 {
- // 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;
- getList();
- });
- onUnmounted(() => {
- // document.removeEventListener("keyup", Enters);
- });
- </script>
- <style scoped lang="scss">
- .content-box {
- width: 100%;
- height: calc(100vh - 65px);
- // 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: 96%;
- margin-right: 20px;
- border-radius: 8px;
- box-shadow: 0px 3px 10px rgba(0, 97, 255, 0.2);
- .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;
- }
- }
- }
- }
- // 主页面
- .userRight {
- flex: 1;
- height: 96%;
- 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;
- span:nth-child(2) {
- 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: 550px;
- 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: 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: 96%;
- 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;
- }
- }
- .content {
- padding: 0 30px;
- height: calc(100% - 71px);
- margin: 10px 0 0 0;
- .form {
- height: 98%;
- overflow: auto;
- .startImport {
- .el-button {
- width: 500px;
- height: 45px;
- }
- .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;
- // }
- }
- }
- .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>
|