|
@@ -133,12 +133,14 @@ let currentTaskPool: ExtractApiResponse<'getMarkingTask'> = []
|
|
|
|
|
|
const currentTask = ref<TaskInfoType>()
|
|
|
|
|
|
-const excludeOperations = computed<InstanceType<typeof MarkHeader>['$props']['excludeOperations']>(() => {
|
|
|
+type excludeOperationTypes = InstanceType<typeof MarkHeader>['$props']['excludeOperations']
|
|
|
+
|
|
|
+const excludeOperations = computed<excludeOperationTypes>(() => {
|
|
|
if (!currentTask.value?.taskType) {
|
|
|
return ['delete', 'bookmark']
|
|
|
}
|
|
|
const isSampleType = ['SAMPLE_A', 'SAMPLE_B'].includes(currentTask.value.taskType)
|
|
|
- return ['delete', 'bookmark'].concat(isSampleType ? 'problem' : [])
|
|
|
+ return ['delete', 'bookmark'].concat(isSampleType ? ['problem'] : []) as excludeOperationTypes
|
|
|
})
|
|
|
|
|
|
const { fetch: getMarkingTask, loading, result: taskPool } = useFetch('getMarkingTask')
|