baigl #394
|
@ -90,7 +90,7 @@
|
|||
</el-row>
|
||||
<!-- 习题表格 -->
|
||||
<div class="middle" >
|
||||
<el-table :data="workResource.entpCourseWorkList" style="width: 100%; height: 100%;">
|
||||
<!-- <el-table :data="workResource.entpCourseWorkList" style="width: 100%; height: 100%;">
|
||||
<el-table-column type="index" width="60" />
|
||||
<el-table-column align="left" >
|
||||
<template #header>
|
||||
|
@ -114,7 +114,32 @@
|
|||
<el-button type="primary" @click="handleClassWorkQuizAdd('entpcourseworklist', scope.row.id)">添加</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-table> -->
|
||||
<ul v-infinite-scroll="load" class="infinite-list" style="overflow: auto" infinite-scroll-immediate="false">
|
||||
<li v-for="(item,index) in workResource.entpCourseWorkList" :key="item" class="infinite-list-item">
|
||||
|
||||
<div style="width: 20px;">{{ index +1 }}</div>
|
||||
<div align="left" style="width: 100%;" >
|
||||
<!-- <template #header>
|
||||
<div style="display: flex">
|
||||
<div style="align-items: center;">题目内容</div>
|
||||
</div>
|
||||
</template> -->
|
||||
<div @click="showExamAnalyseDrawer(item)">
|
||||
<div style="overflow: hidden; text-overflow: ellipsis" v-html="item.titleFormat"></div>
|
||||
<div style="overflow: hidden; text-overflow: ellipsis; font-size: 0.9em; margin-top: 6px;" v-html="item.workdescFormat"></div>
|
||||
<el-col :span="24" style="display: flex">
|
||||
<div style="font-size: 1em; color: silver; padding-top: 5px">{{ item.entpname }} {{ item.editusername }}</div>
|
||||
<div style="margin-left: 30px; font-size: 1em; color: silver; padding-top: 5px">{{ item.worktag }}</div>
|
||||
</el-col>
|
||||
</div>
|
||||
</div>
|
||||
<div align="left" width="60">
|
||||
<el-button type="primary" @click="handleClassWorkQuizAdd('entpcourseworklist', item.id)">添加</el-button>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 分页 这里不用-->
|
||||
<!-- <div style="height: 55px;">
|
||||
|
@ -394,10 +419,12 @@ const handleQueryParamFromEntpCourseWork = (queryType) => {
|
|||
* 2 - 按关键词查询
|
||||
*/
|
||||
const handleQueryFromEntpCourseWork= (queryType) => {
|
||||
//queryForm.pageNum = this.paginationParams.pageNum;
|
||||
//queryForm.pageSize = this.paginationParams.pageSize;
|
||||
|
||||
|
||||
const queryForm = {
|
||||
// 分页参数
|
||||
currentPage: paginationParams.pageNum,
|
||||
pageSize: paginationParams.pageSize,
|
||||
// 课程相关参数
|
||||
eid: props.bookobj.levelSecondId,
|
||||
sectionName: props.bookobj.coursetitle,
|
||||
|
@ -418,10 +445,6 @@ const handleQueryFromEntpCourseWork= (queryType) => {
|
|||
|
||||
}
|
||||
|
||||
// 分页参数
|
||||
// pageNum: paginationParams.pageNum,
|
||||
// pageSize: paginationParams.pageSize,
|
||||
|
||||
// 初中政治特殊处理( warn: 需确认是否修改 )
|
||||
// if (this.courseObj.edusubject=='政治' && this.courseObj.edustage=='初中') {
|
||||
// // [初中+政治]需改为[初中+道德与法治]
|
||||
|
@ -438,12 +461,12 @@ const handleQueryFromEntpCourseWork= (queryType) => {
|
|||
// } else {
|
||||
// workResource.entpCourseWorkList = entpcourseworkres.rows;
|
||||
// }
|
||||
const data = entpcourseworkres.data;
|
||||
if(data&&data.length>0){
|
||||
// workResource.entpCourseWorkList = entpcourseworkres.data;
|
||||
// workResource.entpCourseWorkTotal = entpcourseworkres.data.length;
|
||||
|
||||
if(entpcourseworkres.data&&entpcourseworkres.data.length>0){
|
||||
workResource.entpCourseWorkList = entpcourseworkres.data;
|
||||
workResource.entpCourseWorkTotal = entpcourseworkres.data.length;
|
||||
|
||||
workResource.entpCourseWorkList.forEach(item=> {
|
||||
data.forEach(item=> {
|
||||
if (item.worktype == '选择题') {
|
||||
item.worktype = '单选题'
|
||||
}
|
||||
|
@ -451,12 +474,14 @@ const handleQueryFromEntpCourseWork= (queryType) => {
|
|||
|
||||
|
||||
//格式化试题信息
|
||||
processList(workResource.entpCourseWorkList);
|
||||
processList(data);
|
||||
workResource.entpCourseWorkList.push(...data);
|
||||
}else{
|
||||
workResource.entpCourseWorkList = [];
|
||||
workResource.entpCourseWorkTotal = 0
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
// 教学资源,从课标分析、教材分析里来
|
||||
|
@ -875,7 +900,15 @@ const showExamAnalyseDrawer = (row) => {
|
|||
proxy.$refs.examDetailsDrawerRef.acceptParams(activeParams);
|
||||
})
|
||||
}
|
||||
const load = () => {
|
||||
// count.value += 2
|
||||
console.log("加载中")
|
||||
// workResource.entpCourseWorkList
|
||||
paginationParams.pageNum ++ ,
|
||||
paginationParams.pageSize = 5,
|
||||
handleQueryFromEntpCourseWork(0);
|
||||
|
||||
}
|
||||
|
||||
|
||||
onMounted(async() => {
|
||||
|
@ -995,7 +1028,24 @@ watch(() => props.bookobj.levelSecondId, (newVal) => {
|
|||
box-sizing: border-box;
|
||||
background-color: rgb(231, 231, 231)
|
||||
}
|
||||
|
||||
.infinite-list {
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
}
|
||||
.infinite-list .infinite-list-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
//justify-content: center;
|
||||
//height: 50px;
|
||||
background: var(--el-color-primary-light-9);
|
||||
margin: 10px;
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
.infinite-list .infinite-list-item + .list-item {
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style src="@/assets/styles/JYStyle.css"></style>
|
||||
|
|
Loading…
Reference in New Issue