| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253 |
- <!-- -->
- <template>
- <div class="m-container">
- <h2>
- <div class="squrt"></div>
- 课表列表
- </h2>
- <div class="m-core">
- <save-form
- :inline="true"
- :model="searchForm"
- @submit="search"
- @reset="onReSet"
- ref="searchForm"
- >
- <!-- <el-form-item prop="organId">
- <el-select
- class="multiple"
- v-model.trim="searchForm.organId"
- filterable
- clearable
- placeholder="请选择分部"
- >
- <el-option
- v-for="(item, index) in selects.branchs"
- :key="index"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item> -->
- <el-form-item prop="teacherIdList">
- <remote-search
- :commit="'setTeachers'"
- v-model="searchForm.teacherIdList"
- :demissionFlag="true"
- :isForzenWithQueryCondition="true"
- />
- </el-form-item>
- <el-form-item prop="courseStatus">
- <el-select
- v-model.trim="searchForm.courseStatus"
- clearable
- filterable
- placeholder="课程状态"
- >
- <el-option label="未开始" value="NOT_START"></el-option>
- <el-option label="进行中" value="UNDERWAY"></el-option>
- <el-option label="已结束" value="OVER"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item prop="teachMode">
- <el-select
- style="width: 180px !important"
- v-model.trim="searchForm.teachMode"
- clearable
- filterable
- placeholder="教学模式"
- >
- <el-option label="线上课" value="ONLINE"></el-option>
- <el-option label="线下课" value="OFFLINE"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item prop="timer">
- <el-date-picker
- v-model.trim="searchForm.timer"
- type="daterange"
- value-format="yyyy-MM-dd"
- range-separator="-"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- :picker-options="{
- firstDayOfWeek: 1,
- }"
- ></el-date-picker>
- </el-form-item>
- <el-form-item>
- <el-button native-type="submit" type="primary">搜索</el-button>
- <el-button native-type="reset" type="danger">重置</el-button>
- </el-form-item>
- </save-form>
- <div class="tableWrap">
- <el-table
- style="width: 100%"
- :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
- :data="tableList"
- >
- <el-table-column
- align="center"
- prop="id"
- label="课程名称"
- >
- <template slot-scope="scope">
- <copy-text>{{ scope.row.courseName }}</copy-text>
- </template>
- </el-table-column>
- <!-- <el-table-column
- align="center"
- prop="organName"
- label="分部"
- >
- <template slot-scope="scope">
- <copy-text>{{ scope.row.organName }}</copy-text>
- </template>
- </el-table-column> -->
- <el-table-column
- align="center"
- prop="teacherName"
- label="老师姓名"
- >
- <template slot-scope="scope">
- <copy-text>{{ scope.row.teacherName }}</copy-text>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- prop="courseType"
- label="课程类型"
- >
- <template slot-scope="scope">
- <copy-text>{{ scope.row.courseType | coursesType }}</copy-text>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- prop="phone"
- label="教学模式"
- >
- <template slot-scope="scope">
- {{ scope.row.teachMode | teachMode }}
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- prop="courseStatus"
- label="课程状态"
- >
- <template slot-scope="scope">
- {{ scope.row.courseStatus | coursesStatus }}
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- prop="studentId"
- label="课程时间"
- >
- <template slot-scope="scope">
- <div>
- {{ scope.row.classDate|formatTimer}} {{scope.row.classTime}}
- </div>
- </template>
- </el-table-column>
- </el-table>
- <pagination
- sync
- :total.sync="pageInfo.total"
- :page.sync="pageInfo.page"
- :limit.sync="pageInfo.limit"
- :page-sizes="pageInfo.page_size"
- @pagination="getList"
- />
- </div>
- </div>
- </div>
- </template>
- <script>
- import axios from "axios";
- import { getToken } from "@/utils/auth";
- import pagination from "@/components/Pagination/index";
- import { getCourseSchedule } from "@/api/businessManager";
- import { getInstrument } from "@/api/buildTeam";
- import { getTimes } from "@/utils";
- import load from "@/utils/loading";
- export default {
- components: { pagination },
- data() {
- return {
- searchForm: {
- search: null,
- organId:'',
- teacherIdList:'',
- timer:[],
- courseStatus:'',
- teachMode:''
- },
- soundLists: [],
- organList: [],
- tableList:[],
- pageInfo: {
- // 分页规则
- limit: 10, // 限制显示条数
- page: 1, // 当前页
- total: 0, // 总条数
- page_size: [10, 20, 40, 50], // 选择限制显示条数
- },
- categoryList:[]
- };
- },
- //生命周期 - 创建完成(可以访问当前this实例)
- created() {},
- //生命周期 - 挂载完成(可以访问DOM元素)
- mounted() {
- // 获取分部
- this.$store.dispatch("setBranchs");
- this.init();
- this.getList()
- },
- methods: {
- init() {
- },
- search() {
- this.pageInfo.page = 1;
- this.getList()
- },
- onReSet() {
- this.pageInfo.page = 1;
- this.searchForm= {
- search: null,
- organId:'',
- teacherIdList:'',
- timer:[],
- courseStatus:'',
- teachMode:''
- }
- this.getList()
- },
- async getList() {
- try{
- const { timer, ...rest } = this.searchForm;
- let obj = {
- page: this.pageInfo.page,
- rows: this.pageInfo.limit,
- ...rest,
- ...getTimes(timer, ["createStartDate", "createEndDate"]),
- }
- const res = await getCourseSchedule(obj)
- this.tableList = res.data.rows
- this.pageInfo.total = res.data.total
- }catch(e){
- console.log(e)
- }
- },
- lookRepair(row){
- this.$router.push({path:'/otherManager/repairList',query:{hasExemptionAmount:'1',studentInstrumentId:row.id}})
- }
- },
- };
- </script>
- <style lang='scss' scoped>
- </style>
|