|
@@ -276,9 +276,10 @@
|
|
|
:file-list="fileList"
|
|
|
:auto-upload="false"
|
|
|
:http-request="handleUpload"
|
|
|
+ v-loading="importLoading"
|
|
|
>
|
|
|
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
|
|
|
- <el-button size="small" type="success" @click="submitUpload">开始上传</el-button>
|
|
|
+ <el-button size="small" type="success" @click="submitUpload" >开始上传</el-button>
|
|
|
</el-upload>
|
|
|
</el-dialog>
|
|
|
|
|
@@ -333,6 +334,7 @@ export default {
|
|
|
bomStateOption: bomStateOption,
|
|
|
writeStateOption: writeStateOption,
|
|
|
importForm: {},
|
|
|
+ importLoading: false,
|
|
|
fileList: []
|
|
|
}
|
|
|
},
|
|
@@ -643,7 +645,8 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- console.log(this.fileList)
|
|
|
+ this.importLoading = true
|
|
|
+
|
|
|
const formData = new FormData()
|
|
|
formData.append('importFile', file.file)
|
|
|
this.$http({
|
|
@@ -651,6 +654,7 @@ export default {
|
|
|
method: 'POST',
|
|
|
data: formData
|
|
|
}).then(({data}) => {
|
|
|
+ this.importLoading = false
|
|
|
if (data && data.code === '200') {
|
|
|
this.$message({
|
|
|
message: '导入成功',
|