deartibers 2 years ago
parent
commit
5cd05e923e
  1. 28
      web/client/src/sections/install/containers/roles.jsx

28
web/client/src/sections/install/containers/roles.jsx

@ -76,22 +76,22 @@ const Roles = (props) => {
return ( return (
<div className='myseparator' key={index} style={{ display: 'flex', alignItems: 'center' }}> <div className='myseparator' key={index} style={{ display: 'flex', alignItems: 'center' }}>
{ {
row.correlationProject.length >= 3 ? ( row?.correlationProject?.length >= 3 ? (
<Tooltip content={item.pepProjectName}> <Tooltip content={item.pepProjectName || item.name}>
<div style={{ width: item.pepProjectName.length > 7 ? '112px' : '', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', display: index > 2 ? 'none' : '', color: item.del ? '#F93920' : '' }}> <div style={{ width: item?.pepProjectName?.length > 7 || item?.name?.length > 7 ? '112px' : '', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', display: index > 2 ? 'none' : '', color: item.del ? '#F93920' : '' }}>
{item.pepProjectName} {item.pepProjectName || item.name}
</div> </div>
</Tooltip> </Tooltip>
) : row.correlationProject.length == 2 ? ( ) : row?.correlationProject?.length == 2 ? (
<Tooltip content={item.pepProjectName}> <Tooltip content={item.pepProjectName || item.name}>
<div style={{ width: item.pepProjectName.length > 12 ? '173.5px' : '', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', color: item.del ? '#F93920' : '' }}> <div style={{ width: item?.pepProjectName?.length > 12 || item?.name?.length > 12 ? '173.5px' : '', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', color: item.del ? '#F93920' : '' }}>
{item.pepProjectName} {item.pepProjectName || item.name}
</div> </div>
</Tooltip> </Tooltip>
) : ( ) : (
<Tooltip content={item.pepProjectName}> <Tooltip content={item.pepProjectName || item.name}>
<div style={{ width: item.pepProjectName.length > 25 ? '358px' : '', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', color: item.del ? '#F93920' : '' }}> <div style={{ width: item?.pepProjectName?.length > 25 || item?.name?.length > 25 ? '358px' : '', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', color: item.del ? '#F93920' : '' }}>
{item.pepProjectName} {item.pepProjectName || item.name}
</div> </div>
</Tooltip> </Tooltip>
) )
@ -102,14 +102,14 @@ const Roles = (props) => {
}) })
} }
{ {
row.correlationProject.length > 3 ? ( row?.correlationProject?.length > 3 ? (
<Tooltip content={ <Tooltip content={
<div style={{ display: 'flex', flexWrap: 'wrap', width: '100%' }}> <div style={{ display: 'flex', flexWrap: 'wrap', width: '100%' }}>
{ {
row.correlationProject.map((item, index) => { row.correlationProject.map((item, index) => {
return ( return (
<div key={index} style={{ color: item.del ? '#F93920' : '' }}> <div key={index} style={{ color: item.del ? '#F93920' : '' }}>
{item.pepProjectName}<span style={{ color: '#FFFFFF' }}>,</span> {item.pepProjectName || item.name}<span style={{ color: '#FFFFFF' }}>,</span>
</div> </div>
) )
}) })
@ -117,7 +117,7 @@ const Roles = (props) => {
</div> </div>
} trigger="click" style={{ lineHeight: 2 }}> } trigger="click" style={{ lineHeight: 2 }}>
<div style={{ fontSize: 14, color: '#005ABD', marginLeft: 8, cursor: "pointer", }}> <div style={{ fontSize: 14, color: '#005ABD', marginLeft: 8, cursor: "pointer", }}>
+{row.correlationProject.length - 3} +{row?.correlationProject?.length - 3}
</div> </div>
</Tooltip> </Tooltip>
) : ('') ) : ('')

Loading…
Cancel
Save