baigl #20
|
@ -150,6 +150,12 @@
|
||||||
</ul>
|
</ul>
|
||||||
<p class="infinite-list-loading" v-if="pageParams.loading">加载中...</p>
|
<p class="infinite-list-loading" v-if="pageParams.loading">加载中...</p>
|
||||||
<p class="infinite-list-noMove" v-if="pageNoMore">无更多试题...</p>
|
<p class="infinite-list-noMove" v-if="pageNoMore">无更多试题...</p>
|
||||||
|
<div v-if="workResource.entpCourseWorkList.length == 0 && !pageParams.loading">
|
||||||
|
<el-empty
|
||||||
|
description="未找到相关试题"
|
||||||
|
style="width: 100%; height: 200px; margin-top: 20px;"
|
||||||
|
></el-empty>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 分页 这里不用-->
|
<!-- 分页 这里不用-->
|
||||||
<!-- <div style="height: 55px;">
|
<!-- <div style="height: 55px;">
|
||||||
|
@ -287,7 +293,7 @@ import prevReadMsgDialog from '@/views/classTask/container/newTask/prevReadMsg-D
|
||||||
import examDetailsDrawer from '@/components/exam-question/examDetailsDrawer.vue'
|
import examDetailsDrawer from '@/components/exam-question/examDetailsDrawer.vue'
|
||||||
import { JYApiListCT, JYApiListOriginYear, JYApiListSO} from "@/utils/examQuestion/jyeoo"
|
import { JYApiListCT, JYApiListOriginYear, JYApiListSO} from "@/utils/examQuestion/jyeoo"
|
||||||
|
|
||||||
import {debounce } from '@/utils/comm'
|
import {throttle,debounce } from '@/utils/comm'
|
||||||
import { useToolState } from '@/store/modules/tool'
|
import { useToolState } from '@/store/modules/tool'
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
const userStore = useUserStore().user
|
const userStore = useUserStore().user
|
||||||
|
@ -403,7 +409,7 @@ const fileLoading = ref(false); // 常规作业loading
|
||||||
|
|
||||||
// 下拉滚动参数
|
// 下拉滚动参数
|
||||||
|
|
||||||
const BASE_LIMIT_COUT = 10; // 总加载额外试题数
|
const BASE_LIMIT_COUT = 50; // 总加载额外试题数
|
||||||
const pageNoMore = computed( () => workResource.entpCourseWorkList.length >= pageParams.value.originCount+BASE_LIMIT_COUT );
|
const pageNoMore = computed( () => workResource.entpCourseWorkList.length >= pageParams.value.originCount+BASE_LIMIT_COUT );
|
||||||
const pageDisabled = computed(() => pageParams.value.loading || pageNoMore.value);
|
const pageDisabled = computed(() => pageParams.value.loading || pageNoMore.value);
|
||||||
const pageParams = ref({
|
const pageParams = ref({
|
||||||
|
@ -434,6 +440,28 @@ const handleQueryParamFromEntpCourseWork = (queryType) => {
|
||||||
handleQueryFromEntpCourseWork(queryType);
|
handleQueryFromEntpCourseWork(queryType);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let obj = {};
|
||||||
|
|
||||||
|
function Apis(key) {
|
||||||
|
obj[key] = [];
|
||||||
|
return function(task) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
obj[key].push(task);
|
||||||
|
Promise.all([...obj[key]]).then(res => {
|
||||||
|
const i = obj[key].findIndex(item => {
|
||||||
|
return item == task;
|
||||||
|
});
|
||||||
|
resolve(obj[key][i]);
|
||||||
|
//arr.splice(i, 1);
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const client = new Apis('/paht');
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @desc: 1、习题训练 - 新查询试题
|
* @desc: 1、习题训练 - 新查询试题
|
||||||
* @return: {*}
|
* @return: {*}
|
||||||
|
@ -442,9 +470,8 @@ const handleQueryParamFromEntpCourseWork = (queryType) => {
|
||||||
* 1 - 按条件查询
|
* 1 - 按条件查询
|
||||||
* 2 - 按关键词查询
|
* 2 - 按关键词查询
|
||||||
*/
|
*/
|
||||||
const handleQueryFromEntpCourseWork= async (queryType) => {
|
const t = function(name, time) {
|
||||||
|
return new Promise(resolve => {
|
||||||
pageParams.value.loading = true;
|
|
||||||
const queryForm = {
|
const queryForm = {
|
||||||
// 分页参数
|
// 分页参数
|
||||||
currentPage: paginationParams.pageNum,
|
currentPage: paginationParams.pageNum,
|
||||||
|
@ -468,6 +495,15 @@ const handleQueryFromEntpCourseWork= async (queryType) => {
|
||||||
keyword: entpCourseWorkQueryParams.keyWord && entpCourseWorkQueryParams.keyWord !== '' ? entpCourseWorkQueryParams.keyWord:'',
|
keyword: entpCourseWorkQueryParams.keyWord && entpCourseWorkQueryParams.keyWord !== '' ? entpCourseWorkQueryParams.keyWord:'',
|
||||||
|
|
||||||
}
|
}
|
||||||
|
const entpcourseworkres = listEntpcourseworkNew(queryForm);
|
||||||
|
|
||||||
|
resolve(entpcourseworkres);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleQueryFromEntpCourseWork= async (queryType) => {
|
||||||
|
|
||||||
|
pageParams.value.loading = true;
|
||||||
|
|
||||||
|
|
||||||
// 初中政治特殊处理( warn: 需确认是否修改 )
|
// 初中政治特殊处理( warn: 需确认是否修改 )
|
||||||
// if (this.courseObj.edusubject=='政治' && this.courseObj.edustage=='初中') {
|
// if (this.courseObj.edusubject=='政治' && this.courseObj.edustage=='初中') {
|
||||||
|
@ -475,8 +511,18 @@ const handleQueryFromEntpCourseWork= async (queryType) => {
|
||||||
// queryForm.edusubject = '道德与法治';
|
// queryForm.edusubject = '道德与法治';
|
||||||
// }
|
// }
|
||||||
|
|
||||||
const entpcourseworkres = await listEntpcourseworkNew(queryForm);
|
client(t('任务1', 1500)).then(res => {
|
||||||
const data = entpcourseworkres.data;
|
console.log("请求返回",res);
|
||||||
|
if(paginationParams.pageNum == 1){
|
||||||
|
workResource.entpCourseWorkList = [];
|
||||||
|
workResource.entpCourseWorkTotal = 0;
|
||||||
|
|
||||||
|
// 初始化下拉滚动条参数
|
||||||
|
// pageParams.value.loading = false;
|
||||||
|
// pageParams.value.isFirst = true;
|
||||||
|
// pageParams.value.originCount = 0;
|
||||||
|
}
|
||||||
|
const data = res.data || [];
|
||||||
if(data && data.length>0){
|
if(data && data.length>0){
|
||||||
// workResource.entpCourseWorkList = entpcourseworkres.data;
|
// workResource.entpCourseWorkList = entpcourseworkres.data;
|
||||||
// workResource.entpCourseWorkTotal = entpcourseworkres.data.length;
|
// workResource.entpCourseWorkTotal = entpcourseworkres.data.length;
|
||||||
|
@ -498,6 +544,12 @@ const handleQueryFromEntpCourseWork= async (queryType) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pageParams.value.loading = false;
|
pageParams.value.loading = false;
|
||||||
|
});
|
||||||
|
|
||||||
|
//const entpcourseworkres = await listEntpcourseworkNew(queryForm);
|
||||||
|
|
||||||
|
// const data = entpcourseworkres.data;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 教学资源,从课标分析、教材分析里来
|
// 教学资源,从课标分析、教材分析里来
|
||||||
|
@ -921,7 +973,7 @@ const showExamAnalyseDrawer = (row) => {
|
||||||
const pageLoad = async() => {
|
const pageLoad = async() => {
|
||||||
console.log("加载中...")
|
console.log("加载中...")
|
||||||
paginationParams.pageNum ++ ,
|
paginationParams.pageNum ++ ,
|
||||||
paginationParams.pageSize = 2,
|
//paginationParams.pageSize = 2,
|
||||||
await handleQueryFromEntpCourseWork(0);
|
await handleQueryFromEntpCourseWork(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -956,6 +1008,7 @@ onMounted(async() => {
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 防抖
|
||||||
const debounceQueryData = debounce(() => {
|
const debounceQueryData = debounce(() => {
|
||||||
console.log("防抖 加载数据中...")
|
console.log("防抖 加载数据中...")
|
||||||
// 初始化滚动加载参数
|
// 初始化滚动加载参数
|
||||||
|
@ -968,7 +1021,6 @@ const debounceQueryData = debounce(() => {
|
||||||
getEntpCourseWorkPointList();
|
getEntpCourseWorkPointList();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
|
|
||||||
watch(() => props.propsformobj.uniquekey, (newVal) => {
|
watch(() => props.propsformobj.uniquekey, (newVal) => {
|
||||||
console.log(props.propsformobj,'propsformobj')
|
console.log(props.propsformobj,'propsformobj')
|
||||||
if(props.propsformobj.uniquekey){
|
if(props.propsformobj.uniquekey){
|
||||||
|
|
Loading…
Reference in New Issue