From cbad076e3b24d765c4478b90bd831f1b43f89e8f Mon Sep 17 00:00:00 2001 From: tianyongbao Date: Tue, 22 Oct 2024 11:22:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=97=A5=E5=B8=B8=E6=94=AF=E5=87=BA?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E5=8F=8A=E6=94=B6=E7=9B=8A=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=BC=98=E5=8C=96=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../invest/accountDealAnalysis/index.vue | 30 ++++- src/views/invest/accountDealRecord/index.vue | 5 + src/views/invest/accountsBalance/index.vue | 30 ++++- .../invest/creditCardDealAnalysis/index.vue | 30 ++++- .../invest/dailyExpensesAnalysis/index.vue | 122 ++++++++++++++++-- src/views/invest/debitDealAnalysis/index.vue | 30 ++++- src/views/invest/futuresAnalysis/index.vue | 30 ++++- src/views/invest/investAnalysis/index.vue | 30 ++++- src/views/invest/investDealAnalysis/index.vue | 30 ++++- src/views/invest/stocksAnalysis/index.vue | 30 ++++- 10 files changed, 299 insertions(+), 68 deletions(-) diff --git a/src/views/invest/accountDealAnalysis/index.vue b/src/views/invest/accountDealAnalysis/index.vue index 2388d63..9b0ef25 100644 --- a/src/views/invest/accountDealAnalysis/index.vue +++ b/src/views/invest/accountDealAnalysis/index.vue @@ -423,17 +423,25 @@ const drawBar = (data) => { type: 'bar', barWidth: 20, // 根据需求调整数值大小,单位是像素 itemStyle: { - color: '#2283cf' + // 此处可以是一个固定颜色值,也可以是一个回调函数根据数据动态计算颜色 + color: function (params) { + // 这里可以根据需要设置不同的颜色,比如根据数据值 + if (params.data <= 0) { + return 'green' + } else if (params.data > 0) { + return 'red' + } + } } } ], // 添加点击事件的处理函数 emphasis: { - itemStyle: { - color: '#2283cf', - barWidth: 20 // 根据需求调整数值大小,单位是像素 - }, - barWidth: 24 // 根据需求调整数值大小,单位是像素 + // itemStyle: { + // color: '#2283cf', + // barWidth: 20 // 根据需求调整数值大小,单位是像素 + // }, + // barWidth: 24 // 根据需求调整数值大小,单位是像素 } } @@ -497,7 +505,15 @@ const drawLine = (data) => { color: '#4181c9' }, itemStyle: { - color: '#4181c9' + // 此处可以是一个固定颜色值,也可以是一个回调函数根据数据动态计算颜色 + color: function (params) { + // 这里可以根据需要设置不同的颜色,比如根据数据值 + if (params.data <= 0) { + return 'green' + } else if (params.data > 0) { + return 'red' + } + } }, smooth: true, symbol: 'emptyCircle', diff --git a/src/views/invest/accountDealRecord/index.vue b/src/views/invest/accountDealRecord/index.vue index 78accac..026ab6e 100644 --- a/src/views/invest/accountDealRecord/index.vue +++ b/src/views/invest/accountDealRecord/index.vue @@ -23,6 +23,11 @@ + + + + + diff --git a/src/views/invest/accountsBalance/index.vue b/src/views/invest/accountsBalance/index.vue index 70639b1..a39d100 100644 --- a/src/views/invest/accountsBalance/index.vue +++ b/src/views/invest/accountsBalance/index.vue @@ -290,17 +290,25 @@ const drawBar = (data) => { type: 'bar', barWidth: 20, // 根据需求调整数值大小,单位是像素 itemStyle: { - color: '#2283cf' + // 此处可以是一个固定颜色值,也可以是一个回调函数根据数据动态计算颜色 + color: function (params) { + // 这里可以根据需要设置不同的颜色,比如根据数据值 + if (params.data <= 0) { + return 'green' + } else if (params.data > 0) { + return 'red' + } + } } } ], // 添加点击事件的处理函数 emphasis: { - itemStyle: { - color: '#2283cf', - barWidth: 20 // 根据需求调整数值大小,单位是像素 - }, - barWidth: 24 // 根据需求调整数值大小,单位是像素 + // itemStyle: { + // color: '#2283cf', + // barWidth: 20 // 根据需求调整数值大小,单位是像素 + // }, + // barWidth: 24 // 根据需求调整数值大小,单位是像素 } } @@ -364,7 +372,15 @@ const drawLine = (data) => { color: '#4181c9' }, itemStyle: { - color: '#4181c9' + // 此处可以是一个固定颜色值,也可以是一个回调函数根据数据动态计算颜色 + color: function (params) { + // 这里可以根据需要设置不同的颜色,比如根据数据值 + if (params.data <= 0) { + return 'green' + } else if (params.data > 0) { + return 'red' + } + } }, smooth: true, symbol: 'emptyCircle', diff --git a/src/views/invest/creditCardDealAnalysis/index.vue b/src/views/invest/creditCardDealAnalysis/index.vue index b66b684..41fe202 100644 --- a/src/views/invest/creditCardDealAnalysis/index.vue +++ b/src/views/invest/creditCardDealAnalysis/index.vue @@ -472,17 +472,25 @@ const drawBar = (data) => { type: 'bar', barWidth: 20, // 根据需求调整数值大小,单位是像素 itemStyle: { - color: '#2283cf' + // 此处可以是一个固定颜色值,也可以是一个回调函数根据数据动态计算颜色 + color: function (params) { + // 这里可以根据需要设置不同的颜色,比如根据数据值 + if (params.data <= 0) { + return 'green' + } else if (params.data > 0) { + return 'red' + } + } } } ], // 添加点击事件的处理函数 emphasis: { - itemStyle: { - color: '#2283cf', - barWidth: 20 // 根据需求调整数值大小,单位是像素 - }, - barWidth: 24 // 根据需求调整数值大小,单位是像素 + // itemStyle: { + // color: '#2283cf', + // barWidth: 20 // 根据需求调整数值大小,单位是像素 + // }, + // barWidth: 24 // 根据需求调整数值大小,单位是像素 } } @@ -546,7 +554,15 @@ const drawLine = (data) => { color: '#4181c9' }, itemStyle: { - color: '#4181c9' + // 此处可以是一个固定颜色值,也可以是一个回调函数根据数据动态计算颜色 + color: function (params) { + // 这里可以根据需要设置不同的颜色,比如根据数据值 + if (params.data <= 0) { + return 'green' + } else if (params.data > 0) { + return 'red' + } + } }, smooth: true, symbol: 'emptyCircle', diff --git a/src/views/invest/dailyExpensesAnalysis/index.vue b/src/views/invest/dailyExpensesAnalysis/index.vue index c7d2014..df0a843 100644 --- a/src/views/invest/dailyExpensesAnalysis/index.vue +++ b/src/views/invest/dailyExpensesAnalysis/index.vue @@ -111,19 +111,99 @@ +
+
+ +
+
+
{{ account.top5Name }}
+
+ {{ account.top5 }} +
+
+
+ +
+
+
+ +
+
+
{{ account.top6Name }}
+
+ {{ account.top6 }} +
+
+
+
+
+ +
+
+
{{ account.top7Name }}
+
+ {{ account.top7 }} +
+
+
+
+
+ +
+
+
{{ account.top8Name }}
+
+ {{ account.top8 }} +
+
+
+
+
+ +
+
+
{{ account.top9Name }}
+
+ {{ account.top9 }} +
+
+
+
+
+ +
+
+
{{ account.top10Name }}
+
+ {{ account.top10 }} +
+
+
+
+
+ +
+
+
{{ account.top11Name }}
+
+ {{ account.top11 }} +
+
+
日常支出统计
- - - + + + +
- +