From 678f10c96b9ad0b5fc3ba1eb1499b6aff057c388 Mon Sep 17 00:00:00 2001 From: tcy <1193318383@qq.com> Date: Fri, 22 Aug 2025 17:18:05 +0800 Subject: [PATCH] =?UTF-8?q?feat(largeScreen):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=8E=B0=E9=87=91=E6=B5=81=E6=80=BB=E5=92=8C=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=B9=B6=E6=9B=B4=E6=96=B0=E5=8F=B3=E4=BE=A7=E9=9D=A2=E6=9D=BF?= =?UTF-8?q?=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 api/largeScreen/index.js 中添加 cashTotal 接口 - 在 rightPage.vue 中引入 cashTotal 接口并获取数据 - 更新 rightPage.vue 中的现金流数据显示,使用从接口获取的数据 --- src/api/largeScreen/index.js | 8 ++++++++ src/views/largeScreen/components/rightPage.vue | 18 +++++++++++------- src/views/largeScreen/index.vue | 2 ++ 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src/api/largeScreen/index.js b/src/api/largeScreen/index.js index a108295..69bd7e8 100644 --- a/src/api/largeScreen/index.js +++ b/src/api/largeScreen/index.js @@ -20,3 +20,11 @@ export const monthCash = () => { method: 'get', }); }; +// 现金流总和 + +export const cashTotal = () => { + return request({ + url: '/money/big/screen/cashTotal', + method: 'get', + }); +}; \ No newline at end of file diff --git a/src/views/largeScreen/components/rightPage.vue b/src/views/largeScreen/components/rightPage.vue index 8081940..71725c9 100644 --- a/src/views/largeScreen/components/rightPage.vue +++ b/src/views/largeScreen/components/rightPage.vue @@ -11,17 +11,17 @@
现金流入
-
1000000
+
{{ bigDataObj.incomeCash }}
万元
现金流出
-
1000000
+
{{ bigDataObj.expensesCash }}
万元
净现金流
-
1000000
+
{{ bigDataObj.profitCash }}
万元
@@ -45,10 +45,11 @@ import TitleComponent from './TitleComponent.vue'; import EchartBox from '@/components/EchartBox/index.vue'; import { getLineOption, getBarOptions } from './optionList'; import ProgressComponent from './ProgressComponent.vue'; -import { monthMoney, monthCash } from '@/api/largeScreen'; +import { monthMoney, monthCash, cashTotal } from '@/api/largeScreen'; const lineOption = ref(); const barOption = ref(); +const bigDataObj = ref({}); const getCapitalData = async () => { const { data } = await monthMoney() @@ -56,8 +57,7 @@ const getCapitalData = async () => { const income = data.map((item: any) => item.incomeAmount); const expenses = data.map((item: any) => item.expensesAmount); const profit = data.map((item: any) => item.profitAmount); - // const xData = data.map((item) => item.time); - // const yData = data.map((item) => item.content); + const lineData = { xLabel: month, line1: [ @@ -81,7 +81,6 @@ const getTurnoverList = async () => { const month = data.map((item: any) => item.month); const income = data.map((item: any) => item.incomeAmount); const expenses = data.map((item: any) => item.expensesAmount); - // const profit = data.map((item: any) => item.profitAmount); const barData = { name: month, value: [ @@ -91,9 +90,14 @@ const getTurnoverList = async () => { }; barOption.value = getBarOptions(barData); }; +const getTotalAmonunt = async () => { + const { data } = await cashTotal() + bigDataObj.value = data +}; onMounted(() => { getCapitalData(); getTurnoverList(); + getTotalAmonunt(); }); //资金KPI diff --git a/src/views/largeScreen/index.vue b/src/views/largeScreen/index.vue index 8ce47fd..8c47968 100644 --- a/src/views/largeScreen/index.vue +++ b/src/views/largeScreen/index.vue @@ -21,6 +21,7 @@ import leftPage from './components/leftPage.vue'; import centerPage from './components/centerPage.vue'; import rightPage from './components/rightPage.vue'; // import '@/assets/styles/element.scss'; +