indexOne.vue 53 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517
  1. <!--教职工管理(针对空军四医大项目 去除了检查者相关字段)-->
  2. <template>
  3. <div class="app-container teacher">
  4. <div v-if="pageType == 1" class="teacher-one-box">
  5. <div class="top-max-box">
  6. <div class="left-max-box ">
  7. <div class="top-button-max-box">
  8. <el-tooltip class="item" effect="dark" content="新增下级部门" placement="top">
  9. <div class="new-button-box" @click="treeButtonClick(1)" v-hasPermi="['system:dept:add']"></div><!--新增-->
  10. </el-tooltip>
  11. <el-tooltip class="item" effect="dark" content="向上移动" placement="top">
  12. <div class="superior-button-box" @click="treeButtonClick(2)" v-hasPermi="['system:dept:edit']"></div><!--上调-->
  13. </el-tooltip>
  14. <el-tooltip class="item" effect="dark" content="向下移动" placement="top">
  15. <div class="down-button-box" @click="treeButtonClick(3)" v-hasPermi="['system:dept:edit']"></div><!--下调-->
  16. </el-tooltip>
  17. <el-tooltip class="item" effect="dark" content="修改" placement="top">
  18. <div class="edit-button-box" @click="treeButtonClick(4)" v-hasPermi="['system:dept:edit']"></div><!--编辑-->
  19. </el-tooltip>
  20. <el-tooltip class="item" effect="dark" content="添加部门人员" placement="top">
  21. <div class="add-button-box" @click="treeButtonClick(5)" v-hasPermi="['system:user_teacher:edit']"></div><!--人员添加-->
  22. </el-tooltip>
  23. <el-tooltip class="item" effect="dark" content="删除" placement="top">
  24. <div class="delete-button-box" @click="treeButtonClick(6)" v-hasPermi="['system:dept:remove']"></div><!--删除-->
  25. </el-tooltip>
  26. </div>
  27. <div class="left-input-box">
  28. <el-input
  29. class="input-left"
  30. maxlength="10"
  31. v-model="inputDeptName"
  32. placeholder="请输入名称"
  33. clearable
  34. size="small"
  35. />
  36. <!--@clear="getTreeselect"-->
  37. <p class="button-right add-button-two-90" @click="getTreeselect">搜索</p>
  38. </div>
  39. <div class="bottom-button-max-box scrollbar-box">
  40. <el-tree
  41. style="margin-right:20px;"
  42. highlight-current
  43. :data="deptOptions"
  44. :props="defaultProps"
  45. icon-class=""
  46. :expand-on-click-node="false"
  47. :filter-node-method="filterNode"
  48. ref="tree"
  49. default-expand-all
  50. @node-click="handleNodeClick"
  51. />
  52. </div>
  53. </div>
  54. <div class="center-max-box"></div>
  55. <div class="right-max-box">
  56. <el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true" v-show="showSearch">
  57. <!--v-hasPermi="['laboratory:plan:add']"-->
  58. <el-form-item label="关键字" prop="searchValue" label-width="60px">
  59. <el-input
  60. maxLength="20"
  61. v-model="queryParams.searchValue"
  62. placeholder="姓名/工号/手机号码"
  63. clearable
  64. style="width: 180px"
  65. />
  66. </el-form-item>
  67. <el-form-item label="身份" prop="position" label-width="50px">
  68. <el-select
  69. v-model="queryParams.position"
  70. placeholder="请选择"
  71. clearable
  72. size="small"
  73. style="width: 100px"
  74. >
  75. <el-option
  76. v-for="dict in postionList"
  77. :key="dict.postId"
  78. :label="dict.postName"
  79. :value="dict.postId"
  80. />
  81. </el-select>
  82. </el-form-item>
  83. <el-form-item label="状态" prop="nature" label-width="50px">
  84. <el-select
  85. v-model="queryParams.nature"
  86. placeholder="请选择"
  87. clearable
  88. size="small"
  89. style="width: 100px"
  90. >
  91. <el-option
  92. v-for="dict in workClass"
  93. :key="dict.dictValue"
  94. :label="dict.dictLabel"
  95. :value="dict.dictValue"
  96. />
  97. </el-select>
  98. </el-form-item>
  99. <!--<el-form-item label="检查者" prop="isCheck" label-width="60px">-->
  100. <!--<el-select-->
  101. <!--v-model="queryParams.isCheck"-->
  102. <!--placeholder="请选择"-->
  103. <!--clearable-->
  104. <!--size="small"-->
  105. <!--style="width: 240px"-->
  106. <!--&gt;-->
  107. <!--<el-option-->
  108. <!--v-for="dict in userTypeList"-->
  109. <!--:key="dict.id"-->
  110. <!--:label="dict.name"-->
  111. <!--:value="dict.id"-->
  112. <!--/>-->
  113. <!--</el-select>-->
  114. <!--</el-form-item>-->
  115. <el-form-item>
  116. <el-dropdown @command="importButton" v-hasPermi="['system:user_teacher:import']">
  117. <div class="form-dropdown-box">
  118. <img src="@/assets/ZDimages/personnelManagement/icon_jzgxx_dr.png">
  119. <p>导入</p>
  120. <img src="@/assets/ZDimages/personnelManagement/icon_jzggl_xljt.png">
  121. </div>
  122. <el-dropdown-menu slot="dropdown">
  123. <el-dropdown-item style="border-bottom:1px solid #E0E0E0;margin:0 10px;color:#333;" :command="{command:1}" v-hasPermi="['system:user_teacher:exceltemplate']">下载模板</el-dropdown-item>
  124. <el-dropdown-item style="margin:0 10px;color:#666;" :command="{command:2}">导入数据</el-dropdown-item>
  125. </el-dropdown-menu>
  126. </el-dropdown>
  127. </el-form-item>
  128. <el-form-item>
  129. <el-dropdown @command="exportButton" v-hasPermi="['system:user_teacher:export']">
  130. <div class="form-dropdown-box">
  131. <img src="@/assets/ZDimages/personnelManagement/icon_jzgxx_sc.png">
  132. <p>导出</p>
  133. <img src="@/assets/ZDimages/personnelManagement/icon_jzggl_xljt.png">
  134. </div>
  135. <el-dropdown-menu slot="dropdown">
  136. <el-dropdown-item style="border-bottom:1px solid #E0E0E0;margin:0 10px;color:#333;" :command="{command:1}">导出全部数据</el-dropdown-item>
  137. <el-dropdown-item style="margin:0 10px;color:#666;" :command="{command:2}">导出选中数据</el-dropdown-item>
  138. </el-dropdown-menu>
  139. </el-dropdown>
  140. </el-form-item>
  141. <el-form-item style="float: right;">
  142. <el-col :span="1.5" v-hasPermi="['system:user_teacher:add']">
  143. <p class="add-button-one-90"
  144. @click="addButton"
  145. ><i class="el-icon-plus"></i>新增</p>
  146. </el-col>
  147. </el-form-item>
  148. <el-form-item>
  149. <p class="inquire-button-one" @click="handleQuery">查询</p>
  150. <p class="reset-button-one" @click="resetQuery">重置</p>
  151. </el-form-item>
  152. </el-form>
  153. <div class="min-list-box">
  154. <el-table :data="userList" border @selection-change="handleSelectionChange" ref="multipleTable" :row-key="getRowKeys">
  155. <el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
  156. <el-table-column label="序号" width="50" align="center" type="index"/>
  157. <el-table-column label="姓名" align="left" prop="nickName" width="100" show-overflow-tooltip>
  158. </el-table-column>
  159. <el-table-column label="工号" align="left" prop="userName" width="180">
  160. <template slot-scope="scope">
  161. <div style="display: flex">
  162. <el-tooltip class="item" effect="dark" :disabled="scope.row.userName.length>7?false:true" :content="scope.row.userName" placement="top">
  163. <span style="height:23px;width:80px;margin-right:10px;overflow:hidden">
  164. {{scope.row.userName.length>7?scope.row.userName[0]+scope.row.userName[1]+scope.row.userName[2]+scope.row.userName[3]+scope.row.userName[4]+scope.row.userName[5]+scope.row.userName[6]+'...':scope.row.userName}}
  165. </span>
  166. </el-tooltip>
  167. <el-switch
  168. v-if="scope.row.nature==0"
  169. @click.native="statusCaptcha(scope.row)"
  170. class="switch captcha-img"
  171. active-value="0"
  172. inactive-value="1"
  173. active-color="#0183FA"
  174. inactive-color="#999"
  175. v-model="scope.row.status"
  176. active-text="启用"
  177. inactive-text="停用"
  178. disabled
  179. ></el-switch>
  180. </div>
  181. </template>
  182. </el-table-column>
  183. <el-table-column label="手机号码" align="left" prop="phonenumber" width="130" show-overflow-tooltip/>
  184. <el-table-column label="所在部门" align="left" prop="deptName" width="110" show-overflow-tooltip/>
  185. <el-table-column label="身份" align="left" prop="positionName" width="110" show-overflow-tooltip/>
  186. <el-table-column label="创建时间" align="left" prop="createTimeStr" show-overflow-tooltip/>
  187. <el-table-column label="在职状态" align="left" prop="userName" width="100">
  188. <template slot-scope="scope">
  189. <p style="width:64px;margin:0 auto;">
  190. <el-switch
  191. @click.native="natureCaptcha(scope.row)"
  192. class="switch captcha-img"
  193. active-value="0"
  194. inactive-value="1"
  195. active-color="#29B24D"
  196. inactive-color="#999"
  197. v-model="scope.row.nature"
  198. active-text="在职"
  199. inactive-text="离职"
  200. disabled
  201. ></el-switch>
  202. </p>
  203. </template>
  204. </el-table-column>
  205. <!--<el-table-column label="检查者" align="center" prop="isCheck" width="70" show-overflow-tooltip>-->
  206. <!--<template slot-scope="scope">-->
  207. <!--<span>{{scope.row.isCheck == 0?'否':(scope.row.isCheck == 1?'是':'')}}</span>-->
  208. <!--</template>-->
  209. <!--</el-table-column>-->
  210. <el-table-column label="操作" align="left" width="160" class-name="small-padding fixed-width" v-if="tableButtonType">
  211. <template slot-scope="scope">
  212. <div class="button-box">
  213. <p class="table-min-button"
  214. style="margin-left:20px;"
  215. v-hasPermi="['system:user_teacher:query']"
  216. @click="infoButton(scope.row)"
  217. >详情</p>
  218. <el-dropdown @command="moreClick" v-hasPermi="['system:user_teacher:query','system:user_teacher:edit','system:user_teacher:remove','system:user_teacher:resetpwd']">
  219. <p class="table-min-button">更多>></p>
  220. <el-dropdown-menu slot="dropdown">
  221. <el-dropdown-item style="border-bottom:1px solid #E0E0E0;margin:0 10px;" :command="{row:scope.row,command:1}"
  222. v-hasPermiAnd="['system:user_teacher:query','system:user_teacher:edit']">编辑</el-dropdown-item>
  223. <el-dropdown-item style="border-bottom:1px solid #E0E0E0;margin:0 10px;" :command="{row:scope.row,command:2}"
  224. v-hasPermi="['system:user_teacher:remove']">删除</el-dropdown-item>
  225. <el-dropdown-item style="margin:0 10px;" :command="{row:scope.row,command:3}"
  226. v-hasPermi="['system:user_teacher:resetpwd']">重置密码</el-dropdown-item>
  227. </el-dropdown-menu>
  228. </el-dropdown>
  229. </div>
  230. </template>
  231. </el-table-column>
  232. </el-table>
  233. <div style="display: flex;height:32px;margin-top:15px;">
  234. <!--<p style="flex:2;"></p>-->
  235. <p style="text-align: left;margin:0;line-height:32px;margin-right:20px;font-size:14px;color:#999;">
  236. <i class="el-icon-warning" style="color:#0183FA;"></i>
  237. 已选择 {{selectedNum}} 项
  238. </p>
  239. <div style="flex:5;">
  240. <pagination :page-sizes="[20, 30, 40, 50]"
  241. v-show="total>0"
  242. :total="total"
  243. style="margin:0;"
  244. :page.sync="queryParams.pageNum"
  245. :limit.sync="queryParams.pageSize"
  246. @pagination="getList"
  247. />
  248. </div>
  249. </div>
  250. </div>
  251. </div>
  252. </div>
  253. </div>
  254. <add-page v-if="pageType == 2" :editType="editType" :propsData="propsData" :titleName="titleName"></add-page>
  255. <!--重置密码-->
  256. <el-dialog title="重置密码" :visible.sync="reviseOpen" width="600px" append-to-body class="teacher-revise-dialog-box">
  257. <p class="teacher-text-p">确定要重置该账号的密码吗?</p>
  258. <p class="teacher-text-p">确定操作后,该账号密码将重置为系统初始密码。</p>
  259. <div slot="footer" class="teacher-revise-dialog-button-box">
  260. <p class="reset-button-one">取消</p>
  261. <p class="inquire-button-one" @click="teacherResetPwd">确定</p>
  262. </div>
  263. </el-dialog>
  264. <!--导入窗口-->
  265. <el-dialog title="导入数据" :visible.sync="importOpen" @close="importOpenOff" width="600px" append-to-body class="teacher-import-dialog-box">
  266. <el-upload
  267. class="teacher-import-dialog-upLoad-box"
  268. :drag="true"
  269. :data="upImportData"
  270. :action="uploadImgUrl"
  271. :show-file-list="false"
  272. :on-success="handleAvatarSuccess"
  273. :headers="headers"
  274. :before-upload="beforeAvatarUpload">
  275. <i class="el-icon-upload"></i>
  276. <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
  277. <div class="el-upload__tip" slot="tip">
  278. <el-checkbox v-model="upImportData.upDate">是否更新已经存在的用户数据</el-checkbox>
  279. </div>
  280. <div class="el-upload__tip" slot="tip">仅允许导入xls、xlsx、格式文件。<span style="color:#0183FA;cursor: pointer" v-hasPermi="['system:user_teacher:exceltemplate']" @click="importTemplate">下载模板</span></div>
  281. <div class="el-upload-text-box" slot="tip" v-if="getImportData.downFile">
  282. <div class="img-text-box">
  283. <img src="@/assets/ZDimages/personnelManagement/icon_dr_wj.png">
  284. <p>{{getImportData.textName}}</p>
  285. </div>
  286. <p class="text-p">数据导入成功 <span style="color:#0183FA;">{{getImportData.successNum}}</span> 条,失败 <span style="color:#FF6464 ;">{{getImportData.failureNum}}</span> 条</p>
  287. <div class="img-text-box">
  288. <img src="@/assets/ZDimages/personnelManagement/icon_dr_sj.png">
  289. <p style="color:#0183FA;cursor: pointer;" @click="failureExcel">点击下载失败数据报表</p>
  290. </div>
  291. </div>
  292. </el-upload>
  293. <div slot="footer" class="teacher-import-dialog-button-box">
  294. <p class="inquire-button-one" @click="importOpenOff">确定</p>
  295. </div>
  296. <div class="teacher-import-dialog-position-box" v-if="loading"></div>
  297. </el-dialog>
  298. <!--编辑--组织架构-->
  299. <el-dialog title="修改部门" :visible.sync="treeOpen" width="600px" append-to-body class="teacher-tree-dialog-box">
  300. <el-form :model="treeForm" class="teacher-tree-dialog-form-box" ref="treeForm" :rules="rules" v-show="showSearch">
  301. <el-form-item label="上级部门" prop="parentId" label-width="90px" v-if="treeForm.parentId != 0">
  302. <treeselect v-model="treeForm.parentId" :options="deptOptions" :show-count="true" @select="deptSelect" placeholder="请选择上级部门" />
  303. </el-form-item>
  304. <div style="display:flex;">
  305. <el-form-item label="部门编号" prop="" label-width="90px" v-if="treeForm.parentId != 0">
  306. <el-input v-model="treeForm.deptNum" maxlength="10" disabled
  307. onkeyup="this.value=this.value.replace(/[^\d.]/g,'')" placeholder="请输入部门编号"/>
  308. </el-form-item>
  309. <el-form-item label="部门名称" prop="deptName" label-width="90px">
  310. <el-input v-model="treeForm.deptName" maxlength="10" placeholder="请输入部门名称"/>
  311. </el-form-item>
  312. </div>
  313. </el-form>
  314. <div slot="footer" class="teacher-tree-dialog-button-box">
  315. <p class="reset-button-one" @click="treeOpenOff">取消</p>
  316. <p class="inquire-button-one" @click="editDeptButton">确定</p>
  317. </div>
  318. </el-dialog>
  319. <!--新增--组织架构-->
  320. <el-dialog title="新增部门" :visible.sync="treeAddOpen" width="600px" append-to-body class="teacher-tree-dialog-box">
  321. <el-form :model="treeAddForm" class="teacher-tree-dialog-form-box" ref="treeAddForm" :rules="rules" v-show="showSearch">
  322. <el-form-item label="上级部门" prop="id" label-width="90px">
  323. <treeselect v-model="treeAddForm.id" :options="deptOptions" :show-count="true" @select="deptAddSelect" placeholder="请选择上级部门" />
  324. </el-form-item>
  325. <div style="display:flex;" v-for="(item,index) in treeAddForm.teaCherDpetList" :key="index">
  326. <el-form-item label="部门编号" :prop="'teaCherDpetList.' + index + '.deptNum'" :rules="rules.deptNum" label-width="90px">
  327. <el-input v-model="item.deptNum" maxlength="10" placeholder="请输入部门编号"/>
  328. </el-form-item>
  329. <el-form-item label="部门名称" :prop="'teaCherDpetList.' + index + '.deptName'" :rules="rules.deptName" label-width="90px">
  330. <el-input v-model="item.deptName" maxlength="10" placeholder="请输入部门名称"/>
  331. </el-form-item>
  332. <div style="display: flex;width:100px;" v-if="index != treeAddForm.teaCherDpetList.length-1">
  333. <p class="el-icon-delete" style="margin:10px 20px;font-size:20px;width:20px;cursor: pointer;color:#FF6666;" @click="delDeptItem(index)"></p>
  334. </div>
  335. <div style="display: flex;width:100px;" v-if="index == treeAddForm.teaCherDpetList.length-1 && index < 4 && index != 0">
  336. <p class="el-icon-circle-plus-outline" style="margin:10px 20px;font-size:20px;width:20px;cursor: pointer;color:#0183FA;" @click="addDeptItem"></p>
  337. <p class="el-icon-delete" style="margin:10px 0;font-size:20px;width:20px;cursor: pointer;color:#FF6666;" @click="delDeptItem(index)"></p>
  338. </div>
  339. <div style="display: flex;width:100px;" v-if="index == treeAddForm.teaCherDpetList.length-1 && index == 4">
  340. <p class="el-icon-delete" style="margin:10px 20px;font-size:20px;width:20px;cursor: pointer;color:#FF6666;" @click="delDeptItem(index)"></p>
  341. </div>
  342. <div style="display: flex;width:100px;" v-if="index == treeAddForm.teaCherDpetList.length-1 && index < 4 && index == 0">
  343. <p class="el-icon-circle-plus-outline" style="margin:10px 20px;font-size:20px;width:20px;cursor: pointer;color:#0183FA;" @click="addDeptItem"></p>
  344. </div>
  345. </div>
  346. </el-form>
  347. <div slot="footer" class="teacher-tree-dialog-button-box">
  348. <p class="reset-button-one" @click="treeAddOpenOff">取消</p>
  349. <p class="inquire-button-one" @click="addDeptButton">确定</p>
  350. </div>
  351. </el-dialog>
  352. <user-list ref="userOpen"></user-list>
  353. </div>
  354. </template>
  355. <script>
  356. import { getAuthRole, updateAuthRole, resetUserPwd } from "@/api/system/user";
  357. import { allListPost } from "@/api/system/post";
  358. import { listDepartments } from "@/api/system/dept";
  359. import { setSubjectAdmin,getSubjectList,getNoAdminSubjectList,getNoAdminSubjectListNopage } from "@/api/laboratory/subject";
  360. import { listUser, delUser, addUser, updateUser, changeUserStatus,putUserTeacher,delTeacher,
  361. teacherResetPwd,addDeptByTeacher,putDeptByTeacher,updateDeptName,editDeptOrder,delDept,
  362. editUserByDept,getTeacherInfo,editNatureLinkage,treeselect } from "@/api/system/user_teacher";
  363. import { getUser } from "@/api/system/user_student";
  364. import { getToken } from "@/utils/auth";
  365. import Treeselect from "@riophae/vue-treeselect";
  366. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  367. import { Message } from 'element-ui'
  368. import userList from "./userList.vue"
  369. import addPage from "./addPageOne.vue"
  370. export default {
  371. name: "User",
  372. components: {
  373. Treeselect,
  374. userList,
  375. addPage
  376. },
  377. data() {
  378. return {
  379. tableButtonType:this.hasPermiDom(['system:user_teacher:query','system:user_teacher:query','system:user_teacher:edit','system:user_teacher:remove','system:user_teacher:resetpwd']),
  380. uploadImgUrl: window.location.href.split('://')[0]+'://' + this.judgmentNetworkReturnAddress() + "/system/user/teacher/importData", // 上传地址
  381. headers: {
  382. Authorization: "Bearer " + getToken(),
  383. },
  384. // 遮罩层
  385. loading: true,
  386. // 选中数组
  387. ids: [],
  388. // 非单个禁用
  389. single: true,
  390. // 非多个禁用
  391. multiple: true,
  392. // 显示搜索条件
  393. showSearch: true,
  394. // 总条数
  395. total: 0,
  396. // 用户表格数据
  397. userList: [],
  398. idData:[],
  399. // 弹出层标题
  400. title: "",
  401. // 部门树选项
  402. deptOptions: undefined,
  403. // 重置密码弹层开关
  404. reviseOpen: false,
  405. // 部门名称
  406. deptName: undefined,
  407. // 默认密码
  408. initPassword: undefined,
  409. // 日期范围
  410. dateRange: [],
  411. // 职称字典
  412. professional: [],
  413. // 工作性质字典
  414. workClass:[],
  415. // 是否是检查者
  416. userTypeList:[
  417. {
  418. id:0,
  419. name:"否",
  420. },
  421. {
  422. id:1,
  423. name:"是",
  424. },
  425. ],
  426. // 性别状态字典
  427. sexOptions: [],
  428. // 岗位选项
  429. postOptions: [],
  430. // 角色选项
  431. roleOptions: [],
  432. // 学院选项
  433. facultyOptions: [],
  434. // 实验室选项
  435. laboratoryOptions: [],
  436. // 表单参数
  437. form: {},
  438. defaultProps: {
  439. children: "children",
  440. label: "label"
  441. },
  442. // 查询参数
  443. queryParams: {
  444. pageNum: 1,
  445. pageSize:20,
  446. searchValue: "",
  447. position: "",
  448. nature: "",
  449. isCheck: "",
  450. },
  451. // 列信息
  452. columns: [
  453. { key: 0, label: `用户编号`, visible: true },
  454. { key: 1, label: `用户名称`, visible: true },
  455. { key: 2, label: `用户昵称`, visible: true },
  456. { key: 3, label: `部门`, visible: true },
  457. { key: 4, label: `手机号码`, visible: true },
  458. { key: 5, label: `状态`, visible: true },
  459. { key: 6, label: `创建时间`, visible: true }
  460. ],
  461. addRules:{
  462. userName: [
  463. { required: true, message: "请输入学号", trigger: "blur" },
  464. { required: true, message: "请输入学号", validator: this.spaceJudgment, trigger: "blur" }
  465. ],
  466. nickName: [
  467. { required: true, message: "请输入姓名", trigger: "blur" },
  468. { required: true, message: "请输入姓名", validator: this.spaceJudgment, trigger: "blur" }
  469. ],
  470. deptId: [
  471. { required: true, message: "请选择学院", trigger: "blur" }
  472. ],
  473. sex: [
  474. { required: true, message: "请选择性别", trigger: "blur" }
  475. ],
  476. },
  477. // 表单校验
  478. rules: {
  479. id: [
  480. { required: true, message: "请选择上级部门", trigger: "blur" }
  481. ],
  482. deptNum: [
  483. { required: true, message: "请输入部门编号", trigger: "blur" },
  484. { required: true, message: "请输入部门编号", validator: this.spaceJudgment, trigger: "blur" }
  485. ],
  486. deptName: [
  487. { required: true, message: "请输入部门名称", trigger: "blur" },
  488. { required: true, message: "请输入部门名称", validator: this.spaceJudgment, trigger: "blur" }
  489. ],
  490. },
  491. //表格扩展选择器---需要在@selection-change绑定的方法内监控selection数组长度
  492. selectedNum:0,
  493. //页面状态
  494. pageType:1,
  495. editType:false,
  496. //组件传参数据
  497. propsData:{},
  498. //危险源数据
  499. laboratoryList:[],
  500. //学院列表
  501. deptList:[],
  502. //职位列表
  503. postionList: [],
  504. //文化程度
  505. educationList:[],
  506. // 新增学生开关
  507. addStudentType:false,
  508. addTitle:"",
  509. addForm:{},
  510. //导入弹层开关
  511. importOpen:false,
  512. //导入数据
  513. upImportData:{
  514. sysUserEnable:true,
  515. upDate:false,
  516. },
  517. getImportData:{
  518. downFile:false,
  519. successNum:0,
  520. failureNum:0,
  521. textName:"",
  522. },
  523. //新增组织架构数据
  524. treeAddOpen:false,
  525. treeAddForm:{
  526. id:null,
  527. parentId:"",
  528. ancestors:"",
  529. teaCherDpetList:[],
  530. },
  531. //编辑组织架构数据
  532. treeOpen:false,
  533. treeForm:{
  534. id:"",
  535. parentId:null,
  536. deptName:"",
  537. ancestors:"",
  538. },
  539. treeFormOne:{},
  540. userId:"",
  541. currentDate:'',
  542. inputDeptName:"",
  543. };
  544. },
  545. watch: {
  546. // 根据名称筛选部门树
  547. deptName(val) {
  548. this.$refs.tree.filter(val);
  549. }
  550. },
  551. created() {
  552. this.getList();
  553. this.getTreeselect();
  554. this.getDeptList();
  555. this.getPostionList();
  556. // //职称
  557. // this.getDicts("professional").then(response => {
  558. // this.professional = response.data;
  559. // });
  560. //工作性质
  561. this.getDicts("work_class").then(response => {
  562. this.workClass = response.data;
  563. });
  564. //性别
  565. this.getDicts("sys_user_sex").then(response => {
  566. this.sexOptions = response.data;
  567. });
  568. //文化程度
  569. this.getDicts("education").then(response => {
  570. this.educationList = response.data;
  571. });
  572. this.getConfigKey("sys.user.initPassword").then(response => {
  573. this.initPassword = response.msg;
  574. });
  575. },
  576. methods: {
  577. //人员添加接口
  578. takeUserData(ids,idsData){
  579. let list = [];
  580. for(let i=0;i<ids.length;i++){
  581. let obj = {
  582. userId:ids[i],
  583. deptId:this.queryParams.deptId
  584. }
  585. list.push(obj);
  586. }
  587. editUserByDept(list).then(response => {
  588. this.msgSuccess(response.msg)
  589. this.$refs.userOpen.show();
  590. this.getList();
  591. this.getTreeselect();
  592. this.delTreeForm();
  593. });
  594. },
  595. //编辑部门关闭
  596. treeOpenOff(){
  597. this.treeOpen = false;
  598. },
  599. //编辑部门提交
  600. editDeptButton(){
  601. let self = this;
  602. this.$refs["treeForm"].validate(valid => {
  603. if (valid) {
  604. if(this.treeForm.parentId == 0){
  605. let obj = {
  606. deptId:this.treeForm.id,
  607. deptName:this.treeForm.deptName,
  608. }
  609. updateDeptName(obj).then(response => {
  610. this.treeOpen = false;
  611. this.delTreeForm();
  612. this.msgSuccess(response.msg)
  613. this.getTreeselect();
  614. this.$set(this,'treeForm',{});
  615. this.$set(this,'treeAddForm',{});
  616. });
  617. }else{
  618. let obj = {
  619. deptId:this.treeForm.id,
  620. parentId:this.treeForm.parentId,
  621. ancestors:this.treeForm.ancestors,
  622. deptName:this.treeForm.deptName,
  623. };
  624. putDeptByTeacher(obj).then(response => {
  625. this.treeOpen = false;
  626. this.delTreeForm();
  627. this.msgSuccess(response.msg)
  628. this.getTreeselect();
  629. this.$set(this,'treeForm',{});
  630. this.$set(this,'treeAddForm',{});
  631. });
  632. }
  633. }
  634. });
  635. },
  636. //新增子部门
  637. addDeptItem(){
  638. this.treeAddForm.teaCherDpetList.push({deptNum:"",deptName:""})
  639. },
  640. //删除子部门
  641. delDeptItem(index){
  642. this.treeAddForm.teaCherDpetList.splice(index,1)
  643. },
  644. //新增部门提交
  645. addDeptButton(){
  646. let self = this;
  647. this.$refs["treeAddForm"].validate(valid => {
  648. if (valid) {
  649. let newObj = {
  650. teaCherDpetList:[]
  651. }
  652. for(let i=0;i<self.treeAddForm.teaCherDpetList.length;i++){
  653. let obj = {
  654. ancestors:this.treeAddForm.ancestors,
  655. parentId:this.treeAddForm.id,
  656. deptNum:this.treeAddForm.teaCherDpetList[i].deptNum,
  657. deptName:this.treeAddForm.teaCherDpetList[i].deptName,
  658. }
  659. newObj.teaCherDpetList.push(obj);
  660. }
  661. addDeptByTeacher(newObj).then(response => {
  662. this.treeAddOpen = false;
  663. this.msgSuccess(response.msg)
  664. this.getTreeselect();
  665. this.$set(this,'treeForm',{});
  666. this.$set(this,'treeAddForm',{});
  667. });
  668. }
  669. });
  670. },
  671. //关闭新增页面
  672. treeAddOpenOff(){
  673. this.treeAddOpen = false;
  674. },
  675. //新增节点选择部门
  676. deptAddSelect(item){
  677. this.treeAddForm.parentId = item.id;
  678. this.treeAddForm.ancestors = item.ancestors;
  679. },
  680. //编辑节点选择部门
  681. deptSelect(item){
  682. this.treeForm.parentId = item.id;
  683. this.treeForm.ancestors = item.ancestors;
  684. },
  685. // 节点单击事件
  686. handleNodeClick(data) {
  687. console.log("data",data);
  688. this.$set(this.queryParams,'deptId',data.id);
  689. let obj = {
  690. id : data.id,
  691. deptNum : data.deptNum,
  692. parentId : data.parentId,
  693. deptName : data.label,
  694. ancestors : data.ancestors,
  695. }
  696. this.$set(this,'treeForm',obj);
  697. this.$set(this,'treeFormOne',JSON.parse(JSON.stringify(obj)));
  698. // this.treeForm.id = data.id;
  699. // this.treeForm.deptNum = data.deptNum;
  700. // this.treeForm.parentId = data.parentId;
  701. // this.treeForm.deptName = data.label;
  702. // this.treeForm.ancestors = data.ancestors;
  703. this.selectedNum = 0;
  704. this.$refs.multipleTable.clearSelection()
  705. this.getList();
  706. },
  707. //操作启用停用开关
  708. statusCaptcha(row){
  709. let obj = {
  710. userId:row.userId,//用户id
  711. userName:row.userName,//用户账户
  712. status:row.status == 1?'0':'1',//账户启用停用,0是启用,1是停用
  713. };
  714. putUserTeacher(obj).then(response => {
  715. row.status = row.status == 1?'0':'1';
  716. this.msgSuccess(response.msg)
  717. });
  718. },
  719. //操作在职开关
  720. natureCaptcha(row){
  721. let obj = {
  722. userId:row.userId,//用户id
  723. userName:row.userName,//用户账户
  724. nature:row.nature == 1?'0':'1',//账户启用停用,0是在职,1是离职
  725. };
  726. editNatureLinkage(obj).then(response => {
  727. this.msgSuccess(response.msg)
  728. this.getList();
  729. });
  730. },
  731. // 组织树操作
  732. treeButtonClick(type){
  733. let self = this;
  734. if(type == 1){
  735. //新增部门
  736. let obj = {
  737. id:null,
  738. parentId:"",
  739. ancestors:"",
  740. teaCherDpetList:[
  741. {deptNum:"",deptName:""}
  742. ]
  743. }
  744. if(this.treeForm.id){
  745. obj.id = this.treeForm.id;
  746. obj.parentId = this.treeForm.parentId;
  747. obj.ancestors = this.treeForm.ancestors;
  748. }
  749. this.$set(this,'treeAddForm',obj);
  750. this.treeAddOpen = true;
  751. }else {
  752. if(!this.queryParams.deptId){
  753. this.msgError("请先选择部门")
  754. return
  755. }
  756. if(type == 2){
  757. //部门上移动
  758. let obj = {
  759. parentId:this.treeForm.parentId,
  760. deptId:this.treeForm.id,
  761. upDownOper:"1",
  762. }
  763. editDeptOrder(obj).then(response => {
  764. this.delTreeForm();
  765. this.msgSuccess(response.msg)
  766. this.getTreeselect();
  767. });
  768. }else if(type == 3){
  769. //部门下移动
  770. let obj = {
  771. parentId:this.treeForm.parentId,
  772. deptId:this.treeForm.id,
  773. upDownOper:"2",
  774. }
  775. editDeptOrder(obj).then(response => {
  776. this.delTreeForm();
  777. this.msgSuccess(response.msg)
  778. this.getTreeselect();
  779. });
  780. }else if(type == 4){
  781. //部门编辑
  782. this.$set(this,'treeForm',JSON.parse(JSON.stringify(this.treeFormOne)));
  783. this.treeOpen = true;
  784. }else if(type == 5){
  785. //部门添加人员
  786. this.$refs.userOpen.show();
  787. }else if(type == 6){
  788. //部门删除
  789. this.$confirm('确认要删除吗?', "警告", {
  790. confirmButtonText: "确定",
  791. cancelButtonText: "取消",
  792. type: "warning"
  793. }).then(() => {
  794. // 确定
  795. delDept(self.treeForm.id).then(response => {
  796. self.delTreeForm();
  797. self.msgSuccess(response.msg)
  798. self.getTreeselect();
  799. });
  800. }).catch(function() {});
  801. }
  802. }
  803. },
  804. delTreeForm(){
  805. this.queryParams.deptId = "";
  806. this.treeForm = {
  807. id:"",
  808. parentId:null,
  809. deptName:"",
  810. ancestors:"",
  811. }
  812. },
  813. //****************************************导入功能**************************************
  814. handleAvatarSuccess(res, file) {
  815. if(res.code == 200){
  816. this.getImportData.downFile = res.data.downFile
  817. this.getImportData.successNum = res.data.successNum
  818. this.getImportData.failureNum = res.data.failureNum
  819. // this.importOpen = false;
  820. // this.getList();
  821. }else{
  822. this.msgError(res.msg);
  823. }
  824. this.loading = false;
  825. },
  826. beforeAvatarUpload(file) {
  827. let type = false;
  828. console.log('file',file);
  829. if (file.type == 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' || file.type == 'application/vnd.ms-excel') {
  830. this.getImportData.textName = file.name;
  831. type = true;
  832. this.loading = true;
  833. }else{
  834. this.$message.error('只能上传xls/xlsx格式文件');
  835. type = false;
  836. }
  837. return type;
  838. },
  839. /** 查询职位列表 */
  840. getPostionList() {
  841. allListPost().then(response => {
  842. console.log(",IIIIIIIIIIIIIIIIIIIIIIIII",response.data)
  843. this.$set(this, 'postionList', response.data)
  844. });
  845. },
  846. /** 查询学院列表 */
  847. getDeptList() {
  848. listDepartments().then(response => {
  849. this.$set(this, 'deptList', response.data)
  850. });
  851. },
  852. outPage(){
  853. this.pageType = 1;
  854. this.getList();
  855. },
  856. //新增按钮
  857. addButton(){
  858. this.pageType = 2;
  859. this.propsData = {};
  860. this.titleName = '新增教职工';
  861. this.editType = false;
  862. },
  863. //详情按钮
  864. infoButton(row){
  865. getTeacherInfo(row.userId).then(response => {
  866. this.propsData = response.data;
  867. this.titleName = '教职工详情';
  868. this.editType = true;
  869. this.pageType = 2;
  870. });
  871. },
  872. //更多选项
  873. moreClick(item){
  874. let self = this;
  875. if(item.command == 1){
  876. getTeacherInfo(item.row.userId).then(response => {
  877. this.titleName = '教职工编辑';
  878. this.propsData = response.data;
  879. this.editType = false;
  880. this.pageType = 2;
  881. });
  882. }else if(item.command == 2){
  883. this.$confirm('确认要删除吗?', "警告", {
  884. confirmButtonText: "确定",
  885. cancelButtonText: "取消",
  886. type: "warning"
  887. }).then(() => {
  888. // 确定
  889. delTeacher(item.row.userId).then(response => {
  890. self.msgSuccess(response.msg);
  891. self.getList();
  892. });
  893. }).catch(function() {});
  894. }else if(item.command == 3){
  895. this.userId = item.row.userId;
  896. this.reset();
  897. this.title = "重置密码";
  898. this.reviseOpen = true;
  899. }
  900. },
  901. teacherResetPwd(){
  902. let obj = {
  903. userId:this.userId
  904. }
  905. teacherResetPwd(obj).then(response => {
  906. this.reviseOpen = false;
  907. this.msgSuccess(response.msg);
  908. });
  909. },
  910. /*===记录勾选数据===
  911. 需要再el-table 添加 :row-key="getRowKeys"
  912. 需要在selection 添加 :reserve-selection="true"
  913. */
  914. getRowKeys(row) {
  915. return row.userId
  916. },
  917. //=========表格扩展选择器方法---结束=========
  918. /** 查询用户列表 */
  919. getList() {
  920. this.loading = true;
  921. listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
  922. for(let i=0;i<response.rows.length;i++){
  923. if(response.rows[i].position == "未定"){
  924. response.rows[i].position = "";
  925. }
  926. }
  927. this.$set(this,'userList',response.rows);
  928. // this.userList = response.rows;
  929. this.total = response.total;
  930. this.loading = false;
  931. }
  932. );
  933. },
  934. /** 查询部门下拉树结构 */
  935. getTreeselect() {
  936. let obj = {
  937. deptName:this.inputDeptName,
  938. }
  939. treeselect(obj).then(response => {
  940. this.deptOptions = response.data;
  941. });
  942. },
  943. // 筛选节点
  944. filterNode(value, data) {
  945. if (!value) return true;
  946. return data.label.indexOf(value) !== -1;
  947. },
  948. // 取消按钮
  949. cancel() {
  950. this.open = false;
  951. // this.reset();
  952. },
  953. addReset(){
  954. this.addForm = {
  955. userId: undefined,
  956. nickName: undefined,
  957. userName: undefined,
  958. deptId: undefined,
  959. sex: undefined,
  960. phonenumber: undefined,
  961. email: undefined,
  962. major: undefined,
  963. grade: undefined,
  964. category: undefined,
  965. tutorUserId: undefined,
  966. };
  967. },
  968. // 表单重置
  969. reset() {
  970. this.form = {
  971. userId: undefined,
  972. deptId: undefined,
  973. userName: undefined,
  974. nickName: undefined,
  975. password: undefined,
  976. phonenumber: undefined,
  977. email: undefined,
  978. sex: undefined,
  979. status: "0",
  980. remark: undefined,
  981. postIds: [],
  982. roleIds: []
  983. };
  984. this.resetForm("form");
  985. },
  986. /** 搜索按钮操作 */
  987. handleQuery() {
  988. this.queryParams.pageNum = 1;
  989. this.getList();
  990. },
  991. /** 重置按钮操作 */
  992. resetQuery() {
  993. this.dateRange = [];
  994. // this.resetForm("queryForm");
  995. this.$set(this,'queryParams',{
  996. pageNum: 1,
  997. pageSize:20,
  998. searchValue: "",
  999. position: "",
  1000. nature: "",
  1001. isCheck: "",
  1002. });
  1003. this.handleQuery();
  1004. },
  1005. // 多选框选中数据
  1006. handleSelectionChange(selection) {
  1007. this.selectedNum = selection.length;
  1008. this.ids = selection.map(item => item.userId);
  1009. this.single = selection.length != 1;
  1010. this.multiple = !selection.length;
  1011. },
  1012. //导入页面关闭
  1013. importOpenOff(){
  1014. this.importOpen = false;
  1015. this.getImportData.downFile = false;
  1016. this.getImportData.successNum = 0;
  1017. this.getImportData.failureNum = 0;
  1018. this.getImportData.textName = "";
  1019. },
  1020. /** 导入按钮操作 */
  1021. importButton(item){
  1022. if(item.command == 1){
  1023. // 下载模板
  1024. this.download('/system/user/teacher/importTemplate', {}, `导入模板.xlsx`)
  1025. }else if(item.command == 2){
  1026. // 导入数据
  1027. console.log('导入数据');
  1028. this.importOpen = true;
  1029. }
  1030. },
  1031. /** 当前时间 */
  1032. getCurrentTime () {
  1033. const yy = new Date().getFullYear()
  1034. const mm = new Date().getMonth() + 1
  1035. const dd = new Date().getDate()
  1036. const hh = new Date().getHours()
  1037. const mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes() : new Date().getMinutes()
  1038. const ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds() : new Date().getSeconds()
  1039. return yy + '-' + mm + '-' + dd
  1040. },
  1041. /** 导出按钮操作 */
  1042. exportButton(item) {
  1043. let self = this;
  1044. this.currentDate=this.getCurrentTime()
  1045. if(item.command == 1){
  1046. self.$confirm(`确认导出全部数据?`, "提示", {
  1047. confirmButtonText: "确定",
  1048. cancelButtonText: "取消",
  1049. type: "warning"
  1050. }).then(async () => {
  1051. self.download('/system/user/teacher/export/', {...self.queryParams}, '教职工信息-'+this.currentDate+'.xlsx')
  1052. }).catch(() => {})
  1053. }else if(item.command == 2){
  1054. if(self.ids.length>0) {
  1055. self.$confirm(`确认导出选中数据?`, "提示", {
  1056. confirmButtonText: "确定",
  1057. cancelButtonText: "取消",
  1058. type: "warning"
  1059. }).then(async () => {
  1060. let ids = self.ids.join(',');
  1061. let obj = {
  1062. ids :ids
  1063. }
  1064. self.download(`/system/user/teacher/export/`,obj, '教职工信息-'+this.currentDate+'.xlsx')
  1065. }).catch(() => {})
  1066. }else {
  1067. Message({
  1068. message: "请选择要导出的数据",
  1069. type: 'error'
  1070. });
  1071. }
  1072. }
  1073. },
  1074. /** 下载模板操作 */
  1075. importTemplate() {
  1076. this.download('/system/user/teacher/importTemplate', {}, `导入模板.xlsx`)
  1077. },
  1078. /*下载失败列表*/
  1079. failureExcel(){
  1080. this.download('/system/user/teacher/importErrorData', {}, `失败报表.xlsx`)
  1081. },
  1082. }
  1083. };
  1084. </script>
  1085. <style scoped lang="scss">
  1086. .teacher {
  1087. display: flex!important;
  1088. flex-direction: column;
  1089. .button-box{
  1090. width:300px;
  1091. display: flex;
  1092. }
  1093. .data-max-box{
  1094. position:relative;
  1095. margin-top:-20px;
  1096. p{
  1097. margin:0;
  1098. }
  1099. .info-title-p{
  1100. line-height:80px;
  1101. font-size:18px;
  1102. padding-left:20px;
  1103. border-bottom:1px solid #E0E0E0;
  1104. margin-bottom:20px;
  1105. }
  1106. .info-data-box{
  1107. height:40px;
  1108. display:flex;
  1109. padding-left:20px;
  1110. p{
  1111. width:270px;
  1112. line-height:40px;
  1113. font-size:16px;
  1114. }
  1115. }
  1116. .reset-button-p{
  1117. position: absolute;
  1118. right:0;
  1119. top:20px;
  1120. cursor: pointer;
  1121. text-align: center;
  1122. width: 70px;
  1123. height: 40px;
  1124. line-height: 40px;
  1125. border-radius: 6px;
  1126. font-size:14px;
  1127. border: 1px solid #DCDFE6;
  1128. color: #606266;
  1129. background: #ffffff;
  1130. }
  1131. }
  1132. .data-item-max-box{
  1133. position:relative;
  1134. margin-top:-20px;
  1135. p{
  1136. margin:0;
  1137. }
  1138. .info-title-p{
  1139. line-height:80px;
  1140. font-size:18px;
  1141. padding-left:20px;
  1142. border-bottom:1px solid #E0E0E0;
  1143. }
  1144. .info-for-max-box{
  1145. .info-for-box{
  1146. width:300px;
  1147. height:163px;
  1148. border: 1px solid #E0E0E0;
  1149. border-radius: 6px;
  1150. display: inline-block;
  1151. margin:20px 20px 0;
  1152. div{
  1153. display: flex;
  1154. margin-top:25px;
  1155. p:nth-child(1){
  1156. font-size:14px;
  1157. margin-left:19px;
  1158. border-radius:4px;
  1159. padding:0 4px;
  1160. margin-right:6px;
  1161. }
  1162. p:nth-child(2){
  1163. font-size:16px;
  1164. }
  1165. }
  1166. .address-p{
  1167. font-size:14px;
  1168. height:44px;
  1169. line-height:20px;
  1170. margin-top:24px;
  1171. text-align: center;
  1172. overflow: hidden;
  1173. }
  1174. .button-p{
  1175. line-height:47px;
  1176. text-align: center;
  1177. border-top:1px solid #E0E0E0;
  1178. font-size:14px;
  1179. color:#FE3B2F;
  1180. cursor:pointer
  1181. }
  1182. }
  1183. .info-add-box{
  1184. width:300px;
  1185. height:163px;
  1186. border: 1px solid #E0E0E0;
  1187. border-radius: 6px;
  1188. margin:20px 20px 0;
  1189. cursor:pointer;
  1190. p{
  1191. line-height:163px;
  1192. text-align: center;
  1193. font-size:14px;
  1194. i{
  1195. margin-right:5px;
  1196. }
  1197. }
  1198. }
  1199. }
  1200. .reset-button-p{
  1201. position: absolute;
  1202. right:0;
  1203. top:20px;
  1204. cursor: pointer;
  1205. text-align: center;
  1206. width: 70px;
  1207. height: 40px;
  1208. line-height: 40px;
  1209. border-radius: 6px;
  1210. font-size:14px;
  1211. border: 1px solid #DCDFE6;
  1212. color: #606266;
  1213. background: #ffffff;
  1214. }
  1215. }
  1216. .teacher-one-box{
  1217. flex:1;
  1218. display: flex;
  1219. flex-direction: column;
  1220. overflow: hidden!important;
  1221. box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
  1222. padding:20px!important;
  1223. .top-max-box{
  1224. flex:1;
  1225. display: flex;
  1226. overflow: hidden!important;
  1227. .left-max-box{
  1228. width:326px;
  1229. display: flex;
  1230. flex-direction: column;
  1231. .top-button-max-box{
  1232. width: 306px;
  1233. height: 40px;
  1234. border: 1px dashed #0045AF;
  1235. border-radius: 10px;
  1236. margin-bottom:10px;
  1237. div{
  1238. display: inline-block;
  1239. overflow: hidden;
  1240. width:20px;
  1241. height:20px;
  1242. margin:10px 0 0 29px;
  1243. cursor: pointer;
  1244. }
  1245. div:nth-child(1){
  1246. margin-left:20px;
  1247. }
  1248. .new-button-box{
  1249. background: url("~@/assets/ZDimages/personnelManagement/icon_jzgxx_xzxjbm.png");
  1250. }
  1251. .new-button-box:hover{
  1252. background: url("~@/assets/ZDimages/personnelManagement/icon_jzgxx_xzxjbm_xz.png");
  1253. }
  1254. .superior-button-box{
  1255. background: url("~@/assets/ZDimages/personnelManagement/icon_jzgxx_xs.png");
  1256. }
  1257. .superior-button-box:hover{
  1258. background: url("~@/assets/ZDimages/personnelManagement/icon_jzgxx_xs_xz.png");
  1259. }
  1260. .down-button-box{
  1261. background: url("~@/assets/ZDimages/personnelManagement/icon_jzgxx_xx.png");
  1262. }
  1263. .down-button-box:hover{
  1264. background: url("~@/assets/ZDimages/personnelManagement/icon_jzgxx_xx_xz.png");
  1265. }
  1266. .edit-button-box{
  1267. background: url("~@/assets/ZDimages/personnelManagement/icon_jzgxx_bj.png");
  1268. }
  1269. .edit-button-box:hover{
  1270. background: url("~@/assets/ZDimages/personnelManagement/icon_jzgxx_b_xz.png");
  1271. }
  1272. .add-button-box{
  1273. background: url("~@/assets/ZDimages/personnelManagement/icon_jzgxx_tj.png");
  1274. }
  1275. .add-button-box:hover{
  1276. background: url("~@/assets/ZDimages/personnelManagement/icon_jzgxx_tj_xz.png");
  1277. }
  1278. .delete-button-box{
  1279. background: url("~@/assets/ZDimages/personnelManagement/icon_jzgxx_shanchu.png");
  1280. }
  1281. .delete-button-box:hover{
  1282. background: url("~@/assets/ZDimages/personnelManagement/icon_jzgxx_shanchu_xz.png");
  1283. }
  1284. }
  1285. .left-input-box{
  1286. display: flex;
  1287. margin-bottom:10px;
  1288. .input-left{
  1289. flex:1;
  1290. }
  1291. .button-right{
  1292. width:60px;
  1293. font-size:14px;
  1294. line-height:40px;
  1295. margin:0 20px 0 10px;
  1296. font-weight:500;
  1297. }
  1298. }
  1299. .bottom-button-max-box{
  1300. flex:1;
  1301. }
  1302. }
  1303. .center-max-box{
  1304. border-right:2px dashed #E0E0E0;
  1305. margin-right:20px;
  1306. margin-top:20px;
  1307. }
  1308. .right-max-box{
  1309. flex:1;
  1310. display: flex;
  1311. flex-direction: column;
  1312. overflow: hidden!important;
  1313. .min-list-box{
  1314. flex: 1;
  1315. overflow: hidden!important;
  1316. display: flex;
  1317. flex-direction: column;
  1318. }
  1319. }
  1320. }
  1321. }
  1322. }
  1323. </style>
  1324. <style lang="scss">
  1325. .right-max-box{
  1326. .form-box{
  1327. .el-select{
  1328. width:100px !important;
  1329. > .el-input{
  1330. width:100px !important;
  1331. }
  1332. }
  1333. }
  1334. }
  1335. .right-max-box{
  1336. .form-box{
  1337. .form-dropdown-box{
  1338. display: flex;
  1339. margin:0;
  1340. padding:0 10px;
  1341. cursor: pointer;
  1342. height:40px;
  1343. img:nth-child(1){
  1344. width:16px;
  1345. height:16px;
  1346. margin-top:12px;
  1347. }
  1348. p{
  1349. width:47px;
  1350. text-align: center;
  1351. font-size:14px;
  1352. margin:0;
  1353. line-height:40px;
  1354. }
  1355. img:nth-child(3){
  1356. width:10px;
  1357. height:6px;
  1358. margin-top:17px;
  1359. }
  1360. }
  1361. }
  1362. }
  1363. .right-max-box{
  1364. .min-list-box{
  1365. .switch .el-switch__label {
  1366. position: absolute;
  1367. display: none;
  1368. color: #fff !important;
  1369. }
  1370. .switch .el-switch__label--right {
  1371. z-index: 1;
  1372. }
  1373. .switch .el-switch__label--right span{
  1374. margin-left: 10px;
  1375. }
  1376. .switch .el-switch__label--left {
  1377. z-index: 1;
  1378. }
  1379. .switch .el-switch__label--left span{
  1380. margin-left: 24px;
  1381. }
  1382. .switch .el-switch__label.is-active {
  1383. display: block;
  1384. }
  1385. .switch.el-switch .el-switch__core,
  1386. .el-switch .el-switch__label {
  1387. width: 64px !important;
  1388. margin: 0;
  1389. }
  1390. }
  1391. }
  1392. .teacher-revise-dialog-box{
  1393. .teacher-text-p{
  1394. margin-left:110px;
  1395. font-size:16px;
  1396. }
  1397. .teacher-revise-dialog-button-box{
  1398. display: flex;
  1399. width:190px;
  1400. margin:0 auto;
  1401. p{
  1402. margin:0;
  1403. width:70px;
  1404. height:30px;
  1405. line-height:30px;
  1406. font-size:14px;
  1407. }
  1408. p:nth-child(1){
  1409. margin-right:50px;
  1410. }
  1411. }
  1412. }
  1413. .teacher-import-dialog-box{
  1414. .teacher-import-dialog-upLoad-box{
  1415. .el-upload{
  1416. width:450px;
  1417. margin:0 55px;
  1418. .el-upload-dragger{
  1419. width:450px;
  1420. .el-icon-upload{
  1421. font-size:100px;
  1422. color:#CBE6FE;
  1423. }
  1424. .el-upload__text{
  1425. margin-top:20px;
  1426. }
  1427. }
  1428. }
  1429. .el-upload__tip{
  1430. margin-left:60px;
  1431. font-size:14px;
  1432. margin-top:10px;
  1433. }
  1434. .el-upload-text-box{
  1435. background: #F5F5F5;
  1436. border-radius: 10px;
  1437. margin:15px 30px 0;
  1438. padding:0 20px 15px;
  1439. overflow: hidden;
  1440. *{
  1441. margin:0;
  1442. }
  1443. .img-text-box{
  1444. display: flex;
  1445. margin-top:15px;
  1446. img{
  1447. width:16px;
  1448. height:16px;
  1449. margin-right:13px;
  1450. }
  1451. p{
  1452. height:16px;
  1453. line-height:16px;
  1454. font-size:12px;
  1455. }
  1456. }
  1457. .text-p{
  1458. margin-top:15px;
  1459. margin-left:29px;
  1460. height:16px;
  1461. line-height:16px;
  1462. font-size:12px;
  1463. }
  1464. }
  1465. }
  1466. .teacher-import-dialog-button-box{
  1467. display: flex;
  1468. width:190px;
  1469. margin:0 auto;
  1470. p{
  1471. width:70px;
  1472. height:30px;
  1473. line-height:30px;
  1474. font-size:14px;
  1475. margin:0 auto;
  1476. }
  1477. }
  1478. .teacher-import-dialog-position-box{
  1479. width:100%;
  1480. height:100%;
  1481. position: absolute;
  1482. top:0;
  1483. left:0;
  1484. z-index: 999;
  1485. background: rgba(255,255,255,0.4);
  1486. border-radius:20px;
  1487. }
  1488. }
  1489. .teacher-tree-dialog-box{
  1490. .teacher-tree-dialog-form-box{
  1491. }
  1492. .teacher-tree-dialog-button-box{
  1493. display: flex;
  1494. width:190px;
  1495. margin:0 auto;
  1496. p{
  1497. margin:0;
  1498. width:70px;
  1499. height:30px;
  1500. line-height:30px;
  1501. font-size:14px;
  1502. }
  1503. p:nth-child(1){
  1504. margin-right:50px;
  1505. }
  1506. }
  1507. }
  1508. </style>