暂存
This commit is contained in:
11
pages.json
11
pages.json
@@ -627,10 +627,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path" : "pages/miniClass/giveScore",
|
"path" : "pages/miniClass/taskList",
|
||||||
"style" :
|
"style" :
|
||||||
{
|
{
|
||||||
"navigationBarTitleText" : "评分"
|
"navigationBarTitleText" : "任务列表"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -646,6 +646,13 @@
|
|||||||
{
|
{
|
||||||
"navigationBarTitleText" : "心得详细"
|
"navigationBarTitleText" : "心得详细"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/miniClass/taskDetailForMan",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : "管理端任务详情"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
|
|||||||
@@ -75,8 +75,8 @@
|
|||||||
<view class="flex_box classTitleBox">
|
<view class="flex_box classTitleBox">
|
||||||
<image src="../../static/icon/class.png" mode="" style="width: 64rpx; height: 64rpx;"></image>
|
<image src="../../static/icon/class.png" mode="" style="width: 64rpx; height: 64rpx;"></image>
|
||||||
<text class="mainTxt">
|
<text class="mainTxt">
|
||||||
<span style="font-weight: bold; padding: 0 16rpx;">{{linkClassList.length}}</span>
|
<span style="font-weight: bold; padding: 0 16rpx;"></span>
|
||||||
个班级正在学习本门课程</text>
|
加入班级开始更加系统的学习</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="btntext">
|
<view class="btntext">
|
||||||
<text @click="goClassLIst('/pages/miniClass/courseClassList', course.id,course.title)">前往查看 >></text>
|
<text @click="goClassLIst('/pages/miniClass/courseClassList', course.id,course.title)">前往查看 >></text>
|
||||||
@@ -556,8 +556,8 @@
|
|||||||
method: "POST",
|
method: "POST",
|
||||||
data: {
|
data: {
|
||||||
"courseId": this.courseId,
|
"courseId": this.courseId,
|
||||||
"state": '0', //小班状态0待开班1已开班2完成
|
"state": '', //小班状态0待开班1已开班2完成
|
||||||
"type": '0'
|
"type": ''
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
//默认 无 说明:请求头
|
//默认 无 说明:请求头
|
||||||
|
|||||||
@@ -429,6 +429,24 @@
|
|||||||
if (this.userInfo.id != undefined) {
|
if (this.userInfo.id != undefined) {
|
||||||
this.$http.post("common/user/getUserInfo").then((res) => {
|
this.$http.post("common/user/getUserInfo").then((res) => {
|
||||||
this.userMes = res.result;
|
this.userMes = res.result;
|
||||||
|
var zhurenIndex = this.pageList.findIndex(item => {
|
||||||
|
return item.name == '主任教学'
|
||||||
|
})
|
||||||
|
if (zhurenIndex > -1) {
|
||||||
|
this.pageList.splice(zhurenIndex, 1)
|
||||||
|
}
|
||||||
|
var banzhangIndex = this.pageList.findIndex(item => {
|
||||||
|
return item.name == '班级管理'
|
||||||
|
})
|
||||||
|
if (banzhangIndex > -1) {
|
||||||
|
this.pageList.splice(banzhangIndex, 1)
|
||||||
|
}
|
||||||
|
var yonghuIndex = this.pageList.findIndex(item => {
|
||||||
|
return item.name == '我的班级'
|
||||||
|
})
|
||||||
|
if (yonghuIndex > -1) {
|
||||||
|
this.pageList.splice(yonghuIndex, 1)
|
||||||
|
}
|
||||||
if (res.isDirector) {
|
if (res.isDirector) {
|
||||||
var n = this.pageList.find(item => {
|
var n = this.pageList.find(item => {
|
||||||
return item.name == '主任教学'
|
return item.name == '主任教学'
|
||||||
@@ -445,58 +463,39 @@
|
|||||||
}
|
}
|
||||||
this.pageList.splice(3, 0, item);
|
this.pageList.splice(3, 0, item);
|
||||||
}
|
}
|
||||||
} else {
|
} else{
|
||||||
var zhurenIndex = this.pageList.findIndex(item => {
|
if (res.isMonitor) {
|
||||||
return item.name == '主任教学'
|
var n = this.pageList.find(item => {
|
||||||
})
|
return item.name == '班级管理'
|
||||||
if (zhurenIndex > -1) {
|
})
|
||||||
this.pageList.splice(zhurenIndex, 1)
|
console.log('班长n找到了么', n);
|
||||||
}
|
if (!n) {
|
||||||
}
|
var item = {
|
||||||
if (res.isMonitor) {
|
// 主任之外的人显示班级管理
|
||||||
var n = this.pageList.find(item => {
|
name: "班级管理",
|
||||||
return item.name == '班级管理'
|
url: "/pages/miniClass/miniClassMan?type=mine",
|
||||||
})
|
type: "pageJump",
|
||||||
console.log('班长n找到了么', n);
|
|
||||||
if (!n) {
|
|
||||||
var item = {
|
|
||||||
// 主任之外的人显示班级管理
|
|
||||||
name: "班级管理",
|
|
||||||
url: "/pages/miniClass/miniClassMan?type=mine",
|
|
||||||
type: "pageJump",
|
|
||||||
|
|
||||||
|
}
|
||||||
|
this.pageList.splice(3, 0, item);
|
||||||
}
|
}
|
||||||
this.pageList.splice(3, 0, item);
|
} else {
|
||||||
}
|
if(!res.isMonitor && !res.isDirector){
|
||||||
} else {
|
var n = this.pageList.find(item => {
|
||||||
var zhurenIndex = this.pageList.findIndex(item => {
|
return item.name == '我的班级'
|
||||||
return item.name == '班级管理'
|
})
|
||||||
})
|
console.log('我的班级找到了么', n);
|
||||||
if (zhurenIndex > -1) {
|
if (!n) {
|
||||||
this.pageList.splice(zhurenIndex, 1)
|
var item = {
|
||||||
}
|
// 主任之外的人显示班级管理
|
||||||
}
|
name: "我的班级",
|
||||||
if(!res.isMonitor && !res.isDirector){
|
url: "/pages/miniClass/myClassList?type=mine",
|
||||||
var n = this.pageList.find(item => {
|
type: "pageJump",
|
||||||
return item.name == '我的班级'
|
|
||||||
})
|
|
||||||
console.log('我的班级找到了么', n);
|
|
||||||
if (!n) {
|
|
||||||
var item = {
|
|
||||||
// 主任之外的人显示班级管理
|
|
||||||
name: "我的班级",
|
|
||||||
url: "/pages/miniClass/myClassList?type=mine",
|
|
||||||
type: "pageJump",
|
|
||||||
|
|
||||||
|
}
|
||||||
|
this.pageList.splice(3, 0, item);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.pageList.splice(3, 0, item);
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
var yonghuIndex = this.pageList.findIndex(item => {
|
|
||||||
return item.name == '我的班级'
|
|
||||||
})
|
|
||||||
if (yonghuIndex > -1) {
|
|
||||||
this.pageList.splice(yonghuIndex, 1)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -3,9 +3,16 @@
|
|||||||
<public-module></public-module>
|
<public-module></public-module>
|
||||||
<z-nav-bar title="班级详情"></z-nav-bar>
|
<z-nav-bar title="班级详情"></z-nav-bar>
|
||||||
<view class="mainContent" v-if="thisClass.id">
|
<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' :''
|
||||||
|
]">
|
||||||
|
班级状态:{{getClassStatus}}
|
||||||
|
</view>
|
||||||
<view class="className">
|
<view class="className">
|
||||||
<h3>{{thisClass.title}}</h3>
|
<h3>{{thisClass.title}}</h3>
|
||||||
<text class="tuichu" v-if="!isMonitor && !isDirector && isHave" @click="outClass()">退出班级</text>
|
<text class="tuichu" v-if="isHave && thisClass.state == 0" @click="outClass()">退出班级</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="otherItems flex_box">
|
<view class="otherItems flex_box">
|
||||||
<view><text class="ciyao">创建日期</text><text
|
<view><text class="ciyao">创建日期</text><text
|
||||||
@@ -16,16 +23,9 @@
|
|||||||
<text class="mainTxt" v-if="classModel.type == '1'">联合班</text>
|
<text class="mainTxt" v-if="classModel.type == '1'">联合班</text>
|
||||||
<text class="mainTxt" v-if="classModel.type == '2'">精英班</text>
|
<text class="mainTxt" v-if="classModel.type == '2'">精英班</text>
|
||||||
</view>
|
</view>
|
||||||
<view><text class="ciyao">班级人数</text><text class="mainTxt">{{thisClass.number}}人</text></view>
|
<view><text class="ciyao">人数</text><text class="mainTxt">{{students.length}}/{{thisClass.number}}人</text></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>
|
</view>
|
||||||
|
|
||||||
<view class="" v-if="thisClass.content != ''">
|
|
||||||
<text class="adminName">教学目标/班级简介</text>
|
|
||||||
</view>
|
|
||||||
<rich-text class="banjiJianjie" :nodes="formatRichText(thisClass.content)"></rich-text>
|
|
||||||
<!-- <view class="banjiJianjie" v-html="thisClass.content"></view> -->
|
|
||||||
|
|
||||||
<view class="mainBox">
|
<view class="mainBox">
|
||||||
<view class="">
|
<view class="">
|
||||||
<u-tabs v-if="tabList.length > 0" :class="['tabList']" @click="tabClick" :current="curTagIndex"
|
<u-tabs v-if="tabList.length > 0" :class="['tabList']" @click="tabClick" :current="curTagIndex"
|
||||||
@@ -33,7 +33,9 @@
|
|||||||
itemStyle="padding-left:10rpx; background-color:#fff; padding-right: 10rpx; height: 50px; font-size:26rpx"></u-tabs>
|
itemStyle="padding-left:10rpx; background-color:#fff; padding-right: 10rpx; height: 50px; font-size:26rpx"></u-tabs>
|
||||||
</view>
|
</view>
|
||||||
<!-- 课程列表 -->
|
<!-- 课程列表 -->
|
||||||
<view class="newBox" v-show="courses.length > 0 && tabId == '0'">
|
<view class="" v-if="tabId == '0'">
|
||||||
|
<uni-section class="mb-10 nobg nopad" title="班内课程" type="line"></uni-section>
|
||||||
|
<view class="newBox" v-show="courses.length > 0 ">
|
||||||
<view class="item flexbox" v-for="(item, index) in courses" :key="index"
|
<view class="item flexbox" v-for="(item, index) in courses" :key="index"
|
||||||
@click="onPageJump('/pages/course/courseDetail',item.id)">
|
@click="onPageJump('/pages/course/courseDetail',item.id)">
|
||||||
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
|
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
|
||||||
@@ -46,12 +48,17 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="jianjie" v-html="item.content"></view>
|
<view class="jianjie" v-html="item.content"></view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="" v-show="courses.length == 0 && tabId == '0'">
|
<view class="" v-show="courses.length == 0">
|
||||||
<u-divider text="暂无课程"></u-divider>
|
<u-divider text="暂无课程"></u-divider>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- <view class="" v-if="thisClass.content != ''">
|
||||||
|
<text class="adminName">教学目标/班级简介</text>
|
||||||
|
</view> -->
|
||||||
|
<uni-section class="mb-10 nobg" title="教学目标/班内简介" type="line"></uni-section>
|
||||||
|
<rich-text class="banjiJianjie" :nodes="formatRichText(thisClass.content)"></rich-text>
|
||||||
|
</view>
|
||||||
<!-- 班内问答 -->
|
<!-- 班内问答 -->
|
||||||
<view class="" v-if=" tabId == '1'">
|
<view class="" v-if=" tabId == '1'">
|
||||||
班内问答
|
班内问答
|
||||||
@@ -87,7 +94,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<!-- 班内任务 --><!-- 医案 --> <!-- 心得 -->
|
<!-- 班内任务 --><!-- 医案 --> <!-- 心得 -->
|
||||||
<view class="">
|
<view class="">
|
||||||
<view class="" v-if="tijiaoTitleId == 2" >
|
<view class="" v-if="tijiaoTitleId == 2 && thisClass.state != 2" >
|
||||||
<view class="noanser">
|
<view class="noanser">
|
||||||
<view class="">
|
<view class="">
|
||||||
<text>快来添加一条记录吧~</text>
|
<text>快来添加一条记录吧~</text>
|
||||||
@@ -244,7 +251,8 @@
|
|||||||
curTagIndex: 0,
|
curTagIndex: 0,
|
||||||
scrollable: false,
|
scrollable: false,
|
||||||
pPage:0,
|
pPage:0,
|
||||||
tabList: [{
|
// 已开班
|
||||||
|
tabList02: [{
|
||||||
name: '班内课程',
|
name: '班内课程',
|
||||||
id: '0'
|
id: '0'
|
||||||
},
|
},
|
||||||
@@ -260,6 +268,20 @@
|
|||||||
id: '3'
|
id: '3'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
// 待开班
|
||||||
|
tabList01: [{
|
||||||
|
name: '班内课程',
|
||||||
|
id: '0'
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// name: '班内讨论',
|
||||||
|
// id: '1'
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
name: '班内学员',
|
||||||
|
id: '2'
|
||||||
|
}
|
||||||
|
],
|
||||||
admins: {
|
admins: {
|
||||||
list: [],
|
list: [],
|
||||||
monitor: {},
|
monitor: {},
|
||||||
@@ -333,6 +355,30 @@
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(["userInfo"]),
|
...mapState(["userInfo"]),
|
||||||
|
getClassStatus(){
|
||||||
|
var _roleName = ''
|
||||||
|
switch (this.thisClass.state) {
|
||||||
|
case '0':
|
||||||
|
_roleName = '待开班';
|
||||||
|
break;
|
||||||
|
case '1':
|
||||||
|
_roleName = '学习中';
|
||||||
|
break;
|
||||||
|
case '2':
|
||||||
|
_roleName = '已结班';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return _roleName
|
||||||
|
}
|
||||||
|
,tabList(){
|
||||||
|
var list = []
|
||||||
|
if(this.thisClass.state == 0){
|
||||||
|
list = this.tabList01
|
||||||
|
}else{
|
||||||
|
list = this.tabList02
|
||||||
|
}
|
||||||
|
return list
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
editMyXinde(item){
|
editMyXinde(item){
|
||||||
@@ -423,7 +469,7 @@
|
|||||||
method: "POST",
|
method: "POST",
|
||||||
data: {
|
data: {
|
||||||
"limit": 10,
|
"limit": 10,
|
||||||
"page": 1,
|
"page": this.pPage,
|
||||||
"classId": this.thisClass.id,
|
"classId": this.thisClass.id,
|
||||||
"type": this.tijiaoTitleId+'', //类型 0班内任务1医案2心得
|
"type": this.tijiaoTitleId+'', //类型 0班内任务1医案2心得
|
||||||
"myExperience": this.myExperience, //0全部心得1我的心得
|
"myExperience": this.myExperience, //0全部心得1我的心得
|
||||||
@@ -437,7 +483,8 @@
|
|||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
if(res.page.records.length > 0){
|
if(res.page.records.length > 0){
|
||||||
console.log('数据获取成功',res.page.records);
|
console.log('数据获取成功',res.page.records);
|
||||||
this.taskList = res.page.records
|
var lis = res.page.records
|
||||||
|
this.taskList = this.taskList.concat(lis)
|
||||||
if(res.page.pages > 1){
|
if(res.page.pages > 1){
|
||||||
this.taskHaveMore = true
|
this.taskHaveMore = true
|
||||||
}
|
}
|
||||||
@@ -809,6 +856,10 @@
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
|
.classStatus{padding: 10rpx; color: #fff;}
|
||||||
|
.daikai{background-image: linear-gradient(90deg, #258feb 0%, rgba(255, 255, 255, 0.1) 80%, rgba(255, 255, 255, 0) 100% );}
|
||||||
|
.xuexizhong{background-image: linear-gradient(90deg, #55aa00 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% );}
|
||||||
.noanser{ padding: 20rpx;
|
.noanser{ padding: 20rpx;
|
||||||
background-color: rgba(255, 255, 255, .6);
|
background-color: rgba(255, 255, 255, .6);
|
||||||
text-align: center; border-bottom: 1px solid #eee;
|
text-align: center; border-bottom: 1px solid #eee;
|
||||||
@@ -907,6 +958,7 @@
|
|||||||
}
|
}
|
||||||
.leve2{
|
.leve2{
|
||||||
color: #666;
|
color: #666;
|
||||||
|
line-height: 56rpx;
|
||||||
@include bov(3)
|
@include bov(3)
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -926,7 +978,7 @@
|
|||||||
.nobg {
|
.nobg {
|
||||||
background-color: transparent !important;
|
background-color: transparent !important;
|
||||||
}
|
}
|
||||||
|
.nopad{padding-left: 0 !important;}
|
||||||
.bottomBox { border-top: 1px solid #eee;
|
.bottomBox { border-top: 1px solid #eee;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
padding: 20rpx 0;
|
padding: 20rpx 0;
|
||||||
|
|||||||
@@ -2,16 +2,85 @@
|
|||||||
<view>
|
<view>
|
||||||
<public-module></public-module>
|
<public-module></public-module>
|
||||||
<z-nav-bar title="班级详情"></z-nav-bar>
|
<z-nav-bar title="班级详情"></z-nav-bar>
|
||||||
|
|
||||||
<!-- <view class="" style="background-color: #f4f7ff; min-height: calc(100vh - 200rpx);"> -->
|
<!-- <view class="" style="background-color: #f4f7ff; min-height: calc(100vh - 200rpx);"> -->
|
||||||
<view class="mainContent" v-if="thisClass.id">
|
<view class="mainContent" v-if="thisClass.id">
|
||||||
<view class="className">
|
<!-- <view class="" style="height: 40rpx;">
|
||||||
<h3>{{thisClass.title}}</h3>
|
|
||||||
<text class="kaiban" v-if="thisClass.state == '0' && isMonitor || thisClass.state == '0' && isDirector"
|
|
||||||
@click="changeClassStatu('1')">开班</text>
|
|
||||||
<text class="jieban" v-if="thisClass.state == '1' && isMonitor || thisClass.state == '1' && isDirector"
|
|
||||||
@click="changeClassStatu('2')">结班</text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
|
</view> -->
|
||||||
|
<view :class="['classStatus',
|
||||||
|
this.thisClass.state == 0 ? 'daikai' :'',
|
||||||
|
this.thisClass.state == 1 ? 'xuexizhong' :'',
|
||||||
|
this.thisClass.state == 2 ? 'yijieban' :''
|
||||||
|
]">
|
||||||
|
{{getClassStatus}}
|
||||||
|
</view>
|
||||||
|
<view class="welComeText">
|
||||||
|
<text>【 班内职务:{{getRoleName}} 】</text>
|
||||||
|
</view>
|
||||||
|
<!-- 功能按钮 -->
|
||||||
|
<view class="optionsBtn">
|
||||||
|
<view class="flex_box">
|
||||||
|
<view class="item setBanewei" v-if="isDirector" @click="onPageJump('/pages/miniClass/memberSet',thisClass.id)">
|
||||||
|
<text>设置班委</text>
|
||||||
|
</view>
|
||||||
|
<!-- 主任、班长副班长修改班级 没开班的时候可以 -->
|
||||||
|
<view class="item editClass"
|
||||||
|
v-show="isDirector && thisClass.state == '0' ||
|
||||||
|
roleCode == 2 && thisClass.state == '0' ||
|
||||||
|
roleCode == 1 && thisClass.state == '0'
|
||||||
|
"
|
||||||
|
@click="onPageJump('/pages/miniClass/addClass',thisClass.id, classModel.type)">
|
||||||
|
<text>修改班级</text>
|
||||||
|
</view>
|
||||||
|
<!-- 主任、班长副班长可以开班或者结班 -->
|
||||||
|
<view class="item openClass" @click="changeClassStatu('1')"
|
||||||
|
v-if="thisClass.state == '0' && isMonitor ||
|
||||||
|
thisClass.state == '0' && roleCode == 1 ||
|
||||||
|
thisClass.state == '0' && roleCode == 2">
|
||||||
|
<text >开班</text>
|
||||||
|
</view>
|
||||||
|
<view class="item overClass" @click="changeClassStatu('2')"
|
||||||
|
v-if="thisClass.state == '1' && isMonitor ||
|
||||||
|
thisClass.state == '1' && roleCode == 1 ||
|
||||||
|
thisClass.state == '1' && roleCode == 2">
|
||||||
|
<text >结班</text>
|
||||||
|
</view>
|
||||||
|
<view class="item delClass" v-if="isDirector" @click="delClass()">
|
||||||
|
<text>删除班级</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 作业批改 -->
|
||||||
|
<view class="pingfenBox" v-if="isDirector || isMonitor">
|
||||||
|
<view class="flex_box">
|
||||||
|
<view class="item" @click="goPingfen('/pages/miniClass/taskList',thisClass.id, '0')">
|
||||||
|
<view class="img">
|
||||||
|
<image src="../../static/icon/pigai2.png" mode="widthFix"></image>
|
||||||
|
</view>
|
||||||
|
<text>作业</text>
|
||||||
|
</view>
|
||||||
|
<view class="item">
|
||||||
|
<view class="img">
|
||||||
|
<image src="../../static/icon/pigai1.png" mode="widthFix"></image>
|
||||||
|
</view>
|
||||||
|
<text>医案</text>
|
||||||
|
</view>
|
||||||
|
<view class="item">
|
||||||
|
<view class="img">
|
||||||
|
<image src="../../static/icon/pigai3.png" mode="widthFix"></image>
|
||||||
|
</view>
|
||||||
|
<text>心得</text>
|
||||||
|
</view>
|
||||||
|
<view class="item">
|
||||||
|
<view class="img">
|
||||||
|
<image src="../../static/icon/biaoxianfen.png" mode="widthFix"></image>
|
||||||
|
</view>
|
||||||
|
<text>表现</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="otherItems flex_box">
|
<view class="otherItems flex_box">
|
||||||
<view><text class="ciyao">创建日期</text><text
|
<view><text class="ciyao">创建日期</text><text
|
||||||
class="mainTxt">{{thisClass.createTime.substring(0,10)}}</text>
|
class="mainTxt">{{thisClass.createTime.substring(0,10)}}</text>
|
||||||
@@ -21,42 +90,11 @@
|
|||||||
<text class="mainTxt" v-if="classModel.type == '1'">联合班</text>
|
<text class="mainTxt" v-if="classModel.type == '1'">联合班</text>
|
||||||
<text class="mainTxt" v-if="classModel.type == '2'">精英班</text>
|
<text class="mainTxt" v-if="classModel.type == '2'">精英班</text>
|
||||||
</view>
|
</view>
|
||||||
<view><text class="ciyao">班级人数</text><text class="mainTxt">{{thisClass.number}}人</text></view>
|
<view><text class="ciyao">人数</text><text
|
||||||
|
class="mainTxt">{{students.length}}/{{thisClass.number}}人</text></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>
|
</view>
|
||||||
<!-- 作业批改 -->
|
|
||||||
<view class="pingfenBox" v-if="isDirector || isMonitor">
|
|
||||||
<view class="flex_box">
|
|
||||||
<view class="item" @click="goPingfen('/pages/miniClass/giveScore',thisClass.id, '0')">
|
|
||||||
<view class="img">
|
|
||||||
<image src="../../static/icon/pigai2.png" mode="widthFix"></image>
|
|
||||||
</view>
|
|
||||||
<text>作业评分</text>
|
|
||||||
</view>
|
|
||||||
<view class="item">
|
|
||||||
<view class="img">
|
|
||||||
<image src="../../static/icon/pigai1.png" mode="widthFix"></image>
|
|
||||||
</view>
|
|
||||||
<text>医案评分</text>
|
|
||||||
</view>
|
|
||||||
<view class="item">
|
|
||||||
<view class="img">
|
|
||||||
<image src="../../static/icon/pigai3.png" mode="widthFix"></image>
|
|
||||||
</view>
|
|
||||||
<text>心得评分</text>
|
|
||||||
</view>
|
|
||||||
<view class="item">
|
|
||||||
<view class="img">
|
|
||||||
<image src="../../static/icon/biaoxianfen.png" mode="widthFix"></image>
|
|
||||||
</view>
|
|
||||||
<text>表现评分</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="" v-if="thisClass.content != ''">
|
|
||||||
<text class="adminName">教学目标/班级简介</text>
|
|
||||||
</view>
|
|
||||||
<rich-text class="banjiJianjie" :nodes="formatRichText(thisClass.content)"></rich-text>
|
|
||||||
<!-- <view class="banjiJianjie" v-html="thisClass.content"></view> -->
|
<!-- <view class="banjiJianjie" v-html="thisClass.content"></view> -->
|
||||||
<view class="mainBox">
|
<view class="mainBox">
|
||||||
<!-- 课程列表 -->
|
<!-- 课程列表 -->
|
||||||
@@ -80,6 +118,8 @@
|
|||||||
<view class="" v-show="courses.length == 0">
|
<view class="" v-show="courses.length == 0">
|
||||||
<u-divider text="暂无课程"></u-divider>
|
<u-divider text="暂无课程"></u-divider>
|
||||||
</view>
|
</view>
|
||||||
|
<uni-section class="mb-10 nobg" title="教学目标/班级简介" type="line"></uni-section>
|
||||||
|
<rich-text class="banjiJianjie" :nodes="formatRichText(thisClass.content)"></rich-text>
|
||||||
<!-- 班内问答 -->
|
<!-- 班内问答 -->
|
||||||
<!-- <view class="" v-if=" tabId == '1'">
|
<!-- <view class="" v-if=" tabId == '1'">
|
||||||
班内问答
|
班内问答
|
||||||
@@ -88,33 +128,38 @@
|
|||||||
<uni-section class="mb-10 nobg" title="班内学员" type="line"></uni-section>
|
<uni-section class="mb-10 nobg" title="班内学员" type="line"></uni-section>
|
||||||
<view class="classMateBox" v-show="students.length> 0">
|
<view class="classMateBox" v-show="students.length> 0">
|
||||||
<view class="newBox">
|
<view class="newBox">
|
||||||
<view :class="['item','flexbox',
|
<view :class="['item',
|
||||||
item.vip == '1' ? 'superVip' : '',
|
item.student.vip == '1' ? 'superVip' : '',
|
||||||
item.vip == '2' ? 'wumenVip' : '',
|
item.student.vip == '2' ? 'wumenVip' : '',
|
||||||
item.vip == '3' ? 'zmVip' : '']" v-for="(item, index) in students" :key="index">
|
item.student.vip == '3' ? 'zmVip' : '']" v-for="(item, index) in students" :key="index">
|
||||||
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
|
<view class="flexbox">
|
||||||
<view class="classmateImg">
|
<view class="classmateImg">
|
||||||
<image v-if="item.avatar != null && item.avatar != ''" :src="item.avatar"
|
<image v-if="item.student.avatar != null && item.student.avatar != ''"
|
||||||
mode="aspectFit"></image>
|
:src="item.student.avatar" mode="aspectFit"></image>
|
||||||
<image v-else src="/static/icon/morenAvavter.png" mode="aspectFit"></image>
|
<image v-else src="/static/icon/morenAvavter.png" mode="aspectFit"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="textItems flex_box">
|
<view class="textItems flex_box">
|
||||||
<text class="txt555" v-if="item.nickname != null && item.nickname != ''">
|
<text class="txt555"
|
||||||
{{item.nickname}}
|
v-if="item.student.nickname != null && item.student.nickname != ''">
|
||||||
<template v-if="isDirector || isMonitor">
|
{{item.student.nickname}}
|
||||||
<text>({{item.tel}})</text> <text @click="outClass(item.id)"
|
<template v-if="isDirector || isMonitor">
|
||||||
class="outBtn">踢出班级</text>
|
<text>({{item.student.tel}})</text> <text @click="outClass(item.student.id)"
|
||||||
</template>
|
class="outBtn">踢出班级</text>
|
||||||
|
</template>
|
||||||
</text>
|
</text>
|
||||||
<text class="txt555" v-else>
|
<text class="txt555" v-else>
|
||||||
匿名用户
|
匿名用户
|
||||||
</text>
|
</text>
|
||||||
<text class="userType" v-if="item.vip == '1'">超级VIP用户</text>
|
<!-- <text class="userType" v-if="item.vip == '1'">超级VIP用户</text>
|
||||||
<text class="userType" v-if="item.vip == '2' ">医学VIP用户</text>
|
<text class="userType" v-if="item.vip == '2' ">医学VIP用户</text>
|
||||||
<text class="userType" v-if="item.vip == '3' ">国学VIP用户</text>
|
<text class="userType" v-if="item.vip == '3' ">国学VIP用户</text> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="courseBuyOrNo" v-if="item.buyState !='会员 ' ">
|
||||||
|
<view class="">
|
||||||
|
<text>{{ item.buyState }}</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -127,7 +172,7 @@
|
|||||||
<text :class="tijiaoTitleId == item.id ? 'active' :''" @click="titleClick(item,index)"
|
<text :class="tijiaoTitleId == item.id ? 'active' :''" @click="titleClick(item,index)"
|
||||||
v-for="(item, index) in tijiaoTitleList" :key="index">{{item.name}}</text>
|
v-for="(item, index) in tijiaoTitleList" :key="index">{{item.name}}</text>
|
||||||
</view>
|
</view>
|
||||||
<!-- 班内任务 --><!-- 医案 --> <!-- 心得 -->
|
<!-- 班内任务 --><!-- 医案 --> <!-- 心得 -->
|
||||||
<view class="">
|
<view class="">
|
||||||
|
|
||||||
<view v-if="taskList.length > 0">
|
<view v-if="taskList.length > 0">
|
||||||
@@ -135,14 +180,8 @@
|
|||||||
<view class="newBox">
|
<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="clickTask(item)">
|
||||||
<view class="leve1 flex_box">
|
<view class="leve1 flex_box">
|
||||||
<text>{{item.title}}</text><text v-if="isDirector || isMonitor" class="taskEdit" @click="taskEdit(item)">修改</text>
|
<text>{{item.title}}</text><text v-if="isDirector || isMonitor"
|
||||||
<!-- <view class="classmateImg">
|
class="taskEdit" @click="taskEdit(item)">修改</text>
|
||||||
<image v-if="item.avatar != null && item.avatar != ''" :src="item.avatar" mode="aspectFit"></image>
|
|
||||||
<image src="/static/icon/morenAvavter.png" mode="aspectFit"></image>
|
|
||||||
</view> -->
|
|
||||||
<!-- <view class="userName flex_box">
|
|
||||||
<text>匿名用户</text>
|
|
||||||
</view> -->
|
|
||||||
</view>
|
</view>
|
||||||
<view class="leve2">
|
<view class="leve2">
|
||||||
{{item.content}}
|
{{item.content}}
|
||||||
@@ -150,8 +189,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="showMore" v-show="true">
|
<view class="showMore" v-show="true">
|
||||||
<!-- <view class="showMore" v-show="taskHaveMore"> -->
|
<!-- <view class="showMore" v-show="taskHaveMore"> -->
|
||||||
<text @click="showmoreTask">查看全部 >></text>
|
<text @click="showmoreTask">查看全部 >></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -161,22 +200,10 @@
|
|||||||
<!-- <uni-section class="mb-10 nobg" title="提交的任务" type="line"></uni-section> -->
|
<!-- <uni-section class="mb-10 nobg" title="提交的任务" type="line"></uni-section> -->
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="bottomBox" v-if="!isHave && !isDirector && !isMonitor && students.length < thisClass.number">
|
|
||||||
<button type="primary" @click="addClass">一键加入班级</button>
|
|
||||||
</view>
|
|
||||||
<view class="bottomBox manBtnBox flex_box" v-if="isDirector || isMonitor">
|
|
||||||
<text class="set" @click="onPageJump('/pages/miniClass/memberSet',thisClass.id)">管理人员设置</text>
|
|
||||||
<template v-show="isDirector && thisClass.state == '0'">
|
|
||||||
<text class="edit"
|
|
||||||
@click="onPageJump('/pages/miniClass/addClass',thisClass.id, classModel.type)">修改班级</text>
|
|
||||||
<text class="del" @click="delClass()">删除班级</text>
|
|
||||||
</template>
|
|
||||||
</view>
|
|
||||||
<!-- 管理弹出 -->
|
<!-- 管理弹出 -->
|
||||||
<u-popup key="1" :show="showMan" :round="10" @close="closeManager">
|
<u-popup key="1" :show="showMan" :round="10" @close="closeManager">
|
||||||
<view class="guanli">
|
<view class="guanli">
|
||||||
@@ -228,8 +255,6 @@
|
|||||||
<uni-fab ref="fab" :pattern="pattern" :content="fabContent" :horizontal="horizontal" :vertical="vertical"
|
<uni-fab ref="fab" :pattern="pattern" :content="fabContent" :horizontal="horizontal" :vertical="vertical"
|
||||||
:direction="direction" @trigger="fabTrigger" @fabClick="fabClick" />
|
:direction="direction" @trigger="fabTrigger" @fabClick="fabClick" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<z-navigation v-if="!isDirector && !isMonitor"></z-navigation>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -326,8 +351,10 @@
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
tijiaoTitleId: '0',
|
tijiaoTitleId: '0',
|
||||||
taskList:[], // 任务列表
|
taskList: [], // 任务列表
|
||||||
taskHaveMore:false, // 是否还有更多
|
taskHaveMore: false, // 是否还有更多
|
||||||
|
roleCode: undefined,
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
@@ -351,15 +378,78 @@
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(["userInfo"]),
|
...mapState(["userInfo"]),
|
||||||
|
getRoleName() {
|
||||||
|
var _roleName = ''
|
||||||
|
switch (this.roleCode) {
|
||||||
|
case '66':
|
||||||
|
_roleName = '主任';
|
||||||
|
break;
|
||||||
|
case '0':
|
||||||
|
_roleName = '学员';
|
||||||
|
break;
|
||||||
|
case '1':
|
||||||
|
_roleName = '班长';
|
||||||
|
break;
|
||||||
|
case '2':
|
||||||
|
_roleName = '副班长';
|
||||||
|
break;
|
||||||
|
case '3':
|
||||||
|
_roleName = '学习委员';
|
||||||
|
break;
|
||||||
|
case '4':
|
||||||
|
_roleName = '评分员';
|
||||||
|
break;
|
||||||
|
case '5':
|
||||||
|
_roleName = '记分员';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return _roleName
|
||||||
|
},
|
||||||
|
getClassStatus(){
|
||||||
|
var _roleName = ''
|
||||||
|
switch (this.thisClass.state) {
|
||||||
|
case '0':
|
||||||
|
_roleName = '待开班';
|
||||||
|
break;
|
||||||
|
case '1':
|
||||||
|
_roleName = '学习中';
|
||||||
|
break;
|
||||||
|
case '2':
|
||||||
|
_roleName = '已结班';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return _roleName
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
goPingfen(url,classId,type){
|
// 获取真实的身份信息
|
||||||
|
getRealRole() {
|
||||||
|
$http.request({
|
||||||
|
url: "common/class/getUserRole",
|
||||||
|
method: "POST",
|
||||||
|
data: {
|
||||||
|
"classId": this.thisClass.id
|
||||||
|
},
|
||||||
|
header: { //默认 无 说明:请求头
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
console.log('res获取身份信息', res);
|
||||||
|
}).catch(e => {
|
||||||
|
uni.showToast({
|
||||||
|
title: '获取身份信息失败',
|
||||||
|
icon: 'error'
|
||||||
|
})
|
||||||
|
});
|
||||||
|
},
|
||||||
|
goPingfen(url, classId, type) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:`${url}?classId=${classId}&type=${type}`
|
url: `${url}?classId=${classId}&type=${type}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 点击作业或者医案,进入详细介绍
|
// 点击作业或者医案,进入详细介绍
|
||||||
clickTask(){
|
clickTask() {
|
||||||
|
|
||||||
},
|
},
|
||||||
delClass() {
|
delClass() {
|
||||||
@@ -409,8 +499,8 @@
|
|||||||
"limit": 20,
|
"limit": 20,
|
||||||
"page": 1,
|
"page": 1,
|
||||||
"classId": this.thisClass.id,
|
"classId": this.thisClass.id,
|
||||||
"type": textIndex+'', //类型 0班内任务1医案2心得
|
"type": textIndex + '', //类型 0班内任务1医案2心得
|
||||||
"title": ""
|
"title": ""
|
||||||
},
|
},
|
||||||
header: { //默认 无 说明:请求头
|
header: { //默认 无 说明:请求头
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
@@ -418,11 +508,11 @@
|
|||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
console.log('数据获取成功',res.page.records);
|
console.log('数据获取成功', res.page.records);
|
||||||
this.taskList = res.page.records
|
this.taskList = res.page.records
|
||||||
if(res.page.pages > 1){
|
if (res.page.pages > 1) {
|
||||||
this.taskHaveMore = true
|
this.taskHaveMore = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
console.log(e, '数据报错')
|
console.log(e, '数据报错')
|
||||||
@@ -440,6 +530,13 @@
|
|||||||
this.userMes = res.result;
|
this.userMes = res.result;
|
||||||
this.isMonitor = res.isMonitor
|
this.isMonitor = res.isMonitor
|
||||||
this.isDirector = res.isDirector
|
this.isDirector = res.isDirector
|
||||||
|
if (this.isDirector) {
|
||||||
|
this.roleCode = '66'
|
||||||
|
} else if (this.isMonitor) {
|
||||||
|
this.getRealRole()
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '获取用户信息失败',
|
title: '获取用户信息失败',
|
||||||
@@ -457,8 +554,8 @@
|
|||||||
tabClick(e) {
|
tabClick(e) {
|
||||||
console.log('e', e);
|
console.log('e', e);
|
||||||
this.tabId = e.id
|
this.tabId = e.id
|
||||||
if(e.id == 3){
|
if (e.id == 3) {
|
||||||
this.titleClick(undefined,0)
|
this.titleClick(undefined, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
@@ -495,38 +592,7 @@
|
|||||||
);
|
);
|
||||||
return newContent;
|
return newContent;
|
||||||
},
|
},
|
||||||
// 加入班级
|
|
||||||
addClass() {
|
|
||||||
$http.request({
|
|
||||||
url: "common/class/joinClass",
|
|
||||||
method: "POST",
|
|
||||||
data: {
|
|
||||||
"classId": this.classId,
|
|
||||||
},
|
|
||||||
header: { //默认 无 说明:请求头
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
},
|
|
||||||
})
|
|
||||||
.then(res => {
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.isHave = true
|
|
||||||
uni.showToast({
|
|
||||||
title: `加入成功!`,
|
|
||||||
icon: 'success'
|
|
||||||
})
|
|
||||||
setTimeout(() => {
|
|
||||||
this.getClassInfo()
|
|
||||||
}, 200)
|
|
||||||
}
|
|
||||||
}).catch(e => {
|
|
||||||
console.log(e, '数据报错')
|
|
||||||
// this.status = 3
|
|
||||||
uni.showToast({
|
|
||||||
title: `加入失败`,
|
|
||||||
icon: 'error'
|
|
||||||
})
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 显示班级成员
|
// 显示班级成员
|
||||||
seeManager() {
|
seeManager() {
|
||||||
this.showMan = true
|
this.showMan = true
|
||||||
@@ -604,7 +670,7 @@
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
taskEdit(item){
|
taskEdit(item) {
|
||||||
console.log('taskEdit'.item);
|
console.log('taskEdit'.item);
|
||||||
},
|
},
|
||||||
// 退出班级 // 踢出班级
|
// 退出班级 // 踢出班级
|
||||||
@@ -665,9 +731,9 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
showmoreTask(){
|
showmoreTask() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:`/pages/miniClass/classCaskList?id=${this.thisClass.id}&type=${this.tijiaoTitleId}`
|
url: `/pages/miniClass/classCaskList?id=${this.thisClass.id}&type=${this.tijiaoTitleId}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getClassInfo() {
|
getClassInfo() {
|
||||||
@@ -746,7 +812,10 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fabBox {}
|
.welComeText {
|
||||||
|
// padding: 6rpx 4rpx;
|
||||||
|
color: #e58d44;
|
||||||
|
}
|
||||||
|
|
||||||
::v-deep .uni-fab__content--other-platform,
|
::v-deep .uni-fab__content--other-platform,
|
||||||
::v-deep .uni-fab--rightBottom {
|
::v-deep .uni-fab--rightBottom {
|
||||||
@@ -766,7 +835,33 @@
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
.taskEdit{color: $themeColor; display: inline-block; padding-left: 20rpx;}
|
.optionsBtn{ margin: 20rpx 0;
|
||||||
|
.flex_box{justify-content: space-between;}
|
||||||
|
.item{margin-right: 20rpx; width: 100%; text-align: center; color: #fff; padding: 20rpx 0; border-radius: 6rpx;}
|
||||||
|
.delClass{background-color: #ffa4a6;}
|
||||||
|
.openClass{background-color: #67c23a;}
|
||||||
|
.overClass{background-color: #258feb;}
|
||||||
|
.editClass{background-color: #258feb;}
|
||||||
|
.setBanewei{background-color: #e7b772;}
|
||||||
|
}
|
||||||
|
.classStatus{padding: 10rpx; color: #fff; text-align: right;}
|
||||||
|
.daikai{background-image: linear-gradient(-90deg, #258feb 0%, rgba(255, 255, 255, 0.1) 80%, rgba(255, 255, 255, 0) 100% );}
|
||||||
|
.xuexizhong{background-image: linear-gradient(-90deg, #55aa00 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% );}
|
||||||
|
|
||||||
|
.courseBuyOrNo {
|
||||||
|
font-size: 28rpx;
|
||||||
|
border-top: 1px solid #eee;
|
||||||
|
padding-top: 10rpx;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.taskEdit {
|
||||||
|
color: $themeColor;
|
||||||
|
display: inline-block;
|
||||||
|
padding-left: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.pingfenBox {
|
.pingfenBox {
|
||||||
border: 2px dotted #bed4ee;
|
border: 2px dotted #bed4ee;
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
@@ -825,10 +920,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
.showMore{ width: 100%;
|
|
||||||
text-align: center; margin: 20rpx 0;
|
.showMore {
|
||||||
text{color: $themeColor;}
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
margin: 20rpx 0;
|
||||||
|
|
||||||
|
text {
|
||||||
|
color: $themeColor;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.submitRecode {
|
.submitRecode {
|
||||||
// padding: 20rpx;
|
// padding: 20rpx;
|
||||||
|
|
||||||
@@ -857,7 +959,8 @@
|
|||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
// .userName{}
|
// .userName{}
|
||||||
}
|
}
|
||||||
.leve2{
|
|
||||||
|
.leve2 {
|
||||||
color: #999;
|
color: #999;
|
||||||
@include bov()
|
@include bov()
|
||||||
}
|
}
|
||||||
@@ -869,7 +972,8 @@
|
|||||||
background-color: transparent !important;
|
background-color: transparent !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottomBox { border-top: 1px solid #eee;
|
.bottomBox {
|
||||||
|
border-top: 1px solid #eee;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
padding: 20rpx 0;
|
padding: 20rpx 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -889,7 +993,7 @@
|
|||||||
.mainContent {
|
.mainContent {
|
||||||
color: #333;
|
color: #333;
|
||||||
padding: 0 20rpx;
|
padding: 0 20rpx;
|
||||||
padding-bottom:120rpx;
|
padding-bottom: 120rpx;
|
||||||
background-image: linear-gradient(30deg, #d4eaf0 0%, #d4eaf0 50%, #fdf0ed 100%);
|
background-image: linear-gradient(30deg, #d4eaf0 0%, #d4eaf0 50%, #fdf0ed 100%);
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
@@ -1048,6 +1152,7 @@
|
|||||||
.tijiaoTitle {
|
.tijiaoTitle {
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
|
|
||||||
text {
|
text {
|
||||||
display: block;
|
display: block;
|
||||||
width: 30%;
|
width: 30%;
|
||||||
@@ -1127,17 +1232,5 @@
|
|||||||
top: 20rpx;
|
top: 20rpx;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
text.kaiban {
|
|
||||||
background-color: #67c23a;
|
|
||||||
}
|
|
||||||
|
|
||||||
text.jieban {
|
|
||||||
background-color: $themeColor
|
|
||||||
}
|
|
||||||
|
|
||||||
text.tuichu {
|
|
||||||
background-color: #f4a2a6;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -5,29 +5,35 @@
|
|||||||
<z-nav-bar title="班级列表">
|
<z-nav-bar title="班级列表">
|
||||||
</z-nav-bar>
|
</z-nav-bar>
|
||||||
<view style="padding: 20rpx; background-color: #fff; border-bottom: 1px solid #eee;">当前课程:{{courseTitle}}</view>
|
<view style="padding: 20rpx; background-color: #fff; border-bottom: 1px solid #eee;">当前课程:{{courseTitle}}</view>
|
||||||
<view class="tabsBox" :class="[fixed ? 'fixed' : '' ]">
|
<!-- <view class="tabsBox" :class="[fixed ? 'fixed' : '' ]">
|
||||||
<u-tabs v-if="tabList.length > 0" :class="['tabList']" @click="fatherClick" :current="curTagId"
|
<u-tabs v-if="tabList.length > 0" :class="['tabList']" @click="fatherClick" :current="curTagId"
|
||||||
:activeStyle="activeStyle" :scrollable="scrollable" :list="tabList"
|
:activeStyle="activeStyle" :scrollable="scrollable" :list="tabList"
|
||||||
itemStyle="padding-left: 15px; background-color:#fff; padding-right: 15px; height: 50px;"></u-tabs>
|
itemStyle="padding-left: 15px; background-color:#fff; padding-right: 15px; height: 50px;"></u-tabs>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="containerBg">
|
<view class="containerBg">
|
||||||
<view class="subCate flex" v-if="subList.length> 0">
|
<!-- <view class="subCate flex" v-if="subList.length> 0">
|
||||||
<text :class="['item',subTabId == item.id ? 'active' : '']" v-for="(item, index) in subList"
|
<text :class="['item',subTabId == item.id ? 'active' : '']" v-for="(item, index) in subList"
|
||||||
@click="curseClick(item)" :key="index">{{item.title}}</text>
|
@click="curseClick(item)" :key="index">{{item.title}}</text>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="learnBox box">
|
<view class="learnBox box">
|
||||||
<view class="newBox">
|
<view class="newBox">
|
||||||
<view class="item flexbox" v-for="(item, index) in courseList" :key="index" >
|
<view class="item flexbox" v-for="(item, index) in courseList" :key="index" >
|
||||||
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
|
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
|
||||||
<view class="imgcontainer" v-if="item.icon != ''" @click="onPageJump('/pages/miniClass/classInfo',item.id, 'isNotHave')">
|
<view class="imgcontainer" v-if="item.icon != ''" @click="onPageJump('/pages/miniClass/classInfo',item.id)">
|
||||||
<image :src="item.icon" mode="aspectFit"></image>
|
<image :src="item.icon" mode="aspectFit"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="imgcontainer defaultImg" v-else @click="onPageJump('/pages/miniClass/classInfo',item.id, 'isNotHave')">
|
<view class="imgcontainer defaultImg" v-else @click="onPageJump('/pages/miniClass/classInfo',item.id)">
|
||||||
<image src="@/static/my_04.png" mode="aspectFit"></image>
|
<image src="@/static/my_04.png" mode="aspectFit"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="buyItems">
|
<view class="buyItems">
|
||||||
<view class="txt555" @click="onPageJump('/pages/miniClass/classInfo',item.id, 'isNotHave')">
|
<view class="">
|
||||||
{{item.title}}
|
<text >【联合班】</text>
|
||||||
|
<text v-show="item.type == 0">【普通班】</text>
|
||||||
|
<text v-show="item.type == 1">【联合班】</text>
|
||||||
|
<text v-show="item.type == 2">【精英班】</text>
|
||||||
|
<text class="txt555" @click="onPageJump('/pages/miniClass/classInfo',item.id)">
|
||||||
|
{{item.title}}
|
||||||
|
</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="jianjie">
|
<view class="jianjie">
|
||||||
目标学员人数:{{item.number}} 人
|
目标学员人数:{{item.number}} 人
|
||||||
@@ -35,8 +41,8 @@
|
|||||||
<!-- <view class="jianjie" v-html="item.content">
|
<!-- <view class="jianjie" v-html="item.content">
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="btn_box" >
|
<view class="btn_box" >
|
||||||
<text v-show="item.state == '0'" @click="addClass(item.id)">一键加入</text>
|
<text v-show="item.state == '0'" @click.stop="addClass(item.id)">一键加入</text>
|
||||||
<text class="seeInfo" @click="onPageJump('/pages/miniClass/classInfo',item.id,'isNotHave')">查看班内情况</text>
|
<!-- <text class="seeInfo" @click="onPageJump('/pages/miniClass/classInfo',item.id)">查看班内情况</text> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -176,7 +182,6 @@
|
|||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.isHave = true
|
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: `加入成功!`,
|
title: `加入成功!`,
|
||||||
icon: 'success'
|
icon: 'success'
|
||||||
@@ -191,8 +196,8 @@
|
|||||||
console.log(e, '数据报错')
|
console.log(e, '数据报错')
|
||||||
// this.status = 3
|
// this.status = 3
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: `加入失败`,
|
title: '加入失败',
|
||||||
icon: 'error'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -230,8 +235,8 @@
|
|||||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||||
data: {
|
data: {
|
||||||
"courseId": Number(this.courseId),
|
"courseId": Number(this.courseId),
|
||||||
"state": this.subTabId, //小班状态0待开班1已开班2完成
|
"state": '', //小班状态0待开班1已开班2完成
|
||||||
"type": this.curTagId // 班类型 0小班 1联合班 2精英班
|
"type": '' // 班类型 0小班 1联合班 2精英班
|
||||||
},
|
},
|
||||||
header: { //默认 无 说明:请求头
|
header: { //默认 无 说明:请求头
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
|
|||||||
@@ -1,125 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view>
|
|
||||||
<z-nav-bar :title="pageName"></z-nav-bar>
|
|
||||||
<view class="">
|
|
||||||
<!-- <uni-section title="左侧滑出" type="line"> -->
|
|
||||||
<view class="example-body">
|
|
||||||
<view class="haveNoSelected">
|
|
||||||
<view class="flex_box" style="text-align: center; align-items: center; justify-content: center; width: 100%; background-color: #eee; padding: 40rpx 0;">
|
|
||||||
<button type="primary" @click="showDrawer('showLeft')" size="mini"><text class="word-btn-white">选择任务</text>
|
|
||||||
</button>
|
|
||||||
</view>
|
|
||||||
<text style="display: inline-block; margin-top: 40rpx;">
|
|
||||||
操作步骤:<br/>
|
|
||||||
1、点击上面的选择按钮,在弹出的面板中选择要评分的内容<br/>
|
|
||||||
2、点击要评分的内容,会列出学员提交的内容,评分员可点击对应的提交内容进行评分
|
|
||||||
</text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<uni-drawer ref="showLeft" mode="left" :width="300" @change="change($event,'showLeft')">
|
|
||||||
<view class="scroll-view">
|
|
||||||
<scroll-view class="scroll-view-box" scroll-y="true">
|
|
||||||
<view class="info">
|
|
||||||
<text class="info-text">右侧遮罩只能通过按钮关闭,不能通过点击遮罩关闭</text>
|
|
||||||
</view>
|
|
||||||
<view class="close">
|
|
||||||
<button @click="closeDrawer('showRight')"><text class="word-btn-white">关闭Drawer</text></button>
|
|
||||||
</view>
|
|
||||||
<view class="info-content" v-for="item in 100" :key="item">
|
|
||||||
<text>可滚动内容 {{item}}</text>
|
|
||||||
</view>
|
|
||||||
<!-- <view class="close">
|
|
||||||
<button @click="closeDrawer('showRight')"><text class="word-btn-white">关闭Drawer</text></button>
|
|
||||||
</view> -->
|
|
||||||
</scroll-view>
|
|
||||||
</view>
|
|
||||||
</uni-drawer>
|
|
||||||
</view>
|
|
||||||
<!-- </uni-section> -->
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
classId:undefined,
|
|
||||||
pageType:undefined,
|
|
||||||
showRight: false,
|
|
||||||
showLeft: false,
|
|
||||||
pageName:''
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onLoad(e) {
|
|
||||||
this.classId = e.classId
|
|
||||||
this.pageType = e.type
|
|
||||||
if(e.type == '0'){
|
|
||||||
this.pageName = '任务评分'
|
|
||||||
}else if(this.pageName = '医案评分'){
|
|
||||||
|
|
||||||
}else{
|
|
||||||
this.pageName = '心得评分'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onBackPress() {
|
|
||||||
if (this.showRight || this.showLeft) {
|
|
||||||
this.$refs.showLeft.close()
|
|
||||||
this.$refs.showRight.close()
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
// 打开窗口
|
|
||||||
showDrawer(e) {
|
|
||||||
this.$refs[e].open()
|
|
||||||
},
|
|
||||||
// 关闭窗口
|
|
||||||
closeDrawer(e) {
|
|
||||||
this.$refs[e].close()
|
|
||||||
},
|
|
||||||
// 抽屉状态发生变化触发
|
|
||||||
change(e, type) {
|
|
||||||
console.log((type === 'showLeft' ? '左窗口' : '右窗口') + (e ? '打开' : '关闭'));
|
|
||||||
this[type] = e
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.example-body {
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
.scroll-view {
|
|
||||||
/* #ifndef APP-NVUE */
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
/* #endif */
|
|
||||||
flex:1
|
|
||||||
}
|
|
||||||
// 处理抽屉内容滚动
|
|
||||||
.scroll-view-box {
|
|
||||||
flex: 1;
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
}
|
|
||||||
.info {
|
|
||||||
padding: 15px;
|
|
||||||
color: #666;
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-text {
|
|
||||||
font-size: 14px;
|
|
||||||
color: #666;
|
|
||||||
}
|
|
||||||
.info-content {
|
|
||||||
padding: 5px 15px;
|
|
||||||
}
|
|
||||||
.close {
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="learnBox box">
|
<view class="learnBox box">
|
||||||
<view class="newBox" v-if="classList.length > 0">
|
<view class="newBox" v-if="classList.length > 0">
|
||||||
<view class="item flexbox" v-for="(item, index) in classList" :key="index" >
|
<view class="item flexbox" v-for="(item, index) in classList" :key="index" @click="onPageJump('/pages/miniClass/classInfoMan',item.id)">
|
||||||
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
|
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
|
||||||
<view class="imgcontainer" v-if="item.icon != ''">
|
<view class="imgcontainer" v-if="item.icon != ''">
|
||||||
<image :src="item.icon" mode="aspectFit"></image>
|
<image :src="item.icon" mode="aspectFit"></image>
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
<image src="@/static/my_04.png" mode="aspectFit"></image>
|
<image src="@/static/my_04.png" mode="aspectFit"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="buyItems">
|
<view class="buyItems">
|
||||||
<view class="txt555" @click="onPageJump('/pages/miniClass/classInfoMan',item.id)">
|
<view class="txt555" >
|
||||||
{{item.title}}
|
{{item.title}}
|
||||||
</view>
|
</view>
|
||||||
<view class="jianjie">
|
<view class="jianjie">
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
</view> -->
|
</view> -->
|
||||||
<view class="btn_box" >
|
<view class="btn_box" >
|
||||||
<!-- <text @click="enterClass" v-show="item.state == '0'">一键加入</text> -->
|
<!-- <text @click="enterClass" v-show="item.state == '0'">一键加入</text> -->
|
||||||
<text class="seeInfo" @click="onPageJump('/pages/miniClass/classInfoMan',item.id)">进入班级</text>
|
<text class="seeInfo" >进入班级</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -6,11 +6,11 @@
|
|||||||
<!-- <view class="curseSet" slot="right" @click="shuomingPage('/pages/course/courseSet',tagId,pid)"> -->
|
<!-- <view class="curseSet" slot="right" @click="shuomingPage('/pages/course/courseSet',tagId,pid)"> -->
|
||||||
<!-- <uni-icons type="info" size="24"></uni-icons> 课程说明</view> -->
|
<!-- <uni-icons type="info" size="24"></uni-icons> 课程说明</view> -->
|
||||||
</z-nav-bar>
|
</z-nav-bar>
|
||||||
<view class="tabsBox" :class="[fixed ? 'fixed' : '' ]">
|
<!-- <view class="tabsBox" :class="[fixed ? 'fixed' : '' ]">
|
||||||
<u-tabs v-if="tabList.length > 0" :class="['tabList']" @click="fatherClick" :current="curTagId"
|
<u-tabs v-if="tabList.length > 0" :class="['tabList']" @click="fatherClick" :current="curTagId"
|
||||||
:activeStyle="activeStyle" :scrollable="scrollable" :list="tabList"
|
:activeStyle="activeStyle" :scrollable="scrollable" :list="tabList"
|
||||||
itemStyle="padding-left: 15px; background-color:#fff; padding-right: 15px; height: 50px;"></u-tabs>
|
itemStyle="padding-left: 15px; background-color:#fff; padding-right: 15px; height: 50px;"></u-tabs>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="containerBg">
|
<view class="containerBg">
|
||||||
<view class="subCate flex" v-if="subList.length> 0">
|
<view class="subCate flex" v-if="subList.length> 0">
|
||||||
<text :class="['item',subTabId == item.id ? 'active' : '']" v-for="(item, index) in subList"
|
<text :class="['item',subTabId == item.id ? 'active' : '']" v-for="(item, index) in subList"
|
||||||
@@ -27,8 +27,14 @@
|
|||||||
<image src="@/static/my_04.png" mode="aspectFit"></image>
|
<image src="@/static/my_04.png" mode="aspectFit"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="buyItems" >
|
<view class="buyItems" >
|
||||||
<view class="txt555">
|
<view class="">
|
||||||
{{item.title}}
|
<text >【联合班】</text>
|
||||||
|
<text v-show="item.type == 0">【普通班】</text>
|
||||||
|
<text v-show="item.type == 1">【联合班】</text>
|
||||||
|
<text v-show="item.type == 2">【精英班】</text>
|
||||||
|
<text class="txt555" @click="onPageJump('/pages/miniClass/classInfo',item.id)">
|
||||||
|
{{item.title}}
|
||||||
|
</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="jianjie">
|
<view class="jianjie">
|
||||||
目标学员人数:{{item.number}} 人
|
目标学员人数:{{item.number}} 人
|
||||||
@@ -217,7 +223,7 @@
|
|||||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||||
data: {
|
data: {
|
||||||
"state": this.subTabId, //小班状态0待开班1已开班2完成
|
"state": this.subTabId, //小班状态0待开班1已开班2完成
|
||||||
"type": this.curTagId // 班类型 0小班 1联合班 2精英班
|
"type": '' // 班类型 0小班 1联合班 2精英班
|
||||||
},
|
},
|
||||||
header: { //默认 无 说明:请求头
|
header: { //默认 无 说明:请求头
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
|
|||||||
@@ -305,7 +305,7 @@
|
|||||||
method: "POST",
|
method: "POST",
|
||||||
data: {
|
data: {
|
||||||
"limit": 10,
|
"limit": 10,
|
||||||
"page": 1,
|
"page": this.pPage,
|
||||||
"taskId": this.thisTask.id,
|
"taskId": this.thisTask.id,
|
||||||
"myReply": this.listDisplay //0全部作业1我的作业
|
"myReply": this.listDisplay //0全部作业1我的作业
|
||||||
},
|
},
|
||||||
|
|||||||
588
pages/miniClass/taskDetailForMan.vue
Normal file
588
pages/miniClass/taskDetailForMan.vue
Normal file
@@ -0,0 +1,588 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<public-module></public-module>
|
||||||
|
<z-nav-bar title="医案详情"></z-nav-bar>
|
||||||
|
<!-- <view class="" style="background-color: #f4f7ff; min-height: calc(100vh - 200rpx);"> -->
|
||||||
|
<view class="mainContent" v-if="thisTask.id">
|
||||||
|
<view class="" style="height:40rpx;">
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view class="taskBox">
|
||||||
|
<h3>题目内容</h3>
|
||||||
|
<view class="taskTitle">
|
||||||
|
{{thisTask.title}}
|
||||||
|
</view>
|
||||||
|
<view class="imgBox flex_box" v-if="FileList11.length > 0">
|
||||||
|
<view class="item" v-for="(item, index) in FileList11" :key="index">
|
||||||
|
<image @click="previewImage(item.url)" :src="item.url" mode="widthFix"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="taskContent" v-html="thisTask.content">
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 提交记录 -->
|
||||||
|
<view >
|
||||||
|
<view class="studentListBox" v-if="thisTask.students && thisTask.students.length > 0">
|
||||||
|
<view class="newBox flex_box" >
|
||||||
|
<view class="item " v-for="(item, index) in thisTask.students" @click="clickStudents(item)">
|
||||||
|
<view class="leve1 " >
|
||||||
|
<view class="userName">
|
||||||
|
<text v-if="item.nickname != '' && item.nickname != null">匿名用户</text>
|
||||||
|
<text v-else>匿名用户</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<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>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<u-popup key="1" :show="showEditBlank" :round="10" @close="closePup" ref="">
|
||||||
|
<view class="" style="padding: 40rpx; max-height: 80vh; overflow-y:scroll">
|
||||||
|
<view class="anserBox" >
|
||||||
|
<h3>我的答案</h3>
|
||||||
|
<uni-forms :modelValue="form" :rules="rules" ref="form">
|
||||||
|
<view class="input_box">
|
||||||
|
<uni-forms-item label="" name="content" label-width="0">
|
||||||
|
<text class="input_tit"><i>*</i>内容:<span
|
||||||
|
style="font-weight: normal; color: #999; font-size: 26rpx;">(600字以内)</span></text>
|
||||||
|
<view class="in">
|
||||||
|
<view class="uni-textarea">
|
||||||
|
<textarea placeholder-style="font-size:26rpx" v-model="form.content" maxlength="600"
|
||||||
|
auto-height placeholder="请输入内容" />
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</uni-forms-item>
|
||||||
|
</view>
|
||||||
|
<view class="input_box">
|
||||||
|
<text class="input_tit">上传图片:</text>
|
||||||
|
<view class="in" style="border: none;" @click="checkPermision">
|
||||||
|
<u-upload :fileList="fileList1" @afterRead="addPic" @delete="deletePic" multiple
|
||||||
|
:maxCount="4" width="40" height="40" :previewFullImage="true">
|
||||||
|
</u-upload>
|
||||||
|
<!-- <text style="font-size: 24rpx; color: #999;">可上传4张问题截图</text> -->
|
||||||
|
</view>
|
||||||
|
<!-- <input type="password" maxlength="8" v-model="confirmPassword" placeholder="请确认密码" /> -->
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="input_box">
|
||||||
|
<radio-group @change="radioChange" class="flex_box">
|
||||||
|
<view class="" style="margin-right:20rpx ;">
|
||||||
|
<radio value="0" :checked="0 == form.display" />他人不可见</label>
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
<radio value="1" :checked="1 == form.display" />他人可见</label>
|
||||||
|
</view>
|
||||||
|
</radio-group>
|
||||||
|
<span
|
||||||
|
style="color: #999; font-size: 28rpx; margin-top: 20rpx; display: block;">(不勾选时,班级管理员以外的人看不见提交的内容)</span>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</uni-forms>
|
||||||
|
<view class="btn_box"><button @click="onSubmit">提 交</button></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
|
<z-navigation></z-navigation>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const taskinfo1 = require('@/data/manTaskInfo.json')
|
||||||
|
import $http from '@/config/requestConfig.js';
|
||||||
|
import {
|
||||||
|
mapState
|
||||||
|
} from "vuex";
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showEditBlank:false,
|
||||||
|
studentList:[],
|
||||||
|
loadFlag:false,
|
||||||
|
thisTask: {},
|
||||||
|
status: 88,
|
||||||
|
TaskId: undefined,
|
||||||
|
userMes: undefined,
|
||||||
|
FileList11: [],
|
||||||
|
fileList1: [],
|
||||||
|
pPage: 0,
|
||||||
|
form: {
|
||||||
|
taskId: undefined,
|
||||||
|
id: undefined,
|
||||||
|
display: "1", //0不展示1展示
|
||||||
|
content: "",
|
||||||
|
img: ""
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
content: {
|
||||||
|
rules: [{
|
||||||
|
required: true,
|
||||||
|
errorMessage: '请输入回答内容',
|
||||||
|
}
|
||||||
|
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
listDisplay: '1', // 提交记录展示类型 0 全部 1 自己的
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(e) {
|
||||||
|
uni.hideTabBar();
|
||||||
|
// this.thisTask = JSON.parse(e.options)
|
||||||
|
console.log('e',e)
|
||||||
|
if(e.id){
|
||||||
|
this.thisTask.id = e.id
|
||||||
|
this.getTaskInfo()
|
||||||
|
this.getstudentList()
|
||||||
|
}
|
||||||
|
|
||||||
|
// console.log('this.FileList', this.FileList)
|
||||||
|
// this.TaskId = e.id
|
||||||
|
this.getUserInfo()
|
||||||
|
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
if (this.status != 2 && this.status != 3) {
|
||||||
|
this.getstudentList()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onPullDownRefresh() {
|
||||||
|
// this.getTaskInfo()
|
||||||
|
uni.stopPullDownRefresh()
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.form.taskId = this.thisTask.id
|
||||||
|
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(["userInfo"]),
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 获取医案任务详情
|
||||||
|
getTaskInfo(){
|
||||||
|
$http.request({
|
||||||
|
url: "common/class/getClassTaskInfo",
|
||||||
|
method: "POST",
|
||||||
|
data: {
|
||||||
|
"taskId": this.thisTask.id
|
||||||
|
},
|
||||||
|
header: { //默认 无 说明:请求头
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
// that.isHave = true
|
||||||
|
// console.log(res)
|
||||||
|
// this.thisTask = res.classTask
|
||||||
|
this.thisTask = taskinfo1.classTask
|
||||||
|
this.fileList11 = []
|
||||||
|
if (this.thisTask.img != '') {
|
||||||
|
var imgs = this.thisTask.img.split(',')
|
||||||
|
imgs = imgs.forEach((item, index) => {
|
||||||
|
this.FileList11.push({
|
||||||
|
url: item
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
console.log('thisTask',this.thisTask);
|
||||||
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
console.log(e, '数据报错')
|
||||||
|
// this.status = 3
|
||||||
|
uni.showToast({
|
||||||
|
title: e.msg,
|
||||||
|
icon: 'error'
|
||||||
|
})
|
||||||
|
});
|
||||||
|
},
|
||||||
|
closePup(){
|
||||||
|
this.showEditBlank = false
|
||||||
|
this.form = {
|
||||||
|
taskId: undefined,
|
||||||
|
id: undefined,
|
||||||
|
display: "1", //0不展示1展示
|
||||||
|
content: "",
|
||||||
|
img: ""
|
||||||
|
}
|
||||||
|
this.fileList1 = []
|
||||||
|
},
|
||||||
|
deletePic(event) {
|
||||||
|
this.fileList1.splice(event.index, 1)
|
||||||
|
},
|
||||||
|
editOrAdd(item){
|
||||||
|
console.log('item', item);
|
||||||
|
if(item){
|
||||||
|
this.form = item
|
||||||
|
this.fileList1 = [...item.fileList]
|
||||||
|
console.log('fileList4545',item.fileList);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
console.log('form', this.form);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.showEditBlank = true
|
||||||
|
},
|
||||||
|
radioChange1(e){
|
||||||
|
|
||||||
|
this.listDisplay = e.detail.value
|
||||||
|
console.log('点了',e);
|
||||||
|
this.pPage = 0
|
||||||
|
this.studentList = []
|
||||||
|
this.getstudentList()
|
||||||
|
},
|
||||||
|
previewImage(url) {
|
||||||
|
console.log(url);
|
||||||
|
uni.previewImage({
|
||||||
|
urls: [url],
|
||||||
|
longPressActions: {
|
||||||
|
itemList: ["很抱歉,暂不支持保存图片到本地"],
|
||||||
|
success: function(res) {
|
||||||
|
// console.log(res,'+++++')
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getstudentList() {
|
||||||
|
this.status = 1;
|
||||||
|
if (this.loadFlag) {
|
||||||
|
console.log("有未完成的进程");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
uni.showLoading({
|
||||||
|
title:'加载中'
|
||||||
|
})
|
||||||
|
this.loadFlag = true;
|
||||||
|
this.pPage++;
|
||||||
|
$http.request({
|
||||||
|
url: 'common/class/getReplyListByTaskIdStudent',
|
||||||
|
method: "POST",
|
||||||
|
data: {
|
||||||
|
"limit": 10,
|
||||||
|
"page": this.pPage,
|
||||||
|
"taskId": this.thisTask.id,
|
||||||
|
"myReply": this.listDisplay //0全部作业1我的作业
|
||||||
|
},
|
||||||
|
header: { //默认 无 说明:请求头
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
if(res.page.records.length > 0){
|
||||||
|
var list = res.page.records
|
||||||
|
list.forEach(item => {
|
||||||
|
item.fileList = []
|
||||||
|
if(item.img != ''){
|
||||||
|
var _urs = item.img.split(',')
|
||||||
|
_urs.forEach(item1 => {
|
||||||
|
item.fileList.push({url:item1})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.studentList = this.studentList.concat(list)
|
||||||
|
console.log('chulihoude ',this.studentList);
|
||||||
|
if (res.page.pages > this.pPage) {
|
||||||
|
this.status = 0;
|
||||||
|
} else {
|
||||||
|
this.status = 2;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
this.status = 3; // 暂无数据
|
||||||
|
}
|
||||||
|
this.loadFlag = false;
|
||||||
|
console.log('res', res);
|
||||||
|
uni.hideLoading()
|
||||||
|
}).catch(e => {
|
||||||
|
uni.hideLoading()
|
||||||
|
this.loadFlag = false;
|
||||||
|
// console.log('表单错误信息:', err);
|
||||||
|
uni.showToast({
|
||||||
|
title: '获取作业列表失败',
|
||||||
|
icon:'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
getUserInfo() {
|
||||||
|
// 获取个人信息
|
||||||
|
if (this.userInfo.id != undefined) {
|
||||||
|
this.$http.post("common/user/getUserInfo").then((res) => {
|
||||||
|
this.userMes = res.result
|
||||||
|
}).catch(e => {
|
||||||
|
uni.showToast({
|
||||||
|
title: '获取用户信息失败',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 跳转
|
||||||
|
onPageJump(url, id, modeType) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `${url}?id=${id}&type=${modeType}`
|
||||||
|
});
|
||||||
|
},
|
||||||
|
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(',')
|
||||||
|
}
|
||||||
|
var _url = ""
|
||||||
|
this.form.id ? _url =
|
||||||
|
'common/class/editClassTaskReply' : _url = 'common/class/addClassTaskReply'
|
||||||
|
var data = {
|
||||||
|
"taskId": this.form.id ? undefined : this.form.taskId,
|
||||||
|
"id": this.form.id,
|
||||||
|
"display": this.form.display, //0不展示1展示
|
||||||
|
"content": this.form.content,
|
||||||
|
"img": this.form.img
|
||||||
|
}
|
||||||
|
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 = []
|
||||||
|
this.closePup()
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.pPage = 0
|
||||||
|
this.studentList = []
|
||||||
|
this.getTaskInfo()
|
||||||
|
this.getstudentList()
|
||||||
|
},200)
|
||||||
|
}).catch(e => {
|
||||||
|
uni.showToast({
|
||||||
|
title: '操作失败',
|
||||||
|
icon: 'error'
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}).catch(err => {
|
||||||
|
console.log('表单错误信息:', err);
|
||||||
|
uni.showToast({
|
||||||
|
title: '页面有未填写的内容哦',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
clickStudents(item){
|
||||||
|
console.log('item',item);
|
||||||
|
},
|
||||||
|
addPic(e) {
|
||||||
|
let that = this;
|
||||||
|
console.log("添加图片", that.fileList1);
|
||||||
|
for (var i = 0; i < e.file.length; i++) {
|
||||||
|
console.log(i,e.file[i].url)
|
||||||
|
uni.uploadFile({
|
||||||
|
url: this.$baseUrl + "oss/fileoss",
|
||||||
|
filePath: e.file[i].url,
|
||||||
|
//files:e.file,
|
||||||
|
name: "file",
|
||||||
|
formData: {},
|
||||||
|
success: (res) => {
|
||||||
|
// console.log("添加图片", this.fileList1);
|
||||||
|
that.fileList1.push({
|
||||||
|
url: JSON.parse(res.data).url,
|
||||||
|
});
|
||||||
|
console.log(that.fileList1, "that.uploadPicLIst");
|
||||||
|
},
|
||||||
|
fail: (error) => {
|
||||||
|
console.log("上传失败", error);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async checkPermision() {
|
||||||
|
var result = await permission.premissionCheck("CAMERA_EXTERNAL_STORAGE")
|
||||||
|
if (result != 1) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
radioChange(e) {
|
||||||
|
this.form.display = e.detail.value
|
||||||
|
console.log('点了', this.form.display, e);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import "@/style/mixin.scss";
|
||||||
|
|
||||||
|
.flexbox {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
i {
|
||||||
|
color: red;
|
||||||
|
padding-right: 20rpx;
|
||||||
|
}
|
||||||
|
.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;}
|
||||||
|
}
|
||||||
|
.in {
|
||||||
|
border: 1rpx solid #eeeeee;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
padding: 8rpx;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
}
|
||||||
|
.studentListBox{margin-top: 40rpx; background-color: #fff; border-radius: 20rpx;}
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.fabBox {}
|
||||||
|
|
||||||
|
.taskBox {
|
||||||
|
border: 4rpx dotted #bad7f0;
|
||||||
|
padding: 20rpx;
|
||||||
|
padding-top: 0;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
line-height: 80rpx;
|
||||||
|
width: 50%;
|
||||||
|
margin: 0 auto;
|
||||||
|
text-align: center;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 0 0 20rpx 20rpx;
|
||||||
|
background-color: $themeColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.anserBox {
|
||||||
|
border: 4rpx dotted #2bb447;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
padding-top: 0;
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
line-height: 80rpx;
|
||||||
|
width: 50%;
|
||||||
|
margin: 0 auto;
|
||||||
|
text-align: center;
|
||||||
|
color: #fff;
|
||||||
|
background-color: #2bb447;
|
||||||
|
border-radius: 0 0 20rpx 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.nobg{background: transparent;}
|
||||||
|
.taskTitle {
|
||||||
|
font-size: 30rpx;
|
||||||
|
margin: 20rpx 0;
|
||||||
|
}
|
||||||
|
.newBox { justify-content:start; padding:10rpx 10rpx 0 10rpx;
|
||||||
|
|
||||||
|
.item { width: 24%; margin: 0 6rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius:8rpx;
|
||||||
|
box-shadow: none !important;
|
||||||
|
padding:8rpx; text-align: center;
|
||||||
|
margin-bottom:16rpx;
|
||||||
|
border: 1px solid #eee;
|
||||||
|
// border-bottom: 1px solid #eee;
|
||||||
|
// border-radius: 0 !important;
|
||||||
|
|
||||||
|
.leve1 {
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.userName{ font-size: 26rpx; width: 100%;
|
||||||
|
text{display: block; width: 100%;}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.taskContent {
|
||||||
|
font-size: 30rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.imgBox {
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
.item {
|
||||||
|
width: 20%;
|
||||||
|
margin-right: 10rpx; border: 1px solid #eee;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.manBtnBox {
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
text {
|
||||||
|
width: 30%;
|
||||||
|
font-size: 28rpx;
|
||||||
|
padding: 20rpx 0;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
display: block;
|
||||||
|
margin: 0 20rpx;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.edit {
|
||||||
|
background-color: $themeColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
.del {
|
||||||
|
background-color: #ffa4a6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.set {
|
||||||
|
background-color: #ffca7e;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.mainContent {
|
||||||
|
display: block;
|
||||||
|
color: #333;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
padding-bottom: 120rpx;
|
||||||
|
background-image: linear-gradient(30deg, #d4eaf0 0%, #d4eaf0 50%, #fdf0ed 100%);
|
||||||
|
min-height: 100vh;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
283
pages/miniClass/taskList.vue
Normal file
283
pages/miniClass/taskList.vue
Normal file
@@ -0,0 +1,283 @@
|
|||||||
|
<template>
|
||||||
|
<view style="min-height: calc(100vh - 120rpx); background-color: #ebf2f5;">
|
||||||
|
<z-nav-bar :title="pageName"></z-nav-bar>
|
||||||
|
<view class="pad20">
|
||||||
|
|
||||||
|
<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="leve1 flex_box">
|
||||||
|
<text>{{item.title}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="leve2 flex_box">
|
||||||
|
<view class="item">
|
||||||
|
<view class="">
|
||||||
|
<uni-icons type="checkmarkempty" size="30" color="#55aa7f"></uni-icons>
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
已交{{item.giveHomeWorkNumber}}人
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="item">
|
||||||
|
<view class="">
|
||||||
|
<uni-icons type="closeempty" size="30" color="#ff878d"></uni-icons>
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
未交{{item.noGiveHomeWorkNumber}}人
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="item">
|
||||||
|
<view class="">
|
||||||
|
<uni-icons type="auth" size="30" color="#55aa7f"></uni-icons>
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
已评分{{item.giveScoreNumber}}人
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="item">
|
||||||
|
<view class="">
|
||||||
|
<uni-icons type="spinner-cycle" size="30" color="#ff878d"></uni-icons>
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
未评分{{item.noGiveScoreNumber}}人
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="leve3">
|
||||||
|
<view class="tips flex_box">
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<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>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import $http from '@/config/requestConfig.js';
|
||||||
|
const taskLIst1 = require('@/data/taskList.json')
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
classId: undefined,
|
||||||
|
pageType: undefined,
|
||||||
|
pPage: 0,
|
||||||
|
status: 88,
|
||||||
|
loadFlag: false,
|
||||||
|
pageName: '',
|
||||||
|
taskList: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(e) {
|
||||||
|
console.log('taskLIst1',taskLIst1);
|
||||||
|
this.classId = e.classId
|
||||||
|
this.pageType = e.type
|
||||||
|
if (e.type == '0') {
|
||||||
|
this.pageName = '作业列表'
|
||||||
|
} else if (this.pageName = '医案列表') {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.pageName = '心得列表'
|
||||||
|
}
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
if (this.status != 2 && this.status != 3) {
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onBackPress() {
|
||||||
|
if (this.showRight || this.showLeft) {
|
||||||
|
this.$refs.showLeft.close()
|
||||||
|
this.$refs.showRight.close()
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 点击作业或者医案,进入作业提交情况
|
||||||
|
clickTask(item){
|
||||||
|
// console.log('options',options);
|
||||||
|
uni.navigateTo({
|
||||||
|
url:`/pages/miniClass/taskDetailForMan?id=${item.id}`
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
this.status = 1;
|
||||||
|
if (this.loadFlag) {
|
||||||
|
console.log("有未完成的进程");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中'
|
||||||
|
})
|
||||||
|
this.loadFlag = true;
|
||||||
|
this.pPage++;
|
||||||
|
$http.request({
|
||||||
|
url: "common/class/getClassTaskList",
|
||||||
|
method: "POST",
|
||||||
|
data: {
|
||||||
|
"limit": 10,
|
||||||
|
"page": this.pPage,
|
||||||
|
"classId": this.classId,
|
||||||
|
"type": this.pageType + '', //类型 0班内任务1医案2心得
|
||||||
|
"title": ""
|
||||||
|
},
|
||||||
|
header: { //默认 无 说明:请求头
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
if (res.page.records.length > 0) {
|
||||||
|
console.log('数据获取成功', res.page.records);
|
||||||
|
var lis = res.page.records
|
||||||
|
// this.taskList = this.taskList.concat(lis)
|
||||||
|
this.taskList = taskLIst1.page.records // 测试数据
|
||||||
|
if (res.page.pages > this.pPage) {
|
||||||
|
this.status = 0;
|
||||||
|
} else {
|
||||||
|
this.status = 2;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.status = 3; // 暂无数据
|
||||||
|
}
|
||||||
|
this.loadFlag = false;
|
||||||
|
console.log('res', res);
|
||||||
|
uni.hideLoading()
|
||||||
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
console.log(e, '数据报错')
|
||||||
|
uni.hideLoading()
|
||||||
|
this.loadFlag = false;
|
||||||
|
uni.showToast({
|
||||||
|
title: e.msg,
|
||||||
|
icon: 'error'
|
||||||
|
})
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import "@/style/mixin.scss";
|
||||||
|
|
||||||
|
.example-body {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pad20 {
|
||||||
|
padding: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll-view {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
/* #endif */
|
||||||
|
flex: 1
|
||||||
|
}
|
||||||
|
|
||||||
|
.submitRecode {
|
||||||
|
// padding: 20rpx;
|
||||||
|
|
||||||
|
.newBox {
|
||||||
|
.classmateImg {
|
||||||
|
width: 60rpx !important;
|
||||||
|
height: 60rpx !important;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 60rpx !important;
|
||||||
|
height: 60rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.item {
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
box-shadow: none !important;
|
||||||
|
// border-bottom: 1px solid #eee;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
|
||||||
|
.leve1 {
|
||||||
|
align-items: center;
|
||||||
|
border-bottom: 1px dashed #eee;
|
||||||
|
padding-bottom: 20rpx;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
// .userName{}
|
||||||
|
}
|
||||||
|
|
||||||
|
.leve2 {
|
||||||
|
color: #666;
|
||||||
|
|
||||||
|
.item{text-align: center;}
|
||||||
|
}
|
||||||
|
|
||||||
|
.leve3 {
|
||||||
|
color: $themeColor;
|
||||||
|
text-align: center;
|
||||||
|
padding-top: 10rpx;
|
||||||
|
|
||||||
|
.tips {
|
||||||
|
width: 100%;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.date {}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
border: 1px solid $themeColor;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
display: inline-block;
|
||||||
|
width: 50%;
|
||||||
|
padding: 6rpx 0;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.leve3.no {
|
||||||
|
color: #ff9277;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 处理抽屉内容滚动
|
||||||
|
.scroll-view-box {
|
||||||
|
flex: 1;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
padding: 15px;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-text {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-content {
|
||||||
|
padding: 5px 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user