Commit 279956f861dc5a277167b3be7e520a962232f0a5

Authored by Min
1 parent 3aef5bd8

1.处理MES中手工的模块展示

src/mes/common/buttonComponent/index.js
... ... @@ -15,7 +15,7 @@ const getNavIcon = (bActive, iconName = 2) => {
15 15 const ButtonComponent = props => {
16 16 const { app, sModelsId, currentContent, menuMap } = props;
17 17 const { managementData, userinfo = {} } = app;
18   - const { iTeamType } = userinfo;
  18 + const { iTeamType, bManual = false } = userinfo;
19 19  
20 20 const [expand, setExpand] = useState(true);
21 21 const [dataList, setDataList] = useState([]);
... ... @@ -29,7 +29,7 @@ const ButtonComponent = props => {
29 29 if (!parent || !commonUtils.isNotEmptyArr(parent.children)) return;
30 30 const btnList = parent.children;
31 31  
32   - const newList = btnList
  32 + let newList = btnList
33 33 .filter(
34 34 item =>
35 35 item.sName &&
... ... @@ -48,6 +48,12 @@ const ButtonComponent = props => {
48 48 };
49 49 });
50 50  
  51 + if (bManual) {
  52 + if (parent?.sMenuName === '生产执行') {
  53 + newList = newList.filter(item => item.sName?.includes('commonList'));
  54 + }
  55 + }
  56 +
51 57 setDataList(newList);
52 58 }
53 59 },
... ...
src/mes/indexMes/index.js
... ... @@ -702,8 +702,8 @@ const SiderComponent = () => {
702 702 ];
703 703 const { bManual = false } = props?.app?.userinfo || {}
704 704 if (bManual) {
705   - const index = filteredMenuList.findIndex(item => item.id === 'productionExec');
706   - filteredMenuList.splice(index, 1);
  705 + // const index = filteredMenuList.findIndex(item => item.id === 'productionExec');
  706 + // filteredMenuList.splice(index, 1);
707 707 }
708 708  
709 709 let [hoverState, setHoverState] = useState(null);
... ...