优化录像下载页面
parent
a2da81f79a
commit
21258d6ba3
|
@ -7,6 +7,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6" >
|
<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="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-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
@ -39,7 +40,8 @@ export default {
|
||||||
taskId: null,
|
taskId: null,
|
||||||
getProgressRun: false,
|
getProgressRun: false,
|
||||||
getProgressForFileRun: false,
|
getProgressForFileRun: false,
|
||||||
timer: null
|
timer: null,
|
||||||
|
downloadFile: null,
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -187,8 +189,9 @@ export default {
|
||||||
this.percentage = parseFloat(res.data.data[0].percentage)*100
|
this.percentage = parseFloat(res.data.data[0].percentage)*100
|
||||||
if (res.data.data[0].percentage === '1') {
|
if (res.data.data[0].percentage === '1') {
|
||||||
this.getProgressForFileRun = false;
|
this.getProgressForFileRun = false;
|
||||||
window.open(res.data.data[0].downloadFile)
|
this.downloadFile = res.data.data[0].downloadFile
|
||||||
this.close();
|
this.title = "文件处理完成,点击按扭下载"
|
||||||
|
// window.open(res.data.data[0].downloadFile)
|
||||||
}else {
|
}else {
|
||||||
if (callback)callback()
|
if (callback)callback()
|
||||||
}
|
}
|
||||||
|
@ -196,6 +199,9 @@ export default {
|
||||||
}).catch(function (error) {
|
}).catch(function (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
downloadFileClientEvent: function (){
|
||||||
|
window.open(this.downloadFile )
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
destroyed() {
|
destroyed() {
|
||||||
|
|
Loading…
Reference in New Issue