From 7619d415522ab3dc3299d6a2a9f5c9964a692d3f Mon Sep 17 00:00:00 2001
From: 张诺 <zhang_12370@163.com>
Date: 星期三, 18 六月 2025 17:58:53 +0800
Subject: [PATCH] 添加生产管理接口及优化表格字段

---
 src/views/archiveManagement/index.vue |   33 ---------------------------------
 1 files changed, 0 insertions(+), 33 deletions(-)

diff --git a/src/views/archiveManagement/index.vue b/src/views/archiveManagement/index.vue
index 486522f..58d41d2 100644
--- a/src/views/archiveManagement/index.vue
+++ b/src/views/archiveManagement/index.vue
@@ -191,8 +191,6 @@
   return data.name?.toLowerCase().includes(value.toLowerCase());
 };
 const submitForm = async (res) => {
-  console.log("鎻愪氦琛ㄥ崟鍥炶皟:", res);
-  
   if (res && res.code === 200) {
     ElMessage.success("鎿嶄綔鎴愬姛");
     // 鍒锋柊鍒楄〃鏁版嵁
@@ -202,11 +200,9 @@
   }
 }
 const centerDialogVisible = (val) => {
-  console.log(val);
 };
 // 澶勭悊鑺傜偣鐐瑰嚮
 const handleNodeClick = async (data) => {
-  console.log("鐐瑰嚮鑺傜偣:", data);
   // 鍒囨崲鑺傜偣鏃堕噸缃埌绗竴椤�
   queryParams.current = 1;
   queryParams.treeId = data.id;
@@ -222,7 +218,6 @@
 };
 // 澶勭悊鍒嗛〉鍙樺寲
 const handlePageChange = ({ page }) => {
-  console.log("鍒嗛〉鍙樺寲:", { page });
   queryParams.current = page;
   // pageSize 鍥哄畾涓�20锛屼笉鍐嶄粠鍙傛暟涓幏鍙�
   getArchiveListData();
@@ -231,12 +226,6 @@
 const getArchiveListData = async () => {
   try {
     loading.value = true;
-    console.log("鑾峰彇褰掓。鍒楄〃鏁版嵁", {
-      treeId: queryParams.treeId,
-      current: queryParams.current,
-      pageSize: queryParams.pageSize,
-    });
-
     let res = await getArchiveList({
       treeId: queryParams.treeId,
       current: queryParams.current,
@@ -258,14 +247,7 @@
     }
     // pageSize 鍥哄畾涓�20锛屼笉浠庡悗绔幏鍙�
 
-    console.log("鏁版嵁鏇存柊瀹屾垚:", {
-      total: total.value,
-      current: queryParams.current,
-      pageSize: queryParams.pageSize,
-      records: tableData.value.length,
-    });
   } catch (error) {
-    console.error("鑾峰彇褰掓。鍒楄〃澶辫触:", error);
     ElMessage.error("鑾峰彇鏁版嵁澶辫触");
     tableData.value = [];
     total.value = 0;
@@ -280,7 +262,6 @@
   }
   try {
     const ids = selectedRows.map((row) => row.id);
-    console.log(ids)
     const { code, msg } = await delArchive(ids);
     if (code !== 200) {
       ElMessage.warning("鍒犻櫎澶辫触: " + msg);
@@ -290,7 +271,6 @@
       await getArchiveListData();
     }
   } catch (error) {
-    console.error("鍒犻櫎褰掓。澶辫触:", error);
     ElMessage.error("鍒犻櫎褰掓。澶辫触");
   }
 };
@@ -329,11 +309,9 @@
   comeTreeData.isEdit = false;
   const newValue = newName.value.trim();
   if (comeTreeData.name === newValue) {
-    console.log("娌℃湁淇敼鍐呭");
     return;
   }
   if (newValue === "") {
-    console.warn("杈撳叆涓嶈兘涓虹┖");
     newName.value = comeTreeData.name || "鏂拌妭鐐�";
     return;
   }
@@ -349,10 +327,8 @@
       parentId: parentId || null, // 濡傛灉娌℃湁鐖惰妭鐐癸紝鍒欎负 null
     });
   } catch (error) {
-    console.error("瀛樺偍澶辫触", error);
     comeTreeData.name = comeTreeData.name || "鏂拌妭鐐�";
   }
-  console.log("淇濆瓨鎴愬姛:", newValue);
 };
 
 onMounted(async () => {
@@ -365,12 +341,9 @@
 };
 
 const remove = async (node, data) => {
-  console.log("鍒犻櫎鑺傜偣:", data);
   if (!data || !data.id) {
-    console.warn("鏃犳硶鍒犻櫎鏈畾涔夋垨鏃犳晥鐨勮妭鐐�");
     return;
   }
-  console.log("鍒犻櫎鑺傜偣 ID:", data.id);
   let { code, msg } = await delTree([data.id]);
   if (code !== 200) {
     ElMessage.warning("鍒犻櫎澶辫触, " + msg);
@@ -383,7 +356,6 @@
 const append = async (data) => {
   if (data === "") {
     // 鏂板鏍硅妭鐐�
-    console.log("鏂板鏍硅妭鐐�");
     const newNode = {
       id: Date.now(),
       name: "鏂拌妭鐐�",
@@ -405,7 +377,6 @@
     const node = treeRef.value?.getNode(nodeKey);
     const isExpanded = node?.expanded; // 濡傛灉鏈夊瓙绾т笖鏈睍寮�锛屽厛灞曞紑鑺傜偣
     if (hasChildren && !isExpanded) {
-      console.log(treeRef.value, "灞曞紑鑺傜偣", nodeKey);
       if (
         treeRef.value &&
         treeRef.value.store &&
@@ -414,7 +385,6 @@
         treeRef.value.store.nodesMap[nodeKey].expanded = true;
       }
     }
-
     const newNode = {
       id: Date.now(),
       name: "鏂板瓙鑺傜偣",
@@ -453,7 +423,6 @@
   row.value = rows;
   dialogVisible.value = true;
   archiveDialogs.value.editForm(rows); // 璋冪敤缂栬緫鏂规硶
-  // console.log("缂栬緫琛屾暟鎹�:", archiveDialogs.value);
 };
 
 // 绉婚櫎鎳掑姞杞斤紝鐩存帴鑾峰彇鏁版嵁
@@ -463,11 +432,9 @@
     if (res.code === 200) {
       treeData.value = res.data?.records || res.data || [];
     } else {
-      console.error("Failed to fetch tree data:", res.message);
       treeData.value = [];
     }
   } catch (error) {
-    console.error("鑾峰彇鏍戝舰鏁版嵁澶辫触:", error);
     treeData.value = [];
   }
 };

--
Gitblit v1.9.3