暂存
This commit is contained in:
@@ -6,8 +6,10 @@
|
||||
<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" @click="changeClassStatu('1')">开班</text>
|
||||
<text class="jieban" v-if="thisClass.state == '1' && isMonitor || thisClass.state == '1' && isDirector" @click="changeClassStatu('2')">结班</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">
|
||||
@@ -26,10 +28,7 @@
|
||||
<view class="" v-if="thisClass.content != ''">
|
||||
<text class="adminName">教学目标/班级简介</text>
|
||||
</view>
|
||||
<rich-text
|
||||
class="banjiJianjie"
|
||||
:nodes="formatRichText(thisClass.content)"
|
||||
></rich-text>
|
||||
<rich-text class="banjiJianjie" :nodes="formatRichText(thisClass.content)"></rich-text>
|
||||
<!-- <view class="banjiJianjie" v-html="thisClass.content"></view> -->
|
||||
|
||||
|
||||
@@ -41,7 +40,8 @@
|
||||
</view>
|
||||
<!-- 课程列表 -->
|
||||
<view class="newBox" v-show="courses.length > 0 && tabId == '0'">
|
||||
<view class="item flexbox" v-for="(item, index) in courses" :key="index" @click="onPageJump('/pages/course/courseDetail',item.id)">
|
||||
<view class="item flexbox" v-for="(item, index) in courses" :key="index"
|
||||
@click="onPageJump('/pages/course/courseDetail',item.id)">
|
||||
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
|
||||
<view class="imgcontainer">
|
||||
<image :src="item.image" mode="aspectFit"></image>
|
||||
@@ -65,21 +65,22 @@
|
||||
<!-- 班内同学 -->
|
||||
<view class="classMateBox" v-show="students.length> 0 && tabId == '2'">
|
||||
<view class="newBox">
|
||||
<view
|
||||
:class="['item','flexbox',
|
||||
<view :class="['item','flexbox',
|
||||
item.vip == '1' ? 'superVip' : '',
|
||||
item.vip == '2' ? 'wumenVip' : '',
|
||||
item.vip == '3' ? 'zmVip' : '']" v-for="(item, index) in students" :key="index">
|
||||
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
|
||||
<view class="classmateImg">
|
||||
<image v-if="item.avatar != null && item.avatar != ''" :src="item.avatar" mode="aspectFit"></image>
|
||||
<image v-if="item.avatar != null && item.avatar != ''" :src="item.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.nickname != null && item.nickname != ''">
|
||||
{{item.nickname}}
|
||||
<template v-if="isDirector || isMonitor">
|
||||
<text >({{item.tel}})</text> <text @click="outClass(item.id)" class="outBtn">踢出班级</text>
|
||||
<text>({{item.tel}})</text> <text @click="outClass(item.id)"
|
||||
class="outBtn">踢出班级</text>
|
||||
</template>
|
||||
|
||||
</text>
|
||||
@@ -100,7 +101,8 @@
|
||||
<!-- 班内提交 -->
|
||||
<view class="" v-if=" tabId == '3'">
|
||||
<view class="flex_box tijiaoTitle">
|
||||
<text :class="tijiaoTitleId == item.id ? 'active' :''" @click="titleClick(item)" v-for="(item, index) in tijiaoTitleList" :key="index">{{item.name}}</text>
|
||||
<text :class="tijiaoTitleId == item.id ? 'active' :''" @click="titleClick(item)"
|
||||
v-for="(item, index) in tijiaoTitleList" :key="index">{{item.name}}</text>
|
||||
</view>
|
||||
<!-- 班内任务 -->
|
||||
<view class="">
|
||||
@@ -137,12 +139,16 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottomBox" v-if="!isHave && !isDirector && !isMonitor">
|
||||
<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="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>
|
||||
<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">
|
||||
@@ -224,7 +230,8 @@
|
||||
}, {
|
||||
name: '班内提交',
|
||||
id: '3'
|
||||
}],
|
||||
}
|
||||
],
|
||||
admins: {
|
||||
list: [],
|
||||
monitor: {},
|
||||
@@ -250,10 +257,18 @@
|
||||
isDirector: false, // 是主任
|
||||
isHave: false,
|
||||
showMan: false,
|
||||
tijiaoTitleList:[
|
||||
{name:'班内任务', id:'0'},
|
||||
{name:'医案', id:'1'},
|
||||
{name:'心得', id:'2'},
|
||||
tijiaoTitleList: [{
|
||||
name: '班内任务',
|
||||
id: '0'
|
||||
},
|
||||
{
|
||||
name: '医案',
|
||||
id: '1'
|
||||
},
|
||||
{
|
||||
name: '心得',
|
||||
id: '2'
|
||||
},
|
||||
],
|
||||
tijiaoTitleId: '0'
|
||||
}
|
||||
@@ -262,12 +277,6 @@
|
||||
uni.hideTabBar();
|
||||
this.classId = e.id
|
||||
this.getUserInfo()
|
||||
|
||||
// if(e.have == 'isNotHave'){
|
||||
// this.isHave = false // 未加入
|
||||
// }else if(e.have == 'have'){
|
||||
// this.isHave = true // 已加入
|
||||
// }
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.getClassInfo()
|
||||
@@ -280,6 +289,42 @@
|
||||
...mapState(["userInfo"]),
|
||||
},
|
||||
methods: {
|
||||
delClass() {
|
||||
var that = this
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您正在执行删除班级操作,是否继续?',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
$http.request({
|
||||
url: "common/class/joinClass",
|
||||
method: "POST",
|
||||
data: {
|
||||
"classId": that.thisClass.id
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
uni.showToast({
|
||||
title: '删除成功',
|
||||
icon: 'success'
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/miniClass/miniClassMan'
|
||||
})
|
||||
}, 500)
|
||||
}).catch(e => {
|
||||
uni.showToast({
|
||||
title: '删除失败',
|
||||
icon: 'error'
|
||||
})
|
||||
});
|
||||
}}
|
||||
})
|
||||
},
|
||||
titleClick(item) {
|
||||
this.tijiaoTitleId = item.id
|
||||
},
|
||||
@@ -343,6 +388,7 @@
|
||||
},
|
||||
// 加入班级
|
||||
addClass() {
|
||||
|
||||
$http.request({
|
||||
url: "common/class/joinClass",
|
||||
method: "POST",
|
||||
@@ -550,61 +596,166 @@
|
||||
<style lang="scss" scoped>
|
||||
@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 ;}
|
||||
.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;
|
||||
}
|
||||
.del{
|
||||
background-color: #ffa4a6;
|
||||
}
|
||||
.set {
|
||||
background-color: #ffca7e;
|
||||
}
|
||||
|
||||
}
|
||||
.submitRecode{background-color: #fff; border-radius: 20rpx; padding: 20rpx;
|
||||
|
||||
.submitRecode {
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 20rpx;
|
||||
|
||||
.newBox {
|
||||
.classmateImg{width:60rpx !important; height: 60rpx !important;
|
||||
.classmateImg {
|
||||
width: 60rpx !important;
|
||||
height: 60rpx !important;
|
||||
|
||||
image {
|
||||
width:60rpx !important; height: 60rpx;
|
||||
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;
|
||||
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; }
|
||||
.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;
|
||||
}
|
||||
}
|
||||
|
||||
.mainContent {
|
||||
color: #333;
|
||||
padding: 0 20rpx; padding-bottom: 20rpx;
|
||||
padding: 0 20rpx;
|
||||
padding-bottom: 20rpx;
|
||||
background-image: linear-gradient(30deg, #d4eaf0 0%, #d4eaf0 50%, #fdf0ed 100%);
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.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{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; font-size: 26rpx; right: 30rpx; top: 8rpx; color: #fff;}
|
||||
.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 {
|
||||
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;
|
||||
font-size: 26rpx;
|
||||
right: 30rpx;
|
||||
top: 8rpx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
.classmateImg{width:80rpx; margin-right: 40rpx; height: 80rpx; border-radius: 100rpx;
|
||||
}
|
||||
|
||||
.classmateImg {
|
||||
width: 80rpx;
|
||||
margin-right: 40rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 100rpx;
|
||||
|
||||
image {
|
||||
width:80rpx; height: 80rpx;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.mainBox {
|
||||
margin-top: 40rpx;
|
||||
.tabList{border-radius: 20rpx; overflow: hidden; margin-bottom: 20rpx;}
|
||||
|
||||
.tabList {
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
// background-color: #f4f7ff;
|
||||
}
|
||||
|
||||
.newBox {
|
||||
|
||||
.item {
|
||||
@@ -614,8 +765,7 @@
|
||||
@include ptop_bottm(10px);
|
||||
@include pleft_right(10px);
|
||||
|
||||
@include mshadow(10px, 1)
|
||||
.imgcontainer {
|
||||
@include mshadow(10px, 1) .imgcontainer {
|
||||
display: block;
|
||||
width: 80rpx;
|
||||
margin-right: 20rpx;
|
||||
@@ -625,25 +775,34 @@
|
||||
flex-grow: 1;
|
||||
// @include ptop_bottm(10px);
|
||||
overflow: hidden;
|
||||
|
||||
// @include pleft_right(10px);
|
||||
image {
|
||||
width: 100%;
|
||||
height: 120rpx;
|
||||
}
|
||||
}
|
||||
.btn_box{ text-align: right;
|
||||
|
||||
.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;
|
||||
}
|
||||
}
|
||||
|
||||
.buyItems {
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
.jianjie {
|
||||
line-height: 30rpx; height: 60rpx; overflow: hidden;
|
||||
line-height: 30rpx;
|
||||
height: 60rpx;
|
||||
overflow: hidden;
|
||||
overflow: hidden !important;
|
||||
margin-top: 10rpx;
|
||||
font-size: 24rpx;
|
||||
@@ -658,6 +817,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.otherItems {
|
||||
// border: 1px solid #dadada;
|
||||
padding: 20rpx;
|
||||
@@ -665,6 +825,7 @@
|
||||
border-radius: 20rpx;
|
||||
justify-content: space-between;
|
||||
margin: 20rpx 0;
|
||||
|
||||
text {
|
||||
display: block;
|
||||
font-size: 28rpx;
|
||||
@@ -675,25 +836,50 @@
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
}
|
||||
.tijiaoTitle{ justify-content: space-between;
|
||||
text{display: block; width: 30%; padding: 8rpx 0; border-radius: 10rpx; text-align: center; border: 1px solid $themeColor; color:$themeColor;}
|
||||
text.active{background-color: $themeColor; color: #fff;}
|
||||
|
||||
.tijiaoTitle {
|
||||
justify-content: space-between;
|
||||
|
||||
text {
|
||||
display: block;
|
||||
width: 30%;
|
||||
padding: 8rpx 0;
|
||||
border-radius: 10rpx;
|
||||
text-align: center;
|
||||
border: 1px solid $themeColor;
|
||||
color: $themeColor;
|
||||
}
|
||||
|
||||
text.active {
|
||||
background-color: $themeColor;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.guanli {
|
||||
padding: 40rpx;
|
||||
h3{text-align: center; margin-bottom: 20rpx; color: #333;}
|
||||
.item { color: #333;
|
||||
|
||||
h3 {
|
||||
text-align: center;
|
||||
margin-bottom: 20rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.item {
|
||||
color: #333;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.personbox {
|
||||
display: inline-block; color: #666;
|
||||
display: inline-block;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.arryItem {
|
||||
.arryItemSub {
|
||||
display: inline-block; color: #666;
|
||||
display: inline-block;
|
||||
color: #666;
|
||||
// padding-left: 80rpx;
|
||||
}
|
||||
}
|
||||
@@ -702,11 +888,19 @@
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
.adminName {color: #333;
|
||||
|
||||
.adminName {
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.banjiJianjie{ color: #666; font-size: 30rpx; margin-top: 20rpx;}
|
||||
|
||||
.banjiJianjie {
|
||||
color: #666;
|
||||
font-size: 30rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.className {
|
||||
padding: 30rpx 0;
|
||||
position: relative;
|
||||
@@ -733,6 +927,7 @@
|
||||
text.jieban {
|
||||
background-color: $themeColor
|
||||
}
|
||||
|
||||
text.tuichu {
|
||||
background-color: #f4a2a6;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
<!-- <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="classNewBtn">
|
||||
<!-- 主任和副主任可以创建班级 -->
|
||||
<view class="classNewBtn" v-if="isDirector">
|
||||
<view class="box88 flex_box">
|
||||
<view class="" style="width: 60%; text-align: center;">
|
||||
<button type="primary" @click="pupShow = true">新开一个班级</button>
|
||||
@@ -132,6 +133,9 @@
|
||||
status: 3, // 0 不显示, 1 加载中,2 加载全部完成,3 暂无数据
|
||||
page: 1,
|
||||
flag: true, // 函数是否执行完
|
||||
userMes: undefined,
|
||||
isMonitor :undefined,
|
||||
isDirector :undefined,
|
||||
|
||||
};
|
||||
},
|
||||
@@ -145,6 +149,7 @@
|
||||
this.pageTitle = e.title
|
||||
this.pid = e.pid
|
||||
console.log(e, '传入分类id')
|
||||
this.getUserInfo()
|
||||
this.getData()
|
||||
// this.getCateList(this.tagId)
|
||||
},
|
||||
@@ -185,6 +190,21 @@
|
||||
},
|
||||
//方法
|
||||
methods: {
|
||||
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
|
||||
}).catch(e => {
|
||||
uni.showToast({
|
||||
title: '获取用户信息失败',
|
||||
icon: 'none'
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
// 加入班级
|
||||
enterClass(){
|
||||
|
||||
@@ -350,8 +370,8 @@
|
||||
}
|
||||
.curseSet{margin-right: 20rpx; font-size: 28rpx; display: flex; align-items: center;}
|
||||
.fixed {
|
||||
position: fixed; top: 120rpx;
|
||||
z-index: 1; width: 100%; background-color: #fff;
|
||||
// position: fixed; top: 120rpx;
|
||||
// z-index: 1; width: 100%; background-color: #fff;
|
||||
}
|
||||
|
||||
.newBox {
|
||||
|
||||
Reference in New Issue
Block a user