123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193 |
- <template>
- <div class="courseInfo">
- <save-form :inline="true" :model="searchList" @submit="search" save-key='teacherDetail-outCourseList'>
- <el-form-item>
- <el-input
- placeholder="课程组名称"
- clearable
- @keyup.enter.native="search"
- v-model.trim="searchList.search"
- ></el-input>
- </el-form-item>
- <el-form-item label="课程状态">
- <el-select v-model.trim="searchList.status" clearable>
- <el-option
- v-for="(item, index) in commGroupStatus"
- :key="index"
- :value="item.value"
- :label="item.label"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item>
- <el-button type="danger" native-type="submit">搜索</el-button>
- </el-form-item>
- </save-form>
- <div class="tableWrap">
- <el-table
- :data="teamList"
- :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
- >
- <el-table-column label="编号" prop="id" align="center">
- <template slot-scope="scope">
- <copy-text>
- {{ scope.row.id }}
- </copy-text>
- </template>
- </el-table-column>
- <el-table-column label="课程组名称" prop="name" align="center">
- <template slot-scope="scope">
- <copy-text>
- {{ scope.row.name }}
- </copy-text>
- </template>
- </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="班级人数"
- prop="studentNum"
- align="center"
- ></el-table-column>
- <el-table-column
- label="课程组时间"
- prop="groupClassesTotalDuration"
- align="center"
- ></el-table-column>
- <el-table-column
- label="消耗时间"
- prop="groupClassesConsumeDuration"
- align="center"
- ></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-column label="开课时间" align="center">
- <template slot-scope="scope">{{
- scope.row.firstClassesStartTime | formatterTime
- }}</template>
- </el-table-column>
- <el-table-column label="结束时间" align="center">
- <template slot-scope="scope">{{
- scope.row.lastClassesEndTime | formatTimer
- }}</template>
- </el-table-column>
- <el-table-column label="申请时间" align="center">
- <template slot-scope="scope">{{
- scope.row.createTime | formatterTime
- }}</template>
- </el-table-column>
- </el-table>
- <pagination
- save-key='teacherDetail-outCourseList'
- sync
- :total.sync="pageInfo.total"
- :page.sync="pageInfo.page"
- :limit.sync="pageInfo.limit"
- :page-sizes="pageInfo.page_size"
- @pagination="getList"
- />
- </div>
- </div>
- </template>
- <script>
- // import { getTeacherVipClass } from '@/api/teacherManager'
- import { findTeacherCourseGroupsWithWeb } from "@/api/teacherManager";
- import pagination from "@/components/Pagination/index";
- import { commGroupStatus } from "@/utils/searchArray";
- import store from "@/store";
- export default {
- name: "courseInfo1",
- components: {
- pagination,
- },
- data() {
- return {
- searchList: {
- status: "",
- search: "",
- },
- teamList: [],
- organId: null,
- commGroupStatus: commGroupStatus,
- teacherId: this.$route.query.teacherId,
- pageInfo: {
- // 分页规则
- limit: 10, // 限制显示条数
- page: 1, // 当前页
- total: 1, // 总条数
- page_size: [10, 20, 40, 50], // 选择限制显示条数
- },
- };
- },
- activated() {
- this.getList();
- },
- mounted() {
- this.getList();
- },
- methods: {
- getList() {
- this.teacherId = this.$route.query.teacherId;
- findTeacherCourseGroupsWithWeb({
- rows: this.pageInfo.limit,
- page: this.pageInfo.page,
- teacherId: this.teacherId,
- groupStatus: this.searchList.status || null,
- search: this.searchList.search || null,
- }).then((res) => {
- if (res.code == 200) {
- this.teamList = res.data.rows;
- this.pageInfo.total = res.data.total;
- }
- });
- },
- search() {
- this.pageInfo.page = 1;
- this.getList();
- },
- },
- filters: {
- formatterTime(val) {
- let result;
- if (val) {
- result = val.split(" ")[0];
- } else {
- result = "";
- }
- return result;
- },
- formatterStatus(val) {
- let arr = [
- "未开始",
- "报名中",
- "进行中",
- "取消",
- "已结束",
- "报名结束",
- "暂停",
- ];
- return arr[val];
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- // .courseInfo {
- // h4 {
- // margin-bottom: 20px;
- // }
- // .tableMargin {
- // margin-top: 20px;
- // }
- // }
- </style>
|