暂存
This commit is contained in:
@@ -50,17 +50,17 @@
|
||||
},
|
||||
goPingfen(url, classId, type) {
|
||||
uni.navigateTo({
|
||||
url: `${url}?classId=${classId}&type=${type}&roleCode=${this.roleCode}`
|
||||
url: `${url}?classId=${classId}&type=${type}&roleCode=${this.roleCode}&classState=${this.thisClass.state}`
|
||||
})
|
||||
},
|
||||
goSikaoList(url,id){
|
||||
uni.navigateTo({
|
||||
url:`${url}?classId=${id}&roleCode=${this.roleCode}`
|
||||
url:`${url}?classId=${id}&roleCode=${this.roleCode}&classState=${this.thisClass.state}`
|
||||
})
|
||||
},
|
||||
goXindeList(url){
|
||||
uni.navigateTo({
|
||||
url:`${url}?classId=${this.thisClass.id}&type=2&roleCode=${this.roleCode}`
|
||||
url:`${url}?classId=${this.thisClass.id}&type=2&roleCode=${this.roleCode}&classState=${this.thisClass.state}`
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { parse } from 'qs';
|
||||
import $http from '@/config/requestConfig.js';
|
||||
import permission from "@/js_sdk/wa-permission/permission.js"
|
||||
import {
|
||||
@@ -87,6 +88,7 @@
|
||||
content: '', // 描述
|
||||
img: '', //图片
|
||||
type: undefined, // 反馈类型
|
||||
sort:undefined
|
||||
},
|
||||
range:[
|
||||
{ value: '0', text: "班内作业",name:"班内作业"},
|
||||
@@ -129,7 +131,9 @@
|
||||
//第一次加载
|
||||
onLoad(e) {
|
||||
console.log('收到的值', e);
|
||||
|
||||
if(e.sort){
|
||||
this.form.sort = e.sort+''
|
||||
}
|
||||
this.pageType = e.type
|
||||
this.form.classId = e.classId
|
||||
this.form.type = e.type
|
||||
@@ -270,6 +274,20 @@
|
||||
}else{
|
||||
this.form.img = ''
|
||||
}
|
||||
var newSort = undefined
|
||||
console.log('this.sort',this.form.sort);
|
||||
if(this.form.sort != undefined) {
|
||||
console.log('this.sort',this.form.sort);
|
||||
var oldsort = this.form.sort.split('')
|
||||
if(oldsort[oldsort.length-1] == '9'){
|
||||
oldsort.push('0')
|
||||
}else{
|
||||
console.log('符合');
|
||||
oldsort[oldsort.length-1] = ( parseInt(oldsort[oldsort.length-1]) + 1) + ''
|
||||
}
|
||||
newSort = oldsort.join('')
|
||||
}
|
||||
// console.log('this.sort',newSort);
|
||||
var _url = ""
|
||||
this.form.id ? _url = "common/class/editClassTask" : _url = "common/class/addClassTask"
|
||||
$http.request({
|
||||
@@ -282,7 +300,8 @@
|
||||
"display": this.form.display, //0不展示1展示
|
||||
"title": this.form.title,
|
||||
"content": this.form.content,
|
||||
"img": this.form.img
|
||||
"img": this.form.img,
|
||||
"sort": newSort
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
|
||||
@@ -39,15 +39,15 @@
|
||||
<view class="otherItems flex_box userScore">
|
||||
<view>
|
||||
<text class="ciyao">作业得分</text>
|
||||
<text class="ciyao"><i class="mainTxt PM_font">3</i>分</text>
|
||||
<text class="ciyao"><i class="mainTxt PM_font">{{performanceScore.task0Score}}</i>分</text>
|
||||
</view>
|
||||
<view><text class="ciyao">医案得分</text>
|
||||
<text class="ciyao"><i class="mainTxt PM_font">6</i>分</text>
|
||||
<text class="ciyao"><i class="mainTxt PM_font">{{performanceScore.task1Score}}</i>分</text>
|
||||
</view>
|
||||
<view><text class="ciyao">心得得分</text>
|
||||
<text class="ciyao"><i class="mainTxt PM_font">10</i>分</text></view>
|
||||
<text class="ciyao"><i class="mainTxt PM_font">{{performanceScore.experienceScore}}</i>分</text></view>
|
||||
<view><text class="ciyao">思考题分</text>
|
||||
<text class="ciyao"><i class="mainTxt PM_font">2</i>分</text></view>
|
||||
<text class="ciyao"><i class="mainTxt PM_font">{{performanceScore.questionScore}}</i>分</text></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mainBox">
|
||||
@@ -159,7 +159,7 @@
|
||||
</view>
|
||||
<view class="leve3" >
|
||||
<view class="tips flex_box">
|
||||
<text>发布者:{{item.createUser.nickname != null && item.createUser.nickname != '' ? item.createUser.nickname : '匿名用户'}}</text>
|
||||
<!-- <text>发布者:{{item.createUser.nickname != null && item.createUser.nickname != '' ? item.createUser.nickname : '匿名用户'}}</text> -->
|
||||
<text style="" class="date">日期:{{item.createTime}}</text>
|
||||
</view>
|
||||
<view class="">
|
||||
@@ -223,7 +223,7 @@
|
||||
</view>
|
||||
<text v-else>暂未设置</text>
|
||||
</view>
|
||||
<view class="item arryItem"><text class="adminName">记分员:</text>
|
||||
<!-- <view class="item arryItem"><text class="adminName">记分员:</text>
|
||||
<template v-if="admins.counter.length > 0">
|
||||
<view class="arryItemSub" v-for="(item,index) in admins.counter" :key="index">
|
||||
<template v-if="item.user != null">
|
||||
@@ -233,7 +233,7 @@
|
||||
</view>
|
||||
</template>
|
||||
<text v-else>暂未设置</text>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="item arryItem"><text class="adminName">评分员:</text>
|
||||
<template v-if="admins.scorer.length > 0">
|
||||
<view class="arryItemSub" v-for="(item,index) in admins.scorer" :key="index">
|
||||
@@ -368,6 +368,12 @@
|
||||
taskList:[], // 任务列表
|
||||
taskHaveMore:false, // 是否还有更多
|
||||
myExperience:'0',
|
||||
performanceScore:{
|
||||
task1Score: 0,
|
||||
experienceScore: 0,
|
||||
task0Score: 0,
|
||||
questionScore: 0
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
@@ -395,7 +401,7 @@
|
||||
},
|
||||
onShow() {
|
||||
this.getClassInfo()
|
||||
|
||||
this.getScore()
|
||||
},
|
||||
computed: {
|
||||
...mapState(["userInfo"]),
|
||||
@@ -425,6 +431,35 @@
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 查询平时表现分
|
||||
getScore(){
|
||||
$http.request({
|
||||
url: "common/class/getUserScore",
|
||||
method: "POST",
|
||||
data: {
|
||||
"classId": this.classId
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
if(res.code == 0){
|
||||
this.performanceScore = res.result
|
||||
console.log('this.performanceScore-------',this.performanceScore);
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: '平时成绩获取失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}).catch(e => {
|
||||
uni.showToast({
|
||||
title: '平时成绩获取失败',
|
||||
icon: 'none'
|
||||
})
|
||||
});
|
||||
},
|
||||
editMyXinde(item){
|
||||
// var options = JSON.stringify(item)
|
||||
uni.navigateTo({
|
||||
|
||||
@@ -46,7 +46,14 @@
|
||||
|
||||
<!-- 已开班按钮 -->
|
||||
<view class="optionsBtn" v-if="thisClass.state != '2'">
|
||||
|
||||
<!-- 待开班主任 -->
|
||||
<view class="" v-if="thisClass.state == '0' && (roleCode.includes('主任') || roleCode.includes('副主任'))">
|
||||
<view class="item setBanewei" v-if="thisClass.state != '2'"
|
||||
@click="goSetAdmin('/pages/miniClass/memberSet')">
|
||||
<text>设置班委</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 待开班班长 -->
|
||||
<view class="stepBox" v-if="thisClass.state == '0' && (roleCode.includes('1') || roleCode.includes('2'))">
|
||||
<h3 class="PM_font threeStepTitle">3步操作快速开班</h3>
|
||||
<view class="flex_box item">
|
||||
@@ -60,19 +67,26 @@
|
||||
@click="goSetAdmin('/pages/miniClass/memberSet')">
|
||||
<text>去设置</text>
|
||||
</view>
|
||||
<view class="item setBanewei" v-else>
|
||||
<text>已完成</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex_box item">
|
||||
<i class="PM_font stepItem">2.</i>
|
||||
<view class="textBox">
|
||||
<text class="PM_font">发布作业</text><br/>
|
||||
<text class="PM_font">作业设置</text><br/>
|
||||
<span>根据教学时长,至少发布{{thisClass.homeWorkNumber}}条作业</span>
|
||||
</view>
|
||||
<view class="btn">
|
||||
<!-- -->
|
||||
<view class="item fabuhomework" v-if="homeWorkList.length < thisClass.homeWorkNumber "
|
||||
@click="goTaskListForWait('0')">
|
||||
<text>去设置</text>
|
||||
</view>
|
||||
<view class="item fabuhomework" v-else>
|
||||
<text>已完成</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex_box item">
|
||||
@@ -81,13 +95,13 @@
|
||||
<text class="PM_font">招收学员</text><br/>
|
||||
<span>班级内学员人满后可开班</span>
|
||||
</view>
|
||||
<view class="btn">
|
||||
<view class="item openClass" @click="opClass('1')" v-if="thisClass.number == students.length">
|
||||
<text >去开班</text>
|
||||
</view>
|
||||
<view class="item openClass disableBtn" v-else>
|
||||
<view class="btn" v-if="thisClass.number == students.length">
|
||||
<view class="item openClass" @click="opClass('1')" >
|
||||
<text >去开班</text>
|
||||
</view>
|
||||
<!-- <view class="item openClass disableBtn" v-else>
|
||||
<text >待开班</text>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -216,7 +230,7 @@
|
||||
</view>
|
||||
<text v-else>暂未设置</text>
|
||||
</view>
|
||||
<view class="item arryItem"><text class="adminName">记分员:</text>
|
||||
<!-- <view class="item arryItem"><text class="adminName">记分员:</text>
|
||||
<template v-if="admins.counter.length > 0">
|
||||
<view class="arryItemSub" v-for="(item,index) in admins.counter" :key="index">
|
||||
<template v-if="item.user != null">
|
||||
@@ -226,7 +240,7 @@
|
||||
</view>
|
||||
</template>
|
||||
<text v-else>暂未设置</text>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="item arryItem"><text class="adminName">评分员:</text>
|
||||
<template v-if="admins.scorer.length > 0">
|
||||
<view class="arryItemSub" v-for="(item,index) in admins.scorer" :key="index">
|
||||
@@ -467,7 +481,7 @@
|
||||
},
|
||||
goTaskListForWait(type){
|
||||
uni.navigateTo({
|
||||
url: `/pages/miniClass/taskListForWaitOpen?classId=${this.thisClass.id}&type=${type}&minNumber=${this.thisClass.homeWorkNumber}`
|
||||
url: `/pages/miniClass/taskListForWaitOpen?classId=${this.thisClass.id}&type=${type}&minNumber=${this.thisClass.homeWorkNumber}&roleCode=${this.roleCode}&classState=0`
|
||||
})
|
||||
},
|
||||
goAddHomeWork(type){
|
||||
@@ -548,8 +562,8 @@
|
||||
icon: 'success'
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/miniClass/miniClassMan'
|
||||
uni.switchTab({
|
||||
url: '/pages/mine/mine/index'
|
||||
})
|
||||
}, 500)
|
||||
}).catch(e => {
|
||||
@@ -853,7 +867,7 @@
|
||||
})
|
||||
setTimeout(() => {
|
||||
this.getClassInfo()
|
||||
}, 200)
|
||||
}, 2000)
|
||||
}
|
||||
}).catch(e => {
|
||||
console.log(e, '数据报错')
|
||||
@@ -896,8 +910,8 @@
|
||||
this.isHave = res.result.isJoin
|
||||
this.thisClass = res.result.class
|
||||
this.thisClass.homeWorkNumber = 4
|
||||
if(res.result.days > 0){
|
||||
this.thisClass.homeWorkNumber = Math.ceil(res.result.days / 7)
|
||||
if(res.result.classModel.days > 0){
|
||||
this.thisClass.homeWorkNumber = Math.ceil(res.result.classModel.days / 7)
|
||||
}
|
||||
|
||||
this.admins.list = res.result.admins
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<text class="txt555" v-else>
|
||||
匿名用户
|
||||
</text>
|
||||
<text @click.stop="outClass(item.student.id)" class="outBtn">踢出班级</text>
|
||||
<!-- <text @click.stop="outClass(item.student.id)" class="outBtn">踢出班级</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> -->
|
||||
@@ -93,7 +93,7 @@
|
||||
<uni-icons type="eye" size="20" color="#333"></uni-icons>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- <view><text class="ciyao">管理成员</text><text class="mainTxt" @click="seeManager">点击查看</text></view> -->
|
||||
<view><text class="ciyao">管理成员</text><text class="mainTxt" @click="seeManager">点击查看</text></view>
|
||||
</view>
|
||||
<uni-section class="mb-10 nobg" title="教学目标/班级简介" type="line"></uni-section>
|
||||
<rich-text class="banjiJianjie" :nodes="formatRichText(thisClass.content)"></rich-text>
|
||||
@@ -133,7 +133,7 @@
|
||||
</view>
|
||||
<text v-else>暂未设置</text>
|
||||
</view>
|
||||
<view class="item arryItem"><text class="adminName">记分员:</text>
|
||||
<!-- <view class="item arryItem"><text class="adminName">记分员:</text>
|
||||
<template v-if="admins.counter.length > 0">
|
||||
<view class="arryItemSub" v-for="(item,index) in admins.counter" :key="index">
|
||||
<template v-if="item.user != null">
|
||||
@@ -143,7 +143,7 @@
|
||||
</view>
|
||||
</template>
|
||||
<text v-else>暂未设置</text>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="item arryItem"><text class="adminName">评分员:</text>
|
||||
<template v-if="admins.scorer.length > 0">
|
||||
<view class="arryItemSub" v-for="(item,index) in admins.scorer" :key="index">
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
<public-module></public-module>
|
||||
<uni-forms :modelValue="form" :rules="rules" ref="form" v-if="roleCode.length > 0">
|
||||
<view class="input_box " style="">
|
||||
<uni-forms-item label="" name="monitor" label-width="0" v-show="roleCode.includes('主任') || roleCode.includes('副主任')">
|
||||
<uni-forms-item label="" name="monitor" label-width="0"
|
||||
v-show="roleCode.includes('主任') || roleCode.includes('副主任')">
|
||||
<view class="">
|
||||
<text class="input_tit"><i>*</i>班长:</text>
|
||||
</view>
|
||||
@@ -21,8 +22,8 @@
|
||||
<view class="havePerson" v-if="form.monitor">
|
||||
<view class="flex_box ">
|
||||
<view class="classmateImg">
|
||||
<image v-if="form.monitor.avatar != null && form.monitor.avatar != ''" :src="form.monitor.avatar"
|
||||
mode="aspectFit"></image>
|
||||
<image v-if="form.monitor.avatar != null && form.monitor.avatar != ''"
|
||||
:src="form.monitor.avatar" mode="aspectFit"></image>
|
||||
<image v-else src="/static/icon/morenAvavter.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="textBox">
|
||||
@@ -30,13 +31,13 @@
|
||||
<text style="width: 100%; display: inline-block;">
|
||||
{{form.monitor && form.monitor.nickname != '' && form.monitor.nickname != null ? form.monitor.nickname : '匿名用户'}}
|
||||
</text>
|
||||
<text style="width: 100%; display: inline-block;"> - {{form.monitor.tel}}</text>
|
||||
<text style="width: 100%; display: inline-block;"> -
|
||||
{{form.monitor.tel}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" @click.stop="delMemeber('monitor')">
|
||||
<text class="delBtn"
|
||||
>删除</text>
|
||||
<text class="delBtn">删除</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -60,8 +61,8 @@
|
||||
<view class="havePerson" v-if="form.dmonitor">
|
||||
<view class="flex_box ">
|
||||
<view class="classmateImg">
|
||||
<image v-if="form.dmonitor.avatar != null && form.dmonitor.avatar != ''" :src="form.dmonitor.avatar"
|
||||
mode="aspectFit"></image>
|
||||
<image v-if="form.dmonitor.avatar != null && form.dmonitor.avatar != ''"
|
||||
:src="form.dmonitor.avatar" mode="aspectFit"></image>
|
||||
<image v-else src="/static/icon/morenAvavter.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="textBox">
|
||||
@@ -69,13 +70,13 @@
|
||||
<text style="width: 100%; display: inline-block;">
|
||||
{{form.dmonitor && form.dmonitor.nickname != '' && form.dmonitor.nickname != null ? form.dmonitor.nickname : '匿名用户'}}
|
||||
</text>
|
||||
<text style="width: 100%; display: inline-block;"> - {{form.dmonitor.tel}}</text>
|
||||
<text style="width: 100%; display: inline-block;"> -
|
||||
{{form.dmonitor.tel}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" @click.stop="delMemeber('dmonitor')">
|
||||
<text class="delBtn"
|
||||
>删除</text>
|
||||
<text class="delBtn">删除</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -98,8 +99,8 @@
|
||||
<view class="havePerson" v-if="form.learner">
|
||||
<view class="flex_box ">
|
||||
<view class="classmateImg">
|
||||
<image v-if="form.learner.avatar != null && form.learner.avatar != ''" :src="form.learner.avatar"
|
||||
mode="aspectFit"></image>
|
||||
<image v-if="form.learner.avatar != null && form.learner.avatar != ''"
|
||||
:src="form.learner.avatar" mode="aspectFit"></image>
|
||||
<image v-else src="/static/icon/morenAvavter.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="textBox">
|
||||
@@ -107,13 +108,13 @@
|
||||
<text style="width: 100%; display: inline-block;">
|
||||
{{form.learner && form.learner.nickname != '' && form.learner.nickname != null ? form.learner.nickname : '匿名用户'}}
|
||||
</text>
|
||||
<text style="width: 100%; display: inline-block;"> - {{form.learner.tel}}</text>
|
||||
<text style="width: 100%; display: inline-block;"> -
|
||||
{{form.learner.tel}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" @click.stop="delMemeber('learner')">
|
||||
<text class="delBtn"
|
||||
>删除</text>
|
||||
<text class="delBtn">删除</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -152,8 +153,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="" @click.stop="delMemeber('scorer',index)">
|
||||
<text class="delBtn"
|
||||
>删除</text>
|
||||
<text class="delBtn">删除</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -554,67 +554,48 @@
|
||||
})
|
||||
return
|
||||
}
|
||||
// if(!this.form.dmonitor){
|
||||
// this.$refs.form.validate().then(res => {
|
||||
var newScorer = [...this.form.scorer]
|
||||
// var newCounter = [...this.form.counter]
|
||||
if (!this.form.scorer[0] && !this.form.scorer[1] && !this.form.scorer[2]) {
|
||||
newScorer = []
|
||||
} else {
|
||||
// console.log('删除之前newScorer', newScorer);
|
||||
this.form.scorer.forEach((item, index) => {
|
||||
console.log('item', item);
|
||||
if (!item) {
|
||||
newScorer.splice(1,1)
|
||||
}
|
||||
})
|
||||
newScorer = newScorer.map(item => {
|
||||
return item.id
|
||||
})
|
||||
}
|
||||
|
||||
// if (!this.form.counter[0] && !this.form.counter[1]) {
|
||||
// newCounter = [0, 0]
|
||||
// } else {
|
||||
// this.form.counter.forEach((item, index) => {
|
||||
// if (!item || item == null) {
|
||||
// newCounter[index] = {
|
||||
// id: 0
|
||||
// }
|
||||
// // newCounter.splice(index, 1)
|
||||
// }
|
||||
// })
|
||||
// if (newCounter[0].id == newCounter[1].id) {
|
||||
// uni.showToast({
|
||||
// title: '请添加副班长人选',
|
||||
// title: '两名记分员不能是同一人',
|
||||
// icon: 'none'
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
// this.$refs.form.validate().then(res => {
|
||||
var newScorer = [...this.form.scorer]
|
||||
var newCounter = [...this.form.counter]
|
||||
if (!this.form.scorer[0] && !this.form.scorer[1]) {
|
||||
newScorer = [0, 0]
|
||||
} else {
|
||||
console.log('newScorer', newScorer);
|
||||
this.form.scorer.forEach((item, index) => {
|
||||
console.log('item', item);
|
||||
if (!item || item == null) {
|
||||
console.log('进来了');
|
||||
newScorer[index] = {
|
||||
id: 0
|
||||
}
|
||||
}
|
||||
})
|
||||
// console.log('删除后的newScorer',newScorer);
|
||||
if (newScorer[0].id == newScorer[1].id) {
|
||||
uni.showToast({
|
||||
title: '两名评分员不能是同一人',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
newScorer = newScorer.map(item => {
|
||||
return item.id
|
||||
})
|
||||
// console.log('删除后的newScorer',newScorer);
|
||||
}
|
||||
|
||||
if (!this.form.counter[0] && !this.form.counter[1]) {
|
||||
newCounter = [0, 0]
|
||||
} else {
|
||||
this.form.counter.forEach((item, index) => {
|
||||
if (!item || item == null) {
|
||||
newCounter[index] = {
|
||||
id: 0
|
||||
}
|
||||
// newCounter.splice(index, 1)
|
||||
}
|
||||
})
|
||||
if (newCounter[0].id == newCounter[1].id) {
|
||||
uni.showToast({
|
||||
title: '两名记分员不能是同一人',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
newCounter = newCounter.map(item => {
|
||||
return item.id
|
||||
})
|
||||
// console.log('删除后的newCounter',newCounter);
|
||||
}
|
||||
// newCounter = newCounter.map(item => {
|
||||
// return item.id
|
||||
// })
|
||||
// // console.log('删除后的newCounter',newCounter);
|
||||
// }
|
||||
|
||||
var _url = 'common/class/setUserRole'
|
||||
// this.form.classId ? _url = 'common/class/editClass' : _url = "common/class/addClass"
|
||||
@@ -624,16 +605,18 @@
|
||||
data: {
|
||||
"classId": this.form.classId,
|
||||
"monitor": this.form.monitor.id + '', //班长
|
||||
"dmonitor": this.form.dmonitor ? this.form.dmonitor.id + '' : '0', //2班长
|
||||
"learner": this.form.learner ? this.form.learner.id + '' : '0', //学习委员
|
||||
"dmonitor": this.form.dmonitor ? this.form.dmonitor.id + '' : '', //2班长
|
||||
"learner": this.form.learner ? this.form.learner.id + '' : '', //学习委员
|
||||
"scorer": newScorer.join(','), //评分员
|
||||
"counter": newCounter.join(',') //记分员
|
||||
// "counter": newCounter.join(',') //记分员
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
console.log('res',res);
|
||||
if (res.code == 0) {
|
||||
uni.showToast({
|
||||
title: "操作成功",
|
||||
icon: 'success'
|
||||
@@ -643,11 +626,18 @@
|
||||
delta: 1
|
||||
});
|
||||
}, 1000)
|
||||
}).catch(e => {
|
||||
// console.log('表单错误信息:', err);
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '操作失败',
|
||||
icon: 'error'
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 3000
|
||||
});
|
||||
}
|
||||
}).catch(e => {
|
||||
console.log('表单错误信息:', e);
|
||||
uni.showToast({
|
||||
title: e.errMsg,
|
||||
icon: 'none'
|
||||
})
|
||||
});
|
||||
// }).catch(err => {
|
||||
@@ -753,7 +743,10 @@
|
||||
padding: 10rpx 8rpx;
|
||||
|
||||
.haveNoPerson {
|
||||
height: 120rpx; border-radius: 10rpx; align-items: center; justify-content: center;
|
||||
height: 120rpx;
|
||||
border-radius: 10rpx;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
@@ -765,8 +758,12 @@
|
||||
}
|
||||
|
||||
.delBtn {
|
||||
display: block; padding: 20rpx 0; box-sizing: border-box;
|
||||
width: 100%; text-align: center; background-color: #f1f1f1;
|
||||
display: block;
|
||||
padding: 20rpx 0;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
background-color: #f1f1f1;
|
||||
color: #e60000 !important;
|
||||
font-size: 26rpx;
|
||||
margin-top: 20rpx;
|
||||
|
||||
@@ -6,19 +6,17 @@
|
||||
<view v-if="taskList.length > 0 ">
|
||||
<view class="submitRecode">
|
||||
<view class="newBox">
|
||||
<view class="item " v-for="(item, index) in taskList" @click="clickTask(item)">
|
||||
<view class="item " v-for="(item, index) in taskList" @click="clickReply(item)">
|
||||
<view class="leve1 flex_box">
|
||||
<text>{{item.title}}</text>
|
||||
</view>
|
||||
<view class="leve2 flex_box">
|
||||
<view class="item flex_box" style="align-items: center;">
|
||||
<view class="">
|
||||
<uni-icons type="spinner-cycle" size="18" color="#ff878d"></uni-icons>
|
||||
</view>
|
||||
<view class="">
|
||||
未评分 <b>{{item.otherInfo.setNoGiveScoreNumber}}</b> 人
|
||||
</view>
|
||||
<view class="pp" style="flex: 1;" v-html="item.content"></view>
|
||||
<text v-if="item.scoreSuccess == '0'" class="red light"></text>
|
||||
<text v-else class="score" style="padding-left: 10rpx;">{{item.score}}'</text>
|
||||
<!-- <text v-if="" class="blue light"></text> -->
|
||||
</view>
|
||||
<view :class="['leve2']">
|
||||
<view class="" v-show="item.zhedie" v-html="item.questions"></view>
|
||||
<text class="btn" @click.stop="item.zhedie = false" v-show="item.zhedie">收起</text>
|
||||
<text class="btn" @click.stop="item.zhedie = true" v-show="!item.zhedie">查看原题</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -27,6 +25,50 @@
|
||||
<u-divider v-show="status == 2" text="已加载全部"></u-divider>
|
||||
<u-divider v-show="status == 3" text="暂无数据"></u-divider>
|
||||
<u-divider v-show="status == 1" text="加载中..."></u-divider>
|
||||
|
||||
<u-popup key="1" v-if="curReplay.replyId" :show="showEditBlank" :round="10" @close="closePup" ref="" z-index="998" overlay-style="z-index:998">
|
||||
<view class="" style="padding: 40rpx; max-height: 80vh; overflow-y:scroll">
|
||||
<view class="anserBox">
|
||||
<h3>提交的内容</h3>
|
||||
<view class="" style="border-bottom: 1px solid #eee; padding-bottom: 20rpx; margin-bottom: 20rpx;">
|
||||
<view class="anserContent" v-html="curReplay.content"></view>
|
||||
<view class="">
|
||||
<view class="imgBox flex_box" v-if="curReplay.fileList.length > 0">
|
||||
<view class="item" v-for="(item, index) in curReplay.fileList" :key="index">
|
||||
<image @click="previewImage(item.url)" :src="item.url" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="date">
|
||||
日期:{{curReplay.createTime}}
|
||||
</view> -->
|
||||
<!-- <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> -->
|
||||
<view class="score" v-show="curReplay.scoreSuccess == 1">
|
||||
分数:{{curReplay.score}}
|
||||
</view>
|
||||
<view class="score noscore" v-show="curReplay.scoreSuccess == 0">
|
||||
未生成成绩
|
||||
</view>
|
||||
<template v-if="roleCode.includes('4') || roleCode.includes('5') && curReplay.scoreSuccess != 1">
|
||||
<view class="" style=" padding: 10rpx 10rpx; margin-top: 20rpx;">
|
||||
<view class="scoreBox flex_box">
|
||||
<text>分数</text>
|
||||
<text v-for="(item, index) in scoreList" @click="setScore(item)" :class="[item == form.score ?'active' : '' ]">
|
||||
{{item}} 分
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn_box ">
|
||||
<button class="submit" @click="onSubmit">提 交</button>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
<z-navigation></z-navigation>
|
||||
</view>
|
||||
@@ -34,6 +76,9 @@
|
||||
|
||||
<script>
|
||||
import $http from '@/config/requestConfig.js';
|
||||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
// const taskLIst1 = require('@/data/taskList.json')
|
||||
export default {
|
||||
data() {
|
||||
@@ -46,6 +91,15 @@
|
||||
pageName: '',
|
||||
taskList: [],
|
||||
roleCode: '',
|
||||
showEditBlank:false,
|
||||
curReplay:{},
|
||||
scoreList:[
|
||||
0,0.5,1,1.5,2,2.5
|
||||
],
|
||||
form: {
|
||||
score: undefined, //分数
|
||||
id: undefined,
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
@@ -86,13 +140,95 @@
|
||||
return true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(["userInfo"]),
|
||||
},
|
||||
methods: {
|
||||
// 点击作业或者医案,进入作业提交情况
|
||||
clickTask(item){
|
||||
// console.log('options',options);
|
||||
uni.navigateTo({
|
||||
url:`/pages/miniClass/taskDetailForMan?id=${item.id}&roleCode=${this.roleCode}&type=${this.pageType}`
|
||||
previewImage(url) {
|
||||
console.log(url);
|
||||
uni.previewImage({
|
||||
urls: [url],
|
||||
longPressActions: {
|
||||
itemList: ["很抱歉,暂不支持保存图片到本地"],
|
||||
success: function(res) {
|
||||
// console.log(res,'+++++')
|
||||
},
|
||||
},
|
||||
});
|
||||
},
|
||||
closePup() {
|
||||
this.showEditBlank = false
|
||||
this.form = {
|
||||
score: undefined,
|
||||
id: undefined,
|
||||
}
|
||||
this.curReplay = {}
|
||||
},
|
||||
onSubmit() {
|
||||
if(!this.form.score){
|
||||
uni.showToast({
|
||||
title:'请选择分值',
|
||||
icon:'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
var _url = "common/class/editScore"
|
||||
var data = {
|
||||
"score": this.form.score,
|
||||
"replyId": this.form.id
|
||||
|
||||
}
|
||||
console.log('data后台提交数据', data);
|
||||
$http.request({
|
||||
url: _url,
|
||||
method: "POST",
|
||||
data,
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
uni.showToast({
|
||||
title: '操作成功!',
|
||||
icon: 'success'
|
||||
})
|
||||
// this.FileList = []
|
||||
setTimeout(()=>{
|
||||
this.closePup()
|
||||
this.pPage = 0
|
||||
this.taskList = []
|
||||
this.getList()
|
||||
},1000)
|
||||
|
||||
}).catch(e => {
|
||||
uni.showToast({
|
||||
title: '操作失败',
|
||||
icon: 'error'
|
||||
})
|
||||
});
|
||||
},
|
||||
setScore(val){
|
||||
// if(this.form.score == val) return
|
||||
this.form.score = val
|
||||
console.log('this.form.score',this.form.score);
|
||||
},
|
||||
// 点击作业或者医案,进入作业提交情况
|
||||
clickReply(item) {
|
||||
console.log('item',item);
|
||||
this.form.id = item.replyId
|
||||
if(item.haveGiveScore){
|
||||
var scoreInfo = JSON.parse(item.scoreInfo)
|
||||
for (let k in scoreInfo){
|
||||
console.log(k)
|
||||
if(k == this.userInfo.id){
|
||||
this.form.score = scoreInfo[k]
|
||||
break
|
||||
}
|
||||
console.log('this.form.score',this.form.score)
|
||||
}
|
||||
}
|
||||
this.curReplay = item
|
||||
this.showEditBlank = true
|
||||
},
|
||||
getList() {
|
||||
this.status = 1;
|
||||
@@ -106,14 +242,12 @@
|
||||
this.loadFlag = true;
|
||||
this.pPage++;
|
||||
$http.request({
|
||||
url: "common/class/getClassTaskList",
|
||||
url: "common/class/getThinkQuestionList",
|
||||
method: "POST",
|
||||
data: {
|
||||
"limit": 10,
|
||||
"page": this.pPage,
|
||||
"classId": this.classId,
|
||||
"type": this.pageType + '', //类型 0班内任务1医案2心得
|
||||
"title": ""
|
||||
"classId": this.classId
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
@@ -121,12 +255,37 @@
|
||||
})
|
||||
.then(res => {
|
||||
if (res.code == 0) {
|
||||
if (res.page.records.length > 0) {
|
||||
console.log('数据获取成功', res.page.records);
|
||||
var lis = res.page.records
|
||||
if (res.thinkQuestionList.records.length > 0) {
|
||||
console.log('数据获取成功', res.thinkQuestionList.records);
|
||||
var lis = res.thinkQuestionList.records
|
||||
lis.forEach(item => {
|
||||
item.scoreInfos = 0
|
||||
item.haveGiveScore = false
|
||||
item.fileList = []
|
||||
item.zhedie = false
|
||||
if (item.img != '') {
|
||||
var _urs = item.img.split(',')
|
||||
_urs.forEach(item1 => {
|
||||
item.fileList.push({
|
||||
url: item1
|
||||
})
|
||||
})
|
||||
}
|
||||
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
|
||||
}
|
||||
})
|
||||
this.taskList = this.taskList.concat(lis)
|
||||
// this.taskList = taskLIst1.page.records // 测试数据
|
||||
if (res.page.pages > this.pPage) {
|
||||
if (res.thinkQuestionList.pages > this.pPage) {
|
||||
this.status = 0;
|
||||
} else {
|
||||
this.status = 2;
|
||||
@@ -154,9 +313,69 @@
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "@/style/mixin.scss";
|
||||
.imgBox {
|
||||
flex-wrap: wrap;
|
||||
|
||||
.example-body {
|
||||
padding: 10px;
|
||||
.item {
|
||||
width: 20%;
|
||||
margin-right: 10rpx;
|
||||
border: 1px solid #eee;
|
||||
padding: 0 !important;
|
||||
image {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
.scoreBox{
|
||||
text{display: inline-block; font-size: 26rpx; width: 100%; border: 1px solid #ddd; text-align: center; line-height:60rpx; border-right: none;}
|
||||
text:last-child{border-right: 1px solid #ddd;}
|
||||
text.active{background-color: #55aaff; color: #fff; border-color: #55aaff;}
|
||||
}
|
||||
.noscore{color: #ffaa7f;}
|
||||
.score{color: #55aaff; font-size: 30rpx !important; font-weight: bold;}
|
||||
.btn_box {
|
||||
margin-top: 70rpx;
|
||||
padding-bottom: 20rpx;
|
||||
|
||||
button {
|
||||
font-size: 32rpx;
|
||||
@include theme('btn_bg') color: #fff;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
border-radius: 50rpx;
|
||||
}
|
||||
}
|
||||
.noanser {
|
||||
padding: 20rpx;
|
||||
text-align: center;
|
||||
|
||||
// border-bottom: 1px solid #eee;
|
||||
.btn {
|
||||
display: inline-block;
|
||||
border-radius: 20rpx;
|
||||
padding: 10rpx 20rpx;
|
||||
background-color: $themeColor;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.anserBox {
|
||||
border: 4rpx dotted #2bb447;
|
||||
margin-top: 30rpx;
|
||||
padding: 20rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
padding-top: 0;
|
||||
.anserContent{line-height: 50rpx; padding: 20rpx 0; display: block;}
|
||||
h3 {
|
||||
line-height: 80rpx;
|
||||
width: 50%;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
background-color: #2bb447;
|
||||
border-radius: 0 0 20rpx 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.pad20 {
|
||||
@@ -170,7 +389,9 @@
|
||||
/* #endif */
|
||||
flex: 1
|
||||
}
|
||||
|
||||
.light{display: block; width: 20rpx; height: 20rpx; border-radius: 50rpx;}
|
||||
.red{background-color: red;}
|
||||
.blue{background-color: #55aaff;}
|
||||
.submitRecode {
|
||||
// padding: 20rpx;
|
||||
|
||||
@@ -193,20 +414,44 @@
|
||||
border-radius: 20rpx;
|
||||
padding: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.leve1 {
|
||||
align-items: center;
|
||||
border-bottom: 1px dashed #eee;
|
||||
padding-bottom: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
.pp{font-size: 30rpx !important;}
|
||||
|
||||
// .userName{}
|
||||
}
|
||||
|
||||
.leve2 { justify-content: center;
|
||||
color: #999; font-size: 24rpx;
|
||||
b{font-size: 34rpx; padding: 0 4rpx; font-weight: normal; color: #333; color: red;}
|
||||
.item{text-align: center; padding-top: 0; padding-bottom: 0; margin-bottom: 0;}
|
||||
.leve2 {
|
||||
justify-content: center;
|
||||
color: #666;
|
||||
font-size: 28rpx;
|
||||
|
||||
.btn {
|
||||
display: block;padding: 10rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
b {
|
||||
font-size: 34rpx;
|
||||
padding: 0 4rpx;
|
||||
font-weight: normal;
|
||||
color: #333;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.item {
|
||||
text-align: center;
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// .leve2.zhedie{display: none;}
|
||||
.leve3 {
|
||||
color: $themeColor;
|
||||
text-align: center;
|
||||
|
||||
@@ -20,9 +20,11 @@
|
||||
<view class="taskContent" v-html="thisTask.content">
|
||||
|
||||
</view>
|
||||
<view class="editBtn" @click="goEdit" v-if="
|
||||
( classState == 0 && taskType == 0 || taskType != 0) && zuoyeList.length == 0 && (roleCode.includes('1') || roleCode.includes('2'))">
|
||||
<text>修改</text>
|
||||
<!-- <view class="editBtn" @click="goEdit" v-if="
|
||||
( classState == 0 && taskType == 0 || taskType != 0) && zuoyeList.length == 0 && (roleCode.includes('1') || roleCode.includes('2'))"> -->
|
||||
<view class="editBtn" v-if="taskType != '0' && classState == '1' && zuoyeList.length == 0 && (roleCode.includes('1') || roleCode.includes('2'))">
|
||||
<text @click="goEdit" class="border_radius_10 small_btn edit">修改</text>
|
||||
<text @click="delTask" class="border_radius_10 small_btn del">删除</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 提交记录 -->
|
||||
@@ -55,9 +57,9 @@
|
||||
分数:{{item.score}}
|
||||
</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>
|
||||
<text v-show="item.scoreInfos < 2 && !item.haveGiveScore && roleCode.includes('4')">请您评分</text>
|
||||
<button v-show="item.scoreInfos >= 2" class="getScore" @click.stop="getRealScore(item.id)" >生成成绩</button>
|
||||
<!-- <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">
|
||||
@@ -82,7 +84,7 @@
|
||||
<view class="anserContent" v-html="curReplay.content">
|
||||
|
||||
</view>
|
||||
<view class="图片">
|
||||
<view class="">
|
||||
<view class="imgBox flex_box" v-if="fileList1.length > 0">
|
||||
<view class="item" v-for="(item, index) in fileList1" :key="index">
|
||||
<image @click="previewImage(item.url)" :src="item.url" mode="widthFix"></image>
|
||||
@@ -97,13 +99,13 @@
|
||||
学员信息:{{curReplay.createUser.nickname != null && curReplay.createUser.nickname != '' ? curReplay.createUser.nickname : '匿名用户'}}
|
||||
/ {{curReplay.createUser.tel}}
|
||||
</view>
|
||||
<view class="score" v-show="curReplay.scoreSuccess == 1">
|
||||
<view class="score" v-show="curReplay.scoreSuccess != 0">
|
||||
分数:{{curReplay.score}}
|
||||
</view>
|
||||
<view class="score noscore" v-show="curReplay.scoreSuccess == 0">
|
||||
未生成成绩
|
||||
</view>
|
||||
<template v-if="roleCode.includes('4') && curReplay.scoreSuccess != 1 || roleCode.includes('5') && curReplay.scoreSuccess != 1">
|
||||
<template v-if="roleCode.includes('4') || roleCode.includes('5') && curReplay.scoreSuccess < 2">
|
||||
<view class="" style=" padding: 10rpx 10rpx; margin-top: 20rpx;">
|
||||
<view class="scoreBox flex_box">
|
||||
<text>分数</text>
|
||||
@@ -176,9 +178,9 @@
|
||||
console.log('e', e)
|
||||
this.roleCode = e.roleCode
|
||||
this.taskType = e.type
|
||||
console.log('e', this.taskType,e)
|
||||
if (e.id) {
|
||||
this.thisTask.id = e.id
|
||||
|
||||
this.getReplayList()
|
||||
}
|
||||
if(e.type == 0){
|
||||
@@ -220,6 +222,43 @@
|
||||
...mapState(["userInfo"]),
|
||||
},
|
||||
methods: {
|
||||
delTask(){
|
||||
$http.request({
|
||||
url: "common/class/delClassTask",
|
||||
method: "POST",
|
||||
data: {
|
||||
"taskId": this.thisTask.id
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
if(res.code == 0){
|
||||
uni.showToast({
|
||||
title:'删除成功',
|
||||
icon:'success'
|
||||
})
|
||||
setTimeout(()=>{
|
||||
uni.navigateTo({
|
||||
url: `/pages/miniClass/taskList?classId=${this.thisTask.classId}&type=${this.thisTask.type}&roleCode=${this.roleCode}&classState=${this.classState}`
|
||||
// classId=${classId}&type=${type}&roleCode=${this.roleCode}
|
||||
})
|
||||
},2000)
|
||||
}else{
|
||||
uni.showToast({
|
||||
title:'删除失败',
|
||||
icon:'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(e => {
|
||||
uni.showToast({
|
||||
title:'删除失败',
|
||||
icon:'error'
|
||||
})
|
||||
})
|
||||
},
|
||||
setScore(val){
|
||||
// if(this.form.score == val) return
|
||||
this.form.score = val
|
||||
@@ -639,9 +678,9 @@
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.editBtn{text-align: center; margin-top: 20rpx;
|
||||
text{
|
||||
padding: 4rpx; display: inline-block; width:40%; text-align: center; color: $themeColor; border: 1px solid $themeColor; border-radius: 6rpx;
|
||||
}}
|
||||
.edit{border:1px solid $themeColor; color: $themeColor;}
|
||||
.del{color: #ff557f; border: 1px solid #ff557f; margin-left: 20rpx;}
|
||||
}
|
||||
.zuoyeListBox {
|
||||
margin-top: 40rpx;
|
||||
// background-color: #fff;
|
||||
@@ -775,7 +814,7 @@
|
||||
text-align: right;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.score{color: #55aaff; font-size: 30rpx !important; font-weight: bold;;}
|
||||
.score{color: #55aaff; font-size: 30rpx !important; font-weight: bold;}
|
||||
.noscore{color: #ffaa7f;}
|
||||
.imgBox {
|
||||
flex-wrap: wrap;
|
||||
|
||||
@@ -10,35 +10,11 @@
|
||||
<view class="leve1 flex_box">
|
||||
<text>{{item.title}}</text>
|
||||
</view>
|
||||
<view class="leve2 flex_box">
|
||||
<!-- <view class="item">
|
||||
<view class="">
|
||||
<uni-icons type="checkmarkempty" size="18" color="#55aa7f"></uni-icons>
|
||||
</view>
|
||||
<view class="">
|
||||
已交 <b>{{item.otherInfo.setGiveHomeWorkNumber}}</b> 人
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="">
|
||||
<uni-icons type="closeempty" size="18" color="#ff878d"></uni-icons>
|
||||
</view>
|
||||
<view class="">
|
||||
未交 <b>{{item.otherInfo.setNoGiveHomeWorkNumber}}</b> 人
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="">
|
||||
<uni-icons type="auth" size="18" color="#55aa7f"></uni-icons>
|
||||
</view>
|
||||
<view class="">
|
||||
已评分 <b>{{item.otherInfo.setGiveScoreNumber}}</b> 人
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="item flex_box" style="align-items: center;">
|
||||
<view class="">
|
||||
<uni-icons type="spinner-cycle" size="18" color="#ff878d"></uni-icons>
|
||||
<view class="leve2 " >
|
||||
<view class="jianjie">
|
||||
发布时间:{{item.createTime}}
|
||||
</view>
|
||||
<view class="item flex_box" style="align-items: center;" v-if="item.otherInfo.setNoGiveScoreNumber > 0">
|
||||
<view class="">
|
||||
未评分 <b>{{item.otherInfo.setNoGiveScoreNumber}}</b> 人
|
||||
</view>
|
||||
@@ -70,12 +46,14 @@
|
||||
pageName: '',
|
||||
taskList: [],
|
||||
roleCode:'',
|
||||
classState:undefined
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
console.log('e',e);
|
||||
this.classId = e.classId
|
||||
this.pageType = e.type
|
||||
this.classState = e.classState
|
||||
this.roleCode = e.roleCode
|
||||
if (e.type == '0') {
|
||||
this.pageName = '作业列表'
|
||||
@@ -115,7 +93,7 @@
|
||||
clickTask(item){
|
||||
// console.log('options',options);
|
||||
uni.navigateTo({
|
||||
url:`/pages/miniClass/taskDetailForMan?id=${item.id}&roleCode=${this.roleCode}&type=${this.pageType}`
|
||||
url:`/pages/miniClass/taskDetailForMan?id=${item.id}&roleCode=${this.roleCode}&type=${this.pageType}&classState=${this.classState}`
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
@@ -219,14 +197,15 @@
|
||||
margin-bottom: 20rpx;
|
||||
.leve1 {
|
||||
align-items: center;
|
||||
border-bottom: 1px dashed #eee;
|
||||
padding-bottom: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
// padding-bottom: 20rpx;
|
||||
// .userName{}
|
||||
}
|
||||
|
||||
.leve2 { justify-content: center;
|
||||
color: #999; font-size: 24rpx;
|
||||
margin-top: 20rpx;
|
||||
color: #999; font-size: 24rpx; border-top: 1px dashed #eee;
|
||||
border-top: 1px dashed #eee;
|
||||
b{font-size: 34rpx; padding: 0 4rpx; font-weight: normal; color: #333; color: red;}
|
||||
.item{text-align: center; padding-top: 0; padding-bottom: 0; margin-bottom: 0;}
|
||||
}
|
||||
|
||||
@@ -2,49 +2,38 @@
|
||||
<view style="min-height: calc(100vh - 120rpx); background-color: #ebf2f5;">
|
||||
<z-nav-bar :title="pageName"></z-nav-bar>
|
||||
<view class="pad20">
|
||||
<view class="haveNoList">
|
||||
根据教学时长,至少发布{{minNumber}}条作业
|
||||
<view class="" v-if="taskList.length == 0">
|
||||
<view class="listTitle">
|
||||
<text>根据教学时长,须至少发布 {{minNumber}} 条作业</text>
|
||||
</view>
|
||||
<view class="addTips border_radius_10">
|
||||
<view class="" >
|
||||
<view class="flex_box flex_center" >
|
||||
<text class="PM_font fangshi">生成方式</text><uni-icons type="help" size="18" @click="clickHelp"></uni-icons>
|
||||
</view>
|
||||
<view class="btnBox flex_box flex_center">
|
||||
<text class="zidong border_radius_10" @click="autoCreate()">自动生成</text>
|
||||
<text class="shoudong border_radius_10" @click="addTask()">手动创建</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="taskList.length > 0 ">
|
||||
<uni-section class="mb-10 mt-10 nobg" :title="'共'+total+'条数据'" type="line"></uni-section>
|
||||
<view class="submitRecode">
|
||||
<view class="newBox">
|
||||
<view class="item " v-for="(item, index) in taskList" @click="clickTask(item)">
|
||||
<view class="leve1 flex_box">
|
||||
<text>{{item.title}}</text>
|
||||
<view class="leve1 flex_box flex_between">
|
||||
<text style="flex: 1;">{{item.title}}</text>
|
||||
<text class="edit border_radius_10 small_btn" @click.stop="goEdit(item)">修改</text>
|
||||
</view>
|
||||
<view class="leve2 flex_box">
|
||||
<!-- <view class="item">
|
||||
<view class="">
|
||||
<uni-icons type="checkmarkempty" size="18" color="#55aa7f"></uni-icons>
|
||||
</view>
|
||||
<view class="">
|
||||
已交 <b>{{item.otherInfo.setGiveHomeWorkNumber}}</b> 人
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="">
|
||||
<uni-icons type="closeempty" size="18" color="#ff878d"></uni-icons>
|
||||
</view>
|
||||
<view class="">
|
||||
未交 <b>{{item.otherInfo.setNoGiveHomeWorkNumber}}</b> 人
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="">
|
||||
<uni-icons type="auth" size="18" color="#55aa7f"></uni-icons>
|
||||
</view>
|
||||
<view class="">
|
||||
已评分 <b>{{item.otherInfo.setGiveScoreNumber}}</b> 人
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="item flex_box" style="align-items: center;">
|
||||
<view class="">
|
||||
<uni-icons type="spinner-cycle" size="18" color="#ff878d"></uni-icons>
|
||||
</view>
|
||||
<view class="">
|
||||
未评分 <b>{{item.otherInfo.setNoGiveScoreNumber}}</b> 人
|
||||
<view class="leve2 ">
|
||||
<view class="jianjie" v-html="item.content">
|
||||
</view>
|
||||
</view>
|
||||
<view class="leve3">
|
||||
<text class="border_radius_10 small_btn add" @click.stop="addTask(item)">在本条后面添加一条</text>
|
||||
<text class="border_radius_10 small_btn del" @click.stop="delTask(item)">删除</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -72,11 +61,14 @@
|
||||
pageName: '',
|
||||
taskList: [],
|
||||
roleCode:'',
|
||||
minNumber:undefined
|
||||
minNumber:undefined,
|
||||
classState:undefined,
|
||||
total:0
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
console.log('e',e);
|
||||
this.classState = e.classState
|
||||
this.classId = e.classId
|
||||
this.minNumber = e.minNumber
|
||||
this.pageType = e.type
|
||||
@@ -107,19 +99,135 @@
|
||||
this.getList()
|
||||
// this.getList()
|
||||
},
|
||||
onBackPress() {
|
||||
if (this.showRight || this.showLeft) {
|
||||
this.$refs.showLeft.close()
|
||||
this.$refs.showRight.close()
|
||||
return true
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
delTask(item){
|
||||
console.log('删除');
|
||||
$http.request({
|
||||
url: "common/class/delClassTask",
|
||||
method: "POST",
|
||||
data: {
|
||||
"taskId": item.id
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
if(res.code == 0){
|
||||
uni.showToast({
|
||||
title:'删除成功',
|
||||
icon:'success'
|
||||
})
|
||||
setTimeout(()=>{
|
||||
this.pPage = 0
|
||||
this.taskList = []
|
||||
this.getList()
|
||||
},2000)
|
||||
}else{
|
||||
uni.showToast({
|
||||
title:'删除失败',
|
||||
icon:'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(e => {
|
||||
uni.showToast({
|
||||
title:'删除失败',
|
||||
icon:'error'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 是否继续自动成操作
|
||||
confirOption(){
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.showModal({
|
||||
title:'提示',
|
||||
content:'当前作业列表中存在数据,确定要清空并重新生成新的作业列表吗?',
|
||||
cancelText:'点错了',
|
||||
confirmText:'确定',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
resolve(true)
|
||||
} else if (res.cancel) {
|
||||
resolve(false)
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
goAutoCreate(){
|
||||
|
||||
$http.request({
|
||||
url: "common/class/generateClassTask",
|
||||
method: "POST",
|
||||
data: {
|
||||
"classId": this.classId
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
if(res.code == 0){
|
||||
uni.showToast({
|
||||
title:'生成成功',
|
||||
icon:'success'
|
||||
})
|
||||
setTimeout(()=>{
|
||||
this.pPage = 0
|
||||
this.taskList = []
|
||||
this.getList()
|
||||
},2000)
|
||||
}else{
|
||||
uni.showToast({
|
||||
title:'生成失败',
|
||||
icon:'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(e => {
|
||||
uni.showToast({
|
||||
title:'生成失败',
|
||||
icon:'error'
|
||||
})
|
||||
})
|
||||
},
|
||||
async autoCreate(){
|
||||
console.log('自动创建');
|
||||
if(this.taskList.length > 0){
|
||||
var isContinue = await this.confirOption()
|
||||
if(isContinue){
|
||||
this.goAutoCreate()
|
||||
}
|
||||
}else{
|
||||
this.goAutoCreate()
|
||||
}
|
||||
|
||||
},
|
||||
goEdit(item){
|
||||
uni.navigateTo({
|
||||
url:`/pages/miniClass/addHomeWork?id=${item.id}&type=${item.type}`
|
||||
})
|
||||
},
|
||||
addTask(item){
|
||||
uni.navigateTo({
|
||||
url: `/pages/miniClass/addHomeWork?classId=${this.classId}&sort=${item.sort}`
|
||||
})
|
||||
},
|
||||
clickHelp(){
|
||||
uni.showModal({
|
||||
title:'说明',
|
||||
content:"班内作业您可选择自动生成作业列表,或者手动逐一添加的方式来创建作业,其中需要注意的是如选择自动生成作业列表,会覆盖掉之前已经存在的作业内容。",
|
||||
showCancel:false,
|
||||
confirmText:'好的'
|
||||
})
|
||||
},
|
||||
// 点击作业或者医案,进入作业提交情况
|
||||
clickTask(item){
|
||||
// console.log('options',options);
|
||||
uni.navigateTo({
|
||||
url:`/pages/miniClass/taskDetailForMan?id=${item.id}&roleCode=${this.roleCode}&type=${this.pageType}`
|
||||
url:`/pages/miniClass/taskDetailForMan?id=${item.id}&roleCode=${this.roleCode}&type=${this.pageType}&classState=${this.classState}`
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
@@ -149,10 +257,12 @@
|
||||
})
|
||||
.then(res => {
|
||||
if (res.code == 0) {
|
||||
this.total = 0
|
||||
if (res.page.records.length > 0) {
|
||||
console.log('数据获取成功', res.page.records);
|
||||
var lis = res.page.records
|
||||
this.taskList = this.taskList.concat(lis)
|
||||
this.total = res.page.total
|
||||
// this.taskList = taskLIst1.page.records // 测试数据
|
||||
if (res.page.pages > this.pPage) {
|
||||
this.status = 0;
|
||||
@@ -182,7 +292,18 @@
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "@/style/mixin.scss";
|
||||
|
||||
.addTips{padding: 20rpx; background-color: #fff; }
|
||||
.btnBox{
|
||||
text{padding: 16rpx 10rpx; margin: 20rpx; display: block; color: #fff;}
|
||||
.zidong{
|
||||
background-color: #55aa00;
|
||||
}
|
||||
.shoudong{background-color:$themeColor;}
|
||||
}
|
||||
.fangshi{font-size: 36rpx; color: #666;}
|
||||
.listTitle{
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
.example-body {
|
||||
padding: 10px;
|
||||
}
|
||||
@@ -223,14 +344,15 @@
|
||||
margin-bottom: 20rpx;
|
||||
.leve1 {
|
||||
align-items: center;
|
||||
border-bottom: 1px dashed #eee;
|
||||
padding-bottom: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
// padding-bottom: 20rpx;
|
||||
.edit{border:1px solid $themeColor; color: $themeColor;}
|
||||
// .userName{}
|
||||
}
|
||||
|
||||
.leve2 { justify-content: center;
|
||||
color: #999; font-size: 24rpx;
|
||||
.leve2 { justify-content: center; margin-top: 20rpx;
|
||||
color: #999; font-size: 24rpx;border-top: 1px dashed #eee;
|
||||
.jianjie{@include bov(2)}
|
||||
b{font-size: 34rpx; padding: 0 4rpx; font-weight: normal; color: #333; color: red;}
|
||||
.item{text-align: center; padding-top: 0; padding-bottom: 0; margin-bottom: 0;}
|
||||
}
|
||||
@@ -238,8 +360,9 @@
|
||||
.leve3 {
|
||||
color: $themeColor;
|
||||
text-align: center;
|
||||
padding-top: 10rpx;
|
||||
|
||||
padding-top: 10rpx; margin-top: 20rpx; margin-bottom: 10rpx;
|
||||
.add{color: #ffaa7f; border: 1px solid #ffaa7f;}
|
||||
.del{color: #ff557f; border: 1px solid #ff557f; margin-left: 20rpx;}
|
||||
.tips {
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
@@ -267,15 +390,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
// 处理抽屉内容滚动
|
||||
.scroll-view-box {
|
||||
flex: 1;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.info {
|
||||
padding: 15px;
|
||||
@@ -291,7 +405,4 @@
|
||||
padding: 5px 15px;
|
||||
}
|
||||
|
||||
.close {
|
||||
padding: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -89,7 +89,17 @@ $themeBgColor: #EDF6F5 !important;
|
||||
.PM_font {
|
||||
font-family: PangMenZhengDaoBiaoTiTiMianFeiBan;
|
||||
}
|
||||
|
||||
.nobg{background-color: transparent !important;}
|
||||
.border_radius_10{
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.flex_center{
|
||||
justify-content: center;
|
||||
}
|
||||
.flex_between{
|
||||
justify-content: space-between;
|
||||
}
|
||||
.small_btn{padding: 8rpx 16rpx;}
|
||||
.bg_box_shandow {
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user