添加题目数量+考试时长灵活设置

This commit is contained in:
@fawn-nine
2024-09-11 17:05:56 +08:00
parent 72dcbfdd82
commit c71b2c67b4
7 changed files with 327 additions and 353 deletions

View File

@@ -6,12 +6,14 @@
"request" : 15000
},
"transformPx" : false,
"icons": [{
"icons" : [
{
"sizes" : "分辨率192x192",
"src" : "图片路径"
}],
"versionName": "1.0.18",
"versionCode": 1018,
}
],
"versionName" : "1.0.19",
"versionCode" : 1019,
"app-plus" : {
"nvueCompiler" : "weex",
"compatible" : {
@@ -268,3 +270,4 @@
}
}
// 小程序特有相关

View File

@@ -51,11 +51,16 @@
<!-- v-if="thisClass.state == '3'" -->
<view class="optionsBox">
<!-- v-show="thisClass.state == '2'" -->
<view class="chengji">
<view class="chengji" style="text-align: center;">
<view style="margin-top: 20rpx;">总成绩
<text class="scoreNumber greenScore">{{performanceScore.userScore}}</text>
<text
class="c999">{{performanceScore.examScore}}分考试分+{{performanceScore.usualScore}}分平时表现分</text>
<view class="">
<view class="">
<text class="c999">{{performanceScore.examScore}}分考试分 <uni-icons type="eye" size="20" color="#999"
@click="showPaperList = true"></uni-icons></text>
<text class="c999">{{performanceScore.usualScore}}分平时表现分</text>
</view>
</view>
</view>
<!-- <view>
恭喜您获得
@@ -71,7 +76,7 @@
</view>
</view>
</view>
<view class="pingfenBox testBox" v-if="thisClass.state == '3' && classModel.isExam == 1">
<view class="pingfenBox testBox" v-if="(thisClass.state == '3') && classModel.isExam == 1">
<view class="scoreTitle">
<view class="titles flex_box">
<text>笔试分</text><uni-icons type="help" size="18" color="#fff"
@@ -98,10 +103,10 @@
@click="continueTest(examId)">继续考试</text>
</view>
</view>
</view>
<view class="flex_box flex_center align-items_box userScore" v-else
style="color: #666; justify-content: space-around !important">
<view class="flex_box align-items_box">
<text><text class="PM_font mainTxt" style="font-size: 60rpx; ">{{paperSore}}</text>
</text>
@@ -117,7 +122,7 @@
</view>
</view>
</view>
<view class="pingfenBox" v-if="thisClass.state == '1' || thisClass.state == '3'">
<view class="pingfenBox" v-if="thisClass.state == '1' || thisClass.state == '3' || thisClass.state == '2'">
<view class="scoreTitle">
<view class="titles flex_box">
<text>表现分</text><uni-icons type="help" size="18" color="#fff" @click="clickHelp"></uni-icons>
@@ -661,10 +666,12 @@
var severNowTime = -1
// paperData = await this.getlocaltestInfo('paperEndTime')
var historyPaper = await this.getingPaper()
console.log('正在进行中的试卷信息', historyPaper);
this.ingPaper = historyPaper
// console.log('对比----------------', historyPaper.classId, this.classId);
if (historyPaper&& historyPaper != null && historyPaper.classId == this.classId) {
paperEndTime = this.hourUp(historyPaper.startTime, 1) // 结束的时间戳
var planEndTimeDate = new Date(historyPaper.planEndTime)
paperEndTime = planEndTimeDate.getTime(); // 结束的时间戳
this.examId = historyPaper.id
} else {
this.examId = undefined
@@ -1092,7 +1099,8 @@
console.log('考试中999999999999999999', res);
if (res.code == 0) {
if (res.classExamUser != null) {
obj = res.classExamUser
obj = {...res.classExamUser, planEndTime:res.planEndTime}
// obj
} else {
obj = undefined
}

View File

@@ -122,7 +122,7 @@
</view>
<view class="item overClass" @click="changeClassStatu('2')"
v-if="classModel.isExam == 1 && thisClass.state == '1' && thisClass.showOverBtn && (roleCode.includes('1') || roleCode.includes('2'))">
v-if="classModel.isExam == 0 && thisClass.state == '1' && thisClass.showOverBtn && (roleCode.includes('1') || roleCode.includes('2'))">
<!-- (无考试) -->
<text>结班</text>
</view>
@@ -163,21 +163,6 @@
<span class="zmVip"></span><text>国学VIP</text>
</view>
</view>
<!-- <view v-if="thisClass.state == '2'"
class=" zhiliang flex_box flex_between align-items_box" style="margin-top: 20rpx;">
<view class="">
<text>A证</text>
<text>20 </text>
</view>
<view class="">
<text>B证</text>
<text>20 </text>
</view>
<view class="">
<text>不合格</text>
<text>20 </text>
</view>
</view> -->
</view>
<view class="newBox">
<view :class="['item',
@@ -211,49 +196,6 @@
<text class="userType" v-if="item.student.vip == '3' ">国学VIP用户</text> -->
</view>
</view>
<!-- <view class="" v-if="thisClass.state == '3' || thisClass.state == '2'">
<view class="scoreBox flex_box flex_between border_radius_10 ">
<view class="">
<view class="ciyao">
平时成绩
</view>
<text class="score">{{item.student.score.peacetimeScore}}</text>
</view>
<template v-if="classModel.isExam == 1">
<template v-if="item.student.score.testScore.length == 0">
<view class="" v-if="thisClass.state == '3'">
<view class="" style="color: #ff9496;">
未考试
</view>
</view>
<view class="" v-if="thisClass.state == '2'">
<view class="ciyao">
考试成绩
</view>
<text class="score">0</text>
</view>
</template>
<template v-else>
<view class="" v-if="thisClass.state == '3'">
<view class="" style="color: #55aa7f;">
等待公布分数
</view>
</view>
<view v-if="thisClass.state == '2'">
<view class="ciyao">
考试成绩
</view>
<text
class="score">{{item.student.score.testScoreNumber}}</text>
</view>
</template>
</template>
<view v-if="classModel.isExam == 1 && thisClass.state == '2'"
:class="['PM_font','zhengshu',item.student.score.certificateType == 'A' ? 'Azheng' : 'Bzheng']">
</view>
</view>
</view> -->
</view>
</view>
</view>
@@ -389,7 +331,7 @@
</view>
</u-popup>
<u-popup key="3" v-if="showStudentScoreBlank" :show="showStudentScoreBlank" :round="10" @close="closePup" ref="">
<view class="upopBox" style="">
<view class="upopBox manScoreBox" style="">
<h3 style="margin-bottom: 20rpx;">
{{thisStudentScore.user.nickname != null && thisStudentScore.user.nickname != '' ? thisStudentScore.user.nickname : "匿名用户"}}
</h3>
@@ -1962,4 +1904,11 @@
z-index: 1;
}
}
.manScoreBox{
.item{padding: 20rpx 0;}
.scoreBox{margin-top: 20rpx; padding: 20rpx;
.ciyao{padding-bottom: 20rpx;}
}
}
</style>

View File

@@ -268,7 +268,7 @@
</u-popup>
<u-popup key="3" v-if="showStudentScoreBlank" :show="showStudentScoreBlank" :round="10" @close="closePup"
ref="">
<view class="upopBox" style="">
<view class="upopBox manScoreBox" style="">
<h3 style="margin-bottom: 20rpx;">
{{thisStudentScore.user.nickname != null && thisStudentScore.user.nickname != '' ? thisStudentScore.user.nickname : "匿名用户"}}
</h3>
@@ -1513,4 +1513,11 @@
z-index: 1;
}
}
.manScoreBox{
.item{padding: 20rpx 0;}
.scoreBox{margin-top: 20rpx; padding: 20rpx;
.ciyao{padding-bottom: 20rpx;}
}
}
</style>

View File

@@ -172,7 +172,7 @@
computed: {
...mapState(["userInfo"]),
getallLIst() {
const numbers = Array.from(Array(100).keys(), n => n + 1);
const numbers = Array.from(Array(this.questionList.length).keys(), n => n + 1);
console.log('numbers', numbers);
return numbers
}
@@ -458,7 +458,7 @@
.then(async res => {
uni.hideLoading()
if (res.code == 0) {
console.log('试卷信息',res.examPaper);
console.log('试卷信息',res);
var subOptions = JSON.parse(res.examPaper.subject)
this.answerIdsList = JSON.parse(res.examPaper.answer)
var newAnswerIdsList = [...this.answerIdsList ]
@@ -472,7 +472,7 @@
code++
})
var temList = newAnswerIdsList[index].split(',')
console.log('temList474',temList);
// console.log('temList474',temList);
if(temList == ''){
temList = []
}else{
@@ -485,9 +485,9 @@
this.haveAnswerList = this.gethaveAnswerList()
// console.log('this.answerIdsList', this.answerIdsList);
this.testPaper = res.examPaper
// this.examId = res.id
// this.paperCreateTime = 1
this.endTime = this.hourUp(res.examPaper.startTime,1) // 结束的时间戳
var planEndTimeDate = new Date(res.planEndTime)
this.endTime = planEndTimeDate.getTime(); // 结束的时间戳
console.log('this.endTime',this.endTime);
var severNowTime = await this.getServerTime()
this.secondTimeDif = this.endTime - severNowTime // 时间差 毫秒

View File

@@ -170,7 +170,7 @@
computed: {
...mapState(["userInfo"]),
getallLIst() {
const numbers = Array.from(Array(100).keys(), n => n + 1);
const numbers = Array.from(Array(this.testPaper.length).keys(), n => n + 1);
console.log('numbers', numbers);
return numbers
}
@@ -453,7 +453,10 @@
this.testPaper = res.examPaper
this.examId = res.id
this.paperCreateTime = 1
this.endTime = this.hourUp(res.startTime,2) // 结束的时间戳
// this.endTime = this.hourUp(res.startTime,2) // 结束的时间戳
var planEndTimeDate = new Date(res.planEndTime)
this.endTime = planEndTimeDate.getTime();
var severNowTime = await this.getServerTime()
this.secondTimeDif = this.endTime - severNowTime // 时间差 毫秒
if(this.secondTimeDif > 0){

View File

@@ -387,8 +387,9 @@
var severNowTime = -1
// paperData = await this.getlocaltestInfo('paperEndTime')
var historyPaper = await this.getingPaper()
if(historyPaper){
paperEndTime = this.hourUp(historyPaper.startTime,1) // 结束的时间戳
if(historyPaper && historyPaper != null){
var planEndTimeDate = new Date(historyPaper.planEndTime)
paperEndTime = planEndTimeDate.getTime(); // 结束的时间戳
this.examId = historyPaper.id
this.classId = historyPaper.classId
}else{
@@ -484,9 +485,12 @@
.then(async (res) => {
console.log('考试中',res);
if (res.code == 0 && res.classExamUser != null) {
obj = res.classExamUser
obj = {...res.classExamUser, planEndTime:res.planEndTime}
}else{
obj = undefined
}
}).catch(e => {
obj = undefined
});
return obj