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 }}
+
+
+
-
+
{{ scope.$index + 1 }}
@@ -132,8 +212,17 @@
-
-
+
+
+
+
+
+ {{ scope.$index + 1 }}
+
+
+
+
+
@@ -166,7 +255,7 @@ const dates = [
const accountsList = ref([])
const loading = ref(true)
const total = ref(0)
-const radioVal = ref('表格')
+const radioVal = ref('分类柱状图')
const dateValidate = (rules, value, callback) => {
const dateType = rules.dateType || 'days'
const num = rules.num || 31
@@ -264,6 +353,10 @@ const chartData = ref({
name: [],
value1: []
})
+const lineData = ref({
+ name: [],
+ value1: []
+})
/** 查询管理列表 */
function getAcccountsList() {
@@ -275,6 +368,7 @@ function getAcccountsList() {
function getList() {
loading.value = true
chartData.value = { name: [], value1: [] }
+ lineData.value = { name: [], value1: [] }
const { type, time, id, dataType, dealType, dealCategory } = queryParams.value
let formatValue = 'YYYY-MM-DD'
if (type === 1) {
@@ -306,6 +400,10 @@ function getList() {
chartData.value.name.push(item.time)
chartData.value.value1.push(item.value)
})
+ response.data.acccountsDateList.map((item) => {
+ lineData.value.name.push(item.time)
+ lineData.value.value1.push(item.value)
+ })
handleRadioChange(currentType.value)
})
}
@@ -429,7 +527,7 @@ const drawLine = (data) => {
type: 'shadow'
},
formatter: function (params) {
- return params[0].name + '
' + '交易金额:' + params[0].value + '元'
+ return params[0].name + '
' + '支出金额:' + params[0].value + '元'
}
},
xAxis: {
@@ -498,15 +596,15 @@ const drawLine = (data) => {
myChart.setOption(option)
}
-const currentType = ref('柱状图')
+const currentType = ref('分类柱状图')
const handleRadioChange = (type) => {
currentType.value = type
switch (type) {
- case '柱状图':
+ case '分类柱状图':
drawBar(chartData.value)
break
- case '折线图':
- drawLine(chartData.value)
+ case '日期折线图':
+ drawLine(lineData.value)
break
default:
break
diff --git a/src/views/invest/debitDealAnalysis/index.vue b/src/views/invest/debitDealAnalysis/index.vue
index 08f8aae..2b35b2a 100644
--- a/src/views/invest/debitDealAnalysis/index.vue
+++ b/src/views/invest/debitDealAnalysis/index.vue
@@ -467,17 +467,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 // 根据需求调整数值大小,单位是像素
}
}
@@ -541,7 +549,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/futuresAnalysis/index.vue b/src/views/invest/futuresAnalysis/index.vue
index 51c9e60..73d5646 100644
--- a/src/views/invest/futuresAnalysis/index.vue
+++ b/src/views/invest/futuresAnalysis/index.vue
@@ -379,17 +379,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 // 根据需求调整数值大小,单位是像素
}
}
@@ -453,7 +461,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/investAnalysis/index.vue b/src/views/invest/investAnalysis/index.vue
index d6a88c3..7e9b986 100644
--- a/src/views/invest/investAnalysis/index.vue
+++ b/src/views/invest/investAnalysis/index.vue
@@ -380,17 +380,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 // 根据需求调整数值大小,单位是像素
}
}
@@ -454,7 +462,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/investDealAnalysis/index.vue b/src/views/invest/investDealAnalysis/index.vue
index eaf9845..1100b60 100644
--- a/src/views/invest/investDealAnalysis/index.vue
+++ b/src/views/invest/investDealAnalysis/index.vue
@@ -400,17 +400,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 // 根据需求调整数值大小,单位是像素
}
}
@@ -474,7 +482,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/stocksAnalysis/index.vue b/src/views/invest/stocksAnalysis/index.vue
index 3410486..02b8a16 100644
--- a/src/views/invest/stocksAnalysis/index.vue
+++ b/src/views/invest/stocksAnalysis/index.vue
@@ -380,17 +380,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 // 根据需求调整数值大小,单位是像素
}
}
@@ -454,7 +462,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',