Compare commits
No commits in common. "e7e5481d6b1789649ec612743d8a672523e04448" and "0f158f35b49dbd5a8c018dac2711b3e8817887d9" have entirely different histories.
e7e5481d6b
...
0f158f35b4
|
|
@ -63,7 +63,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div v-show="!selectUser" class="toolbar-container">
|
<div v-show="!selectUser" class="toolbar-container">
|
||||||
<!-- 按钮组 -->
|
<!-- 按钮组 -->
|
||||||
<el-button type="success" @click="importData(ImportStudent)">导入用户</el-button>
|
<el-button type="success" @click="importData">导入用户</el-button>
|
||||||
<el-button type="default" @click="downLoadImportUsersTemplate"
|
<el-button type="default" @click="downLoadImportUsersTemplate"
|
||||||
>下载学生模板</el-button
|
>下载学生模板</el-button
|
||||||
>
|
>
|
||||||
|
|
@ -692,6 +692,7 @@ const importUpdateStudent = () => {
|
||||||
};
|
};
|
||||||
const importData = (api = null) => {
|
const importData = (api = null) => {
|
||||||
console.log("批量导入");
|
console.log("批量导入");
|
||||||
|
api = api ?? ImportStudent;
|
||||||
let fileE = document.createElement("input");
|
let fileE = document.createElement("input");
|
||||||
fileE.type = "file";
|
fileE.type = "file";
|
||||||
var formData = new window.FormData();
|
var formData = new window.FormData();
|
||||||
|
|
@ -718,13 +719,7 @@ const importData = (api = null) => {
|
||||||
document.body.appendChild(link);
|
document.body.appendChild(link);
|
||||||
link.click();
|
link.click();
|
||||||
document.body.removeChild(link);
|
document.body.removeChild(link);
|
||||||
ElMessage.warning("导入失败,已导出错误数据");
|
ElMessage.success("导入失败,已导出错误数据");
|
||||||
ElMessage({
|
|
||||||
showClose: true,
|
|
||||||
type: "warning",
|
|
||||||
message: "导入失败,已导出错误数据.",
|
|
||||||
duration: 0,
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
try {
|
try {
|
||||||
fileE.click();
|
fileE.click();
|
||||||
|
|
|
||||||
|
|
@ -742,12 +742,7 @@ const importData = () => {
|
||||||
document.body.appendChild(link);
|
document.body.appendChild(link);
|
||||||
link.click();
|
link.click();
|
||||||
document.body.removeChild(link);
|
document.body.removeChild(link);
|
||||||
ElMessage({
|
ElMessage.success("导入失败,已导出错误数据");
|
||||||
showClose: true,
|
|
||||||
type: 'warning',
|
|
||||||
message: '导入失败,已导出错误数据.',
|
|
||||||
duration: 0,
|
|
||||||
})
|
|
||||||
};
|
};
|
||||||
try {
|
try {
|
||||||
fileE.click();
|
fileE.click();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue