feat: 代理商注册列表
All checks were successful
构建并部署前端到测试环境 / deploy (push) Successful in 55s

This commit is contained in:
luo
2026-09-21 18:07:36 +08:00
parent c5d7a260d0
commit c136f68ab8
34 changed files with 1112 additions and 142 deletions

View File

@@ -127,7 +127,6 @@
import { useAuth } from '@/composables/useAuth'
import { useCheckedColumns } from '@/composables/useCheckedColumns'
import { formatDateTime } from '@/utils/business/format'
import { normalizeApiError } from '@/utils/business/apiError'
import { AUGUST_PERMISSIONS } from '@/config/constants'
import type { SearchFormItem } from '@/types'
import type {
@@ -143,6 +142,8 @@
const canCreate = computed(() => hasAuth(perms.ruleCreate))
const canUpdate = computed(() => hasAuth(perms.ruleUpdate))
const canEnable = computed(() => hasAuth(perms.ruleEnable))
const canDisable = computed(() => hasAuth(perms.ruleDisable))
// ========== 列表数据 ==========
@@ -333,15 +334,16 @@
handler: () => void
type?: 'primary' | 'danger'
}> = []
if (!canUpdate.value) return actions
actions.push({ label: '编辑', handler: () => openFormDialog('edit', row) })
if (row.enabled) {
if (canUpdate.value) {
actions.push({ label: '编辑', handler: () => openFormDialog('edit', row) })
}
if (row.enabled && canDisable.value) {
actions.push({
label: '停用',
handler: () => handleToggleEnabled(row, false),
type: 'danger' as const
})
} else {
} else if (!row.enabled && canEnable.value) {
actions.push({
label: '启用',
handler: () => handleToggleEnabled(row, true),