From 78dc79e8222f2f76ca7b9d93866e1dcb64f6dd63 Mon Sep 17 00:00:00 2001
From: chenrui <1187576398@qq.com>
Date: 星期一, 26 五月 2025 16:34:04 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev
---
src/views/index.vue | 99 ++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 92 insertions(+), 7 deletions(-)
diff --git a/src/views/index.vue b/src/views/index.vue
index 4f5b35c..1fbed5d 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -112,7 +112,7 @@
:grid="grid"
:legend="barLegend"
:series="lineSeries"
- :tooltip="tooltip"
+ :tooltip="tooltipLine"
:xAxis="xAxis2"
:yAxis="yAxis2"
style="height: 27vh;"></Echarts>
@@ -128,6 +128,7 @@
import * as echarts from 'echarts';
import Echarts from "@/components/Echarts/echarts.vue";
import {
+ getAmountHalfYear,
getAmountMouth,
getContractAmount,
getInvoiceAmount,
@@ -232,6 +233,9 @@
type: 'shadow'
}
}
+const tooltipLine = {
+ trigger: 'axis',
+}
const yAxis1 = ref([
{
type: 'value',
@@ -313,26 +317,22 @@
materialPieSeries1.value[0].data[1].value = payableAmount.value
})
}
-// 瀹㈡埛
+// 瀹㈡埛top5
const getTopFiveListNum = async () => {
const res = await getTopFiveList()
-
const customerName = []
const totalAmount = []
-
res.data.forEach(item => {
customerName.push(item.customerName)
totalAmount.push(item.totalAmount)
})
-
-// 鉁� 姝g‘鍝嶅簲寮忚祴鍊硷細鍒涘缓鏂扮殑 xAxis 鍜� series 瀵硅薄
+// 姝g‘鍝嶅簲寮忚祴鍊硷細鍒涘缓鏂扮殑 xAxis 鍜� series 瀵硅薄
xAxis1.value = [
{
type: 'category',
data: customerName
}
]
-
barSeries.value = [
{
type: 'bar',
@@ -353,12 +353,97 @@
}
]
}
+// 绾垮舰鍥�
+const getAmountHalfYearNum = async () => {
+ const res = await getAmountHalfYear()
+ console.log(res)
+ const monthName = []
+ const receiptAmount = []
+ const invoiceAmount = []
+ res.data.forEach(item => {
+ monthName.push(item.month)
+ receiptAmount.push(item.receiptAmount)
+ invoiceAmount.push(item.invoiceAmount)
+ })
+// 姝g‘鍝嶅簲寮忚祴鍊硷細鍒涘缓鏂扮殑 xAxis 鍜� series 瀵硅薄
+ xAxis2.value = [
+ {
+ type: 'category',
+ data: monthName
+ }
+ ]
+ lineSeries.value = [
+ {
+ name: '寮�绁�',
+ type: 'line',
+ data: receiptAmount,
+ smooth: true,
+ stack: 'Total',
+ areaStyle: {
+ color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+ {
+ offset: 0,
+ color: 'rgba(131, 207, 255, 1)'
+ },
+ {
+ offset: 1,
+ color: 'rgba(186, 228, 255, 1)'
+ }
+ ])
+ },
+ // 璁剧疆灏忓渾鐐圭殑棰滆壊
+ itemStyle: {
+ color: '#2D99FF', // 灏忓渾鐐归鑹茶缃负#2D99FF
+ borderColor: '#2D99FF' // 濡傛灉闇�瑕佺殑璇濓紝鍙互璁剧疆杈规棰滆壊
+ },
+ emphasis: {
+ focus: 'series'
+ },
+ lineStyle: {
+ width: 0
+ },
+ showSymbol: false,
+ },
+ {
+ name: '鍥炴',
+ type: 'line',
+ data: invoiceAmount,
+ smooth: true,
+ stack: 'Total',
+ lineStyle: {
+ width: 0
+ },
+ // 璁剧疆灏忓渾鐐圭殑棰滆壊
+ itemStyle: {
+ color: '#83CFFF', // 灏忓渾鐐归鑹茶缃负#83CFFF
+ borderColor: '#83CFFF' // 濡傛灉闇�瑕佺殑璇濓紝鍙互璁剧疆杈规棰滆壊
+ },
+ showSymbol: false,
+ areaStyle: {
+ color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+ {
+ offset: 0,
+ color: 'rgba(54, 153, 255, 1)'
+ },
+ {
+ offset: 1,
+ color: 'rgba(89, 169, 254, 1)'
+ }
+ ])
+ },
+ emphasis: {
+ focus: 'series'
+ },
+ }
+ ]
+}
getContractAmountNum()
getInvoiceAmountNum()
getReceiptAmountNum()
getTopFiveListNum()
getAmountMouthNum()
paymentMonthListNum()
+getAmountHalfYearNum()
</script>
<style scoped>
--
Gitblit v1.9.3