b0894a3d by 杨威

属性导入和楼盘表上传功能loading

1 parent bb9ff632
......@@ -12,6 +12,7 @@
action="/api/tx/excelGeo/import"
:data="sxdrData"
:on-success="uploadSuccess"
:before-upload="uploadProgress"
:show-file-list="false"
multiple
>
......@@ -92,17 +93,21 @@
elemIF.style.display = "none";
document.body.appendChild(elemIF)
},
uploadProgress(){
vm.loadingShow('正在导入中')
},
uploadSuccess(res, file, fileList) {
this.errorData = [];
vm.loadingHide();
if (res.success) {
this.$message.success("上传成功")
this.$message.success("导入成功")
this.loading();
this.close()
} else {
if (res.result == null) {
this.$message.error(res.message)
} else {
this.$message.error("上传失败")
this.$message.error("导入失败")
this.errorData = res.result;
}
}
......
......@@ -330,6 +330,7 @@
:on-preview="handlePreview"
:on-remove="handleRemove"
:before-remove="beforeRemove"
:before-upload="uploadProgress"
:on-success="uploadSuccess"
:on-error="uploadError"
:show-file-list="false"
......@@ -564,7 +565,11 @@ export default {
Message.error("上传文件失败")
console.log("上传文件失败", err)
},
uploadProgress(){
vm.loadingShow('正在上传中')
},
uploadSuccess(res, file, fileList) {
vm.loadingHide();
Message.success("上传成功")
this.uploadVisible = false;
},
......