From dc9ce73fa622e7eee7964ed88ee480674b920227 Mon Sep 17 00:00:00 2001 From: pengm <674192343@qq.com> Date: Wed, 19 Nov 2025 10:27:15 +0800 Subject: [PATCH] 1.去掉工艺巡检 2.去掉生产返工 --- src/mes/common/buttonComponent/index.js | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/src/mes/common/buttonComponent/index.js b/src/mes/common/buttonComponent/index.js index e106da2..bfc6d8a 100644 --- a/src/mes/common/buttonComponent/index.js +++ b/src/mes/common/buttonComponent/index.js @@ -158,7 +158,7 @@ const ButtonComponent = props => { ["Process Work Instructions", 4, 'Label Reprint'], ["Related Documents", 5, 'Label Reprint'], ["Historical Tasks", 6, 'Label Reprint'], - ["Production Rework", 2, 'Label Reprint'], + // ["Production Rework", 2, 'Label Reprint'], // null, // null, // ["工单物料信息", 7], @@ -178,7 +178,7 @@ const ButtonComponent = props => { ["工艺作业指导书", 4], ["相关文档", 5], ["历史任务", 6], - ["生产返工", 2], + // ["生产返工", 2], // null, // null, // ["工单物料信息", 7], @@ -202,10 +202,10 @@ const ButtonComponent = props => { // ["班组交接", 18], ["工单变更信息", 19], - ["班组报工", 16], + ["班组报工", 16] // null, // null, - ["工艺巡检", 20] + // ["工艺巡检", 20] ]; const menuOrderListEnglish2 = [ @@ -221,10 +221,10 @@ const ButtonComponent = props => { ["Sign-off/Completion", 17], // ["Team Handover", 18], ["Work Order Change Information", 19], - ["Team Production Reporting", 16], + ["Team Production Reporting", 16] // null, // null, - ["Process Inspection", 20] + // ["Process Inspection", 20] ]; const menuOrderList3 = [ @@ -282,9 +282,18 @@ const ButtonComponent = props => { }); dataList.forEach(item => { - if (!menuList.some(item1 => item1.name === item.name)) { + // 增加一个条件:item.name 不能是那两个值 + if (item.name !== 'Production Rework' && + item.name !== 'Process Patrol Inspection' && + !menuList.some(item1 => item1.name === item.name)) { const iIndex = menuList.findIndex(item1 => !item1); - menuList[iIndex] = item; + // 检查是否找到了可替换的位置 + if (iIndex !== -1) { + menuList[iIndex] = item; + } else { + // 如果 menuList 中没有空位了,可以选择 push 到末尾或者做其他处理 + // menuList.push(item); + } } }); -- libgit2 0.22.2