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