|
@@ -5,14 +5,14 @@
|
|
|
</h2>
|
|
|
<div class="m-core">
|
|
|
<!-- 搜索类型 -->
|
|
|
- <el-form :inline="true"
|
|
|
+ <save-form :inline="true"
|
|
|
class="searchForm"
|
|
|
- v-model.trim="searchForm">
|
|
|
+ ref="searchForm"
|
|
|
+ :model.sync="searchForm">
|
|
|
<el-form-item>
|
|
|
- <el-input style="width: 240px"
|
|
|
- v-model.trim="searchForm.search"
|
|
|
+ <el-input v-model.trim="searchForm.search"
|
|
|
@keyup.enter.native="search"
|
|
|
- placeholder="课程组编号/课程编号/课程名称" />
|
|
|
+ placeholder="课程(组)编号/课程名称" />
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-select v-model.trim="searchForm.schoolId"
|
|
@@ -42,7 +42,7 @@
|
|
|
filterable
|
|
|
clearable
|
|
|
placeholder="请选择分部">
|
|
|
- <el-option v-for="(item,index) in organList"
|
|
|
+ <el-option v-for="(item,index) in selects.branchs"
|
|
|
:key="index"
|
|
|
:label="item.name"
|
|
|
:value="item.id"></el-option>
|
|
@@ -95,6 +95,14 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
+ <el-select v-model.trim="searchForm.teachType"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ placeholder="老师类型">
|
|
|
+ <el-option v-for="item in workTypeOptions" :key="item.label" :label="item.label" :value="item.value"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
<el-select v-model.trim="searchForm.isCallNames"
|
|
|
clearable
|
|
|
filterable
|
|
@@ -107,7 +115,6 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-date-picker v-model.trim="searchForm.timer"
|
|
|
- style="width:420px;"
|
|
|
type="daterange"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
range-separator="至"
|
|
@@ -119,7 +126,6 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-date-picker v-model.trim="searchForm.creatTimer"
|
|
|
- style="width:420px;"
|
|
|
type="daterange"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
range-separator="至"
|
|
@@ -129,19 +135,27 @@
|
|
|
firstDayOfWeek: 1
|
|
|
}"></el-date-picker>
|
|
|
</el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <div class="searchBtn"
|
|
|
- @click="search">搜索</div>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <div class="searchBtn exportBtn"
|
|
|
- v-permission="'export/superFindCourseSchedules'"
|
|
|
- @click="onCourseExport">导出课表</div>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
+ <el-row type="flex" justify="space-around">
|
|
|
+ <el-col>
|
|
|
+ <el-button
|
|
|
+ @click="search"
|
|
|
+ type="primary"
|
|
|
+ >搜索</el-button>
|
|
|
+ <el-button
|
|
|
+ @click="reset"
|
|
|
+ type="danger"
|
|
|
+ >重置</el-button>
|
|
|
+ <el-button
|
|
|
+ v-permission="'export/superFindCourseSchedules'"
|
|
|
+ @click="onCourseExport"
|
|
|
+ type="primary"
|
|
|
+ >导出课表</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </save-form>
|
|
|
<div class="btnWraps"></div>
|
|
|
<!-- 列表 -->
|
|
|
- <div class="tableWrap">
|
|
|
+ <div class="tableWrap" style="margin-top: 20px">
|
|
|
<el-table :data="tableList"
|
|
|
:header-cell-style="{background:'#EDEEF0',color:'#444'}">
|
|
|
<el-table-column align="center"
|
|
@@ -155,25 +169,10 @@
|
|
|
prop="id"
|
|
|
label="课程编号"></el-table-column>
|
|
|
<el-table-column align="center"
|
|
|
- label="创建时间">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div>{{scope.row.createTime | dayjsFormat}}</div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="center"
|
|
|
width="200px"
|
|
|
label="上课时间">
|
|
|
<template slot-scope="scope">{{ scope.row.startClassTime ? scope.row.startClassTime.substr(0, 16) : '' }}-{{ scope.row.endClassTime ? scope.row.endClassTime.substr(11,5) : ''}}</template>
|
|
|
</el-table-column>
|
|
|
- <!-- <el-table-column align="center" prop="groupName" label="乐团/VIP名"></el-table-column> -->
|
|
|
- <!-- <el-table-column align="center" prop="classGroupName" label="班级名称"></el-table-column> -->
|
|
|
- <el-table-column align="center"
|
|
|
- prop="studentId"
|
|
|
- label="学生ID">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div v-if="scope.row.groupType != 'MUSIC'">{{scope.row.studentId}}</div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
<el-table-column align="center"
|
|
|
prop="subjectName"
|
|
|
label="声部"></el-table-column>
|
|
@@ -181,6 +180,7 @@
|
|
|
prop="name"
|
|
|
label="课程名称"></el-table-column>
|
|
|
<el-table-column align="center"
|
|
|
+ width="150px"
|
|
|
label="课程类型">
|
|
|
<template slot-scope="scope">
|
|
|
<div>{{ scope.row.type | coursesType}}</div>
|
|
@@ -226,28 +226,20 @@
|
|
|
<template slot-scope="scope">{{ scope.row.isCallNames ? '是' : '否' }}</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center"
|
|
|
- width="150px"
|
|
|
- prop="teacherName"
|
|
|
- label="指导老师"
|
|
|
- fixed="right">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div>
|
|
|
- {{scope.row.teacherName}}({{scope.row.actualTeacherId}})
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="center"
|
|
|
label="详情"
|
|
|
fixed="right"
|
|
|
- width="180px">
|
|
|
+ width="220px">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
<el-button type="text"
|
|
|
v-if="permission('teamCourseList/details')"
|
|
|
@click="lookDetail(scope.row)">详情</el-button>
|
|
|
<el-button type="text"
|
|
|
- v-if="permission('courseSchedule/classStartDateAdjust?hight')"
|
|
|
+ v-if="permission('courseSchedule/classStartDateAdjust?hight') && (!scope.row.isLock || scope.row.newCourseId > 0)"
|
|
|
@click="resetClass(scope.row)">调整</el-button>
|
|
|
+ <el-button type="text" @click="common(scope.row)" v-if="scope.row.newCourseId > 0">
|
|
|
+ 合并课
|
|
|
+ </el-button>
|
|
|
<el-button type="text"
|
|
|
@click="addCompound(scope.row)"
|
|
|
v-if="(scope.row.groupType=='MUSIC'&&scope.row.type!='MUSIC_NETWORK'&&scope.row.type!='HIGH_ONLINE'&&scope.row.status=='NOT_START'&&!isAddCom(scope.row))">添加合班</el-button>
|
|
@@ -411,6 +403,8 @@ import {
|
|
|
getEmployeeOrgan,
|
|
|
cleanAttendance
|
|
|
} from "@/api/buildTeam";
|
|
|
+import { workType } from '@/constant'
|
|
|
+import { objectToOptions, getTimes } from '@/utils'
|
|
|
import { getTeacherPersonalAttendanceDetail } from "@/api/teacherManager";
|
|
|
import { getSchool } from "@/api/systemManage";
|
|
|
import { courseType, courseListType } from "@/utils/searchArray";
|
|
@@ -433,6 +427,21 @@ nowTime =
|
|
|
(nowTime.getMonth() + 1) +
|
|
|
"-" +
|
|
|
nowTime.getDate();
|
|
|
+
|
|
|
+const initSearch = {
|
|
|
+ teachMode: null, // 教学模式
|
|
|
+ organIdList: null,
|
|
|
+ courseStatus: null,
|
|
|
+ courseType: null,
|
|
|
+ timer: [nowTime, nowTime], // 时间
|
|
|
+ class: null,
|
|
|
+ teachType: null,
|
|
|
+ isCallNames: null, // 是否点名
|
|
|
+ search: null, // 乐团名称 编号 vip课名称
|
|
|
+ teacherIdList: null, // 老师编号
|
|
|
+ schoolId: null, // 教学点编号
|
|
|
+ creatTimer: []
|
|
|
+}
|
|
|
export default {
|
|
|
data () {
|
|
|
return {
|
|
@@ -441,19 +450,7 @@ export default {
|
|
|
courseVisible: false,
|
|
|
courseType: courseType,
|
|
|
courseListType: courseListType,
|
|
|
- searchForm: {
|
|
|
- teachMode: null, // 教学模式
|
|
|
- organIdList: null,
|
|
|
- courseStatus: null,
|
|
|
- courseType: null,
|
|
|
- timer: [nowTime, nowTime], // 时间
|
|
|
- class: null,
|
|
|
- isCallNames: null, // 是否点名
|
|
|
- search: null, // 乐团名称 编号 vip课名称
|
|
|
- teacherIdList: null, // 老师编号
|
|
|
- schoolId: null, // 教学点编号
|
|
|
- creatTimer: []
|
|
|
- },
|
|
|
+ searchForm: {...initSearch},
|
|
|
tableList: [],
|
|
|
searchLsit: [],
|
|
|
organList: [],
|
|
@@ -487,7 +484,13 @@ export default {
|
|
|
activated () {
|
|
|
this.init();
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ workTypeOptions() {
|
|
|
+ return objectToOptions(workType)
|
|
|
+ }
|
|
|
+ },
|
|
|
mounted () {
|
|
|
+ this.$store.dispatch('setBranchs')
|
|
|
this.init();
|
|
|
},
|
|
|
methods: {
|
|
@@ -507,25 +510,38 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- getEmployeeOrgan().then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.organList = res.data;
|
|
|
- }
|
|
|
- });
|
|
|
+ // getEmployeeOrgan().then(res => {
|
|
|
+ // if (res.code == 200) {
|
|
|
+ // this.organList = res.data;
|
|
|
+ // }
|
|
|
+ // });
|
|
|
},
|
|
|
permission (str, parent) {
|
|
|
return permission(str, parent);
|
|
|
},
|
|
|
-
|
|
|
+ reset() {
|
|
|
+ this.searchForm = {...initSearch}
|
|
|
+ this.search()
|
|
|
+ },
|
|
|
search () {
|
|
|
this.rules.page = 1;
|
|
|
+ this.$refs.searchForm.save(this.searchForm)
|
|
|
this.getList();
|
|
|
},
|
|
|
- onCourseExport () {
|
|
|
- // 课表导出
|
|
|
+ common(row) {
|
|
|
+ this.searchForm = {
|
|
|
+ ...initSearch,
|
|
|
+ timer: [],
|
|
|
+ search: row.newCourseId,
|
|
|
+ }
|
|
|
+ this.search()
|
|
|
+ },
|
|
|
+ getSearchForm() {
|
|
|
let searchForm = this.searchForm;
|
|
|
if (!searchForm.timer || searchForm.timer.length <= 0) {
|
|
|
searchForm.timer = [];
|
|
|
+ // this.$message.error("请选择时间段");
|
|
|
+ // return;
|
|
|
}
|
|
|
if (!searchForm.creatTimer || searchForm.creatTimer.length <= 0) {
|
|
|
searchForm.creatTimer = []
|
|
@@ -542,29 +558,24 @@ export default {
|
|
|
this.$message.error('请至少选择一个搜索条件')
|
|
|
return
|
|
|
}
|
|
|
- let obj = {
|
|
|
- teachMode: searchForm.teachMode || null,
|
|
|
- courseStatus: searchForm.courseStatus || null,
|
|
|
- courseType: searchForm.courseType || null,
|
|
|
- startTime: searchForm.timer[0] || null,
|
|
|
- endTime: searchForm.timer[1] || null,
|
|
|
- classGroupId: searchForm.class || null,
|
|
|
- organIdList: searchForm.organIdList || null,
|
|
|
- search: searchForm.search || null,
|
|
|
- teacherIdList: searchForm.teacherIdList || null,
|
|
|
- isCallNames: searchForm.isCallNames,
|
|
|
- schoolId: searchForm.schoolId || null,
|
|
|
- groupType: searchForm.groupType || null,
|
|
|
- createStartDate: searchForm.creatTimer[0] || null,
|
|
|
- createEndDate: searchForm.creatTimer[1] || null
|
|
|
- };
|
|
|
+ const { creatTimer, timer, ...rest } = searchForm
|
|
|
+ return {
|
|
|
+ ...rest,
|
|
|
+ page: this.rules.page,
|
|
|
+ rows: this.rules.limit,
|
|
|
+ ...getTimes(creatTimer, ['createStartDate', 'createEndDate']),
|
|
|
+ ...getTimes(timer, ['startTime', 'endTime']),
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onCourseExport () {
|
|
|
+ // 课表导出
|
|
|
let url = "/api-web/export/superFindCourseSchedules";
|
|
|
const options = {
|
|
|
method: "get",
|
|
|
headers: {
|
|
|
Authorization: getToken()
|
|
|
},
|
|
|
- params: obj,
|
|
|
+ params: this.getSearchForm(),
|
|
|
url,
|
|
|
responseType: "blob"
|
|
|
};
|
|
@@ -608,46 +619,7 @@ export default {
|
|
|
.catch(() => { });
|
|
|
},
|
|
|
getList () {
|
|
|
- let searchForm = this.searchForm;
|
|
|
- if (!searchForm.timer || searchForm.timer.length <= 0) {
|
|
|
- searchForm.timer = [];
|
|
|
- // this.$message.error("请选择时间段");
|
|
|
- // return;
|
|
|
- }
|
|
|
- if (!searchForm.creatTimer || searchForm.creatTimer.length <= 0) {
|
|
|
- searchForm.creatTimer = []
|
|
|
- }
|
|
|
- let count = 0
|
|
|
- for (let item in searchForm) {
|
|
|
- if (searchForm[item] && !Array.isArray(searchForm[item])) {
|
|
|
- count++
|
|
|
- } else if (Array.isArray(searchForm[item]) && searchForm[item].length > 0) {
|
|
|
- count++
|
|
|
- }
|
|
|
- }
|
|
|
- if (count <= 0) {
|
|
|
- this.$message.error('请至少选择一个搜索条件')
|
|
|
- return
|
|
|
- }
|
|
|
- let obj = {
|
|
|
- teachMode: searchForm.teachMode || null,
|
|
|
- courseStatus: searchForm.courseStatus || null,
|
|
|
- courseType: searchForm.courseType || null,
|
|
|
- startTime: searchForm.timer[0] || null,
|
|
|
- endTime: searchForm.timer[1] || null,
|
|
|
- page: this.rules.page,
|
|
|
- rows: this.rules.limit,
|
|
|
- classGroupId: searchForm.class || null,
|
|
|
- organIdList: searchForm.organIdList || null,
|
|
|
- search: searchForm.search || null,
|
|
|
- teacherIdList: searchForm.teacherIdList || null,
|
|
|
- isCallNames: searchForm.isCallNames,
|
|
|
- schoolId: searchForm.schoolId || null,
|
|
|
- groupType: searchForm.groupType || null,
|
|
|
- createStartDate: searchForm.creatTimer[0] ? searchForm.creatTimer[0] : null,
|
|
|
- createEndDate: searchForm.creatTimer[1] ? searchForm.creatTimer[1] : null
|
|
|
- };
|
|
|
- superFindCourseSchedules(obj).then(res => {
|
|
|
+ superFindCourseSchedules(this.getSearchForm()).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.tableList = res.data.rows;
|
|
|
this.rules.total = res.data.total;
|