123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247 |
- <template>
- <div class='studentOut'>
- <!-- 搜索类型 -->
- <el-form :inline="true"
- class="searchForm"
- v-model.trim="searchForm">
- <el-form-item>
- <el-input placeholder="课程名称"
- @keyup.enter.native='onSearch'
- v-model.trim="searchForm.search"></el-input>
- </el-form-item>
- <el-form-item label="课程状态">
- <el-select v-model.trim="searchForm.groupStatus" clearable>
- <el-option
- v-for="(item,index) in courseGroupStatus"
- :key="index"
- :value="item.value"
- :label="item.label"
- ></el-option>
- </el-select>
- </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="编号"
- align='center'
- prop='id'>
- </el-table-column>
- <el-table-column label="课程组名称"
- align='center'
- prop="name">
- </el-table-column>
- <el-table-column label="课程组状态"
- align='center'>
- <template slot-scope="scope">
- {{ scope.row.status | courseGroup }}
- </template>
- </el-table-column>
- <el-table-column label="老师"
- align='center'
- prop="teacherName">
- </el-table-column>
- <el-table-column label="班级人数"
- align='center'
- prop="studentNum">
- </el-table-column>
- <el-table-column label="开课时间"
- align='center'
- prop="coursesStartDate">
- </el-table-column>
- <el-table-column label="当前课次"
- align='center'
- prop="currentClassTimes">
- <template slot-scope="scope">
- {{ scope.row.currentClassTimes }}/{{ scope.row.totalClassTimes }}
- </template>
- </el-table-column>
- </el-table>
- <pagination :total="pageInfo.total"
- :page.sync="pageInfo.page"
- :limit.sync="pageInfo.limit"
- :page-sizes="pageInfo.page_size"
- @pagination="getCourseList" />
- <!-- <el-dialog :title="dialogTitle"
- :visible.sync="dialogTableVisible">
- <el-table :data="gridData">
- <el-table-column prop="courseDate"
- label="时间"
- align='center'
- width="150"></el-table-column>
- <el-table-column prop="classGroupName"
- label="课程名称"
- align='center'
- width="200"></el-table-column>
- <el-table-column label="课程类型"
- align='center'>
- <template slot-scope="scope">
- {{ scope.row.teachMode == 'ONLINE' ? '线上' : '线下' }}
- </template>
- </el-table-column>
- <el-table-column prop="courseStatus"
- align='center'
- label="课程状态">
- <template slot-scope="scope">
- {{ scope.row.courseStatus |coursesStatus }}
- </template>
- </el-table-column>
- </el-table>
- </el-dialog> -->
- </div>
- </div>
- </template>
- <script>
- import pagination from '@/components/Pagination/index'
- import { courseGroupStatus } from "@/utils/searchArray";
- import { findStudentCourseGroupsWithWeb } from '@/api/studentManager'
- export default {
- name: 'studentvip',
- components: { pagination },
- data () {
- return {
- searchForm: {
- studentId: null,
- search: null,
- groupStatus:null
- },
- checkIndex: null, // 选中的课程
- dialogTableVisible: false,
- tableList: [],
- courseList: [],
- courseGroupStatus:courseGroupStatus,
- pageInfo: {
- // 分页规则
- limit: 10, // 限制显示条数
- page: 1, // 当前页
- total: 0, // 总条数
- page_size: [10, 20, 40, 50] // 选择限制显示条数
- },
- dialogTitle: '',
- gridData: [],
- userId: ''
- }
- },
- created () {
- this.userId = this.$route.query.userId || null;
- },
- mounted () {
- this.searchForm.studentId = this.$route.query.userId
- this.getCourseList()
- },
- activated() {
- this.userId = this.$route.query.userId || null
- this.searchForm.studentId = this.$route.query.userId
- this.getCourseList()
- },
- methods: {
- // onCheckCourse(item) {
- // this.checkIndex = item.id
- // this.getList()
- // },
- getCourseList () {
- let params = this.searchForm
- params.rows = this.pageInfo.limit
- params.page = this.pageInfo.page
- findStudentCourseGroupsWithWeb(params).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>
- <style lang="scss">
- .studentOut {
- .topCard {
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- margin-bottom: 30px;
- .cardItem {
- margin-right: 15px;
- width: 300px;
- height: 130px;
- padding: 20px 24px;
- box-shadow: 0px 8px 20px 0px rgba(0, 0, 0, 0.1);
- box-sizing: border-box;
- border-radius: 6px;
- .top {
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- margin-bottom: 23px;
- .name {
- font-size: 14px;
- color: #323c47;
- font-weight: 500;
- }
- .type {
- font-size: 14px;
- color: #aaa;
- }
- }
- .bottom {
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- text-align: center;
- p {
- font-size: 14px;
- color: #444;
- }
- .title {
- color: #aaa;
- margin-bottom: 8px;
- }
- }
- }
- .cardItem.active {
- background-color: #14928a;
- .name {
- font-size: 14px;
- color: #fff;
- font-weight: 500;
- }
- .type {
- font-size: 14px;
- color: #fff;
- }
- .bottom {
- p {
- color: #fff;
- }
- .title {
- color: #fff;
- }
- }
- }
- }
- }
- </style>
|