暂存
This commit is contained in:
@@ -101,8 +101,9 @@
|
||||
//第一次加载
|
||||
onLoad(e) {
|
||||
console.log('收到的值', e);
|
||||
|
||||
this.pageType = e.type
|
||||
this.form.classId = e.id
|
||||
this.form.classId = e.classId
|
||||
this.form.type = e.type
|
||||
if(e.id){
|
||||
// this.form.renwuId = e.renwuId
|
||||
@@ -138,7 +139,7 @@
|
||||
// 获取医案任务详情
|
||||
getTaskInfo(){
|
||||
$http.request({
|
||||
url: "common/class/getClassTaskInfo",
|
||||
url: "common/class/getClassTaskInfoStudent",
|
||||
method: "POST",
|
||||
data: {
|
||||
"taskId": this.form.id
|
||||
|
||||
@@ -338,6 +338,9 @@
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.getClassInfo()
|
||||
this.pPage = 0
|
||||
this.taskList = []
|
||||
this.getList()
|
||||
uni.stopPullDownRefresh()
|
||||
},
|
||||
onBackPress() {
|
||||
@@ -349,9 +352,7 @@
|
||||
},
|
||||
onShow() {
|
||||
this.getClassInfo()
|
||||
this.pPage = 0
|
||||
this.taskList = []
|
||||
this.getList()
|
||||
|
||||
},
|
||||
computed: {
|
||||
...mapState(["userInfo"]),
|
||||
@@ -454,6 +455,7 @@
|
||||
})
|
||||
},
|
||||
getList(){
|
||||
console.log('进入函数了吗');
|
||||
this.status = 1;
|
||||
if (this.loadFlag) {
|
||||
console.log("有未完成的进程");
|
||||
@@ -464,17 +466,20 @@
|
||||
})
|
||||
this.loadFlag = true;
|
||||
this.pPage++;
|
||||
var data = {
|
||||
|
||||
"limit": 10,
|
||||
"page": this.pPage,
|
||||
"classId": this.thisClass.id,
|
||||
"type": this.tijiaoTitleId+'', //类型 0班内任务1医案2心得
|
||||
"myExperience": this.myExperience, //0全部心得1我的心得
|
||||
"title": ""
|
||||
}
|
||||
console.log('data',data);
|
||||
$http.request({
|
||||
url: "common/class/getClassTaskListStudent",
|
||||
method: "POST",
|
||||
data: {
|
||||
"limit": 10,
|
||||
"page": this.pPage,
|
||||
"classId": this.thisClass.id,
|
||||
"type": this.tijiaoTitleId+'', //类型 0班内任务1医案2心得
|
||||
"myExperience": this.myExperience, //0全部心得1我的心得
|
||||
"title": ""
|
||||
},
|
||||
data,
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
|
||||
@@ -90,8 +90,12 @@
|
||||
<text class="mainTxt" v-if="classModel.type == '1'">联合班</text>
|
||||
<text class="mainTxt" v-if="classModel.type == '2'">精英班</text>
|
||||
</view>
|
||||
<view><text class="ciyao">人数</text><text
|
||||
class="mainTxt">{{students.length}}/{{thisClass.number}}人</text></view>
|
||||
<view @click="onPageJump('/pages/miniClass/studentsInClass', thisClass.id, roleCode)">
|
||||
<text class="ciyao">学员人数</text>
|
||||
<view class="mainTxt flex_box">
|
||||
<text class="">{{students.length}}/{{thisClass.number}}人 </text>
|
||||
<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>
|
||||
|
||||
@@ -124,48 +128,6 @@
|
||||
<!-- <view class="" v-if=" tabId == '1'">
|
||||
班内问答
|
||||
</view> -->
|
||||
<!-- 班内同学 -->
|
||||
<uni-section class="mb-10 nobg" title="班内学员" type="line"></uni-section>
|
||||
<view class="classMateBox" v-show="students.length> 0">
|
||||
<view class="newBox">
|
||||
<view :class="['item',
|
||||
item.student.vip == '1' ? 'superVip' : '',
|
||||
item.student.vip == '2' ? 'wumenVip' : '',
|
||||
item.student.vip == '3' ? 'zmVip' : '']" v-for="(item, index) in students" :key="index">
|
||||
<view class="flexbox">
|
||||
<view class="classmateImg">
|
||||
<image v-if="item.student.avatar != null && item.student.avatar != ''"
|
||||
:src="item.student.avatar" mode="aspectFit"></image>
|
||||
<image v-else src="/static/icon/morenAvavter.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="textItems flex_box">
|
||||
<text class="txt555"
|
||||
v-if="item.student.nickname != null && item.student.nickname != ''">
|
||||
{{item.student.nickname}}
|
||||
<template v-if="isDirector || isMonitor">
|
||||
<text>({{item.student.tel}})</text> <text @click="outClass(item.student.id)"
|
||||
class="outBtn">踢出班级</text>
|
||||
</template>
|
||||
</text>
|
||||
<text class="txt555" v-else>
|
||||
匿名用户
|
||||
</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 == '3' ">国学VIP用户</text> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="courseBuyOrNo" v-if="item.buyState !='会员 ' ">
|
||||
<view class="">
|
||||
<text>{{ item.buyState }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" v-show="students.length == 0">
|
||||
<u-divider text="暂无学员加入"></u-divider>
|
||||
</view>
|
||||
<!-- 班内提交 -->
|
||||
<view class="" v-if=" tabId == '3' && false">
|
||||
<view class="flex_box tijiaoTitle">
|
||||
@@ -251,7 +213,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<view class="fabBox" v-if="isDirector || isMonitor">
|
||||
<view class="fabBox" >
|
||||
<uni-fab ref="fab" :pattern="pattern" :content="fabContent" :horizontal="horizontal" :vertical="vertical"
|
||||
:direction="direction" @trigger="fabTrigger" @fabClick="fabClick" />
|
||||
</view>
|
||||
@@ -547,6 +509,7 @@
|
||||
},
|
||||
// 跳转
|
||||
onPageJump(url, id, modeType) {
|
||||
console.log('type',modeType);
|
||||
uni.navigateTo({
|
||||
url: `${url}?id=${id}&type=${modeType}`
|
||||
});
|
||||
@@ -620,7 +583,7 @@
|
||||
this.$refs.fab.close()
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: `${_url}?id=${this.thisClass.id}&type=${_type}`
|
||||
url: `${_url}?classId=${this.thisClass.id}&type=${_type}`
|
||||
})
|
||||
}, 200)
|
||||
},
|
||||
@@ -1133,6 +1096,7 @@
|
||||
.otherItems {
|
||||
// border: 1px solid #dadada;
|
||||
padding: 20rpx;
|
||||
text-align: center;
|
||||
// background-color: rgba(255, 255, 255, .5);
|
||||
border-radius: 20rpx;
|
||||
justify-content: space-between;
|
||||
|
||||
@@ -26,11 +26,10 @@
|
||||
<image src="@/static/my_04.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="buyItems">
|
||||
<view class="">
|
||||
<text >【联合班】</text>
|
||||
<text v-show="item.type == 0">【普通班】</text>
|
||||
<text v-show="item.type == 1">【联合班】</text>
|
||||
<text v-show="item.type == 2">【精英班】</text>
|
||||
<view class="">
|
||||
<text v-show="item.classModel.type == 0">【普通班】</text>
|
||||
<text v-show="item.classModel.type == 1">【联合班】</text>
|
||||
<text v-show="item.classModel.type == 2">【精英班】</text>
|
||||
<text class="txt555" @click="onPageJump('/pages/miniClass/classInfo',item.id)">
|
||||
{{item.title}}
|
||||
</text>
|
||||
|
||||
@@ -2,65 +2,142 @@
|
||||
<view>
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<public-module></public-module>
|
||||
<z-nav-bar title="主任教学">
|
||||
<!-- <view class="curseSet" slot="right" @click="shuomingPage('/pages/course/courseSet',tagId,pid)"> -->
|
||||
<!-- <uni-icons type="info" size="24"></uni-icons> 课程说明</view> -->
|
||||
</z-nav-bar>
|
||||
<z-nav-bar title="我的班级">
|
||||
|
||||
</z-nav-bar>
|
||||
<!-- <view class="tabsBox" :class="[fixed ? 'fixed' : '' ]">
|
||||
<u-tabs v-if="tabList.length > 0" :class="['tabList']" @click="fatherClick" :current="curTagId"
|
||||
:activeStyle="activeStyle" :scrollable="scrollable" :list="tabList"
|
||||
itemStyle="padding-left: 15px; background-color:#fff; padding-right: 15px; height: 50px;"></u-tabs>
|
||||
</view> -->
|
||||
</view> -->
|
||||
<view class="containerBg">
|
||||
<view class="subCate flex" v-if="subList.length> 0">
|
||||
<text :class="['item',subTabId == item.id ? 'active' : '']" v-for="(item, index) in subList"
|
||||
<view class="subCate flex" v-if="subList1.length> 0">
|
||||
<text :class="['item',subTabId == item.id ? 'active' : '']" v-for="(item, index) in subList1"
|
||||
@click="curseClick(item)" :key="index">{{item.title}}</text>
|
||||
</view>
|
||||
<view class="learnBox box">
|
||||
<view class="newBox" v-if="classList.length > 0">
|
||||
<view class="item flexbox" v-for="(item, index) in classList" :key="index" @click="onPageJump('/pages/miniClass/classInfo',item.id)">
|
||||
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
|
||||
<view class="imgcontainer" v-if="item.icon != ''">
|
||||
<image :src="item.icon" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="imgcontainer defaultImg" v-else>
|
||||
<image src="@/static/my_04.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="buyItems" >
|
||||
<view class="">
|
||||
<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 class="jianjie">
|
||||
目标学员人数:{{item.number}} 人
|
||||
<view class="" v-show="subTabId == 0">
|
||||
<view class="" v-if="preClassList.length > 0">
|
||||
<!-- 待开班 -->
|
||||
<uni-section class="mb-10 nobg" title="待开班" type="line"></uni-section>
|
||||
<view class="888">
|
||||
<view class="newBox" v-if="preClassList.length > 0">
|
||||
<view class="item flexbox" v-for="(item, index) in preClassList" :key="index"
|
||||
@click="onPageJump('/pages/miniClass/classInfo',item.id)">
|
||||
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
|
||||
<view class="imgcontainer" v-if="item.icon != ''">
|
||||
<image :src="item.icon" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="imgcontainer defaultImg" v-else>
|
||||
<image src="@/static/my_04.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="buyItems">
|
||||
<view class="">
|
||||
<text v-show="item.classModel.type == 0">【普通班】</text>
|
||||
<text v-show="item.classModel.type == 1">【联合班】</text>
|
||||
<text v-show="item.classModel.type == 2">【精英班】</text>
|
||||
<text class="txt555" @click="onPageJump('/pages/miniClass/classInfo',item.id)">
|
||||
{{item.title}}
|
||||
</text>
|
||||
</view>
|
||||
<view class="jianjie">
|
||||
目标学员人数:{{item.number}} 人
|
||||
</view>
|
||||
<!-- <view class="jianjie" v-html="item.content">
|
||||
</view> -->
|
||||
<view class="btn_box">
|
||||
<!-- <text @click="enterClass" v-show="item.state == '0'">一键加入</text> -->
|
||||
<text class="seeInfo">进入班级</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="jianjie" v-html="item.content">
|
||||
</view> -->
|
||||
<view class="btn_box" >
|
||||
<!-- <text @click="enterClass" v-show="item.state == '0'">一键加入</text> -->
|
||||
<text class="seeInfo">进入班级</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-divider v-else text="暂无数据"></u-divider>
|
||||
<!-- <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-back-top scroll-top="100"></u-back-top> -->
|
||||
<u-back-top :scroll-top="scrollTop" bottom="150" :customStyle='bgiStyle'
|
||||
:iconStyle="iconStyle"></u-back-top>
|
||||
<view class="" v-if="learningClassList.length > 0">
|
||||
<uni-section class="mb-10 nobg" title="学习中" type="line"></uni-section>
|
||||
<view class="learnBox box">
|
||||
<view class="newBox" v-if="learningClassList.length > 0">
|
||||
<view class="item flexbox" v-for="(item, index) in learningClassList" :key="index"
|
||||
@click="onPageJump('/pages/miniClass/classInfo',item.id)">
|
||||
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
|
||||
<view class="imgcontainer" v-if="item.icon != ''">
|
||||
<image :src="item.icon" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="imgcontainer defaultImg" v-else>
|
||||
<image src="@/static/my_04.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="buyItems">
|
||||
<view class="">
|
||||
<text v-show="item.classModel.type == 0">【普通班】</text>
|
||||
<text v-show="item.classModel.type == 1">【联合班】</text>
|
||||
<text v-show="item.classModel.type == 2">【精英班】</text>
|
||||
<text class="txt555" @click="onPageJump('/pages/miniClass/classInfo',item.id)">
|
||||
{{item.title}}
|
||||
</text>
|
||||
</view>
|
||||
<view class="jianjie">
|
||||
目标学员人数:{{item.number}} 人
|
||||
</view>
|
||||
<!-- <view class="jianjie" v-html="item.content">
|
||||
</view> -->
|
||||
<view class="btn_box">
|
||||
<!-- <text @click="enterClass" v-show="item.state == '0'">一键加入</text> -->
|
||||
<text class="seeInfo">进入班级</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<u-divider v-if="preClassList.length == 0 && learningClassList.length == 0" text="暂无数据"></u-divider>
|
||||
</view>
|
||||
<z-navigation></z-navigation>
|
||||
<!-- <music-play :playData="playData"></music-play> -->
|
||||
|
||||
<!-- 过期班级 -->
|
||||
<view class="" v-show="subTabId == 2">
|
||||
<view class="learnBox box">
|
||||
<view class="newBox" v-if="classList.length > 0">
|
||||
<view class="item flexbox" v-for="(item, index) in classList" :key="index"
|
||||
@click="onPageJump('/pages/miniClass/classInfo',item.id)">
|
||||
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
|
||||
<view class="imgcontainer" v-if="item.icon != ''">
|
||||
<image :src="item.icon" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="imgcontainer defaultImg" v-else>
|
||||
<image src="@/static/my_04.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="buyItems">
|
||||
<view class="">
|
||||
<text v-show="item.classModel.type == 0">【普通班】</text>
|
||||
<text v-show="item.classModel.type == 1">【联合班】</text>
|
||||
<text v-show="item.classModel.type == 2">【精英班】</text>
|
||||
<text class="txt555" @click="onPageJump('/pages/miniClass/classInfo',item.id)">
|
||||
{{item.title}}
|
||||
</text>
|
||||
</view>
|
||||
<view class="jianjie">
|
||||
目标学员人数:{{item.number}} 人
|
||||
</view>
|
||||
<!-- <view class="jianjie" v-html="item.content">
|
||||
</view> -->
|
||||
<view class="btn_box">
|
||||
<!-- <text @click="enterClass" v-show="item.state == '0'">一键加入</text> -->
|
||||
<text class="seeInfo">进入班级</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-divider v-else text="暂无数据"></u-divider>
|
||||
</view>
|
||||
<view>
|
||||
<!-- <u-back-top scroll-top="100"></u-back-top> -->
|
||||
<u-back-top :scroll-top="scrollTop" bottom="150" :customStyle='bgiStyle'
|
||||
:iconStyle="iconStyle"></u-back-top>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<z-navigation></z-navigation>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -75,16 +152,27 @@
|
||||
data() {
|
||||
return {
|
||||
playData: {},
|
||||
addType:undefined, // 小班类型
|
||||
range:[
|
||||
{ value: '0', text: "普通小班",name:"普通小班"},
|
||||
{ value: '1', text: "联合班" ,name:"普通小班"},
|
||||
{ value: '2', text: "精英班" ,name:"普通小班"},
|
||||
addType: undefined, // 小班类型
|
||||
range: [{
|
||||
value: '0',
|
||||
text: "普通小班",
|
||||
name: "普通小班"
|
||||
},
|
||||
{
|
||||
value: '1',
|
||||
text: "联合班",
|
||||
name: "普通小班"
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
text: "精英班",
|
||||
name: "普通小班"
|
||||
},
|
||||
],
|
||||
tagId: null,
|
||||
pid:null,
|
||||
pid: null,
|
||||
fixed: false,
|
||||
pupShow:false,
|
||||
pupShow: false,
|
||||
fatherTabId: null,
|
||||
subTabId: null, //
|
||||
bgiStyle: {
|
||||
@@ -103,17 +191,43 @@
|
||||
// backgroundColor: '#258feb'
|
||||
|
||||
},
|
||||
subList: [{title:'待开班',id:'0'},{title:'已开班',id:'1'},{title:'已结班',id:'2'}],
|
||||
subList1: [{
|
||||
title: '进行中',
|
||||
id: '0'
|
||||
}, {
|
||||
title: '已结班',
|
||||
id: '2'
|
||||
}],
|
||||
subList: [{
|
||||
title: '待开班',
|
||||
id: '0'
|
||||
}, {
|
||||
title: '已开班',
|
||||
id: '1'
|
||||
}, {
|
||||
title: '已结班',
|
||||
id: '2'
|
||||
}],
|
||||
scrollable: false,
|
||||
pageTitle: '',
|
||||
tabList: [
|
||||
{name:'普通小班', id:'0'},{name:'联合班', id:'1'},{name:'精英班',id:'2'}],
|
||||
tabList: [{
|
||||
name: '普通小班',
|
||||
id: '0'
|
||||
}, {
|
||||
name: '联合班',
|
||||
id: '1'
|
||||
}, {
|
||||
name: '精英班',
|
||||
id: '2'
|
||||
}],
|
||||
curTagId: 0,
|
||||
classList: [],
|
||||
classList: [], // 已结班
|
||||
preClassList: [], // 待开班
|
||||
learningClassList: [], // 在学习的班级
|
||||
status: 3, // 0 不显示, 1 加载中,2 加载全部完成,3 暂无数据
|
||||
page: 1,
|
||||
flag: true, // 函数是否执行完
|
||||
|
||||
|
||||
};
|
||||
},
|
||||
//第一次加载
|
||||
@@ -126,7 +240,7 @@
|
||||
this.pageTitle = e.title
|
||||
this.pid = e.pid
|
||||
console.log(e, '传入分类id')
|
||||
this.getData()
|
||||
// this.getData()
|
||||
// this.getCateList(this.tagId)
|
||||
},
|
||||
onPageScroll(e) {
|
||||
@@ -160,6 +274,7 @@
|
||||
onShow() {
|
||||
// 隐藏原生的tabbar
|
||||
// uni.hideTabBar();
|
||||
this.getLearingClassList()
|
||||
},
|
||||
components: {
|
||||
musicPlay
|
||||
@@ -167,63 +282,29 @@
|
||||
//方法
|
||||
methods: {
|
||||
// 加入班级
|
||||
enterClass(){
|
||||
|
||||
enterClass() {
|
||||
|
||||
},
|
||||
selectChange(e){
|
||||
selectChange(e) {
|
||||
console.log("e:", e);
|
||||
},
|
||||
closePup(){
|
||||
closePup() {
|
||||
this.pupShow = false
|
||||
},
|
||||
surl(imageurl) {
|
||||
return `url(${imageurl})`
|
||||
},
|
||||
goCreateClass(){
|
||||
console.log('this.addType',this.addType);
|
||||
if(this.addType != undefined){
|
||||
uni.navigateTo({
|
||||
url:`/pages/miniClass/addClass?type=${this.addType}&name=add`
|
||||
})
|
||||
}else{
|
||||
uni.showToast({
|
||||
title:'请选择班级的类型',
|
||||
icon:'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
},
|
||||
fatherClick(e) {
|
||||
console.log('点击', e)
|
||||
this.page = 1
|
||||
// var item = e
|
||||
this.curTagId = e.id
|
||||
this.subTabId = this.subList[0].id
|
||||
this.getData(this.subTabId);
|
||||
},
|
||||
curseClick(item) {
|
||||
this.subTabId = item.id
|
||||
this.classList = []
|
||||
this.page = 1
|
||||
this.getData(this.subTabId);
|
||||
},
|
||||
getData(id) {
|
||||
if (!this.flag) {
|
||||
console.log('正在执行,未完成')
|
||||
return
|
||||
}
|
||||
|
||||
this.status = 1
|
||||
this.flag = false
|
||||
// 待开班
|
||||
getPreClassList() {
|
||||
uni.showLoading({
|
||||
title:'正在加载'
|
||||
title: "加载中"
|
||||
})
|
||||
$http.request({
|
||||
url: "common/class/MyClassList",
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data: {
|
||||
"state": this.subTabId, //小班状态0待开班1已开班2完成
|
||||
"type": '' // 班类型 0小班 1联合班 2精英班
|
||||
"state": '0', //小班状态0待开班1已开班2完成
|
||||
"type": '' // 班类型 0小班 1联合班 2精英班
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
@@ -232,11 +313,122 @@
|
||||
.then(res => {
|
||||
if (res.code == 0) {
|
||||
if (res.result.length > 0) {
|
||||
this.classList = res.result
|
||||
|
||||
}else{
|
||||
this.preClassList = res.result
|
||||
|
||||
} else {
|
||||
this.preClassList = []
|
||||
}
|
||||
}
|
||||
uni.hideLoading()
|
||||
this.getData()
|
||||
}).catch(e => {
|
||||
uni.hideLoading()
|
||||
this.getData()
|
||||
console.log(e, '数据报错')
|
||||
// this.status = 3
|
||||
uni.showToast({
|
||||
title: `获取数据失败`,
|
||||
icon: 'error'
|
||||
})
|
||||
});
|
||||
},
|
||||
// 学习中
|
||||
getLearingClassList() {
|
||||
uni.showLoading({
|
||||
title: "加载中"
|
||||
})
|
||||
$http.request({
|
||||
url: "common/class/MyClassList",
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data: {
|
||||
"state": '1', //小班状态0待开班1已开班2完成
|
||||
"type": '' // 班类型 0小班 1联合班 2精英班
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
if (res.code == 0) {
|
||||
if (res.result.length > 0) {
|
||||
this.learningClassList = res.result
|
||||
|
||||
} else {
|
||||
this.learningClassList = []
|
||||
}
|
||||
}
|
||||
this.getPreClassList()
|
||||
uni.hideLoading()
|
||||
}).catch(e => {
|
||||
uni.hideLoading()
|
||||
this.getPreClassList()
|
||||
|
||||
console.log(e, '数据报错')
|
||||
// this.status = 3
|
||||
uni.showToast({
|
||||
title: `获取数据失败`,
|
||||
icon: 'error'
|
||||
})
|
||||
});
|
||||
},
|
||||
goCreateClass() {
|
||||
console.log('this.addType', this.addType);
|
||||
if (this.addType != undefined) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/miniClass/addClass?type=${this.addType}&name=add`
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '请选择班级的类型',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
},
|
||||
fatherClick(e) {
|
||||
console.log('点击', e)
|
||||
this.page = 1
|
||||
// var item = e
|
||||
this.curTagId = e.id
|
||||
this.subTabId = this.subList[0].id
|
||||
this.getData(this.subTabId);
|
||||
},
|
||||
curseClick(item) {
|
||||
this.subTabId = item.id
|
||||
// this.classList = []
|
||||
// this.page = 1
|
||||
// this.getData(this.subTabId);
|
||||
},
|
||||
getData(id) {
|
||||
if (!this.flag) {
|
||||
console.log('正在执行,未完成')
|
||||
return
|
||||
}
|
||||
|
||||
this.status = 1
|
||||
this.flag = false
|
||||
uni.showLoading({
|
||||
title: '正在加载'
|
||||
})
|
||||
$http.request({
|
||||
url: "common/class/MyClassList",
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data: {
|
||||
"state": '2', //小班状态0待开班1已开班2完成
|
||||
"type": '' // 班类型 0小班 1联合班 2精英班
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
if (res.code == 0) {
|
||||
if (res.result.length > 0) {
|
||||
this.classList = res.result
|
||||
|
||||
} else {
|
||||
this.classList = []
|
||||
}
|
||||
}
|
||||
this.flag = true
|
||||
}
|
||||
uni.hideLoading()
|
||||
@@ -246,20 +438,20 @@
|
||||
console.log(e, '数据报错')
|
||||
// this.status = 3
|
||||
uni.showToast({
|
||||
title:`获取数据失败`,
|
||||
icon:'error'
|
||||
title: `获取数据失败`,
|
||||
icon: 'error'
|
||||
})
|
||||
});
|
||||
},
|
||||
// 跳转
|
||||
onPageJump(url,id,have) {
|
||||
onPageJump(url, id, have) {
|
||||
// console.log('进来了',url,id);
|
||||
uni.navigateTo({
|
||||
url: `${url}?id=${id}&have=${have}`
|
||||
});
|
||||
},
|
||||
|
||||
shuomingPage(url,id,pid){
|
||||
|
||||
shuomingPage(url, id, pid) {
|
||||
uni.navigateTo({
|
||||
url: `${url}?id=${id}&pid=${pid}`
|
||||
});
|
||||
@@ -269,43 +461,65 @@
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import '@/style/mixin.scss';
|
||||
/deep/.uni-select__selector{
|
||||
top:unset;
|
||||
bottom:calc(100% + 12px) ;
|
||||
}
|
||||
/deep/.uni-select{
|
||||
border: none;
|
||||
}
|
||||
/deep/.uni-select__input-text{
|
||||
font-size:14px;
|
||||
color:#7f7f7f //修改为你的字体颜色
|
||||
}
|
||||
/deep/.uni-select__input-placeholder{
|
||||
font-size:14px;
|
||||
color:#7f7f7f //修改为你的字体颜色
|
||||
}
|
||||
/deep/.uni-popper__arrow{
|
||||
top:unset;
|
||||
bottom: -6px;
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
/deep/.uni-popper__arrow::after{
|
||||
top:0
|
||||
}
|
||||
|
||||
.box6{
|
||||
.btnBox{justify-content: center;}
|
||||
/deep/.uni-select__selector {
|
||||
top: unset;
|
||||
bottom: calc(100% + 12px);
|
||||
}
|
||||
|
||||
/deep/.uni-select {
|
||||
border: none;
|
||||
}
|
||||
|
||||
/deep/.uni-select__input-text {
|
||||
font-size: 14px;
|
||||
color: #7f7f7f //修改为你的字体颜色
|
||||
}
|
||||
|
||||
/deep/.uni-select__input-placeholder {
|
||||
font-size: 14px;
|
||||
color: #7f7f7f //修改为你的字体颜色
|
||||
}
|
||||
|
||||
/deep/.uni-popper__arrow {
|
||||
top: unset;
|
||||
bottom: -6px;
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
/deep/.uni-popper__arrow::after {
|
||||
top: 0
|
||||
}
|
||||
|
||||
.nobg {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
.box6 {
|
||||
.btnBox {
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
.containerBg {
|
||||
// background-color: $containerColor;
|
||||
background-color: #f6f6f8;
|
||||
padding: 0 20rpx;
|
||||
|
||||
}
|
||||
.curseSet{margin-right: 20rpx; font-size: 28rpx; display: flex; align-items: center;}
|
||||
|
||||
.curseSet {
|
||||
margin-right: 20rpx;
|
||||
font-size: 28rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.fixed {
|
||||
position: fixed;
|
||||
z-index: 1; width: 100%; background-color: #fff;
|
||||
z-index: 1;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.newBox {
|
||||
@@ -334,21 +548,36 @@
|
||||
height: 200rpx;
|
||||
}
|
||||
}
|
||||
.btn_box{ text-align: right;
|
||||
text{
|
||||
|
||||
.btn_box {
|
||||
text-align: right;
|
||||
|
||||
text {
|
||||
border-radius: 20rpx;
|
||||
padding: 3px 5px; @include theme("btn_bg");
|
||||
font-size: 28rpx; color: #fff;
|
||||
padding: 3px 5px;
|
||||
@include theme("btn_bg");
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.seeInfo {
|
||||
background-color: #fff;
|
||||
background-image: none;
|
||||
border: 1px solid #666;
|
||||
color: #333;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.seeInfo{background-color:#fff; background-image: none; border: 1px solid #666; color: #333; margin-left: 20rpx;}
|
||||
}
|
||||
|
||||
.buyItems {
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
.jianjie {
|
||||
line-height: 30rpx; height: 60rpx; overflow: hidden;
|
||||
overflow: hidden!important;
|
||||
line-height: 30rpx;
|
||||
height: 60rpx;
|
||||
overflow: hidden;
|
||||
overflow: hidden !important;
|
||||
margin-top: 10rpx;
|
||||
font-size: 24rpx;
|
||||
@include bov();
|
||||
@@ -364,16 +593,18 @@
|
||||
}
|
||||
|
||||
.subCate {
|
||||
padding-top:10px;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
display: flex;
|
||||
.item {
|
||||
|
||||
.item {
|
||||
border: 1px solid #bfcad9;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
font-size: 26rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 4px; width: 100%;
|
||||
border-radius: 4px;
|
||||
width: 100%;
|
||||
color: #333;
|
||||
margin-right: 16rpx;
|
||||
padding: 14rpx 30rpx;
|
||||
@@ -401,7 +632,7 @@
|
||||
.imgcontainer {
|
||||
background-color: $imgBg;
|
||||
}
|
||||
|
||||
|
||||
.box {
|
||||
// background-color: #fff;
|
||||
min-height: calc(100vh - 270rpx);
|
||||
|
||||
463
pages/miniClass/studentsInClass.vue
Normal file
463
pages/miniClass/studentsInClass.vue
Normal file
@@ -0,0 +1,463 @@
|
||||
<template>
|
||||
<view style="min-height: calc(100vh - 120rpx); background-color: #ebf2f5; padding: 20rpx;">
|
||||
<z-nav-bar title="班内学员"></z-nav-bar>
|
||||
<public-module></public-module>
|
||||
<view class="classMateBox" v-show="students.length> 0">
|
||||
<view class="tips ">
|
||||
<view class="flex_box">
|
||||
<view class="item flex_box">
|
||||
<span class=""></span><text>普通用户</text>
|
||||
</view>
|
||||
<view class="item flex_box">
|
||||
<span class="superVip"></span><text>超级VIP</text>
|
||||
</view>
|
||||
<view class="item flex_box">
|
||||
<span class="wumenVip"></span><text>医学VIP</text>
|
||||
</view>
|
||||
<view class="item flex_box">
|
||||
<span class="zmVip"></span><text>国学VIP</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goumaiTips flex_box">
|
||||
<view class="item flex_box">
|
||||
<span class="redBorder">
|
||||
<!-- <uni-icons type="shop" size="24" color="#999"></uni-icons> -->
|
||||
</span>
|
||||
<text>购买部分课程或未购买</text>
|
||||
</view>
|
||||
<view class="item flex_box">
|
||||
<span class="greenBorder">
|
||||
<!-- <uni-icons type="shop-filled" size="24" color="#55aa00"></uni-icons> -->
|
||||
</span>
|
||||
<text>购买全套课程</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="studentsNumber">
|
||||
学员总数:【{{students.length}}】人
|
||||
</view>
|
||||
<view class="newBox studentsList flex_box">
|
||||
|
||||
<view :class="['item',
|
||||
item.student.vip == '1' ? 'superVip' : '',
|
||||
item.student.vip == '2' ? 'wumenVip' : '',
|
||||
item.student.vip == '3' ? 'zmVip' : '',
|
||||
item.buyState == '会员 ' ? 'greenBorder' : '',
|
||||
item.buyState != '会员 ' ? 'redBorder' : ''
|
||||
]" v-for="(item, index) in students" :key="index" @click="clickItem(item)" >
|
||||
<view class="flex_box">
|
||||
<view class="classmateImg">
|
||||
<image v-if="item.student.avatar != null && item.student.avatar != ''"
|
||||
:src="item.student.avatar" mode="aspectFit"></image>
|
||||
<image v-else src="/static/icon/morenAvavter.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="textItems flex_box">
|
||||
<text class="nick"
|
||||
v-if="item.student.nickname != null && item.student.nickname != ''">
|
||||
{{item.student.nickname}}
|
||||
</text>
|
||||
<text class="nick" v-else>
|
||||
匿名用户
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="">
|
||||
<template v-if="isDirector || isMonitor">
|
||||
<text>({{item.student.tel}})</text>
|
||||
<text @click="outClass(item.student.id)"
|
||||
class="outBtn">踢出班级</text>
|
||||
</template>
|
||||
</view>
|
||||
<view class="courseBuyOrNo" v-if="item.buyState !='会员 ' ">
|
||||
<view class="">
|
||||
<text>{{ item.buyState }}</text>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" v-show="students.length == 0">
|
||||
<u-divider text="暂无学员加入"></u-divider>
|
||||
</view>
|
||||
<u-popup key="1" v-if="showEditBlank" :show="showEditBlank" :round="10" @close="closePup" ref="">
|
||||
<view class="upopBox" style="">
|
||||
<h3 style="margin-bottom: 20rpx;">{{thisStudent.student.nickname != null && thisStudent.student.nickname != '' ? thisStudent.student.nickname : "匿名用户"}}</h3>
|
||||
<view class="item">
|
||||
<text><b>身份信息:</b></text>
|
||||
<text v-if="thisStudent.student.vip == '0'">普通用户</text>
|
||||
<text v-if="thisStudent.student.vip == '1'">超级VIP</text>
|
||||
<text v-if="thisStudent.student.vip == '2'">医学VIP</text>
|
||||
<text v-if="thisStudent.student.vip == '3'">国学VIP</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<text><b>电话:</b>{{thisStudent.student.tel}}</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<b>课程购买情况:</b><br/>{{thisStudent.buyState}}
|
||||
</view>
|
||||
<view class="btnBox">
|
||||
<text @click="outClass(thisStudent.student.id)"
|
||||
class="outBtn">踢出班级</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</u-popup>
|
||||
<z-navigation></z-navigation>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import $http from '@/config/requestConfig.js';
|
||||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showEditBlank:false,
|
||||
students:[],
|
||||
thisClass:{},
|
||||
isDirector:false,
|
||||
isMonitor:false,
|
||||
userMes:{},
|
||||
roleCode:undefined,
|
||||
thisStudent:{},
|
||||
roleCode:undefined
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
e.id ? this.getClassInfo(e.id) : ''
|
||||
this.roleCode = e.type
|
||||
|
||||
},
|
||||
onShow() {
|
||||
this.getUserInfo()
|
||||
},
|
||||
computed: {
|
||||
...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
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 退出班级 // 踢出班级
|
||||
outClass(userId) {
|
||||
this.closePup()
|
||||
let that = this
|
||||
// var _useId = undefined
|
||||
var _txt = '即将踢出该学员,是否继续?'
|
||||
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: `${_txt}`,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
// console.log('用户点击确定');
|
||||
$http.request({
|
||||
url: "common/class/quitClass",
|
||||
method: "POST",
|
||||
data: {
|
||||
"classId": that.thisClass.id,
|
||||
"userId": userId
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
if (res.code == 0) {
|
||||
that.isHave = true
|
||||
uni.showToast({
|
||||
title: `操作成功!`,
|
||||
icon: 'success'
|
||||
})
|
||||
}
|
||||
}).catch(e => {
|
||||
console.log(e, '数据报错')
|
||||
// this.status = 3
|
||||
uni.showToast({
|
||||
title: `退出失败`,
|
||||
icon: 'error'
|
||||
})
|
||||
});
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
return
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
closePup(){
|
||||
this.showEditBlank = false
|
||||
},
|
||||
// 获取真实的身份信息
|
||||
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'
|
||||
})
|
||||
});
|
||||
},
|
||||
getUserInfo() {
|
||||
// 获取个人信息
|
||||
if (this.userInfo.id != undefined) {
|
||||
this.$http.post("common/user/getUserInfo").then((res) => {
|
||||
this.userMes = res.result;
|
||||
this.isMonitor = res.isMonitor
|
||||
this.isDirector = res.isDirector
|
||||
if (this.isDirector) {
|
||||
this.roleCode = '66'
|
||||
} else if (this.isMonitor) {
|
||||
this.getRealRole()
|
||||
} else {
|
||||
|
||||
}
|
||||
}).catch(e => {
|
||||
uni.showToast({
|
||||
title: '获取用户信息失败',
|
||||
icon: 'none'
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
clickItem(item){
|
||||
console.log('item',item);
|
||||
this.thisStudent = item
|
||||
this.showEditBlank = true
|
||||
},
|
||||
getClassInfo(id) {
|
||||
uni.showLoading({
|
||||
title: '正在加载'
|
||||
})
|
||||
$http.request({
|
||||
url: "common/class/getClassInfo",
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data: {
|
||||
"classId": id // 班类型 0小班 1联合班 2精英班
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
this.refresh = false
|
||||
if (res.code == 0) {
|
||||
|
||||
this.thisClass = res.result.class
|
||||
this.students = res.result.students
|
||||
|
||||
|
||||
}
|
||||
uni.hideLoading()
|
||||
}).catch(e => {
|
||||
uni.hideLoading()
|
||||
console.log(e, '数据报错')
|
||||
// this.status = 3
|
||||
uni.showToast({
|
||||
title: '获取班级信息失败',
|
||||
icon: 'none'
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import '@/style/mixin.scss';
|
||||
.upopBox{padding: 40rpx; max-height: 80vh; overflow-y:scroll; color: #666;
|
||||
.item{padding: 10rpx 0; border-bottom: 1px solid #eee;}
|
||||
}
|
||||
.redBorder{ border: 1px solid #ff8f8f !important;}
|
||||
.greenBorder{border: 1px solid #55aa00 !important;}
|
||||
.studentsNumber{color: #666; font-size: 28rpx; }
|
||||
.studentsList{ background-color: rgba(255, 255, 255, .8); padding: 10rpx; border-radius: 10rpx; flex-wrap: wrap; justify-content: space-around;
|
||||
.item{width: 32% !important; font-size: 26rpx; padding: 6rpx !important;}
|
||||
}
|
||||
.btnBox{margin-top: 10rpx; text-align: center;}
|
||||
.outBtn {
|
||||
padding: 6rpx 10rpx;
|
||||
display: inline-block;
|
||||
border-radius: 10rpx;
|
||||
color: red;
|
||||
border: 1px solid red;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.goumaiTips{
|
||||
margin-top: 20rpx;
|
||||
.item{align-items: center;}
|
||||
// span{border: none !important; background-color: transparent !important; margin-right: 20rpx !important;}
|
||||
}
|
||||
.newBox {
|
||||
|
||||
.item {
|
||||
|
||||
margin-bottom: 20rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 10rpx;
|
||||
@include ptop_bottm(10px);
|
||||
@include pleft_right(10px);
|
||||
|
||||
// @include mshadow(10px, 1)
|
||||
.imgcontainer {
|
||||
display: block;
|
||||
width: 80rpx;
|
||||
margin-right: 20rpx;
|
||||
// background-size: cover;
|
||||
// background-position: center;
|
||||
height: 120rpx;
|
||||
flex-grow: 1;
|
||||
// @include ptop_bottm(10px);
|
||||
overflow: hidden;
|
||||
|
||||
// @include pleft_right(10px);
|
||||
image {
|
||||
width: 100%;
|
||||
height: 120rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.btn_box {
|
||||
text-align: right;
|
||||
|
||||
text {
|
||||
border-radius: 20rpx;
|
||||
padding: 3px 5px;
|
||||
@include theme("btn_bg");
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.buyItems {
|
||||
width: 60%;
|
||||
|
||||
text{
|
||||
display:block; width: 100%; background-color: red;
|
||||
font-size: 26rpx;
|
||||
color: #000;
|
||||
@include toe()}
|
||||
}
|
||||
|
||||
.jianjie {
|
||||
line-height: 30rpx;
|
||||
height: 60rpx;
|
||||
overflow: hidden;
|
||||
overflow: hidden !important;
|
||||
margin-top: 10rpx;
|
||||
font-size: 24rpx;
|
||||
@include bov();
|
||||
color: #9c9c9c;
|
||||
}
|
||||
|
||||
.txt555 {
|
||||
display:block; width: 100%;
|
||||
font-size: 26rpx;
|
||||
color: #000;
|
||||
@include toe()
|
||||
}
|
||||
}
|
||||
}
|
||||
.tips{ font-size: 24rpx; color: #666; margin: 20rpx 0; margin-bottom: 30rpx;
|
||||
|
||||
.item{align-items: center;}
|
||||
|
||||
span{display: inline-block; margin-right: 10rpx; border-radius: 4rpx;; width: 30rpx; height: 30rpx; background-color: #fff; border: 1px solid #999;}
|
||||
}
|
||||
.classMateBox {
|
||||
.zmVip {
|
||||
background-image: linear-gradient(-60deg, #53966a 0%, #e1feef 50%, #e1feef 100%);
|
||||
}
|
||||
|
||||
.wumenVip {
|
||||
background-image: linear-gradient(-60deg, #578df0 0%, #f1f4fd 50%, #f1f4fd 100%);
|
||||
}
|
||||
|
||||
.superVip {
|
||||
background-image: linear-gradient(-60deg, #965af0 0%, #fdf0ed 50%, #fdf0ed 100%);
|
||||
}
|
||||
|
||||
.item {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
|
||||
.textItems { overflow: hidden;
|
||||
width: 100%;
|
||||
align-items: center;
|
||||
.nick{ display: block;
|
||||
@include toe();
|
||||
}
|
||||
.outBtn {
|
||||
padding: 6rpx 10rpx;
|
||||
display: inline-block;
|
||||
border-radius: 10rpx;
|
||||
color: $themeColor;
|
||||
border: 1px solid $themeColor;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
// .txt555 {
|
||||
// font-size: 28rpx;
|
||||
// color: #333;
|
||||
// }
|
||||
|
||||
.userType {
|
||||
position: absolute;
|
||||
font-size: 26rpx;
|
||||
right: 30rpx;
|
||||
top: 8rpx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.classmateImg {
|
||||
width: 40rpx;
|
||||
margin-right: 20rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 100rpx;
|
||||
|
||||
image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -208,7 +208,7 @@
|
||||
// 获取医案任务详情
|
||||
getTaskInfo(){
|
||||
$http.request({
|
||||
url: "common/class/getClassTaskInfo",
|
||||
url: "common/class/getClassTaskInfoStudent",
|
||||
method: "POST",
|
||||
data: {
|
||||
"taskId": this.thisTask.id
|
||||
|
||||
@@ -21,70 +21,78 @@
|
||||
|
||||
</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>
|
||||
<uni-section class="mb-10 nobg" title="提交记录" type="line"></uni-section>
|
||||
<view class="zuoyeListBox" v-if="zuoyeList.length > 0">
|
||||
<view class="newBox">
|
||||
<view class="item " v-for="(item, index) in zuoyeList" @click="editOrAdd(item)">
|
||||
<view class="leve1 flex_box" style="justify-content: space-between;">
|
||||
<view class="flex_box" style="justify-items: center;">
|
||||
<view class="classmateImg">
|
||||
<image v-if="item.createUser.avatar != null && item.createUser.avatar != ''"
|
||||
:src="item.createUser.avatar" mode="aspectFit"></image>
|
||||
<image v-else src="/static/icon/morenAvavter.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="userName flex_box">
|
||||
<text
|
||||
v-if="item.createUser.nickname != '' && item.createUser.nickname != null">匿名用户</text>
|
||||
<text v-else>匿名用户</text>
|
||||
</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 class="leve2">
|
||||
<!-- <view class="imgBox flex_box" v-if="item.fileList.length > 0">
|
||||
<view class="itemImg" v-for="(item, index) in item.fileList" :key="index">
|
||||
<image @click="previewImage(item.url)" :src="item.url" mode="widthFix"></image>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="">
|
||||
<radio value="1" :checked="1 == form.display" />他人可见</label>
|
||||
{{item.content}}
|
||||
</view>
|
||||
</radio-group>
|
||||
<span
|
||||
style="color: #999; font-size: 28rpx; margin-top: 20rpx; display: block;">(不勾选时,班级管理员以外的人看不见提交的内容)</span>
|
||||
|
||||
<view class="date">
|
||||
{{item.createTime}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-forms>
|
||||
</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>
|
||||
<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="fileList1.length > 0">
|
||||
<view class="itemImg" v-for="(item, index) in fileList1" :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;">
|
||||
学员信息:{{curReplay.createUser.nickname != null && curReplay.createUser.nickname != '' ? curReplay.createUser.nickname : '匿名用户'}}
|
||||
/ {{curReplay.createUser.tel}}
|
||||
</view>
|
||||
<view class="" style="background-color: beige; padding: 10rpx 10rpx; margin-top: 20rpx;">
|
||||
<uni-forms :modelValue="form" :rules="rules" ref="form">
|
||||
<uni-forms-item label="分数" name="score" >
|
||||
<uni-easyinput type="number" v-model="form.score" placeholder="请输入分数" />
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
</view>
|
||||
<view class="btn_box"><button @click="onSubmit">提 交</button></view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -94,7 +102,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const taskinfo1 = require('@/data/manTaskInfo.json')
|
||||
// const taskinfo1 = require('@/data/manTaskInfo.json')
|
||||
import $http from '@/config/requestConfig.js';
|
||||
import {
|
||||
mapState
|
||||
@@ -102,23 +110,26 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showEditBlank:false,
|
||||
studentList:[],
|
||||
loadFlag:false,
|
||||
showEditBlank: false,
|
||||
zuoyeList: [],
|
||||
loadFlag: false,
|
||||
thisTask: {},
|
||||
status: 88,
|
||||
TaskId: undefined,
|
||||
userMes: undefined,
|
||||
FileList11: [],
|
||||
FileList11: [],
|
||||
fileList1: [],
|
||||
pPage: 0,
|
||||
form: {
|
||||
score: undefined, //分数
|
||||
taskId: undefined,
|
||||
id: undefined,
|
||||
display: "1", //0不展示1展示
|
||||
content: "",
|
||||
img: ""
|
||||
},
|
||||
ispreviewImage :false,
|
||||
curReplay: {},
|
||||
rules: {
|
||||
content: {
|
||||
rules: [{
|
||||
@@ -131,27 +142,27 @@
|
||||
|
||||
},
|
||||
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('e', e)
|
||||
if (e.id) {
|
||||
this.thisTask.id = e.id
|
||||
this.getTaskInfo()
|
||||
this.getReplayList()
|
||||
}
|
||||
|
||||
// console.log('this.FileList', this.FileList)
|
||||
// this.TaskId = e.id
|
||||
this.getUserInfo()
|
||||
|
||||
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.status != 2 && this.status != 3) {
|
||||
this.getstudentList()
|
||||
this.getReplayList()
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
@@ -159,15 +170,20 @@
|
||||
uni.stopPullDownRefresh()
|
||||
},
|
||||
onShow() {
|
||||
this.form.taskId = this.thisTask.id
|
||||
|
||||
this.form.taskId = this.thisTask.id
|
||||
console.log('this.ispreviewImage',this.ispreviewImage);
|
||||
if(this.ispreviewImage){
|
||||
|
||||
this.showEditBlank = true
|
||||
this.ispreviewImage = false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(["userInfo"]),
|
||||
},
|
||||
methods: {
|
||||
// 获取医案任务详情
|
||||
getTaskInfo(){
|
||||
getTaskInfo() {
|
||||
$http.request({
|
||||
url: "common/class/getClassTaskInfo",
|
||||
method: "POST",
|
||||
@@ -182,8 +198,9 @@
|
||||
if (res.code == 0) {
|
||||
// that.isHave = true
|
||||
// console.log(res)
|
||||
// this.thisTask = res.classTask
|
||||
this.thisTask = taskinfo1.classTask
|
||||
this.thisTask = res.result.classTask
|
||||
// this.zuoyeList = res.result.userList
|
||||
// this.thisTask = taskinfo1.classTask
|
||||
this.fileList11 = []
|
||||
if (this.thisTask.img != '') {
|
||||
var imgs = this.thisTask.img.split(',')
|
||||
@@ -192,8 +209,8 @@
|
||||
url: item
|
||||
})
|
||||
})
|
||||
}
|
||||
console.log('thisTask',this.thisTask);
|
||||
}
|
||||
console.log('thisTask', this.thisTask);
|
||||
}
|
||||
}).catch(e => {
|
||||
console.log(e, '数据报错')
|
||||
@@ -204,7 +221,7 @@
|
||||
})
|
||||
});
|
||||
},
|
||||
closePup(){
|
||||
closePup() {
|
||||
this.showEditBlank = false
|
||||
this.form = {
|
||||
taskId: undefined,
|
||||
@@ -218,29 +235,30 @@
|
||||
deletePic(event) {
|
||||
this.fileList1.splice(event.index, 1)
|
||||
},
|
||||
editOrAdd(item){
|
||||
editOrAdd(item) {
|
||||
console.log('item', item);
|
||||
if(item){
|
||||
if (item) {
|
||||
this.curReplay = item
|
||||
this.form = item
|
||||
this.fileList1 = [...item.fileList]
|
||||
console.log('fileList4545',item.fileList);
|
||||
}
|
||||
else{
|
||||
this.fileList1 = [...item.fileList]
|
||||
console.log('fileList4545', item.fileList);
|
||||
} else {
|
||||
console.log('form', this.form);
|
||||
}
|
||||
|
||||
|
||||
this.showEditBlank = true
|
||||
},
|
||||
radioChange1(e){
|
||||
|
||||
radioChange1(e) {
|
||||
this.listDisplay = e.detail.value
|
||||
console.log('点了',e);
|
||||
console.log('点了', e);
|
||||
this.pPage = 0
|
||||
this.studentList = []
|
||||
this.getstudentList()
|
||||
this.zuoyeList = []
|
||||
this.getReplayList()
|
||||
},
|
||||
previewImage(url) {
|
||||
console.log(url);
|
||||
this.ispreviewImage = true
|
||||
this.showEditBlank = false
|
||||
uni.previewImage({
|
||||
urls: [url],
|
||||
longPressActions: {
|
||||
@@ -251,50 +269,52 @@
|
||||
},
|
||||
});
|
||||
},
|
||||
getstudentList() {
|
||||
getReplayList() {
|
||||
this.status = 1;
|
||||
if (this.loadFlag) {
|
||||
console.log("有未完成的进程");
|
||||
return;
|
||||
}
|
||||
uni.showLoading({
|
||||
title:'加载中'
|
||||
title: '加载中'
|
||||
})
|
||||
this.loadFlag = true;
|
||||
this.pPage++;
|
||||
$http.request({
|
||||
url: 'common/class/getReplyListByTaskIdStudent',
|
||||
url: 'common/class/getReplyListByTaskId',
|
||||
method: "POST",
|
||||
data: {
|
||||
"limit": 10,
|
||||
"page": this.pPage,
|
||||
"taskId": this.thisTask.id,
|
||||
"myReply": this.listDisplay //0全部作业1我的作业
|
||||
"taskId": this.thisTask.id
|
||||
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
if(res.page.records.length > 0){
|
||||
if (res.page.records.length > 0) {
|
||||
var list = res.page.records
|
||||
list.forEach(item => {
|
||||
item.fileList = []
|
||||
if(item.img != ''){
|
||||
if (item.img != '') {
|
||||
var _urs = item.img.split(',')
|
||||
_urs.forEach(item1 => {
|
||||
item.fileList.push({url:item1})
|
||||
item.fileList.push({
|
||||
url: item1
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
this.studentList = this.studentList.concat(list)
|
||||
console.log('chulihoude ',this.studentList);
|
||||
this.zuoyeList = this.zuoyeList.concat(list)
|
||||
console.log('chulihoude ', this.zuoyeList);
|
||||
if (res.page.pages > this.pPage) {
|
||||
this.status = 0;
|
||||
} else {
|
||||
this.status = 2;
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
this.status = 3; // 暂无数据
|
||||
}
|
||||
this.loadFlag = false;
|
||||
@@ -306,7 +326,7 @@
|
||||
// console.log('表单错误信息:', err);
|
||||
uni.showToast({
|
||||
title: '获取作业列表失败',
|
||||
icon:'none'
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
|
||||
@@ -339,8 +359,8 @@
|
||||
this.form.img = _list.join(',')
|
||||
}
|
||||
var _url = ""
|
||||
this.form.id ? _url =
|
||||
'common/class/editClassTaskReply' : _url = 'common/class/addClassTaskReply'
|
||||
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,
|
||||
@@ -348,7 +368,7 @@
|
||||
"content": this.form.content,
|
||||
"img": this.form.img
|
||||
}
|
||||
console.log('data',data);
|
||||
console.log('data', data);
|
||||
$http.request({
|
||||
url: _url,
|
||||
method: "POST",
|
||||
@@ -363,14 +383,14 @@
|
||||
icon: 'success'
|
||||
})
|
||||
this.FileList = []
|
||||
this.closePup()
|
||||
setTimeout(()=>{
|
||||
this.closePup()
|
||||
setTimeout(() => {
|
||||
this.pPage = 0
|
||||
this.studentList = []
|
||||
this.zuoyeList = []
|
||||
this.getTaskInfo()
|
||||
this.getstudentList()
|
||||
},200)
|
||||
}).catch(e => {
|
||||
this.getReplayList()
|
||||
}, 200)
|
||||
}).catch(e => {
|
||||
uni.showToast({
|
||||
title: '操作失败',
|
||||
icon: 'error'
|
||||
@@ -384,14 +404,14 @@
|
||||
})
|
||||
})
|
||||
},
|
||||
clickStudents(item){
|
||||
console.log('item',item);
|
||||
clickStudents(item) {
|
||||
console.log('item', item);
|
||||
},
|
||||
addPic(e) {
|
||||
addPic(e) {
|
||||
let that = this;
|
||||
console.log("添加图片", that.fileList1);
|
||||
console.log("添加图片", that.fileList1);
|
||||
for (var i = 0; i < e.file.length; i++) {
|
||||
console.log(i,e.file[i].url)
|
||||
console.log(i, e.file[i].url)
|
||||
uni.uploadFile({
|
||||
url: this.$baseUrl + "oss/fileoss",
|
||||
filePath: e.file[i].url,
|
||||
@@ -422,14 +442,14 @@
|
||||
console.log('点了', this.form.display, e);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "@/style/mixin.scss";
|
||||
|
||||
::v-deep .uni-forms-item{margin-bottom: 0 !important;}
|
||||
.flexbox {
|
||||
display: flex;
|
||||
}
|
||||
@@ -438,18 +458,34 @@
|
||||
color: red;
|
||||
padding-right: 20rpx;
|
||||
}
|
||||
.noanser{ padding: 20rpx;
|
||||
text-align: center;
|
||||
|
||||
.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;}
|
||||
.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;}
|
||||
|
||||
.zuoyeListBox {
|
||||
margin-top: 40rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.btn_box {
|
||||
margin-top: 70rpx;
|
||||
padding-bottom: 20rpx;
|
||||
@@ -492,7 +528,7 @@
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
padding-top: 0;
|
||||
|
||||
.anserContent{line-height: 50rpx; padding: 20rpx 0; display: block;}
|
||||
h3 {
|
||||
line-height: 80rpx;
|
||||
width: 50%;
|
||||
@@ -503,44 +539,81 @@
|
||||
border-radius: 0 0 20rpx 20rpx;
|
||||
}
|
||||
}
|
||||
.nobg{background: transparent;}
|
||||
|
||||
.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%;}
|
||||
}
|
||||
}
|
||||
|
||||
.redBorder {
|
||||
border: 1px solid #ff8f8f !important;
|
||||
}
|
||||
|
||||
.blueBorder {
|
||||
border: 1px solid #9111aa !important;
|
||||
}
|
||||
|
||||
.greenBorder {
|
||||
border: 1px solid #55aa00 !important;
|
||||
}
|
||||
|
||||
.newBox {
|
||||
justify-content: start;
|
||||
padding: 10rpx 10rpx 0 10rpx;
|
||||
|
||||
.classmateImg {
|
||||
width: 60rpx !important;
|
||||
height: 60rpx !important;
|
||||
margin-right: 20rpx;
|
||||
|
||||
image {
|
||||
width: 60rpx !important;
|
||||
height: 60rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.item {
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
box-shadow: none !important;
|
||||
padding: 20rpx;
|
||||
margin-bottom: 30rpx;
|
||||
// border-bottom: 1px solid #eee;
|
||||
// border-radius: 0 !important;
|
||||
|
||||
.leve1 {
|
||||
align-items: center;
|
||||
border-bottom: 1px dashed #eee;
|
||||
padding-bottom: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.leve2 {}
|
||||
}
|
||||
}
|
||||
|
||||
.taskContent {
|
||||
font-size: 30rpx;
|
||||
font-size: 30rpx; line-height: 50rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.date {
|
||||
color: #999;
|
||||
text-align: right;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.imgBox {
|
||||
flex-wrap: wrap;
|
||||
|
||||
.item {
|
||||
.itemImg {
|
||||
width: 20%;
|
||||
margin-right: 10rpx; border: 1px solid #eee;
|
||||
margin-right: 10rpx;
|
||||
border: 1px solid #eee;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
|
||||
@@ -9,46 +9,41 @@
|
||||
<view class="item " v-for="(item, index) in taskList" @click="clickTask(item)">
|
||||
<view class="leve1 flex_box">
|
||||
<text>{{item.title}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="leve2 flex_box">
|
||||
<view class="item">
|
||||
<view class="">
|
||||
<uni-icons type="checkmarkempty" size="30" color="#55aa7f"></uni-icons>
|
||||
<uni-icons type="checkmarkempty" size="18" color="#55aa7f"></uni-icons>
|
||||
</view>
|
||||
<view class="">
|
||||
已交{{item.giveHomeWorkNumber}}人
|
||||
已交 {{item.otherInfo.setGiveHomeWorkNumber}} 人
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="">
|
||||
<uni-icons type="closeempty" size="30" color="#ff878d"></uni-icons>
|
||||
<uni-icons type="closeempty" size="18" color="#ff878d"></uni-icons>
|
||||
</view>
|
||||
<view class="">
|
||||
未交{{item.noGiveHomeWorkNumber}}人
|
||||
未交 {{item.otherInfo.setNoGiveHomeWorkNumber}} 人
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="">
|
||||
<uni-icons type="auth" size="30" color="#55aa7f"></uni-icons>
|
||||
<uni-icons type="auth" size="18" color="#55aa7f"></uni-icons>
|
||||
</view>
|
||||
<view class="">
|
||||
已评分{{item.giveScoreNumber}}人
|
||||
已评分 {{item.otherInfo.setGiveScoreNumber}} 人
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="">
|
||||
<uni-icons type="spinner-cycle" size="30" color="#ff878d"></uni-icons>
|
||||
<uni-icons type="spinner-cycle" size="18" color="#ff878d"></uni-icons>
|
||||
</view>
|
||||
<view class="">
|
||||
未评分{{item.noGiveScoreNumber}}人
|
||||
未评分 {{item.otherInfo.setNoGiveScoreNumber}} 人
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="leve3">
|
||||
<view class="tips flex_box">
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -62,7 +57,7 @@
|
||||
|
||||
<script>
|
||||
import $http from '@/config/requestConfig.js';
|
||||
const taskLIst1 = require('@/data/taskList.json')
|
||||
// const taskLIst1 = require('@/data/taskList.json')
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -76,7 +71,7 @@
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
console.log('taskLIst1',taskLIst1);
|
||||
// console.log('taskLIst1',taskLIst1);
|
||||
this.classId = e.classId
|
||||
this.pageType = e.type
|
||||
if (e.type == '0') {
|
||||
@@ -88,11 +83,20 @@
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.pPage = 0
|
||||
this.taskList = []
|
||||
this.getList()
|
||||
uni.stopPullDownRefresh()
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.status != 2 && this.status != 3) {
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
// this.getList()
|
||||
},
|
||||
onBackPress() {
|
||||
if (this.showRight || this.showLeft) {
|
||||
this.$refs.showLeft.close()
|
||||
@@ -138,8 +142,8 @@
|
||||
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 // 测试数据
|
||||
this.taskList = this.taskList.concat(lis)
|
||||
// this.taskList = taskLIst1.page.records // 测试数据
|
||||
if (res.page.pages > this.pPage) {
|
||||
this.status = 0;
|
||||
} else {
|
||||
@@ -206,7 +210,7 @@
|
||||
// border-bottom: 1px solid #eee;
|
||||
border-radius: 20rpx;
|
||||
padding: 20rpx;
|
||||
|
||||
margin-bottom: 20rpx;
|
||||
.leve1 {
|
||||
align-items: center;
|
||||
border-bottom: 1px dashed #eee;
|
||||
@@ -215,8 +219,8 @@
|
||||
// .userName{}
|
||||
}
|
||||
|
||||
.leve2 {
|
||||
color: #666;
|
||||
.leve2 { justify-content: space-between;
|
||||
color: #666; font-size: 24rpx;
|
||||
|
||||
.item{text-align: center;}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user