student.vue 24 KB

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