{
console.log('e', e)
setBigTabSelect(e)
actionRef.current?.reload()
}}
items={[{ label: '模块角色', key: '1' }, { label: '用户角色', key: '2' }]}
/>
{
console.log('e', e)
setActiveKey(e as string)
}}
items={bigTabSelect === '1' ? currentUser?.UserPattern === 9000 ?
[
{
key: '1000',
label: 业主{renderBadge(!typeCountLoading ? typeCount?.OwnerUnitCount : '', activeKey === '1000')},
},
{
key: '4000',
label: 供应商{renderBadge(!typeCountLoading ? typeCount?.SupplierCount : '', activeKey === '4000')},
},
{
key: '2000',
label: 商户{renderBadge(!typeCountLoading ? typeCount?.MerchantCount : '', activeKey === '2000')},
},
{
key: '3000',
label: 游客{renderBadge(!typeCountLoading ? typeCount?.TouristCount : '', activeKey === '3000')},
},
{
key: '9000',
label: 内部人员{renderBadge(!typeCountLoading ? typeCount?.AdminCount : '', activeKey === '9000')},
},
] : currentUser?.UserPattern === 1000 ? [
{
key: '1000',
label: 业主{renderBadge(!typeCountLoading ? typeCount?.OwnerUnitCount : '', activeKey === '1000')},
},
{
key: '4000',
label: 供应商{renderBadge(!typeCountLoading ? typeCount?.SupplierCount : '', activeKey === '4000')},
}
] : [] : [
{
key: '1000',
label: 业主,
},
{
key: '4000',
label: 供应商,
},
]}
/>
}
rowKey="SYSTEMROLE_ID"
actionRef={actionRef}
request={async (params) => {
// , SystemRolePID: currentUser?.TopSystemRoleId
console.log('bigTabSelect', bigTabSelect)
let req: any = {}
if (bigTabSelect === '2') {
req = {
ShowStatus: params.ShowStatus === '1' ? true : params.ShowStatus === '0' ? false : '',
SYSTEMROLE_TYPE: 2000,
SystemRolePattern: params.SystemRolePattern,
ProvinceCode: "530000"
}
} else {
req = {
ShowStatus: params.ShowStatus === '1' ? true : params.ShowStatus === '0' ? false : '',
// current: 1,
// pageSize: 20,
SystemRolePattern: params.SystemRolePattern,
ProvinceCode: "530000"
}
}
const list = await getRoleList(req)
console.log('list', list)
if (list && list.length > 0) {
list.forEach((item: any) => {
item.label = item.SYSTEMROLE_NAME
if (item.children && item.children.length > 0) {
item.children.forEach((subItem: any) => {
subItem.label = subItem.SYSTEMROLE_NAME
})
}
})
}
setRoleTree(list)
return { data: list, success: true };
}}
params={{ SystemRolePattern: activeKey, SYSTEMROLE_TYPE: bigTabSelect }}
pagination={false}
columns={columns}
toolbar={{
actions: [