优化录像下载页面

pull/845/head
648540858 2023-05-09 17:54:36 +08:00
parent a2da81f79a
commit 21258d6ba3
1 changed files with 10 additions and 4 deletions

View File

@ -7,6 +7,7 @@
</el-col>
<el-col :span="6" >
<el-button icon="el-icon-download" v-if="percentage < 100" size="mini" title="点击下载可将以缓存部分下载到本地" @click="download()"></el-button>
<el-button icon="el-icon-download" v-if="downloadFile" size="mini" title="点击下载" @click="downloadFileClientEvent()"></el-button>
</el-col>
</el-row>
</el-dialog>
@ -39,7 +40,8 @@ export default {
taskId: null,
getProgressRun: false,
getProgressForFileRun: false,
timer: null
timer: null,
downloadFile: null,
};
},
@ -187,8 +189,9 @@ export default {
this.percentage = parseFloat(res.data.data[0].percentage)*100
if (res.data.data[0].percentage === '1') {
this.getProgressForFileRun = false;
window.open(res.data.data[0].downloadFile)
this.close();
this.downloadFile = res.data.data[0].downloadFile
this.title = "文件处理完成,点击按扭下载"
// window.open(res.data.data[0].downloadFile)
}else {
if (callback)callback()
}
@ -196,6 +199,9 @@ export default {
}).catch(function (error) {
console.log(error);
});
},
downloadFileClientEvent: function (){
window.open(this.downloadFile )
}
},
destroyed() {