提交代码
This commit is contained in:
parent
737d091b75
commit
16cb03a27e
|
|
@ -41,7 +41,12 @@
|
|||
<el-button type="primary" icon="upload"
|
||||
style="background-color: #7393b7; border-color: #7393b7; border-radius: 0;">Upload</el-button>
|
||||
</el-upload>
|
||||
<!-- <el-button type="primary" icon="search" style="background-color: #7393b7; border-color: #7393b7; border-radius: 0; margin-left: 12px;" @click="onSearch">Select</el-button> -->
|
||||
<el-button type="primary" icon="search"
|
||||
style="background-color: #7393b7; border-color: #7393b7; border-radius: 0; margin-left: 12px;"
|
||||
@click="onSearch">
|
||||
<span v-if="!loading">Select</span>
|
||||
<span v-else>识别中...</span>
|
||||
</el-button>
|
||||
<el-button type="primary" icon="document"
|
||||
style="background-color: #7393b7; border-color: #7393b7; border-radius: 0; margin-left: 12px;"
|
||||
@click="onDownload">Download</el-button>
|
||||
|
|
@ -159,9 +164,7 @@ export default {
|
|||
// 文件选择变化
|
||||
handleChange(file, fileList) {
|
||||
if (file) {
|
||||
this.currentFile = file.raw || file
|
||||
this.onSearch()
|
||||
|
||||
this.currentFile = file.raw || file
|
||||
} else {
|
||||
this.currentFile = null
|
||||
}
|
||||
|
|
@ -178,6 +181,10 @@ export default {
|
|||
// // this.downloadFile(this.output_path, this.queryParams.case_no + '_' + item + '_ROC.json')
|
||||
|
||||
// })
|
||||
if (this.loading || !this.output_path) {
|
||||
this.$message.warning('暂无下载文件!');
|
||||
return false
|
||||
}
|
||||
this.$axios.get(window.CONFIG.baseUrl + '/download', { params: { path: this.output_path }, responseType: 'blob', }).then(res => {
|
||||
const downLoadName = 'pred.xlsx'
|
||||
// 通过a标签打开新页面下载文件
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user