Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e7a621075c | ||
|
|
081981d115 |
@@ -79,16 +79,10 @@ const problem = useLocalStorage<BlankProblem>(STORAGE_KEY.ADMIN_PROBLEM, {
|
|||||||
],
|
],
|
||||||
test_case_id: "",
|
test_case_id: "",
|
||||||
test_case_score: [] as Testcase[],
|
test_case_score: [] as Testcase[],
|
||||||
rule_type: "ACM",
|
|
||||||
hint: "",
|
hint: "",
|
||||||
source: "",
|
source: "",
|
||||||
prompt: "",
|
prompt: "",
|
||||||
answers: [] as { language: LANGUAGE; code: string }[],
|
answers: [] as { language: LANGUAGE; code: string }[],
|
||||||
io_mode: {
|
|
||||||
io_mode: "Standard IO",
|
|
||||||
input: "input.txt",
|
|
||||||
output: "output.txt",
|
|
||||||
},
|
|
||||||
contest_id: "",
|
contest_id: "",
|
||||||
allow_flowchart: false,
|
allow_flowchart: false,
|
||||||
mermaid_code: "",
|
mermaid_code: "",
|
||||||
@@ -240,7 +234,6 @@ async function getProblemDetail() {
|
|||||||
problem.value.samples = data.samples
|
problem.value.samples = data.samples
|
||||||
problem.value.test_case_id = data.test_case_id
|
problem.value.test_case_id = data.test_case_id
|
||||||
problem.value.test_case_score = data.test_case_score
|
problem.value.test_case_score = data.test_case_score
|
||||||
problem.value.rule_type = data.rule_type
|
|
||||||
problem.value.hint = data.hint
|
problem.value.hint = data.hint
|
||||||
problem.value.source = data.source
|
problem.value.source = data.source
|
||||||
problem.value.prompt = data.prompt
|
problem.value.prompt = data.prompt
|
||||||
@@ -260,7 +253,6 @@ async function getProblemDetail() {
|
|||||||
code: "",
|
code: "",
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
problem.value.io_mode = data.io_mode
|
|
||||||
if (problem.value.contest_id) {
|
if (problem.value.contest_id) {
|
||||||
problem.value.contest_id = problem.value.contest_id
|
problem.value.contest_id = problem.value.contest_id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,15 +98,12 @@ async function init() {
|
|||||||
const res = await getProfile(route.query.name as string)
|
const res = await getProfile(route.query.name as string)
|
||||||
profile.value = res.data
|
profile.value = res.data
|
||||||
const acm = res.data.acm_problems_status.problems || {}
|
const acm = res.data.acm_problems_status.problems || {}
|
||||||
const oi = res.data.oi_problems_status.problems || {}
|
|
||||||
const ac: string[] = []
|
const ac: string[] = []
|
||||||
for (let problems of [acm, oi]) {
|
Object.keys(acm).forEach((id) => {
|
||||||
Object.keys(problems).forEach((id) => {
|
if (acm[id]["status"] === 0) {
|
||||||
if (problems[id]["status"] === 0) {
|
ac.push(acm[id]["_id"])
|
||||||
ac.push(problems[id]["_id"])
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
|
||||||
ac.sort()
|
ac.sort()
|
||||||
problems.value = ac
|
problems.value = ac
|
||||||
const promises: Promise<{ data: any }>[] = []
|
const promises: Promise<{ data: any }>[] = []
|
||||||
|
|||||||
@@ -12,15 +12,6 @@ export interface Profile {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
oi_problems_status: {
|
|
||||||
problems: {
|
|
||||||
[key: string]: {
|
|
||||||
_id: string
|
|
||||||
score: number
|
|
||||||
status: number
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
avatar: string
|
avatar: string
|
||||||
blog: null
|
blog: null
|
||||||
mood: string
|
mood: string
|
||||||
@@ -29,7 +20,6 @@ export interface Profile {
|
|||||||
major: string
|
major: string
|
||||||
language: string
|
language: string
|
||||||
accepted_number: number
|
accepted_number: number
|
||||||
total_score: number
|
|
||||||
submission_number: number
|
submission_number: number
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -145,17 +135,10 @@ export interface Problem {
|
|||||||
last_update_time: null
|
last_update_time: null
|
||||||
time_limit: number
|
time_limit: number
|
||||||
memory_limit: number
|
memory_limit: number
|
||||||
io_mode: {
|
|
||||||
input: string
|
|
||||||
output: string
|
|
||||||
io_mode: string
|
|
||||||
}
|
|
||||||
rule_type: string
|
|
||||||
difficulty: "Low" | "Mid" | "High"
|
difficulty: "Low" | "Mid" | "High"
|
||||||
source: string
|
source: string
|
||||||
prompt: string
|
prompt: string
|
||||||
answers: { language: LANGUAGE; code: string }[]
|
answers: { language: LANGUAGE; code: string }[]
|
||||||
total_score: number
|
|
||||||
submission_number: number
|
submission_number: number
|
||||||
accepted_number: number
|
accepted_number: number
|
||||||
statistic_info: { [key: string]: number }
|
statistic_info: { [key: string]: number }
|
||||||
@@ -207,7 +190,6 @@ type ExcludeKeys =
|
|||||||
| "statistic_info"
|
| "statistic_info"
|
||||||
| "accepted_number"
|
| "accepted_number"
|
||||||
| "submission_number"
|
| "submission_number"
|
||||||
| "total_score"
|
|
||||||
|
|
||||||
export type BlankProblem = Omit<Problem, ExcludeKeys> &
|
export type BlankProblem = Omit<Problem, ExcludeKeys> &
|
||||||
AlterProblem & { id?: number }
|
AlterProblem & { id?: number }
|
||||||
@@ -500,7 +482,6 @@ export interface Rank {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
oi_problems_status: {}
|
|
||||||
real_name: null | string
|
real_name: null | string
|
||||||
avatar: string
|
avatar: string
|
||||||
blog: null
|
blog: null
|
||||||
@@ -510,7 +491,6 @@ export interface Rank {
|
|||||||
major: null | string
|
major: null | string
|
||||||
language: null | string
|
language: null | string
|
||||||
accepted_number: number
|
accepted_number: number
|
||||||
total_score: number
|
|
||||||
submission_number: number
|
submission_number: number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user