From f2dbf12f3c244f6eb79c60d24f288e8d28899d4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Czouyf=E2=80=9D?= <80906036@qq.com> Date: Tue, 12 Nov 2024 15:01:00 +0800 Subject: [PATCH 1/8] =?UTF-8?q?[=E4=BD=9C=E4=B8=9A=E5=B8=83=E7=BD=AE]=20-?= =?UTF-8?q?=20=E6=9B=B4=E6=94=B9=E4=B8=BA=E5=88=86=E9=A1=B5=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../container/newTask/taskTypeView.vue | 83 +++++++++++-------- 1 file changed, 47 insertions(+), 36 deletions(-) diff --git a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue index 059ad31..84550c1 100644 --- a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue +++ b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue @@ -90,7 +90,11 @@
- -
- + @change="getPaginationList" /> +
@@ -276,6 +276,7 @@ import { onMounted, ref, nextTick, watch, reactive, getCurrentInstance, computed import { ElMessage } from 'element-plus' import { cloneDeep } from 'lodash' import { useRouter } from 'vue-router' +import { Search } from '@element-plus/icons-vue' import {listEntpcoursework, listEntpcourseworkNew, getEntpcoursework} from '@/api/education/entpCourseWork' import { addClassworkReturnId } from '@/api/teaching/classwork' @@ -284,6 +285,7 @@ import { listEvaluation } from '@/api/subject' import { listEntpcoursefile } from '@/api/education/entpcoursefile' import { listKnowledgePoint } from "@/api/knowledge/knowledgePoint"; + import { useGetHomework } from '@/hooks/useGetHomework' import { processList } from '@/hooks/useProcessList' import { getCurrentTime } from '@/utils/date' @@ -409,15 +411,15 @@ const fileLoading = ref(false); // 常规作业loading // 下拉滚动参数 -const BASE_LIMIT_COUT = 50; // 总加载额外试题数 -const pageNoMore = computed( () => { - if (pageParams.value.total < 1) { - return false; - } - let count = BASE_LIMIT_COUT >= pageParams.value.total ? pageParams.value.total : pageParams.value.originCount+BASE_LIMIT_COUT; - return workResource.entpCourseWorkList.length >= count; -}); -const pageDisabled = computed(() => pageParams.value.loading || pageNoMore.value); +// const BASE_LIMIT_COUT = 50; // 总加载额外试题数 +// const pageNoMore = computed( () => { +// if (pageParams.value.total < 1) { +// return false; +// } +// let count = BASE_LIMIT_COUT >= pageParams.value.total ? pageParams.value.total : pageParams.value.originCount+BASE_LIMIT_COUT; +// return workResource.entpCourseWorkList.length >= count; +// }); +// const pageDisabled = computed(() => pageParams.value.loading || pageNoMore.value); const pageParams = ref({ loading: false, // 是否正在加载中 originCount: 0, // 初始条目数量 @@ -519,16 +521,16 @@ const handleQueryFromEntpCourseWork= async (queryType) => { // } client(t('任务1', 1500)).then(res => { - console.log("请求返回",res); - if(paginationParams.pageNum == 1){ - workResource.entpCourseWorkList = []; - workResource.entpCourseWorkTotal = 0; + //console.log("请求返回",res); + // if(paginationParams.pageNum == 1){ + // workResource.entpCourseWorkList = []; + // workResource.entpCourseWorkTotal = 0; - // 初始化下拉滚动条参数 - // pageParams.value.loading = false; - // pageParams.value.isFirst = true; - // pageParams.value.originCount = 0; - } + // // 初始化下拉滚动条参数 + // // pageParams.value.loading = false; + // // pageParams.value.isFirst = true; + // // pageParams.value.originCount = 0; + // } const data = res.data || []; if(data && data.length>0){ // workResource.entpCourseWorkList = entpcourseworkres.data; @@ -542,17 +544,20 @@ const handleQueryFromEntpCourseWork= async (queryType) => { // 格式化试题信息 processList(data); - workResource.entpCourseWorkList.push(...data); + //workResource.entpCourseWorkList.push(...data); + workResource.entpCourseWorkList = data; // 初次加载时更新当前试题数量 if (pageParams.value.isFirst) { pageParams.value.isFirst = false; pageParams.value.originCount = workResource.entpCourseWorkList.length; pageParams.value.total = parseInt(res.msg); + paginationParams.pageNum = Math.ceil(parseInt(res.msg)/paginationParams.pageSize); + console.log('first->', pageParams.value, paginationParams); } } pageParams.value.loading = false; - }); +}); //const entpcourseworkres = await listEntpcourseworkNew(queryForm); @@ -977,6 +982,12 @@ const showExamAnalyseDrawer = (row) => { }) } +const getPaginationList = ( page, limit ) => { + paginationParams.pageNum = page; + paginationParams.pageSize = limit; + console.log(page, limit) + handleQueryFromEntpCourseWork(0); +} const pageLoad = async() => { console.log("加载中...") From 7c1c4e9b7dea4e5b6124740a6d67b860d87adf30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Czouyf=E2=80=9D?= <80906036@qq.com> Date: Tue, 12 Nov 2024 15:26:46 +0800 Subject: [PATCH 2/8] 1 --- .../src/views/classTask/container/newTask/taskTypeView.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue index 84550c1..cb34954 100644 --- a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue +++ b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue @@ -499,7 +499,7 @@ function Apis(key) { // 年份 yearStr: entpCourseWorkQueryParams.yearStr !== '-1' ? entpCourseWorkQueryParams.yearStr:'', // 知识点 - thirdId: entpCourseWorkQueryParams.point.length > 0 ? entpCourseWorkQueryParams.point[0]:'', + thirdId: entpCourseWorkQueryParams.point && entpCourseWorkQueryParams.point.length > 0 ? entpCourseWorkQueryParams.point[0]:'', // 关键字 keyword: entpCourseWorkQueryParams.keyWord && entpCourseWorkQueryParams.keyWord !== '' ? entpCourseWorkQueryParams.keyWord:'', From fa54546f5e87a02f1b8979e2a9ef728f532e7893 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Czouyf=E2=80=9D?= <80906036@qq.com> Date: Tue, 12 Nov 2024 15:43:47 +0800 Subject: [PATCH 3/8] 1 --- .../container/newTask/taskTypeView.vue | 46 ++++++++----------- 1 file changed, 20 insertions(+), 26 deletions(-) diff --git a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue index cb34954..f8d13ce 100644 --- a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue +++ b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue @@ -510,9 +510,7 @@ function Apis(key) { }) } const handleQueryFromEntpCourseWork= async (queryType) => { - pageParams.value.loading = true; - // 初中政治特殊处理( warn: 需确认是否修改 ) // if (this.courseObj.edusubject=='政治' && this.courseObj.edustage=='初中') { @@ -536,32 +534,28 @@ const handleQueryFromEntpCourseWork= async (queryType) => { // workResource.entpCourseWorkList = entpcourseworkres.data; // workResource.entpCourseWorkTotal = entpcourseworkres.data.length; - data.forEach(item=> { - if (item.worktype == '选择题') { - item.worktype = '单选题' + data.forEach(item=> { + if (item.worktype == '选择题') { + item.worktype = '单选题' + } + }) + + // 格式化试题信息 + processList(data); + //workResource.entpCourseWorkList.push(...data); + workResource.entpCourseWorkList = data; + + // 初次加载时更新当前试题数量 + if (pageParams.value.isFirst) { + pageParams.value.isFirst = false; + pageParams.value.originCount = workResource.entpCourseWorkList.length; + pageParams.value.total = parseInt(res.msg); + paginationParams.pageNum = Math.ceil(parseInt(res.msg)/paginationParams.pageSize); + //console.log('first->', pageParams.value, paginationParams); } - }) - - // 格式化试题信息 - processList(data); - //workResource.entpCourseWorkList.push(...data); - workResource.entpCourseWorkList = data; - - // 初次加载时更新当前试题数量 - if (pageParams.value.isFirst) { - pageParams.value.isFirst = false; - pageParams.value.originCount = workResource.entpCourseWorkList.length; - pageParams.value.total = parseInt(res.msg); - paginationParams.pageNum = Math.ceil(parseInt(res.msg)/paginationParams.pageSize); - console.log('first->', pageParams.value, paginationParams); } - } - pageParams.value.loading = false; -}); - - //const entpcourseworkres = await listEntpcourseworkNew(queryForm); - - // const data = entpcourseworkres.data; + pageParams.value.loading = false; + }); } From fbbd84df932ee65c2c4a6054c1ed39eb2e1e8e2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E4=BA=86=E4=B8=AA=E7=99=BD?= <543593352@qq.com> Date: Tue, 12 Nov 2024 16:45:56 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E6=89=B9=E6=94=B9?= =?UTF-8?q?=E9=A1=B5=EF=BC=9A=E5=B7=B2=E4=BA=A4=E6=9C=AA=E4=BA=A4=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E8=83=8C=E6=99=AF=E9=A2=9C=E8=89=B2=E7=BC=BA=E5=A4=B1?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../container/newTask/taskTypeView.vue | 2 +- .../src/views/classTask/teachClassTask.vue | 20 +++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue index 84550c1..04ff553 100644 --- a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue +++ b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue @@ -499,7 +499,7 @@ function Apis(key) { // 年份 yearStr: entpCourseWorkQueryParams.yearStr !== '-1' ? entpCourseWorkQueryParams.yearStr:'', // 知识点 - thirdId: entpCourseWorkQueryParams.point.length > 0 ? entpCourseWorkQueryParams.point[0]:'', + thirdId: entpCourseWorkQueryParams.point&&entpCourseWorkQueryParams.point.length > 0 ? entpCourseWorkQueryParams.point[0]:'', // 关键字 keyword: entpCourseWorkQueryParams.keyWord && entpCourseWorkQueryParams.keyWord !== '' ? entpCourseWorkQueryParams.keyWord:'', diff --git a/src/renderer/src/views/classTask/teachClassTask.vue b/src/renderer/src/views/classTask/teachClassTask.vue index fb69948..fb44c02 100644 --- a/src/renderer/src/views/classTask/teachClassTask.vue +++ b/src/renderer/src/views/classTask/teachClassTask.vue @@ -57,8 +57,8 @@ style="margin-bottom: 1px" @change="tableRadioChange" > - - + + { classWorkAnalysis.workclass = data.workclass // 重置学生列表 tableRadio.list = [] - tableRadio.value = '1' + tableRadio.value = 1 tableRadio.num0 = 0 tableRadio.num1 = 0 @@ -401,7 +401,7 @@ const getClassWorkStudentList = (rowId) => { tableRadio.list = classWorkAnalysis.classworkdata && classWorkAnalysis.classworkdata.filter((item) => item.finishtimelength != '0') - tableRadio.value = '1' + tableRadio.value = 1 tableRadio.num0 = classWorkAnalysis.classworkdata.length - tableRadio.list.length tableRadio.num1 = tableRadio.list.length // 自动批阅判断 @@ -417,7 +417,7 @@ const getClassWorkStudentList = (rowId) => { */ const teacherCriticism = ()=>{ // 已交的list才自动批阅判断 - if(tableRadio.value == '1'&& classWorkAnalysis.worktype == '习题训练'){ + if(tableRadio.value == 1 && classWorkAnalysis.worktype == '习题训练'){ // 只有习题训练才会自动批阅 tableRadio.list = tableRadio.list.map((item) => { return { @@ -572,16 +572,16 @@ const tableRadioChange = (e) => { isopen_dtwk_table.value = false; console.log(e,'??????') console.log("学生列表:", classWorkAnalysis.classworkdata) - if(e=='1'){ + if(e==1){ tableRadio.list = classWorkAnalysis.classworkdata.filter(item => item.finishtimelength != '0') - tableRadio.value = '1'; + tableRadio.value = 1; tableRadio.num0 = classWorkAnalysis.classworkdata.length - tableRadio.list.length; tableRadio.num1 = tableRadio.list.length; // 自动批阅判断 teacherCriticism(); - }else if(e=='0'){ + }else if(e==0){ tableRadio.list = classWorkAnalysis.classworkdata.filter(item => item.finishtimelength == '0') - tableRadio.value = '0'; + tableRadio.value = 0; tableRadio.num0 = tableRadio.list.length; tableRadio.num1 = classWorkAnalysis.classworkdata.length - tableRadio.list.length; } From b973fd685cc5d900d8aed9d77966ddb54b358abd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Czouyf=E2=80=9D?= <80906036@qq.com> Date: Wed, 13 Nov 2024 14:08:28 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=BB=9A=E5=8A=A8?= =?UTF-8?q?=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/classTask/container/newTask/taskTypeView.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue index f8d13ce..e817af6 100644 --- a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue +++ b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue @@ -94,6 +94,7 @@ :data="workResource.entpCourseWorkList" style="width: 100%; height: 100%;" v-loading="pageParams.loading" + ref="tableRef" > @@ -976,11 +977,14 @@ const showExamAnalyseDrawer = (row) => { }) } +const tableRef = ref(); const getPaginationList = ( page, limit ) => { paginationParams.pageNum = page; paginationParams.pageSize = limit; - console.log(page, limit) + //console.log(page, limit) handleQueryFromEntpCourseWork(0); + // 重置滚动条至顶部 + tableRef.value.setScrollTop(0); } const pageLoad = async() => { From 1f2eb722f181e531184cc96058ebf841c38062a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Czouyf=E2=80=9D?= <80906036@qq.com> Date: Wed, 13 Nov 2024 15:43:09 +0800 Subject: [PATCH 6/8] 1 --- .../src/views/classTask/container/newTask/taskTypeView.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue index e817af6..de215d4 100644 --- a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue +++ b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue @@ -55,6 +55,7 @@ Date: Mon, 18 Nov 2024 17:16:43 +0800 Subject: [PATCH 7/8] =?UTF-8?q?fix=EF=BC=9A=E5=88=87=E6=8D=A2=E7=AC=AC?= =?UTF-8?q?=E4=B8=89=E6=96=B9=E8=B5=84=E6=BA=90=E6=A0=BC=E5=BC=8F;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resource/container/resoure-search.vue | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/renderer/src/views/resource/container/resoure-search.vue b/src/renderer/src/views/resource/container/resoure-search.vue index 9d3344e..d0f8d61 100644 --- a/src/renderer/src/views/resource/container/resoure-search.vue +++ b/src/renderer/src/views/resource/container/resoure-search.vue @@ -18,21 +18,17 @@ - - -
+ + + + + + From 6303b442a45039d95bd3fe11348d7d14d1f6990d Mon Sep 17 00:00:00 2001 From: zdg Date: Tue, 19 Nov 2024 11:15:29 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E5=8F=91=E9=80=81=E7=9F=AD=E4=BF=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/views/login/components/Register.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/renderer/src/views/login/components/Register.vue b/src/renderer/src/views/login/components/Register.vue index e2d1731..00aafc5 100644 --- a/src/renderer/src/views/login/components/Register.vue +++ b/src/renderer/src/views/login/components/Register.vue @@ -28,7 +28,7 @@ - + 发送验证码 @@ -409,11 +409,13 @@ const sbmitImg=()=>{ type: type.value } sendCode(params).then(res=>{ + isImg.value=false if(res.code==200){ - ruleForm.Code=res.data - isImg.value=false + // ruleForm.Code=res.data + ElMessage.success(res.msg||'验证码-已发送') } - + }).catch(err=>{ + isImg.value=false }) }else{ ElMessage.error('请根据图片输入验证码')