feat: 分配角色

This commit is contained in:
dap
2024-09-25 15:13:37 +08:00
parent 1c8c1848be
commit a318e8791e
4 changed files with 96 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ import type { Recordable } from '@vben/types';
import type { ColumnsType } from 'ant-design-vue/es/table';
import { onMounted, ref } from 'vue';
import { useRouter } from 'vue-router';
import { Page, useVbenDrawer, useVbenModal } from '@vben/common-ui';
import { $t } from '@vben/locales';
@@ -95,6 +96,11 @@ function handleAuthEdit(record: Recordable<any>) {
authModalApi.setData({ id: record.roleId });
authModalApi.open();
}
const router = useRouter();
function handleAssignRole(record: Recordable<any>) {
router.push(`/system/role-assign/${record.roleId}`);
}
</script>
<template>
@@ -116,6 +122,9 @@ function handleAuthEdit(record: Recordable<any>) {
<a-button size="small" @click="handleAuthEdit(record)">
数据权限
</a-button>
<a-button size="small" @click="handleAssignRole(record)">
分配角色
</a-button>
</Space>
</template>
</template>