lex-xin 4 年之前
父節點
當前提交
ffc1c1c872

+ 22 - 1
src/api/audition.js

@@ -84,6 +84,25 @@ const teacherSalaryComplaintQueryPage = (data) => {
   })
 }
 
+// 线上课评论列表
+const getOnlineCourse = (data) => {
+  return axios({
+      url: api + '/courseReview/getOnlineCourse',
+      method: 'get',
+      params: data
+  })
+}
+
+// 布置线上课作业
+const addHomeWork = (data) => {
+  return axios({
+      url: api + '/courseReview/addHomeWork',
+      method: 'post',
+      data: qs.stringify(data)
+  })
+}
+
+
 export {
   findTeacherSettlementCourseSalarys,
   findTeacherRewards,
@@ -93,5 +112,7 @@ export {
   findByMonth,
   repealComplaints,
   findTeacherYearSalarys,
-  teacherSalaryComplaintQueryPage
+  teacherSalaryComplaintQueryPage,
+  getOnlineCourse,
+  addHomeWork
 }

二進制
src/assets/images/business/icon_evaluate.png


+ 65 - 15
src/common/common.js

@@ -19,19 +19,19 @@ const browser = () => {
 }
 
 const calcMinute = (minute) => {
-  if(minute <= 0) {
+  if (minute <= 0) {
     return '0分钟'
   }
   let minutes = minute % 60 // 算出分钟
   let hours = 0 // 小时
-  if(minute >= 60) {
+  if (minute >= 60) {
     hours = (minute - minutes) / 60
   }
   let text = ''
-  if(hours) {
+  if (hours) {
     text = hours + '小时'
   }
-  if(minutes) {
+  if (minutes) {
     text += minutes + '分钟'
   }
   return text
@@ -47,13 +47,13 @@ const getSTD = (num) => {
 
 /**
  * 获取格式化的年月日
- * @param {日期} time 
- * @param {不是IOS里使用(多用于接口参数)} noIos 
+ * @param {日期} time
+ * @param {不是IOS里使用(多用于接口参数)} noIos
  */
 const getYMD = (time, noIos) => {
   let tempDate = time || new Date()
-  if(typeof(tempDate) == 'string') {
-      tempDate = new Date(time.replace(/-/ig, '/'))
+  if (typeof (tempDate) == 'string') {
+    tempDate = new Date(time.replace(/-/ig, '/'))
   }
   let t = noIos ? '-' : '/'
   let month = getSTD(tempDate.getMonth() + 1)
@@ -65,20 +65,70 @@ const getDateList = () => {
   let getNowYear = new Date().getFullYear()
   let getNowMonth = new Date().getMonth() + 1
   const getDateList = {}
-  for(let i = 0; i < 12; i++) {
-      let months = []
-      for(let j = 0; j < (i == 0 ? getNowMonth : 12); j++) {
-          months.push((j + 1) + '月')
-      }
-      getDateList[(getNowYear - i) + '年'] = months // 组合数据
+  for (let i = 0; i < 12; i++) {
+    let months = []
+    for (let j = 0; j < (i == 0 ? getNowMonth : 12); j++) {
+      months.push((j + 1) + '月')
+    }
+    getDateList[(getNowYear - i) + '年'] = months // 组合数据
   }
   return getDateList
 }
 
+// 防抖
+const _debounce = (fn, delay) => {
+  delay = delay || 200
+  let timer
+  return function () {
+    let th = this
+    let args = arguments
+    if (timer) {
+      clearTimeout(timer)
+    }
+    timer = setTimeout(function () {
+      timer = null
+      fn.apply(th, args)
+    }, delay)
+  };
+}
+
+// 节流
+const _throttle = (fn, time) => {
+  let canRun = true
+  return function () {
+    let _arguments = arguments
+    if (!canRun) return
+    canRun = false
+    setTimeout(() => {
+      fn.call(this, _arguments)
+      canRun = true
+    }, time);
+  }
+}
+// const _throttle = (fn, interval) => {
+//   let last
+//   let timer
+//   interval = interval || 200
+//   return function () {
+//       let that = this
+//       let args = arguments
+//       let now = +new Date();
+//       if(last && last - now < 2000){
+//           clearTimeout(timer)
+//       }
+//       timer = setTimeout(function () {
+//           fn.apply(that, args)
+//           last = +new Date()
+//       }, 200)
+//   }
+// }
+
 export {
   browser,
   calcMinute,
   getSTD,
   getYMD,
-  getDateList
+  getDateList,
+  _debounce,
+  _throttle
 }

+ 9 - 1
src/router/auditionRouter.js

@@ -4,7 +4,7 @@ let auditionRouter = [
         name: 'manageEvaluation',
         component: () => import(/* webpackChunkName:'ManageEvaluation'*/'@/views/audition/ManageEvaluation.vue'),
         meta: {
-            descrition: '网管课评价',
+            descrition: '线上课评价',
             weight: 2 // 页面权重
         }
     }, {
@@ -55,6 +55,14 @@ let auditionRouter = [
             descrition: '课酬申诉记录',
             weight: 4 // 页面权重
         }
+    }, {
+        path: '/arrangeWork',
+        name: 'arrangeWork',
+        component: () => import(/* webpackChunkName:'ArrangeWork'*/'@/views/audition/ArrangeWork.vue'),
+        meta: {
+            descrition: '布置作业',
+            weight: 4 // 页面权重
+        }
     }
 ]
 

+ 185 - 0
src/views/audition/ArrangeWork.vue

@@ -0,0 +1,185 @@
+<template>
+  <div class="arrangeWork">
+    <m-header v-if="headerStatus" />
+    <div class="container">
+      <!-- <div class="formGroup">
+        <div class="formTitle">课外训练标题</div>
+        <van-field type="text" placeholder="请输入(1-25字)" />
+      </div> -->
+      <div class="formGroup">
+        <div class="formTitle">作业内容</div>
+        <van-field rows="8" v-model="content" type="textarea" placeholder="请输入(1-600字)" />
+      </div>
+    </div>
+    <van-cell class="endTime" title="截止时间" @click="onEndTime" readonly placeholder="请选择截止时间" >
+      <template #default>
+        {{ dateSection.showStartDate }} <span class="arrowDown"></span>
+      </template>
+    </van-cell>
+    <div class="button-group">
+      <van-button type="primary" round size="large" @click="onSubmit">确定</van-button>
+    </div>
+
+    <!-- 日期开始弹窗 -->
+    <van-popup position="bottom" v-model="dateSection.status">
+      <van-datetime-picker
+        v-model="dateSection.currentDate"
+        type="date"
+        :min-date="dateSection.minDate"
+        :max-date="dateSection.maxDate"
+        :formatter="formatter"
+        @confirm="confirmStartTime()"
+        @cancel="dateSection.status = false"
+      />
+    </van-popup>
+  </div>
+</template>
+<script>
+import MHeader from "@/components/MHeader"
+import { browser, _throttle, getYMD }  from '@/common/common'
+import { addHomeWork } from '@/api/audition'
+export default {
+  name: "teacherList",
+  components: { MHeader },
+  data() {
+    let tempDate = new Date() // 默认显示T+3
+    tempDate.setDate(tempDate.getDate() + 3)
+    return {
+      that: this,
+      headerStatus: true,
+      dateSection: {
+        status: false,
+        minDate: new Date(),
+        maxDate: new Date(2025, 10, 1),
+        currentDate: tempDate,
+        showStartDate: getYMD(tempDate, true)
+      },
+      content: null, // 课程编号
+      expiryDate: null, // 作业截止日期
+    };
+  },
+  mounted() {
+    let params = this.$route.query;
+    if (params.Authorization) {
+      localStorage.setItem("Authorization", decodeURI(params.Authorization));
+      localStorage.setItem("userInfo", decodeURI(params.Authorization));
+    }
+    document.title = '布置作业'
+    if(browser().android || browser().iPhone) {
+      this.headerStatus = false
+    }
+
+  },
+  methods: {
+    formatter(type, val) {
+      if (type === "year") {
+        return `${val}年`
+      } else if (type === "month") {
+        return `${val}月`
+      } else if (type == "day") {
+        return `${val}日`
+      }
+      return val
+    },
+    confirmStartTime() {
+      this.dateSection.showStartDate = getYMD(this.dateSection.currentDate, true)
+      this.dateSection.status = false
+    },
+    onEndTime() {
+      this.dateSection.status = true
+    },
+    onSubmit: _throttle(function() {
+      if(!this.content) {
+        this.$toast('请输入作业内容')
+        return
+      }
+      this.$toast.loading({
+        message: '加载中...',
+        duration: 10000,
+        forbidClick: true,
+        loadingType: 'spinner',
+      })
+      let query = this.$route.query
+      let params = {
+        content: this.content,
+        courseId: query.courseId,
+        expiryDate: this.dateSection.showStartDate
+      }
+      addHomeWork(params).then(res => {
+        let result = res.data
+        this.$toast.clear()
+        if(result.code == 200) {
+          this.$toast('作业布置成功')
+          this.$route.replace({
+            path: '/manageEvaluation'
+          })
+        } else {
+          this.$toast(result.msg)
+        }
+      })
+    }, 500)
+  }
+};
+</script>
+<style lang="less" scoped>
+@import url("../../assets/commonLess/variable.less");
+.arrangeWork {
+  height: 100vh;
+  overflow-y: auto;
+  overflow-x: hidden;
+  background-color: #F3F4F8;
+}
+/deep/.van-cell {
+  font-size: .14rem;
+  padding: .12rem .16rem;
+}
+
+.arrowDown {
+  display: inline-block;
+  margin-left: .1rem;
+  width: 0.1rem;
+  height: 0.07rem;
+  background: url('../../assets/images/audition/arrow_down.png') no-repeat center center;
+  background-size: 100%;
+}
+
+
+.container {
+  background: #ffffff;
+  .formTitle {
+    padding: .12rem .16rem 0;
+    font-size: .14rem;
+    color: #14928A;
+    font-weight: 600;
+  }
+}
+
+.endTime {
+  margin-top: .1rem;
+  .van-cell__title {
+    font-size: .16rem;
+    color: #1A1A1A;
+  }
+
+  /deep/.van-cell__value {
+    width: 30%;
+    flex: 1 auto;
+    text-align: left;
+    font-size: .16rem;
+    color: #1A1A1A;
+    display: flex;
+    align-items: center;
+  }
+}
+
+
+
+.button-group {
+  margin: 0.3rem 0.26rem 0.2rem;
+  .van-button--primary {
+    background: @mColor;
+    border: 1px solid @mColor;
+    font-size: 0.18rem;
+  }
+}
+</style>

+ 137 - 62
src/views/audition/CourseEvaluation.vue

@@ -1,5 +1,6 @@
 <template>
   <div>
+    <m-header v-if="headerStatus" />
     <van-cell-group>
       <van-cell title="课程班名称" :value="classGroupName" />
     </van-cell-group>
@@ -56,7 +57,7 @@
         placeholder="请输入(1-255字)"
       />
     </van-cell-group>
-    <van-cell-group v-if="!isReset || (isReset && homeWork)">
+    <!-- <van-cell-group v-if="!isReset || (isReset && homeWork)">
       <van-field
         rows="4"
         class="textarea"
@@ -68,7 +69,7 @@
         type="textarea"
         placeholder="请输入(1-255字)"
       />
-    </van-cell-group>
+    </van-cell-group> -->
     <van-cell-group>
       <van-cell title="是否完成双向沟通" value-class="twoConnect">
         <template slot="default">
@@ -79,8 +80,8 @@
         </template>
       </van-cell>
     </van-cell-group>
-
-    <van-cell-group v-if="isReset && !homeWork">
+<!-- 
+    <van-cell-group v-if="isReset">
       <van-cell title="是否完成作业" value-class="twoConnect">
         <template slot="default">
           <van-radio-group required v-model="handHomework" direction="horizontal">
@@ -89,11 +90,25 @@
           </van-radio-group>
         </template>
       </van-cell>
-    </van-cell-group>
-    <div class="button-group">
-      <van-button type="primary" v-if="!reviewId" round size="large" @click="submitReview">提交评价</van-button>
-      <van-button type="primary" v-if="reviewId" round size="large" @click="submitReview">修改评价</van-button>
+    </van-cell-group> -->
+    <div class="button-group" v-if="!reviewId">
+      <van-button type="primary"  round size="large" @click="submitReview">提交评价</van-button>
     </div>
+    <div class="button-group btn-operation" v-if="reviewId">
+      <van-button type="primary" :disabled="homeWork?true: false" round @click="onWork">{{ homeWork ? '已布置作业' : '布置作业' }}</van-button>
+      <van-button type="primary" round class="btn-plain" @click="submitReview">修改评价</van-button>
+    </div>
+
+    <van-popup v-model="showWork">
+      <van-icon class="closeable" @click="onClose" name="cross" />
+      <div class="popup_container">
+        <p class="content">评价成功<br/>是否布置作业?</p>
+        <div class="btn_group">
+          <span @click="onClose">取消</span>
+          <span @click="onWork">布置作业</span>
+        </div>
+      </div>
+    </van-popup>
   </div>
 </template>
 <script>
@@ -105,11 +120,14 @@ import {
   updateReviewInfo
 } from "@/api/teacher";
 import { browser } from "@/common/common";
-// import MHeader from "@/components/MHeader";
+import MHeader from "@/components/MHeader";
 export default {
   name: "teacherList",
+  components: { MHeader },
   data() {
     return {
+      headerStatus: true,
+      showWork: false, // 是否布置作业
       radio: 1,
       voice: 0,
       courseId: null,
@@ -126,7 +144,7 @@ export default {
       handHomework: null, // 是否完成作业
       hasLiaison: null,
       subjectNames: null,
-      isReset: false,
+      // isReset: false,
       isInside: false
     };
   },
@@ -149,44 +167,55 @@ export default {
       localStorage.setItem("Authorization", decodeURI(params.Authorization));
       localStorage.setItem("userInfo", decodeURI(params.Authorization));
     }
+    if(browser().android || browser().iPhone) {
+      this.headerStatus = false
+    }
     // 获取头部信息
     if (this.reviewId) {
       // 获取老评价
-      this.isReset = true;
+      this.$toast.loading({
+        message: '加载中...',
+        duration: 10000,
+        forbidClick: true,
+        loadingType: 'spinner',
+      })
       getReviewInfo({ id: this.reviewId }).then(res => {
+        this.$toast.clear()
         if (res.data.code == 200) {
+          let result = res.data.data
+          let teacherClassHeadInfo = result.teacherClassHeadInfo
           this.classTimer =
-            res.data.data.teacherClassHeadInfo.classDate +
-            res.data.data.teacherClassHeadInfo.startClassTime +
+            teacherClassHeadInfo.classDate +
+            teacherClassHeadInfo.startClassTime +
             "-" +
-            res.data.data.teacherClassHeadInfo.endClassTime;
-          this.subjectNames = res.data.data.teacherClassHeadInfo.subjectNames;
-          this.classGroupName =
-            res.data.data.teacherClassHeadInfo.classGroupName;
+            teacherClassHeadInfo.endClassTime;
+          this.subjectNames = teacherClassHeadInfo.subjectNames;
+          this.classGroupName = teacherClassHeadInfo.classGroupName;
 
           // 评价内容
-          this.teachingMaterial =
-            res.data.data.courseScheduleReview.teachingMaterial;
-          this.song = res.data.data.courseScheduleReview.song;
-          this.pronunciation = res.data.data.courseScheduleReview.pronunciation;
-          this.tempo = res.data.data.courseScheduleReview.tempo;
-          this.musicTheory = res.data.data.courseScheduleReview.musicTheory;
-          this.memo = res.data.data.courseScheduleReview.memo;
-          this.homeWork = res.data.data.courseScheduleReview.homeWork;
-          this.hasLiaison = res.data.data.courseScheduleReview.hasLiaison.toString();
-          this.handHomework = res.data.data.courseScheduleReview.handHomework.toString();
+          let courseScheduleReview = result.courseScheduleReview
+          this.teachingMaterial = courseScheduleReview.teachingMaterial;
+          this.song = courseScheduleReview.song;
+          this.pronunciation = courseScheduleReview.pronunciation;
+          this.tempo = courseScheduleReview.tempo;
+          this.musicTheory = courseScheduleReview.musicTheory;
+          this.memo = courseScheduleReview.memo;
+          this.homeWork = courseScheduleReview.homeWork;
+          this.hasLiaison = courseScheduleReview.hasLiaison.toString();
+          this.handHomework = courseScheduleReview.handHomework.toString();
         }
       });
     } else {
       getCourseInfoHead({ courseId: this.courseId }).then(res => {
         if (res.data.code == 200) {
+          let result = res.data.data
           this.classTimer =
-            res.data.data.classDate +
-            res.data.data.startClassTime +
+            result.classDate +
+            result.startClassTime +
             "-" +
-            res.data.data.endClassTime;
-          this.subjectNames = res.data.data.subjectNames;
-          this.classGroupName = res.data.data.classGroupName;
+            result.endClassTime;
+          this.subjectNames = result.subjectNames;
+          this.classGroupName = result.classGroupName;
         }
       });
     }
@@ -201,30 +230,10 @@ export default {
         this.$toast("请填写曲目");
         return;
       }
-      // if (!this.pronunciation) {
-      //   this.$toast("请给发音打分");
-      //   return;
-      // }
-      // if (!this.tempo) {
-      //   this.$toast("请给节奏打分");
-      //   return;
-      // }
-      // if (!this.musicTheory) {
-      //   this.$toast("请给乐理打分");
-      //   return;
-      // }
       if (!this.memo) {
         this.$toast("请输入备注");
         return;
       }
-      // 判断是否是编辑
-      // if(!this.isReset) {
-      //   if (!this.homeWork) {
-      //     this.$toast("请布置作业");
-      //     return;
-      //   }
-      // }
-      
       if (!this.hasLiaison) {
         this.$toast("请勾选双向沟通");
         return;
@@ -236,7 +245,7 @@ export default {
         tempo: this.tempo, //节奏
         musicTheory: this.musicTheory, // 乐理
         memo: this.memo, // 备注
-        homeWork: this.homeWork,
+        // homeWork: this.homeWork,
         hasLiaison: this.hasLiaison,
         handHomework: this.handHomework,
         courseScheduleId: this.courseId
@@ -244,7 +253,7 @@ export default {
       if (this.reviewId) {
         obj.id = this.reviewId;
         updateReviewInfo(obj).then(res => {
-          this.$toast("修改成功");
+          this.$toast("修改成功")
           setTimeout(res => {
             if (this.isInside) {
               this.$router.push({ path: "/manageEvaluation" });
@@ -256,18 +265,34 @@ export default {
       } else {
         courseReviewAdd(obj).then(res => {
           if (res.data.code == 200) {
-            this.$toast("提交成功");
-            setTimeout(res => {
-              if (this.isInside) {
-                this.$router.push({ path: "/manageEvaluation" });
-              } else {
-                this.onAppBack();
-              }
-            }, 1000);
+            // this.$toast("提交成功");
+            this.showWork = true
+            // setTimeout(res => {
+            //   if (this.isInside) {
+            //     this.$router.push({ path: "/manageEvaluation" });
+            //   } else {
+            //     this.onAppBack();
+            //   }
+            // }, 1000);
           }
         });
       }
     },
+    onWork() {
+      this.$router.replace({
+        path: '/arrangeWork',
+        query: {
+          courseId: this.courseId
+        }
+      })
+    },
+    onClose() { // 关闭弹窗
+      if (this.isInside) {
+        this.$router.push({ path: "/manageEvaluation" });
+      } else {
+        this.onAppBack();
+      }
+    },
     onAppBack() {
       if (browser().android) {
         DAYA.postMessage(JSON.stringify({ api: "back" }));
@@ -348,5 +373,55 @@ export default {
     border: 1px solid @mColor;
     font-size: 0.18rem;
   }
+  &.btn-operation {
+    margin: 0.3rem 0.16rem 0.2rem;
+    display: flex;
+    justify-content: space-between;
+    button {
+      width: 48%;
+    }
+  }
+  .btn-plain {
+    color: #14928A;
+    background: #F3F4F8;
+  }
+}
+
+.van-popup {
+  width: 90%;
+  border-radius: .05rem;
+}
+/deep/.van-popup__close-icon {
+  color: #888;
+  font-size: 24px;
+}
+.closeable {
+  font-size: 24px;
+  color: #888;
+  position: absolute;
+  right: .1rem;
+  top: .1rem;
+}
+.popup_container {
+  .content {
+    text-align: center;
+    font-size: .18rem;
+    color: #000;
+    padding-top: .5rem;
+    padding-bottom: .35rem;
+  }
+  .btn_group {
+    font-size: .14rem;
+    color: #009688;
+    padding: .03rem .25rem .2rem;
+    display: flex;
+    justify-content: space-between;
+    span {
+      width: .8rem;
+      text-align: center;
+    }
+  }
 }
+
+
 </style>

+ 85 - 86
src/views/audition/ManageEvaluation.vue

@@ -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 {

+ 6 - 2
src/views/teacher/Business.vue

@@ -31,6 +31,7 @@
             <div class="module-item">
                 <!-- <span class="module-link"><i class="icon icon_7"></i>作业列表</span> -->
                 <router-link class="module-link" :to="{ path: '/tobeReport' }" ><i class="icon icon_8"></i>待完成月报</router-link>
+                <router-link class="module-link" :to="{ path: '/manageEvaluation' }" ><i class="icon icon_evaluate"></i>线上课评价</router-link>
             </div>
         </section>
 
@@ -122,10 +123,13 @@ section, .tip-message {
         background: url("../../assets/images/business/7.png") no-repeat center;
         background-size: contain;
     }
-     .icon_8 {
+    .icon_8 {
         background: url("../../assets/images/business/7.png") no-repeat center;
         background-size: contain;
     }
-
+    .icon_evaluate {
+        background: url("../../assets/images/business/icon_evaluate.png") no-repeat center;
+        background-size: contain;
+    }
 }
 </style>

+ 2 - 3
src/views/teacher/reportDetail.vue

@@ -211,7 +211,6 @@ export default {
     }
     studyReport({ classGroupId: this.classGroupId }).then(res => {
       if (res.data.code == 200) {
-        
         this.studentInfo = {
           name: res.data.data.student.username || "",
           subjectName: res.data.data.subjectName,
@@ -224,10 +223,9 @@ export default {
           subjectName: res.data.data.subjectName,
           avatar: res.data.data.teacher.headUrl || this.imgList.default_head_img
         };
-          // 处理数据  1.item 
+          // 处理数据  1.item
         this.item = res.data.data.item.split(',');
         this.strList = res.data.data.comment.split('#');
-     
         for(let i=1; i<=this.item.length;i++){
           this.setIcon(this.subjectJson,this.item[i-1],i);
         }
@@ -238,6 +236,7 @@ export default {
   methods: {
     onAppBack() {
       if (browser().android) {
+        // eslint-disable-next-line
         DAYA.postMessage(JSON.stringify({ api: "back" }));
       } else if (browser().iPhone) {
         window.webkit.messageHandlers.DAYA.postMessage(

+ 2 - 2
vue.config.js

@@ -1,5 +1,5 @@
-let targetUrl = 'http://mteadev.dayaedu.com'
-// let targetUrl = 'http://dyme.utools.club'
+// let targetUrl = 'http://mteadev.dayaedu.com'
+let targetUrl = 'http://192.168.3.139:8000' // 箭河
 // let targetUrl = 'https://online.dayaedu.com'
 // let targetUrl = 'http://testadm.dayaedu.com/'
 // let targetUrl = 'http://192.168.3.48:8080'