培训管理

xgf-training-dev
LiuJiaNan 2025-02-22 17:21:46 +08:00
parent 7c245ffe68
commit f939db5e07
6 changed files with 446 additions and 622 deletions

View File

@ -1,10 +1,20 @@
<template> <template>
<view class="content"> <view class="content">
<view class="top"> <view class="top">
<image src="/static/images/study/bgimg1.png" />
<view class="suject">
<text class="line-2">考试科目{{ info.examname }}</text>
</view>
<view class="questions">
<text>当前试题{{ current + 1 }}/{{ options.length }}</text>
</view>
<view class="time"> <view class="time">
<text style="margin-right: 14rpx" class="iconfont">&#xed63;</text> <text>考试剩余时间</text>
<text>倒计时</text> <u-count-down
<u-count-down :time="info.ANSWERSHEETTIME * 60 * 1000" format="mm 分 ss 秒" auto-start millisecond @finish="fnCountDownFinish" /> :time="info.answersheettime * 60 * 1000"
format="HH 时 mm 分 ss 秒"
@finish="fnCountDownFinish"
/>
</view> </view>
</view> </view>
@ -12,30 +22,30 @@
<view class="title"> <view class="title">
<text> <text>
<text class="tag_title"> <text class="tag_title">
{{ handleCalcQuestType(options[current].QUESTIONTYPE) }} {{ handleCalcQuestType(options[current].questiontype) }}
</text> </text>
{{ current + 1 }}.{{ options[current].QUESTIONDRY }} {{ current + 1 }}.{{ options[current].questiondry }}
</text> </text>
</view> </view>
<view v-show="options[current].QUESTIONTYPE === '1'" class="options"> <view v-show="options[current].questiontype === '1'" class="options">
<view class="item" :class="{ 'active': options[current].checked === 'A' }" @click="fnChooseTopic('radio', 'A')"> <view class="item" :class="{ 'active': options[current].checked === 'A' }" @click="fnChooseTopic('radio', 'A')">
<text class="option">A</text> <text class="option">A</text>
<text class="text">{{ options[current].OPTIONA }}</text> <text class="text">{{ options[current].optiona }}</text>
</view> </view>
<view class="item" :class="{ 'active': options[current].checked === 'B' }" @click="fnChooseTopic('radio', 'B')"> <view class="item" :class="{ 'active': options[current].checked === 'B' }" @click="fnChooseTopic('radio', 'B')">
<text class="option">B</text> <text class="option">B</text>
<text class="text">{{ options[current].OPTIONB }}</text> <text class="text">{{ options[current].optionb }}</text>
</view> </view>
<view class="item" :class="{ 'active': options[current].checked === 'C' }" @click="fnChooseTopic('radio', 'C')"> <view class="item" :class="{ 'active': options[current].checked === 'C' }" @click="fnChooseTopic('radio', 'C')">
<text class="option">C</text> <text class="option">C</text>
<text class="text">{{ options[current].OPTIONC }}</text> <text class="text">{{ options[current].optionc }}</text>
</view> </view>
<view class="item" :class="{ 'active': options[current].checked === 'D' }" @click="fnChooseTopic('radio', 'D')"> <view class="item" :class="{ 'active': options[current].checked === 'D' }" @click="fnChooseTopic('radio', 'D')">
<text class="option">D</text> <text class="option">D</text>
<text class="text">{{ options[current].OPTIOND }}</text> <text class="text">{{ options[current].optiond }}</text>
</view> </view>
</view> </view>
<view v-show="options[current].QUESTIONTYPE === '2'" class="options"> <view v-show="options[current].questiontype === '2'" class="options">
<view <view
class="item" class="item"
:class="{ :class="{
@ -44,7 +54,7 @@
@click="fnChooseTopic('multiple', 'A')" @click="fnChooseTopic('multiple', 'A')"
> >
<text class="option">A</text> <text class="option">A</text>
<text class="text">{{ options[current].OPTIONA }}</text> <text class="text">{{ options[current].optiona }}</text>
</view> </view>
<view <view
class="item" class="item"
@ -54,7 +64,7 @@
@click="fnChooseTopic('multiple', 'B')" @click="fnChooseTopic('multiple', 'B')"
> >
<text class="option">B</text> <text class="option">B</text>
<text class="text">{{ options[current].OPTIONB }}</text> <text class="text">{{ options[current].optionb }}</text>
</view> </view>
<view <view
class="item" class="item"
@ -64,7 +74,7 @@
@click="fnChooseTopic('multiple', 'C')" @click="fnChooseTopic('multiple', 'C')"
> >
<text class="option">C</text> <text class="option">C</text>
<text class="text">{{ options[current].OPTIONC }}</text> <text class="text">{{ options[current].optionc }}</text>
</view> </view>
<view <view
class="item" class="item"
@ -74,20 +84,20 @@
@click="fnChooseTopic('multiple', 'D')" @click="fnChooseTopic('multiple', 'D')"
> >
<text class="option">D</text> <text class="option">D</text>
<text class="text">{{ options[current].OPTIOND }}</text> <text class="text">{{ options[current].optiond }}</text>
</view> </view>
</view> </view>
<view v-show="options[current].QUESTIONTYPE === '3'" class="options"> <view v-show="options[current].questiontype === '3'" class="options">
<view class="item" :class="{ 'active': options[current].checked === 'A' }" @click="fnChooseTopic('judge', 'A')"> <view class="item" :class="{ 'active': options[current].checked === 'A' }" @click="fnChooseTopic('judge', 'A')">
<text class="option">{{ options[current].OPTIONA }}</text> <text class="option">{{ options[current].optiona }}</text>
<text class="text"></text> <text class="text"></text>
</view> </view>
<view class="item" :class="{ 'active': options[current].checked === 'B' }" @click="fnChooseTopic('judge', 'B')"> <view class="item" :class="{ 'active': options[current].checked === 'B' }" @click="fnChooseTopic('judge', 'B')">
<text class="option">{{ options[current].OPTIONB }}</text> <text class="option">{{ options[current].optionb }}</text>
<text class="text"></text> <text class="text"></text>
</view> </view>
</view> </view>
<view v-show="options[current].QUESTIONTYPE === '4'" class="options"> <view v-show="options[current].questiontype === '4'" class="options">
<view class="item"> <view class="item">
<u-textarea v-model="options[current].checked" auto-height count/> <u-textarea v-model="options[current].checked" auto-height count/>
</view> </view>
@ -95,8 +105,10 @@
</view> </view>
<view class="footer"> <view class="footer">
<u-button v-show="current !== 0" :style="{ width: '45%' }" text="上一题" @click="fnPreviousQuestion"/> <u-button v-show="current !== 0" :style="{ width: '45%' }" text="上一题" @click="fnPreviousQuestion"/>
<u-button v-show="current !== options.length - 1" type="primary" :style="{ width: current === 0 ? '100%' : '45%' }" text="下一题" @click="fnNextQuestion" /> <u-button v-show="current !== options.length - 1" type="primary"
<u-button v-show="current === options.length - 1" type="primary" :style="{ width: '45%' }" text="交卷" @click="fnHandInThePaper" /> :style="{ width: current === 0 ? '100%' : '45%' }" text="下一题" @click="fnNextQuestion"/>
<u-button v-show="current === options.length - 1" type="primary" :style="{ width: '45%' }" text="交卷"
@click="fnHandInThePaper"/>
</view> </view>
<u-toast ref="uToast"/> <u-toast ref="uToast"/>
@ -113,12 +125,6 @@ import {
export default { export default {
data() { data() {
return { return {
// STAGEEXAMPAPERINPUT_ID: '',
// STAGEEXAMPAPER_ID: '',
// CLASS_ID: '',
// POST_ID: '',
// STUDENT_ID: '',
// NUMBEROFEXAMS: '',
routeQuery: {}, routeQuery: {},
entrySite: '', entrySite: '',
info: {}, info: {},
@ -129,7 +135,8 @@ export default {
2: '多选', 2: '多选',
3: '判断', 3: '判断',
4: '填空' 4: '填空'
} },
studentId:''
} }
}, },
onLoad(query) { onLoad(query) {
@ -145,97 +152,23 @@ export default {
} }
return false return false
}, },
computed: {
userInfo() {
return this.$store.getters.getUserInfo
}
},
methods: { methods: {
async fnGetData() { async fnGetData() {
const { stageexampaperinputId, classId, postId, studentId, numberofexams } = this.routeQuery const {stageexampaperinputId, classId, } = this.routeQuery
const resData = await getExamExercises({ const resData = await getExamExercises({
STAGEEXAMPAPERINPUT_ID: stageexampaperinputId, stageexampaperinputId: stageexampaperinputId,
// STAGEEXAMPAPER_ID: this.STAGEEXAMPAPER_ID, classId: classId,
CLASS_ID: classId,
POST_ID: postId,
STUDENT_ID: studentId,
NUMBEROFEXAMS: numberofexams
}) })
// if (this.entrySite === "strengththen") { this.info = resData.info
// resData = await getStrengthenExam({ this.options = resData.inputQue
// STRENGTHEN_STAGEEXAMPAPER_INPUT_ID: this.STAGEEXAMPAPERINPUT_ID, this.studentId = resData.student.studentId
// CLASS_ID: this.CLASS_ID, if (resData.numberofexams > 0) {
// POST_ID: this.POST_ID, uni.showModal({
// STUDENT_ID: this.STUDENT_ID, title: "温馨提示",
// NUMBEROFEXAMS: this.NUMBEROFEXAMS, content: `您还可以考试${resData.numberofexams}次!`,
// }); showCancel: false,
// } else { });
// resData = await getExamExercises({
// STAGEEXAMPAPERINPUT_ID: this.STAGEEXAMPAPERINPUT_ID,
// STAGEEXAMPAPER_ID: this.STAGEEXAMPAPER_ID,
// CLASS_ID: this.CLASS_ID,
// POST_ID: this.POST_ID,
// STUDENT_ID: this.STUDENT_ID,
// NUMBEROFEXAMS: this.NUMBEROFEXAMS,
// });
// }
// this.info = resData.pd;
this.info = { ...this.info, ANSWERSHEETTIME: 30 }
this.options = [
{
QUESTIONDRY: '题干题干题干题干题干1 ( ) .',
QUESTIONTYPE: '1',
OPTIONA: '这是选项A',
OPTIONB: '这是选项B',
OPTIONC: '这是选项C',
OPTIOND: '这是选项D'
},
{
QUESTIONDRY: '题干题干题干题干题干2 ()',
QUESTIONTYPE: '2',
OPTIONA: '这是选项A',
OPTIONB: '这是选项B',
OPTIONC: '这是选项C',
OPTIOND: '这是选项D'
},
{
QUESTIONDRY: '未带安全头盔可正常进入堆场进行工业,以上说法是否正确?',
QUESTIONTYPE: '3',
OPTIONA: '对',
OPTIONB: '错'
},
{
QUESTIONDRY: '当进入施工现场后, 应立刻对_____设施做全面检查?',
QUESTIONTYPE: '4',
OPTIONA: '对',
OPTIONB: '错'
} }
]
// if (resData.NUMBEROFEXAMS > 0) {
// uni.showModal({
// title: "",
// content: `${resData.NUMBEROFEXAMS}`,
// showCancel: false,
// });
// } else if (resData.NUMBEROFEXAMS === "-9999") {
// uni.showModal({
// title: "",
// content: `60`,
// showCancel: false,
// });
// } else {
// uni.showModal({
// title: "",
// content: ``,
// showCancel: false,
// success: (res) => {
// if (res.confirm) {
// uni.navigateBack();
// }
// },
// });
// }
}, },
fnChooseTopic(type, checked) { fnChooseTopic(type, checked) {
if (!this.options[this.current].checked) { if (!this.options[this.current].checked) {
@ -316,22 +249,17 @@ export default {
this.fnSubmit() this.fnSubmit()
}, },
async fnSubmit() { async fnSubmit() {
// uni.navigateBack({ delta: 2 }) const {stageexampaperinputId, classId, } = this.routeQuery
for (let i = 0; i < this.options.length; i++) { for (let i = 0; i < this.options.length; i++) {
if (this.options[i].QUESTIONTYPE === "2") { if (this.options[i].questiontype === "2") {
this.options[i].checked = this.options[i].checked.replace(/,/g, ""); this.options[i].checked = this.options[i].checked.replace(/,/g, "");
} }
} }
const resData = await setTestPaperSubmission({ const resData = await setTestPaperSubmission({
USERNAME: this.userInfo.NAME, stageexampaperinputId: stageexampaperinputId,
entrySite: this.entrySite, classId: classId,
STAGEEXAMPAPERINPUT_ID: this.STAGEEXAMPAPERINPUT_ID, studentId: this.studentId,
CLASS_ID: this.CLASS_ID, passscore: this.info.passscore,
STUDENT_ID: this.STUDENT_ID,
NUMBEROFEXAMS: this.NUMBEROFEXAMS,
PASSSCORE: this.info.PASSSCORE,
EXAMSCORE: this.info.EXAMSCORE,
EXAMTIMEBEGIN: this.info.EXAMTIMEBEGIN,
options: JSON.stringify(this.options), options: JSON.stringify(this.options),
}); });
if (resData.examResult === "0") { if (resData.examResult === "0") {
@ -341,9 +269,7 @@ export default {
showCancel: false, showCancel: false,
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {
if (this.entrySite === "video_study") uni.navigateBack({delta: 2});
uni.navigateBack({ delta: 3 });
else uni.navigateBack();
} }
}, },
}); });
@ -354,11 +280,7 @@ export default {
showCancel: false, showCancel: false,
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {
if (this.entrySite === "video_study")
uni.navigateBack({ delta: 3 });
else if (this.entrySite === "strengththen")
uni.navigateBack({delta: 2}); uni.navigateBack({delta: 2});
else uni.navigateBack();
} }
}, },
}); });
@ -369,23 +291,53 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@import '/static/fonts/iconfont_timer.css';
.content { .content {
.top { .top {
padding: 17rpx; margin: 20rpx;
border-radius: 20rpx;
padding: 40rpx;
text-align: center;
box-sizing: border-box;
position: relative;
image {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}
.suject {
color: #fff;
font-weight: bold;
font-size: 32rpx;
position: relative;
z-index: 1;
}
.questions {
color: #eeecec;
font-size: 30rpx;
padding-top: 20rpx;
position: relative;
z-index: 1;
}
.time { .time {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: flex-start; justify-content: center;
align-items: center; align-items: center;
color: #363636; color: #eeecec;
font-size: 28rpx; font-size: 28rpx;
padding-top: 20rpx;
position: relative;
z-index: 1;
::v-deep { ::v-deep {
.u-count-down__text { .u-count-down__text {
display: inline; color: #eeecec;
color: #363636;
font-size: 28rpx; font-size: 28rpx;
line-height: normal; line-height: normal;
} }

View File

@ -1,19 +1,20 @@
<template> <template>
<view class="content"> <view class="content">
<view class="content__titletop"> <view class="content__titletop">
<view class="content__title">试卷名称-综合素质测评</view> <view class="content__title">试卷名称{{info.examname}}</view>
<view class="content__subtitle">(满分: 100)</view> <view class="content__subtitle">(满分: {{info.paperexamscore}})</view>
<view class="content__subtitle">(合格分: {{info.passscore}})</view>
</view> </view>
<view class="content__info"> <view class="content__info">
<text>姓名: 测试者</text> <view>姓名: {{info.username}}</view>
<text>分数: 85</text> <view>分数: {{info.examscore}}</view>
<text>考试时间: 2024-12-30</text> <view>考试时间: {{info.examtimeend}}</view>
</view> </view>
<view class="content__sign"> <view class="content__sign">
<view style="margin-right: 10rpx">签字: </view> <view style="margin-right: 10rpx">签字: </view>
<u-image width="120rpx" height="70rpx" model="widthFix" src="https://img.alicdn.com/img/i1/131787161/O1CN01z67Qvv22lnCzgPob4_!!0-saturn_solar.jpg_.webp" /> <u-image width="120rpx" height="70rpx" model="widthFix" :src="$filePath + info.signaturePath" @click="previewImage" />
</view> </view>
<view class="counter"> <view class="counter">
@ -96,9 +97,7 @@ import { getTaskScoreInfo } from "@/api";
export default { export default {
data() { data() {
return { return {
pageSize: 10, info:{},
currentPage: 1,
totalPage: 0,
questionList: [], questionList: [],
current: 0, // current: 0, //
questionTypeMap: { questionTypeMap: {
@ -120,94 +119,20 @@ export default {
methods: { methods: {
async getData(stagestudentrelationId, classId) { async getData(stagestudentrelationId, classId) {
// const resData = await getTaskScoreInfo({ const resData = await getTaskScoreInfo({
// stagestudentrelationId, stagestudentrelationId,
// classId classId
// }) })
// this.questionList = resData.list this.questionList = resData.pd.questionList
this.questionList = [ this.info = resData.pd
{
stageexamrecordId: '7cea826c3c974cb69028dd0624b632ba',
stageexampaperId: null,
stageexamId: null,
questionId: null,
userId: null,
answer: 'B',
answerright: 'B',
creator: null,
createTime: null,
operator: null,
operatTime: null,
isDelete: null,
corpinfoId: null,
studytaskId: null,
paperId: null,
classId: null,
studentId: null,
paperQuestionId: 'c413570fac8b49d8bd3ac27e223beb48',
questionnumber: null,
questiontype: '1',
questiondry: '发生生产安全事故以后,单位负责人应当在( )小时内向当地县级应急管理部门和负有安全生产监督管理职责的有关部门报告。',
optiona: '2',
optionb: '1',
optionc: '4',
optiond: '半',
descr: '17',
score: '50.0',
labelType: '6a8577ad5cf84e259f6a601a0c253726',
coursewarename: '测试40秒',
labelTypeName: '规范标准',
checkList: null,
count: null,
videocoursewareId: null
},
{
stageexamrecordId: '956a9175accc4c96b062eac68a5cdc28',
stageexampaperId: null,
stageexamId: null,
questionId: null,
userId: null,
answer: 'C',
answerright: 'C',
creator: null,
createTime: null,
operator: null,
operatTime: null,
isDelete: null,
corpinfoId: null,
studytaskId: null,
paperId: null,
classId: null,
studentId: null,
paperQuestionId: 'b8203efc27c04afc8b692fc2c82095ca',
questionnumber: null,
questiontype: '2',
questiondry: '发生生产安全事故以后,单位负责人应当在( )小时内向当地县级应急管理部门和负有安全生产监督管理职责的有关部门报告。',
optiona: '2',
optionb: '1',
optionc: '4',
optiond: '半',
descr: '17',
score: '50.0',
labelType: '2c0f587e982641c7965182826f9c41ac',
coursewarename: '测试40秒',
labelTypeName: '法律法规',
checkList: null,
count: null,
videocoursewareId: null
}
]
this.totalPage = 2
this.totalCount = this.questionList.length
},
resetList() {
this.pageSize = 10
this.currentPage = 1
this.questionList = []
this.getData()
}, },
handleCalcQuestType(type) { handleCalcQuestType(type) {
return `(${this.questionTypeMap[type]})` return `(${this.questionTypeMap[type]})`
},
previewImage(){
uni.previewImage({
urls: [this.$filePath + this.info.signaturePath],
})
} }
} }
} }
@ -233,10 +158,9 @@ export default {
.content__info { .content__info {
font-size: 34rpx; font-size: 34rpx;
margin-top: 36rpx; view{
display: flex; margin-top: 18rpx;
justify-content: space-between; }
align-items: center;
} }
.content__sign { .content__sign {
@ -257,7 +181,7 @@ export default {
.tag_title { .tag_title {
font-size: 28rpx; font-size: 28rpx;
background-color: #94f0bd; background-color: #fff;
color: #5ac725; color: #5ac725;
border-radius: 8rpx; border-radius: 8rpx;
padding: 2rpx 8rpx; padding: 2rpx 8rpx;

View File

@ -66,13 +66,14 @@ export default {
}, },
/* 监听页面显示,页面每次出现在屏幕上都触发,包括从下级页面点返回露出当前页面 */ /* 监听页面显示,页面每次出现在屏幕上都触发,包括从下级页面点返回露出当前页面 */
onShow() { async onShow() {
// this.resetList(); await this.getUserFaceCompleted()
await this.resetList()
}, },
async onLoad(query) { async onLoad(query) {
await this.getUserFaceCompleted() // await this.getUserFaceCompleted()
await this.resetList() // await this.resetList()
}, },
methods: { methods: {
@ -108,7 +109,7 @@ export default {
onlyFromCamera: false, // onlyFromCamera: false, //
hideAlbum: false, // , hideAlbum: false, // ,
success: (response) => { success: (response) => {
const { stageexampaperinputId, classId, postId, studentId, numberofexams, type } = JSON.parse(response.result) const { stageexampaperinputId, classId, type, } = JSON.parse(response.result)
const findClassId = this.trainList.some((item) => item.classId === classId) const findClassId = this.trainList.some((item) => item.classId === classId)
if (type === '0') { if (type === '0') {
// //
@ -132,9 +133,6 @@ export default {
type: 'learning_certification', type: 'learning_certification',
stageexampaperinputId, stageexampaperinputId,
classId, classId,
postId,
studentId,
numberofexams
} }
}) })
} else { } else {

View File

@ -71,6 +71,7 @@
import { getDataDictionary, joinClass } from '@/api'; import { getDataDictionary, joinClass } from '@/api';
import Sign from '@/components/sign/sign.vue' import Sign from '@/components/sign/sign.vue'
import { validateFieldPhone, validateFieldIdCard } from '@/utils/formValidateField.js' import { validateFieldPhone, validateFieldIdCard } from '@/utils/formValidateField.js'
import store from "@/store";
export default { export default {
data() { data() {
@ -256,7 +257,7 @@ export default {
delete params.writeSign delete params.writeSign
await joinClass({ await joinClass({
files, files,
formData: { ...params, classId } formData: { ...params, classId,USER_ID:this.$store.getters.getUserInfo.USER_ID }
}) })
.then(() => { .then(() => {
uni.$u.toast('保存成功') uni.$u.toast('保存成功')

View File

@ -1,40 +1,18 @@
<template> <template>
<view class="content"> <view class="content">
<u-list @scrolltolower="scrolltolower"> <u-cell-group>
<u-list-item v-for="(item, index) in signList" :key="index"> <u-cell title="头像">
<view class="sign_item"> <template #value>
<view class="sign_item_avatar"> <u-image width="200rpx" height="200rpx" model="widthFix" :src="$filePath + signInfo.useravatarurl" />
<!-- 用来给图片资源添加前置的统一的访问路径头部: $filePath, 这个将会用在下面的 u-image 组件中的 src 属性中, 示例为: src="$filePath + item.FILEPATH" --> </template>
<u-image width="200rpx" height="200rpx" model="widthFix" :src="item.useravatarurl" /> </u-cell>
</view> <u-cell title="姓名" :value="signInfo.name"></u-cell>
<view class="info_body"> <u-cell title="班级名称" :value="signInfo.className"></u-cell>
<view class="info_name"> <u-cell title="签到时间" :value="signInfo.studyStartTime"></u-cell>
<text>{{ item.userName }}</text> <u-cell title="培训地点" :value="signInfo.trainingLocationName"></u-cell>
</view> <u-cell title="签到状态" :value="studyStateMap[signInfo.studystate].value"></u-cell>
<view class="info_raw"> <u-cell title="考试签到" :value="stageexamStateMap[signInfo.stageexamstate].value"></u-cell>
<text class="content_label">班级名称: </text> </u-cell-group>
<text class="content_value">{{ item.name }}</text>
</view>
<view class="info_raw">
<text class="content_label">签到时间: </text>
<text class="content_value">{{ item.studyStartTime }}</text>
</view>
<view class="info_raw">
<text class="content_label">培训地点: </text>
<text class="content_value">{{ item.trainingLocation }}</text>
</view>
<view class="info_raw flex_layout">
<text class="content_label">签到状态: </text>
<text class="tag" :class="studyStateMap[item.studystate].color">{{ studyStateMap[item.studystate].value }}</text>
</view>
<view class="info_raw flex_layout">
<text class="content_label">考试状态: </text>
<text class="tag" :class="stageexamStateMap[item.stageexamstate].color">{{ stageexamStateMap[item.stageexamstate].value }}</text>
</view>
</view>
</view>
</u-list-item>
</u-list>
</view> </view>
</template> </template>
@ -45,17 +23,14 @@ export default {
data() { data() {
return { return {
routeQuery: {}, routeQuery: {},
pageSize: 10, signInfo: {},
currentPage: 1,
totalPage: 0,
signList: [],
// //
studyStateMap: { studyStateMap: {
'0': { '0': {
value: '未签到', value: '未签到',
color: 'tag__red' color: 'tag__red'
}, },
'1': { '3': {
value: '已签到', value: '已签到',
color: 'tag__green' color: 'tag__green'
} }
@ -78,47 +53,21 @@ export default {
} }
}, },
onShow() {
this.resetList()
},
onLoad(query) { onLoad(query) {
this.routeQuery = query this.routeQuery = query
this.getData()
}, },
methods: { methods: {
async getData() { async getData() {
const { classId } = this.routeQuery const { classId } = this.routeQuery
// let resData = await getSignInfo({ let resData = await getSignInfo({
// showCount: this.pageSize, showCount: 1,
// currentPage: this.currentPage, currentPage: 1,
// classId classId
// }); });
// this.signList = [...this.signList, ...resData.page.list] this.signInfo = resData.page.list[0]
// this.totalPage = resData.page.totalPage
this.signList = [
{
userName: '齐天大圣1',
useravatarurl: 'https://img.alicdn.com/img/i1/131787161/O1CN01z67Qvv22lnCzgPob4_!!0-saturn_solar.jpg_.webp',
name: '班级名称1班级名称1班级名称1班级名称1',
studyStartTime: '2025-02-11 09:40',
trainingLocation: '教三大教室',
studystate: '0',
stageexamstate: '0'
}, },
]
this.totalPage = 2
},
resetList() {
this.pageSize = 10
this.currentPage = 1
this.trainList = []
this.getData()
},
scrolltolower() {
this.currentPage++
if (this.totalPage >= this.currentPage) this.getData()
}
} }
} }
</script> </script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB