index.vue 53 KB

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