From 300715d0e7984a1a3cd2b26a1425a0d111ef1db3 Mon Sep 17 00:00:00 2001 From: ngfchl Date: Tue, 6 Dec 2022 23:57:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E5=8D=95=E4=B8=AA=E7=AB=99?= =?UTF-8?q?=E7=82=B9=E7=9A=84=E4=B8=8A=E4=BC=A0=E5=A2=9E=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/auto_pt/status.html | 38 ++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/templates/auto_pt/status.html b/templates/auto_pt/status.html index b85f5f7..5cca388 100644 --- a/templates/auto_pt/status.html +++ b/templates/auto_pt/status.html @@ -339,24 +339,25 @@
- - - - - + + + + + + + - - @@ -941,7 +942,6 @@ this.setChartOption(this.chart, option) }, setLine(siteData) { - let site = siteData.site this.site = siteData.site let dataList = siteData.site_status_list let uploadedList = [] @@ -951,6 +951,8 @@ let ratioList = [] let seedingSizeList = [] let dateList = [] + let increment = [] + dataList.forEach((info, index) => { uploadedList.push(info.uploaded) ratioList.push(info.ratio) @@ -960,6 +962,13 @@ bonusList.push(info.bonus) dateList.push(info.info_date) }) + let uploaded1 = uploadedList.filter((item, index) => index > 0) + let uploaded2 = uploadedList.filter((item, index) => index < uploadedList.length) + let diff = [0,] + uploaded1.forEach((item, index) => { + diff.push(item - uploaded2[index]) + }) + console.log(diff) let option = { //title: { // text: site.name, @@ -1028,12 +1037,20 @@ data: downloadedList }, + ] }; this.showSiteChart = true setTimeout(() => { this.chart = this.$refs.seeding_charts.chart this.setChartOption(this.chart, option) + option.series = [{ + name: '上传增量', + type: 'bar', + {#stack: 'Total',#} + data: diff + }] + this.setChartOption(this.$refs.diff_charts.chart, option) {#option.title.text = `${site.name} - 魔力积分`#} option.series = [{ name: '魔力值', @@ -1064,6 +1081,7 @@ option.tooltip.valueFormatter = null option.yAxis.axisLabel.formatter = null this.setChartOption(this.$refs.ratio_charts.chart, option) + }, 50)