|
|
@ -27,7 +27,6 @@ const Header = (props) => { |
|
|
|
const [count,setCount]=useState(0)//待办工单数量 |
|
|
|
// console.log('actions1',actions) |
|
|
|
let userRole = user?.pomsUserInfo?.role |
|
|
|
console.log('xxx1',userRole) |
|
|
|
let modalRole = [] |
|
|
|
if (userRole) { |
|
|
|
let modal = [] |
|
|
@ -38,10 +37,8 @@ const Header = (props) => { |
|
|
|
if (v == 'customer_service') ['service', 'workOrder', 'means'].map(u => modal.push(u)) |
|
|
|
if (v == 'firmware_upgrade') modal.push('device') |
|
|
|
}) |
|
|
|
modal.push('control') |
|
|
|
modal = [...new Set(modal)] |
|
|
|
console.log('headerItems',headerItems) |
|
|
|
console.log('modal',modal) |
|
|
|
// console.log('headerItems',headerItems) |
|
|
|
|
|
|
|
modalRole = headerItems?.filter(v => modal.includes(v.itemKey)) |
|
|
|
if (userRole?.includes('SuperAdmin') || userRole?.includes('admin')) modalRole = headerItems |
|
|
@ -296,7 +293,7 @@ const Header = (props) => { |
|
|
|
footer={ |
|
|
|
<> |
|
|
|
{modalRole.length > 0 ? modalRole.map((item, index) => { |
|
|
|
console.log('item1',modalRole.find(k=>k.text==='工单')) |
|
|
|
// console.log('item1',modalRole.find(k=>k.text==='工单')) |
|
|
|
if (item.hasOwnProperty('items')) { |
|
|
|
return ( |
|
|
|
<Nav.Sub |
|
|
|