From 00562b42e0ce88ef63c55929c49b2eb4ee3cd886 Mon Sep 17 00:00:00 2001
From: musteven <1009173794@qq.com>
Date: Wed, 9 Apr 2025 16:59:18 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E4=BD=9C=E4=B8=9A=E6=8F=90?=
=?UTF-8?q?=E4=BA=A4=E7=95=8C=E9=9D=A2=E5=A4=A7=E9=83=A8=E5=88=86=E5=86=85?=
=?UTF-8?q?=E5=AE=B9=EF=BC=8C=E5=89=A9=E4=BD=99=E5=87=A0=E4=B8=AA=E6=8C=89?=
=?UTF-8?q?=E9=92=AE=E5=92=8C=E6=8E=A5=E5=85=A5=E7=AE=97=E6=B3=95=E6=8E=A7?=
=?UTF-8?q?=E4=BB=B6=EF=BC=8C=E4=BB=A5=E5=8F=8A=E4=BC=A0=E8=BE=93=E4=B8=8A?=
=?UTF-8?q?=E5=9B=9E=E6=B2=A1=E6=B7=BB=E5=8A=A0=E7=9A=84=E7=BB=84=E4=BB=B6?=
=?UTF-8?q?=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
AES-front/src/api/user.js | 5 +-
.../report-submit/components/leftparts.vue | 88 +++++++++++++++++++
.../components/report-actions.vue | 40 +++++++++
.../report-submit/components/rightparts.vue | 77 ++++++++++++++++
.../src/views/user/report-submit/index.vue | 14 +--
.../problem/controller/ProblemController.java | 22 ++++-
AES/src/main/resources/application.properties | 2 +-
7 files changed, 231 insertions(+), 17 deletions(-)
create mode 100644 AES-front/src/views/user/report-submit/components/leftparts.vue
create mode 100644 AES-front/src/views/user/report-submit/components/report-actions.vue
create mode 100644 AES-front/src/views/user/report-submit/components/rightparts.vue
diff --git a/AES-front/src/api/user.js b/AES-front/src/api/user.js
index 29e6929..4638c04 100644
--- a/AES-front/src/api/user.js
+++ b/AES-front/src/api/user.js
@@ -32,5 +32,8 @@ export default {
getClassRanks:(config) => request.get('/problem/getClassRanks', config),//»ñȡµ±ǰ±¨¸æ°༶ÅÅÃû
- getProblemInfo:(config) => request.get('/problem/getProblemInfo', config)//»ñȡµ±ǰ±¨¸沼ÖÃÐÅϢ
+ getPostProblemInfo:(config) => request.get('/problem/getPostProblemInfo', config),//»ñȡµ±ǰ±¨¸沼ÖÃÐÅϢ
+
+ findProblemById1:(config)=>request.get('/problem/findProblemById1',config)//»ñȡµ±ǰ±¨¸æ¾ßÌåÐÅϢ
+
}
diff --git a/AES-front/src/views/user/report-submit/components/leftparts.vue b/AES-front/src/views/user/report-submit/components/leftparts.vue
new file mode 100644
index 0000000..6635036
--- /dev/null
+++ b/AES-front/src/views/user/report-submit/components/leftparts.vue
@@ -0,0 +1,88 @@
+
+
+
+
+
+ {{ description }}
+
+
+
+
+
+ 上传附件
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/AES-front/src/views/user/report-submit/components/report-actions.vue b/AES-front/src/views/user/report-submit/components/report-actions.vue
new file mode 100644
index 0000000..0ab4a4e
--- /dev/null
+++ b/AES-front/src/views/user/report-submit/components/report-actions.vue
@@ -0,0 +1,40 @@
+
+
+ 保存
+ 保存并提交
+ 申请撤回
+
+
+
+
+
+
\ No newline at end of file
diff --git a/AES-front/src/views/user/report-submit/components/rightparts.vue b/AES-front/src/views/user/report-submit/components/rightparts.vue
new file mode 100644
index 0000000..b8f0c42
--- /dev/null
+++ b/AES-front/src/views/user/report-submit/components/rightparts.vue
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/AES-front/src/views/user/report-submit/index.vue b/AES-front/src/views/user/report-submit/index.vue
index 635ea8f..a566ff2 100644
--- a/AES-front/src/views/user/report-submit/index.vue
+++ b/AES-front/src/views/user/report-submit/index.vue
@@ -32,8 +32,6 @@ const examId = route.params.examId;
const classId = route.params.classId;
const loading = ref(true);
const title = ref(""); // 从API获取的作业名称
-const examScores = ref([]);
-const examName = ref("");
const countdown = ref(""); // 用于显示倒计时
// 将结束时间转换为Date对象
let endTime = null; // 结束时间初始化为null
@@ -57,10 +55,6 @@ const paginationReactive = reactive({
queryExamScores()
}
});
-// 列配置
-const columns = [
- // ... 列配置
-];
const queryExamScores = async () => {
@@ -69,7 +63,7 @@ const queryExamScores = async () => {
//查询作业名称信息(直接复用查询排名)
const res1 = await api.getStudentRank({ params: { examId } });
//查询作业时间等信息
- const res = await api.getProblemInfo({ params: { classId, examId } });
+ const res = await api.getPostProblemInfo({ params: { classId, examId } });
title.value = res1.data.title; // 更新作业名称
// 将结束时间转换为Date对象
@@ -92,7 +86,7 @@ const updateCountdown = () => {
const seconds = Math.floor((timeleft % (1000 * 60)) / 1000);
// 格式化倒计时字符串
- countdown.value = `${days}天${hours}小时 ${minutes}分钟${seconds}秒`;
+ countdown.value = `${days}天${hours}小时${minutes}分钟${seconds}秒`;
} else {
countdown.value = "作业已结束";
clearInterval(intervalId); // 清除定时器
@@ -161,11 +155,9 @@ onMounted(() => {
.bottom {
position: fixed; /* 使用固定定位 */
- left: 50%; /* 水平居中 */
+ left: 35%;
transform: translateX(-50%); /* 使用transform调整实际位置 */
- bottom: 0; /* 定位到页面底部 */
width: 100%; /* 宽度占满整个容器 */
- text-align: center; /* 文本居中 */
}
diff --git a/AES/src/main/java/com/example/aes/problem/controller/ProblemController.java b/AES/src/main/java/com/example/aes/problem/controller/ProblemController.java
index 70182d8..cf41646 100644
--- a/AES/src/main/java/com/example/aes/problem/controller/ProblemController.java
+++ b/AES/src/main/java/com/example/aes/problem/controller/ProblemController.java
@@ -196,6 +196,20 @@ public class ProblemController {
}
+ @GetMapping("/findProblemById1")//直接从前端传单个数据的方法
+ public RespBean findProblemById(Integer ProblemId) {
+ if (ProblemId == null) {
+ // 处理没有提供 ProblemId 的情况,例如返回错误信息或默认值
+ return RespBean.error("ProblemId 不能为空");
+ }
+ List problems = problemServiceI.findProblemById(ProblemId);
+ if (problems == null || problems.isEmpty()) {
+ // 处理没有找到问题的情况
+ return RespBean.error("未找到对应的作业信息");
+ }
+ return RespBean.ok("查询作业成功", problems.get(0));
+ }
+
@PostMapping("/findPostProblem")
public RespBean findPostProblem(@RequestBody PMPostProblem pmPostProblem) {
List postProblems = problemServiceI.findPostProblem(pmPostProblem.getProblemId(), pmPostProblem.getClassId());
@@ -326,15 +340,15 @@ public class ProblemController {
}
//获取当前作业班级排名信息
- @GetMapping("/getProblemInfo")
- public RespBean getProblemInfo(Integer classId, Integer examId) {
+ @GetMapping("/getPostProblemInfo")
+ public RespBean getPostProblemInfo(Integer classId, Integer examId) {
List PostProblem = problemServiceI.findPostProblem(examId,classId);
if (!PostProblem.isEmpty()) {
// 直接获取列表中的第一个元素
PostProblem postProblem = PostProblem.get(0);
- return RespBean.ok("获取实验具体信息成功!", postProblem);
+ return RespBean.ok("获取教师布置实验具体信息成功!", postProblem);
} else {
- return RespBean.error("获取实验具体信息失败!");
+ return RespBean.error("获取教师布置实验具体信息失败!");
}
}
}
\ No newline at end of file
diff --git a/AES/src/main/resources/application.properties b/AES/src/main/resources/application.properties
index 488fc4f..e82f2c8 100644
--- a/AES/src/main/resources/application.properties
+++ b/AES/src/main/resources/application.properties
@@ -5,7 +5,7 @@ server.port=8082
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
jdbc_url=jdbc:mysql://localhost:3306/aes?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&useSSL=false&allowPublicKeyRetrieval=True
jdbc_username=root
-jdbc_password=123456
+jdbc_password=13661744518xh
#spring.datasource.url=jdbc:mysql://localhost:3306/aes?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&useSSL=false&allowPublicKeyRetrieval=True
#spring.datasource.username=root
#spring.datasource.password=123456