暂存
This commit is contained in:
@@ -5,12 +5,10 @@
|
||||
<!-- <view class="curseSet" slot="right" @click="shuomingPage('/pages/course/courseSet',tagId,pid)">
|
||||
<uni-icons type="info" size="24"></uni-icons>设置</view> -->
|
||||
</z-nav-bar>
|
||||
|
||||
|
||||
<!-- <view class="" style="background-color: #f4f7ff; min-height: calc(100vh - 200rpx);"> -->
|
||||
<view class="mainContent" v-if="thisClass.id">
|
||||
<!-- <view class="" style="height: 40rpx;">
|
||||
|
||||
</view> -->
|
||||
<!-- <view class="" style="height: 40rpx;"></view> -->
|
||||
<view :class="['classStatus',
|
||||
thisClass.state == '0' ? 'daikai' :'',
|
||||
thisClass.state == '1' ? 'xuexizhong' :'',
|
||||
@@ -106,14 +104,17 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex_box" v-if="thisClass.state == '1'">
|
||||
<view class="item fabuhomework" @click="goAddHomeWork('1')" v-if="thisClass.state == '1' && ( roleCode.includes('2') || roleCode.includes('1'))">
|
||||
<text>发布医案</text>
|
||||
<view class="item fabuhomework" @click="goTaskListForWait('0')" v-if="thisClass.state == '1'">
|
||||
<text>作业列表</text>
|
||||
</view>
|
||||
<view class="item yianList" @click="goTaskListForWait('1')" v-if="thisClass.state == '1'">
|
||||
<text>医案列表</text>
|
||||
</view>
|
||||
<view class="item setBanewei" v-if="thisClass.state != '2'"
|
||||
@click="goSetAdmin('/pages/miniClass/memberSet')">
|
||||
<text>设置班委</text>
|
||||
</view>
|
||||
<view class="item overClass" @click="opClass('2')" v-if="thisClass.state == '1' && (roleCode.includes('1') || roleCode.includes('2'))">
|
||||
<view class="item overClass" @click="changeClassStatu('2')" v-if="thisClass.state == '1' && thisClass.showOverBtn && (roleCode.includes('1') || roleCode.includes('2'))">
|
||||
<text>结班</text>
|
||||
</view>
|
||||
|
||||
@@ -132,8 +133,7 @@
|
||||
itemStyle="padding-left:10rpx; background-color:#fff; padding-right: 10rpx; height: 50px; font-size:26rpx"></u-tabs>
|
||||
</view>
|
||||
<!-- 学员列表 -->
|
||||
<view class="" v-if="tabId == '2'">
|
||||
|
||||
<view class="" v-if="tabId == '2'">
|
||||
<view class="classMateBox" v-show="students.length> 0 ">
|
||||
<uni-section class="mb-10 nobg xueyuanTitle" title="班内学员" type="line" sub-title="">共 {{students.length}} 名学员</uni-section>
|
||||
<view class="newBox" >
|
||||
@@ -154,13 +154,12 @@
|
||||
{{item.student.nickname}}
|
||||
<template >
|
||||
<text >({{item.student.tel}})</text>
|
||||
</template>
|
||||
|
||||
</template>
|
||||
</text>
|
||||
<text class="txt555" v-else>
|
||||
匿名用户
|
||||
</text>
|
||||
<text @click.stop="outClass(item.student.id)" class="outBtn">踢出班级</text>
|
||||
<text @click.stop="outClass(item.student.id)" class="outBtn" v-if="thisClass.state != '2'">踢出班级</text>
|
||||
<!-- <text class="userType" v-if="item.student.vip == '1'">超级VIP用户</text>
|
||||
<text class="userType" v-if="item.student.vip == '2' ">医学VIP用户</text>
|
||||
<text class="userType" v-if="item.student.vip == '3' ">国学VIP用户</text> -->
|
||||
@@ -175,9 +174,23 @@
|
||||
</view>
|
||||
<view class="" v-if="tabId == '0'">
|
||||
<view class="otherItems flex_box">
|
||||
<view class="itt"><text class="ciyao">创建日期</text><text
|
||||
|
||||
<view class="itt" v-if="thisClass.state == 0">
|
||||
<text class="ciyao">创建日期</text>
|
||||
<text
|
||||
class="mainTxt">{{thisClass.createTime.substring(0,10)}}</text>
|
||||
</view>
|
||||
<view class="itt" v-if="thisClass.state == 1">
|
||||
<text class="ciyao">开班日期</text>
|
||||
<text
|
||||
class="mainTxt">{{thisClass.startTime.substring(0,10)}}</text>
|
||||
</view>
|
||||
|
||||
<view class="itt" v-if="thisClass.state == 2">
|
||||
<text class="ciyao">结班日期</text>
|
||||
<text
|
||||
class="mainTxt">{{thisClass.endTime.substring(0,10)}}</text>
|
||||
</view>
|
||||
<view class="itt"><text class="ciyao">班级类型</text>
|
||||
<text class="mainTxt" v-if="classModel.type == '0'">普通小班</text>
|
||||
<text class="mainTxt" v-if="classModel.type == '1'">联合班</text>
|
||||
@@ -279,7 +292,8 @@
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
<script>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import classInfoWorkBlank from "@/components/classInfoWorkBlank.vue";
|
||||
import $http from '@/config/requestConfig.js';
|
||||
import {
|
||||
@@ -410,7 +424,7 @@
|
||||
},
|
||||
|
||||
onShow() {
|
||||
this.getClassInfo()
|
||||
this.getClassInfo()
|
||||
// this.roleCode = await this.getRealRole()
|
||||
},
|
||||
components: {
|
||||
@@ -481,7 +495,7 @@
|
||||
},
|
||||
goTaskListForWait(type){
|
||||
uni.navigateTo({
|
||||
url: `/pages/miniClass/taskListForWaitOpen?classId=${this.thisClass.id}&type=${type}&minNumber=${this.thisClass.homeWorkNumber}&roleCode=${this.roleCode}&classState=0`
|
||||
url: `/pages/miniClass/taskListForWaitOpen?classId=${this.thisClass.id}&type=${type}&roleCode=${this.roleCode}&classState=${this.thisClass.state}`
|
||||
})
|
||||
},
|
||||
goAddHomeWork(type){
|
||||
@@ -786,8 +800,28 @@
|
||||
},
|
||||
})
|
||||
}
|
||||
}else{
|
||||
that.opClass(statusCode)
|
||||
}else if(statusCode == '2'){
|
||||
var nowTime = Date.now()
|
||||
var datecc = new Date(this.thisClass.endTime);
|
||||
var time3 = datecc.getTime(); // 创建时间的时间戳 毫秒
|
||||
console.log('datecc...',datecc,nowTime,time3)
|
||||
|
||||
if(nowTime < time3){
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content:'是否要提前结班?',
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
that.opClass(statusCode)
|
||||
}else{
|
||||
return
|
||||
}
|
||||
},
|
||||
})
|
||||
}else{
|
||||
that.opClass(statusCode)
|
||||
}
|
||||
// that.opClass(statusCode)
|
||||
}
|
||||
|
||||
},
|
||||
@@ -816,7 +850,7 @@
|
||||
}, 500)
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: `res.msg`,
|
||||
title: res.msg,
|
||||
icon:'none',
|
||||
duration: 300
|
||||
})
|
||||
@@ -836,9 +870,9 @@
|
||||
if (userId) {
|
||||
_useId = userId
|
||||
_txt = '即将踢出该学员,是否继续?'
|
||||
} else {
|
||||
_useId = this.userInfo.id
|
||||
_txt = '您即将退出当前班级,是否继续?'
|
||||
}
|
||||
else {
|
||||
return
|
||||
}
|
||||
|
||||
uni.showModal({
|
||||
@@ -907,8 +941,26 @@
|
||||
console.log('res--------',this.classId,res,);
|
||||
this.refresh = false
|
||||
if (res.code == 0) {
|
||||
this.isHave = res.result.isJoin
|
||||
// this.isHave = res.result.isJoin
|
||||
this.thisClass = res.result.class
|
||||
this.classModel = res.result.classModel
|
||||
this.thisClass.showOverBtn = false
|
||||
const nowTime = Date.now()
|
||||
// console.log('starting timer...毫秒',nowTime)
|
||||
var datecc = new Date(this.thisClass.startTime);
|
||||
console.log('datecc...',datecc)
|
||||
var time3 = datecc.getTime(); // 开班时间的时间戳 毫秒
|
||||
console.log('time3...毫秒',time3, this.classModel.days)
|
||||
var off70 = undefined // 时长过70%显示结班按钮天数
|
||||
off70 = Math.ceil(parseInt(this.classModel.days) * 0.7 )
|
||||
var off70miniSecond = off70 * 1000*60*60*24
|
||||
if((off70miniSecond + time3) <= nowTime){
|
||||
console.log('显示结班按钮');
|
||||
this.thisClass.showOverBtn = true
|
||||
}else{
|
||||
console.log('不显示');
|
||||
}
|
||||
console.log('off70...天数',off70,off70miniSecond)
|
||||
this.thisClass.homeWorkNumber = 4
|
||||
if(res.result.classModel.days > 0){
|
||||
this.thisClass.homeWorkNumber = Math.ceil(res.result.classModel.days / 7)
|
||||
@@ -943,13 +995,15 @@
|
||||
})
|
||||
}
|
||||
|
||||
this.classModel = res.result.classModel
|
||||
|
||||
this.courses = res.result.courses
|
||||
this.students = res.result.students
|
||||
this.refresh = true
|
||||
if(this.thisClass.state == 0){
|
||||
this.homeWorkList = await this.getHomeWorkLength()
|
||||
}
|
||||
if(this.thisClass.state == 0){
|
||||
this.homeWorkList = await this.getHomeWorkLength()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
uni.hideLoading()
|
||||
@@ -1096,6 +1150,7 @@
|
||||
.fabuhomework{
|
||||
background-color: #97a1ff;
|
||||
}
|
||||
.yianList{background-color: #55aa7f;}
|
||||
.setBanewei {
|
||||
background-color: #e7b772;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user