暂存
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<view>
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<public-module></public-module>
|
||||
<z-nav-bar title="我的班级管理员页面">
|
||||
<z-nav-bar title="我的班级管理">
|
||||
|
||||
</z-nav-bar>
|
||||
<!-- <view class="tabsBox" :class="[fixed ? 'fixed' : '' ]">
|
||||
@@ -319,11 +319,11 @@
|
||||
this.preClassList = []
|
||||
}
|
||||
}
|
||||
uni.hideLoading()
|
||||
// uni.hideLoading()
|
||||
this.getData()
|
||||
}).catch(e => {
|
||||
uni.hideLoading()
|
||||
this.getData()
|
||||
// uni.hideLoading()
|
||||
// this.getData()
|
||||
console.log(e, '数据报错')
|
||||
// this.status = 3
|
||||
uni.showToast({
|
||||
|
||||
@@ -267,6 +267,8 @@
|
||||
_list = _list.map(item => item.url)
|
||||
// console.log('this.fileList1',_list);
|
||||
this.form.img = _list.join(',')
|
||||
}else{
|
||||
this.form.img = ''
|
||||
}
|
||||
var _url = ""
|
||||
this.form.id ? _url = "common/class/editClassTask" : _url = "common/class/addClassTask"
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
]">
|
||||
{{getClassStatus}}
|
||||
</view>
|
||||
<h3 style="margin-top: 20rpx; font-size: 28rpx;">班级名称:{{thisClass.title}}</h3>
|
||||
<view class="welComeText">
|
||||
<text>【 班内职务:{{getRoleName}} 】</text>
|
||||
</view>
|
||||
@@ -129,7 +130,7 @@
|
||||
<rich-text class="banjiJianjie" :nodes="formatRichText(thisClass.content)"></rich-text>
|
||||
<view class="qrcode" v-if="thisClass.qrcode != ''">
|
||||
<uni-section class="mb-10 nobg" title="群二维码" type="line"></uni-section>
|
||||
<image :src="thisClass.qrcode" mode="widthFix"></image>
|
||||
<image :src="thisClass.qrcode" mode="widthFix" @click="previewImage(thisClass.qrcode)"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -313,13 +314,13 @@
|
||||
beforeDestroy() {
|
||||
clearInterval(this.interval)
|
||||
},
|
||||
onBackPress() {
|
||||
if (this.$refs.fab.isShow) {
|
||||
this.$refs.fab.close()
|
||||
return true
|
||||
}
|
||||
return false
|
||||
},
|
||||
// onBackPress() {
|
||||
// if (this.$refs.fab.isShow) {
|
||||
// this.$refs.fab.close()
|
||||
// return true
|
||||
// }
|
||||
// return false
|
||||
// },
|
||||
onShow() {
|
||||
this.getClassInfo()
|
||||
|
||||
@@ -469,6 +470,18 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
previewImage(url) {
|
||||
console.log(url);
|
||||
uni.previewImage({
|
||||
urls: [url],
|
||||
// longPressActions: {
|
||||
// itemList: ["很抱歉,暂不支持保存图片到本地"],
|
||||
// success: function(res) {
|
||||
// // console.log(res,'+++++')
|
||||
// },
|
||||
// },
|
||||
});
|
||||
},
|
||||
titleClick(item, textIndex) {
|
||||
this.tijiaoTitleId = textIndex
|
||||
console.log('e班内提交子按钮');
|
||||
@@ -507,6 +520,7 @@
|
||||
// 获取个人信息
|
||||
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
|
||||
@@ -520,6 +534,7 @@
|
||||
|
||||
}
|
||||
}).catch(e => {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '获取用户信息失败',
|
||||
icon: 'none'
|
||||
@@ -615,7 +630,7 @@
|
||||
// 改变班级状态
|
||||
changeClassStatu(statusCode) {
|
||||
if (statusCode == '1') {
|
||||
// console.log('this.admins',this.admins);
|
||||
console.log('this.admins',this.admins);
|
||||
if (this.admins.list.length == 0) {
|
||||
uni.showToast({
|
||||
title: '请先完成管理人员的设置',
|
||||
@@ -630,6 +645,7 @@
|
||||
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,
|
||||
@@ -652,10 +668,10 @@
|
||||
}).catch(e => {
|
||||
console.log(e, '数据报错')
|
||||
// this.status = 3
|
||||
uni.showToast({
|
||||
title: e.msg,
|
||||
icon: 'error'
|
||||
})
|
||||
// uni.showToast({
|
||||
// title: e.msg,
|
||||
// icon: 'error'
|
||||
// })
|
||||
});
|
||||
},
|
||||
taskEdit(item) {
|
||||
@@ -739,6 +755,7 @@
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
console.log('res--------',this.classId,res,);
|
||||
this.refresh = false
|
||||
if (res.code == 0) {
|
||||
this.isHave = res.result.isJoin
|
||||
@@ -800,7 +817,7 @@
|
||||
}
|
||||
|
||||
.welComeText {
|
||||
|
||||
font-size: 28rpx;
|
||||
padding:20rpx 0;
|
||||
color: #e58d44;
|
||||
}
|
||||
|
||||
@@ -227,9 +227,9 @@
|
||||
|
||||
this.status = 1
|
||||
this.flag = false
|
||||
uni.showLoading({
|
||||
title:'正在加载'
|
||||
})
|
||||
// uni.showLoading({
|
||||
// title:'正在加载'
|
||||
// })
|
||||
$http.request({
|
||||
url: "common/class/getClassByDirectorid",
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
@@ -264,9 +264,9 @@
|
||||
// console.log('status', this.status)
|
||||
this.flag = true
|
||||
}
|
||||
uni.hideLoading()
|
||||
// uni.hideLoading()
|
||||
}).catch(e => {
|
||||
uni.hideLoading()
|
||||
// uni.hideLoading()
|
||||
this.flag = true
|
||||
console.log(e, '数据报错')
|
||||
// this.status = 3
|
||||
|
||||
@@ -56,8 +56,9 @@
|
||||
<text v-if="item.createUser.nickname != '' && item.createUser.nickname != null">匿名用户</text>
|
||||
<text v-else>匿名用户</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="editBtn" v-if="listDisplay == '1' && item.scoreSuccess == 0">
|
||||
</view>
|
||||
<!-- <view class="editBtn" v-if="listDisplay == '1' && item.scoreSuccess == 0"> -->
|
||||
<view class="editBtn" v-if="listDisplay == '1' && item.scoreSuccess == 0 && item.scoreInfo == ''">
|
||||
<text @click="editOrAdd(item)">修改</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -262,18 +263,58 @@
|
||||
deletePic(event) {
|
||||
this.fileList1.splice(event.index, 1)
|
||||
},
|
||||
getHomeWorkDetail(id){
|
||||
uni.showLoading({
|
||||
title:"加载中"
|
||||
})
|
||||
$http.request({
|
||||
url: 'common/class/getClassTaskAndQuesReplyInfo',
|
||||
method: "POST",
|
||||
data: {
|
||||
"replyId":id, //0全部作业1我的作业
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
if(res.classTaskAndQuesReply){
|
||||
console.log('作业详情res',res);
|
||||
this.form = res.classTaskAndQuesReply
|
||||
this.fileList1 = []
|
||||
if(res.classTaskAndQuesReply.img != ''){
|
||||
var _imgList = res.classTaskAndQuesReply.img.split(',')
|
||||
_imgList.forEach(item => {
|
||||
this.fileList1.push({url:item})
|
||||
})
|
||||
}
|
||||
// this.fileList1 = [...res.classTaskAndQuesReply.fileList]
|
||||
console.log('fileList4545',this.fileList1);
|
||||
this.showEditBlank = true
|
||||
}else{
|
||||
this.form = {}
|
||||
}
|
||||
|
||||
uni.hideLoading()
|
||||
}).catch(e => {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '获取作业详情失败',
|
||||
icon:'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
editOrAdd(item){
|
||||
console.log('item', item);
|
||||
if(item){
|
||||
this.form = item
|
||||
this.fileList1 = [...item.fileList]
|
||||
console.log('fileList4545',item.fileList);
|
||||
this.getHomeWorkDetail(item.id)
|
||||
}
|
||||
else{
|
||||
console.log('form', this.form);
|
||||
this.showEditBlank = true
|
||||
}
|
||||
|
||||
this.showEditBlank = true
|
||||
|
||||
},
|
||||
radioChange1(e){
|
||||
|
||||
@@ -376,22 +417,31 @@
|
||||
},
|
||||
onSubmit() {
|
||||
this.$refs.form.validate().then(res => {
|
||||
|
||||
if (this.fileList1.length > 0) {
|
||||
let _list = this.fileList1
|
||||
_list = _list.map(item => item.url)
|
||||
// console.log('this.fileList1',_list);
|
||||
this.form.img = _list.join(',')
|
||||
}else{
|
||||
this.form.img = ''
|
||||
}
|
||||
var _url = ""
|
||||
this.form.id ? _url =
|
||||
'common/class/editClassTaskReply' : _url = 'common/class/addClassTaskReply'
|
||||
'common/class/editClassTaskAndQuesReply' : _url = 'common/class/addClassTaskAndQuesReply'
|
||||
// this.form.id ? _url =
|
||||
// 'common/class/editClassTaskReply' : _url = 'common/class/addClassTaskReply'
|
||||
|
||||
|
||||
var data = {
|
||||
"taskId": this.form.id ? undefined : this.form.taskId,
|
||||
"relationId": this.form.id ? undefined : this.form.taskId,
|
||||
"id": this.form.id,
|
||||
"type": this.thisTask.type == '0' || this.thisTask.type == '1' ? '0' : '1', //类型0任务1课后题
|
||||
"display": this.form.display, //0不展示1展示
|
||||
"content": this.form.content,
|
||||
"img": this.form.img
|
||||
"img": this.form.img
|
||||
}
|
||||
|
||||
console.log('data',data);
|
||||
$http.request({
|
||||
url: _url,
|
||||
|
||||
@@ -37,28 +37,28 @@
|
||||
:src="item.createUser.avatar" mode="aspectFit"></image>
|
||||
<image v-else src="/static/icon/morenAvavter.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="userName flex_box">
|
||||
<view class="userName flex_box">
|
||||
<text
|
||||
v-if="item.createUser.nickname != '' && item.createUser.nickname != null">匿名用户</text>
|
||||
v-if="item.createUser.nickname != '' && item.createUser.nickname != null">{{item.createUser.nickname}}</text>
|
||||
<text v-else>匿名用户</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="leve2">
|
||||
<!-- <view class="imgBox flex_box" v-if="item.fileList.length > 0">
|
||||
<view class="itemImg" v-for="(item, index) in item.fileList" :key="index">
|
||||
<image @click="previewImage(item.url)" :src="item.url" mode="widthFix"></image>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="leve2">
|
||||
<view class="">
|
||||
{{item.content}}
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="" style="margin-top: 20rpx;">
|
||||
<view class="score" v-if="item.scoreSuccess == 1">
|
||||
分数:{{item.score}}
|
||||
</view>
|
||||
<view class="score noscore" v-else>未评分</view>
|
||||
<view class="score noscore" v-else-if="item.scoreInfo != ''">
|
||||
<text v-show="item.scoreInfos < 2 && item.haveGiveScore">等待另一名评分员评分</text>
|
||||
<text v-show="item.scoreInfos < 2 && !item.haveGiveScore">请您评分</text>
|
||||
<button v-show="item.scoreInfos >= 2" class="getScore" @click.stop="getRealScore(item.id)" >生成成绩</button>
|
||||
</view>
|
||||
<view class="score noscore" v-else>未开始评分</view>
|
||||
<view class="date">
|
||||
{{item.createTime}}
|
||||
</view>
|
||||
@@ -92,7 +92,7 @@
|
||||
<view class="date">
|
||||
日期:{{curReplay.createTime}}
|
||||
</view>
|
||||
<view class="" v-if="curReplay.createUser" style="color: #999;padding: 10rpx 0;">
|
||||
<view class="" v-if="curReplay.createUser" style="color: #999;padding: 10rpx 0; font-size: 26rpx;">
|
||||
学员信息:{{curReplay.createUser.nickname != null && curReplay.createUser.nickname != '' ? curReplay.createUser.nickname : '匿名用户'}}
|
||||
/ {{curReplay.createUser.tel}}
|
||||
</view>
|
||||
@@ -102,7 +102,7 @@
|
||||
<view class="score noscore" v-show="curReplay.scoreSuccess == 0">
|
||||
未评分
|
||||
</view>
|
||||
<template v-if="roleCode.includes('4') || roleCode.includes('5')">
|
||||
<template v-if="roleCode.includes('4') && curReplay.scoreSuccess != 1 || roleCode.includes('5') && curReplay.scoreSuccess != 1">
|
||||
<view class="" style="background-color: beige; padding: 10rpx 10rpx; margin-top: 20rpx;">
|
||||
<uni-forms :modelValue="form" :rules="rules" ref="form">
|
||||
<uni-forms-item label="分数" name="score" >
|
||||
@@ -110,7 +110,9 @@
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
</view>
|
||||
<view class="btn_box"><button @click="onSubmit">提 交</button></view>
|
||||
<view class="btn_box ">
|
||||
<button class="submit" @click="onSubmit">提 交</button>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
@@ -189,6 +191,9 @@
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.pPage = 0
|
||||
this.zuoyeList = []
|
||||
this.getReplayList()
|
||||
// this.getTaskInfo()
|
||||
uni.stopPullDownRefresh()
|
||||
},
|
||||
@@ -206,6 +211,47 @@
|
||||
...mapState(["userInfo"]),
|
||||
},
|
||||
methods: {
|
||||
// 生成成绩
|
||||
getRealScore(id){
|
||||
uni.showLoading({
|
||||
title:'正在处理'
|
||||
})
|
||||
$http.request({
|
||||
url: "common/class/generateScore",
|
||||
method: "POST",
|
||||
data: {
|
||||
"replyId": id
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
if (res.code == 0) {
|
||||
uni.showToast({
|
||||
title: '成绩已生成',
|
||||
icon: 'success'
|
||||
})
|
||||
|
||||
}
|
||||
setTimeout(()=>{
|
||||
this.closePup()
|
||||
this.pPage = 0
|
||||
this.zuoyeList = []
|
||||
this.getReplayList()
|
||||
uni.hideLoading()
|
||||
},500)
|
||||
|
||||
}).catch(e => {
|
||||
uni.hideLoading()
|
||||
console.log(e, '数据报错')
|
||||
// this.status = 3
|
||||
uni.showToast({
|
||||
title: '成绩生成失败',
|
||||
icon: 'error'
|
||||
})
|
||||
});
|
||||
},
|
||||
// 获取医案任务详情
|
||||
getTaskInfo() {
|
||||
$http.request({
|
||||
@@ -258,15 +304,67 @@
|
||||
deletePic(event) {
|
||||
this.fileList1.splice(event.index, 1)
|
||||
},
|
||||
getHomeWorkDetail(id){
|
||||
uni.showLoading({
|
||||
title:"加载中"
|
||||
})
|
||||
$http.request({
|
||||
url: 'common/class/getClassTaskAndQuesReplyInfo',
|
||||
method: "POST",
|
||||
data: {
|
||||
"replyId":id, //0全部作业1我的作业
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
if(res.classTaskAndQuesReply){
|
||||
console.log('作业详情res',res);
|
||||
this.curReplay = res.classTaskAndQuesReply
|
||||
this.form.id = res.classTaskAndQuesReply.id
|
||||
this.fileList1 = []
|
||||
if(res.classTaskAndQuesReply.img != ''){
|
||||
var _imgList = res.classTaskAndQuesReply.img.split(',')
|
||||
_imgList.forEach(item => {
|
||||
this.fileList1.push({url:item})
|
||||
})
|
||||
}
|
||||
if(res.classTaskAndQuesReply.scoreInfo != ''){
|
||||
this.curReplay.scoreInfo = JSON.parse(res.classTaskAndQuesReply.scoreInfo)
|
||||
}else{
|
||||
this.curReplay.scoreInfo = {}
|
||||
}
|
||||
if(this.curReplay.scoreInfo != {}){
|
||||
for (let k in this.curReplay.scoreInfo){
|
||||
console.log(k)
|
||||
if(k == this.userInfo.id){
|
||||
this.form.score = this.curReplay.scoreInfo[k]
|
||||
this.form.hasGiveScore = true
|
||||
break
|
||||
}
|
||||
// console.log(this.curReplay.scoreInfo[k])
|
||||
}
|
||||
}
|
||||
console.log('this.curReplay.scoreInfo',this.curReplay.scoreInfo);
|
||||
this.showEditBlank = true
|
||||
}else{
|
||||
this.curReplay = {}
|
||||
this.closePup()
|
||||
}
|
||||
uni.hideLoading()
|
||||
}).catch(e => {
|
||||
this.showEditBlank = false
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '获取数据失败',
|
||||
icon:'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
editOrAdd(item) {
|
||||
console.log('item', item);
|
||||
this.curReplay = item
|
||||
this.form = {...item}
|
||||
if(this.form.scoreSuccess == 0){
|
||||
this.form.score = undefined
|
||||
}
|
||||
this.fileList1 = [...item.fileList]
|
||||
this.showEditBlank = true
|
||||
// console.log('item', item);
|
||||
this.getHomeWorkDetail(item.id)
|
||||
},
|
||||
radioChange1(e) {
|
||||
this.listDisplay = e.detail.value
|
||||
@@ -317,6 +415,8 @@
|
||||
if (res.page.records.length > 0) {
|
||||
var list = res.page.records
|
||||
list.forEach(item => {
|
||||
item.scoreInfos = 0
|
||||
item.haveGiveScore = false
|
||||
item.fileList = []
|
||||
if (item.img != '') {
|
||||
var _urs = item.img.split(',')
|
||||
@@ -326,7 +426,22 @@
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
console.log('item.scoreInfo',item.scoreInfo);
|
||||
if(item.scoreInfo != ""){
|
||||
var i = 0
|
||||
for(var kk in JSON.parse(item.scoreInfo)){
|
||||
console.log(kk);
|
||||
if(kk == this.userInfo.id){
|
||||
item.haveGiveScore = true
|
||||
}
|
||||
i++
|
||||
}
|
||||
item.scoreInfos = i
|
||||
}
|
||||
console.log('item.scoreInfos',item.scoreInfos, item.haveGiveScore);
|
||||
})
|
||||
|
||||
this.zuoyeList = this.zuoyeList.concat(list)
|
||||
console.log('chulihoude ', this.zuoyeList);
|
||||
if (res.page.pages > this.pPage) {
|
||||
@@ -479,6 +594,14 @@
|
||||
<style lang="scss" scoped>
|
||||
@import "@/style/mixin.scss";
|
||||
::v-deep .uni-forms-item{margin-bottom: 0 !important;}
|
||||
// .btn_box{ justify-content: space-between;
|
||||
// button{display: block; width: 46%;}
|
||||
// }
|
||||
.getScore{
|
||||
display: inline-block; font-weight: normal; color: #fff; padding: 4rpx 10rpx; height: 60rpx;
|
||||
line-height: 50rpx; font-size: 28rpx;
|
||||
background-color: #ffaa7f !important;
|
||||
}
|
||||
.flexbox {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
@@ -226,8 +226,8 @@
|
||||
}
|
||||
|
||||
.leve2 { justify-content: space-between;
|
||||
color: #666; font-size: 24rpx;
|
||||
b{font-size: 34rpx; padding: 0 4rpx; font-weight: normal;}
|
||||
color: #999; font-size: 24rpx;
|
||||
b{font-size: 34rpx; padding: 0 4rpx; font-weight: normal; color: #333;}
|
||||
.item{text-align: center; padding-top: 0; padding-bottom: 0; margin-bottom: 0;}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<view class="taskContent" v-html="thisTask.content">
|
||||
|
||||
</view>
|
||||
<view class="date" style="color: #999; text-align: right;">
|
||||
<view class="date" style="color: #999; text-align: right; font-size: 26rpx;">
|
||||
提交时间:{{thisTask.createTime}}
|
||||
</view>
|
||||
</view>
|
||||
@@ -301,6 +301,8 @@
|
||||
_list = _list.map(item => item.url)
|
||||
// console.log('this.fileList1',_list);
|
||||
this.form.img = _list.join(',')
|
||||
}else{
|
||||
this.form.img = ''
|
||||
}
|
||||
var _url = ""
|
||||
this.form.id ? _url =
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
未评分
|
||||
</view>
|
||||
<!-- -->
|
||||
<template v-if="roleCode.includes('4') || roleCode.includes('5')">
|
||||
<template v-if="roleCode.includes('4') && curReplay.scoreSuccess != 1 || roleCode.includes('5') && curReplay.scoreSuccess != 1 ">
|
||||
<view class="" style="background-color: beige; padding: 10rpx 10rpx; margin-top: 20rpx;">
|
||||
<uni-forms :modelValue="form" :rules="rules" ref="form">
|
||||
<uni-forms-item label="分数" name="score" >
|
||||
|
||||
Reference in New Issue
Block a user