合并前

This commit is contained in:
@fawn-nine
2024-09-09 11:18:06 +08:00
parent ac4f5dcd66
commit 195ba83a10
5 changed files with 1010 additions and 471 deletions

View File

@@ -120,7 +120,7 @@
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'))">
<!-- (无考试) -->
@@ -141,120 +141,135 @@
</view>
<!-- 学员列表 -->
<view class="" v-if="tabId == '2'">
<view class="classMateBox" v-show="students.length> 0 ">
<view class="" style=" overflow: hidden;">
<uni-section class="mb-10 nobg xueyuanTitle" title="班内学员" type="line" sub-title="">
{{students.length}} 名学员</uni-section>
</view>
<view class=" tips">
<view class="flex_box">
<view class="item flex_box">
<span class=""></span><text>普通用户</text>
<template v-if="students.length> 0 ">
<template v-if="(thisClass.state == '0' || thisClass.state == '1')">
<view class="classMateBox">
<view class="" style=" overflow: hidden;">
<uni-section class="mb-10 nobg xueyuanTitle" title="班内学员" type="line" sub-title="">
{{students.length}} 名学员</uni-section>
</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 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',
<!-- <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',
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="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>
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
<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 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>
</view>
<view class="" v-show="students.length == 0">
<u-divider text="暂无学员加入"></u-divider>
</view>
</template>
<template v-if="(thisClass.state == '3' || thisClass.state == '2')">
<sutdent-score-list :students="students" :classModel="classModel" :tabId="tabId" :thisClass="thisClass"
@chooseStudent="chooseStudent"
></sutdent-score-list>
</template>
</template>
<template v-if="students.length == 0">
<view class="">
<u-divider text="暂无学员加入"></u-divider>
</view>
</template>
</view>
<view class="" v-if="tabId == '0'">
<view class="otherItems flex_box">
@@ -299,7 +314,7 @@
</view>
</view>
<view>
<view>
<u-back-top :scroll-top="scrollTop" bottom="60" :customStyle='bgiStyle' :iconStyle="iconStyle"></u-back-top>
</view>
<!-- 管理弹出 -->
@@ -368,51 +383,70 @@
<view class="item">
<text><b>电话</b>{{thisStudent.student.tel}}</text>
</view>
<!-- <view class="item">
<b>课程购买情况</b><br />{{thisStudent.buyState}}
</view> -->
</view>
</u-popup>
<u-popup key="3" v-if="showStudentScoreBlank" :show="showStudentScoreBlank" :round="10" @close="closePup" ref="">
<view class="upopBox" style="">
<h3 style="margin-bottom: 20rpx;">
{{thisStudentScore.user.nickname != null && thisStudentScore.user.nickname != '' ? thisStudentScore.user.nickname : "匿名用户"}}
</h3>
<view class="item">
<text><b>身份信息</b></text>
<text v-if="thisStudentScore.user.vip == '0'">普通用户</text>
<text v-if="thisStudentScore.user.vip == '1'">超级VIP</text>
<text v-if="thisStudentScore.user.vip == '2'">医学VIP</text>
<text v-if="thisStudentScore.user.vip == '3'">国学VIP</text>
</view>
<view class="item">
<text><b>电话</b>{{thisStudentScore.user.tel}}</text>
</view>
<!-- <view class="item">
<b>课程购买情况</b><br />{{thisStudent.buyState}}
</view> -->
<view class="scoreBox flex_box flex_between border_radius_10 " >
<view class="scoreBox flex_box flex_between border_radius_10 ">
<view class="">
<view class="ciyao">
平时成绩
</view>
<text class="score">{{thisStudent.student.score.peacetimeScore}}</text>
<text class="score">{{thisStudentScore.pingshiScore}}</text>
</view>
<template v-if="classModel.isExam == 1">
<template v-if="thisStudent.student.score.testScore.length == 0">
<view class="">
<template v-if="classModel.isExam == 1">
<template v-if="thisStudentScore.classExamUsers.length == 0">
<view class="">
未参加考试
<view class="">
未参加考试
</view>
</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>
</template>
<template v-else>
<view class="" v-for="(item1, index1) in thisStudentScore.classExamUsers" :key="index1">
<view class="ciyao">
{{index1 == 0 ? '一' : '二'}}次考试成绩
</view>
<view class="flex_box flex_center" @click.stop="seePaper(item1.id)">
<text class="score">{{item1.score}}</text>
<view class="seePaper">
<image src="../../static/icon/testPaperIcon.png" mode="widthFix"></image>
</view>
</view>
</view>
</view>
</view>
</template>
</template>
</template>
<!-- && thisClass.state == '2' -->
<!-- <view v-if="classModel.isExam == 1" :class="['PM_font','zhengshu',thisStudent.student.score.certificateType == 'A' ? 'Azheng' : 'Bzheng']"
<!-- && 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>
</u-popup>
</view>
</template>
<script>
const classData = require('@/data/classInfoMan.json')
const studentList = require('@/data/manStudentsList.json')
import sutdentScoreList from "./components/sutdent_score_list.vue";
import {
ref,
onMounted
@@ -425,6 +459,8 @@
export default {
data() {
return {
thisStudentScore:undefined, //学生成绩提示框实例
showStudentScoreBlank:false,
scrollTop: 0,
horizontal: 'right',
vertical: 'bottom',
@@ -436,7 +472,7 @@
buttonColor: '#007AFF',
iconColor: '#fff'
},
thisClass: {
showOverBtn: false
},
@@ -523,13 +559,13 @@
onLoad(e) {
uni.hideTabBar();
this.classId = e.id
this.getRealRole()
this.getRealRole()
// this.interval = setInterval(() => {
// if (this.thisClass.id) {
// uni.showLoading({
// title: '加载中'
// })
this.getUserInfo()
this.getUserInfo()
// clearInterval(this.interval)
// console.log('定时清了吗');
// }
@@ -552,7 +588,9 @@ this.getRealRole()
},
components: {
// musicPlay
classInfoWorkBlank,
classInfoWorkBlank,
sutdentScoreList
},
computed: {
...mapState(["userInfo"]),
@@ -612,8 +650,16 @@ this.getRealRole()
},
methods: {
chooseStudent(data){
console.log('xuesheng',data);
this.thisStudentScore = data
this.showStudentScoreBlank = true
// this.thisStudent =
},
closePup() {
this.showStudentBlank = false
this.showStudentScoreBlank = false
this.thisStudentScore = undefined
},
clickTask(item) {
uni.navigateTo({
@@ -764,8 +810,8 @@ this.getRealRole()
});
},
clickStudent(item) {
console.log('item', item);
this.thisStudent = item
console.log('item', item);
this.thisStudent = item
this.showStudentBlank = true
},
getUserInfo() {
@@ -852,7 +898,7 @@ this.getRealRole()
},
closeManager() {
this.showMan = false
},
},
// 获取固定作业的数量
async getHomeWorkLength() {
var list = []
@@ -928,13 +974,43 @@ this.getRealRole()
// 考试周和结班状态下,学员的信息
async getStudentScoreList() {
var list = undefined
await this.$http
.post('book/user/info/' + this.userInfo.id)
await $http.request({
url: "common/class/userScoreList",
method: "POST",
data: {
"classId":46
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
})
.then(res => {
console.log('班状态下,学员的信息', res);
// this.userMsg = res.user
list = studentList
// list = studentList
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
})
list = res.result
}else{
uni.showToast({
title: res.errMsg,
icon: 'none',
duration: 3000
})
}
}).catch(e => {
list = []
uni.showToast({
title: e.errMsg,
icon: 'none',
duration: 3000
})
});
return list
},
@@ -975,8 +1051,11 @@ this.getRealRole()
taskEdit(item) {
console.log('taskEdit'.item);
},
seePaper(val){
console.log('点击了');
seePaper(val) {
// console.log('点击了');
uni.navigateTo({
url: `/pages/miniClass/paperBack?id=${val}`
})
},
// 退出班级 // 踢出班级
outClass(userId) {
@@ -1057,7 +1136,7 @@ this.getRealRole()
this.refresh = false
if (res.code == 0) {
res = classData // 测试数据
// res = classData // 测试数据
this.thisClass = res.result.class
if (!this.showAlert && this.thisClass.state == '3') {
@@ -1472,9 +1551,11 @@ this.getRealRole()
}
}
.zhiliang{
font-size: 28rpx;
}
.zhiliang {
font-size: 28rpx;
}
.showMore {
width: 100%;
text-align: center;
@@ -1819,20 +1900,51 @@ this.getRealRole()
color: #666;
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; border: 1px solid #f1f1f1;
margin-top: 20rpx;
text-align: center; background-color: #fff; padding: 10rpx 20rpx;
.ciyao{color: #999;}
.score{color: #258feb; font-weight: bold; font-size: 36rpx;}
.seePaper{width: 50rpx; height: 50rpx;
image{width: 100%; height: 100%;}
}
}
}
.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;
border: 1px solid #f1f1f1;
margin-top: 20rpx;
text-align: center;
background-color: #fff;
padding: 10rpx 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;