fetch(modify):完善按钮权限
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m25s

This commit is contained in:
sexygoat
2026-02-03 17:20:50 +08:00
parent de9753f42d
commit 192c6f1d26
22 changed files with 885 additions and 232 deletions

View File

@@ -102,6 +102,7 @@
import type { FormInstance, FormRules } from 'element-plus'
import type { SearchFormItem } from '@/types'
import { useCheckedColumns } from '@/composables/useCheckedColumns'
import { useAuth } from '@/composables/useAuth'
import { formatDateTime } from '@/utils/business/format'
import ArtButtonTable from '@/components/core/forms/ArtButtonTable.vue'
import type {
@@ -113,6 +114,7 @@
defineOptions({ name: 'AuthorizationRecords' })
const { hasAuth } = useAuth()
const router = useRouter()
const loading = ref(false)
const detailDialogVisible = ref(false)
@@ -297,16 +299,25 @@
width: 150,
fixed: 'right',
formatter: (row: AuthorizationItem) => {
return h('div', { style: 'display: flex; gap: 8px;' }, [
const buttons = []
buttons.push(
h(ArtButtonTable, {
text: '详情',
onClick: () => viewDetail(row)
}),
h(ArtButtonTable, {
type: 'edit',
onClick: () => showRemarkDialog(row)
})
])
)
if (hasAuth('authorization_records:update_remark')) {
buttons.push(
h(ArtButtonTable, {
type: 'edit',
onClick: () => showRemarkDialog(row)
})
)
}
return h('div', { style: 'display: flex; gap: 8px;' }, buttons)
}
}
])