diff --git a/client/src/components/editor/Preview.vue b/client/src/components/editor/Preview.vue
index b6d546c..89b9cd0 100644
--- a/client/src/components/editor/Preview.vue
+++ b/client/src/components/editor/Preview.vue
@@ -2,9 +2,6 @@
预览
-
- ({{ submission.view_count || 0 }})
-
@@ -19,26 +16,6 @@
下载
全屏
- 清空
-
- 代码
-
-
- 链接
-
-
- 代码
-
-
- 打分
-
-
-
-
@@ -54,12 +31,7 @@
diff --git a/client/src/components/submissions/ExpandedSubTable.vue b/client/src/components/submissions/ExpandedSubTable.vue
deleted file mode 100644
index 964aab1..0000000
--- a/client/src/components/submissions/ExpandedSubTable.vue
+++ /dev/null
@@ -1,126 +0,0 @@
-
-
-
-
-
-
diff --git a/client/src/components/submissions/TaskTitle.vue b/client/src/components/submissions/TaskTitle.vue
deleted file mode 100644
index d14639e..0000000
--- a/client/src/components/submissions/TaskTitle.vue
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
- 教程
-
-
- 挑战
-
- {{ props.submission.task_title }}
-
-
-
diff --git a/client/src/pages/MySubmissions.vue b/client/src/pages/MySubmissions.vue
new file mode 100644
index 0000000..8634f5e
--- /dev/null
+++ b/client/src/pages/MySubmissions.vue
@@ -0,0 +1,441 @@
+
+
+
+
+
+
+
+
+ {{ task.task_type === TASK_TYPE.Tutorial ? "教程" : "挑战" }}
+ {{ task.task_display }}. {{ task.task_title }}
+
+
+ 打开这道题
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ parseTime(current.created, "YYYY-MM-DD HH:mm") }} 提交 ·
+ {{ current.score ? `得分 ${current.score.toFixed(2)}` : "还没有人评分" }}
+ · 成绩按分数最高的一次算
+
+
+
+ 提示词
+
+
+
+ 放回编辑器
+
+ 把这一版的代码放进这道题的编辑器,会替换编辑器里现在的代码。
+
+
+
+ 删除这一版
+
+ 删除后找不回来;它对应的那轮 AI 对话也会一起删掉。
+ 已经有人评过分的不能删。
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/client/src/pages/Submissions.vue b/client/src/pages/Submissions.vue
index 7517d0b..286706f 100644
--- a/client/src/pages/Submissions.vue
+++ b/client/src/pages/Submissions.vue
@@ -1,335 +1,217 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+ 全部
+ 教程
+ 挑战
+
+
+
+ 每人每题只看最新一次
+
+ 共 {{ count }} 条
+
+
+
+
-
-
+ 刷新
+
+
+
+
+
+
+
-
-
-
-
-
+
-
-
-
+
+
diff --git a/client/src/router.ts b/client/src/router.ts
index f5c1902..58fc87b 100644
--- a/client/src/router.ts
+++ b/client/src/router.ts
@@ -44,9 +44,10 @@ const routes: RouteRecordRaw[] = [
meta: { auth: true },
},
{
- path: "/submissions/:page",
+ // 学生(和老师自己)的“我的提交”;:page 是旧链接留下的,不用了
+ path: "/submissions/:page?",
name: "submissions",
- component: () => import("./pages/Submissions.vue"),
+ component: () => import("./pages/MySubmissions.vue"),
meta: { auth: true },
},
{
@@ -116,7 +117,7 @@ const routes: RouteRecordRaw[] = [
component: () => import("./pages/Review.vue"),
},
{
- // 和顶层的 /submissions 是同一个页面,放在教学侧栏里打开,侧栏不会消失
+ // 全站提交列表(超管),和学生的“我的提交”是两个页面
path: "submissions/:page",
name: "teach-submissions",
component: () => import("./pages/Submissions.vue"),
diff --git a/client/src/store/submission.ts b/client/src/store/submission.ts
deleted file mode 100644
index e50a9b0..0000000
--- a/client/src/store/submission.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import { ref } from "vue"
-import type { SubmissionAll } from "../utils/type"
-import { TASK_TYPE } from "../utils/const"
-
-export const submission = ref({
- id: "",
- userid: 0,
- username: "",
- task_id: 0,
- task_display: 0, // 这是序号
- task_title: "",
- task_type: TASK_TYPE.Tutorial,
- score: 0.0,
- my_score: 0,
- submit_count: 0,
- view_count: 0,
- html: "",
- css: "",
- js: "",
- created: new Date(),
- modified: new Date(),
-})