All checks were successful
Build and Deploy Front / deploy (push) Successful in 4m3s
新增单号规则截取模式与本地扫描引擎;登录图形验证码;吉祥物空态;开发态从 Router 自动回退 PC/H5 刷新直链。 Co-authored-by: Cursor <cursoragent@cursor.com>
684 lines
20 KiB
Vue
684 lines
20 KiB
Vue
<template>
|
||
<div class="rbac-split-layout">
|
||
<CustomLeftMenu
|
||
class="left-sidebar"
|
||
:tree-data="roleTreeData"
|
||
:selected-keys="selectedKeys"
|
||
v-model:expanded-keys="expandedKeys"
|
||
v-model:search-keyword="searchKeyword"
|
||
:loading="loading"
|
||
:search-placeholder="t('system.role.search.placeholder.roleNameOrCode')"
|
||
:refresh-title="t('system.user.actions.refresh')"
|
||
:add-title="t('system.role.actions.add')"
|
||
:delete-label="t('system.role.actions.delete')"
|
||
:loading-text="t('system.role.loading')"
|
||
:show-add="hasPermission('Rbac.Roles.Create')"
|
||
:show-node-actions="hasPermission('Rbac.Roles.Delete')"
|
||
:show-method="false"
|
||
:show-map-count="false"
|
||
:show-node-code="true"
|
||
:show-pagination="true"
|
||
:page-size="20"
|
||
@search="handleSearch"
|
||
@refresh="loadData"
|
||
@add="handleAdd"
|
||
@select="handleRoleSelect"
|
||
@node-click="handleRoleNodeClick"
|
||
@delete-node="(node) => handleDelete(node?.id)"
|
||
/>
|
||
|
||
<div class="right-panel">
|
||
<RbacDetailShell
|
||
:empty="!selectedRole"
|
||
:empty-title="t('system.role.emptySelect')"
|
||
:empty-desc="t('system.role.emptyDesc')"
|
||
:title="headerTitle"
|
||
:subtitle="headerSubtitle"
|
||
:tags="roleTags"
|
||
:tabs="roleTabs"
|
||
v-model:active-tab="activeTab"
|
||
:loading="permissionLoading && activeTab === 'permissions'"
|
||
>
|
||
<template #icon>
|
||
<div class="icon-badge-circle">
|
||
<icon-user-group />
|
||
</div>
|
||
</template>
|
||
<template #actions>
|
||
<a-button
|
||
v-if="hasPermission('Rbac.Roles.Update') || isCreating"
|
||
type="primary"
|
||
:loading="modalLoading || permissionSaving"
|
||
@click="handleSaveAll"
|
||
>
|
||
{{ t('system.role.actions.save') }}
|
||
</a-button>
|
||
</template>
|
||
|
||
<template #header-extra>
|
||
<a-form
|
||
ref="formRef"
|
||
:model="formState"
|
||
:rules="formRules"
|
||
layout="inline"
|
||
class="role-header-form"
|
||
>
|
||
<a-form-item :label="t('system.role.form.name')" field="name">
|
||
<a-input
|
||
v-model="formState.name"
|
||
:placeholder="t('system.role.form.namePlaceholder')"
|
||
style="width: 160px"
|
||
/>
|
||
</a-form-item>
|
||
<a-form-item :label="t('system.role.form.code')" field="code">
|
||
<a-input
|
||
v-model="formState.code"
|
||
:placeholder="t('system.role.form.codePlaceholder')"
|
||
:disabled="!isCreating"
|
||
style="width: 160px"
|
||
/>
|
||
</a-form-item>
|
||
<a-form-item :label="t('system.role.form.boundWarehouse')" field="boundWarehouseId">
|
||
<a-select
|
||
v-model="formState.boundWarehouseId"
|
||
:placeholder="t('system.role.form.boundWarehousePlaceholder')"
|
||
allow-clear
|
||
:options="warehouseOptions"
|
||
style="width: 180px"
|
||
/>
|
||
</a-form-item>
|
||
<a-form-item v-if="!isCreating" :label="t('system.role.table.createTime')">
|
||
<span class="role-create-time">{{ formatTime(selectedRole?.createdAt) }}</span>
|
||
</a-form-item>
|
||
</a-form>
|
||
</template>
|
||
|
||
<template v-if="activeTab === 'permissions' && !isSelectedAdminRole" #tabs-extra>
|
||
<a-space wrap :size="8">
|
||
<a-input
|
||
v-model="permissionKeyword"
|
||
:placeholder="t('system.role.permission.search')"
|
||
allow-clear
|
||
style="width: 220px"
|
||
/>
|
||
<a-button class="app-btn-toolbar" @click="checkAllPermissions">
|
||
{{ t('system.role.permission.checkAll') }}
|
||
</a-button>
|
||
<a-button class="app-btn-toolbar" @click="uncheckAllPermissions">
|
||
{{ t('system.role.permission.uncheckAll') }}
|
||
</a-button>
|
||
</a-space>
|
||
</template>
|
||
|
||
<div v-show="activeTab === 'permissions'" class="permission-body">
|
||
<a-alert
|
||
v-if="isSelectedAdminRole"
|
||
type="info"
|
||
show-icon
|
||
:title="t('system.role.permission.adminAllHint')"
|
||
/>
|
||
<template v-else>
|
||
<a-table
|
||
v-if="filteredPermissionRows.length > 0"
|
||
class="permission-table"
|
||
:data="filteredPermissionRows"
|
||
:pagination="false"
|
||
:bordered="{ cell: true }"
|
||
:span-method="permissionSpanMethod"
|
||
row-key="rowKey"
|
||
size="small"
|
||
:scroll="{ y: permissionTableScrollY }"
|
||
>
|
||
<template #columns>
|
||
<a-table-column
|
||
:title="t('system.role.permission.col.level1')"
|
||
data-index="level1Name"
|
||
:width="180"
|
||
>
|
||
<template #cell="{ record }">
|
||
<a-checkbox
|
||
:model-value="isPermissionChecked(record.level1Code)"
|
||
@change="(checked) => togglePermission(record.level1Code, checked)"
|
||
>
|
||
{{ record.level1Name }}
|
||
</a-checkbox>
|
||
</template>
|
||
</a-table-column>
|
||
<a-table-column
|
||
:title="t('system.role.permission.col.level2')"
|
||
data-index="level2Name"
|
||
:width="200"
|
||
>
|
||
<template #cell="{ record }">
|
||
<a-checkbox
|
||
:model-value="isPermissionChecked(record.level2Code)"
|
||
@change="(checked) => togglePermission(record.level2Code, checked)"
|
||
>
|
||
{{ record.level2Name }}
|
||
</a-checkbox>
|
||
</template>
|
||
</a-table-column>
|
||
<a-table-column :title="t('system.role.permission.col.level3')">
|
||
<template #cell="{ record }">
|
||
<div v-if="record.level2HasChildren" class="permission-button-group">
|
||
<a-checkbox
|
||
v-for="btn in record.buttons"
|
||
:key="btn.code"
|
||
:model-value="isPermissionChecked(btn.code)"
|
||
@change="(checked) => togglePermission(btn.code, checked)"
|
||
>
|
||
{{ btn.name }}
|
||
</a-checkbox>
|
||
</div>
|
||
<span v-else class="permission-no-buttons">—</span>
|
||
</template>
|
||
</a-table-column>
|
||
</template>
|
||
</a-table>
|
||
<div v-else class="permission-empty">
|
||
{{
|
||
permissionKeyword
|
||
? t('system.role.permission.noMatch')
|
||
: t('system.role.permission.loading')
|
||
}}
|
||
</div>
|
||
</template>
|
||
</div>
|
||
</RbacDetailShell>
|
||
</div>
|
||
</div>
|
||
</template>
|
||
|
||
<script setup lang="ts">
|
||
defineOptions({ name: 'SystemRoles' })
|
||
|
||
import { computed, onMounted, reactive, ref, watch } from 'vue'
|
||
import { useI18n } from 'vue-i18n'
|
||
import { Message, Modal } from '@arco-design/web-vue'
|
||
import { IconUserGroup } from '@arco-design/web-vue/es/icon'
|
||
import CustomLeftMenu from '@/components/CustomLeftMenu/index.vue'
|
||
import RbacDetailShell from '@/components/RbacSplit/RbacDetailShell.vue'
|
||
import type { RbacDetailTag } from '@/components/RbacSplit/RbacDetailShell.vue'
|
||
import { RoleService, PermissionService } from '@/api/rbac'
|
||
import type {
|
||
RoleDto,
|
||
RoleCreateDto,
|
||
RoleUpdateDto,
|
||
PermissionGroupDto,
|
||
} from '@/api/rbac'
|
||
import { useWarehouseList } from '@/composables/useWarehouseList'
|
||
import { hasPermission } from '@/utils/rbac-permission'
|
||
import { handleApiError } from '@/utils/rbac-error-handler'
|
||
import { useRbacUserStore } from '@/store/modules/rbac-user'
|
||
import { buildFlatLeftMenuTree, findLeftMenuItemByKey } from '@/utils/rbacLeftMenuTree'
|
||
import {
|
||
buildPermissionAssignRows,
|
||
buildPermissionCascadeContext,
|
||
collectPermissionCodesFromRows,
|
||
computeLevel1RowSpans,
|
||
countSelectedAssignablePermissions,
|
||
filterPermissionAssignRows,
|
||
normalizeSelectedPermissions,
|
||
togglePermissionWithCascade,
|
||
} from '@/utils/rbacPermissionAssignRows'
|
||
import dayjs from 'dayjs'
|
||
|
||
const { t } = useI18n()
|
||
|
||
const loading = ref(false)
|
||
const dataSource = ref<RoleDto[]>([])
|
||
const searchKeyword = ref('')
|
||
const selectedRole = ref<RoleDto | null>(null)
|
||
const isCreating = ref(false)
|
||
const expandedKeys = ref(['category-roles'])
|
||
const activeTab = ref('permissions')
|
||
const formRef = ref()
|
||
const permissionKeyword = ref('')
|
||
|
||
const pagination = reactive({ current: 1, pageSize: 100 })
|
||
|
||
const { warehouseOptions } = useWarehouseList()
|
||
const roleWarehouseMap = ref<Record<string, string>>({})
|
||
|
||
const formState = reactive<RoleCreateDto & { boundWarehouseId?: string }>({
|
||
name: '',
|
||
code: '',
|
||
boundWarehouseId: undefined,
|
||
})
|
||
|
||
const formRules = computed(() => ({
|
||
name: [{ required: true, message: t('system.role.rules.name.required') }],
|
||
code: [{ required: true, message: t('system.role.rules.code.required') }],
|
||
}))
|
||
|
||
const modalLoading = ref(false)
|
||
const permissionLoading = ref(false)
|
||
const permissionSaving = ref(false)
|
||
const permissionTree = ref<PermissionGroupDto[]>([])
|
||
const selectedPermissions = ref<string[]>([])
|
||
const permissionTableScrollY = 'calc(100vh - 300px)'
|
||
|
||
const roleTreeData = computed(() =>
|
||
buildFlatLeftMenuTree('category-roles', t('system.role.pageTitle'), dataSource.value, {
|
||
titleKey: 'name',
|
||
codeKey: 'code',
|
||
})
|
||
)
|
||
|
||
const selectedKeys = computed(() =>
|
||
selectedRole.value?.id ? [`item-${selectedRole.value.id}`] : []
|
||
)
|
||
|
||
const permissionRows = computed(() => buildPermissionAssignRows(permissionTree.value))
|
||
|
||
const permissionCascadeContext = computed(() =>
|
||
buildPermissionCascadeContext(permissionRows.value)
|
||
)
|
||
|
||
const filteredPermissionRows = computed(() =>
|
||
filterPermissionAssignRows(permissionRows.value, permissionKeyword.value)
|
||
)
|
||
|
||
const level1RowSpans = computed(() => computeLevel1RowSpans(filteredPermissionRows.value))
|
||
|
||
const selectedPermissionCount = computed(() =>
|
||
countSelectedAssignablePermissions(selectedPermissions.value, permissionRows.value)
|
||
)
|
||
|
||
const totalPermissionCount = computed(() =>
|
||
collectPermissionCodesFromRows(permissionRows.value).length
|
||
)
|
||
|
||
const normalizedSelectedPermissions = computed(() =>
|
||
normalizeSelectedPermissions(selectedPermissions.value, permissionRows.value)
|
||
)
|
||
|
||
function isCustomerRole(role?: RoleDto | null) {
|
||
const code = role?.code || ''
|
||
return code === 'Customer' || code.startsWith('CustomerSub_')
|
||
}
|
||
|
||
function isAdminRole(role?: RoleDto | null) {
|
||
return (role?.code || '').toLowerCase() === 'admin'
|
||
}
|
||
|
||
const isSelectedAdminRole = computed(() => isAdminRole(selectedRole.value))
|
||
|
||
const headerTitle = computed(() => {
|
||
if (isCreating.value) return t('system.role.actions.add')
|
||
return formState.name || selectedRole.value?.name || ''
|
||
})
|
||
|
||
const headerSubtitle = computed(() => {
|
||
if (isCreating.value) return formState.code || ''
|
||
return formState.code || selectedRole.value?.code || ''
|
||
})
|
||
|
||
const roleTags = computed((): RbacDetailTag[] => {
|
||
if (!selectedRole.value) return []
|
||
const tags: RbacDetailTag[] = []
|
||
if (isCreating.value) {
|
||
tags.push({ label: t('system.role.tag.creating'), color: 'orangered' })
|
||
}
|
||
if (isAdminRole(selectedRole.value)) {
|
||
tags.push({ label: 'Admin', color: 'purple' })
|
||
}
|
||
if (isCustomerRole(selectedRole.value)) {
|
||
tags.push({ label: t('system.role.category.system'), color: 'arcoblue' })
|
||
}
|
||
if (formState.boundWarehouseId) {
|
||
tags.push({ label: t('system.role.tag.boundWarehouse'), color: 'green' })
|
||
}
|
||
return tags
|
||
})
|
||
|
||
const roleTabs = computed(() => {
|
||
if (!hasPermission('Rbac.Roles.AssignPermissions')) return []
|
||
if (isSelectedAdminRole.value) {
|
||
return [{ key: 'permissions', label: t('system.role.modal.assignPermissions') }]
|
||
}
|
||
const selected = selectedPermissionCount.value
|
||
const total = totalPermissionCount.value
|
||
return [
|
||
{
|
||
key: 'permissions',
|
||
label: t('system.role.modal.assignPermissions'),
|
||
badge: `${selected}/${total}`,
|
||
},
|
||
]
|
||
})
|
||
|
||
function permissionSpanMethod({
|
||
rowIndex,
|
||
columnIndex,
|
||
}: {
|
||
rowIndex: number
|
||
columnIndex: number
|
||
}) {
|
||
if (columnIndex !== 0) return { rowspan: 1, colspan: 1 }
|
||
const rowspan = level1RowSpans.value[rowIndex] ?? 1
|
||
if (rowspan === 0) return { rowspan: 0, colspan: 0 }
|
||
return { rowspan, colspan: 1 }
|
||
}
|
||
|
||
function isPermissionChecked(code: string) {
|
||
return selectedPermissions.value.includes(code)
|
||
}
|
||
|
||
function isChangeChecked(checked: boolean | (string | number | boolean)) {
|
||
if (Array.isArray(checked)) return checked.length > 0
|
||
return checked === true
|
||
}
|
||
|
||
function togglePermission(code: string, checked: boolean | (string | number | boolean)) {
|
||
if (!code) return
|
||
selectedPermissions.value = togglePermissionWithCascade(
|
||
selectedPermissions.value,
|
||
permissionCascadeContext.value,
|
||
code,
|
||
isChangeChecked(checked)
|
||
)
|
||
}
|
||
|
||
function formatTime(value?: string | null) {
|
||
if (!value) return '—'
|
||
const d = dayjs(value)
|
||
if (!d.isValid() || d.year() < 1970) return '—'
|
||
return d.format('YYYY-MM-DD HH:mm:ss')
|
||
}
|
||
|
||
function selectRoleFromKey(key: string) {
|
||
const role = findLeftMenuItemByKey(key, dataSource.value)
|
||
if (role) {
|
||
isCreating.value = false
|
||
selectedRole.value = role
|
||
}
|
||
}
|
||
|
||
function handleRoleSelect(keys: string[]) {
|
||
const key = keys[0]
|
||
if (key) selectRoleFromKey(key)
|
||
}
|
||
|
||
function handleRoleNodeClick(key: string) {
|
||
selectRoleFromKey(key)
|
||
}
|
||
|
||
function syncFormFromRole(role: RoleDto) {
|
||
Object.assign(formState, {
|
||
name: role.name || '',
|
||
code: role.code || '',
|
||
boundWarehouseId: roleWarehouseMap.value[role.id || ''] || undefined,
|
||
})
|
||
}
|
||
|
||
async function loadData() {
|
||
loading.value = true
|
||
try {
|
||
const response = await RoleService.getRbacRoleGetList(
|
||
searchKeyword.value || undefined,
|
||
pagination.current,
|
||
pagination.pageSize
|
||
)
|
||
dataSource.value = response?.items || []
|
||
if (selectedRole.value?.id) {
|
||
const stillExists = dataSource.value.find((r) => r.id === selectedRole.value?.id)
|
||
selectedRole.value = stillExists || dataSource.value[0] || null
|
||
} else if (!isCreating.value && dataSource.value.length > 0) {
|
||
selectedRole.value = dataSource.value[0]
|
||
}
|
||
} catch (error) {
|
||
handleApiError(error)
|
||
} finally {
|
||
loading.value = false
|
||
}
|
||
}
|
||
|
||
async function loadPermissionTree() {
|
||
if (permissionTree.value.length > 0) return
|
||
try {
|
||
permissionTree.value = (await PermissionService.getRbacPermissionGetPermissionTree()) || []
|
||
} catch (error) {
|
||
handleApiError(error)
|
||
}
|
||
}
|
||
|
||
async function loadRolePermissions(roleId: string) {
|
||
permissionLoading.value = true
|
||
try {
|
||
await loadPermissionTree()
|
||
const loaded = (await RoleService.getRbacRoleGetRolePermissions(roleId)) || []
|
||
selectedPermissions.value = normalizeSelectedPermissions(loaded, permissionRows.value)
|
||
} catch (error) {
|
||
handleApiError(error)
|
||
} finally {
|
||
permissionLoading.value = false
|
||
}
|
||
}
|
||
|
||
function checkAllPermissions() {
|
||
selectedPermissions.value = collectPermissionCodesFromRows(permissionRows.value)
|
||
}
|
||
|
||
function uncheckAllPermissions() {
|
||
selectedPermissions.value = []
|
||
}
|
||
|
||
function handleSearch() {
|
||
pagination.current = 1
|
||
loadData()
|
||
}
|
||
|
||
function handleAdd() {
|
||
isCreating.value = true
|
||
selectedRole.value = { name: '', code: '' }
|
||
Object.assign(formState, { name: '', code: '', boundWarehouseId: undefined })
|
||
activeTab.value = 'permissions'
|
||
selectedPermissions.value = []
|
||
}
|
||
|
||
async function handleDelete(id?: string) {
|
||
if (!id) return
|
||
const role = dataSource.value.find((r) => r.id === id)
|
||
if (isCustomerRole(role)) {
|
||
Message.warning(t('system.role.message.cannotDeleteSystemRole'))
|
||
return
|
||
}
|
||
Modal.confirm({
|
||
content: t('system.role.modal.deleteConfirmContent', { count: 1 }),
|
||
onOk: async () => {
|
||
try {
|
||
await RoleService.deleteRbacRoleDelete(id)
|
||
Message.success(t('system.role.message.deleteSuccess'))
|
||
if (selectedRole.value?.id === id) {
|
||
selectedRole.value = null
|
||
isCreating.value = false
|
||
}
|
||
await loadData()
|
||
} catch (error) {
|
||
handleApiError(error)
|
||
}
|
||
},
|
||
})
|
||
}
|
||
|
||
async function handleSaveRole() {
|
||
try {
|
||
await formRef.value?.validate()
|
||
modalLoading.value = true
|
||
|
||
if (isCreating.value) {
|
||
const createData: RoleCreateDto = {
|
||
name: formState.name,
|
||
code: formState.code,
|
||
}
|
||
const res = await RoleService.postRbacRoleCreate(createData)
|
||
const newRoleId = res?.id
|
||
if (newRoleId && formState.boundWarehouseId) {
|
||
roleWarehouseMap.value[newRoleId] = formState.boundWarehouseId
|
||
}
|
||
Message.success(t('system.role.message.createSuccess'))
|
||
isCreating.value = false
|
||
await loadData()
|
||
if (newRoleId) {
|
||
selectedRole.value = dataSource.value.find((r) => r.id === newRoleId) || null
|
||
}
|
||
return newRoleId || null
|
||
}
|
||
|
||
if (selectedRole.value?.id) {
|
||
const updateData: RoleUpdateDto = { name: formState.name }
|
||
await RoleService.putRbacRoleUpdate(selectedRole.value.id, updateData)
|
||
if (formState.boundWarehouseId !== undefined) {
|
||
roleWarehouseMap.value[selectedRole.value.id] = formState.boundWarehouseId || ''
|
||
}
|
||
await loadData()
|
||
return selectedRole.value.id
|
||
}
|
||
return null
|
||
} catch (error: any) {
|
||
if (error?.fields) return null
|
||
handleApiError(error)
|
||
return null
|
||
} finally {
|
||
modalLoading.value = false
|
||
}
|
||
}
|
||
|
||
async function handleSavePermissions(roleId?: string) {
|
||
const id = roleId || selectedRole.value?.id
|
||
if (!id || isCreating.value) return false
|
||
if (isAdminRole(selectedRole.value)) return true
|
||
if (!hasPermission('Rbac.Roles.AssignPermissions')) return true
|
||
|
||
permissionSaving.value = true
|
||
try {
|
||
await RoleService.postRbacRoleAssignPermissions(id, normalizedSelectedPermissions.value)
|
||
const rbacUserStore = useRbacUserStore()
|
||
const currentHasRole = rbacUserStore.userInfo?.roles?.some((r) => r.id === id)
|
||
if (currentHasRole) {
|
||
try {
|
||
await rbacUserStore.refreshUserInfo()
|
||
} catch {
|
||
Message.warning(t('system.role.permission.refreshHint'))
|
||
}
|
||
}
|
||
return true
|
||
} catch (error) {
|
||
handleApiError(error)
|
||
return false
|
||
} finally {
|
||
permissionSaving.value = false
|
||
}
|
||
}
|
||
|
||
async function handleSaveAll() {
|
||
const wasCreating = isCreating.value
|
||
const roleId = await handleSaveRole()
|
||
if (!roleId) return
|
||
|
||
// 新建已提示成功;Admin 无需写权限
|
||
if (wasCreating || isAdminRole(selectedRole.value)) {
|
||
if (!wasCreating) {
|
||
Message.success(t('system.role.message.updateSuccess'))
|
||
}
|
||
return
|
||
}
|
||
|
||
const ok = await handleSavePermissions(roleId)
|
||
if (ok) {
|
||
Message.success(t('system.role.message.updateSuccess'))
|
||
}
|
||
}
|
||
|
||
watch(
|
||
() => selectedRole.value?.id,
|
||
async (roleId) => {
|
||
if (!roleId || isCreating.value) return
|
||
syncFormFromRole(selectedRole.value!)
|
||
activeTab.value = 'permissions'
|
||
permissionKeyword.value = ''
|
||
await loadRolePermissions(roleId)
|
||
}
|
||
)
|
||
|
||
onMounted(async () => {
|
||
await loadData()
|
||
await loadPermissionTree()
|
||
})
|
||
</script>
|
||
|
||
<style scoped lang="less">
|
||
@import '@/components/RbacSplit/rbac-split-layout.less';
|
||
|
||
.role-header-form {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
gap: 4px 8px;
|
||
width: 100%;
|
||
|
||
:deep(.arco-form-item) {
|
||
margin-bottom: 0;
|
||
margin-right: 12px;
|
||
}
|
||
|
||
:deep(.arco-form-item-label-col > label) {
|
||
color: var(--color-text-3);
|
||
font-size: 13px;
|
||
}
|
||
}
|
||
|
||
.role-create-time {
|
||
display: inline-block;
|
||
min-width: 150px;
|
||
font-size: 13px;
|
||
color: var(--color-text-2);
|
||
line-height: 32px;
|
||
}
|
||
|
||
.permission-body {
|
||
display: flex;
|
||
flex-direction: column;
|
||
min-height: 0;
|
||
height: 100%;
|
||
}
|
||
|
||
.permission-table {
|
||
width: 100%;
|
||
|
||
:deep(.arco-table-th) {
|
||
background: var(--color-fill-1);
|
||
}
|
||
|
||
:deep(.arco-table-td) {
|
||
vertical-align: middle;
|
||
}
|
||
|
||
:deep(.arco-table-td .arco-checkbox) {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
}
|
||
|
||
:deep(.arco-table-td .arco-checkbox .arco-checkbox-label) {
|
||
line-height: 1.4;
|
||
}
|
||
}
|
||
|
||
.permission-button-group {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
gap: 8px 16px;
|
||
padding: 4px 0;
|
||
}
|
||
|
||
.permission-no-buttons {
|
||
color: var(--color-text-4);
|
||
}
|
||
|
||
.permission-empty {
|
||
padding: 64px 24px;
|
||
text-align: center;
|
||
color: var(--color-text-3);
|
||
}
|
||
</style>
|