更新
This commit is contained in:
@@ -21,6 +21,11 @@
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column prop="sort" label="排序" min-width="100" />
|
||||
<el-table-column label="数据范围" min-width="140">
|
||||
<template #default="{ row }">
|
||||
{{ dataScopeLabel(row.data_scope) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="num" label="管理员人数" min-width="100" />
|
||||
<el-table-column prop="create_time" label="创建时间" min-width="180" />
|
||||
<el-table-column label="操作" width="200" fixed="right">
|
||||
@@ -98,6 +103,18 @@ const handleAuth = async (data: any) => {
|
||||
authRef.value?.setFormData(data)
|
||||
}
|
||||
|
||||
const dataScopeLabel = (scope: number | string | null | undefined) => {
|
||||
const s = Number(scope) || 1
|
||||
return (
|
||||
({
|
||||
1: '全部数据(免隔离)',
|
||||
2: '本部门及下级部门',
|
||||
3: '仅本部门',
|
||||
4: '仅本人'
|
||||
} as Record<number, string>)[s] || '全部数据(免隔离)'
|
||||
)
|
||||
}
|
||||
|
||||
// 删除角色
|
||||
const handleDelete = async (id: number) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
|
||||
Reference in New Issue
Block a user