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 |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/src/views/production/index.vue b/src/views/production/index.vue
index 8108dd7..223d465 100644
--- a/src/views/production/index.vue
+++ b/src/views/production/index.vue
@@ -1,5 +1,5 @@
 <template>
-  <div class="production-container">
+  <div class="app-container">
     <!-- 鎼滅储琛ㄥ崟 -->
     <el-form :inline="true" :model="queryParams" class="search-form">
       <el-form-item label="鎼滅储">
@@ -37,7 +37,7 @@
           @edit="row => openDialog('edit', row)"
           :show-selection="true"
           :border="true"
-          :maxHeight="480"
+          style="width: 100%;height: calc(100vh - 26em)"
       >
         <template #coal="{ row }">
           <div class="coal-tags">
@@ -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