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,7 +15,7 @@ const getNavIcon = (bActive, iconName = 2) => {
15 const ButtonComponent = props => { 15 const ButtonComponent = props => {
16 const { app, sModelsId, currentContent, menuMap } = props; 16 const { app, sModelsId, currentContent, menuMap } = props;
17 const { managementData, userinfo = {} } = app; 17 const { managementData, userinfo = {} } = app;
18 - const { iTeamType } = userinfo; 18 + const { iTeamType, bManual = false } = userinfo;
19 19
20 const [expand, setExpand] = useState(true); 20 const [expand, setExpand] = useState(true);
21 const [dataList, setDataList] = useState([]); 21 const [dataList, setDataList] = useState([]);
@@ -29,7 +29,7 @@ const ButtonComponent = props => { @@ -29,7 +29,7 @@ const ButtonComponent = props => {
29 if (!parent || !commonUtils.isNotEmptyArr(parent.children)) return; 29 if (!parent || !commonUtils.isNotEmptyArr(parent.children)) return;
30 const btnList = parent.children; 30 const btnList = parent.children;
31 31
32 - const newList = btnList 32 + let newList = btnList
33 .filter( 33 .filter(
34 item => 34 item =>
35 item.sName && 35 item.sName &&
@@ -48,6 +48,12 @@ const ButtonComponent = props => { @@ -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 setDataList(newList); 57 setDataList(newList);
52 } 58 }
53 }, 59 },
src/mes/indexMes/index.js
@@ -702,8 +702,8 @@ const SiderComponent = () => { @@ -702,8 +702,8 @@ const SiderComponent = () => {
702 ]; 702 ];
703 const { bManual = false } = props?.app?.userinfo || {} 703 const { bManual = false } = props?.app?.userinfo || {}
704 if (bManual) { 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 let [hoverState, setHoverState] = useState(null); 709 let [hoverState, setHoverState] = useState(null);