fix submission.

This commit is contained in:
2023-04-07 11:33:15 +08:00
parent 0862b0ff91
commit 9c3038245d
10 changed files with 406 additions and 27 deletions

View File

@@ -13,9 +13,9 @@ import { Submission } from "utils/types"
import { adminRejudge, getSubmissions } from "oj/api"
import { isDesktop } from "~/shared/composables/breakpoints"
import { useUserStore } from "~/shared/store/user"
import { useConfigStore } from "~/shared/store/config"
interface Query {
problem: string
username: string
result: string
limit: number
@@ -26,12 +26,12 @@ interface Query {
const route = useRoute()
const router = useRouter()
const userStore = useUserStore()
const configStore = useConfigStore()
const message = useMessage()
const submissions = ref([])
const total = ref(0)
const query = reactive<Query>({
problem: <string>route.query.problem ?? "",
result: <string>route.query.result ?? "",
page: parseInt(<string>route.query.page) || 1,
limit: parseInt(<string>route.query.limit) || 10,
@@ -48,6 +48,7 @@ const options: SelectOption[] = [
]
async function listSubmissions() {
query.problem = <string>route.query.problem ?? ""
query.result = <string>route.query.result ?? ""
query.page = parseInt(<string>route.query.page) || 1
query.limit = parseInt(<string>route.query.limit) || 10