index.vue 52 KB

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