From 279956f861dc5a277167b3be7e520a962232f0a5 Mon Sep 17 00:00:00 2001 From: pengm <674192343@qq.com> Date: Thu, 2 Jul 2026 17:47:00 +0800 Subject: [PATCH] 1.处理MES中手工的模块展示 --- src/mes/common/buttonComponent/index.js | 10 ++++++++-- src/mes/indexMes/index.js | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/mes/common/buttonComponent/index.js b/src/mes/common/buttonComponent/index.js index 8a21b7f..ccdc54b 100644 --- a/src/mes/common/buttonComponent/index.js +++ b/src/mes/common/buttonComponent/index.js @@ -15,7 +15,7 @@ const getNavIcon = (bActive, iconName = 2) => { const ButtonComponent = props => { const { app, sModelsId, currentContent, menuMap } = props; const { managementData, userinfo = {} } = app; - const { iTeamType } = userinfo; + const { iTeamType, bManual = false } = userinfo; const [expand, setExpand] = useState(true); const [dataList, setDataList] = useState([]); @@ -29,7 +29,7 @@ const ButtonComponent = props => { if (!parent || !commonUtils.isNotEmptyArr(parent.children)) return; const btnList = parent.children; - const newList = btnList + let newList = btnList .filter( item => item.sName && @@ -48,6 +48,12 @@ const ButtonComponent = props => { }; }); + if (bManual) { + if (parent?.sMenuName === '生产执行') { + newList = newList.filter(item => item.sName?.includes('commonList')); + } + } + setDataList(newList); } }, diff --git a/src/mes/indexMes/index.js b/src/mes/indexMes/index.js index 5c81306..8f7f994 100644 --- a/src/mes/indexMes/index.js +++ b/src/mes/indexMes/index.js @@ -702,8 +702,8 @@ const SiderComponent = () => { ]; const { bManual = false } = props?.app?.userinfo || {} if (bManual) { - const index = filteredMenuList.findIndex(item => item.id === 'productionExec'); - filteredMenuList.splice(index, 1); + // const index = filteredMenuList.findIndex(item => item.id === 'productionExec'); + // filteredMenuList.splice(index, 1); } let [hoverState, setHoverState] = useState(null); -- libgit2 0.22.2