This commit is contained in:
@fawn-nine
2024-09-24 18:06:13 +08:00
parent 1a2df86df2
commit 6ef6e4e725
14 changed files with 280 additions and 205 deletions

View File

@@ -43,7 +43,7 @@
<view><text class="ciyao">学员人数</text><text
class="mainTxt">{{students.length}}/{{thisClass.number}}</text></view>
<view><text class="ciyao">管理成员</text><text class="mainTxt" @click="seeManager">点击查看</text></view>
</view>
</view>
<!-- v-if="thisClass.state == '2'" -->
<template v-if="isHave">
<view class="pingfenBox testBox" v-if="thisClass.state == '3' || thisClass.state == '2'">
@@ -58,10 +58,10 @@
<text class="scoreNumber greenScore">{{performanceScore.userScore}}</text>
<view class="">
<view class="" style="margin: 10rpx 0;">
<text class="c999" v-if="performanceScore.examScore">{{performanceScore.examScore}}分考试分 <uni-icons type="eye"
<text class="c999" v-if="performanceScore.examScore >= 0">{{performanceScore.examScore}}分考试分 <uni-icons type="eye"
size="20" color="#999" @click="showPaperList = true"></uni-icons></text>
<text v-if="performanceScore.examScore && performanceScore.usualScore"></text>
<text class="c999" v-if="performanceScore.usualScore"> {{performanceScore.usualScore}}平时表现分</text>
<text v-if="performanceScore.examScore >= 0 && performanceScore.usualScore >= 0"></text>
<text class="c999" v-if="performanceScore.usualScore >= 0"> {{performanceScore.usualScore}}分表现分</text>
</view>
</view>
</view>
@@ -76,8 +76,9 @@
<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}}
<view class="" style="text-align: center;"
v-if="newCLass && newCLass.id">
v-if="newCLass && newCLass != null && newCLass.id">
<text class="small_btn chongxiu border_radius_10"
@click="onPageJump('/pages/miniClass/classInfo',newCLass.id)">加入新班级重修</text>
</view>
@@ -157,11 +158,11 @@
<text class="ciyao"><i
class="mainTxt PM_font">{{performanceScore.questionScore}}</i></text>
</view>
<view v-if="classModel.isExam == 1 && thisClass.state == '2'">
<!-- <view v-if="classModel.isExam == 1 && thisClass.state == '2'">
<text class="ciyao">考试分</text>
<text class="ciyao"><i
class="mainTxt PM_font">{{performanceScore.questionScore}}</i></text>
</view>
</view> -->
</view>
</view>
</template>
@@ -248,14 +249,15 @@
v-for="(item, index) in tijiaoTitleList" :key="index">{{item.name}}</text>
</view>
<!-- 课程排序 -->
<view class="courseTab border_radius_10" v-if="questionsList.length > 1">
<view class="flex_box flex_between">
<!-- <view > -->
<view class="courseTab border_radius_10" v-if="questionsList.length > 1 && tijiaoTitleId == '3'">
<view class="flex_box flex_between" v-if="tabCourseList.length <= 3 ">
<text :class="['item','border_radius_10',curCourseId == item.id ? 'cur' :'']"
@click="clickCourseTab(index,item.id)" v-for="(item, index) in tabCourseList"
:key="index">{{item.title}}</text>
<!-- </view> -->
:key="index">{{item.title}}</text>
</view>
<template v-if="tabCourseList.length > 3 && tijiaoTitleId == '3'">
<u-tabs :list="tabCourseList" lineWidth="0" lineHeight="0" @click="tabsClickCourseTab" :activeStyle="courseActiveStyle" :current="curCourseIndex"></u-tabs>
</template>
</view>
<!-- 班内任务 --><!-- 医案 --> <!-- 心得 --><!-- 思考题 -->
<view class="" v-if="tijiaoTitleId != '3'">
@@ -286,45 +288,55 @@
<view class="submitRecode">
<view class="newBox">
<view class="item " v-for="(item, index) in taskList" @click="clickTask(item)">
<view class="leve1 flex_box">
<text>{{item.title}}</text>
</view>
<view :class="['leve2']">
<view :class="[item.zhedie ? '' : 'zhedie']" v-html="item.content">
<view class="leve1 flex_box flex_between">
<text style="flex: 1;">{{item.title}}</text>
<view class="btn1" @click.stop="changeZheDie(item, index)">
{{item.zhedie ? '收起' : '展开'}}
</view>
</view>
<view :class="['leve2']" v-if="item.zhedie">
<view :class="[item.zhedie ? '' : 'zhedie']" v-html="item.content"></view>
</view>
<view class="leve3">
<view class="tips flex_box">
<view class="btn1" @click.stop="changeZheDie(item, index)">
{{item.zhedie ? '收起' : '展开'}}
</view>
<view class="tips flex_box" v-if="item.zhedie">
<!-- <text>发布者{{item.createUser.nickname != null && item.createUser.nickname != '' ? item.createUser.nickname : '匿名用户'}}</text> -->
<text style="" class="date">日期{{item.createTime}}</text>
</view>
<view class="">
<view class="score" v-if="item.scoreSuccess >= 1">
分数{{item.score}}
<template v-if="tijiaoTitleId == 2 && isHave">
<view class="">
<view class="score" v-if="item.scoreSuccess == 0">
等待评分
</view>
<!-- <view class="score" v-if="item.scoreSuccess > 0 && item.scoreSuccess ">
正在评分
</view> -->
<view class="score" v-if="item.scoreSuccess >= 1">
分数{{item.score}}
</view>
</view>
</view>
<text class="btn"
v-show="tijiaoTitleId == 2 && myExperience == 1 && item.scoreSuccess == 0 && thisClass.state == '1'"
<text class="btn"
v-show="myExperience == 1 && item.scoreSuccess == 0 && thisClass.state == '1'"
@click.stop="editMyXinde(item)">修改</text>
</view>
<template v-if="roleCode.includes('0') && isHave">
<view class="leve3" v-show="item.reply && tijiaoTitleId != 2">
<text>已提交答案</text>
</view>
<view class="leve3 no"
v-show="!item.reply && tijiaoTitleId != 2 && thisClass.state == '1'">
<text>未提交答案 点击开始答题</text>
</view>
<view class="leve3 cantAnswer"
v-show="!item.reply && tijiaoTitleId != 2 && (thisClass.state == '2' || thisClass.state == '3')">
<text>未作答 已不可作答</text>
</view>
</template>
</template>
<template v-if="roleCode.includes('0') && isHave && tijiaoTitleId != 2">
<template v-if="item.reply && item.otherInfo != null">
<text v-if="item.otherInfo[0].scoreSuccess == 0">等待评分</text>
<text class="pIng" v-if="item.otherInfo[0].scoreSuccess < 2 && item.otherInfo[0].scoreSuccess > 0">正在评分</text>
<view class="" v-if="item.otherInfo[0].scoreSuccess >=2">
<text class="score" >{{item.otherInfo[0].score}} </text>
<!-- <text style="color: #999; padding-left: 10rpx; font-size: 26rpx;"></text> -->
</view>
</template>
<template
v-if="!item.reply && thisClass.state == '1'">
<text class="no">未提交答案 点击开始答题</text>
</template>
<template
v-if="!item.reply && (thisClass.state == '2' || thisClass.state == '3')">
<text class="cantAnswer">未作答 已不可作答</text>
</template>
</template>
</view>
</view>
</view>
</view>
@@ -345,15 +357,28 @@
<view class="item "
v-for="(item, index) in questionsList[curCourseIndex].chapterList"
@click="jumpToVideoPage(item)">
<view class=" flex_box">
<view class=" flex_box align-items_box">
<view class="pp" style="flex: 1; font-size: 28rpx;" v-html="item.title">
</view>
<text v-if="item.reply == null"
style="color: #ff9277; font-size: 26rpx;">未作答</text>
<text v-else class=""
style="padding-left: 10rpx; color: #55aaff; font-size: 26rpx;">已作答</text>
</view>
<template v-if="item.reply == null">
<text v-if="thisClass.state == '1'" style="color: #ff9277; font-size: 26rpx;">未作答</text>
<text v-if="thisClass.state == '2' || thisClass.state == '3'" style="color: #999; font-size: 26rpx;">已不可作答</text>
</template>
<template v-else>
<!-- <text class=""
style="padding-left: 10rpx; color: #55aaff; font-size: 26rpx;">已作答</text> -->
<text style="padding-left: 10rpx; color: #55aa7f; font-size: 26rpx;" v-if="item.reply.scoreSuccess <= 0 && thisClass.state != '2'">
等待评分
</text>
<text style="padding-left: 10rpx; color: #999; font-size: 26rpx;" v-if="item.reply.scoreSuccess <= 0 && thisClass.state == '2'">
已结班无法评分
</text>
<view class="" style="margin-left: 5rpx;" v-if="item.reply.scoreSuccess > 0">
<text class="score">{{item.reply.score}}</text><text style="color: #999;"></text>
</view>
</template>
</view>
<!-- <view class="questJUmp">前往所在章节</view> -->
</view>
</view>
</view>
@@ -514,9 +539,7 @@
<script>
import QfImageCropper from '@/uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.vue';
import addCerInfo from "@/components/addCerInfo.vue";
// import {
// chooseImage
// } from '@/node_modules/uview-ui';
import debounce from "@/common/debounce.js";
import sutdentScoreList from "./components/sutdent_score_list.vue";
// import permission from "@/js_sdk/wa-permission/permission.js"
import $http from '@/config/requestConfig.js';
@@ -526,6 +549,13 @@
export default {
data() {
return {
courseActiveStyle:{
background:'#fff',
color:'#666',
padding:"10rpx",
borderRadius:"10rpx"
},
certificateFlag:false, // 证书生成中的标记
buyCourseMsg: '',
fileList1: [],
questionsList: [],
@@ -786,7 +816,7 @@
}
}
if (this.thisClass.state == '2') {
if (this.thisClass.state == '2' || this.thisClass.state == '2') {
var userObj = await this.getUserData()
if (userObj) {
this.submitInfo.name = userObj.name
@@ -863,7 +893,7 @@
if (_list.length > 0) {
console.log('是否进入了这里666666666666',this.tijiaoTitleIndex);
this.tijiaoTitleList = _list
this.titleClick(this.tijiaoTitleList[this.tijiaoTitleIndex], this.tijiaoTitleIndex)
this.titleClick(this.tijiaoTitleList[this.tijiaoTitleIndex], this.tijiaoTitleIndex )
// this.tijiaoTitleId = this.tijiaoTitleList[0].id
}
// this.tabId =
@@ -1195,73 +1225,89 @@
},
// 生成证书
createCertificate() {
if (this.submitInfo.name && this.submitInfo.name != null && this.submitInfo.name != '' &&
this.submitInfo.photo && this.submitInfo.photo != null && this.submitInfo.photo != '') {
} else {
uni.showModal({
title: '提示',
content: "真实姓名或证书照片未设置,请设置完成后再来生成证书吧",
cancelText: '稍后设置',
confirmText: '立即设置',
success: (res) => {
if (res.confirm) {
uni.navigateTo({
url: '/pages/mine/userInfo/persData'
})
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 != '') {
} else {
uni.showModal({
title: '提示',
content: "真实姓名或证书照片未设置,请设置完成后再来生成证书吧",
cancelText: '稍后设置',
confirmText: '立即设置',
success: (res) => {
if (res.confirm) {
uni.navigateTo({
url: '/pages/mine/userInfo/persData'
})
}
}
}
})
return
}
var type = undefined
if (this.performanceScore.userScore >= 60 && this.performanceScore.userScore < 70) {
type = 'B'
} else if (this.performanceScore.userScore >= 70) {
type = 'A'
} else {
uni.showToast({
title: '您的成绩未达到证书水平,请继续努力',
icon: 'none'
})
return
}
var data = {
"type": type, //证书类型A a证 B b证 ZK自考
"relationId": this.classId //小班id、课程id
}
// console.log('证书提交数据',data,this.performanceScore.userScore);
$http.request({
url: "common/class/generateCertificateClass",
method: "POST",
data,
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
})
.then(async (res) => {
if (res.code == 0) {
console.log('证书返回值', res);
uni.showToast({
title: '生成成功',
icon: 'none'
})
setTimeout(() => {
this.closeManager()
this.getScore()
}, 300)
} else {
uni.showToast({
title: res.errMsg,
icon: 'none'
})
}
}).catch(e => {
})
return
}
var type = undefined
if (this.performanceScore.userScore >= 60 && this.performanceScore.userScore < 70) {
type = 'B'
} else if (this.performanceScore.userScore >= 70) {
type = 'A'
} else {
uni.showToast({
title: e.errMsg,
title: '您的成绩未达到证书水平,请继续努力',
icon: 'none'
})
});
return
}
uni.showLoading({
title:'正在生成'
})
var data = {
"type": type, //证书类型A a证 B b证 ZK自考
"relationId": this.classId //小班id、课程id
}
// console.log('证书提交数据',data,this.performanceScore.userScore);
$http.request({
url: "common/class/generateCertificateClass",
method: "POST",
data,
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
})
.then(async (res) => {
uni.hideLoading()
if (res.code == 0) {
console.log('证书返回值', res);
uni.showToast({
title: '生成成功',
icon: 'success'
})
setTimeout(() => {
this.closeManager()
this.getScore()
}, 300)
} else {
uni.showToast({
title: res.errMsg,
icon: 'none'
})
}
setTimeout(()=>{
this.certificateFlag = false
},300)
}).catch(e => {
this.certificateFlag = false
uni.hideLoading()
uni.showToast({
title: e.errMsg,
icon: 'none'
})
});
},300)
},
// 查询平时表现分+ 最终成绩 + 可加入的新班级 + 证书信息
async getScore() {
@@ -1349,11 +1395,11 @@
},
})
.then((res) => {
if (res.code == 0 && res.result != null) {
if (res.code == 0 && res.result != null && res.result != 'null') {
this.newCLass = res.result
console.log('同模型的待开班班级', this.newCLass);
} else {
console.log('走这里吗码码码码码');
this.newCLass = undefined
}
}).catch(e => {
@@ -1398,6 +1444,16 @@
}
},
// 滑块滚动
tabsClickCourseTab(e){
console.log('滑块滚动',e);
if (this.curCourseIndex == e.index) {
return
} else {
this.curCourseIndex = e.index
this.curCourseId = e.id
}
},
// 跳转到播放页面
jumpToVideoPage(val) {
uni.navigateTo({
@@ -1560,7 +1616,7 @@
},
async titleClick(item, textIndex) {
console.log('进来了吗', item);
console.log('进来了吗titleClick', item, textIndex);
if(this.loadFlag){
uni.showToast({
title:'操作太快了,休息一下吧',
@@ -1574,9 +1630,12 @@
this.questionsList = await this.getQuestionsList()
if (this.questionsList.length > 0) {
this.curCourseId = this.questionsList[this.curCourseIndex].courseEntity.id
this.tabCourseList = this.questionsList.map(item => {
this.tabCourseList = this.questionsList.map(item => {
return item.courseEntity
})
this.tabCourseList.forEach(item1 => {
item1.name = item1.title
})
}
return
}
@@ -1830,7 +1889,7 @@
clickHelp() {
uni.showModal({
title: '说明',
content: `表现分由${this.classModel.isTask == 1 ? '作业('+this.classModel.taskScore+'%)' : ''}${this.classModel.isMedicalcase == 1 ? '医案('+this.classModel.medicalcaseScore+'%)' : ''}${this.classModel.isExperience == 1 ? '心得('+this.classModel.experienceScore+'%)' : ''} ${this.classModel.isQuestion == 1 ? '思考题('+this.classModel.questionScore+'%)' : ''}构成。`,
content: `表现分由${this.classModel.isTask == 1 ? '作业('+this.classModel.taskScore+'%)' : ''}${this.classModel.isMedicalcase == 1 ? '医案('+this.classModel.medicalcaseScore+'%)' : ''}${this.classModel.isExperience == 1 ? '心得('+this.classModel.experienceScore+'%)' : ''} ${this.classModel.isQuestion == 1 ? '思考题('+this.classModel.questionScore+'%)' : ''}构成,班内总成绩总分为100分`,
showCancel: false,
confirmText: '好的'
})
@@ -2229,6 +2288,10 @@
padding-bottom: 20rpx;
margin-bottom: 20rpx;
// .userName{}
.btn1 {
color: $themeColor;
font-size: 30rpx;
}
}
.leve2 {
@@ -2254,10 +2317,7 @@
.date {}
.btn1 {
color: $themeColor;
font-size: 30rpx;
}
.btn {
border: 1px solid $themeColor;
@@ -2269,15 +2329,18 @@
}
}
.leve3.no {
.leve3{
.no{
color: #ff9277;
text-align: center;
}
.leve3.cantAnswer {
text-align: center;}
.pIng{
color: #55aa00;
}
.cantAnswer{
color: #999;
text-align: center;
text-align: center;}
}
}
}
}