投资账户收益统计
@@ -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')