From 8217c63d1610a9d89419c69947beb4fb3bb7c7e4 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期三, 20 五月 2026 17:03:05 +0800
Subject: [PATCH] style(frontend): 格式化代码缩进并增强API调用安全性
---
src/views/productionManagement/processRoute/processRouteItem/index.vue | 29 ++++++++++++++++++++++++++++-
1 files changed, 28 insertions(+), 1 deletions(-)
diff --git a/src/views/productionManagement/processRoute/processRouteItem/index.vue b/src/views/productionManagement/processRoute/processRouteItem/index.vue
index 83ee60a..92a2fa1 100644
--- a/src/views/productionManagement/processRoute/processRouteItem/index.vue
+++ b/src/views/productionManagement/processRoute/processRouteItem/index.vue
@@ -1146,9 +1146,36 @@
});
};
+ const findSiblings = (items, tempId) => {
+ if (!items || items.length === 0) return null;
+ // 妫�鏌ュ綋鍓嶅眰绾�
+ if (items.some(item => item.tempId === tempId)) {
+ return items;
+ }
+ // 閫掑綊鏌ユ壘瀛愮骇
+ for (const item of items) {
+ if (item.children && item.children.length > 0) {
+ const result = findSiblings(item.children, tempId);
+ if (result) return result;
+ }
+ }
+ return null;
+ };
+
const handleBomProcessChange = (row, value) => {
row.processId = value || "";
syncProcessOperationFields(row);
+
+ // 鍚屼竴灞傜骇鍙兘閫変竴鏍风殑宸ュ簭
+ const siblings = findSiblings(bomDataValue.value.dataList, row.tempId);
+ if (siblings && value) {
+ siblings.forEach(sibling => {
+ if (sibling.tempId !== row.tempId) {
+ sibling.processId = value;
+ syncProcessOperationFields(sibling);
+ }
+ });
+ }
};
const openBomDialog = tempId => {
@@ -1692,4 +1719,4 @@
line-height: 1.5;
word-break: break-all;
}
-</style>
+</style>
\ No newline at end of file
--
Gitblit v1.9.3