bug: 上传上去文件以后清空以便于下次重新上传
This commit is contained in:
@@ -843,6 +843,7 @@
|
||||
<el-upload
|
||||
multiple
|
||||
drag
|
||||
:file-list="fileList"
|
||||
:action="fileUrl"
|
||||
ref="importfile"
|
||||
name="file"
|
||||
@@ -1162,6 +1163,7 @@
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
fileList: [],
|
||||
filterText:'',
|
||||
textStatusMap: {}, // 文本状态id与name对应
|
||||
standardDrawer: false,
|
||||
@@ -1967,10 +1969,11 @@
|
||||
importFileSuccess (response, file,fileList) {
|
||||
// 上传成功后判断是否是两条数据是的话替换掉旧数据
|
||||
if (fileList.length > 1) {
|
||||
fileList.splice(0, 1)
|
||||
this.fileList = fileList.splice(0, 1)
|
||||
}
|
||||
if (response.ok) {
|
||||
this.fileMadel = false
|
||||
this.fileList = []
|
||||
if(this.fileType === 'fbgbjbd'){
|
||||
this.form.fbgbjbd = response.data.id;
|
||||
this.form.fbgbjbdName = response.data.name;
|
||||
|
||||
Reference in New Issue
Block a user