fix
Some checks failed
Deploy / deploy (build, debian, 22, /root/OJDeploy/data/clientnext) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822, /root/OJ/data/dist) (push) Has been cancelled

This commit is contained in:
2026-05-26 02:44:55 -06:00
parent 714e07d514
commit 7e784be061
2 changed files with 17 additions and 18 deletions

View File

@@ -50,6 +50,9 @@ export async function getProblemList(
visible: result.visible, visible: result.visible,
difficulty: result.difficulty, difficulty: result.difficulty,
tags: result.tags, tags: result.tags,
has_ast_rules: result.has_ast_rules,
allow_flowchart: result.allow_flowchart,
show_flowchart: result.show_flowchart,
})), })),
total: res.data.total, total: res.data.total,
} }

View File

@@ -1,5 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import { NFlex, NSwitch, NTag } from "naive-ui" import { NFlex, NSwitch, NTag } from "naive-ui"
import { Icon } from "@iconify/vue"
import Pagination from "shared/components/Pagination.vue" import Pagination from "shared/components/Pagination.vue"
import { usePagination } from "shared/composables/pagination" import { usePagination } from "shared/composables/pagination"
import { getTagColor, parseTime } from "utils/functions" import { getTagColor, parseTime } from "utils/functions"
@@ -80,25 +81,20 @@ const columns: DataTableColumn<AdminProblemFiltered>[] = [
), ),
}, },
{ {
title: "AST", title: "功能",
key: "has_ast_rules", key: "features",
width: 60, width: 80,
render: (row) => render: (row) =>
row.has_ast_rules ? h(NTag, { type: "info", size: "small" }, () => "AST") : null, h(NFlex, { size: 4, align: "center" }, () => [
}, row.allow_flowchart
{ ? h(Icon, { width: 18, icon: "vscode-icons:file-type-drawio", title: "绘图" })
title: "绘图", : row.show_flowchart
key: "allow_flowchart", ? h(Icon, { width: 18, icon: "vscode-icons:file-type-graphql", title: "流程图" })
width: 60, : null,
render: (row) => row.has_ast_rules
row.allow_flowchart ? h(NTag, { type: "success", size: "small" }, () => "绘图") : null, ? h(Icon, { width: 18, icon: "vscode-icons:file-type-light-todo", title: "AST" })
}, : null,
{ ]),
title: "流程",
key: "show_flowchart",
width: 60,
render: (row) =>
row.show_flowchart ? h(NTag, { type: "warning", size: "small" }, () => "流程图") : null,
}, },
{ title: "出题人", key: "username", width: 120 }, { title: "出题人", key: "username", width: 120 },
{ {