From 50185cd72309e5601e15995d8efc7c9ecc7fb179 Mon Sep 17 00:00:00 2001 From: zlm133588 <13996255+zlm133588@user.noreply.gitee.com> Date: Mon, 7 Apr 2025 14:00:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B7=B2=E4=BA=A4=E5=92=8C?= =?UTF-8?q?=E5=BE=85=E6=89=B9=E7=9A=84bug=EF=BC=8C=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E5=8A=A0=E6=97=B6=E3=80=81=E5=AF=BC=E5=87=BA=E6=88=90=E7=BB=A9?= =?UTF-8?q?=E3=80=81=E5=AF=BC=E5=87=BA=E6=9C=AA=E4=BA=A4=E5=90=8D=E5=8D=95?= =?UTF-8?q?=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AES-front/README.md | 4 +- AES-front/package-lock.json | 8 ++ AES-front/package.json | 1 + AES-front/src/api/admin.js | 2 + .../problem/components/ProblemActions.vue | 2 +- .../admin/problem/components/RubricList.vue | 1 - .../components/problem-student-action.vue | 28 +++---- .../components/problem-student-action2.vue | 14 ++-- .../views/admin/problem/problem-add-time.vue | 72 +++++++++------- .../admin/problem/problem-edit-setup.vue | 17 ---- .../src/views/admin/problem/problem-list.vue | 14 +++- .../views/admin/problem/problem-student.vue | 83 ++++++++++++++++--- .../problem/controller/ProblemController.java | 15 +++- .../aes/problem/dao/SubmitReportDaoI.java | 2 + .../aes/problem/dao/impl/ProblemDaoImpl.java | 60 +++++++++----- .../problem/dao/impl/SubmitReportDaoImpl.java | 21 ++++- .../aes/problem/model/PMPostProblem.java | 1 + .../aes/problem/model/PMStudentSubmit.java | 1 + .../service/Impl/ProblemServiceImpl.java | 14 +++- .../aes/problem/service/ProblemServiceI.java | 1 + 20 files changed, 243 insertions(+), 118 deletions(-) diff --git a/AES-front/README.md b/AES-front/README.md index 280e500..47a158f 100644 --- a/AES-front/README.md +++ b/AES-front/README.md @@ -33,7 +33,9 @@ Node 安装 18 及以上 ```shell # Prod Environment pnpm build -``` +4.导出功能的依赖 + ```shell + npm install xlsx file-saver ## 技术栈 diff --git a/AES-front/package-lock.json b/AES-front/package-lock.json index 12cdbb3..8c09e4b 100644 --- a/AES-front/package-lock.json +++ b/AES-front/package-lock.json @@ -24,6 +24,7 @@ "dayjs": "^1.11.10", "docx": "^8.5.0", "echarts": "^5.4.3", + "file-saver": "^2.0.5", "lodash-es": "^4.17.21", "mockjs": "^1.1.0", "pinia": "^2.1.7", @@ -5135,6 +5136,12 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/file-saver": { + "version": "2.0.5", + "resolved": "https://registry.npmmirror.com/file-saver/-/file-saver-2.0.5.tgz", + "integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA==", + "license": "MIT" + }, "node_modules/filelist": { "version": "1.0.4", "resolved": "https://registry.npmmirror.com/filelist/-/filelist-1.0.4.tgz", @@ -11370,6 +11377,7 @@ "version": "0.18.5", "resolved": "https://registry.npmmirror.com/xlsx/-/xlsx-0.18.5.tgz", "integrity": "sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==", + "license": "Apache-2.0", "dependencies": { "adler-32": "~1.3.0", "cfb": "~1.2.1", diff --git a/AES-front/package.json b/AES-front/package.json index 537104c..46c356f 100644 --- a/AES-front/package.json +++ b/AES-front/package.json @@ -46,6 +46,7 @@ "dayjs": "^1.11.10", "docx": "^8.5.0", "echarts": "^5.4.3", + "file-saver": "^2.0.5", "lodash-es": "^4.17.21", "mockjs": "^1.1.0", "pinia": "^2.1.7", diff --git a/AES-front/src/api/admin.js b/AES-front/src/api/admin.js index 92a8400..21ee1c7 100644 --- a/AES-front/src/api/admin.js +++ b/AES-front/src/api/admin.js @@ -90,4 +90,6 @@ export default { findPostProblem:(data)=>request.post('/problem/findPostProblem',data), updateSetup:(data)=>request.post('/problem/updateSetup',data), findStudentSubmit:(data)=>request.post('/problem/findStudentSubmit',data), + addTime:(data)=>request.post('/problem/addTime',data), + } diff --git a/AES-front/src/views/admin/problem/components/ProblemActions.vue b/AES-front/src/views/admin/problem/components/ProblemActions.vue index 00dcc76..fc204c2 100644 --- a/AES-front/src/views/admin/problem/components/ProblemActions.vue +++ b/AES-front/src/views/admin/problem/components/ProblemActions.vue @@ -18,7 +18,7 @@ diff --git a/AES-front/src/views/admin/problem/components/problem-student-action2.vue b/AES-front/src/views/admin/problem/components/problem-student-action2.vue index bc0acb4..92b2294 100644 --- a/AES-front/src/views/admin/problem/components/problem-student-action2.vue +++ b/AES-front/src/views/admin/problem/components/problem-student-action2.vue @@ -12,7 +12,7 @@ 加时 @@ -37,12 +37,12 @@ const emit = defineEmits(['clickReview','clickBack','clickAddTime']) const showModal=ref(false) -const onBack = ()=>{ - emit('clickBack') -} -const onReview = ()=>{ - emit('clickReview') -} +// const onBack = ()=>{ +// emit('clickBack') +// } +// const onReview = ()=>{ +// emit('clickReview') +// } const onAddTime = ()=>{ emit('clickAddTime') } diff --git a/AES-front/src/views/admin/problem/problem-add-time.vue b/AES-front/src/views/admin/problem/problem-add-time.vue index 5d62175..562a395 100644 --- a/AES-front/src/views/admin/problem/problem-add-time.vue +++ b/AES-front/src/views/admin/problem/problem-add-time.vue @@ -4,7 +4,7 @@ label-placement="left"style="margin-top: 15px;margin-left: 2%"> - + @@ -40,15 +40,14 @@ - + @@ -58,7 +57,7 @@ - + @@ -81,52 +80,63 @@ diff --git a/AES-front/src/views/admin/problem/problem-edit-setup.vue b/AES-front/src/views/admin/problem/problem-edit-setup.vue index 2e8dce8..a03cdf6 100644 --- a/AES-front/src/views/admin/problem/problem-edit-setup.vue +++ b/AES-front/src/views/admin/problem/problem-edit-setup.vue @@ -130,23 +130,6 @@ const updateSetup =async ()=>{ const onAdd = ()=>{ router.push({name: 'AdminProblemPostClass'}) } -const submit =async ()=>{ - if(problemInfoValue.value.name!==''){ - try { - await api.Addproblem({ - ...problemInfoValue.value - }) - $message.success("添加课程成功") - tagsStore.removeTag(path.value) - await router.push({name: 'AdminProblemList'}) - } catch (err) { - tagsStore.removeTag(path.value) - await router.push({name: 'AdminProblemList'}) - } - }else { - $message.error("作业名称不能为空") - } -} const queryByPage = async () => { loading.value = true try { diff --git a/AES-front/src/views/admin/problem/problem-list.vue b/AES-front/src/views/admin/problem/problem-list.vue index 637e1da..6810fdd 100644 --- a/AES-front/src/views/admin/problem/problem-list.vue +++ b/AES-front/src/views/admin/problem/problem-list.vue @@ -84,7 +84,6 @@ const options1=ref([]) const role=userStore.getRole() const teacherId=ref() const selectedStatus=ref("") -const today = new Date(); const filteredData =ref([]); const route = useRoute() const { courseId, history } = route.query @@ -329,9 +328,16 @@ const onChangePage = (page) => { onMounted(()=>{ queryByPage(paginationReactive.page) }) -// watch(route, () => { -// filterData() -// }) +watch( + ()=>router.currentRoute.value.fullPath, + ()=>{ + if + (router.currentRoute.value.fullPath==='/admin/problem/problem-list') { + queryByPage(paginationReactive.page) + search(paginationReactive.page) + } + } +)