This commit is contained in:
@fawn-nine
2024-09-10 17:24:13 +08:00
parent 13c656d9b5
commit 9dd7656c3c
12 changed files with 285 additions and 323 deletions

View File

@@ -40,8 +40,7 @@
<view><text class="ciyao">管理成员</text><text class="mainTxt" @click="seeManager">点击查看</text></view>
</view>
<!-- v-if="thisClass.state == '2'" -->
<view class="pingfenBox testBox"
>
<view class="pingfenBox testBox" v-if="thisClass.state == '2'">
<view class="scoreTitle">
<view class="titles flex_box">
<text>总成绩</text>
@@ -50,22 +49,29 @@
</view>
</view>
<!-- v-if="thisClass.state == '3'" -->
<view class="optionsBox" >
<view class="optionsBox">
<!-- v-show="thisClass.state == '2'" -->
<view class="chengji">
<view style="margin-top: 20rpx;">总成绩<text class="scoreNumber greenScore">{{performanceScore.userScore}}</text> <text
class="c999">{{performanceScore.examScore}}分考试分+{{performanceScore.usualScore}}分平时表现分</text></view>
<view>恭喜您获得<text class="greenScore">A证</text><text
class="small_btn border_radius_10 zhengshu">查看证书</text></view>
<view style="margin-top: 20rpx;">总成绩
<text class="scoreNumber greenScore">{{performanceScore.userScore}}</text>
<text
class="c999">{{performanceScore.examScore}}分考试分+{{performanceScore.usualScore}}分平时表现分</text>
</view>
<!-- <view>
恭喜您获得
<text class="greenScore">A证</text>
<text class="small_btn border_radius_10 zhengshu">查看证书</text>
</view> -->
<view style="margin-top: 20rpx; text-align: center;">很遗憾您的成绩未达标</view>
<view class="" style="margin-top: 20rpx; text-align: center;">
<text class="small_btn chongxiu border_radius_10">加入新班级重修</text>
<view class="" style="margin-top: 20rpx; text-align: center;"
v-if="performanceScore.userScore <= 70 && newCLass && newCLass.id">
<text class="small_btn chongxiu border_radius_10"
@click="onPageJump('/pages/miniClass/classInfo',newCLass.id)">加入新班级重修</text>
</view>
</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"
@@ -190,25 +196,25 @@
<!-- 班内同学 -->
<template v-if="tabId == '2'">
<template v-if="students.length> 0">
<view class="classMateBox" v-if="(thisClass.state == '0' || thisClass.state == '1')">
<view class="newBox flexbox">
<view :class="['item']" v-for="(item, index) in students" :key="index">
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
<view class="flexbox">
<view class="classmateImg">
<image v-if="item.student.avatar != null && item.student.avatar != ''"
:src="item.student.avatar" mode="aspectFit"></image>
<image v-else src="/static/icon/morenAvavter.png" mode="aspectFit"></image>
<view class="classMateBox" v-if="(thisClass.state == '0' || thisClass.state == '1')">
<view class="newBox flexbox">
<view :class="['item']" v-for="(item, index) in students" :key="index">
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
<view class="flexbox">
<view class="classmateImg">
<image v-if="item.student.avatar != null && item.student.avatar != ''"
:src="item.student.avatar" mode="aspectFit"></image>
<image v-else src="/static/icon/morenAvavter.png" mode="aspectFit"></image>
</view>
<view class="textItems flex_box">
<text class="txt555"
v-if="item.student.nickname != null && item.student.nickname != ''">
{{item.student.nickname}}
</text>
<text v-else>匿名用户</text>
</view>
</view>
<view class="textItems flex_box">
<text class="txt555"
v-if="item.student.nickname != null && item.student.nickname != ''">
{{item.student.nickname}}
</text>
<text v-else>匿名用户</text>
</view>
</view>
<!-- <view class="" v-if="thisClass.state == '3' || thisClass.state == '2'">
<!-- <view class="" v-if="thisClass.state == '3' || thisClass.state == '2'">
<view class="scoreBox flex_box ">
<view class="item1">
<view class="ciyao">
@@ -236,12 +242,12 @@
</template>
</view>
</view> -->
</view>
</view>
</view>
</view>
<sutdent-score-list :students="students" :classModel="classModel" :tabId="tabId" :thisClass="thisClass"
@chooseStudent="chooseStudent"
v-if="(thisClass.state == '3' || thisClass.state == '2')"></sutdent-score-list>
<sutdent-score-list :students="students" :classModel="classModel" :tabId="tabId"
:thisClass="thisClass" @chooseStudent="chooseStudent"
v-if="(thisClass.state == '3' || thisClass.state == '2')"></sutdent-score-list>
</template>
<view class="" v-else>
<u-divider text="暂无学员加入"></u-divider>
@@ -308,7 +314,7 @@
</view>
</view>
<text class="btn"
v-show="tijiaoTitleId == 2 && myExperience == 1 && item.scoreSuccess == 0"
v-show="tijiaoTitleId == 2 && myExperience == 1 && item.scoreSuccess == 0 && thisClass.state == '1'"
@click.stop="editMyXinde(item)">修改</text>
</view>
<template v-if="roleCode.includes('0') && isHave">
@@ -596,6 +602,7 @@
showPaperList: false,
examId: undefined,
ingPaper: undefined, // 正在进行中的试卷信息
newCLass: undefined, // 同模型的待开班班级
}
},
onLoad(e) {
@@ -623,7 +630,9 @@
}
},
onPullDownRefresh() {
this.curTagIndex = 0
this.getClassInfo()
this.getScore()
this.pPage = 0
this.taskList = []
this.getList()
@@ -653,7 +662,7 @@
// paperData = await this.getlocaltestInfo('paperEndTime')
var historyPaper = await this.getingPaper()
this.ingPaper = historyPaper
console.log('对比', historyPaper.classId, this.classId);
console.log('对比----------------', historyPaper.classId, this.classId);
if (historyPaper && historyPaper.classId == this.classId) {
paperEndTime = this.hourUp(historyPaper.startTime, 1) // 结束的时间戳
this.examId = historyPaper.id
@@ -751,9 +760,9 @@
},
methods: {
// 选中了学生
chooseStudent(data){
chooseStudent(data) {
return
console.log('xuesheng',data);
console.log('xuesheng', data);
},
// 获取服务器时间
async getServerTime() {
@@ -842,6 +851,7 @@
},
// 考试周和结班状态下,学员的信息
async getStudentScoreList() {
console.log('进来了码?');
var list = undefined
await $http.request({
url: "common/class/userScoreList",
@@ -854,19 +864,21 @@
},
})
.then(res => {
console.log('班状态下,学员的信息', res);
console.log('考试周班状态下,学员的信息',this.classId , res, );
// this.userMsg = res.user
// list = studentList
if(res.code == 0){
if (res.code == 0) {
res.result.forEach(item => {
item.task0Score ? '' : item.task0Score = 0 // 固定任务
item.questionScore ? '' : item.questionScore = 0 // 思考题
item.task1Score ? '' : item.task1Score = 0 /// 医案
item.experienceScore ? '' : item.experienceScore = 0 // 心得
item.pingshiScore = item.task0Score + item.questionScore + item.task1Score + item.experienceScore
item.experienceScore ? '' : item.experienceScore = 0 // 心得
item.pingshiScore = item.task0Score + item.questionScore + item
.task1Score + item.experienceScore
})
list = res.result
}else{
} else {
uni.showToast({
title: res.errMsg,
icon: 'none',
@@ -874,6 +886,7 @@
})
}
}).catch(e => {
console.log('走异常了吗?', e);
list = []
uni.showToast({
title: e.errMsg,
@@ -884,6 +897,7 @@
return list
},
goTest() {
console.log('this.ingPaper',this.ingPaper);
if (this.ingPaper) {
uni.showModal({
title: '提示',
@@ -943,7 +957,10 @@
.then((res) => {
if (res.code == 0) {
this.performanceScore = res.result
console.log('this.平时成绩e-------', this.performanceScore);
console.log('平时成绩e-------', this.performanceScore);
if (this.performanceScore.userScore <= 70) {
this.getNewCLassInfo()
}
} else {
uni.showToast({
title: '平时成绩获取失败',
@@ -957,6 +974,35 @@
})
});
},
// 可加入的同模型下待开班班级
getNewCLassInfo() {
$http.request({
url: "common/class/getNoOpenClassSameClass",
method: "POST",
data: {
"modelId": this.classModel.id
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
})
.then((res) => {
if (res.code == 0 && res.result != null) {
this.newCLass = res.result
console.log('同模型的待开班班级', this.newCLass);
} else {
this.newCLass = undefined
}
}).catch(e => {
this.newCLass = undefined
console.log('e', e);
// uni.showToast({
// title: '平时成绩获取失败',
// icon: 'none'
// })
});
},
editMyXinde(item) {
// var options = JSON.stringify(item)
uni.navigateTo({
@@ -1032,7 +1078,7 @@
}
})
},
async getingPaper() {
async getingPaper() {
var obj = undefined
await $http.request({
url: "common/classExam/examingPaper",
@@ -1043,15 +1089,21 @@
},
})
.then(async (res) => {
console.log('考试中', res);
if (res.code == 0 && res.classExamUser != null) {
obj = res.classExamUser
console.log('考试中999999999999999999', res);
if (res.code == 0) {
if (res.classExamUser != null) {
obj = res.classExamUser
} else {
obj = undefined
}
}
}).catch(e => {});
}).catch(e => {
console.log('考试中99999异常999', e);
});
return obj
},
// 获取本地试卷信息
getList() {
console.log('进入函数了吗');
this.status = 1;
@@ -1104,11 +1156,11 @@
this.loadFlag = false;
console.log('res', res);
uni.hideLoading()
}else{
} else {
console.log('数据获取失败.......', res);
}
}).catch(e => {
console.log( '数据报错', e)
console.log('数据报错', e)
uni.hideLoading()
this.loadFlag = false;
uni.showToast({
@@ -1224,6 +1276,7 @@
})
.then(res => {
if (res.code == 0) {
this.isHave = true
uni.showToast({
title: `加入成功!`,
@@ -1406,6 +1459,7 @@
},
})
.then(async res => {
console.log('班级信息', res);
this.refresh = false
if (res.code == 0) {
// res = classData // 测试数据