update
This commit is contained in:
@@ -22,6 +22,7 @@ function filterResult(result: Problem) {
|
|||||||
author: result.created_by.username,
|
author: result.created_by.username,
|
||||||
allow_flowchart: result.allow_flowchart,
|
allow_flowchart: result.allow_flowchart,
|
||||||
show_flowchart: result.show_flowchart,
|
show_flowchart: result.show_flowchart,
|
||||||
|
has_ast_rules: result.has_ast_rules,
|
||||||
}
|
}
|
||||||
if (result.my_status === null || result.my_status === undefined) {
|
if (result.my_status === null || result.my_status === undefined) {
|
||||||
newResult.status = "not_test"
|
newResult.status = "not_test"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ProblemFiltered } from "utils/types"
|
import type { ProblemFiltered } from "utils/types"
|
||||||
import { Icon } from "@iconify/vue"
|
import { Icon } from "@iconify/vue"
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
@@ -19,5 +19,10 @@ defineProps<{
|
|||||||
width="18"
|
width="18"
|
||||||
icon="vscode-icons:file-type-graphql"
|
icon="vscode-icons:file-type-graphql"
|
||||||
/>
|
/>
|
||||||
|
<Icon
|
||||||
|
v-if="problem.has_ast_rules"
|
||||||
|
width="18"
|
||||||
|
icon="vscode-icons:file-type-light-todo"
|
||||||
|
/>
|
||||||
</n-flex>
|
</n-flex>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ const sortOptions = [
|
|||||||
{ label: "最多通过", value: "-accepted_number" },
|
{ label: "最多通过", value: "-accepted_number" },
|
||||||
{ label: "最少通过", value: "accepted_number" },
|
{ label: "最少通过", value: "accepted_number" },
|
||||||
{ label: "画流程图", value: "flowchart" },
|
{ label: "画流程图", value: "flowchart" },
|
||||||
|
{ label: "语法检查", value: "ast" },
|
||||||
]
|
]
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
@@ -240,6 +241,7 @@ function rowProps(row: ProblemFiltered) {
|
|||||||
style="width: 120px"
|
style="width: 120px"
|
||||||
v-model:value="query.sort"
|
v-model:value="query.sort"
|
||||||
:options="sortOptions"
|
:options="sortOptions"
|
||||||
|
:dropdown-style="{ maxHeight: 'unset' }"
|
||||||
/>
|
/>
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item>
|
<n-form-item>
|
||||||
|
|||||||
@@ -138,6 +138,7 @@ export interface Problem {
|
|||||||
flowchart_hint?: string
|
flowchart_hint?: string
|
||||||
show_flowchart?: boolean
|
show_flowchart?: boolean
|
||||||
ast_rules?: { [key: string]: { engine: string; target?: string; min?: number; max?: number; message: string }[] } | null
|
ast_rules?: { [key: string]: { engine: string; target?: string; min?: number; max?: number; message: string }[] } | null
|
||||||
|
has_ast_rules?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export type AdminProblem = Problem & AlterProblem
|
export type AdminProblem = Problem & AlterProblem
|
||||||
@@ -175,6 +176,7 @@ export interface ProblemFiltered {
|
|||||||
author: string
|
author: string
|
||||||
allow_flowchart: boolean
|
allow_flowchart: boolean
|
||||||
show_flowchart: boolean
|
show_flowchart: boolean
|
||||||
|
has_ast_rules: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AdminProblemFiltered {
|
export interface AdminProblemFiltered {
|
||||||
|
|||||||
Reference in New Issue
Block a user