diff --git a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue index 059ad31..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 @@
- -
    + +
    {{ index +1 }}. @@ -155,18 +157,18 @@ description="未找到相关试题" style="width: 100%; height: 200px; margin-top: 20px;" > -
    +
    -->
- + @change="getPaginationList" /> +
@@ -276,6 +278,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 +287,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 +413,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, // 初始条目数量 @@ -497,7 +501,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:'', @@ -508,9 +512,7 @@ function Apis(key) { }) } const handleQueryFromEntpCourseWork= async (queryType) => { - pageParams.value.loading = true; - // 初中政治特殊处理( warn: 需确认是否修改 ) // if (this.courseObj.edusubject=='政治' && this.courseObj.edustage=='初中') { @@ -519,44 +521,43 @@ 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; // 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); - - // 初次加载时更新当前试题数量 - if (pageParams.value.isFirst) { - pageParams.value.isFirst = false; - pageParams.value.originCount = workResource.entpCourseWorkList.length; - pageParams.value.total = parseInt(res.msg); } - } - pageParams.value.loading = false; + pageParams.value.loading = false; }); - - //const entpcourseworkres = await listEntpcourseworkNew(queryForm); - - // const data = entpcourseworkres.data; } @@ -977,6 +978,15 @@ const showExamAnalyseDrawer = (row) => { }) } +const tableRef = ref(); +const getPaginationList = ( page, limit ) => { + paginationParams.pageNum = page; + paginationParams.pageSize = limit; + //console.log(page, limit) + handleQueryFromEntpCourseWork(0); + // 重置滚动条至顶部 + tableRef.value.setScrollTop(0); +} const pageLoad = async() => { console.log("加载中...") 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; } 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('请根据图片输入验证码') 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 @@ - - -
+ + + + + +