fix: 完善IM用户状态与分组展示
This commit is contained in:
@@ -330,7 +330,7 @@
|
||||
type: record.state === 0 ? 'error' : 'default',
|
||||
onClick: handleBanToggle.bind(null, record),
|
||||
auth: [record.state === 0 ? '/imUser/ban' : '/imUser/unban'],
|
||||
ifShow: record.state !== 20,
|
||||
ifShow: record.state === 0 || record.state === 10,
|
||||
},
|
||||
{
|
||||
label: '强制下线',
|
||||
@@ -429,8 +429,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
function openAdjustGroup(record: State) {
|
||||
async function openAdjustGroup(record: State) {
|
||||
operationUser.value = record;
|
||||
await loadPolicyGroupOptions(record.tenantId);
|
||||
adjustGroupId.value = record.policyGroupId || null;
|
||||
groupVisible.value = true;
|
||||
}
|
||||
@@ -567,15 +568,17 @@
|
||||
|
||||
onMounted(async () => {
|
||||
loadOptions();
|
||||
let tenantId = currentTenantId();
|
||||
if (isPlatformAdmin.value) {
|
||||
await loadTenantOptions();
|
||||
if (tenantOptions.value.length > 0) {
|
||||
await setFieldsValue({ tenantId: tenantOptions.value[0].value });
|
||||
tenantId = Number(tenantOptions.value[0].value);
|
||||
await setFieldsValue({ tenantId });
|
||||
} else {
|
||||
message.warning('暂无可用租户');
|
||||
}
|
||||
}
|
||||
await loadPolicyGroupOptions(currentTenantId());
|
||||
await loadPolicyGroupOptions(tenantId);
|
||||
reloadTable();
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user