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) + } + } +)