This commit is contained in:
zhutianqi
2021-12-31 11:25:55 +08:00
parent 5e847cf946
commit fbb75e14b4
@@ -355,9 +355,11 @@
window.location.href = '/api/att/attFile/downloadFile?fileId=' + id window.location.href = '/api/att/attFile/downloadFile?fileId=' + id
}, },
importFileRemove (file, fileList) { importFileRemove (file, fileList) {
if(fileList){ if (fileList) {
this.fileList = fileList.slice(-1) this.fileList = []
} }
this.form.fileId = ''
this.form.fileName = ''
}, },
// 导入按钮 上传之前的钩子 // 导入按钮 上传之前的钩子
beginImportFile (file) { beginImportFile (file) {
@@ -387,10 +389,11 @@
// 导入标准数据成功后执行 // 导入标准数据成功后执行
importFileSuccess (response, file) { importFileSuccess (response, file) {
if (response.ok) { if (response.ok) {
this.fileList = []
this.fileMadel = false this.fileMadel = false
this.form.fileId = response.data.id this.form.fileId = response.data.id
this.form.fileName = response.data.name this.form.fileName = response.data.name
this.fileList = response.data this.fileList.push(response.data)
this.$message({ this.$message({
showClose: true, showClose: true,
message: response.message, message: response.message,