fetch(modify):完善按钮权限
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m25s
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m25s
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user