From 9bb710438df177511bc69f9870a98dbe2762cac1 Mon Sep 17 00:00:00 2001 From: wangjunyi Date: Thu, 27 Apr 2023 17:39:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=9B=BD=E6=A0=87=E8=AE=BE?= =?UTF-8?q?=E5=A4=87-=E9=80=9A=E9=81=93-=E8=AE=BE=E5=A4=87=E5=BD=95?= =?UTF-8?q?=E5=83=8F=E5=A4=84=E7=9A=84=E8=A7=86=E9=A2=91=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web_src/src/components/dialog/recordDownload.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web_src/src/components/dialog/recordDownload.vue b/web_src/src/components/dialog/recordDownload.vue index 33b0f862..c90cf138 100644 --- a/web_src/src/components/dialog/recordDownload.vue +++ b/web_src/src/components/dialog/recordDownload.vue @@ -179,9 +179,12 @@ export default { if (res.data.code === 0) { if (res.data.data.length === 0){ this.percentage = 0 + // 往往在多次请求后(实验五分钟的视频是三次请求),才会返回数据,第一次请求通常是返回空数组 + if (callback)callback() return } - this.percentage = parseFloat(res.data.data.percentage)*100 + // res.data.data应是数组类型 + 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)