index.vue 55 KB

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