|
@@ -25,7 +25,7 @@
|
|
|
</div>
|
|
|
<div class="head_right">
|
|
|
<el-button @click="addStudent">添加学生</el-button>
|
|
|
- <!-- <el-upload
|
|
|
+ <el-upload
|
|
|
class="upload-demo"
|
|
|
:http-request="handleChange"
|
|
|
:on-remove="handleRemove"
|
|
@@ -34,9 +34,12 @@
|
|
|
accept=".xlsx"
|
|
|
>
|
|
|
<el-button size="primary" type="primary">批量添加</el-button>
|
|
|
- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
|
|
|
+ <div slot="tip" class="el-upload__tip">
|
|
|
+ 只能上传jpg/png文件,且不超过500kb
|
|
|
+ </div>
|
|
|
</el-upload>
|
|
|
- <div @click="getExcel">xls 上传样例</div> -->
|
|
|
+ <!-- <el-button @click="exportExcel">导出学生</el-button> -->
|
|
|
+ <div @click="getExcel">xls 上传样例</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -66,7 +69,17 @@
|
|
|
alt=""
|
|
|
/>
|
|
|
</div>
|
|
|
- <div style="width:50px;text-align:left;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">{{ scope.row.name }}</div>
|
|
|
+ <div
|
|
|
+ style="
|
|
|
+ width: 50px;
|
|
|
+ text-align: left;
|
|
|
+ white-space: nowrap;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ "
|
|
|
+ >
|
|
|
+ {{ scope.row.name }}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -77,14 +90,13 @@
|
|
|
align="center"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
- <!-- <el-table-column
|
|
|
- prop="sex"
|
|
|
- label="性别"
|
|
|
+ <el-table-column
|
|
|
+ prop="studentid"
|
|
|
+ label="学号"
|
|
|
min-width="10"
|
|
|
align="center"
|
|
|
>
|
|
|
- {{ this.tableData.sex ? this.tableData.sex : "男" }}
|
|
|
- </el-table-column> -->
|
|
|
+ </el-table-column>
|
|
|
<!-- <el-table-column
|
|
|
prop="school"
|
|
|
label="学校"
|
|
@@ -92,13 +104,13 @@
|
|
|
align="center"
|
|
|
>
|
|
|
</el-table-column> -->
|
|
|
- <el-table-column
|
|
|
+ <!-- <el-table-column
|
|
|
prop="classname"
|
|
|
label="班级"
|
|
|
min-width="15"
|
|
|
align="center"
|
|
|
>
|
|
|
- </el-table-column>
|
|
|
+ </el-table-column> -->
|
|
|
<el-table-column label="操作" min-width="20">
|
|
|
<template slot-scope="scope">
|
|
|
<!-- <el-button
|
|
@@ -154,6 +166,16 @@
|
|
|
></el-input>
|
|
|
</span>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="学生学号" :label-width="formLabelWidth">
|
|
|
+ <span>
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入学生学号"
|
|
|
+ clearable
|
|
|
+ v-model="sId"
|
|
|
+ class="add_input"
|
|
|
+ ></el-input>
|
|
|
+ </span>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="学生手机号" :label-width="formLabelWidth">
|
|
|
<span>
|
|
|
<el-input
|
|
@@ -205,6 +227,7 @@
|
|
|
|
|
|
<script>
|
|
|
import $ from "jquery";
|
|
|
+import pinyin from "../../../node_modules/js-pinyin/index";
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -215,6 +238,7 @@ export default {
|
|
|
dialogVisible: false,
|
|
|
sName: "",
|
|
|
sPhone: "",
|
|
|
+ sId: "",
|
|
|
schoolName: "",
|
|
|
// sBySchool: [],
|
|
|
// sBySchoolName:"",
|
|
@@ -273,14 +297,7 @@ export default {
|
|
|
getExcel(res) {
|
|
|
require.ensure([], () => {
|
|
|
const { export_json_to_excel } = require("../../common/Export2Excel");
|
|
|
- const tHeader = [
|
|
|
- "学生姓名",
|
|
|
- "学生手机号",
|
|
|
- "性别",
|
|
|
- "学校",
|
|
|
- "班级",
|
|
|
- "(注:导入学校为:" + this.schoolName + ")",
|
|
|
- ];
|
|
|
+ const tHeader = ["学号", "学生姓名", "学生邮箱", "学生手机号", "班级"];
|
|
|
const data = [];
|
|
|
export_json_to_excel(tHeader, data, "上传学生样例");
|
|
|
});
|
|
@@ -309,6 +326,9 @@ export default {
|
|
|
if (this.sName === "") {
|
|
|
this.$message.error("学生昵称不能为空");
|
|
|
return;
|
|
|
+ } else if (this.sId === "") {
|
|
|
+ this.$message.error("学生学号不能为空");
|
|
|
+ return;
|
|
|
} else if (this.sPhone === "") {
|
|
|
this.$message.error("学生手机号不能为空");
|
|
|
return;
|
|
@@ -339,7 +359,19 @@ export default {
|
|
|
if (res.data[0].length > 0) {
|
|
|
this.$message.error("此学生邮箱已被注册");
|
|
|
} else {
|
|
|
- this.add_Student();
|
|
|
+ let params = { un: this.sId };
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api + "findSid", params)
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data[0].length > 0) {
|
|
|
+ this.$message.error("此学生学号已被注册");
|
|
|
+ } else {
|
|
|
+ this.add_Student();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
}
|
|
|
})
|
|
|
.catch((err) => {
|
|
@@ -373,10 +405,11 @@ export default {
|
|
|
{
|
|
|
userid: res.data.uid,
|
|
|
username: this.sName,
|
|
|
+ sid: this.sId,
|
|
|
type: 2,
|
|
|
oid: res.data.oid,
|
|
|
phone: res.data.ph,
|
|
|
- cid:res.data.cid,
|
|
|
+ cid: res.data.cid,
|
|
|
intro: "",
|
|
|
sex: "0",
|
|
|
},
|
|
@@ -494,6 +527,52 @@ export default {
|
|
|
handleRemove(file, fileList) {
|
|
|
this.fileTemp = null;
|
|
|
},
|
|
|
+ exportExcel() {
|
|
|
+ try {
|
|
|
+ let params = {
|
|
|
+ oid: this.oid,
|
|
|
+ };
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api + "selectUserBySchool", params)
|
|
|
+ .then((res) => {
|
|
|
+ var res = res.data[0];
|
|
|
+ //如果value的json字段的key值和想要的headers值不一致时,可做如下更改
|
|
|
+ //将和下面的Object.fromEntries结合,将json字段的key值改变为要求的excel的header值
|
|
|
+ var array = [];
|
|
|
+ for (var i = 0; i < res.length; i++) {
|
|
|
+ var _json = {};
|
|
|
+ _json["用户名"] = res[i].username;
|
|
|
+ _json["姓名"] = res[i].alias ? res[i].alias : "";
|
|
|
+ _json["班级"] = res[i].classid ? res[i].classid : "";
|
|
|
+ array.push(_json);
|
|
|
+ }
|
|
|
+
|
|
|
+ var XLSX = require("xlsx");
|
|
|
+ const workbook = XLSX.utils.book_new(); //创建一个新的工作簿对象
|
|
|
+ let ws = XLSX.utils.json_to_sheet(array); //将json对象数组转化成工作表
|
|
|
+ ws["!cols"] = [
|
|
|
+ //设置每一列的宽度
|
|
|
+ { wch: 50 },
|
|
|
+ { wch: 50 },
|
|
|
+ { wch: 50 },
|
|
|
+ ];
|
|
|
+ XLSX.utils.book_append_sheet(workbook, ws, "sheet1"); //把sheet添加到workbook里,第三个参数是sheet名
|
|
|
+ XLSX.writeFile(workbook, "学生信息.xlsx");
|
|
|
+ // const wopts = { bookType: "xlsx", bookSST: false, type: "array" };//写入的样式bookType:输出的文件类型,type:输出的数据类型,bookSST: 是否生成Shared String Table,官方解释是,如果开启生成速度会下降,但在低版本IOS设备上有更好的兼容性
|
|
|
+ // const wbout = XLSX.write(workbook, wopts);// 浏览器端和node共有的API,实际上node可以直接使用xlsx.writeFile来写入文件,但是浏览器没有该API
|
|
|
+ // FileSaver.saveAs(new Blob([wbout], { type: "application/octet-stream" }), `${title} demo.xlsx`);//保存文件
|
|
|
+ this.$message({
|
|
|
+ message: "导出成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ } catch (e) {
|
|
|
+ console.log(e, e.stack);
|
|
|
+ }
|
|
|
+ },
|
|
|
importfxx(obj) {
|
|
|
const loading = this.$loading.service({
|
|
|
background: "rgba(255, 255, 255, 0.7)",
|
|
@@ -537,10 +616,13 @@ export default {
|
|
|
let arr = [];
|
|
|
this.da.map((v) => {
|
|
|
let obj = {};
|
|
|
- obj.name = v["学生名称"];
|
|
|
+ let a = "";
|
|
|
+ a =
|
|
|
+ pinyin.getFullChars(v["学生姓名"]).toLowerCase() + "@cocorobo.cc";
|
|
|
+ obj.sId = v["学号"];
|
|
|
+ obj.name = v["学生姓名"];
|
|
|
+ obj.mail = v["学生邮箱"] != undefined ? v["学生邮箱"] : a;
|
|
|
obj.phone = v["学生手机号"];
|
|
|
- // obj.sex = v["性別"];
|
|
|
- // obj.school = this.$store.state.userInfo.organizeid;
|
|
|
obj.class = v["班级"];
|
|
|
arr.push(obj);
|
|
|
});
|
|
@@ -556,13 +638,30 @@ export default {
|
|
|
_b = 1;
|
|
|
_this.$message.error("学生姓名不能为空,请重新上传");
|
|
|
break;
|
|
|
- } else if (item.phone === "") {
|
|
|
+ } else if (item.sId === "") {
|
|
|
_b = 1;
|
|
|
- _this.$message.error("学生手机号不能为空,请重新上传");
|
|
|
+ _this.$message.error("学生学号不能为空,请重新上传");
|
|
|
+ }
|
|
|
+ // else if (item.phone === "") {
|
|
|
+ // _b = 1;
|
|
|
+ // _this.$message.error("学生手机号不能为空,请重新上传");
|
|
|
+ // break;
|
|
|
+ // } else if (!/^[1][3,4,5,7,8][0-9]{9}$/.test(item.phone)) {
|
|
|
+ // _b = 1;
|
|
|
+ // _this.$message.error("有学生手机号格式不正确,请重新上传");
|
|
|
+ // break;
|
|
|
+ // }
|
|
|
+ else if (item.mail === "") {
|
|
|
+ _b = 1;
|
|
|
+ _this.$message.error("学生邮箱不能为空,请重新上传");
|
|
|
break;
|
|
|
- } else if (!/^[1][3,4,5,7,8][0-9]{9}$/.test(item.phone)) {
|
|
|
+ } else if (
|
|
|
+ !/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/.test(
|
|
|
+ item.mail
|
|
|
+ )
|
|
|
+ ) {
|
|
|
_b = 1;
|
|
|
- _this.$message.error("有学生手机号格式不正确,请重新上传");
|
|
|
+ _this.$message.error("有学生邮箱格式不正确,请重新上传");
|
|
|
break;
|
|
|
}
|
|
|
// else if (item.school === "") {
|
|
@@ -575,40 +674,40 @@ export default {
|
|
|
// _this.$message.error("学生性别不能为空,请重新上传");
|
|
|
// break;
|
|
|
// }
|
|
|
- if (item.class != "") {
|
|
|
- let _a;
|
|
|
- let params = {
|
|
|
- className: item.class,
|
|
|
- };
|
|
|
+ // if (item.class != "") {
|
|
|
+ // let _a;
|
|
|
+ // let params = {
|
|
|
+ // className: item.class,
|
|
|
+ // };
|
|
|
|
|
|
- _$.ajax({
|
|
|
- url: _this.$store.state.api + "selectC", //url路径
|
|
|
- type: "GET", //GET
|
|
|
- async: false, //或false,是否异步
|
|
|
- data: params,
|
|
|
- timeout: 5000, //超时时间
|
|
|
- dataType: "json", //返回的数据格式:
|
|
|
- beforeSend: function (xhr) {},
|
|
|
- success: function (res, textStatus, jqXHR) {
|
|
|
- if (res[0].length == 0) {
|
|
|
- _a = 1;
|
|
|
- _this.$message.error(
|
|
|
- "有学生班级不存在,请去添加后并重新上传"
|
|
|
- );
|
|
|
- } else {
|
|
|
- item.classid = res[0][0].id;
|
|
|
- }
|
|
|
- },
|
|
|
- error: function (xhr, textStatus) {
|
|
|
- console.log(textStatus);
|
|
|
- },
|
|
|
- complete: function () {},
|
|
|
- });
|
|
|
- if (_a == 1) {
|
|
|
- _b = 1;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
+ // _$.ajax({
|
|
|
+ // url: _this.$store.state.api + "selectC", //url路径
|
|
|
+ // type: "GET", //GET
|
|
|
+ // async: false, //或false,是否异步
|
|
|
+ // data: params,
|
|
|
+ // timeout: 5000, //超时时间
|
|
|
+ // dataType: "json", //返回的数据格式:
|
|
|
+ // beforeSend: function (xhr) {},
|
|
|
+ // success: function (res, textStatus, jqXHR) {
|
|
|
+ // if (res[0].length == 0) {
|
|
|
+ // _a = 1;
|
|
|
+ // _this.$message.error(
|
|
|
+ // "有学生班级不存在,请去添加后并重新上传"
|
|
|
+ // );
|
|
|
+ // } else {
|
|
|
+ // item.classid = res[0][0].id;
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // error: function (xhr, textStatus) {
|
|
|
+ // console.log(textStatus);
|
|
|
+ // },
|
|
|
+ // complete: function () {},
|
|
|
+ // });
|
|
|
+ // if (_a == 1) {
|
|
|
+ // _b = 1;
|
|
|
+ // break;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
// if (item.school != "") {
|
|
|
// let _a;
|
|
|
// let params = {
|
|
@@ -643,69 +742,187 @@ export default {
|
|
|
// break;
|
|
|
// }
|
|
|
// }
|
|
|
- if (item.phone != "") {
|
|
|
- let params = { un: item.phone };
|
|
|
- let _a;
|
|
|
- _$.ajax({
|
|
|
- url: _this.$store.state.api + "findPhone", //url路径
|
|
|
- type: "GET", //GET
|
|
|
- async: false, //或false,是否异步
|
|
|
- data: params,
|
|
|
- timeout: 5000, //超时时间
|
|
|
- dataType: "json", //返回的数据格式:
|
|
|
- beforeSend: function (xhr) {},
|
|
|
- success: function (res, textStatus, jqXHR) {
|
|
|
- if (res[0].length > 0) {
|
|
|
- _this.$message.error("此学生手机号码已被注册");
|
|
|
- _a = 1;
|
|
|
- }
|
|
|
- },
|
|
|
- error: function (xhr, textStatus) {
|
|
|
- console.log(textStatus);
|
|
|
- },
|
|
|
- complete: function () {},
|
|
|
- });
|
|
|
- if (_a == 1) {
|
|
|
- _b = 1;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- _b = 2;
|
|
|
- }
|
|
|
- if (_b == 2) {
|
|
|
- for (var i = 0; i < arr.length; i++) {
|
|
|
- let _i = i;
|
|
|
- let item = arr[i];
|
|
|
- let params = {
|
|
|
- ph: item.phone,
|
|
|
- username: item.name,
|
|
|
+ // for (var k = 0; k < arr.length; k++) {
|
|
|
+ // if (item.phone != "") {
|
|
|
+ // let params = { un: item.phone };
|
|
|
+ // let _a;
|
|
|
+ // _$.ajax({
|
|
|
+ // url: _this.$store.state.api + "findPhone", //url路径
|
|
|
+ // type: "GET", //GET
|
|
|
+ // async: false, //或false,是否异步
|
|
|
+ // data: params,
|
|
|
+ // timeout: 5000, //超时时间
|
|
|
+ // dataType: "json", //返回的数据格式:
|
|
|
+ // beforeSend: function (xhr) {},
|
|
|
+ // success: function (res, textStatus, jqXHR) {
|
|
|
+ // if (res[0].length > 0) {
|
|
|
+ // _this.$message.error("有学生手机号码已被注册");
|
|
|
+ // _a = 1;
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // error: function (xhr, textStatus) {
|
|
|
+ // console.log(textStatus);
|
|
|
+ // },
|
|
|
+ // complete: function () {},
|
|
|
+ // });
|
|
|
+ // if (_a == 1) {
|
|
|
+ // _b = 1;
|
|
|
+ // break;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // if (item.mail != "") {
|
|
|
+ // let params = { un: item.mail };
|
|
|
+ // let _a;
|
|
|
+ // _$.ajax({
|
|
|
+ // url: _this.$store.state.api + "findMail", //url路径
|
|
|
+ // type: "GET", //GET
|
|
|
+ // async: false, //或false,是否异步
|
|
|
+ // data: params,
|
|
|
+ // timeout: 5000, //超时时间
|
|
|
+ // dataType: "json", //返回的数据格式:
|
|
|
+ // beforeSend: function (xhr) {},
|
|
|
+ // success: function (res, textStatus, jqXHR) {
|
|
|
+ // if (res[0].length > 0) {
|
|
|
+ // _this.$message.error("有学生邮箱已被注册");
|
|
|
+ // _a = 1;
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // error: function (xhr, textStatus) {
|
|
|
+ // console.log(textStatus);
|
|
|
+ // },
|
|
|
+ // complete: function () {},
|
|
|
+ // });
|
|
|
+ // if (_a == 1) {
|
|
|
+ // _b = 1;
|
|
|
+ // break;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // if (item.sId != "") {
|
|
|
+ // let params = { un: item.sId };
|
|
|
+ // let _a;
|
|
|
+ // _$.ajax({
|
|
|
+ // url: _this.$store.state.api + "findSid", //url路径
|
|
|
+ // type: "GET", //GET
|
|
|
+ // async: false, //或false,是否异步
|
|
|
+ // data: params,
|
|
|
+ // timeout: 5000, //超时时间
|
|
|
+ // dataType: "json", //返回的数据格式:
|
|
|
+ // beforeSend: function (xhr) {},
|
|
|
+ // success: function (res, textStatus, jqXHR) {
|
|
|
+ // if (res[0].length > 0) {
|
|
|
+ // _this.$message.error("有学生学号重复");
|
|
|
+ // _a = 1;
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // error: function (xhr, textStatus) {
|
|
|
+ // console.log(textStatus);
|
|
|
+ // },
|
|
|
+ // complete: function () {},
|
|
|
+ // });
|
|
|
+ // if (_a == 1) {
|
|
|
+ // _b = 1;
|
|
|
+ // break;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // _b = 2;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // if (_b == 2) {
|
|
|
+ let z = 2;
|
|
|
+ let newArr = JSON.stringify(arr);
|
|
|
+ let params = [
|
|
|
+ {
|
|
|
+ arr: newArr,
|
|
|
userpassword: 123456,
|
|
|
- type: 2,
|
|
|
- // oid: item.schoolid,
|
|
|
oid: _this.oid,
|
|
|
- tid: _this.userid,
|
|
|
- cid: item.classid,
|
|
|
- };
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ _this.ajax
|
|
|
+ .post(_this.$store.state.api + "batchRegistrationMore", params)
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data.type == 1) {
|
|
|
+ _this.$message.error("有学生手机号码已被注册");
|
|
|
+ z = 1;
|
|
|
+ }
|
|
|
+ if (res.data.type == 2) {
|
|
|
+ _this.$message.error("有学生邮箱已被注册");
|
|
|
+ z = 1;
|
|
|
+ }
|
|
|
+ if (res.data.type == 3) {
|
|
|
+ _this.$message.error("有学生学号重复");
|
|
|
+ z = 1;
|
|
|
+ }
|
|
|
+ if (z == 2) {
|
|
|
+ _this.$message({
|
|
|
+ message: "新增成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ // for (var i = 0; i < arr.length; i++) {
|
|
|
+ // let _i = i;
|
|
|
+ // let item = arr[i];
|
|
|
+ // let params = [
|
|
|
+ // {
|
|
|
+ // alias: item.name,
|
|
|
+ // username: item.mail,
|
|
|
+ // userpassword: 123456,
|
|
|
+ // oid: _this.oid,
|
|
|
+ // ph: item.phone,
|
|
|
+ // cid: item.class,
|
|
|
+ // },
|
|
|
+ // ];
|
|
|
|
|
|
- _this.ajax
|
|
|
- .get(_this.$store.state.api + "insertStudent", params)
|
|
|
- .then((res) => {
|
|
|
- if (_i == arr.length - 1) {
|
|
|
- loading.close();
|
|
|
- _this.$message({
|
|
|
- message: "上传成功",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
- _this.getStudent();
|
|
|
- }
|
|
|
- })
|
|
|
- .catch((err) => {
|
|
|
- _this.$message.error("添加失败");
|
|
|
- console.error(err);
|
|
|
- });
|
|
|
- }
|
|
|
- } else {
|
|
|
- loading.close();
|
|
|
+ // _this.ajax
|
|
|
+ // .post(_this.$store.state.api + "batchRegistration", params)
|
|
|
+ // .then((res) => {
|
|
|
+ // let params = [
|
|
|
+ // {
|
|
|
+ // userid: res.data.uid,
|
|
|
+ // username: item.name,
|
|
|
+ // sId: item.sId,
|
|
|
+ // type: 2,
|
|
|
+ // oid: res.data.oid,
|
|
|
+ // phone: res.data.ph ? res.data.ph : "",
|
|
|
+ // cid: res.data.cid ? res.data.cid : "",
|
|
|
+ // intro: "",
|
|
|
+ // sex: "0",
|
|
|
+ // },
|
|
|
+ // ];
|
|
|
+ // _this.ajax
|
|
|
+ // .post(_this.$store.state.api + "updateUserByEdu", params)
|
|
|
+ // .then((res) => {
|
|
|
+ // console.log(res);
|
|
|
+ // })
|
|
|
+ // .catch((err) => {
|
|
|
+ // console.error(err);
|
|
|
+ // });
|
|
|
+ // loading.close();
|
|
|
+ // // _this.$message({
|
|
|
+ // // message: "新增成功",
|
|
|
+ // // type: "success",
|
|
|
+ // // });
|
|
|
+ // _this.getStudent();
|
|
|
+ // // if (_i == arr.length - 1) {
|
|
|
+ // // loading.close();
|
|
|
+ // // _this.$message({
|
|
|
+ // // message: "上传成功",
|
|
|
+ // // type: "success",
|
|
|
+ // // });
|
|
|
+ // // _this.getStudent();
|
|
|
+ // // }
|
|
|
+ // })
|
|
|
+ // .catch((err) => {
|
|
|
+ // _this.$message.error("上传失败");
|
|
|
+ // console.error(err);
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ // loading.close();
|
|
|
}
|
|
|
|
|
|
_this.fileListUpload = [];
|