暂存
This commit is contained in:
@@ -4,14 +4,12 @@
|
||||
<z-nav-bar title="班级详情"></z-nav-bar>
|
||||
|
||||
<!-- <view class="" style="background-color: #f4f7ff; min-height: calc(100vh - 200rpx);"> -->
|
||||
<view class="mainContent" v-if="thisClass.id">
|
||||
<!-- <view class="" style="height: 40rpx;">
|
||||
|
||||
</view> -->
|
||||
<view class="mainContent" v-if="thisClass.id">
|
||||
<view :class="['classStatus',
|
||||
this.thisClass.state == 0 ? 'daikai' :'',
|
||||
this.thisClass.state == 1 ? 'xuexizhong' :'',
|
||||
this.thisClass.state == 2 ? 'yijieban' :''
|
||||
thisClass.state == '0' ? 'daikai' :'',
|
||||
thisClass.state == '1' ? 'xuexizhong' :'',
|
||||
thisClass.state == '2' ? 'yijieban' :'',
|
||||
thisClass.state == '3' ? 'kaoshizhou' :''
|
||||
]">
|
||||
{{getClassStatus}}
|
||||
</view>
|
||||
@@ -24,7 +22,7 @@
|
||||
<view class="waitOpen" v-if="thisClass.state == '0'">
|
||||
<text>等待开班</text>
|
||||
</view>
|
||||
<class-infoWork-blank v-else :thisClass="thisClass" :roleCode="roleCode"></class-infoWork-blank>
|
||||
<class-infoWork-blank v-else :thisClass="thisClass" :roleCode="roleCode" :classModel="classModel"></class-infoWork-blank>
|
||||
</view>
|
||||
<view class="mainBox">
|
||||
<view class="">
|
||||
@@ -35,39 +33,113 @@
|
||||
<!-- 学员列表 -->
|
||||
<view class="" v-if="tabId == '2'">
|
||||
<view class="classMateBox" v-show="students.length> 0 ">
|
||||
<uni-section class="mb-10 nobg xueyuanTitle" title="班内学员" type="line" sub-title="">共
|
||||
{{students.length}} 名学员</uni-section>
|
||||
|
||||
<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 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 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>
|
||||
@@ -77,18 +149,18 @@
|
||||
</view>
|
||||
<view class="" v-if="tabId == '0'">
|
||||
<view class="otherItems flex_box">
|
||||
<view class="itt" v-if="thisClass.state == 0">
|
||||
<view class="itt" v-if="thisClass.state == '0'">
|
||||
<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">
|
||||
<view class="itt" v-if="thisClass.state == '2'">
|
||||
<text class="ciyao">结班日期</text>
|
||||
<text
|
||||
class="mainTxt">{{thisClass.endTime.substring(0,10)}}</text>
|
||||
@@ -184,19 +256,51 @@
|
||||
<view class="item">
|
||||
<text><b>电话:</b>{{thisStudent.student.tel}}</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<!-- <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">
|
||||
<uni-fab ref="fab" :pattern="pattern" :content="fabContent" :horizontal="horizontal" :vertical="vertical"
|
||||
:direction="direction" @trigger="fabTrigger" @fabClick="fabClick" />
|
||||
</view> -->
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const classData = require('@/data/classInfoMan.json')
|
||||
const studentList = require('@/data/manStudentsList.json')
|
||||
import classInfoWorkBlank from "@/components/classInfoWorkBlank.vue";
|
||||
import $http from '@/config/requestConfig.js';
|
||||
import {
|
||||
@@ -214,20 +318,7 @@
|
||||
selectedColor: '#7A7E83',
|
||||
buttonColor: '#007AFF',
|
||||
iconColor: '#fff'
|
||||
},
|
||||
fabContent: [{
|
||||
iconPath: '/static/icon/pigai2.png',
|
||||
selectedIconPath: '/static/icon/pigai2.png',
|
||||
text: '发布作业',
|
||||
active: false
|
||||
},
|
||||
{
|
||||
iconPath: '/static/icon/pigai1.png',
|
||||
selectedIconPath: '/static/icon/pigai1.png',
|
||||
text: '发布医案',
|
||||
active: false
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
thisClass: {},
|
||||
students: [],
|
||||
@@ -296,7 +387,7 @@
|
||||
taskHaveMore: false, // 是否还有更多
|
||||
roleCode: [], // 角色数组
|
||||
interval: null,
|
||||
homeWorkList: [],
|
||||
// homeWorkList: [],
|
||||
thisStudent: {},
|
||||
showStudentBlank: false,
|
||||
}
|
||||
@@ -304,17 +395,17 @@
|
||||
onLoad(e) {
|
||||
uni.hideTabBar();
|
||||
this.classId = e.id
|
||||
|
||||
this.interval = setInterval(() => {
|
||||
if (this.thisClass.id) {
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
})
|
||||
this.getRealRole()
|
||||
// this.interval = setInterval(() => {
|
||||
// if (this.thisClass.id) {
|
||||
// uni.showLoading({
|
||||
// title: '加载中'
|
||||
// })
|
||||
this.getUserInfo()
|
||||
clearInterval(this.interval)
|
||||
console.log('定时清了吗');
|
||||
}
|
||||
}, 500)
|
||||
// clearInterval(this.interval)
|
||||
// console.log('定时清了吗');
|
||||
// }
|
||||
// }, 500)
|
||||
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
@@ -382,6 +473,9 @@
|
||||
case '2':
|
||||
_roleName = '已结班';
|
||||
break;
|
||||
case '3':
|
||||
_roleName = '考试周';
|
||||
break;
|
||||
}
|
||||
return _roleName
|
||||
}
|
||||
@@ -414,7 +508,7 @@
|
||||
url: "common/class/getUserRole",
|
||||
method: "POST",
|
||||
data: {
|
||||
"classId": this.thisClass.id
|
||||
"classId": this.classId
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
@@ -422,7 +516,7 @@
|
||||
})
|
||||
.then((res) => {
|
||||
uni.hideLoading()
|
||||
console.log('res获取身份信息', this.thisClass.id, res);
|
||||
console.log('res获取身份信息', res);
|
||||
this.roleCode = res.result
|
||||
}).catch(e => {
|
||||
uni.hideLoading()
|
||||
@@ -543,10 +637,8 @@
|
||||
if (this.userInfo.id != undefined) {
|
||||
this.$http.post("common/user/getUserInfo").then((res) => {
|
||||
uni.hideLoading()
|
||||
this.userMes = res.result;
|
||||
this.isMonitor = res.isMonitor
|
||||
this.isDirector = res.isDirector
|
||||
this.getRealRole()
|
||||
this.userMes = res.result;
|
||||
// this.getRealRole()
|
||||
|
||||
}).catch(e => {
|
||||
uni.hideLoading()
|
||||
@@ -618,122 +710,7 @@
|
||||
closeManager() {
|
||||
this.showMan = false
|
||||
},
|
||||
fabClick() {
|
||||
// uni.showToast({
|
||||
// title: '点击了悬浮按钮',
|
||||
// icon: 'none'
|
||||
// })
|
||||
},
|
||||
fabTrigger(e) {
|
||||
console.log(e)
|
||||
this.fabContent[e.index].active = !e.item.active
|
||||
var _url = '/pages/miniClass/addHomeWork'
|
||||
var _type = '0'
|
||||
if (e.index == 0) {
|
||||
// 发布作业/医案
|
||||
_type = '0'
|
||||
} else {
|
||||
_type = '1'
|
||||
}
|
||||
this.$refs.fab.close()
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: `${_url}?classId=${this.thisClass.id}&type=${_type}`
|
||||
})
|
||||
}, 200)
|
||||
},
|
||||
// 获取固定作业的数量
|
||||
async getHomeWorkLength() {
|
||||
var list = []
|
||||
await $http.request({
|
||||
url: "common/class/getClassTaskList",
|
||||
method: "POST",
|
||||
data: {
|
||||
"limit": 100,
|
||||
"page": 1,
|
||||
"classId": this.thisClass.id,
|
||||
"type": "0", //类型 0班内任务1医案2心得
|
||||
"title": ""
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
}).then((res) => {
|
||||
// console.log('班内作业的输俩个',res);
|
||||
if (res.code == 0) {
|
||||
list = res.page.records
|
||||
}
|
||||
}).catch(e => {
|
||||
list = []
|
||||
console.log('e', e);
|
||||
})
|
||||
return list
|
||||
},
|
||||
// 改变班级状态
|
||||
changeClassStatu(statusCode) {
|
||||
// var mm = 0
|
||||
// mm = await this.getHomeWorkLength()
|
||||
let that = this
|
||||
if (statusCode == '1') {
|
||||
console.log('this.admins', this.admins);
|
||||
if (this.homeWorkList.length == 0) {
|
||||
uni.showToast({
|
||||
title: '开班前请发布班内作业,开班后将不可添加和更改',
|
||||
icon: 'none',
|
||||
duration: 3000
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.students.length < this.thisClass.number) {
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: '班内成员还没有招满,确定开班操作吗?',
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
that.opClass(statusCode)
|
||||
} else {
|
||||
return
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
} else {
|
||||
that.opClass(statusCode)
|
||||
}
|
||||
|
||||
},
|
||||
// 班级操作
|
||||
opClass(statusCode) {
|
||||
$http.request({
|
||||
url: "common/class/editClass",
|
||||
method: "POST",
|
||||
data: {
|
||||
"id": this.thisClass.id,
|
||||
"title": this.thisClass.title,
|
||||
"qrcode": this.thisClass.qrcode,
|
||||
"state": statusCode, //小班状态0待开班1已开班2完成
|
||||
"icon": this.thisClass.icon,
|
||||
"content": this.thisClass.content,
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
if (res.code == 0) {
|
||||
// that.isHave = true
|
||||
uni.showToast({
|
||||
title: '操作成功',
|
||||
icon: 'success'
|
||||
})
|
||||
setTimeout(() => {
|
||||
this.getClassInfo()
|
||||
}, 500)
|
||||
}
|
||||
}).catch(e => {
|
||||
console.log(e, '数据报错')
|
||||
});
|
||||
},
|
||||
|
||||
taskEdit(item) {
|
||||
console.log('taskEdit'.item);
|
||||
},
|
||||
@@ -742,6 +719,19 @@
|
||||
url: `/pages/miniClass/classCaskList?id=${this.thisClass.id}&type=${this.tijiaoTitleId}`
|
||||
})
|
||||
},
|
||||
// 考试周和结班状态下,学员的信息
|
||||
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
|
||||
},
|
||||
async getClassInfo() {
|
||||
uni.showLoading({
|
||||
title: '正在加载'
|
||||
@@ -760,8 +750,18 @@
|
||||
console.log('res--------', this.classId, res, );
|
||||
this.refresh = false
|
||||
if (res.code == 0) {
|
||||
res = classData // 测试数据
|
||||
this.isHave = res.result.isJoin
|
||||
this.thisClass = res.result.class
|
||||
if (!this.showAlert && this.thisClass.state == '3') {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您好,当前教学进度已进入考试周,请完成平时成绩打分,考试周结束后将无法评分,感谢您对吴门医述教务的大力支持。',
|
||||
confirmText: '好的',
|
||||
showCancel: false
|
||||
})
|
||||
this.showAlert = true
|
||||
}
|
||||
this.admins.list = res.result.admins
|
||||
this.admins.monitor = {}
|
||||
this.admins.dmonitor = {}
|
||||
@@ -793,11 +793,14 @@
|
||||
|
||||
this.classModel = res.result.classModel
|
||||
this.courses = res.result.courses
|
||||
this.students = res.result.students
|
||||
this.refresh = true
|
||||
if (this.thisClass.state == 0) {
|
||||
this.homeWorkList = await this.getHomeWorkLength()
|
||||
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
|
||||
}
|
||||
|
||||
uni.hideLoading()
|
||||
@@ -920,7 +923,9 @@
|
||||
.xuexizhong {
|
||||
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%);
|
||||
}
|
||||
@@ -1102,7 +1107,33 @@
|
||||
background-image: linear-gradient(30deg, #d4eaf0 0%, #d4eaf0 50%, #fdf0ed 100%);
|
||||
min-height: 100vh;
|
||||
}
|
||||
.zhiliang{
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.tips {
|
||||
padding: 20rpx 10rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 10rpx;
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
margin: 20rpx 0;
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
.item {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
margin-right: 10rpx;
|
||||
border-radius: 4rpx;
|
||||
;
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
background-color: #fff;
|
||||
border: 1px solid #999;
|
||||
}
|
||||
}
|
||||
.classMateBox {
|
||||
.zmVip {
|
||||
background-image: linear-gradient(-60deg, #53966a 0%, #e1feef 50%, #e1feef 100%);
|
||||
@@ -1350,7 +1381,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; border: 1px solid #f1f1f1;
|
||||
margin-top: 20rpx;
|
||||
text-align: center; background-color: #fff; padding: 10rpx 20rpx;
|
||||
.ciyao{color: #999; font-size: 28rpx;}
|
||||
.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;
|
||||
|
||||
Reference in New Issue
Block a user