index.vue 53 KB

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