teacher.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891
  1. <template>
  2. <div
  3. class="pb_content"
  4. style="background: unset; height: 100%; overflow: auto"
  5. >
  6. <div
  7. class="pb_content_body"
  8. style="
  9. background: #fff;
  10. padding: 0px 25px;
  11. box-sizing: border-box;
  12. margin: 10px auto 0;
  13. /* border-radius: 5px; */
  14. "
  15. >
  16. <div class="pb_head">
  17. <span>教师管理</span>
  18. </div>
  19. <div class="student_head">
  20. <div class="head_left">
  21. <el-input
  22. v-model="sPhoneUser"
  23. class="student_input"
  24. placeholder="请输入用户名"
  25. ></el-input>
  26. <el-select
  27. v-model="cid"
  28. placeholder="请选择班级"
  29. class="student_input inputClass"
  30. @change="searchStudent"
  31. >
  32. <el-option label="所有学校" value=""></el-option>
  33. <el-option
  34. v-for="(item, index) in classJuri"
  35. :key="index"
  36. :label="item.name"
  37. :value="item.id"
  38. ></el-option>
  39. </el-select>
  40. <el-button class="student_button" @click="searchStudent"
  41. >查询</el-button
  42. >
  43. </div>
  44. <div class="head_right">
  45. <el-button @click="addStudent">添加教师</el-button>
  46. <el-upload
  47. class="upload-demo newCss"
  48. :http-request="handleChange"
  49. :on-remove="handleRemove"
  50. action="#"
  51. :file-list="fileListUpload"
  52. accept=".xlsx"
  53. >
  54. <el-button class="btnClassGM" size="primary" type="primary"
  55. >批量添加</el-button
  56. >
  57. <div slot="tip" class="el-upload__tip" style="margin-left: 10px">
  58. 只能上传xlsx文件,且不超过500kb
  59. </div>
  60. </el-upload>
  61. <!-- <el-button @click="exportExcel">导出学生</el-button> -->
  62. <div @click="getExcel">xls 上传样例</div>
  63. </div>
  64. </div>
  65. </div>
  66. <div class="pb_content_body" style="margin: 0 auto">
  67. <div class="student_table">
  68. <el-table
  69. ref="table"
  70. :data="tableData"
  71. border
  72. :height="tableHeight"
  73. :fit="true"
  74. v-loading="isLoading"
  75. style="width: 100%"
  76. :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
  77. :row-class-name="tableRowClassName"
  78. >
  79. <el-table-column label="姓名" min-width="10" align="center">
  80. <template slot-scope="scope">
  81. <div class="userImg">
  82. <div class="tx">
  83. <img
  84. :src="
  85. scope.row.headportrait != null
  86. ? scope.row.headportrait
  87. : tx
  88. "
  89. alt
  90. />
  91. </div>
  92. <div
  93. style="
  94. width: 150px;
  95. text-align: left;
  96. white-space: nowrap;
  97. overflow: hidden;
  98. text-overflow: ellipsis;
  99. "
  100. >
  101. {{ scope.row.name }}
  102. </div>
  103. </div>
  104. </template>
  105. </el-table-column>
  106. <el-table-column label="邮箱" min-width="15" align="center">
  107. <template slot-scope="scope">
  108. <div>{{ scope.row.un ? scope.row.un : "" }}</div>
  109. </template>
  110. </el-table-column>
  111. <el-table-column
  112. prop="schoolName"
  113. label="学校"
  114. min-width="15"
  115. align="center"
  116. >
  117. </el-table-column>
  118. <el-table-column label="操作" width="220px">
  119. <template slot-scope="scope">
  120. <div
  121. class="delete"
  122. @click="deleteStudent(scope.row.userid, scope.row.state)"
  123. >
  124. <img src="../../../assets/remove.png" alt />
  125. </div>
  126. </template>
  127. </el-table-column>
  128. </el-table>
  129. </div>
  130. <div class="student_page">
  131. <el-pagination
  132. background
  133. layout="prev, pager, next"
  134. :page-size="10"
  135. :total="total"
  136. v-if="page"
  137. @current-change="handleCurrentChange"
  138. ></el-pagination>
  139. </div>
  140. </div>
  141. <el-dialog
  142. :visible.sync="dialogVisible"
  143. :append-to-body="true"
  144. width="700px"
  145. :before-close="handleClose"
  146. class="add_student"
  147. >
  148. <div slot="title" class="header-title">
  149. <div class="logoImg">
  150. <img src="../../../assets/logo.png" alt />
  151. </div>
  152. <div class="title_add_student">添加教师</div>
  153. </div>
  154. <el-form class="inputClass">
  155. <el-form-item label="教师名称" :label-width="formLabelWidth">
  156. <span>
  157. <el-input
  158. placeholder="请输入教师昵称"
  159. clearable
  160. v-model="sName"
  161. class="add_input"
  162. ></el-input>
  163. </span>
  164. </el-form-item>
  165. <el-form-item label="教师邮箱" :label-width="formLabelWidth">
  166. <span>
  167. <el-input
  168. placeholder="请输入教师邮箱"
  169. clearable
  170. v-model="sMail"
  171. class="add_input"
  172. ></el-input>
  173. </span>
  174. </el-form-item>
  175. <el-form-item label="所属学校" :label-width="formLabelWidth">
  176. <el-select
  177. v-model="schoolName"
  178. placeholder="请选择学校"
  179. @change="checkEva"
  180. >
  181. <el-option
  182. v-for="(item, index) in classJuri"
  183. :key="index"
  184. :label="item.name"
  185. :value="item.id"
  186. ></el-option>
  187. </el-select>
  188. </el-form-item>
  189. <div style="text-align: center; color: #adb3b7">
  190. 注:添加教师的账号密码为123456
  191. </div>
  192. </el-form>
  193. <span slot="footer" class="dialog-footer flex">
  194. <el-button class="right" @click="insertStudent">确认</el-button>
  195. </span>
  196. </el-dialog>
  197. </div>
  198. </template>
  199. <script>
  200. import $ from "jquery";
  201. import pinyin from "../../../../node_modules/js-pinyin/index";
  202. export default {
  203. data() {
  204. return {
  205. tableHeight: "500px",
  206. isLoading: false,
  207. formLabelWidth: "100px",
  208. tableData: [],
  209. dialogVisible: false,
  210. sName: "",
  211. sMail: "",
  212. sId: "",
  213. schoolName: "",
  214. schoolJuri: [],
  215. classJuri: [],
  216. fileListUpload: [],
  217. page: 1,
  218. total: 0,
  219. sPhoneUser: "",
  220. userid: this.$route.query.userid,
  221. oid: this.$route.query.oid,
  222. cid: '',
  223. org: this.$route.query.org,
  224. tx: require("../../../assets/avatar.png"),
  225. };
  226. },
  227. mounted() {
  228. this.$nextTick(function () {
  229. this.tableHeight =
  230. window.innerHeight - this.$refs.table.$el.offsetTop - 200;
  231. if (this.tableHeight <= 530) {
  232. this.tableHeight = 530;
  233. }
  234. // 监听窗口大小变化
  235. let self = this;
  236. window.onresize = function () {
  237. self.tableHeight =
  238. window.innerHeight - self.$refs.table.$el.offsetTop - 200;
  239. if (self.tableHeight <= 530) {
  240. self.tableHeight = 530;
  241. }
  242. };
  243. });
  244. },
  245. methods: {
  246. tableRowClassName({ row, rowIndex }) {
  247. if ((rowIndex + 1) % 2 === 0) {
  248. return "even_row";
  249. } else {
  250. return "";
  251. }
  252. },
  253. searchStudent() {
  254. this.page = 1;
  255. this.getStudent();
  256. },
  257. addStudent() {
  258. this.dialogVisible = true;
  259. (this.sName = ""), (this.sMail = ""), (this.schoolName = "");
  260. this.getClass();
  261. // this.getSchool();
  262. },
  263. handleClose(done) {
  264. done();
  265. },
  266. getExcel(res) {
  267. require.ensure([], () => {
  268. const {
  269. export_json_to_excel,
  270. } = require("../../../common/Export2Excel");
  271. const tHeader = ["教师姓名", "教师邮箱", "学校"];
  272. const data = [];
  273. export_json_to_excel(tHeader, data, "上传教师样例");
  274. });
  275. },
  276. handleCurrentChange(val) {
  277. this.page = val;
  278. this.getStudent();
  279. },
  280. time() {
  281. if (!this.now) {
  282. this.now = new Date().getTime();
  283. return true;
  284. } else {
  285. let time = new Date().getTime();
  286. if (time - this.now > 3000) {
  287. this.now = time;
  288. return true;
  289. } else {
  290. return false;
  291. }
  292. }
  293. },
  294. //新增学生
  295. insertStudent() {
  296. this.dialogVisible = true;
  297. if (this.sName === "") {
  298. this.$message.error("教师昵称不能为空");
  299. return;
  300. } else if (this.sMail === "") {
  301. this.$message.error("教师邮箱不能为空");
  302. return;
  303. } else if (
  304. !/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/.test(this.sMail)
  305. ) {
  306. this.$message.error("邮箱格式不正确");
  307. return;
  308. }else if(this.schoolName === ""){
  309. this.$message.error("请选择学校");
  310. return;
  311. }
  312. if (this.time()) {
  313. let params = { un: this.sMail };
  314. this.ajax
  315. .get(this.$store.state.api + "findMail", params)
  316. .then((res) => {
  317. if (res.data[0].length > 0) {
  318. this.$message.error("此邮箱已被注册");
  319. } else {
  320. this.add_Student();
  321. }
  322. })
  323. .catch((err) => {
  324. console.error(err);
  325. });
  326. }
  327. },
  328. add_Student() {
  329. let params = [
  330. {
  331. username: this.sMail,
  332. userpassword: 123456,
  333. alias: this.sName,
  334. org:this.org,
  335. oid: this.schoolName,
  336. ph: this.sPhone,
  337. sid: this.sId,
  338. cid: this.sByClass,
  339. },
  340. ];
  341. this.ajax
  342. .post(this.$store.state.api + "batchRegistration1", params)
  343. .then((res) => {
  344. debugger;
  345. let params = [
  346. {
  347. userid: res.data.uid,
  348. username: this.sName,
  349. sid: this.sId,
  350. type: 1,
  351. org:this.org,
  352. oid: res.data.oid,
  353. phone: res.data.ph,
  354. cid: res.data.cid,
  355. intro: "",
  356. sex: "0",
  357. },
  358. ];
  359. this.ajax
  360. .post(this.$store.state.api + "updateUserByEdu1", params)
  361. .then((res) => {
  362. console.log(res);
  363. })
  364. .catch((err) => {
  365. console.error(err);
  366. });
  367. this.$message({
  368. message: "新增成功",
  369. type: "success",
  370. });
  371. this.dialogVisible = false;
  372. this.sName = "";
  373. this.sMail = "";
  374. this.schoolName = "";
  375. this.getStudent();
  376. })
  377. .catch((err) => {
  378. this.isLoading = false;
  379. this.$message({
  380. message: "新增失败",
  381. type: "error",
  382. });
  383. console.error(err);
  384. });
  385. },
  386. //获取班级列表
  387. getClass() {
  388. this.isLoading = true;
  389. let params = {
  390. org: this.org,
  391. };
  392. this.ajax
  393. .get(this.$store.state.api + "selectSchoolByOrg", params)
  394. .then((res) => {
  395. this.isLoading = false;
  396. this.classJuri = res.data[0];
  397. })
  398. .catch((err) => {
  399. this.isLoading = false;
  400. console.error(err);
  401. });
  402. },
  403. // getSchool() {
  404. // this.isLoading = true;
  405. // let params = {
  406. // page: this.page,
  407. // };
  408. // this.ajax
  409. // .get(this.$store.state.api + "selectOrg", params)
  410. // .then((res) => {
  411. // this.isLoading = false;
  412. // this.schoolJuri = res.data[0];
  413. // })
  414. // .catch((err) => {
  415. // this.isLoading = false;
  416. // console.error(err);
  417. // });
  418. // },
  419. getStudent() {
  420. this.isLoading = true;
  421. let params = {
  422. org: this.org,
  423. cu: "",
  424. cn: this.sPhoneUser,
  425. page: this.page,
  426. };
  427. this.ajax
  428. .get(this.$store.state.api + "selectTeacher", params)
  429. .then((res) => {
  430. this.isLoading = false;
  431. this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
  432. this.tableData = res.data[0];
  433. })
  434. .catch((err) => {
  435. this.isLoading = false;
  436. console.error(err);
  437. });
  438. },
  439. handleChange(file) {
  440. this.fileTemp = file.file;
  441. if (this.fileTemp) {
  442. if (
  443. this.fileTemp.type ==
  444. "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" ||
  445. this.fileTemp.type == "application/vnd.ms-excel"
  446. ) {
  447. this.importCount = 1;
  448. this.importfxx(this.fileTemp);
  449. } else {
  450. this.$message({
  451. type: "warning",
  452. message: "附件格式错误,请删除后重新上传!",
  453. });
  454. }
  455. } else {
  456. this.$message({
  457. type: "warning",
  458. message: "请上传附件!",
  459. });
  460. }
  461. },
  462. handleRemove(file, fileList) {
  463. this.fileTemp = null;
  464. },
  465. exportExcel() {
  466. try {
  467. let params = {
  468. oid: this.oid,
  469. };
  470. this.ajax
  471. .get(this.$store.state.api + "selectUserBySchool", params)
  472. .then((res) => {
  473. var res = res.data[0];
  474. //如果value的json字段的key值和想要的headers值不一致时,可做如下更改
  475. //将和下面的Object.fromEntries结合,将json字段的key值改变为要求的excel的header值
  476. var array = [];
  477. for (var i = 0; i < res.length; i++) {
  478. var _json = {};
  479. _json["用户名"] = res[i].username;
  480. _json["姓名"] = res[i].alias ? res[i].alias : "";
  481. _json["班级"] = res[i].classid ? res[i].classid : "";
  482. array.push(_json);
  483. }
  484. var XLSX = require("xlsx");
  485. const workbook = XLSX.utils.book_new(); //创建一个新的工作簿对象
  486. let ws = XLSX.utils.json_to_sheet(array); //将json对象数组转化成工作表
  487. ws["!cols"] = [
  488. //设置每一列的宽度
  489. { wch: 50 },
  490. { wch: 50 },
  491. { wch: 50 },
  492. ];
  493. XLSX.utils.book_append_sheet(workbook, ws, "sheet1"); //把sheet添加到workbook里,第三个参数是sheet名
  494. XLSX.writeFile(workbook, "学生信息.xlsx");
  495. // const wopts = { bookType: "xlsx", bookSST: false, type: "array" };//写入的样式bookType:输出的文件类型,type:输出的数据类型,bookSST: 是否生成Shared String Table,官方解释是,如果开启生成速度会下降,但在低版本IOS设备上有更好的兼容性
  496. // const wbout = XLSX.write(workbook, wopts);// 浏览器端和node共有的API,实际上node可以直接使用xlsx.writeFile来写入文件,但是浏览器没有该API
  497. // FileSaver.saveAs(new Blob([wbout], { type: "application/octet-stream" }), `${title} demo.xlsx`);//保存文件
  498. this.$message({
  499. message: "导出成功",
  500. type: "success",
  501. });
  502. })
  503. .catch((err) => {
  504. console.error(err);
  505. });
  506. } catch (e) {
  507. console.log(e, e.stack);
  508. }
  509. },
  510. importfxx(obj) {
  511. const loading = this.$loading.service({
  512. background: "rgba(255, 255, 255, 0.7)",
  513. target: document.body,
  514. });
  515. var _$ = $;
  516. this.importCount++;
  517. let _this = this;
  518. // 通过DOM取文件数据
  519. this.file = obj;
  520. var rABS = false; //是否将文件读取为二进制字符串
  521. var f = this.file;
  522. var reader = new FileReader();
  523. //if (!FileReader.prototype.readAsBinaryString) {
  524. FileReader.prototype.readAsBinaryString = function (f) {
  525. var binary = "";
  526. var rABS = false; //是否将文件读取为二进制字符串
  527. var pt = this;
  528. var wb; //读取完成的数据
  529. var outdata;
  530. var reader = new FileReader();
  531. reader.onload = function (e) {
  532. var bytes = new Uint8Array(reader.result);
  533. var length = bytes.byteLength;
  534. for (var i = 0; i < length; i++) {
  535. binary += String.fromCharCode(bytes[i]);
  536. }
  537. var XLSX = require("xlsx");
  538. if (rABS) {
  539. wb = XLSX.read(btoa(fixdata(binary)), {
  540. //手动转化
  541. type: "base64",
  542. });
  543. } else {
  544. wb = XLSX.read(binary, {
  545. type: "binary",
  546. });
  547. }
  548. outdata = XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]]); //outdata就是你想要的东西
  549. this.da = [...outdata];
  550. let arr = [];
  551. this.da.map((v) => {
  552. let obj = {};
  553. obj.name = v["教师姓名"];
  554. obj.mail = v["教师邮箱"];
  555. obj.school = v["学校"];
  556. arr.push(obj);
  557. });
  558. console.log(arr);
  559. let _b = 1;
  560. for (var i = 0; i < arr.length; i++) {
  561. let item = arr[i];
  562. if (item.school === "") {
  563. _b = 1;
  564. _this.$message.error("教师学校不能为空,请重新上传");
  565. break;
  566. } else if (item.name === "") {
  567. _b = 1;
  568. _this.$message.error("教师姓名不能为空,请重新上传");
  569. break;
  570. } else if (item.mail === "") {
  571. _b = 1;
  572. _this.$message.error("教师邮箱不能为空,请重新上传");
  573. }else if (
  574. !/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/.test(
  575. item.mail
  576. )
  577. ) {
  578. _b = 1;
  579. _this.$message.error("有教师邮箱格式不正确,请重新上传");
  580. break;
  581. }
  582. }
  583. let z = 2;
  584. let newArr = JSON.stringify(arr);
  585. let params = [
  586. {
  587. arr: newArr,
  588. userpassword: 123456,
  589. org: _this.org,
  590. },
  591. ];
  592. _this.ajax
  593. .post(_this.$store.state.api + "batchRegistrationMore1", params)
  594. .then((res) => {
  595. if (z == 2) {
  596. _this.$message({
  597. message: "新增成功",
  598. type: "success",
  599. });
  600. _this.getStudent();
  601. }
  602. loading.close();
  603. })
  604. .catch((err) => {
  605. console.error(err);
  606. });
  607. _this.fileListUpload = [];
  608. };
  609. reader.readAsArrayBuffer(f);
  610. };
  611. if (rABS) {
  612. reader.readAsArrayBuffer(f);
  613. } else {
  614. reader.readAsBinaryString(f);
  615. }
  616. },
  617. getSchoolName() {
  618. let params = {
  619. oid: this.oid,
  620. };
  621. this.ajax
  622. .get(this.$store.state.api + "selectSchoolName2", params)
  623. .then((res) => {
  624. this.schoolName = res.data[0][0].name;
  625. })
  626. .catch((err) => {
  627. console.error(err);
  628. });
  629. },
  630. deleteStudent(id, state) {
  631. state = 0;
  632. let params = [{ uid: id, state: state }];
  633. this.$confirm("确定" + "删除" + "此教师吗?", "提示", {
  634. confirmButtonText: "确定",
  635. cancelButtonText: "取消",
  636. type: "warning",
  637. })
  638. .then(() => {
  639. this.ajax
  640. .post(this.$store.state.api + "deleteStudent", params)
  641. .then((res) => {
  642. this.$message({
  643. message: "操作成功",
  644. type: "success",
  645. });
  646. this.getStudent();
  647. })
  648. .catch((err) => {
  649. this.$message.error("操作失败");
  650. console.error(err);
  651. });
  652. })
  653. .catch(() => {});
  654. },
  655. },
  656. created() {
  657. this.page = 1;
  658. this.getStudent();
  659. this.getSchoolName();
  660. this.getClass();
  661. },
  662. };
  663. </script>
  664. <style scoped>
  665. .pb_head > span:nth-child(2) {
  666. font-size: 20px;
  667. margin-left: 5px;
  668. color: #828282;
  669. }
  670. .pb_head {
  671. margin: 0 !important;
  672. width: 100% !important;
  673. }
  674. .student_page {
  675. margin-top: 10px;
  676. }
  677. .student_head {
  678. margin-top: 10px;
  679. padding-bottom: 10px;
  680. display: flex;
  681. justify-content: space-between;
  682. }
  683. .head_left {
  684. display: flex;
  685. align-items: center;
  686. }
  687. .head_right {
  688. display: flex;
  689. flex-direction: row;
  690. flex-wrap: nowrap;
  691. align-items: baseline;
  692. }
  693. .student_input >>> .el-input__inner {
  694. height: 30px;
  695. width: 190px;
  696. font-size: 13px;
  697. padding: 0 10px;
  698. }
  699. .student_button {
  700. color: #fff;
  701. background: #8681b7;
  702. border-color: #8681b7;
  703. width: 60px;
  704. height: 30px;
  705. padding: 0 !important;
  706. font-size: 12px;
  707. line-height: 30px;
  708. }
  709. .head_right > button:nth-child(1) {
  710. color: #fff;
  711. background: #8681b7;
  712. border-color: #8681b7;
  713. width: 70px;
  714. height: 30px;
  715. padding: 0 !important;
  716. font-size: 12px;
  717. line-height: 30px;
  718. }
  719. .head_right > button:nth-child(2) {
  720. color: #fff;
  721. background: #8681b7;
  722. width: 70px;
  723. height: 30px;
  724. padding: 0 !important;
  725. font-size: 12px;
  726. line-height: 30px;
  727. }
  728. .head_right > div {
  729. font-size: 12px;
  730. line-height: 40px;
  731. margin-left: 10px;
  732. color: #2a6dbe;
  733. text-decoration: underline;
  734. cursor: pointer;
  735. }
  736. .student_table >>> .el-table--border td {
  737. border-right: 0px !important;
  738. }
  739. .student_table >>> .el-table,
  740. .student_table >>> .el-table__body-wrapper {
  741. height: auto !important;
  742. }
  743. .el-table >>> .even_row {
  744. background-color: #f1f1f1 !important;
  745. }
  746. .de_button {
  747. color: #fff;
  748. background: #5190fd;
  749. width: 50px;
  750. height: 25px;
  751. padding: 0 !important;
  752. font-size: 12px;
  753. line-height: 25px;
  754. }
  755. .add_student >>> .el-dialog__header {
  756. padding: 20px 20px 10px;
  757. text-align: center;
  758. background: #454545;
  759. }
  760. .add_student >>> .el-dialog__title {
  761. font-size: 14px !important;
  762. color: #fff !important;
  763. }
  764. .add_student >>> .el-dialog__headerbtn {
  765. font-size: 20px !important;
  766. }
  767. .add_student >>> .el-form-item__label {
  768. margin-left: 65px;
  769. }
  770. .add_student >>> .el-form-item {
  771. display: flex;
  772. }
  773. .add_student >>> .el-form-item__content {
  774. margin: 0 !important;
  775. }
  776. .add_input {
  777. width: 365px;
  778. }
  779. .add_student >>> .el-dialog__footer {
  780. text-align: center !important;
  781. }
  782. .right {
  783. width: 250px;
  784. color: #fff;
  785. background: #8681b7;
  786. margin-bottom: 20px;
  787. }
  788. .header-title {
  789. display: flex;
  790. }
  791. .logoImg {
  792. width: 30px;
  793. }
  794. .logoImg > img {
  795. width: 100%;
  796. height: 100%;
  797. }
  798. .title_add_student {
  799. margin: 0 auto;
  800. color: #fff;
  801. }
  802. .upload-demo {
  803. line-height: 0px !important;
  804. }
  805. .upload-demo >>> .el-button {
  806. color: #fff;
  807. background: #8681b7;
  808. width: 70px;
  809. height: 30px;
  810. padding: 0 !important;
  811. font-size: 12px;
  812. line-height: 0 !important;
  813. }
  814. .userImg {
  815. display: flex;
  816. flex-direction: row;
  817. justify-content: center;
  818. align-items: center;
  819. }
  820. .tx {
  821. width: 40px;
  822. margin-right: 10px;
  823. }
  824. .delete {
  825. width: 25px;
  826. cursor: pointer;
  827. }
  828. .tx > img,
  829. .delete > img {
  830. width: 100%;
  831. height: 100%;
  832. }
  833. .newCss {
  834. display: flex;
  835. flex-direction: row;
  836. flex-wrap: nowrap;
  837. align-items: baseline;
  838. }
  839. .student_page
  840. >>> .el-pagination.is-background
  841. .el-pager
  842. li:not(.disabled).active {
  843. background-color: #5c549f;
  844. color: #fff !important;
  845. }
  846. .student_page
  847. >>> .el-pagination.is-background
  848. .el-pager
  849. li:not(.disabled):hover {
  850. color: #5c549f;
  851. }
  852. .el-select-dropdown__item.selected {
  853. color: #5c549f;
  854. }
  855. .inputClass.is-active >>> .el-input__inner,
  856. .inputClass >>> .el-input__inner:focus {
  857. border-color: #5c549f;
  858. }
  859. .inputClass >>> .el-select .el-input.is-focus .el-input__inner {
  860. border-color: #5c549f;
  861. }
  862. .inputClass >>> .el-select .el-input__inner:focus {
  863. border-color: #5c549f;
  864. }
  865. .student_input.el-input {
  866. width: auto;
  867. }
  868. .student_input {
  869. margin-right: 10px;
  870. }
  871. .student_input >>> .el-input__icon {
  872. line-height: unset;
  873. }
  874. </style>