Browse Source

feat(coach): 更新教练端班级信息页面

- 修改用户类型存储为1
- 添加最近课程、班级成员和作业任务等功能模块- 优化页面布局和样式
master
liutong 1 year ago
parent
commit
5d249e2124
  1. 4
      components/AQ/AQTabber.vue
  2. 13
      pages.json
  3. 3
      pages/coach/course/info.vue
  4. 256
      pages/coach/my/arrival_statistics.vue
  5. 35
      pages/coach/my/index.vue

4
components/AQ/AQTabber.vue

@ -27,7 +27,7 @@
methods: {
async init(){
uni.setStorageSync('userType','3')
uni.setStorageSync('userType','1')
let userType = uni.getStorageSync('userType')
this.userType = userType
@ -63,7 +63,7 @@
},
{
text: "我的",
urlPath:'/pages/student/my/my',//
urlPath:'/pages/coach/my/index',//
iconPath: "/static/images/tabbar/my.png",
selectedIconPath: "/static/images/tabbar/my.png"
}

13
pages.json

@ -168,11 +168,16 @@
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/coach/my/arrival_statistics",
"style": {
"navigationBarTitleText": "到客统计",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#292929",
"navigationBarTextStyle": "white"
}
}
],
"globalStyle": {
"navigationBarTextStyle": "white",

3
pages/coach/course/info.vue

@ -52,7 +52,6 @@
</view>
</view>
</view>
</view>
</template>
<script>
@ -146,7 +145,7 @@ export default {
}
</script>
<style lang="less" >
<style lang="less" scoped>
.main_box{
background: #292929 ;

256
pages/coach/my/arrival_statistics.vue

@ -0,0 +1,256 @@
<!--到课统计-详情-->
<template>
<view class="main_box">
<view class="main_section">
<view class="section_3">
<view class="ul">
<view class="li">
<view class="left_box">
<view class="date_box">
<text>12</text>
<text>/</text>
<text>24</text>
</view>
<view class="ratio">
到课率80%
</view>
</view>
<view class="center_box">
<view>班级少年班</view>
<view>时间2020-05-25 15:30 - 17:30</view>
<view>课室302
</view>
<view>课程篮球少儿课
</view>
</view>
<view class="right_box">
<view class="tag" style="background:#fad24e;">上课中</view>
<!-- <view class="tag" style="background:#1cd188;">待上课</view>-->
</view>
</view>
<view class="li">
<view class="left_box">
<view class="date_box">
<text>12</text>
<text>/</text>
<text>24</text>
</view>
<view class="ratio">
到课率80%
</view>
</view>
<view class="center_box">
<view>班级少年班</view>
<view>时间2020-05-25 15:30 - 17:30</view>
<view>课室302
</view>
<view>课程篮球少儿课
</view>
</view>
<view class="right_box">
<!-- <view class="tag" style="background:#fad24e;">上课中</view>-->
<view class="tag" style="background:#1cd188;">待上课</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import user from '@/api/user.js';
import AQTabber from "@/components/AQ/AQTabber.vue"
export default {
components: {
AQTabber,
},
data() {
return {
formData:{},
//
show_course:false,//
//
course_name:'课程',//
options_course: [
{
text: '请选择课程',
value: '',
checked: true
}, {
text: '羽毛球课程1',
value: '1'
}, {
text: '篮球课程2',
value: '2'
}
],
//
show_classroom:false,//
//
classroom_name:'课室',//
options_classroom: [
{
text: '请选择课室',
value: '',
checked: true
}, {
text: '羽毛球201',
value: '1'
}, {
text: '篮球室101',
value: '2'
}
],
}
},
onLoad() {
},
methods: {
//
clickCourse(e){
console.log(e)
this.course_name = e.text
this.show_course = true
},
//
filterTapCourse() {
//
this.$refs.ref_course.show()
this.show_course = true;
},
//
clickClassroom(e){
console.log(e)
this.classroom_name = e.text
this.show_classroom = true
},
//
filterTapClassroom() {
//
this.$refs.ref_classroom.show()
this.show_classroom = true;
},
//
openViewCourseInfo(item){
uni.navigateTo({
url: '/pages/coach/course/info'
})
},
}
}
</script>
<style lang="less" scoped>
.main_box{
background: #292929 ;
}
//
.navbar_section{
display: flex;
justify-content: center;
align-items: center;
background: #29d3b4;
.title{
padding: 20rpx 0;
font-size: 30rpx;
color: #315d55;
}
}
.main_section{
min-height: 100vh;
background: #292929 100%;
padding: 0 24rpx;
padding-top: 32rpx;
padding-bottom: 150rpx;
font-size: 28rpx;
.section_3{
color: #fff;
font-size: 24rpx;
.title_box{
display: flex;
flex-direction: column;
.top_box{
display: flex;
justify-content: space-between;
align-items: center;
text{
font-size: 30rpx;
}
}
.line{
width: 90rpx;
height: 2px;
background: #29D3B4;
}
}
.ul{
margin-top: 30rpx;
display: flex;
flex-direction: column;
gap: 20rpx;
.li{
position: relative;
border-radius: 22rpx;
background: #434544 100%;
padding: 14rpx 0;
display: flex;
align-items: center;
.left_box{
margin-left: 28rpx;
width: 146rpx;
display: flex;
flex-direction: column;
gap: 10rpx;
.date_box{
display: flex;
font-size: 48rpx;
text:nth-child(1){
color: #29D3B4;
}
}
.ratio{
color: #AAAAAA;
}
}
.center_box{
margin-left: 52rpx;
display: flex;
flex-direction: column;
gap: 10rpx;
}
.right_box{
.tag{
position:absolute;
top: 0rpx;
right: 0rpx;
padding: 10rpx;
width: 102rpx;
text-align: center;
font-size: 24rpx;
border-bottom-left-radius: 20rpx;
border-top-right-radius: 20rpx;
}
}
}
}
}
}
</style>

35
pages/coach/my/index.vue

@ -16,7 +16,7 @@
</view>
<view class="right">
<view class="btn">切换身份</view>
<view class="btn">到课率统计</view>
<view class="btn" @click="openViewArrivalStatistics()">到课率统计</view>
<view class="btn"></view>
</view>
</view>
@ -106,42 +106,15 @@ export default {
data() {
return {
formData:{},
tabType:'1',//1=,2=
Atype:1,//1=,2=
}
},
onLoad() {
},
methods: {
//tab
tabChange(tabType) {
this.tabType = tabType
},
//
openViewCourseInfo(item){
uni.navigateTo({
url: '/pages/coach/course/info'
})
},
//
openViewStudentInfo(item){
uni.navigateTo({
url: '/pages/coach/student/info'
})
},
//
openViewPhysicalExamination(item){
uni.navigateTo({
url: '/pages/coach/student/physical_examination'
})
},
//
opebViewWorkDetails(item){
//
openViewArrivalStatistics(){
uni.navigateTo({
url: '/pages/coach/student/work_details'
url: '/pages/coach/my/arrival_statistics'
})
},
}

Loading…
Cancel
Save