From add294f3c89ab2c6adbe11bc5c718c855a7fc545 Mon Sep 17 00:00:00 2001
From: maven <2163098428@qq.com>
Date: 星期五, 10 十月 2025 15:56:25 +0800
Subject: [PATCH] yys 联调关键煤种锁仓页面
---
src/views/index.vue | 38 +++++++++++++++++++++++++-------------
1 files changed, 25 insertions(+), 13 deletions(-)
diff --git a/src/views/index.vue b/src/views/index.vue
index 473aff0..941b982 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -121,18 +121,21 @@
:header-cell-style="tableHeaderStyle"
>
<el-table-column
- prop="product"
+ prop="coalName"
label="浜у搧"
+ align="center"
mini-width="50"
></el-table-column>
<el-table-column
- prop="quantity"
+ prop="inventoryQuantity"
label="鏁伴噺"
+ align="center"
mini-width="50"
></el-table-column>
<el-table-column
- prop="amount"
+ prop="totalAmount"
label="閲戦"
+ align="center"
mini-width="50"
></el-table-column>
</el-table>
@@ -233,13 +236,7 @@
}
// 閿�鍞暟鎹師濮�
-const salesData = [
- { product: "鍘熺叅", quantity: "1234鍚�", amount: "楼456789", status: "宸插畬鎴�" },
- { product: "绮剧叅", quantity: "567鍚�", amount: "楼234567", status: "宸插畬鎴�" },
- { product: "鐒︾叅", quantity: "890鍚�", amount: "楼345678", status: "杩涜涓�" },
- { product: "鍧楃叅", quantity: "432鍚�", amount: "楼123456", status: "宸插畬鎴�" },
- { product: "鐓ゆ偿", quantity: "20000鍚�", amount: "楼234567", status: "杩涜涓�" },
-];
+const salesData = ref([]);
const tableHeaderStyle = {
backgroundColor: "#f5f7fa",
@@ -398,7 +395,7 @@
},
xAxis: {
type: "category",
- data: ["鍘熺叅", "绮剧叅", "鐒︾叅", "鍧楃叅", "鐓ゆ偿"],
+ data: resultMonthList.value.Xkeys || [],
axisLabel: {
fontSize: 11,
},
@@ -413,7 +410,7 @@
{
name: "閿�閲�",
type: "bar",
- data: [320, 302, 301, 334, 290],
+ data: resultMonthList.value.Yvalues || [],
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: "#409EFF" },
@@ -464,7 +461,18 @@
Yvalues: inventoryListYvalues,
};
}
- console.log(inventoryList.value)
+ if(homePageData.value.resultMouth){
+ let resultMonthXkeys = Object.keys(homePageData.value.resultMouth);
+ let resultMonthYvalues = Object.values(homePageData.value.resultMouth);
+ resultMonthList.value = {
+ Xkeys: resultMonthXkeys,
+ Yvalues: resultMonthYvalues,
+ };
+ console.log(resultMonthList.value);
+ }
+ if(homePageData.value.salesResults){
+ salesData.value = homePageData.value.salesResults;
+ }
// 鏁版嵁鍔犺浇瀹屾垚鍚庨噸鏂板垵濮嬪寲鍥捐〃
nextTick(() => {
initCharts();
@@ -474,6 +482,7 @@
}
};
const inventoryList = ref([]);
+const resultMonthList = ref([]);
const supplyTrend = ref({});
const searchMonth = async () => {
@@ -486,6 +495,9 @@
Xkeys,
Yvalues,
};
+ nextTick(() => {
+ initAreaChart();
+ });
};
onMounted(() => {
getList();
--
Gitblit v1.9.3