优化滚动条
This commit is contained in:
parent
4feeb2ef56
commit
3195159a1a
|
@ -94,6 +94,7 @@
|
||||||
:data="workResource.entpCourseWorkList"
|
:data="workResource.entpCourseWorkList"
|
||||||
style="width: 100%; height: 100%;"
|
style="width: 100%; height: 100%;"
|
||||||
v-loading="pageParams.loading"
|
v-loading="pageParams.loading"
|
||||||
|
ref="tableRef"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="60" />
|
<el-table-column type="index" width="60" />
|
||||||
<el-table-column align="left" >
|
<el-table-column align="left" >
|
||||||
|
@ -499,7 +500,7 @@ function Apis(key) {
|
||||||
// 年份
|
// 年份
|
||||||
yearStr: entpCourseWorkQueryParams.yearStr !== '-1' ? entpCourseWorkQueryParams.yearStr:'',
|
yearStr: entpCourseWorkQueryParams.yearStr !== '-1' ? entpCourseWorkQueryParams.yearStr:'',
|
||||||
// 知识点
|
// 知识点
|
||||||
thirdId: entpCourseWorkQueryParams.point&&entpCourseWorkQueryParams.point.length > 0 ? entpCourseWorkQueryParams.point[0]:'',
|
thirdId: entpCourseWorkQueryParams.point && entpCourseWorkQueryParams.point.length > 0 ? entpCourseWorkQueryParams.point[0]:'',
|
||||||
// 关键字
|
// 关键字
|
||||||
keyword: entpCourseWorkQueryParams.keyWord && entpCourseWorkQueryParams.keyWord !== '' ? entpCourseWorkQueryParams.keyWord:'',
|
keyword: entpCourseWorkQueryParams.keyWord && entpCourseWorkQueryParams.keyWord !== '' ? entpCourseWorkQueryParams.keyWord:'',
|
||||||
|
|
||||||
|
@ -510,9 +511,7 @@ function Apis(key) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const handleQueryFromEntpCourseWork= async (queryType) => {
|
const handleQueryFromEntpCourseWork= async (queryType) => {
|
||||||
|
|
||||||
pageParams.value.loading = true;
|
pageParams.value.loading = true;
|
||||||
|
|
||||||
|
|
||||||
// 初中政治特殊处理( warn: 需确认是否修改 )
|
// 初中政治特殊处理( warn: 需确认是否修改 )
|
||||||
// if (this.courseObj.edusubject=='政治' && this.courseObj.edustage=='初中') {
|
// if (this.courseObj.edusubject=='政治' && this.courseObj.edustage=='初中') {
|
||||||
|
@ -536,32 +535,28 @@ const handleQueryFromEntpCourseWork= async (queryType) => {
|
||||||
// workResource.entpCourseWorkList = entpcourseworkres.data;
|
// workResource.entpCourseWorkList = entpcourseworkres.data;
|
||||||
// workResource.entpCourseWorkTotal = entpcourseworkres.data.length;
|
// workResource.entpCourseWorkTotal = entpcourseworkres.data.length;
|
||||||
|
|
||||||
data.forEach(item=> {
|
data.forEach(item=> {
|
||||||
if (item.worktype == '选择题') {
|
if (item.worktype == '选择题') {
|
||||||
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;
|
||||||
pageParams.value.loading = false;
|
});
|
||||||
});
|
|
||||||
|
|
||||||
//const entpcourseworkres = await listEntpcourseworkNew(queryForm);
|
|
||||||
|
|
||||||
// const data = entpcourseworkres.data;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -982,11 +977,14 @@ const showExamAnalyseDrawer = (row) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const tableRef = ref();
|
||||||
const getPaginationList = ( page, limit ) => {
|
const getPaginationList = ( page, limit ) => {
|
||||||
paginationParams.pageNum = page;
|
paginationParams.pageNum = page;
|
||||||
paginationParams.pageSize = limit;
|
paginationParams.pageSize = limit;
|
||||||
console.log(page, limit)
|
//console.log(page, limit)
|
||||||
handleQueryFromEntpCourseWork(0);
|
handleQueryFromEntpCourseWork(0);
|
||||||
|
// 重置滚动条至顶部
|
||||||
|
tableRef.value.setScrollTop(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
const pageLoad = async() => {
|
const pageLoad = async() => {
|
||||||
|
|
Loading…
Reference in New Issue