From c8025c2f6d5ba52649ebe043fa44ff8d8768f411 Mon Sep 17 00:00:00 2001 From: zhang_12370 <z2864490065@outlook.com> Date: 星期三, 25 六月 2025 11:37:31 +0800 Subject: [PATCH] 开发通用查看单条数据的详情页面 优化基础模块 优化生产加工数据匹配渲染问题 --- src/views/production/index.vue | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/src/views/production/index.vue b/src/views/production/index.vue index 498bc21..223d465 100644 --- a/src/views/production/index.vue +++ b/src/views/production/index.vue @@ -81,10 +81,15 @@ import {useTableData} from "./components/useTableData.js"; import {useDialog} from "./components/useDialog.js"; import {useCoalData} from "./components/useCoalData.js"; +import {getCoalInfoList} from "@/api/production"; // 琛ㄦ牸鍒楅厤缃� const columns = [ - {prop: "coal", label: "鐓ょ", minWidth: 150, slot: 'coal'}, + {prop: "coalId", label: "鐓ょ", minWidth: 150, + formatter: (row) => { + return coalInfoList.value.find(item => item.id == row.coalId)?.coal || '--'; + } + }, {prop: "productionQuantity", label: "鐢熶骇鏁伴噺", minWidth: 120}, {prop: "laborCost", label: "浜哄伐鎴愭湰", minWidth: 150}, {prop: "energyConsumptionCost", label: "鑳借�楁垚鏈�", minWidth: 120}, @@ -134,10 +139,13 @@ ElMessage.success("鎿嶄綔鎴愬姛"); }); }; +const coalInfoList = ref([]); // 缁勪欢鎸傝浇鏃跺姞杞芥暟鎹� onMounted(async () => { await getCoalData(); // 棰勫姞杞界叅绉嶆暟鎹� getList(); + let res = await getCoalInfoList() + coalInfoList.value = res.data; }); </script> -- Gitblit v1.9.3