|  | @@ -1,6 +1,6 @@
 | 
	
		
			
				|  |  |  <template>
 | 
	
		
			
				|  |  |    <div class='studentvip'>
 | 
	
		
			
				|  |  | -    <div class="topCard">
 | 
	
		
			
				|  |  | +    <!-- <div class="topCard">
 | 
	
		
			
				|  |  |        <div class="cardItem" @click="onCheckCourse(item)" :class="[item.id == checkIndex ? 'active' : '']"
 | 
	
		
			
				|  |  |         v-for="(item, index) in courseList" :key="index">
 | 
	
		
			
				|  |  |          <div class="top">
 | 
	
	
		
			
				|  | @@ -22,27 +22,50 @@
 | 
	
		
			
				|  |  |            </div>
 | 
	
		
			
				|  |  |          </div>
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  | -    </div>
 | 
	
		
			
				|  |  | -    <div class="tableWrap" v-if="checkIndex">
 | 
	
		
			
				|  |  | +    </div> -->
 | 
	
		
			
				|  |  | +    <!-- 搜索类型 -->
 | 
	
		
			
				|  |  | +    <el-form :inline="true"
 | 
	
		
			
				|  |  | +             class="searchForm"
 | 
	
		
			
				|  |  | +             v-model="searchForm">
 | 
	
		
			
				|  |  | +      <el-form-item>
 | 
	
		
			
				|  |  | +        <el-input placeholder="课程名称"
 | 
	
		
			
				|  |  | +                  v-model="searchForm.classGroupName"></el-input>
 | 
	
		
			
				|  |  | +      </el-form-item>
 | 
	
		
			
				|  |  | +      <el-form-item>
 | 
	
		
			
				|  |  | +        <el-button @click="onSearch"
 | 
	
		
			
				|  |  | +                   type="danger">搜索</el-button>
 | 
	
		
			
				|  |  | +      </el-form-item>
 | 
	
		
			
				|  |  | +    </el-form>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    <div class="tableWrap">
 | 
	
		
			
				|  |  |        <el-table :header-cell-style="{background:'#EDEEF0',color:'#444'}"
 | 
	
		
			
				|  |  |           :data='tableList'>
 | 
	
		
			
				|  |  |          <el-table-column label="时间" prop='courseDate'>
 | 
	
		
			
				|  |  |          </el-table-column>
 | 
	
		
			
				|  |  | +        <el-table-column label="课程名称" prop="classGroupName">
 | 
	
		
			
				|  |  | +        </el-table-column>
 | 
	
		
			
				|  |  |          <el-table-column label="课程类型">
 | 
	
		
			
				|  |  |            <template slot-scope="scope">
 | 
	
		
			
				|  |  | -            {{ scope.row.classGroupType | coursesType }}
 | 
	
		
			
				|  |  | +            {{ scope.row.teachMode == 'ONLINE' ? '线上' : '线下' }}
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |          </el-table-column>
 | 
	
		
			
				|  |  |          <!-- <el-table-column label="当前课次">
 | 
	
		
			
				|  |  |          </el-table-column> -->
 | 
	
		
			
				|  |  | -        <el-table-column label="指导老师" prop="teacherName">
 | 
	
		
			
				|  |  | +        <el-table-column label="指导老师" prop="realName">
 | 
	
		
			
				|  |  | +        </el-table-column>
 | 
	
		
			
				|  |  | +        <el-table-column label="学员数量" prop="studentNum">
 | 
	
		
			
				|  |  | +        </el-table-column>
 | 
	
		
			
				|  |  | +        <el-table-column label="剩余课时">
 | 
	
		
			
				|  |  | +          <template slot-scope="scope">
 | 
	
		
			
				|  |  | +            {{ scope.row.totalClassTimes - scope.row.currentClassTimes }}
 | 
	
		
			
				|  |  | +          </template>
 | 
	
		
			
				|  |  |          </el-table-column>
 | 
	
		
			
				|  |  |        </el-table>
 | 
	
		
			
				|  |  |        <pagination :total="pageInfo.total"
 | 
	
		
			
				|  |  |                    :page.sync="pageInfo.page"
 | 
	
		
			
				|  |  |                    :limit.sync="pageInfo.limit"
 | 
	
		
			
				|  |  |                    :page-sizes="pageInfo.page_size"
 | 
	
		
			
				|  |  | -                  @pagination="getList" />
 | 
	
		
			
				|  |  | +                  @pagination="getCourseList" />
 | 
	
		
			
				|  |  |      </div>
 | 
	
		
			
				|  |  |    </div>
 | 
	
		
			
				|  |  |  </template>
 | 
	
	
		
			
				|  | @@ -54,9 +77,9 @@ export default {
 | 
	
		
			
				|  |  |    components: { pagination },
 | 
	
		
			
				|  |  |    data () {
 | 
	
		
			
				|  |  |      return {
 | 
	
		
			
				|  |  | -      userId: this.$route.query.userId,
 | 
	
		
			
				|  |  |        searchForm: {
 | 
	
		
			
				|  |  | -        status: ''
 | 
	
		
			
				|  |  | +        studentId: this.$route.query.userId,
 | 
	
		
			
				|  |  | +        classGroupName: null
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        checkIndex: null, // 选中的课程
 | 
	
		
			
				|  |  |        searchLsit: [],
 | 
	
	
		
			
				|  | @@ -76,29 +99,37 @@ export default {
 | 
	
		
			
				|  |  |      this.getCourseList()
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    methods: {
 | 
	
		
			
				|  |  | -    onCheckCourse(item) {
 | 
	
		
			
				|  |  | -      this.checkIndex = item.id
 | 
	
		
			
				|  |  | -      this.getList()
 | 
	
		
			
				|  |  | -    },
 | 
	
		
			
				|  |  | +    // onCheckCourse(item) {
 | 
	
		
			
				|  |  | +    //   this.checkIndex = item.id
 | 
	
		
			
				|  |  | +    //   this.getList()
 | 
	
		
			
				|  |  | +    // },
 | 
	
		
			
				|  |  |      getCourseList () {
 | 
	
		
			
				|  |  | -      findStudentVipGroups({ userId: this.userId }).then(res => {
 | 
	
		
			
				|  |  | +      let params = this.searchForm
 | 
	
		
			
				|  |  | +      params.rows = this.pageInfo.limit
 | 
	
		
			
				|  |  | +      params.page = this.pageInfo.page
 | 
	
		
			
				|  |  | +      findStudentVipGroups(params).then(res => {
 | 
	
		
			
				|  |  |          if(res.code == 200) {
 | 
	
		
			
				|  |  | -          this.courseList = res.data
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -      })
 | 
	
		
			
				|  |  | -    },
 | 
	
		
			
				|  |  | -    getList() {
 | 
	
		
			
				|  |  | -      findStudentCourses({
 | 
	
		
			
				|  |  | -        vipGroupId: this.checkIndex,
 | 
	
		
			
				|  |  | -        rows: this.pageInfo.limit,
 | 
	
		
			
				|  |  | -        page: this.pageInfo.page
 | 
	
		
			
				|  |  | -      }).then(res => {
 | 
	
		
			
				|  |  | -        if(res.code ==200) {
 | 
	
		
			
				|  |  |            this.tableList = res.data.rows
 | 
	
		
			
				|  |  |            this.pageInfo.total = res.data.total
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |        })
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    onSearch() {
 | 
	
		
			
				|  |  | +      this.pageInfo.page = 1
 | 
	
		
			
				|  |  | +      this.getCourseList()
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | +    // getList() {
 | 
	
		
			
				|  |  | +    //   findStudentCourses({
 | 
	
		
			
				|  |  | +    //     vipGroupId: this.checkIndex,
 | 
	
		
			
				|  |  | +    //     rows: this.pageInfo.limit,
 | 
	
		
			
				|  |  | +    //     page: this.pageInfo.page
 | 
	
		
			
				|  |  | +    //   }).then(res => {
 | 
	
		
			
				|  |  | +    //     if(res.code ==200) {
 | 
	
		
			
				|  |  | +    //       this.tableList = res.data.rows
 | 
	
		
			
				|  |  | +    //       this.pageInfo.total = res.data.total
 | 
	
		
			
				|  |  | +    //     }
 | 
	
		
			
				|  |  | +    //   })
 | 
	
		
			
				|  |  | +    // }
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  </script>
 |