This commit is contained in:
@@ -18,7 +18,9 @@
|
||||
@refresh="handleRefresh"
|
||||
>
|
||||
<template #left>
|
||||
<el-button type="primary" @click="showCreateDialog">人工优先入队</el-button>
|
||||
<el-button v-if="canCreate" type="primary" @click="showCreateDialog">
|
||||
人工优先入队
|
||||
</el-button>
|
||||
</template>
|
||||
</ArtTableHeader>
|
||||
|
||||
@@ -187,9 +189,15 @@
|
||||
POLLING_PRIORITY_TRIGGER_TYPE_OPTIONS,
|
||||
getPollingPriorityResultName
|
||||
} from '@/config/constants'
|
||||
import { AUGUST_PERMISSIONS } from '@/config/constants/augustIteration'
|
||||
import { useAuth } from '@/composables/useAuth'
|
||||
|
||||
defineOptions({ name: 'PollingPriorityQueue' })
|
||||
|
||||
const { hasAuth } = useAuth()
|
||||
const canCreate = computed(() => hasAuth(AUGUST_PERMISSIONS.pollingPriorityQueue.create))
|
||||
const canDetail = computed(() => hasAuth(AUGUST_PERMISSIONS.pollingPriorityQueue.detail))
|
||||
|
||||
const loading = ref(false)
|
||||
const tableData = ref<PollingPriorityItem[]>([])
|
||||
const tableRef = ref()
|
||||
@@ -329,7 +337,8 @@
|
||||
}))
|
||||
)
|
||||
|
||||
const getActions = () => [{ label: '详情', handler: showDetail, type: 'primary' as const }]
|
||||
const getActions = () =>
|
||||
canDetail.value ? [{ label: '详情', handler: showDetail, type: 'primary' as const }] : []
|
||||
|
||||
const loadData = async () => {
|
||||
loading.value = true
|
||||
|
||||
Reference in New Issue
Block a user