From 0dd512d036f72cd8e11406cd8edf2ebfa0e8865b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=86=E5=85=89LG?= Date: Mon, 11 Aug 2025 09:36:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0c=E8=AF=AD=E8=A8=80?= =?UTF-8?q?=E5=87=BA=E9=A2=98=E5=9F=BA=E6=9C=AC=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 2 +- src/api/paper/question/index.ts | 8 +- .../Setting/children/components/import.vue | 4 +- src/views/paper/question/CdesignForm.vue | 449 ++++++++++++++++-- .../paper/question/components/FileForm.vue | 13 +- src/views/paper/question/index.vue | 8 +- 6 files changed, 424 insertions(+), 60 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index cc1dae5..f145f38 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -87,7 +87,7 @@ "source.fixAll.stylelint": "explicit" }, "[vue]": { - "editor.defaultFormatter": "octref.vetur" + "editor.defaultFormatter": "esbenp.prettier-vscode" }, "i18n-ally.localesPaths": ["src/locales"], "i18n-ally.keystyle": "nested", diff --git a/src/api/paper/question/index.ts b/src/api/paper/question/index.ts index 5882c94..4940698 100644 --- a/src/api/paper/question/index.ts +++ b/src/api/paper/question/index.ts @@ -170,4 +170,10 @@ export const setPsPoint = (data) => { export const getPsPointByQuId = (id) => { return request.get({ url: `/exam/getPoints/getPsPointById/${id}` }) -} \ No newline at end of file +} + +export const previewQuestion = (data) => { + return request.upload( + { url: `/exam/question/previewQuestion`, data } + ) +} diff --git a/src/components/Setting/children/components/import.vue b/src/components/Setting/children/components/import.vue index 8b48551..f67ab2d 100644 --- a/src/components/Setting/children/components/import.vue +++ b/src/components/Setting/children/components/import.vue @@ -18,7 +18,7 @@ > @@ -38,7 +38,7 @@ > diff --git a/src/views/paper/question/CdesignForm.vue b/src/views/paper/question/CdesignForm.vue index 576c19e..cade925 100644 --- a/src/views/paper/question/CdesignForm.vue +++ b/src/views/paper/question/CdesignForm.vue @@ -3,49 +3,144 @@
+
+ C语言基础环境采用gcc编译器 +
+
+
试题描述
+ +
试题题目
+
+ + + 更换题目模板 + + + + 预览 + +
+
+ + + 添加附件 + +
答题程序模板
- +
+ 学生端答题的初始程序内容,学生可在此基础上进行程序的编写,插入作答区标记后关键字评分只在作答区内评分,否则关键字评分在整段代码评分。 + 注意: 为确保系统能正确捕获程序运行的输出结果,要求 scanf() 函数不能加参数, + 不能采用类似 scanf("请输入: %s") 的形式 + 插入作答区标记后请在试题题目中明确告知学生不要自行更改作答区标记,以免无法正常评分。 +
+ +
更改答题程序模板无效,若需要更改请上传程序文件。
+
+ + + 上传程序文件 + + + + 上传结果文件 + + + + {{ formData.fileUploads.find((i) => i.url === tag)!.fileName }} + + +
- +
@@ -293,7 +388,7 @@ v-model="keyVisible" title="编辑关键字" width="50%" - style="height: auto;" + style="height: auto" :before-close="keyDialogClose" :close-on-click-modal="false" :close-on-press-escape="false" @@ -362,70 +457,217 @@
+ +