From c7afec3ad75b22bc8b96d8129956913c2b473d9b Mon Sep 17 00:00:00 2001
From: 张诺 <zhang_12370@163.com>
Date: 星期四, 19 六月 2025 16:11:36 +0800
Subject: [PATCH] 优化生产管理接口及表格字段

---
 src/views/production/components/useCoalData.js |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/views/production/components/useCoalData.js b/src/views/production/components/useCoalData.js
index 61179b4..37b2245 100644
--- a/src/views/production/components/useCoalData.js
+++ b/src/views/production/components/useCoalData.js
@@ -3,7 +3,7 @@
  * 鎻愪緵鐓ょ鏁版嵁鐨勮幏鍙栥�佺紦瀛樸�佽浆鎹㈢瓑鍔熻兘
  */
 import { ref, computed, watch } from 'vue';
-import { getCoalFieldList } from '@/api/basicInformation/coalQualityMaintenance';
+import { getCoalInfoList } from "@/api/production";
 import { ElMessage } from 'element-plus';
 
 // 鍏ㄥ眬鐓ょ鏁版嵁缂撳瓨
@@ -33,7 +33,7 @@
 
     isLoading.value = true;
     try {
-      const res = await getCoalFieldList();
+      const res = await getCoalInfoList();
       if (res.code === 200) {
         coalData.value = res.data;
         isLoaded.value = true;
@@ -55,21 +55,21 @@
   const getCoalNameById = (id) => {
     if (!id || coalData.value.length === 0) return id;
     const coal = coalData.value.find(item => item.id == id);
-    return coal ? coal.fieldName : id;
+    return coal ? coal.coal : id;
   };
 
   // 鏍规嵁鍚嶇О鑾峰彇鐓ょID
   const getCoalIdByName = (name) => {
     if (!name || coalData.value.length === 0) return '';
-    const coal = coalData.value.find(item => item.fieldName === name);
+    const coal = coalData.value.find(item => item.coal === name);
     return coal ? coal.id : '';
   };
 
   // 鐢熸垚涓嬫媺閫夐」
   const coalOptions = computed(() => {
     return coalData.value.map(item => ({
-      label: item.fieldName,
-      value: item.fieldName,
+      label: item.coal,
+      value: item.coal,
       key: item.id
     }));
   });
@@ -78,7 +78,7 @@
   const coalMap = computed(() => {
     const map = {};
     coalData.value.forEach(item => {
-      map[item.id] = item.fieldName;
+      map[item.id] = item.coal;
     });
     return map;
   });

--
Gitblit v1.9.3