parent
f504cee74b
commit
768b3e7abf
|
@ -442,7 +442,7 @@ const handleQueryParamFromEntpCourseWork = (queryType) => {
|
||||||
* 1 - 按条件查询
|
* 1 - 按条件查询
|
||||||
* 2 - 按关键词查询
|
* 2 - 按关键词查询
|
||||||
*/
|
*/
|
||||||
const handleQueryFromEntpCourseWork= async (queryType, value) => {
|
const handleQueryFromEntpCourseWork= async (queryType) => {
|
||||||
|
|
||||||
pageParams.value.loading = true;
|
pageParams.value.loading = true;
|
||||||
const queryForm = {
|
const queryForm = {
|
||||||
|
@ -476,20 +476,6 @@ const handleQueryFromEntpCourseWork= async (queryType, value) => {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
const entpcourseworkres = await listEntpcourseworkNew(queryForm);
|
const entpcourseworkres = await listEntpcourseworkNew(queryForm);
|
||||||
|
|
||||||
// 当前有更改, 则重新开始流程查询
|
|
||||||
if (nextLevelSecondId != -1) {
|
|
||||||
console.log('再次执行')
|
|
||||||
nextLevelSecondId = -1;
|
|
||||||
const debouncedFunction = debounceQueryData(10);
|
|
||||||
debouncedFunction();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 当前为第一页时, 再次重置避免
|
|
||||||
if (paginationParams.pageNum == 1) {
|
|
||||||
initPageParams();
|
|
||||||
}
|
|
||||||
const data = entpcourseworkres.data;
|
const data = entpcourseworkres.data;
|
||||||
if(data && data.length>0){
|
if(data && data.length>0){
|
||||||
// workResource.entpCourseWorkList = entpcourseworkres.data;
|
// workResource.entpCourseWorkList = entpcourseworkres.data;
|
||||||
|
@ -500,12 +486,9 @@ const handleQueryFromEntpCourseWork= async (queryType, value) => {
|
||||||
item.worktype = '单选题'
|
item.worktype = '单选题'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
// 格式化试题信息
|
// 格式化试题信息
|
||||||
processList(data);
|
processList(data);
|
||||||
|
|
||||||
|
|
||||||
workResource.entpCourseWorkList.push(...data);
|
workResource.entpCourseWorkList.push(...data);
|
||||||
|
|
||||||
// 初次加载时更新当前试题数量
|
// 初次加载时更新当前试题数量
|
||||||
|
@ -973,21 +956,17 @@ onMounted(async() => {
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
let nextLevelSecondId = -1;
|
const debounceQueryData = debounce(() => {
|
||||||
const debounceQueryData = (wait) => {
|
console.log("防抖 加载数据中...")
|
||||||
const debouncedFunction = debounce(() => {
|
// 初始化滚动加载参数
|
||||||
console.log("防抖 加载数据中...")
|
initPageParams();
|
||||||
// 初始化滚动加载参数
|
// 习题资源
|
||||||
initPageParams();
|
handleQueryFromEntpCourseWork(0);
|
||||||
// 习题资源
|
// 框架梳理
|
||||||
handleQueryFromEntpCourseWork(0);
|
getQueryFromEvaluationclue();
|
||||||
// 框架梳理
|
// 知识点
|
||||||
getQueryFromEvaluationclue();
|
getEntpCourseWorkPointList();
|
||||||
// 知识点
|
}, 1000);
|
||||||
getEntpCourseWorkPointList();
|
|
||||||
}, wait);
|
|
||||||
return debouncedFunction;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
watch(() => props.propsformobj.uniquekey, (newVal) => {
|
watch(() => props.propsformobj.uniquekey, (newVal) => {
|
||||||
|
@ -998,15 +977,7 @@ watch(() => props.propsformobj.uniquekey, (newVal) => {
|
||||||
})
|
})
|
||||||
watch(() => props.bookobj.levelSecondId, (newVal, oldVal) => {
|
watch(() => props.bookobj.levelSecondId, (newVal, oldVal) => {
|
||||||
console.log(props.bookobj,'课程选择')
|
console.log(props.bookobj,'课程选择')
|
||||||
console.log('更改章节id->', newVal);
|
debounceQueryData();
|
||||||
//nextLevelSecondId = newVal;
|
|
||||||
if (pageParams.value.loading) {
|
|
||||||
console.log('更改章节id->', newVal);
|
|
||||||
nextLevelSecondId = newVal;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const debouncedFunction = debounceQueryData(1000);
|
|
||||||
debouncedFunction();
|
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue