合并前
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<view>
|
||||
<public-module></public-module>
|
||||
<z-nav-bar title="班级详情"></z-nav-bar>
|
||||
<text class="small_btn retake border_radius_10" @click="goTest()">再考一次</text>
|
||||
<!-- <text class="small_btn retake border_radius_10" @click="goTest()">再考一次</text> -->
|
||||
<view class="mainContent" v-if="thisClass.id">
|
||||
<view :class="['classStatus',
|
||||
thisClass.state == '0' ? 'daikai' :'',
|
||||
@@ -40,7 +40,31 @@
|
||||
<view><text class="ciyao">管理成员</text><text class="mainTxt" @click="seeManager">点击查看</text></view>
|
||||
</view>
|
||||
<view class="pingfenBox testBox"
|
||||
v-if="(thisClass.state == '3' || thisClass.state == '2') && classModel.isExam == 1">
|
||||
v-if="thisClass.state == '2'">
|
||||
<view class="scoreTitle">
|
||||
<view class="titles flex_box">
|
||||
<text>总成绩</text>
|
||||
<!-- <uni-icons type="help" size="18" color="#fff"
|
||||
@click="showTestTips = true"></uni-icons> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="optionsBox" v-if="thisClass.state == '3'">
|
||||
<!-- v-show="thisClass.state == '2'" -->
|
||||
<view class="chengji">
|
||||
<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>
|
||||
<!-- <view style="margin-top: 20rpx;">总成绩为:<text class="scoreNumber greenScore">90</text>分 <text
|
||||
class="c999">(50考试分+40平时表现分)</text></view> -->
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<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"
|
||||
@@ -84,21 +108,9 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- v-show="thisClass.state == '2'" -->
|
||||
<view class="chengji" >
|
||||
<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>
|
||||
<!-- <view style="margin-top: 20rpx;">总成绩为:<text class="scoreNumber greenScore">90</text>分 <text
|
||||
class="c999">(50考试分+40平时表现分)</text></view> -->
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="pingfenBox" v-if="thisClass.state != 0">
|
||||
<view class="pingfenBox" v-if="thisClass.state == '1' || thisClass.state == '3'">
|
||||
<view class="scoreTitle">
|
||||
<view class="titles flex_box">
|
||||
<text>表现分</text><uni-icons type="help" size="18" color="#fff" @click="clickHelp"></uni-icons>
|
||||
@@ -175,67 +187,75 @@
|
||||
班内问答
|
||||
</view> -->
|
||||
<!-- 班内同学 -->
|
||||
<view class="classMateBox" v-show="students.length> 0 && tabId == '2'">
|
||||
<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="" v-if="thisClass.state == '3' || thisClass.state == '2'">
|
||||
<view class="scoreBox flex_box ">
|
||||
<view class="item1">
|
||||
<view class="ciyao">
|
||||
平时成绩
|
||||
</view>
|
||||
<text class="score">{{item.student.score.peacetimeScore}}</text>
|
||||
<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>
|
||||
<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>
|
||||
<template v-if="classModel.isExam == 1 && thisClass.state == '2'">
|
||||
<template v-if="item.student.score.testScore.length == 0">
|
||||
<view class="item1">
|
||||
<view class="ciyao">
|
||||
考试成绩
|
||||
</view>
|
||||
<text class="score">0</text>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<view class="item1">
|
||||
<view class="ciyao">
|
||||
考试成绩
|
||||
</view>
|
||||
<text class="score">{{item.student.score.testScoreNumber}} </text>
|
||||
</view>
|
||||
</template>
|
||||
</template>
|
||||
</view>
|
||||
<!-- <view class="" v-if="thisClass.state == '3' || thisClass.state == '2'">
|
||||
<view class="scoreBox flex_box ">
|
||||
<view class="item1">
|
||||
<view class="ciyao">
|
||||
平时成绩
|
||||
</view>
|
||||
<text class="score">{{item.student.score.peacetimeScore}}</text>
|
||||
</view>
|
||||
<template v-if="classModel.isExam == 1 && thisClass.state == '2'">
|
||||
<template v-if="item.student.score.testScore.length == 0">
|
||||
<view class="item1">
|
||||
<view class="ciyao">
|
||||
考试成绩
|
||||
</view>
|
||||
<text class="score">0</text>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<view class="item1">
|
||||
<view class="ciyao">
|
||||
考试成绩
|
||||
</view>
|
||||
<text class="score">{{item.examScore}} </text>
|
||||
</view>
|
||||
</template>
|
||||
</template>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="" v-show="students.length == 0 && tabId == '2'">
|
||||
<u-divider text="暂无学员加入"></u-divider>
|
||||
</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>
|
||||
</template>
|
||||
<view class="" v-else>
|
||||
<u-divider text="暂无学员加入"></u-divider>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<!-- {{getTijiaoTitleList}} -->
|
||||
<!-- 班内提交 -->
|
||||
<view class="" v-if="tabId == '3' && thisClass.state != '0'">
|
||||
|
||||
|
||||
<view class="flex_box tijiaoTitle">
|
||||
<text :class="tijiaoTitleId == item.id ? 'active' :''" @click="titleClick(item,index)"
|
||||
v-for="(item, index) in tijiaoTitleList" :key="index">{{item.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 班内任务 --><!-- 医案 --> <!-- 心得 -->
|
||||
<view class="">
|
||||
<view class="" v-if="tijiaoTitleId == 2 && thisClass.state == '1' && roleCode.includes('0')">
|
||||
@@ -424,8 +444,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const classData = require('@/data/classInfoMan.json')
|
||||
const studentList = require('@/data/manStudentsList.json')
|
||||
import sutdentScoreList from "./components/sutdent_score_list.vue";
|
||||
import $http from '@/config/requestConfig.js';
|
||||
import {
|
||||
mapState
|
||||
@@ -609,11 +628,11 @@
|
||||
this.getList()
|
||||
uni.stopPullDownRefresh()
|
||||
},
|
||||
async onShow() {
|
||||
async onShow() {
|
||||
console.log('this.curTagIndex', this.curTagIndex);
|
||||
var ss = await this.getClassInfo()
|
||||
this.curTagIndex = 0
|
||||
this.getScore()
|
||||
this.getScore()
|
||||
if (this.thisClass.state == '3' || this.thisClass.state == '2') {
|
||||
var ll = await this.getPaperList()
|
||||
console.log('this.paperList.length', this.paperList.length);
|
||||
@@ -633,14 +652,14 @@
|
||||
// paperData = await this.getlocaltestInfo('paperEndTime')
|
||||
var historyPaper = await this.getingPaper()
|
||||
this.ingPaper = historyPaper
|
||||
console.log('对比',historyPaper.classId , this.classId);
|
||||
if(historyPaper && historyPaper.classId == this.classId){
|
||||
paperEndTime = this.hourUp(historyPaper.startTime,1) // 结束的时间戳
|
||||
console.log('对比', historyPaper.classId, this.classId);
|
||||
if (historyPaper && historyPaper.classId == this.classId) {
|
||||
paperEndTime = this.hourUp(historyPaper.startTime, 1) // 结束的时间戳
|
||||
this.examId = historyPaper.id
|
||||
}else{
|
||||
} else {
|
||||
this.examId = undefined
|
||||
paperEndTime = 0
|
||||
}
|
||||
}
|
||||
severNowTime = await this.getServerTime()
|
||||
// console.log('//////////////', paperEndTime, severNowTime);
|
||||
if (severNowTime > -1 && paperEndTime - severNowTime > 0) {
|
||||
@@ -654,9 +673,12 @@
|
||||
this.showCountDown = false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
components: {
|
||||
sutdentScoreList
|
||||
},
|
||||
computed: {
|
||||
...mapState(["userInfo"]),
|
||||
getClassStatus() {
|
||||
@@ -727,6 +749,11 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 选中了学生
|
||||
chooseStudent(data){
|
||||
return
|
||||
console.log('xuesheng',data);
|
||||
},
|
||||
// 获取服务器时间
|
||||
async getServerTime() {
|
||||
var time = 0
|
||||
@@ -810,38 +837,45 @@
|
||||
},
|
||||
// 查询考试成绩
|
||||
getPaperScore() {
|
||||
console.log('获取卷面成绩');
|
||||
console.log('获取卷面成绩');
|
||||
},
|
||||
// 考试周和结班状态下,学员的信息
|
||||
async getStudentScoreList() {
|
||||
var list = undefined
|
||||
await $http.request({
|
||||
url: "common/class/userScoreList",
|
||||
method: "POST",
|
||||
data: {
|
||||
"classId": this.classId
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
})
|
||||
await $http.request({
|
||||
url: "common/class/userScoreList",
|
||||
method: "POST",
|
||||
data: {
|
||||
"classId": parseInt(this.classId)
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
console.log('班状态下,学员的信息',res);
|
||||
console.log('班状态下,学员的信息', res);
|
||||
// this.userMsg = res.user
|
||||
list = studentList
|
||||
// if(res.code == 0){
|
||||
// list = res.result
|
||||
// }else{
|
||||
// uni.showToast({
|
||||
// title: res.errMsg,
|
||||
// icon: 'none',
|
||||
// duration: 3000
|
||||
// })
|
||||
// }
|
||||
// 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: res.errMsg,
|
||||
title: e.errMsg,
|
||||
icon: 'none',
|
||||
duration: 3000
|
||||
})
|
||||
@@ -849,12 +883,12 @@
|
||||
return list
|
||||
},
|
||||
goTest() {
|
||||
if(this.ingPaper){
|
||||
if (this.ingPaper) {
|
||||
uni.showModal({
|
||||
title:'提示',
|
||||
content:'您有一项正在进行中的考试,请完成后再开启本班级的考试',
|
||||
showCancel:false,
|
||||
confirmText:'好的'
|
||||
title: '提示',
|
||||
content: '您有一项正在进行中的考试,请完成后再开启本班级的考试',
|
||||
showCancel: false,
|
||||
confirmText: '好的'
|
||||
})
|
||||
return
|
||||
}
|
||||
@@ -996,25 +1030,24 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
async getingPaper(){
|
||||
var obj = undefined
|
||||
await $http.request({
|
||||
url: "common/classExam/examingPaper",
|
||||
method: "POST",
|
||||
data: {},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
})
|
||||
.then(async (res) => {
|
||||
console.log('考试中',res);
|
||||
if (res.code == 0 && res.classExamUser != null) {
|
||||
obj = res.classExamUser
|
||||
}
|
||||
}).catch(e => {
|
||||
});
|
||||
return obj
|
||||
|
||||
async getingPaper() {
|
||||
var obj = undefined
|
||||
await $http.request({
|
||||
url: "common/classExam/examingPaper",
|
||||
method: "POST",
|
||||
data: {},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
})
|
||||
.then(async (res) => {
|
||||
console.log('考试中', res);
|
||||
if (res.code == 0 && res.classExamUser != null) {
|
||||
obj = res.classExamUser
|
||||
}
|
||||
}).catch(e => {});
|
||||
return obj
|
||||
|
||||
},
|
||||
// 获取本地试卷信息
|
||||
getList() {
|
||||
@@ -1129,15 +1162,15 @@
|
||||
}
|
||||
|
||||
},
|
||||
hourUp(start,e) {
|
||||
hourUp(start, e) {
|
||||
// 比现在多几个小时
|
||||
// var end = Date.now()
|
||||
var startTimeDate = new Date(start)
|
||||
var startTime = startTimeDate.getTime();
|
||||
var step = 1000 * 60 * 60 * e // 时间间隔
|
||||
var step = 1000 * 60 * 60 * e // 时间间隔
|
||||
var interval = startTime + step; //开始 + 时长 = 结束的毫秒数
|
||||
// var a = new Date(interval)
|
||||
console.log('aaaaaaaaaa结束时间的毫秒数,时间戳',interval);
|
||||
console.log('aaaaaaaaaa结束时间的毫秒数,时间戳', interval);
|
||||
return interval
|
||||
},
|
||||
formatRichText(html) {
|
||||
@@ -1371,8 +1404,8 @@
|
||||
.then(async res => {
|
||||
this.refresh = false
|
||||
if (res.code == 0) {
|
||||
res = classData // 测试数据
|
||||
this.isHave = res.result.isJoin
|
||||
// res = classData // 测试数据
|
||||
this.isHave = res.result.isJoin
|
||||
this.thisClass = res.result.class
|
||||
if (this.thisClass.state == '0') {
|
||||
this.tabId = '0'
|
||||
|
||||
Reference in New Issue
Block a user