From 0f03d13f0477a4ad12adee19cd5b68bbd462b0b6 Mon Sep 17 00:00:00 2001 From: ngfchl Date: Sun, 11 Dec 2022 20:25:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=8D=95=E4=B8=AA=E7=AB=99?= =?UTF-8?q?=E7=82=B9=E5=9B=BE=E8=A1=A8=E4=BF=A1=E6=81=AF=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/auto_pt/status.html | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/templates/auto_pt/status.html b/templates/auto_pt/status.html index 83b7948..bcb0abe 100644 --- a/templates/auto_pt/status.html +++ b/templates/auto_pt/status.html @@ -358,14 +358,15 @@ append-to-body style="background-color: rgba(227, 229, 229, 0.6);">
-

-历史数据

+

--历史数据

+ {# @change="showAllIncrementHistory">#} + @change="showHistoryList(site.id)"> 7天 15天 30天 @@ -577,6 +578,9 @@ }) }, showHistoryList(id) { + if (!id) { + id = 0 + } axios.get( "{% url 'site_data_api' %}" + '?id=' + id ).then(res => { @@ -1125,7 +1129,10 @@ dataList.sort((a, b) => { return a.info_date - b.info_date }) - dataList.forEach((info, index) => { + let resList = [] + resList = JSON.parse(JSON.stringify(dataList)).slice(this.dataLength); + {#dataList.forEach((info, index) => {#} + resList.forEach((info, index) => { uploadedList.push(info.uploaded) ratioList.push(info.ratio) seedingSizeList.push(info.seedingSize)