baigl #394

Merged
baigl merged 16 commits from baigl into main 2024-11-11 15:04:19 +08:00
1 changed files with 61 additions and 9 deletions
Showing only changes of commit 3b8e36454a - Show all commits

View File

@ -90,7 +90,7 @@
</el-row> </el-row>
<!-- 习题表格 --> <!-- 习题表格 -->
<div class="middle" > <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 type="index" width="60" />
<el-table-column align="left" > <el-table-column align="left" >
<template #header> <template #header>
@ -114,7 +114,32 @@
<el-button type="primary" @click="handleClassWorkQuizAdd('entpcourseworklist', scope.row.id)">添加</el-button> <el-button type="primary" @click="handleClassWorkQuizAdd('entpcourseworklist', scope.row.id)">添加</el-button>
</template> </template>
</el-table-column> </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" >
<!-- <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>
<!-- 分页 这里不用--> <!-- 分页 这里不用-->
<!-- <div style="height: 55px;"> <!-- <div style="height: 55px;">
@ -436,12 +461,12 @@ const handleQueryFromEntpCourseWork= (queryType) => {
// } else { // } else {
// workResource.entpCourseWorkList = entpcourseworkres.rows; // 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){ data.forEach(item=> {
workResource.entpCourseWorkList = entpcourseworkres.data;
workResource.entpCourseWorkTotal = entpcourseworkres.data.length;
workResource.entpCourseWorkList.forEach(item=> {
if (item.worktype == '选择题') { if (item.worktype == '选择题') {
item.worktype = '单选题' item.worktype = '单选题'
} }
@ -449,12 +474,14 @@ const handleQueryFromEntpCourseWork= (queryType) => {
// //
processList(workResource.entpCourseWorkList); processList(data);
workResource.entpCourseWorkList.push(...data);
}else{ }else{
workResource.entpCourseWorkList = []; workResource.entpCourseWorkList = [];
workResource.entpCourseWorkTotal = 0 workResource.entpCourseWorkTotal = 0
} }
}) })
} }
// //
@ -873,7 +900,15 @@ const showExamAnalyseDrawer = (row) => {
proxy.$refs.examDetailsDrawerRef.acceptParams(activeParams); proxy.$refs.examDetailsDrawerRef.acceptParams(activeParams);
}) })
} }
const load = () => {
// count.value += 2
console.log("加载中")
// workResource.entpCourseWorkList
paginationParams.pageNum ++ ,
paginationParams.pageSize = 5,
handleQueryFromEntpCourseWork(0);
}
onMounted(async() => { onMounted(async() => {
@ -993,7 +1028,24 @@ watch(() => props.bookobj.levelSecondId, (newVal) => {
box-sizing: border-box; box-sizing: border-box;
background-color: rgb(231, 231, 231) 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>
<style src="@/assets/styles/JYStyle.css"></style> <style src="@/assets/styles/JYStyle.css"></style>