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'; +