This commit is contained in:
Guoqs
2024-11-21 15:29:48 +08:00

View File

@@ -173,8 +173,8 @@
:action="uploadBluetooth.url"
:headers="uploadBluetooth.headers"
:file-list="uploadBluetooth.fileList"
:on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess"
:on-progress="handleFileUploadProgressBluetooth"
:on-success="handleFileSuccessBluetooth"
:auto-upload="false"
>
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
@@ -182,7 +182,7 @@
style="margin-left: 10px"
size="small"
type="success"
:loading="upload.isUploading"
:loading="uploadBluetooth.isUploading"
@click="submitUploadBluetooth"
>上传到服务器</el-button
>
@@ -392,7 +392,17 @@ export default {
handleFileSuccess(response, file, fileList) {
this.upload.isUploading = false;
this.form.filePath = response.fileName;
this.msgSuccess(response.msg);
this.$modal.msgSuccess(response.msg);
},
// 文件上传中处理
handleFileUploadProgressBluetooth(event, file, fileList) {
this.uploadBluetooth.isUploading = true;
},
// 文件上传成功处理
handleFileSuccessBluetooth(response, file, fileList) {
this.uploadBluetooth.isUploading = false;
this.form.filePath = response.fileName;
this.$modal.msgSuccess(response.msg);
},
},
};