From 01b56e4bf91f252d180e993130e353d9630f81a8 Mon Sep 17 00:00:00 2001 From: zlm133588 <13996255+zlm133588@user.noreply.gitee.com> Date: Sat, 22 Mar 2025 23:35:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E5=BA=93=E7=9A=84=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=A4=A7=E8=87=B4=E5=AE=8C=E6=88=90=EF=BC=8C=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E4=BD=9C=E4=B8=9A=E7=9A=84=E9=80=BB=E8=BE=91=E8=BF=98?= =?UTF-8?q?=E6=B2=A1=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AES-front/README.md | 3 +- AES-front/src/api/admin.js | 6 + .../problem/components/ProblemActions2.vue | 2 +- .../{ => components}/view-classes-post.vue | 108 ++++++----- .../src/views/admin/problem/problem-edit.vue | 87 +++++++-- .../src/views/admin/problem/problem-list.vue | 4 +- .../src/views/admin/problem/problem-post.vue | 172 +++++++++++------- .../admin/problem/problem-scoring-rubric.vue | 6 +- .../problem/problem-scoring-standard.vue | 18 +- .../src/views/admin/problem/problem-store.vue | 21 +-- AES-front/src/views/admin/route.js | 25 --- .../problem/controller/ProblemController.java | 55 ++++++ .../aes/problem/dao/PostProblemDaoI.java | 9 + .../example/aes/problem/dao/ProblemDaoI.java | 9 +- .../aes/problem/dao/ScoringStandardDaoI.java | 1 + .../problem/dao/impl/PostProblemDaoImpl.java | 24 +++ .../aes/problem/dao/impl/ProblemDaoImpl.java | 42 ++++- .../dao/impl/ScoringStandardDaoImpl.java | 7 + .../aes/problem/model/PMPostProblem.java | 20 ++ .../aes/problem/model/PostProblem.java | 31 ++++ .../service/Impl/ProblemServiceImpl.java | 52 ++++++ .../aes/problem/service/ProblemServiceI.java | 10 + .../user/controller/ClassesController.java | 6 + .../aes/user/controller/CourseCotroller.java | 4 +- .../com/example/aes/user/dao/ClassesDaoI.java | 1 + .../aes/user/dao/impl/ClassesDaoImpl.java | 6 + .../aes/user/service/ClassesServiceI.java | 1 + .../user/service/impl/ClassesServiceImpl.java | 5 +- 28 files changed, 543 insertions(+), 192 deletions(-) rename AES-front/src/views/admin/problem/{ => components}/view-classes-post.vue (64%) create mode 100644 AES/src/main/java/com/example/aes/problem/dao/PostProblemDaoI.java create mode 100644 AES/src/main/java/com/example/aes/problem/dao/impl/PostProblemDaoImpl.java create mode 100644 AES/src/main/java/com/example/aes/problem/model/PMPostProblem.java create mode 100644 AES/src/main/java/com/example/aes/problem/model/PostProblem.java diff --git a/AES-front/README.md b/AES-front/README.md index 76d78d2..280e500 100644 --- a/AES-front/README.md +++ b/AES-front/README.md @@ -27,8 +27,7 @@ Node 安装 18 及以上 ```shell pnpm dev - ``` - + ### Build and Release ```shell diff --git a/AES-front/src/api/admin.js b/AES-front/src/api/admin.js index 5fdba37..a8a4acd 100644 --- a/AES-front/src/api/admin.js +++ b/AES-front/src/api/admin.js @@ -80,4 +80,10 @@ export default { deleteScoringRubric:(data)=>request.post('/problem/deleteScoringRubric',data), deleteScoringStandard:(data)=>request.post('/problem/deleteScoringStandard',data), findAllProblemByCourseId:(data)=>request.post('/problem/findAllProblemByCourseId',data), + findClassByCourseId:(data)=>request.post('/classes/findClassByCourseId',data), + findProblemById:(data)=>request.post('/problem/findProblemById',data), + postProblem:(data)=>request.post('/problem/postProblem',data), + findScoringStandardByProblemId: (data) => request.post('/problem/findScoringStandardByProblemId', data), + editProblem:(data) => request.post('/problem/editProblem', data), + deleteProblem:(data) => request.post('/problem/deleteProblem', data), } diff --git a/AES-front/src/views/admin/problem/components/ProblemActions2.vue b/AES-front/src/views/admin/problem/components/ProblemActions2.vue index 1151159..b23dbc3 100644 --- a/AES-front/src/views/admin/problem/components/ProblemActions2.vue +++ b/AES-front/src/views/admin/problem/components/ProblemActions2.vue @@ -24,7 +24,7 @@ diff --git a/AES-front/src/views/admin/problem/problem-list.vue b/AES-front/src/views/admin/problem/problem-list.vue index 48fe265..0ba9912 100644 --- a/AES-front/src/views/admin/problem/problem-list.vue +++ b/AES-front/src/views/admin/problem/problem-list.vue @@ -253,7 +253,7 @@ const queryByPage = async (currentPage)=>{ } ); console.log(res.data) - if (userStore.getRole().some((r) => r === 'admin')){ + // if (userStore.getRole().some((r) => r === 'admin')){ // const res1=await api.findAllShoolsInAdminusers() // const list1=res1.data // const transformedDatas=list1.map(item => ({ @@ -265,7 +265,7 @@ const queryByPage = async (currentPage)=>{ // value: 0, // }); // options.value=transformedDatas; - } + // } const {pageNum, pageSize, total, list} = res.data paginationReactive.page = pageNum paginationReactive.pageSize = pageSize diff --git a/AES-front/src/views/admin/problem/problem-post.vue b/AES-front/src/views/admin/problem/problem-post.vue index 092d414..23b2c82 100644 --- a/AES-front/src/views/admin/problem/problem-post.vue +++ b/AES-front/src/views/admin/problem/problem-post.vue @@ -11,66 +11,77 @@ label-width="100px" :show-require-mark="false" > -
- - {{ problemName }} - +
+ + {{problemInfoValue.title}} +
+
+ + + + + + +
+
- 添加对象 + 添加对象 - -
-
- - - - - - -
-
+ path="allow" + style='margin-left: 60px'> + +
+ + +
+ + 发布 + + + 取消 +
- 发布 - - 取消 -
-
+ +
+ + +
@@ -78,52 +89,79 @@ diff --git a/AES-front/src/views/admin/problem/problem-scoring-rubric.vue b/AES-front/src/views/admin/problem/problem-scoring-rubric.vue index 30c9c4a..87bb7d6 100644 --- a/AES-front/src/views/admin/problem/problem-scoring-rubric.vue +++ b/AES-front/src/views/admin/problem/problem-scoring-rubric.vue @@ -83,7 +83,7 @@ const handleDescEditorFocus = once(() => { }) const cancel = ()=>{ tagsStore.removeTag(path.value) - router.push({path: 'problem-scoring-standard',query:{courseId:courseId}}) + // router.push({path: 'problem-scoring-standard',query:{courseId:courseId}}) } const submit =async ()=>{ if(problemInfoValue.value.lowerLimit!==''&&problemInfoValue.value.upperLimit!==''&&problemInfoValue.value.description!==''){ @@ -93,10 +93,10 @@ const submit =async ()=>{ }) $message.success("添加评分细则成功") tagsStore.removeTag(path.value) - await router.push({name: 'AdminProblemScoringStandard',query:{courseId:courseId}}) + // await router.push({name: 'AdminProblemScoringStandard',query:{courseId:courseId}}) } catch (err) { tagsStore.removeTag(path.value) - await router.push({name: 'AdminProblemScoringStandard',query:{courseId:courseId}}) + // await router.push({name: 'AdminProblemScoringStandard',query:{courseId:courseId}}) } }else { $message.error("评分细则不能为空") diff --git a/AES-front/src/views/admin/problem/problem-scoring-standard.vue b/AES-front/src/views/admin/problem/problem-scoring-standard.vue index bc4ec00..7b1a174 100644 --- a/AES-front/src/views/admin/problem/problem-scoring-standard.vue +++ b/AES-front/src/views/admin/problem/problem-scoring-standard.vue @@ -73,8 +73,8 @@ const problemInfoRef = ref(null) const cancel = async () => { await api.deleteScoringRubric({}) tagsStore.removeTag(path.value) - await router.push({name: - 'AdminProblemAdd',query:{courseId:courseId}}) + // await router.push({name: + // 'AdminProblemAdd',query:{courseId:courseId}}) } const onAdd = ()=>{ router.push({name: @@ -88,15 +88,15 @@ const submit =async ()=>{ }) $message.success("添加评分标准成功") tagsStore.removeTag(path.value) - await router.push({name: - 'AdminProblemAdd', query: { - courseId: courseId - }}) + // await router.push({name: + // 'AdminProblemAdd', query: { + // courseId: courseId + // }}) } catch (err) { tagsStore.removeTag(path.value) - await router.push({name: 'AdminProblemAdd', query: { - courseId: courseId - }}) + // await router.push({name: 'AdminProblemAdd', query: { + // courseId: courseId + // }}) } }else { $message.error("维度或权重不能为空") diff --git a/AES-front/src/views/admin/problem/problem-store.vue b/AES-front/src/views/admin/problem/problem-store.vue index 785ac23..ff57af2 100644 --- a/AES-front/src/views/admin/problem/problem-store.vue +++ b/AES-front/src/views/admin/problem/problem-store.vue @@ -52,15 +52,10 @@