diff --git a/src/router/index.ts b/src/router/index.ts index 56158e0..93e7ed9 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -4,7 +4,7 @@ import AuthView from "../views/AuthView.vue"; import ProjectView from "../views/Project/Index.vue"; import TestView from "../views/TestView.vue"; import UserView from "@/views/User/Index.vue"; -import ExamView from "@/views/ExamView.vue"; +import ExamView from "@/views/Exam/Index.vue"; const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), diff --git a/src/utils/Common.ts b/src/utils/Common.ts index 922e843..a8ff5cd 100644 --- a/src/utils/Common.ts +++ b/src/utils/Common.ts @@ -48,3 +48,14 @@ export function useOptionalInjection( const value = useFn(); return value ?? defaultValue; } + +export function formatDate(date: Date | string) { + const dateObj = typeof date === "string" ? new Date(date) : date; + return dateObj.toLocaleString("zh-CN", { + year: "numeric", + month: "2-digit", + day: "2-digit", + hour: "2-digit", + minute: "2-digit", + }); +} diff --git a/src/views/Exam/ExamEditModal.vue b/src/views/Exam/ExamEditModal.vue new file mode 100644 index 0000000..cdb470c --- /dev/null +++ b/src/views/Exam/ExamEditModal.vue @@ -0,0 +1,833 @@ + + + + + diff --git a/src/views/Exam/ExamInfoModal.vue b/src/views/Exam/ExamInfoModal.vue new file mode 100644 index 0000000..cd8f8db --- /dev/null +++ b/src/views/Exam/ExamInfoModal.vue @@ -0,0 +1,330 @@ + + + + diff --git a/src/views/Exam/Index.vue b/src/views/Exam/Index.vue new file mode 100644 index 0000000..20a598d --- /dev/null +++ b/src/views/Exam/Index.vue @@ -0,0 +1,294 @@ + + + + + diff --git a/src/views/ExamView.vue b/src/views/ExamView.vue deleted file mode 100644 index 9e56614..0000000 --- a/src/views/ExamView.vue +++ /dev/null @@ -1,1069 +0,0 @@ - - - - -