This commit is contained in:
@fawn-nine
2024-09-03 17:08:18 +08:00
parent 9f265afa4a
commit 69cbc35e0a
8 changed files with 572 additions and 234 deletions

View File

@@ -11,7 +11,8 @@
<view :class="['classStatus',
thisClass.state == '0' ? 'daikai' :'',
thisClass.state == '1' ? 'xuexizhong' :'',
thisClass.state == '2' ? 'yijieban' :''
thisClass.state == '2' ? 'yijieban' :'',
thisClass.state == '3' ? 'kaoshizhou' :''
]">
{{getClassStatus}}
</view>
@@ -36,11 +37,8 @@
</view>
</view>
<view class="pingfenBox">
<!-- 功能按钮 -->
<!-- 待开班按钮 -->
<!-- 已开班按钮 -->
<view class="optionsBtn" v-if="thisClass.state != '2'">
<!-- 待开班主任 -->
@@ -104,7 +102,7 @@
</view>
</view>
</view>
<view class="flex_box" v-if="thisClass.state == '1'">
<view class="flex_box" v-if="thisClass.state == '1' || thisClass.state == '3'">
<view class="item fabuhomework" @click="goTaskListForWait('0')"
v-if="thisClass.state == '1' && classModel.isTask == 1">
<text>作业列表</text>
@@ -113,20 +111,24 @@
v-if="thisClass.state == '1' && classModel.isMedicalcase == 1">
<text>医案列表</text>
</view>
<view class="item setBanewei" v-if="thisClass.state != '2'"
<view class="item setBanewei" v-if="thisClass.state == '1'"
@click="goSetAdmin('/pages/miniClass/memberSet')">
<text>设置班委</text>
</view>
<!-- && thisClass.showOverBtn -->
<view class="item overClass" @click="changeClassStatu('2')"
v-if="thisClass.state == '1' && thisClass.showOverBtn && (roleCode.includes('1') || roleCode.includes('2'))">
v-if="classModel.isExam == 1 && thisClass.state == '3' && (roleCode.includes('1') || roleCode.includes('2'))">
<text>结班</text>
</view>
<view class="item overClass" @click="changeClassStatu('2')"
v-if="classModel.isExam == 1 && thisClass.state == '1' && thisClass.showOverBtn && (roleCode.includes('1') || roleCode.includes('2'))">
<!-- (无考试) -->
<text>结班</text>
</view>
</view>
</view>
<view class="line1" v-if="thisClass.state == '1'">
</view>
<view class="line1" v-if="thisClass.state == '1' || thisClass.state == '3'"></view>
<!-- 作业批改 -->
<class-infoWork-blank v-if="thisClass.state != '0'" :thisClass="thisClass" :classModel="classModel"
:roleCode="roleCode"></class-infoWork-blank>
@@ -144,51 +146,109 @@
<uni-section class="mb-10 nobg xueyuanTitle" title="班内学员" type="line" sub-title="">
{{students.length}} 名学员</uni-section>
</view>
<view class="flex_box tips">
<view class="item flex_box">
<span class=""></span><text>普通用户</text>
</view>
<view class="item flex_box">
<span class="superVip"></span><text>超级VIP</text>
</view>
<view class="item flex_box">
<span class="wumenVip"></span><text>医学VIP</text>
</view>
<view class="item flex_box">
<span class="zmVip"></span><text>国学VIP</text>
</view>
</view>
<view class=" tips">
<view class="flex_box">
<view class="item flex_box">
<span class=""></span><text>普通用户</text>
</view>
<view class="item flex_box">
<span class="superVip"></span><text>超级VIP</text>
</view>
<view class="item flex_box">
<span class="wumenVip"></span><text>医学VIP</text>
</view>
<view class="item flex_box">
<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','flexbox',
<view :class="['item',
item.student.vip == '1' ? 'superVip' : '',
item.student.vip == '2' ? 'wumenVip' : '',
item.student.vip == '3' ? 'zmVip' : '',
thisStudent.student && thisStudent.student.id == item.student.id ? 'cur' : ''
]" v-for="(item, index) in students" :key="index" @click="clickStudent(item)">
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
<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}}
<template>
<text>{{item.student.tel}}</text>
</template>
</text>
<text class="txt555" v-else>
匿名用户
</text>
<text @click.stop="outClass(item.student.id)" class="outBtn"
v-if="thisClass.state != '2'">踢出班级</text>
<!-- <text class="userType" v-if="item.student.vip == '1'">超级VIP用户</text>
<view class="flexbox align-items_box">
<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}}
<template>
<text>{{item.student.tel}}</text>
</template>
</text>
<text class="txt555" v-else>
匿名用户
</text>
<text @click.stop="outClass(item.student.id)" class="outBtn"
v-if="thisClass.state != '2' && thisClass.state != '3'">踢出班级</text>
<!-- <text class="userType" v-if="item.student.vip == '1'">超级VIP用户</text>
<text class="userType" v-if="item.student.vip == '2' ">医学VIP用户</text>
<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>
@@ -203,15 +263,18 @@
<text class="ciyao">创建日期</text>
<text class="mainTxt">{{thisClass.createTime.substring(0,10)}}</text>
</view>
<view class="itt" v-if="thisClass.state == 1">
<view class="itt" v-if="thisClass.state == 1 || thisClass.state == 3">
<text class="ciyao">开班日期</text>
<text class="mainTxt">{{thisClass.startTime.substring(0,10)}}</text>
</view>
<view class="itt" v-if="thisClass.state == 2">
<text class="ciyao">结班日期</text>
<text class="mainTxt">{{thisClass.endTime.substring(0,10)}}</text>
</view>
<view class="itt">
<text class="ciyao">教学时长</text>
<text class="mainTxt">{{classModel.days}} </text>
</view>
<view class="itt"><text class="ciyao">班级类型</text>
<text class="mainTxt" v-if="classModel.type == '0'">普通小班</text>
<text class="mainTxt" v-if="classModel.type == '1'">联合班</text>
@@ -237,7 +300,9 @@
</view>
</view>
<view>
<u-back-top :scroll-top="scrollTop" bottom="60" :customStyle='bgiStyle' :iconStyle="iconStyle"></u-back-top>
</view>
<!-- 管理弹出 -->
<u-popup key="1" :show="showMan" :round="10" @close="closeManager">
<view class="guanli">
@@ -307,6 +372,40 @@
<view class="item">
<b>课程购买情况</b><br />{{thisStudent.buyState}}
</view>
<view class="scoreBox flex_box flex_between border_radius_10 " >
<view class="">
<view class="ciyao">
平时成绩
</view>
<text class="score">{{thisStudent.student.score.peacetimeScore}}</text>
</view>
<template v-if="classModel.isExam == 1">
<template v-if="thisStudent.student.score.testScore.length == 0">
<view class="">
<view class="">
未参加考试
</view>
</view>
</template>
<template v-else >
<view class="" v-for="(item1, index1) in thisStudent.student.score.testScore">
<view class="ciyao">
{{index1 == 0 ? '一' : '二'}}次考试成绩
</view>
<view class="flex_box flex_center" @click.stop="seePaper(item1.testPaperId)">
<text class="score">{{item1.score}}</text>
<view class="seePaper">
<image src="../../static/icon/testPaperIcon.png" mode="widthFix" ></image>
</view>
</view>
</view>
</template>
</template>
<!-- && thisClass.state == '2' -->
<!-- <view v-if="classModel.isExam == 1" :class="['PM_font','zhengshu',thisStudent.student.score.certificateType == 'A' ? 'Azheng' : 'Bzheng']"
></view> -->
</view>
</view>
</u-popup>
<!-- <view class="fabBox">
@@ -317,6 +416,8 @@
</template>
<script>
const classData = require('@/data/classInfoMan.json')
const studentList = require('@/data/manStudentsList.json')
import {
ref,
onMounted
@@ -329,6 +430,7 @@
export default {
data() {
return {
scrollTop: 0,
horizontal: 'right',
vertical: 'bottom',
direction: 'vertical',
@@ -425,7 +527,15 @@
homeWorkList: [],
thisStudent: {},
showStudentBlank: false,
showAlert: false, // 是否显示考试周
bgiStyle: {
background: '#fff'
},
iconStyle: {
fontSize: '40rpx',
fontWeight: 'bold',
color: '#258feb',
},
}
},
onLoad(e) {
@@ -451,7 +561,9 @@
beforeDestroy() {
clearInterval(this.interval)
},
onPageScroll(e) {
this.scrollTop = e.scrollTop;
},
onShow() {
this.getClassInfo()
// this.roleCode = await this.getRealRole()
@@ -509,6 +621,9 @@
case '2':
_roleName = '已结班';
break;
case '3':
_roleName = '考试周';
break;
}
return _roleName
},
@@ -667,8 +782,8 @@
});
},
clickStudent(item) {
console.log('item', item);
this.thisStudent = item
console.log('item', item);
this.thisStudent = item
this.showStudentBlank = true
},
getUserInfo() {
@@ -836,6 +951,7 @@
content: '是否要提前结班?',
success(res) {
if (res.confirm) {
// return
that.opClass(statusCode)
} else {
return
@@ -843,12 +959,27 @@
},
})
} else {
console.log('this.statusCode', statusCode);
// return
that.opClass(statusCode)
}
// that.opClass(statusCode)
}
},
// 考试周和结班状态下,学员的信息
async getStudentScoreList() {
var list = undefined
await this.$http
.post('book/user/info/' + this.userInfo.id)
.then(res => {
// this.userMsg = res.user
list = studentList
}).catch(e => {
list = []
});
return list
},
// 班级操作
opClass(statusCode) {
$http.request({
@@ -886,6 +1017,9 @@
taskEdit(item) {
console.log('taskEdit'.item);
},
seePaper(val){
console.log('点击了');
},
// 退出班级 // 踢出班级
outClass(userId) {
let that = this
@@ -964,8 +1098,19 @@
console.log('res--------', this.classId, res, );
this.refresh = false
if (res.code == 0) {
// this.isHave = res.result.isJoin
res = classData // 测试数据
this.thisClass = res.result.class
if (!this.showAlert && this.thisClass.state == '3') {
uni.showModal({
title: '提示',
content: '您好,当前教学进度已进入考试周,请敦促评分员尽快完成评分工作,考试周结束后将无法评分,感谢您对吴门医述教务的大力支持。',
confirmText: '好的',
showCancel: false
})
this.showAlert = true
}
this.classModel = res.result.classModel
// this.thisClass.showOverBtn = false
if (this.thisClass.state == '1') {
@@ -988,7 +1133,7 @@
console.log('off70...天数', off70, off70miniSecond)
}
this.thisClass.homeWorkNumber = 4
if (res.result.classModel.days > 0) {
this.thisClass.homeWorkNumber = Math.ceil(res.result.classModel.days / 7)
@@ -1025,7 +1170,14 @@
this.courses = res.result.courses
this.students = res.result.students
if (this.thisClass.state == '3' || this.thisClass.state == '2') {
// 考试周 结班状态下的
this.students = await this.getStudentScoreList()
// console.log('students', this.students);
} else {
this.students = res.result.students
}
this.refresh = true
if (this.thisClass.state == 0) {
this.homeWorkList = await this.getHomeWorkLength()
@@ -1174,7 +1326,7 @@
margin-bottom: 10rpx;
// border-bottom: 1px solid #eee;
padding-bottom: 10rpx;
margin-top: 20rpx;
// margin-top: 20rpx;
.flex_box {
justify-content: space-between;
@@ -1212,7 +1364,7 @@
.tips {
padding: 20rpx 10rpx;
background-color: #eee;
background-color: #fff;
border-radius: 10rpx;
font-size: 24rpx;
color: #666;
@@ -1245,6 +1397,10 @@
background-image: linear-gradient(-90deg, #55aa00 0%, rgba(255, 255, 255, 0.1) 80%, rgba(255, 255, 255, 0) 100%);
}
.kaoshizhou {
background-image: linear-gradient(-90deg, #ffaa00 0%, rgba(255, 255, 255, 0.1) 80%, rgba(255, 255, 255, 0) 100%);
}
.yijieban {
background-image: linear-gradient(-90deg, #999 0%, rgba(255, 255, 255, 0.1) 80%, rgba(255, 255, 255, 0) 100%);
}
@@ -1358,7 +1514,9 @@
}
}
.zhiliang{
font-size: 28rpx;
}
.showMore {
width: 100%;
text-align: center;
@@ -1450,7 +1608,7 @@
.classMateBox {
.zmVip {
background-image: linear-gradient(-60deg, #53966a 0%, #e1feef 50%, #e1feef 100%);
background-image: linear-gradient(-30deg, #7fd59c 0%, #e1feef 50%, #e1feef 100%);
.outBtn {
color: #fff !important;
@@ -1459,7 +1617,7 @@
}
.wumenVip {
background-image: linear-gradient(-60deg, #578df0 0%, #f1f4fd 50%, #f1f4fd 100%);
background-image: linear-gradient(-30deg, #71aaf0 0%, #f1f4fd 50%, #f1f4fd 100%);
.outBtn {
color: #fff !important;
@@ -1468,7 +1626,7 @@
}
.superVip {
background-image: linear-gradient(-60deg, #965af0 0%, #fdf0ed 50%, #fdf0ed 100%);
background-image: linear-gradient(-30deg, #a576c7 0%, #fdf0ed 30%, #fdf0ed 100%);
.outBtn {
color: #fff !important;
@@ -1478,6 +1636,10 @@
.newBox {
flex-wrap: wrap;
.item {
border: 1px solid #fff;
}
}
.item {
@@ -1516,7 +1678,7 @@
}
.item.cur {
border: 2px solid #55aa00;
border: 1px solid #55aa00;
}
}
@@ -1699,7 +1861,19 @@
font-size: 30rpx;
margin-top: 20rpx;
}
.zhengshu{width: 80rpx; height: 80rpx; background-size: contain;}
.Azheng{background-image: url(@/static/icon/Az.png);}
.Bzheng{background-image: url(@/static/icon/Bz.png);}
.scoreBox{
align-items: center;
margin-top: 20rpx;
text-align: center; background-color: #fff; padding: 20rpx;
.ciyao{color: #999;}
.score{color: #258feb; font-weight: bold; font-size: 36rpx;}
.seePaper{width: 50rpx; height: 50rpx;
image{width: 100%; height: 100%;}
}
}
.className {
padding: 30rpx 0;
position: relative;