成员设置
This commit is contained in:
@@ -6,9 +6,9 @@
|
||||
<view class="mainContent" v-if="thisClass.id">
|
||||
<view class="className">
|
||||
<h3>{{thisClass.title}}</h3>
|
||||
<text class="kaiban" v-if="thisClass.state == '0' && isMonitor || thisClass.state == '0' && isDirector">开班</text>
|
||||
<text class="jieban" v-if="thisClass.state == '1' && isMonitor || thisClass.state == '1' && isDirector">结班</text>
|
||||
<text class="tuichu" v-if="!isMonitor && !isDirector && isHave" @click="outClass">退出班级</text>
|
||||
<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>
|
||||
<text class="tuichu" v-if="!isMonitor && !isDirector && isHave" @click="outClass()">退出班级</text>
|
||||
</view>
|
||||
<view class="otherItems flex_box">
|
||||
<view><text class="ciyao">创建日期</text><text
|
||||
@@ -79,7 +79,7 @@
|
||||
<text class="txt555" v-if="item.nickname != null && item.nickname != ''">
|
||||
{{item.nickname}}
|
||||
<template v-if="isDirector || isMonitor">
|
||||
<text >({{item.tel}})</text> <text @click="removeStudent(item)">提出班级</text>
|
||||
<text >({{item.tel}})</text> <text @click="outClass(item.id)" class="outBtn">踢出班级</text>
|
||||
</template>
|
||||
|
||||
</text>
|
||||
@@ -108,7 +108,22 @@
|
||||
<view></view>
|
||||
<uni-section class="mb-10 nobg" title="提交的任务" type="line"></uni-section>
|
||||
<view class="submitRecode">
|
||||
|
||||
<view class="newBox">
|
||||
<view class="item ">
|
||||
<view class="leve1 flex_box">
|
||||
<view class="classmateImg">
|
||||
<!-- <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 class="leve2">
|
||||
我是内容
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 医案 -->
|
||||
@@ -125,6 +140,10 @@
|
||||
<view class="bottomBox" v-if="!isHave && !isDirector && !isMonitor">
|
||||
<button type="primary" @click="addClass">一键加入班级</button>
|
||||
</view>
|
||||
<view class="bottomBox manBtnBox flex_box" v-if="isDirector || isMonitor">
|
||||
<text class="edit" v-show="isDirector && thisClass.state == '0'" @click="onPageJump('/pages/miniClass/addClass',thisClass.id, classModel.type)">修改班级</text>
|
||||
<text class="set" @click="onPageJump('/pages/miniClass/memberSet',thisClass.id)">管理人员设置</text>
|
||||
</view>
|
||||
<!-- 管理弹出 -->
|
||||
<u-popup key="1" :show="showMan" :round="10" @close="closeManager">
|
||||
|
||||
@@ -250,6 +269,10 @@
|
||||
// this.isHave = true // 已加入
|
||||
// }
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.getClassInfo()
|
||||
uni.stopPullDownRefresh()
|
||||
},
|
||||
onShow() {
|
||||
this.getClassInfo()
|
||||
},
|
||||
@@ -276,9 +299,9 @@
|
||||
}
|
||||
},
|
||||
// 跳转
|
||||
onPageJump(url,id) {
|
||||
onPageJump(url,id,modeType) {
|
||||
uni.navigateTo({
|
||||
url: `${url}?id=${id}`
|
||||
url: `${url}?id=${id}&type=${modeType}`
|
||||
});
|
||||
},
|
||||
tabClick(e) {
|
||||
@@ -357,9 +380,58 @@
|
||||
closeManager(){
|
||||
this.showMan = false
|
||||
},
|
||||
// 退出班级
|
||||
outClass(){
|
||||
// 改变班级状态
|
||||
changeClassStatu(statusCode){
|
||||
if(statusCode == '1'){
|
||||
// console.log('this.admins',this.admins);
|
||||
if(this.admins.list.length == 0){
|
||||
uni.showToast({
|
||||
title:'请先完成管理人员的设置',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
$http.request({
|
||||
url: "common/class/editClass",
|
||||
method: "POST",
|
||||
data: {
|
||||
"id": this.thisClass.id,
|
||||
"title": this.thisClass.title,
|
||||
"state": statusCode, //小班状态0待开班1已开班2完成
|
||||
"icon": this.thisClass.icon,
|
||||
"content": this.thisClass.content,
|
||||
},
|
||||
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: e.msg,
|
||||
icon: 'error'
|
||||
})
|
||||
});
|
||||
},
|
||||
// 退出班级 // 踢出班级
|
||||
outClass(userId){
|
||||
let that = this
|
||||
var _useId = undefined
|
||||
if(userId){
|
||||
_useId = userId
|
||||
}else{
|
||||
_useId = this.userInfo.id
|
||||
}
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您即将退出当前班级,是否继续?',
|
||||
@@ -370,7 +442,8 @@
|
||||
url: "common/class/quitClass",
|
||||
method: "POST",
|
||||
data: {
|
||||
"classId": that.classId ,
|
||||
"classId": that.classId ,
|
||||
"userId": _useId
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
@@ -403,11 +476,8 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 踢出班级
|
||||
removeStudent(item){
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
getClassInfo() {
|
||||
uni.showLoading({
|
||||
title: '正在加载'
|
||||
@@ -481,6 +551,28 @@
|
||||
@import "@/style/mixin.scss";
|
||||
|
||||
.flexbox{display: flex;}
|
||||
.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;}
|
||||
.set{background-color:#ffca7e ;}
|
||||
|
||||
}
|
||||
.submitRecode{background-color: #fff; border-radius: 20rpx; padding: 20rpx;
|
||||
.newBox{
|
||||
.classmateImg{width:60rpx !important; height: 60rpx !important;
|
||||
image{
|
||||
width:60rpx !important; height: 60rpx;
|
||||
}
|
||||
}
|
||||
.item{
|
||||
box-shadow: none !important; border-bottom: 1px solid #eee; border-radius: 0 !important;
|
||||
.leve1{align-items: center; border-bottom: 1px dashed #eee; padding-bottom: 20rpx; margin-bottom: 20rpx;
|
||||
// .userName{}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.nobg{background-color: transparent !important; }
|
||||
.bottomBox{position: fixed; padding: 20rpx 0; text-align: center; bottom: 100rpx; left: 0; z-index: 2; width: 100%; background-color: #fff;
|
||||
button{width: 80%; margin: 0 auto; border-radius: 40rpx; }
|
||||
@@ -497,8 +589,9 @@
|
||||
.superVip{background-image: linear-gradient(-60deg, #965af0 0%, #fdf0ed 50%, #fdf0ed 100%);}
|
||||
.item{width: 100%; position: relative;
|
||||
.textItems{width: 100%; align-items: center;
|
||||
.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; right: 30rpx; top: 30rpx; color: #fff;}
|
||||
.userType{position: absolute; font-size: 26rpx; right: 30rpx; top: 8rpx; color: #fff;}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user