|
@ -409,7 +409,8 @@ export default { |
|
|
.then((res) => { |
|
|
.then((res) => { |
|
|
console.log("res-up", res); |
|
|
console.log("res-up", res); |
|
|
if (res.data.code == 0 && res.data.msg == "success") { |
|
|
if (res.data.code == 0 && res.data.msg == "success") { |
|
|
this.upload2(this.fileData, this.importCode); |
|
|
// this.upload2(this.fileData, this.importCode); |
|
|
|
|
|
this.afterSuccess(); |
|
|
} else this.$message.error(res.data.msg); |
|
|
} else this.$message.error(res.data.msg); |
|
|
}) |
|
|
}) |
|
|
.catch((err) => { |
|
|
.catch((err) => { |
|
@ -423,7 +424,7 @@ export default { |
|
|
|
|
|
|
|
|
async upload2(file, code) { |
|
|
async upload2(file, code) { |
|
|
this.importLoading = true; |
|
|
this.importLoading = true; |
|
|
this.importBtnTitle = "正在上次中..."; |
|
|
this.importBtnTitle = "正在上传中..."; |
|
|
const formData = new FormData(); //FormData对象,添加参数只能通过append('key', value)的形式添加 |
|
|
const formData = new FormData(); //FormData对象,添加参数只能通过append('key', value)的形式添加 |
|
|
formData.append("file", file.file); //添加文件对象 |
|
|
formData.append("file", file.file); //添加文件对象 |
|
|
formData.append("code", code); //添加文件对象 |
|
|
formData.append("code", code); //添加文件对象 |
|
|