add flowchart
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-04-12 06:00:32 -06:00
parent 1f18f363eb
commit e26dd1ab30
5 changed files with 9 additions and 1 deletions

View File

@@ -20,6 +20,7 @@ function filterResult(result: Problem) {
status: "",
author: result.created_by.username,
allow_flowchart: result.allow_flowchart,
show_flowchart: result.show_flowchart,
}
if (result.my_status === null || result.my_status === undefined) {
newResult.status = "not_test"

View File

@@ -14,5 +14,10 @@ defineProps<{
width="18"
icon="vscode-icons:file-type-drawio"
/>
<Icon
v-else-if="problem.show_flowchart"
width="18"
icon="fluent:document-flowchart-24-filled"
/>
</n-flex>
</template>

View File

@@ -15,6 +15,7 @@ import { renderTableTitle } from "utils/renders"
import ProblemStatus from "./components/ProblemStatus.vue"
import AuthorSelect from "shared/components/AuthorSelect.vue"
import ProblemListTitle from "./components/ProblemListTitle.vue"
import { labelRect } from "mermaid/dist/rendering-util/rendering-elements/shapes/labelRect"
interface Tag {
id: number
@@ -44,6 +45,7 @@ const sortOptions = [
{ label: "最少提交", value: "submission_number" },
{ label: "最多通过", value: "-accepted_number" },
{ label: "最少通过", value: "accepted_number" },
{ label: "画流程图", value: "flowchart" },
]
const router = useRouter()

View File

@@ -173,6 +173,7 @@ export interface ProblemFiltered {
status: "not_test" | "passed" | "failed"
author: string
allow_flowchart: boolean
show_flowchart: boolean
}
export interface AdminProblemFiltered {

View File

@@ -3,7 +3,6 @@
"target": "ESNext",
"useDefineForClassFields": true,
"module": "ESNext",
"moduleResolution": "Node",
"strict": true,
"jsx": "preserve",
"resolveJsonModule": true,