This commit is contained in:
@fawn-nine
2024-09-25 18:17:51 +08:00
parent c0b696aa15
commit 86a1f754c2
13 changed files with 391 additions and 115 deletions

View File

@@ -44,9 +44,9 @@
class="mainTxt">{{students.length}}/{{thisClass.number}}</text></view>
<view><text class="ciyao">管理成员</text><text class="mainTxt" @click="seeManager">点击查看</text></view>
</view>
<!-- v-if="thisClass.state == '2'" -->
<template v-if="isHave">
<view class="pingfenBox testBox" v-if="thisClass.state == '3' || thisClass.state == '2'">
<view class="pingfenBox testBox" v-if=" thisClass.state == '2'">
<view class="scoreTitle">
<view class="titles flex_box">
<text>总分</text><uni-icons type="help" size="18" color="#fff"
@@ -65,18 +65,19 @@
</view>
</view>
</view>
<view class="" v-if="performanceScore.userScore >= 60">
<view class="" v-if="certificate && certificate.id">
<text>恭喜您获得</text>
<text class="yellowScore" v-if=" performanceScore.userScore >= 70"> A </text>
<text class="blueScore"
v-else-if="performanceScore.userScore >= 60 && performanceScore.userScore < 70"> B </text>
<text :class="[certificate.type=='A' ? 'yellowScore':'blueScore']" v-if=" performanceScore.userScore >= 70"> {{certificate.type}} </text>
<!-- <text class=""
v-else-if="performanceScore.userScore >= 60 && performanceScore.userScore < 70"> B </text> -->
<text class="small_btn border_radius_10 zhengshu"
@click="showSubmit">{{certificate && certificate.id ? '查看证书' : '生成证书'}}</text>
@click="showSubmit">
{{certificate && certificate.id && certificate.certificateUrl.length > 0 ? '查看证书' : '去生成证书'}}
</text>
</view>
<template v-if="performanceScore.userScore < 60">
<view class="flex_box flex_center align-items_box" style="justify-content: center;">
<text style="text-align: center;">很遗憾您的成绩未达标</text>
{{newCLass}}
<text style="text-align: center;">很遗憾您的成绩未达标</text>
<view class="" style="text-align: center;"
v-if="newCLass && newCLass != null && newCLass.id">
<text class="small_btn chongxiu border_radius_10"
@@ -84,15 +85,24 @@
</view>
</view>
</template>
</view>
<view class="optionsBox" v-if="thisClass.state == '3' && classModel.isExam == 1" style="margin-top: 20rpx;">
</view>
</view>
<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"
@click="showTestTips = true"></uni-icons>
</view>
</view>
<view class="optionsBox" v-if="thisClass.state == '3' " style="margin-top: 20rpx;">
<view class=" ">
<view class="">
<!-- -->
<view class="gotoExams" @click="goTest" v-if="paperList.length <= 0">
<text>去考试</text>
</view>
<view class="" v-else-if="paperList.length > 0 && showCountDown">
<view class="flex_box flex_between align-items_box">
<view class="">
@@ -108,7 +118,7 @@
</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">
<view class="">
<h3>笔试成绩</h3>
@@ -816,7 +826,7 @@
}
}
if (this.thisClass.state == '2' || this.thisClass.state == '2') {
if (this.thisClass.state == '2') {
var userObj = await this.getUserData()
if (userObj) {
this.submitInfo.name = userObj.name
@@ -954,15 +964,15 @@
return list
},
async showSubmit() {
if (this.certificate && this.certificate.id) {
// if (this.certificate && this.certificate.id && this.certificate.certificateUrl.length > 3) {
// 已生成
uni.navigateTo({
url: '/pages/certificate/certificate'
})
} else { // 未生成
this.showSubmitInfoBlank = true
// } else { // 未生成
// this.showSubmitInfoBlank = true
}
// }
},
async getUserData() {
@@ -1227,7 +1237,7 @@
createCertificate() {
debounce(async () => {
if(this.certificateFlag) return
this.certificateFlag = true
if (this.submitInfo.name && this.submitInfo.name != null && this.submitInfo.name != '' &&
this.submitInfo.photo && this.submitInfo.photo != null && this.submitInfo.photo != '') {
@@ -1259,12 +1269,12 @@
})
return
}
this.certificateFlag = true
uni.showLoading({
title:'正在生成'
})
var data = {
"type": type, //证书类型A a证 B b证 ZK自考
"relationId": this.classId //小班id、课程id
"id": this.certificate.id //证书id
}
// console.log('证书提交数据',data,this.performanceScore.userScore);
$http.request({
@@ -1330,13 +1340,13 @@
this.getNewCLassInfo()
} else {
// >= 60
// if (this.thisClass.state == '2') {
if (this.thisClass.state == '2') {
var certificate = await this.getCertificateInfo()
if (certificate && certificate.length > 0 && certificate[0].id) {
this.certificate = certificate[0]
}
console.log('this.certificate', certificate);
// }
}
}
} else {
@@ -2127,9 +2137,9 @@
.zhengshu {
margin-left: 20rpx;
color: #ffaa7f;
color: #55aa7f;
font-size: 28rpx;
border: 1px solid #ffaa7f
border: 1px solid #55aa7f
}
.chongxiu {