From 4bf42f316115c472875d8c4339d344090b8e6f69 Mon Sep 17 00:00:00 2001 From: ngfchl Date: Thu, 29 Sep 2022 20:37:04 +0800 Subject: [PATCH] =?UTF-8?q?=201.=20=E9=A1=B5=E9=9D=A2=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E5=99=A8=E7=9B=B8=E5=85=B3=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=20=202.=20=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E9=A2=91=E7=8E=87=EF=BC=8C=E9=BB=98=E8=AE=A41.5S?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/auto_pt/downloading.html | 309 +++++++++++++++++------------ 1 file changed, 182 insertions(+), 127 deletions(-) diff --git a/templates/auto_pt/downloading.html b/templates/auto_pt/downloading.html index 742e167..be4f051 100644 --- a/templates/auto_pt/downloading.html +++ b/templates/auto_pt/downloading.html @@ -54,139 +54,173 @@ {# 复制HASH#} 暂停刷新 {# 开始刷新#} - 开始刷新 + 3S 5S + 10S 15S - 30S - 60S - -
- - - - - - - - - {# #} - - - - - + + {# #} + + {# #} + + + {# #} + + {# #} + {# #} + {# #} + {# #} + @@ -308,7 +342,14 @@ {color: '#1989fa', percentage: 80}, {color: '#6f7ad3', percentage: 100} ], - selected_rows: [] + selected_rows: [], + categoryFilters: [ + { + text: '未分类', + value: '' + } + ], + server_state: {} }, beforeMount() { }, @@ -372,6 +413,8 @@ ).then(res => { console.log(res.data) this.get_downloading(this.downloader_id) + clearInterval(this.timer) + this.timer = null this.$message({ type: 'success', message: '指令发送成功!!' @@ -438,7 +481,19 @@ ).then(res => { {#console.log(res.data.data.torrents)#} if (res.data.code === 0) { + // 获取种子 this.torrents = res.data.data.torrents + // 获取分类列表 + let categories = res.data.data.categories + // 任务状态过滤器数据 + for (let x in res.data.data.categories) { + {#console.log(download_state[x])#} + this.categoryFilters.push({ + 'text': x, + 'value': x + }) + } + this.server_state = res.data.data.server_state //this.$message({ // type: 'success', // message: '任务加载成功!!' @@ -473,7 +528,7 @@ index = Math.floor(Math.log(srcsize) / Math.log(1024)); var size = srcsize / Math.pow(1024, index); size = size.toFixed(2);//保留的小数位数 - return size + unitArr[index]; + return size + ' ' + unitArr[index]; }, // 格式化进度 handlePercent(row, column, cellValue, index) {