Merge remote-tracking branch 'origin/main'
# Conflicts: # src/renderer/src/views/prepare/components/treeLog.vue
This commit is contained in:
commit
fb6e0da6ff
|
@ -12,7 +12,7 @@
|
|||
<div class="head-aside">
|
||||
<ul >
|
||||
<li :class="computedregistertype==1 || computedregistertype==3?'auth-li':'auth-li pointer-events'" @click="onUserTo('/schoolCertification')" >
|
||||
<i class="iconfont icon-renzheng-"></i>
|
||||
<i class="iconfont icon-renzheng-" :style="computedregistertype==4?'color:green;':''"></i>
|
||||
<span class="mlr-5" v-if="computedregistertype!=4">学校认证</span>
|
||||
<span class="mlr-5" v-else>{{ userStore.DeptInfo.register.schoolName }}</span>
|
||||
<span class="gray" v-if="computedregistertype!=4">未认证</span>
|
||||
|
@ -118,7 +118,6 @@ const computedregistertype = computed(() => {
|
|||
}
|
||||
// 加入成功
|
||||
if(type==3 && userStore.DeptInfo.register.auditStatus==1){
|
||||
console.log(1111)
|
||||
return 4
|
||||
}
|
||||
if(type==4 && userStore.DeptInfo.register.auditStatus==1){
|
||||
|
@ -310,4 +309,8 @@ onMounted(() => {
|
|||
.pointer-events{
|
||||
pointer-events: none;
|
||||
}
|
||||
.icon-renzheng-{
|
||||
font-size: 18px;
|
||||
font-weight: 800;
|
||||
}
|
||||
</style>
|
|
@ -90,7 +90,11 @@
|
|||
</el-row>
|
||||
<!-- 习题表格 -->
|
||||
<div class="infinite-list-wrapper" >
|
||||
<!-- <el-table :data="workResource.entpCourseWorkList" style="width: 100%; height: 100%;">
|
||||
<el-table
|
||||
:data="workResource.entpCourseWorkList"
|
||||
style="width: 100%; height: 100%;"
|
||||
v-loading="pageParams.loading"
|
||||
>
|
||||
<el-table-column type="index" width="60" />
|
||||
<el-table-column align="left" >
|
||||
<template #header>
|
||||
|
@ -114,22 +118,18 @@
|
|||
<el-button type="primary" @click="handleClassWorkQuizAdd('entpcourseworklist', scope.row.id)">添加</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table> -->
|
||||
<ul
|
||||
</el-table>
|
||||
|
||||
<!-- <ul
|
||||
v-infinite-scroll="pageLoad"
|
||||
class="infinite-list"
|
||||
infinite-scroll-immediate="false"
|
||||
infinite-scroll-distance='1'
|
||||
infinite-scroll-distance='100'
|
||||
infinite-scroll-delay="1000"
|
||||
:infinite-scroll-disabled="pageDisabled"
|
||||
>
|
||||
<li v-for="(item,index) in workResource.entpCourseWorkList" :key="item" class="infinite-list-item">
|
||||
<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>
|
||||
<span style="width: 20px;">{{ index +1 }}. </span>
|
||||
|
@ -155,18 +155,18 @@
|
|||
description="未找到相关试题"
|
||||
style="width: 100%; height: 200px; margin-top: 20px;"
|
||||
></el-empty>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<!-- 分页 这里不用-->
|
||||
<!-- <div style="height: 55px;">
|
||||
<pagination
|
||||
v-show="entpCourseWorkTotal > 0"
|
||||
<div style="height: 55px;">
|
||||
<el-pagination
|
||||
v-show="pageParams.total > 0"
|
||||
v-model:page="paginationParams.pageNum"
|
||||
v-model:limit="paginationParams.pageSize"
|
||||
:total="entpCourseWorkTotal"
|
||||
:total="pageParams.total"
|
||||
:style="{ position: 'relative', 'margin-top': '5px' }"
|
||||
@pagination="getPaginationList" />
|
||||
</div> -->
|
||||
@change="getPaginationList" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- 非习题训练:常规作业、 -->
|
||||
<div v-if="classWorkForm.worktype!='习题训练'">
|
||||
|
@ -276,6 +276,7 @@ import { onMounted, ref, nextTick, watch, reactive, getCurrentInstance, computed
|
|||
import { ElMessage } from 'element-plus'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { Search } from '@element-plus/icons-vue'
|
||||
|
||||
import {listEntpcoursework, listEntpcourseworkNew, getEntpcoursework} from '@/api/education/entpCourseWork'
|
||||
import { addClassworkReturnId } from '@/api/teaching/classwork'
|
||||
|
@ -284,6 +285,7 @@ import { listEvaluation } from '@/api/subject'
|
|||
import { listEntpcoursefile } from '@/api/education/entpcoursefile'
|
||||
import { listKnowledgePoint } from "@/api/knowledge/knowledgePoint";
|
||||
|
||||
|
||||
import { useGetHomework } from '@/hooks/useGetHomework'
|
||||
import { processList } from '@/hooks/useProcessList'
|
||||
import { getCurrentTime } from '@/utils/date'
|
||||
|
@ -409,15 +411,15 @@ const fileLoading = ref(false); // 常规作业loading
|
|||
|
||||
// 下拉滚动参数
|
||||
|
||||
const BASE_LIMIT_COUT = 50; // 总加载额外试题数
|
||||
const pageNoMore = computed( () => {
|
||||
if (pageParams.value.total < 1) {
|
||||
return false;
|
||||
}
|
||||
let count = BASE_LIMIT_COUT >= pageParams.value.total ? pageParams.value.total : pageParams.value.originCount+BASE_LIMIT_COUT;
|
||||
return workResource.entpCourseWorkList.length >= count;
|
||||
});
|
||||
const pageDisabled = computed(() => pageParams.value.loading || pageNoMore.value);
|
||||
// const BASE_LIMIT_COUT = 50; // 总加载额外试题数
|
||||
// const pageNoMore = computed( () => {
|
||||
// if (pageParams.value.total < 1) {
|
||||
// return false;
|
||||
// }
|
||||
// let count = BASE_LIMIT_COUT >= pageParams.value.total ? pageParams.value.total : pageParams.value.originCount+BASE_LIMIT_COUT;
|
||||
// return workResource.entpCourseWorkList.length >= count;
|
||||
// });
|
||||
// const pageDisabled = computed(() => pageParams.value.loading || pageNoMore.value);
|
||||
const pageParams = ref({
|
||||
loading: false, // 是否正在加载中
|
||||
originCount: 0, // 初始条目数量
|
||||
|
@ -497,7 +499,7 @@ function Apis(key) {
|
|||
// 年份
|
||||
yearStr: entpCourseWorkQueryParams.yearStr !== '-1' ? entpCourseWorkQueryParams.yearStr:'',
|
||||
// 知识点
|
||||
thirdId: entpCourseWorkQueryParams.point.length > 0 ? entpCourseWorkQueryParams.point[0]:'',
|
||||
thirdId: entpCourseWorkQueryParams.point&&entpCourseWorkQueryParams.point.length > 0 ? entpCourseWorkQueryParams.point[0]:'',
|
||||
// 关键字
|
||||
keyword: entpCourseWorkQueryParams.keyWord && entpCourseWorkQueryParams.keyWord !== '' ? entpCourseWorkQueryParams.keyWord:'',
|
||||
|
||||
|
@ -519,16 +521,16 @@ const handleQueryFromEntpCourseWork= async (queryType) => {
|
|||
// }
|
||||
|
||||
client(t('任务1', 1500)).then(res => {
|
||||
console.log("请求返回",res);
|
||||
if(paginationParams.pageNum == 1){
|
||||
workResource.entpCourseWorkList = [];
|
||||
workResource.entpCourseWorkTotal = 0;
|
||||
//console.log("请求返回",res);
|
||||
// if(paginationParams.pageNum == 1){
|
||||
// workResource.entpCourseWorkList = [];
|
||||
// workResource.entpCourseWorkTotal = 0;
|
||||
|
||||
// 初始化下拉滚动条参数
|
||||
// pageParams.value.loading = false;
|
||||
// pageParams.value.isFirst = true;
|
||||
// pageParams.value.originCount = 0;
|
||||
}
|
||||
// // 初始化下拉滚动条参数
|
||||
// // pageParams.value.loading = false;
|
||||
// // pageParams.value.isFirst = true;
|
||||
// // pageParams.value.originCount = 0;
|
||||
// }
|
||||
const data = res.data || [];
|
||||
if(data && data.length>0){
|
||||
// workResource.entpCourseWorkList = entpcourseworkres.data;
|
||||
|
@ -542,17 +544,20 @@ const handleQueryFromEntpCourseWork= async (queryType) => {
|
|||
|
||||
// 格式化试题信息
|
||||
processList(data);
|
||||
workResource.entpCourseWorkList.push(...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;
|
||||
});
|
||||
});
|
||||
|
||||
//const entpcourseworkres = await listEntpcourseworkNew(queryForm);
|
||||
|
||||
|
@ -977,6 +982,12 @@ const showExamAnalyseDrawer = (row) => {
|
|||
})
|
||||
}
|
||||
|
||||
const getPaginationList = ( page, limit ) => {
|
||||
paginationParams.pageNum = page;
|
||||
paginationParams.pageSize = limit;
|
||||
console.log(page, limit)
|
||||
handleQueryFromEntpCourseWork(0);
|
||||
}
|
||||
|
||||
const pageLoad = async() => {
|
||||
console.log("加载中...")
|
||||
|
|
|
@ -140,6 +140,8 @@
|
|||
<!-- 上课配置 -->
|
||||
<class-start ref="calssRef" @close="closeChange"/>
|
||||
<PptDialog @add-success="addAiPPT" :currentNode="currentNode" :uploadData="uploadData" v-model="pptDialog"/>
|
||||
<!-- 章节弹窗 -->
|
||||
<TreeLog ref="treelogRef"/>
|
||||
<!-- <button @click="test">test</button> -->
|
||||
</template>
|
||||
<script setup>
|
||||
|
@ -235,7 +237,9 @@ export default {
|
|||
isOpenHomework: false,
|
||||
// 当前上课课程
|
||||
activeClass: null,
|
||||
pptDialog: false
|
||||
pptDialog: false,
|
||||
// 打开章节的弹窗
|
||||
treelogRef:null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
Loading…
Reference in New Issue