|
@@ -1,5 +1,6 @@
|
|
|
<template>
|
|
|
<div class="wrap">
|
|
|
+ <m-header v-if="headerStatus" />
|
|
|
<div class="searchSection">
|
|
|
<div class="searchDate">
|
|
|
<div class="date startDate" @click="dateSection.status = true">
|
|
@@ -16,45 +17,48 @@
|
|
|
</div>-->
|
|
|
<van-dropdown-menu active-color="#14928A">
|
|
|
<van-dropdown-item title="筛选" ref="item" v-model="search.status">
|
|
|
- <!-- <div class="dropItem">
|
|
|
- <p class="dropTitle">评价类型</p>
|
|
|
- <div class="radioGroup">
|
|
|
- <span class="actived">月报</span>
|
|
|
- <span>课次评价</span>
|
|
|
+ <div class="dropList">
|
|
|
+ <div class="dropItem">
|
|
|
+ <p class="dropTitle">课程类型</p>
|
|
|
+ <div class="radioGroup">
|
|
|
+ <span :class="search.type=='PRACTICE'?'actived':''" @click="search.type='PRACTICE'">网管课</span>
|
|
|
+ <span :class="search.type=='VIP'?'actived':''" @click="search.type='VIP'">VIP课</span>
|
|
|
+ <span :class="search.type==0?'actived':''" @click="search.type=0" style="margin-top: .08rem">全部</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>-->
|
|
|
- <div class="dropItem">
|
|
|
- <p class="dropTitle">评价进度</p>
|
|
|
- <div class="radioGroup">
|
|
|
- <span :class="search.hasReview==0?'actived':''" @click="search.hasReview=0">待完成</span>
|
|
|
- <span :class="search.hasReview==1?'actived':''" @click="search.hasReview=1">已完成</span>
|
|
|
+ <div class="dropItem">
|
|
|
+ <p class="dropTitle">评价进度</p>
|
|
|
+ <div class="radioGroup">
|
|
|
+ <span :class="search.hasReview==0?'actived':''" @click="search.hasReview=0">待完成</span>
|
|
|
+ <span :class="search.hasReview==1?'actived':''" @click="search.hasReview=1">已完成</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="dropItem">
|
|
|
- <p class="dropTitle">提交作业</p>
|
|
|
- <div class="radioGroup">
|
|
|
- <span
|
|
|
- :class="search.hasHandHomework==1?'actived':''"
|
|
|
- @click="search.hasHandHomework=1"
|
|
|
- >是</span>
|
|
|
- <span
|
|
|
- :class="search.hasHandHomework==0?'actived':''"
|
|
|
- @click="search.hasHandHomework=0"
|
|
|
- >否</span>
|
|
|
+ <div class="dropItem">
|
|
|
+ <p class="dropTitle">提交作业</p>
|
|
|
+ <div class="radioGroup">
|
|
|
+ <span
|
|
|
+ :class="search.hasHandHomework==1?'actived':''"
|
|
|
+ @click="search.hasHandHomework=1"
|
|
|
+ >是</span>
|
|
|
+ <span
|
|
|
+ :class="search.hasHandHomework==0?'actived':''"
|
|
|
+ @click="search.hasHandHomework=0"
|
|
|
+ >否</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="dropItem">
|
|
|
- <p class="dropTitle">完成双向沟通</p>
|
|
|
- <div class="radioGroup">
|
|
|
- <span :class="search.hasLiaison==1?'actived':''" @click="search.hasLiaison=1">是</span>
|
|
|
- <span :class="search.hasLiaison==0?'actived':''" @click="search.hasLiaison=0">否</span>
|
|
|
+ <div class="dropItem">
|
|
|
+ <p class="dropTitle">完成双向沟通</p>
|
|
|
+ <div class="radioGroup">
|
|
|
+ <span :class="search.hasLiaison==1?'actived':''" @click="search.hasLiaison=1">是</span>
|
|
|
+ <span :class="search.hasLiaison==0?'actived':''" @click="search.hasLiaison=0">否</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="dropItem">
|
|
|
- <p class="dropTitle">学生是否到课</p>
|
|
|
- <div class="radioGroup">
|
|
|
- <span :class="search.hasArrived==1?'actived':''" @click="search.hasArrived=1">是</span>
|
|
|
- <span :class="search.hasArrived==0?'actived':''" @click="search.hasArrived=0">否</span>
|
|
|
+ <div class="dropItem">
|
|
|
+ <p class="dropTitle">学生是否到课</p>
|
|
|
+ <div class="radioGroup">
|
|
|
+ <span :class="search.hasArrived==1?'actived':''" @click="search.hasArrived=1">是</span>
|
|
|
+ <span :class="search.hasArrived==0?'actived':''" @click="search.hasArrived=0">否</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="btnGroup">
|
|
@@ -64,10 +68,7 @@
|
|
|
</van-dropdown-item>
|
|
|
</van-dropdown-menu>
|
|
|
</div>
|
|
|
- <!-- -->
|
|
|
-
|
|
|
- <!-- <van-pull-refresh v-model="refreshing" @refresh="onRefresh"> -->
|
|
|
- <div>
|
|
|
+ <div v-if="dataShow" key="data">
|
|
|
<van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="getList">
|
|
|
<van-cell
|
|
|
v-for="(item,index) in courseList"
|
|
@@ -97,10 +98,8 @@
|
|
|
</van-cell>
|
|
|
</van-list>
|
|
|
</div>
|
|
|
- <!-- </van-pull-refresh> -->
|
|
|
|
|
|
- <!-- -->
|
|
|
- <!-- <m-empty class="empty" v-else key="data" /> -->
|
|
|
+ <m-empty class="empty" msg="暂无数据" v-else key="data" />
|
|
|
|
|
|
<!-- 日期开始弹窗 -->
|
|
|
<van-popup position="bottom" v-model="dateSection.status">
|
|
@@ -127,18 +126,21 @@
|
|
|
/>
|
|
|
</van-popup>
|
|
|
|
|
|
- <van-popup position="bottom" v-model="search.status"></van-popup>
|
|
|
+ <!-- <van-popup position="bottom" v-model="search.status"></van-popup> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-// import MEmpty from "@/components/MEmpty";
|
|
|
-import { getPracticeGroup } from "@/api/teacher";
|
|
|
+import MHeader from '@/components/MHeader'
|
|
|
+import MEmpty from "@/components/MEmpty"
|
|
|
+import { browser } from '@/common/common'
|
|
|
+import { getOnlineCourse } from "@/api/audition"
|
|
|
+// SINGLE,MIX,HIGH,VIP,DEMO,COMPREHENSIVE,PRACTICE,ENLIGHTENMENT,TRAINING_SINGLE,TRAINING_MIX,CLASSROOM,COMM,HIGH_ONLINE,MUSIC_NETWORK
|
|
|
export default {
|
|
|
name: "teacherList",
|
|
|
- // components: { MEmpty },
|
|
|
+ components: { MHeader, MEmpty },
|
|
|
data() {
|
|
|
return {
|
|
|
- str: "2020-01-23 12:12:12",
|
|
|
+ headerStatus: true,
|
|
|
dateSection: {
|
|
|
status: false,
|
|
|
minDate: new Date(2020, 0, 1),
|
|
@@ -158,12 +160,13 @@ export default {
|
|
|
hasReview: null,
|
|
|
hasHandHomework: null,
|
|
|
hasLiaison: null,
|
|
|
- hasArrived: null
|
|
|
+ hasArrived: null,
|
|
|
+ type: null, //课程类型
|
|
|
},
|
|
|
courseList: [],
|
|
|
loading: false,
|
|
|
finished: false,
|
|
|
- refreshing: false,
|
|
|
+ dataShow: true, // 是否显示
|
|
|
page: 1
|
|
|
};
|
|
|
},
|
|
@@ -180,6 +183,9 @@ export default {
|
|
|
localStorage.setItem("Authorization", decodeURI(params.Authorization));
|
|
|
localStorage.setItem("userInfo", decodeURI(params.Authorization));
|
|
|
}
|
|
|
+ if(browser().android || browser().iPhone) {
|
|
|
+ this.headerStatus = false
|
|
|
+ }
|
|
|
this.dateSection.currentDate = new Date();
|
|
|
this.dateSection.showStartDate = this.timeFormat(
|
|
|
this.dateSection.currentDate
|
|
@@ -194,12 +200,8 @@ export default {
|
|
|
this.dateSection.showStartDate = this.timeFormat(
|
|
|
new Date(this.search.startTime.replace(/-/g, "/"))
|
|
|
);
|
|
|
- this.dateSection.currentDate = this.timeFormat(
|
|
|
- new Date(this.search.startTime.replace(/-/g, "/"))
|
|
|
- );
|
|
|
- this.dateEndSection.currentDate = this.timeFormat(
|
|
|
- new Date(this.search.endTime.replace(/-/g, "/"))
|
|
|
- );
|
|
|
+ this.dateSection.currentDate = new Date(this.search.startTime.replace(/-/g, "/"))
|
|
|
+ this.dateEndSection.currentDate = new Date(this.search.endTime.replace(/-/g, "/"))
|
|
|
this.dateEndSection.showEndDate = this.timeFormat(
|
|
|
new Date(this.search.endTime.replace(/-/g, "/"))
|
|
|
);
|
|
@@ -216,12 +218,12 @@ export default {
|
|
|
}
|
|
|
return val;
|
|
|
},
|
|
|
- changeStartTime() {},
|
|
|
-
|
|
|
confirmStartTime() {
|
|
|
this.dateSection.showStartDate = this.timeFormat(
|
|
|
this.dateSection.currentDate
|
|
|
);
|
|
|
+ this.dataShow = true
|
|
|
+ this.page = 1
|
|
|
this.onRefresh();
|
|
|
this.dateSection.status = false;
|
|
|
},
|
|
@@ -229,6 +231,8 @@ export default {
|
|
|
this.dateEndSection.showEndDate = this.timeFormat(
|
|
|
this.dateEndSection.currentDate
|
|
|
);
|
|
|
+ this.dataShow = true
|
|
|
+ this.page = 1
|
|
|
this.onRefresh();
|
|
|
this.dateEndSection.status = false;
|
|
|
},
|
|
@@ -249,12 +253,15 @@ export default {
|
|
|
hasReview: null,
|
|
|
hasHandHomework: null,
|
|
|
hasLiaison: null,
|
|
|
- hasArrived: null
|
|
|
+ hasArrived: null,
|
|
|
+ type: null
|
|
|
};
|
|
|
},
|
|
|
submitInfo() {
|
|
|
// 提交请求
|
|
|
this.onRefresh();
|
|
|
+ this.dataShow = true
|
|
|
+ this.page = 1
|
|
|
this.search.status = false;
|
|
|
this.$refs.item.toggle();
|
|
|
},
|
|
@@ -265,9 +272,9 @@ export default {
|
|
|
(this.search.endTime =
|
|
|
this.dateEndSection.showEndDate.replace(/\//g, "-") + " 23:59:59"),
|
|
|
(this.search.page = this.page);
|
|
|
+ this.search.type = this.search.type ? this.search.type : null
|
|
|
this.search.rows = 20;
|
|
|
- // this.page++;
|
|
|
- getPracticeGroup(this.search).then(res => {
|
|
|
+ getOnlineCourse(this.search).then(res => {
|
|
|
let result = res.data;
|
|
|
this.loading = false;
|
|
|
if (result.code == 200) {
|
|
@@ -282,27 +289,9 @@ export default {
|
|
|
this.finished = true;
|
|
|
}
|
|
|
// 判断是否有数据
|
|
|
- // if(this.dataList.length <= 0) {
|
|
|
- // this.dataShow = false
|
|
|
- // }
|
|
|
-
|
|
|
- // if (res.data.code == 200) {
|
|
|
- // this.loading = false;
|
|
|
- // if (res.data.data.rows.length < 10) {
|
|
|
- // this.finished = true;
|
|
|
- // }
|
|
|
- // if (this.courseList.length > 0) {
|
|
|
- // this.courseList = this.courseList.concat(res.data.data.rows);
|
|
|
- // } else {
|
|
|
- // this.courseList = res.data.data.rows;
|
|
|
- // }
|
|
|
-
|
|
|
- // this.refreshing = false;
|
|
|
- // } else {
|
|
|
- // this.finished = true;
|
|
|
- // this.loading = false;
|
|
|
- // this.refreshing = false;
|
|
|
- // }
|
|
|
+ if (this.courseList.length <= 0) {
|
|
|
+ this.dataShow = false;
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
onRefresh() {
|
|
@@ -335,14 +324,17 @@ export default {
|
|
|
height: 100vh;
|
|
|
overflow-y: auto;
|
|
|
overflow-x: hidden;
|
|
|
- background-color: #fff;
|
|
|
+ background-color: #F3F4F8;
|
|
|
+}
|
|
|
+/deep/.van-dropdown-item__content {
|
|
|
+ height: 100%;
|
|
|
+ max-height: 100%;
|
|
|
}
|
|
|
-
|
|
|
.searchSection {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
background: #fff;
|
|
|
- margin-bottom: 0.15rem;
|
|
|
+ margin-bottom: 0.12rem;
|
|
|
padding: 0 0.16rem;
|
|
|
align-items: center;
|
|
|
|
|
@@ -381,6 +373,9 @@ export default {
|
|
|
.btnGroup {
|
|
|
display: flex;
|
|
|
margin-top: 0.15rem;
|
|
|
+ position: fixed;
|
|
|
+ width: 100%;
|
|
|
+ bottom: 0;
|
|
|
.btn {
|
|
|
width: 50%;
|
|
|
text-align: center;
|
|
@@ -397,6 +392,9 @@ export default {
|
|
|
color: #fff;
|
|
|
}
|
|
|
}
|
|
|
+ .dropList {
|
|
|
+ margin-bottom: .55rem;
|
|
|
+ }
|
|
|
.dropItem {
|
|
|
padding: 0.1rem 0.16rem;
|
|
|
.dropTitle {
|
|
@@ -406,12 +404,13 @@ export default {
|
|
|
.radioGroup {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
- padding-top: 0.1rem;
|
|
|
+ padding-top: .08rem;
|
|
|
+ flex-wrap: wrap;
|
|
|
span {
|
|
|
color: #000000;
|
|
|
background-color: #f4f4f4;
|
|
|
width: 48%;
|
|
|
- padding: 0.1rem 0;
|
|
|
+ padding: .08rem 0;
|
|
|
text-align: center;
|
|
|
border-radius: 2px;
|
|
|
&.actived {
|