Commit 7023df5958d7da25e2e9dd812be65bf03e8612e2
1 parent
c1497f57
左侧导航栏权限
Showing
3 changed files
with
16 additions
and
6 deletions
src/mes/common/commonOperationBarComponent/index.js
| @@ -739,7 +739,11 @@ const useCommonOperationBarComponentEvent = props => { | @@ -739,7 +739,11 @@ const useCommonOperationBarComponentEvent = props => { | ||
| 739 | } else if (props.bMesBill) { | 739 | } else if (props.bMesBill) { |
| 740 | 740 | ||
| 741 | const btnName = sControlName.replace('BtnLeft.', '').replace('BtnRight.', '').toLowerCase(); | 741 | const btnName = sControlName.replace('BtnLeft.', '').replace('BtnRight.', '').toLowerCase(); |
| 742 | - if (props.enabled) { | 742 | + let enabled = props.enabled |
| 743 | + if (props.enabled === undefined) { | ||
| 744 | + enabled = true | ||
| 745 | + } | ||
| 746 | + if (enabled) { | ||
| 743 | if (["btnupd", 'btnevent', 'btnsubmit', 'btnsubmitcancel', 'btnexamine', 'btncancelexamine'].includes(btnName)) { | 747 | if (["btnupd", 'btnevent', 'btnsubmit', 'btnsubmitcancel', 'btnexamine', 'btncancelexamine'].includes(btnName)) { |
| 744 | defaultProps.disabled = true; | 748 | defaultProps.disabled = true; |
| 745 | } | 749 | } |
src/mes/indexMes/index.js
| @@ -626,7 +626,7 @@ const HeaderConponent = () => { | @@ -626,7 +626,7 @@ const HeaderConponent = () => { | ||
| 626 | const SiderComponent = () => { | 626 | const SiderComponent = () => { |
| 627 | const { dispatch, hooksProps, props, ...rest } = useContext(myContext); | 627 | const { dispatch, hooksProps, props, ...rest } = useContext(myContext); |
| 628 | const { currentContent, menuMap, menuMapOpposite } = hooksProps; | 628 | const { currentContent, menuMap, menuMapOpposite } = hooksProps; |
| 629 | - | 629 | + const {managementData = []} = props?.app || {} |
| 630 | const teamInformation = commonFunc.showLocalMessage(props, 'teamInformation', '班组信息'); | 630 | const teamInformation = commonFunc.showLocalMessage(props, 'teamInformation', '班组信息'); |
| 631 | 631 | ||
| 632 | const scheduledTask = commonFunc.showLocalMessage(props, 'scheduledTask', '计划任务'); | 632 | const scheduledTask = commonFunc.showLocalMessage(props, 'scheduledTask', '计划任务'); |
| @@ -637,7 +637,7 @@ const SiderComponent = () => { | @@ -637,7 +637,7 @@ const SiderComponent = () => { | ||
| 637 | 637 | ||
| 638 | const queryTracing = commonFunc.showLocalMessage(props, 'queryTracing', '查询追踪'); | 638 | const queryTracing = commonFunc.showLocalMessage(props, 'queryTracing', '查询追踪'); |
| 639 | 639 | ||
| 640 | - const operationGuide = commonFunc.showLocalMessage(props, 'teamInformation', '操作指南'); | 640 | + const operationGuide = commonFunc.showLocalMessage(props, 'operationGuide', '操作指南'); |
| 641 | 641 | ||
| 642 | const menuList = [ | 642 | const menuList = [ |
| 643 | { | 643 | { |
| @@ -683,9 +683,15 @@ const SiderComponent = () => { | @@ -683,9 +683,15 @@ const SiderComponent = () => { | ||
| 683 | c_icon: c_guideIcon | 683 | c_icon: c_guideIcon |
| 684 | } | 684 | } |
| 685 | ]; | 685 | ]; |
| 686 | - const allowedIds = new Set(Object.values(menuMapOpposite)); | 686 | + let menuLists = [] |
| 687 | + managementData.forEach(item=>{ | ||
| 688 | + const i = menuList.findIndex(x=>x.title === item.sMenuName) | ||
| 689 | + if (i !== -1){ | ||
| 690 | + menuLists.push(menuList[i]) | ||
| 691 | + } | ||
| 692 | + }) | ||
| 687 | const filteredMenuList = [ | 693 | const filteredMenuList = [ |
| 688 | - ...menuList.filter(item => allowedIds.has(item.id)), | 694 | + ...menuLists, |
| 689 | { | 695 | { |
| 690 | id: "operationGuide", | 696 | id: "operationGuide", |
| 691 | title: operationGuide, | 697 | title: operationGuide, |
src/utils/config.js
| @@ -6,7 +6,7 @@ export const webSite = { | @@ -6,7 +6,7 @@ export const webSite = { | ||
| 6 | // faceAddress: isDev ? '//192.168.11.22:8080/xlyFace' : '//' + location.host + '/xlyFace', | 6 | // faceAddress: isDev ? '//192.168.11.22:8080/xlyFace' : '//' + location.host + '/xlyFace', |
| 7 | fileAddress: isDev ? '//km5cjx.gnway.cc:43920/xlyReport/' : '//' + location.host + '/xlyReport/', // 接口地址 | 7 | fileAddress: isDev ? '//km5cjx.gnway.cc:43920/xlyReport/' : '//' + location.host + '/xlyReport/', // 接口地址 |
| 8 | faceAddress: isDev ? '//km5cjx.gnway.cc:43920/xlyFace' : '//' + location.host + '/xlyFace', | 8 | faceAddress: isDev ? '//km5cjx.gnway.cc:43920/xlyFace' : '//' + location.host + '/xlyFace', |
| 9 | - ipAddress: localStorage.ipAddress ? localStorage.ipAddress : isDev ? '//km5cjx.gnway.cc:47400/xlyEntry/' : '//' + location.host + '/xlyEntry/', | 9 | + ipAddress: localStorage.ipAddress ? localStorage.ipAddress : isDev ? '//km5cjx.gnway.cc:43920/xlyEntry/' : '//' + location.host + '/xlyEntry/', |
| 10 | interfaceAddress: isDev ? '//km5cjx.gnway.cc:43920/xlyApi/' : '//' + location.host + '/xlyApi/', // 接口地址 | 10 | interfaceAddress: isDev ? '//km5cjx.gnway.cc:43920/xlyApi/' : '//' + location.host + '/xlyApi/', // 接口地址 |
| 11 | // ipAddress: isDev ? '//ebc.jinjia.com:8091/xlyEntry/' : '//' + location.host + '/xlyEntry/', | 11 | // ipAddress: isDev ? '//ebc.jinjia.com:8091/xlyEntry/' : '//' + location.host + '/xlyEntry/', |
| 12 | // interfaceAddress: isDev ? '//ebc.jinjia.com:8091/xlyApi/' : '//' + location.host + '/xlyApi/', // 接口地址 | 12 | // interfaceAddress: isDev ? '//ebc.jinjia.com:8091/xlyApi/' : '//' + location.host + '/xlyApi/', // 接口地址 |