From 05d5ca707f8efafb473945ec278c3bfb14ffaee5 Mon Sep 17 00:00:00 2001 From: wangjunyi Date: Thu, 27 Apr 2023 16:26:29 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E5=9B=9E=E8=B0=83?= =?UTF-8?q?=E5=87=BD=E6=95=B0=E6=97=B6=EF=BC=8C=E4=B8=8D=E5=8F=AF=E5=B8=A6?= =?UTF-8?q?=E4=B8=8A=E6=8B=AC=E5=8F=B7=EF=BC=8C=E5=90=A6=E5=88=99=E4=BC=9A?= =?UTF-8?q?=E5=9C=A8=E8=B0=83=E7=94=A8=E6=AD=A4=E8=AF=AD=E5=8F=A5=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E7=AB=8B=E5=8D=B3=E6=89=A7=E8=A1=8C=E4=B8=80=E6=AC=A1?= =?UTF-8?q?=E5=9B=9E=E8=B0=83=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web_src/src/components/dialog/recordDownload.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_src/src/components/dialog/recordDownload.vue b/web_src/src/components/dialog/recordDownload.vue index b3f46c87..33b0f862 100644 --- a/web_src/src/components/dialog/recordDownload.vue +++ b/web_src/src/components/dialog/recordDownload.vue @@ -161,7 +161,7 @@ export default { } setTimeout( ()=>{ if (!this.showDialog) return; - this.getProgressForFile(this.getProgressForFileTimer()) + this.getProgressForFile(this.getProgressForFileTimer) }, 1000) }, getProgressForFile: function (callback){ From 9bb710438df177511bc69f9870a98dbe2762cac1 Mon Sep 17 00:00:00 2001 From: wangjunyi Date: Thu, 27 Apr 2023 17:39:45 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=9B=BD=E6=A0=87?= =?UTF-8?q?=E8=AE=BE=E5=A4=87-=E9=80=9A=E9=81=93-=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E5=BD=95=E5=83=8F=E5=A4=84=E7=9A=84=E8=A7=86=E9=A2=91=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=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)