|
@@ -1,86 +1,197 @@
|
|
<template>
|
|
<template>
|
|
<view>
|
|
<view>
|
|
- <u-navbar title="芭蕾舞新生班"></u-navbar>
|
|
|
|
- <u-tabs :list="list" :is-scroll="false" :current="current" @change="change" active-color="#1CBECA" bar-width="100"></u-tabs>
|
|
|
|
|
|
+ <u-navbar :title="classDetail.className"></u-navbar>
|
|
|
|
+ <u-tabs :list="list" :is-scroll="false" :current="current" @change="change" active-color="#1CBECA"
|
|
|
|
+ bar-width="100"></u-tabs>
|
|
<view class="content-1" v-if="this.current==0">
|
|
<view class="content-1" v-if="this.current==0">
|
|
<u-cell-group>
|
|
<u-cell-group>
|
|
- <u-cell-item title="所属学部" value="文艺部" :arrow="false"></u-cell-item>
|
|
|
|
- <u-cell-item title="所属项目中心" value="中国舞项目中心" :arrow="false"></u-cell-item>
|
|
|
|
- <u-cell-item title="上课时间" value="周四晚上18:00-19:30周六上午11:20-12:40" :arrow="false"></u-cell-item>
|
|
|
|
- <u-cell-item title="上课教室" value="二楼舞蹈一教室" :arrow="false"></u-cell-item>
|
|
|
|
- <u-cell-item title="授课老师" value="夏奕琳" :arrow="false"></u-cell-item>
|
|
|
|
- <u-cell-item title="咨询电话" value="13872354255" :arrow="false"></u-cell-item>
|
|
|
|
- <u-cell-item title="学员总数" value="20人" :arrow="false"></u-cell-item>
|
|
|
|
|
|
+ <!-- <u-cell-item title="所属学部" value="文艺部" :arrow="false"></u-cell-item> -->
|
|
|
|
+ <u-cell-item title="所属课程项目" :value="classDetail.courseSortName" :arrow="false"></u-cell-item>
|
|
|
|
+ <!-- <u-cell-item title="上课时间" value="周四晚上18:00-19:30周六上午11:20-12:40" :arrow="false"></u-cell-item> -->
|
|
|
|
+ <u-cell-item title="上课教室" :value="classDetail.className" :arrow="false"></u-cell-item>
|
|
|
|
+ <u-cell-item title="授课老师" :value="classDetail.teacherNames" :arrow="false"></u-cell-item>
|
|
|
|
+ <u-cell-item title="咨询电话" :value="classDetail.consultPhone" :arrow="false"></u-cell-item>
|
|
|
|
+ <u-cell-item title="学员总数" :value="classDetail.crtStudentCount+'人'" :arrow="false"></u-cell-item>
|
|
</u-cell-group>
|
|
</u-cell-group>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
|
|
+
|
|
<view class="content-2" v-if="this.current==1">
|
|
<view class="content-2" v-if="this.current==1">
|
|
<view class="search">
|
|
<view class="search">
|
|
- <u-search placeholder="搜索班级/一对一学员" action-text="查询"></u-search>
|
|
|
|
- </view>
|
|
|
|
- <view class="student-details" @click="gotoUrl('pages/teacher/myClass/studentDetails')">
|
|
|
|
- <view class="photo">
|
|
|
|
- <img src="../../../assets/img/photo@1x.png" alt="">
|
|
|
|
- </view>
|
|
|
|
- <view class="details">
|
|
|
|
- <view class="name-tel">
|
|
|
|
- <view class="name">
|
|
|
|
- 王紫瑄
|
|
|
|
- </view>
|
|
|
|
- <view class="tel">
|
|
|
|
- <img src="../../../assets/img/riLine-smartphone-line@1x.png" alt=""><view class="">17700112233
|
|
|
|
-
|
|
|
|
- </view>
|
|
|
|
|
|
+ <u-search v-model="queryName" placeholder="搜索学员姓名" action-text="查询"
|
|
|
|
+ @custom="queryStudent"></u-search>
|
|
|
|
+ </view>
|
|
|
|
+ <!-- <view class="student-details" @click="gotoUrl('pages/teacher/myClass/studentDetails')">
|
|
|
|
+ <view class="photo">
|
|
|
|
+ <img src="../../../assets/img/photo@1x.png" alt="">
|
|
|
|
+ </view>
|
|
|
|
+ <view class="details">
|
|
|
|
+ <view class="name-tel">
|
|
|
|
+ <view class="name">
|
|
|
|
+ 王紫瑄
|
|
|
|
+ </view>
|
|
|
|
+ <view class="tel">
|
|
|
|
+ <img src="../../../assets/img/riLine-smartphone-line@1x.png" alt="">
|
|
|
|
+ <view class="">17700112233
|
|
|
|
+
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
- </view>
|
|
|
|
- <view class="more">
|
|
|
|
- <u-icon name="arrow-right" color="#cccccc"></u-icon>
|
|
|
|
</view>
|
|
</view>
|
|
|
|
+
|
|
</view>
|
|
</view>
|
|
- <view class="student-details">
|
|
|
|
|
|
+ <view class="more">
|
|
|
|
+ <u-icon name="arrow-right" color="#cccccc"></u-icon>
|
|
|
|
+ </view>
|
|
|
|
+ </view> -->
|
|
|
|
+ <view class="student-card" v-for="(item,index) in studentList" :key="index">
|
|
|
|
+ <!-- <view class="title">
|
|
|
|
+ <view><img src="../../../assets/img/fas fa-graduation-cap@1x.png" alt=""></view>
|
|
|
|
+ <view>
|
|
|
|
+ 学员详情
|
|
|
|
+ </view>
|
|
|
|
+ </view> -->
|
|
|
|
+ <view class="details">
|
|
<view class="photo">
|
|
<view class="photo">
|
|
<img src="../../../assets/img/photo@1x.png" alt="">
|
|
<img src="../../../assets/img/photo@1x.png" alt="">
|
|
</view>
|
|
</view>
|
|
- <view class="details">
|
|
|
|
- <view class="name-tel">
|
|
|
|
- <view class="name">
|
|
|
|
- 王紫瑄
|
|
|
|
|
|
+ <view class="information">
|
|
|
|
+ <view class="name">
|
|
|
|
+ {{item.studentName}}
|
|
|
|
+ </view>
|
|
|
|
+ <view class="item">
|
|
|
|
+ <view class="item-name">
|
|
|
|
+ 年龄
|
|
</view>
|
|
</view>
|
|
- <view class="tel">
|
|
|
|
- <img src="../../../assets/img/riLine-smartphone-line@1x.png" alt=""><view class="">17700112233
|
|
|
|
-
|
|
|
|
- </view>
|
|
|
|
|
|
+ <view class="item-content">
|
|
|
|
+ <!-- {{getAge(item.birthday)}} -->
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
- </view>
|
|
|
|
- <view class="more">
|
|
|
|
- <u-icon name="arrow-right" color="#cccccc"></u-icon>
|
|
|
|
|
|
+ <view class="item">
|
|
|
|
+ <view class="item-name">
|
|
|
|
+ 联系人手机号
|
|
|
|
+ </view>
|
|
|
|
+ <view class="item-content">
|
|
|
|
+ {{item.firstContactPhone}}
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="item">
|
|
|
|
+ <view class="item-name">
|
|
|
|
+ 第二联系人手机号
|
|
|
|
+ </view>
|
|
|
|
+ <view class="item-content">
|
|
|
|
+ {{item.secondContactPhone}}
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="item">
|
|
|
|
+ <view class="item-name">
|
|
|
|
+ 接送家长姓名
|
|
|
|
+ </view>
|
|
|
|
+ <view class="item-content">
|
|
|
|
+ {{item.takerName}}
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+
|
|
</view>
|
|
</view>
|
|
|
|
+
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+ import * as myClassApi from '@/apis/teacher/myClass.js'
|
|
|
|
+
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
list: [{
|
|
list: [{
|
|
name: '班级信息'
|
|
name: '班级信息'
|
|
- }, {
|
|
|
|
|
|
+ }, {
|
|
name: '学员信息',
|
|
name: '学员信息',
|
|
}],
|
|
}],
|
|
- current: 0
|
|
|
|
|
|
+ current: 0,
|
|
|
|
+ classId: '',
|
|
|
|
+ queryName: '',
|
|
|
|
+ classDetail: {},
|
|
|
|
+ studentList: [],
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onLoad(op) {
|
|
onLoad(op) {
|
|
- console.log(op)
|
|
|
|
|
|
+ if(op.id) {
|
|
|
|
+ this.classId = op.id;
|
|
|
|
+ this.getLoadMyClass();
|
|
|
|
+ this.getLoadClassStudents();
|
|
|
|
+ }
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ queryStudent() {
|
|
|
|
+ this.getLoadClassStudents();
|
|
|
|
+ },
|
|
|
|
+ getAge(str) {
|
|
|
|
+ var r = str.match(/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/);
|
|
|
|
+ if (r == null) return false;
|
|
|
|
+ var d = new Date(r[1], r[3] - 1, r[4]);
|
|
|
|
+ if (d.getFullYear() == r[1] && (d.getMonth() + 1) == r[3] && d.getDate() == r[4]) {
|
|
|
|
+ var date = new Date();
|
|
|
|
+ var Y = date.getFullYear() - r[1];
|
|
|
|
+ var M = date.getMonth() + 1 - r[3];
|
|
|
|
+ var D = date.getDate();
|
|
|
|
+ if (parseInt(D) - parseInt(r[4]) < 0) {
|
|
|
|
+ M--;
|
|
|
|
+ if (M < 0) {
|
|
|
|
+ Y--;
|
|
|
|
+ M = 11;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (M < 0) {
|
|
|
|
+ Y--;
|
|
|
|
+ M = 11;
|
|
|
|
+ }
|
|
|
|
+ if(Y != 0 && M != 0) {
|
|
|
|
+ return (Y + "岁" + M + "个月");
|
|
|
|
+ }else if(Y != 0 && M == 0) {
|
|
|
|
+ return (Y + "岁");
|
|
|
|
+ }else {
|
|
|
|
+ return (M + "个月");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return ("输入的日期格式错误!");
|
|
|
|
+ },
|
|
|
|
+ getLoadClassStudents() {
|
|
|
|
+ uni.showLoading({
|
|
|
|
+ title: "加载中",
|
|
|
|
+ mask: true,
|
|
|
|
+ })
|
|
|
|
+ myClassApi.loadClassStudents({
|
|
|
|
+ classId: this.classId,
|
|
|
|
+ queryName: this.queryName
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ uni.hideLoading();
|
|
|
|
+ this.studentList = res.data;
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: error,
|
|
|
|
+ icon: "none"
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ getLoadMyClass() {
|
|
|
|
+ uni.showLoading({
|
|
|
|
+ title: "加载中",
|
|
|
|
+ mask: true,
|
|
|
|
+ })
|
|
|
|
+ myClassApi.loadMyClass({
|
|
|
|
+ classId: this.classId
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ uni.hideLoading();
|
|
|
|
+ this.classDetail = res.data[0];
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: error,
|
|
|
|
+ icon: "none"
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
change(index) {
|
|
change(index) {
|
|
this.current = index;
|
|
this.current = index;
|
|
},
|
|
},
|
|
@@ -89,84 +200,150 @@
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
- /deep/.u-tab-item{
|
|
|
|
- color: #101010 !important;
|
|
|
|
- }
|
|
|
|
- /deep/.u-cell_title{
|
|
|
|
- color: rgba(119, 119, 119, 1);
|
|
|
|
|
|
+ .student-card{
|
|
|
|
+ margin: 24rpx 32rpx;
|
|
|
|
+ padding: 2rpx 32rpx 0rpx 32rpx;
|
|
|
|
+ background-color: #fff;
|
|
|
|
+ border-radius: 12px;
|
|
|
|
+ .title{
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ color: rgba(51, 51, 51, 1);
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ img{
|
|
|
|
+ vertical-align: middle;
|
|
|
|
+ margin-right: 16rpx;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- /deep/.u-cell__value{
|
|
|
|
- color: #333333;
|
|
|
|
- flex: 0.45;
|
|
|
|
- margin-left: auto;
|
|
|
|
|
|
+ .details{
|
|
|
|
+ margin-top: 40rpx;
|
|
|
|
+ display: flex;
|
|
|
|
+ .photo{
|
|
|
|
+ width: 80px;
|
|
|
|
+ height: 80px;
|
|
|
|
+ border-radius: 8px;
|
|
|
|
+ margin-right: 32rpx;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ img{
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 100%;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-.search{
|
|
|
|
|
|
+ .information{
|
|
|
|
+ .name{
|
|
|
|
+ color: rgba(51, 51, 51, 1);
|
|
|
|
+ font-size: 18px;
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ margin-bottom: 20rpx;
|
|
|
|
+ }
|
|
|
|
+ .item{
|
|
|
|
+ display: flex;
|
|
|
|
+ margin-bottom: 16rpx;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ .item-name{
|
|
|
|
+ color: rgba(119, 119, 119, 1);
|
|
|
|
+ }
|
|
|
|
+ .item-content{
|
|
|
|
+ color: rgba(51, 51, 51, 1);
|
|
|
|
+ margin-left: 16rpx;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /deep/.u-tab-item {
|
|
|
|
+ color: #101010 !important;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /deep/.u-cell_title {
|
|
|
|
+ color: rgba(119, 119, 119, 1);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /deep/.u-cell__value {
|
|
|
|
+ color: #333333;
|
|
|
|
+ flex: 0.45;
|
|
|
|
+ margin-left: auto;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .search {
|
|
// background-color: #fff;
|
|
// background-color: #fff;
|
|
padding: 8px 12px;
|
|
padding: 8px 12px;
|
|
}
|
|
}
|
|
- /deep/.u-action{
|
|
|
|
- width: 17.1%;
|
|
|
|
- text-align: center;
|
|
|
|
- line-height: 28px;
|
|
|
|
- border-radius: 50px;
|
|
|
|
- background-color: rgba(13, 186, 199, 1);
|
|
|
|
- color: rgba(255, 255, 255, 1);
|
|
|
|
|
|
+
|
|
|
|
+ /deep/.u-action {
|
|
|
|
+ width: 17.1%;
|
|
|
|
+ text-align: center;
|
|
|
|
+ line-height: 28px;
|
|
|
|
+ border-radius: 50px;
|
|
|
|
+ background-color: rgba(13, 186, 199, 1);
|
|
|
|
+ color: rgba(255, 255, 255, 1);
|
|
}
|
|
}
|
|
- /deep/.u-content{
|
|
|
|
- background-color: #fff !important;
|
|
|
|
|
|
+
|
|
|
|
+ /deep/.u-content {
|
|
|
|
+ background-color: #fff !important;
|
|
}
|
|
}
|
|
- /deep/.u-input{
|
|
|
|
- background-color: #fff !important;
|
|
|
|
|
|
+
|
|
|
|
+ /deep/.u-input {
|
|
|
|
+ background-color: #fff !important;
|
|
}
|
|
}
|
|
-
|
|
|
|
- .student-details{
|
|
|
|
- padding: 12px 16px;
|
|
|
|
- background-color: #fff;
|
|
|
|
- display: flex;
|
|
|
|
- position: relative;
|
|
|
|
- border-bottom: 1px solid rgba(229, 231, 234, 1);;
|
|
|
|
- .photo{
|
|
|
|
- width: 56px;
|
|
|
|
- height: 56px;
|
|
|
|
- border-radius: 4px;
|
|
|
|
- overflow: hidden;
|
|
|
|
- margin-right: 11px;
|
|
|
|
- img{
|
|
|
|
- width: 100%;
|
|
|
|
- height: 100%;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- .details{
|
|
|
|
- display: flex;
|
|
|
|
- align-items: center;
|
|
|
|
-
|
|
|
|
- .name-tel{
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- .name{
|
|
|
|
- margin-right: 12px;
|
|
|
|
- color: rgba(51, 51, 51, 1);
|
|
|
|
- font-size: 18px;
|
|
|
|
- margin-bottom: 16rpx;
|
|
|
|
- }
|
|
|
|
- .tel{
|
|
|
|
- color: rgba(119, 119, 119, 1);
|
|
|
|
- // line-height: 24px;
|
|
|
|
- display: flex;
|
|
|
|
- align-items: center;
|
|
|
|
-
|
|
|
|
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- .more{
|
|
|
|
- color: #333333;
|
|
|
|
- position: absolute;
|
|
|
|
- bottom: 65rpx;
|
|
|
|
- right: 24rpx;
|
|
|
|
- }
|
|
|
|
|
|
+ .student-details {
|
|
|
|
+ padding: 12px 16px;
|
|
|
|
+ background-color: #fff;
|
|
|
|
+ display: flex;
|
|
|
|
+ position: relative;
|
|
|
|
+ border-bottom: 1px solid rgba(229, 231, 234, 1);
|
|
|
|
+ ;
|
|
|
|
+
|
|
|
|
+ .photo {
|
|
|
|
+ width: 56px;
|
|
|
|
+ height: 56px;
|
|
|
|
+ border-radius: 4px;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ margin-right: 11px;
|
|
|
|
+
|
|
|
|
+ img {
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 100%;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .details {
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+
|
|
|
|
+ .name-tel {
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ .name {
|
|
|
|
+ margin-right: 12px;
|
|
|
|
+ color: rgba(51, 51, 51, 1);
|
|
|
|
+ font-size: 18px;
|
|
|
|
+ margin-bottom: 16rpx;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .tel {
|
|
|
|
+ color: rgba(119, 119, 119, 1);
|
|
|
|
+ // line-height: 24px;
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .more {
|
|
|
|
+ color: #333333;
|
|
|
|
+ position: absolute;
|
|
|
|
+ bottom: 65rpx;
|
|
|
|
+ right: 24rpx;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|