Commit 765c9170 authored by zhangyichen's avatar zhangyichen

修改bug 56462 用户管理,文件未作清空处理;56464 用户管理,上传错误的文件一直loading

parent 2045b956
...@@ -321,7 +321,7 @@ ...@@ -321,7 +321,7 @@
<div slot="tip" class="el-upload__tip" style="color:red">提示:仅允许导入“xls”或“xlsx”格式文件!</div> <div slot="tip" class="el-upload__tip" style="color:red">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
</el-upload> </el-upload>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="upload.open = false">取 消</el-button> <el-button @click="upload.open = false, fileList = []">取 消</el-button>
<el-button :loading="importLoading" type="primary" @click="submitFileForm">确 定</el-button> <el-button :loading="importLoading" type="primary" @click="submitFileForm">确 定</el-button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -970,6 +970,7 @@ export default { ...@@ -970,6 +970,7 @@ export default {
handleImport() { handleImport() {
this.upload.title = '用户导入' this.upload.title = '用户导入'
this.upload.open = true this.upload.open = true
this.fileList = []
}, },
/** 下载模板操作 */ /** 下载模板操作 */
importTemplate() { importTemplate() {
...@@ -996,6 +997,7 @@ export default { ...@@ -996,6 +997,7 @@ export default {
this.upload.isUploading = false this.upload.isUploading = false
this.$refs.upload.clearFiles() this.$refs.upload.clearFiles()
this.$alert(response.msg, '导入结果', { dangerouslyUseHTMLString: true }) this.$alert(response.msg, '导入结果', { dangerouslyUseHTMLString: true })
this.fileList = []
this.getList() this.getList()
}, },
// 提交上传文件 // 提交上传文件
...@@ -1038,8 +1040,8 @@ export default { ...@@ -1038,8 +1040,8 @@ export default {
this.$message.info('上传超时,请重新上传') this.$message.info('上传超时,请重新上传')
this.importLoading = false this.importLoading = false
} }
this.importLoading = false
}).catch(err => { }).catch(err => {
this.$message.success(err.message)
this.importLoading = false this.importLoading = false
}) })
} }
...@@ -1048,7 +1050,7 @@ export default { ...@@ -1048,7 +1050,7 @@ export default {
if (fileList.length > 1) { if (fileList.length > 1) {
fileList.splice(0, 1) fileList.splice(0, 1)
} }
this.fileList = fileList[0].raw this.fileList = [fileList[0].raw]
}, },
handleRemove(file, fileList) { handleRemove(file, fileList) {
this.fileList = [] this.fileList = []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment