From a3c3d7969a4730239a56952166ec6e98c7ebd65b Mon Sep 17 00:00:00 2001 From: tianyongbao Date: Thu, 24 Oct 2024 19:14:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BB=9F=E8=AE=A1=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=EF=BC=8C=E7=BB=9F=E4=B8=80=E4=BC=98=E5=8C=96=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/invest/accountsBalance/index.vue | 6 ++- src/views/invest/creditAnalysis/index.vue | 8 ++- src/views/invest/creditCardBill/index.vue | 2 +- .../invest/creditCardDealAnalysis/index.vue | 8 ++- .../creditInstallmentAnalysis/index.vue | 8 ++- .../index.vue | 7 ++- .../invest/dailyExpensesAnalysis/index.vue | 6 ++- src/views/invest/debitDealAnalysis/index.vue | 6 ++- src/views/invest/futuresAnalysis/index.vue | 7 ++- src/views/invest/investDealAnalysis/index.vue | 51 +++++++++++++++++-- src/views/invest/onlineLendAnalysis/index.vue | 7 ++- .../onlineLendSettledAnalysis/index.vue | 8 ++- src/views/invest/posAnalysis/index.vue | 6 ++- src/views/invest/stocksAnalysis/index.vue | 6 ++- 14 files changed, 118 insertions(+), 18 deletions(-) diff --git a/src/views/invest/accountsBalance/index.vue b/src/views/invest/accountsBalance/index.vue index a39d100..ba0be02 100644 --- a/src/views/invest/accountsBalance/index.vue +++ b/src/views/invest/accountsBalance/index.vue @@ -4,7 +4,7 @@
查询条件
- + @@ -151,6 +151,10 @@ const data = reactive({ }) const { queryParams, rules } = toRefs(data) +const handleChange = (id) => { + queryParams.value.dataType = id + getList() +} const today = new Date() const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2) const start = end diff --git a/src/views/invest/creditAnalysis/index.vue b/src/views/invest/creditAnalysis/index.vue index 4de0c47..b4fe949 100644 --- a/src/views/invest/creditAnalysis/index.vue +++ b/src/views/invest/creditAnalysis/index.vue @@ -4,7 +4,7 @@
查询条件
- + @@ -175,6 +175,12 @@ const data = reactive({ }) const { queryParams, queryCreditCardParams, rules } = toRefs(data) + +const handleCreditChange = (id) => { + queryParams.value.id = id + getList() +} + const today = new Date() const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) const start = dayjs(end).add(-11, 'months') diff --git a/src/views/invest/creditCardBill/index.vue b/src/views/invest/creditCardBill/index.vue index 2e740b5..fdafc07 100644 --- a/src/views/invest/creditCardBill/index.vue +++ b/src/views/invest/creditCardBill/index.vue @@ -296,7 +296,7 @@ function handleQuery() { /** 重置按钮操作 */ function resetQuery() { proxy.resetForm('queryRef') - queryParams.value.billState = '1' + queryParams.value.billState = null handleQuery() } diff --git a/src/views/invest/creditCardDealAnalysis/index.vue b/src/views/invest/creditCardDealAnalysis/index.vue index 41fe202..448bdf9 100644 --- a/src/views/invest/creditCardDealAnalysis/index.vue +++ b/src/views/invest/creditCardDealAnalysis/index.vue @@ -4,7 +4,7 @@
查询条件
- + @@ -276,6 +276,12 @@ const data = reactive({ }) const { queryParams, queryAcccountsParams, rules } = toRefs(data) + +const handleChange = (id) => { + queryParams.value.id = id + getList() +} + const today = new Date() const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2) const start = dayjs(end).add(-7, 'day') diff --git a/src/views/invest/creditInstallmentAnalysis/index.vue b/src/views/invest/creditInstallmentAnalysis/index.vue index 02415ab..427d63d 100644 --- a/src/views/invest/creditInstallmentAnalysis/index.vue +++ b/src/views/invest/creditInstallmentAnalysis/index.vue @@ -4,7 +4,7 @@
查询条件
- + @@ -213,6 +213,12 @@ const data = reactive({ }) const { queryParams, queryCreditCardParams, rules } = toRefs(data) + +const handleCreditChange = (id) => { + queryParams.value.id = id + getList() +} + const today = new Date() const start = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-01' // 当前月份的结束日期 diff --git a/src/views/invest/creditInstallmentSettledAnalysis/index.vue b/src/views/invest/creditInstallmentSettledAnalysis/index.vue index 38cd8bf..e6bdb3f 100644 --- a/src/views/invest/creditInstallmentSettledAnalysis/index.vue +++ b/src/views/invest/creditInstallmentSettledAnalysis/index.vue @@ -4,7 +4,7 @@
查询条件
- + @@ -197,6 +197,11 @@ const data = reactive({ }) const { queryParams, queryCreditCardParams, rules } = toRefs(data) +const handleCreditChange = (id) => { + queryParams.value.id = id + getList() +} + const today = new Date() const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) const start = dayjs(end).add(-239, 'months') diff --git a/src/views/invest/dailyExpensesAnalysis/index.vue b/src/views/invest/dailyExpensesAnalysis/index.vue index df0a843..9930b90 100644 --- a/src/views/invest/dailyExpensesAnalysis/index.vue +++ b/src/views/invest/dailyExpensesAnalysis/index.vue @@ -4,7 +4,7 @@
查询条件
- + @@ -290,6 +290,10 @@ const data = reactive({ }) const { queryParams, queryAcccountsParams, rules } = toRefs(data) +const handleChange = (id) => { + queryParams.value.id = id + getList() +} const today = new Date() const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2) const start = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-01' diff --git a/src/views/invest/debitDealAnalysis/index.vue b/src/views/invest/debitDealAnalysis/index.vue index 2b35b2a..b721d71 100644 --- a/src/views/invest/debitDealAnalysis/index.vue +++ b/src/views/invest/debitDealAnalysis/index.vue @@ -4,7 +4,7 @@
查询条件
- + @@ -276,6 +276,10 @@ const data = reactive({ }) const { queryParams, queryAcccountsParams, rules } = toRefs(data) +const handleChange = (id) => { + queryParams.value.id = id + getList() +} const today = new Date() const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2) const start = dayjs(end).add(-7, 'day') diff --git a/src/views/invest/futuresAnalysis/index.vue b/src/views/invest/futuresAnalysis/index.vue index 73d5646..bb942e2 100644 --- a/src/views/invest/futuresAnalysis/index.vue +++ b/src/views/invest/futuresAnalysis/index.vue @@ -4,7 +4,7 @@
查询条件
- + @@ -197,6 +197,11 @@ const data = reactive({ }) const { queryParams, queryFutureStocksListParams, rules } = toRefs(data) +const handleChange = (id) => { + queryParams.value.id = id + getList() +} + const today = new Date() const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) const start = dayjs(end).add(-59, 'months') diff --git a/src/views/invest/investDealAnalysis/index.vue b/src/views/invest/investDealAnalysis/index.vue index 1100b60..ccc9617 100644 --- a/src/views/invest/investDealAnalysis/index.vue +++ b/src/views/invest/investDealAnalysis/index.vue @@ -4,7 +4,7 @@
查询条件
- + @@ -67,6 +67,28 @@ +
+
+ +
+
+
交易次数
+
+ {{ account.count }} +
+
+
+
+
+ +
+
+
平均收益
+
+ {{ account.average }} +
+
+
@@ -94,13 +116,13 @@
-
盈利笔数
+
交易笔数
- {{ account.incomeCount }} + {{ account.incomeCount + account.expensesCount }}
-
+
投资账户收益统计
@@ -209,6 +231,11 @@ const data = reactive({ }) const { queryParams, queryAcccountsParams, rules } = toRefs(data) +const handleChange = (id) => { + queryParams.value.id = id + getList() +} + const today = new Date() const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2) const start = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-01' @@ -238,6 +265,14 @@ function formatMultiLineData(data) { return data.replace(//g, '
') } } +function average() { + if (account.tableAccountsList.length > 0) { + return parseFloat(account.amount / account.tableAccountsList.length).toFixed(2) + } else { + return 0 + } +} + const disabledDateFun = (time) => { const arr = [0, 30, 365, 365 * 5] const days = arr[queryParams.value.type] @@ -304,6 +339,12 @@ function getList() { getAcccountsDealAnalysis(params).then((response) => { loading.value = false account.value = { ...response.data } + account.value.count = response.data.tableAccountsList.length + if (response.data.tableAccountsList.length > 0) { + account.value.average = parseFloat(account.value.amount / response.data.tableAccountsList.length).toFixed(2) + } else { + account.value.average = 0 + } account.value.acccountsList.map((item) => { return { name: item.time, diff --git a/src/views/invest/onlineLendAnalysis/index.vue b/src/views/invest/onlineLendAnalysis/index.vue index 6d19e13..84f4016 100644 --- a/src/views/invest/onlineLendAnalysis/index.vue +++ b/src/views/invest/onlineLendAnalysis/index.vue @@ -4,7 +4,7 @@
查询条件
- + @@ -214,6 +214,11 @@ const data = reactive({ }) const { queryParams, queryCreditCardParams, rules } = toRefs(data) +const handleCreditChange = (id) => { + queryParams.value.id = id + getList() +} + const today = new Date() const start = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-01' // 当前月份的结束日期 diff --git a/src/views/invest/onlineLendSettledAnalysis/index.vue b/src/views/invest/onlineLendSettledAnalysis/index.vue index f2ba642..b6a658a 100644 --- a/src/views/invest/onlineLendSettledAnalysis/index.vue +++ b/src/views/invest/onlineLendSettledAnalysis/index.vue @@ -4,7 +4,7 @@
查询条件
- + @@ -198,6 +198,12 @@ const data = reactive({ }) const { queryParams, queryCreditCardParams, rules } = toRefs(data) + +const handleCreditChange = (id) => { + queryParams.value.id = id + getList() +} + const today = new Date() const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) const start = dayjs(end).add(-239, 'months') diff --git a/src/views/invest/posAnalysis/index.vue b/src/views/invest/posAnalysis/index.vue index 522f6ad..8169dd3 100644 --- a/src/views/invest/posAnalysis/index.vue +++ b/src/views/invest/posAnalysis/index.vue @@ -4,7 +4,7 @@
查询条件
- + @@ -193,6 +193,10 @@ const data = reactive({ }) const { queryParams, queryPosMachineParams, rules } = toRefs(data) +const handleChange = (id) => { + queryParams.value.id = id + getList() +} const today = new Date() const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2) const start = dayjs(end).add(-1, 'months') diff --git a/src/views/invest/stocksAnalysis/index.vue b/src/views/invest/stocksAnalysis/index.vue index 02b8a16..ba5d4d5 100644 --- a/src/views/invest/stocksAnalysis/index.vue +++ b/src/views/invest/stocksAnalysis/index.vue @@ -4,7 +4,7 @@
查询条件
- + @@ -198,6 +198,10 @@ const data = reactive({ }) const { queryParams, queryFutureStocksListParams, rules } = toRefs(data) +const handleChange = (id) => { + queryParams.value.id = id + getList() +} const today = new Date() const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) const start = dayjs(end).add(-59, 'months')