From d54e45f8c324cb1dc3094a644697ae92210cd736 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期二, 27 一月 2026 17:31:09 +0800
Subject: [PATCH] feat: BI大屏接口对接
---
src/views/reportAnalysis/dataDashboard/components/basic/right-top.vue | 25 +++++++++++++------------
1 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/src/views/reportAnalysis/dataDashboard/components/basic/right-top.vue b/src/views/reportAnalysis/dataDashboard/components/basic/right-top.vue
index 4c023ff..357a452 100644
--- a/src/views/reportAnalysis/dataDashboard/components/basic/right-top.vue
+++ b/src/views/reportAnalysis/dataDashboard/components/basic/right-top.vue
@@ -25,7 +25,7 @@
import Echarts from '@/components/Echarts/echarts.vue'
import PanelHeader from '../PanelHeader.vue'
import DateTypeSwitch from '../DateTypeSwitch.vue'
-import { statisticsReceivablePayable } from '@/api/viewIndex.js'
+import { supplierPurchaseRanking } from '@/api/viewIndex.js'
const chartStyle = {
width: '100%',
@@ -242,6 +242,7 @@
z: 6,
type: 'bar',
barWidth: 25,
+ tooltip: { show: false },
itemStyle: {
color: 'rgba(255,255,255,.1)',
barBorderRadius: [0, 20, 20, 0],
@@ -252,6 +253,7 @@
type: 'bar',
barWidth: 25,
barGap: '-100%',
+ tooltip: { show: false },
itemStyle: {
color: {
type: 'linear',
@@ -282,16 +284,15 @@
]
})
-// 搴斾粯搴旀敹缁熻
-const statisticsReceivable = () => {
- statisticsReceivablePayable({ type: radio1.value })
+// 渚涘簲鍟嗛噰璐帓鍚�
+const fetchSupplierRanking = () => {
+ supplierPurchaseRanking({ type: radio1.value })
.then((res) => {
- // 鍋囪 API 杩斿洖鐨勬暟鎹牸寮忎负鏁扮粍锛屽寘鍚� NAME 鍜� NUM 瀛楁
- // 濡傛灉杩斿洖鏍煎紡涓嶅悓锛岄渶瑕佹牴鎹疄闄� API 璋冩暣
- if (res.data && Array.isArray(res.data)) {
- dataArr.value = res.data
- } else if (res.data && res.data.list) {
- dataArr.value = res.data.list
+ if (res.code === 200 && Array.isArray(res.data)) {
+ dataArr.value = res.data.map(item => ({
+ NAME: item.supplierName,
+ NUM: item.totalAmount
+ }))
} else {
// 濡傛灉娌℃湁鏁版嵁锛屼娇鐢ㄦā鎷熸暟鎹�
dataArr.value = [
@@ -318,11 +319,11 @@
// 澶勭悊鏃ユ湡绫诲瀷鍒囨崲
const handleDateTypeChange = (value) => {
- statisticsReceivable()
+ fetchSupplierRanking()
}
onMounted(() => {
- statisticsReceivable()
+ fetchSupplierRanking()
})
</script>
--
Gitblit v1.9.3