|
@@ -1,8 +1,12 @@
|
|
|
<template>
|
|
|
<div class="m-container">
|
|
|
- <h2>
|
|
|
- <el-page-header @back="goBack" :content="name"></el-page-header>
|
|
|
- </h2>
|
|
|
+ <div class="titlewrap">
|
|
|
+ <h2>
|
|
|
+ <el-page-header @back="goBack" :content="name"></el-page-header>
|
|
|
+ </h2>
|
|
|
+ <p style="margin-bottom:10px; margin-left:30px;"> 课程有效期:{{ timers }}</p>
|
|
|
+ </div>
|
|
|
+
|
|
|
<!-- v-permission="'vipGroupManage/updateVipBaseInfo'" -->
|
|
|
<div class="wrap">
|
|
|
<div
|
|
@@ -11,8 +15,16 @@
|
|
|
v-permission="'courseSchedule/practiceGroupTeacherAdjust'"
|
|
|
>课程组调整</div>
|
|
|
<!-- // accompanys/addCourse -->
|
|
|
- <div v-permission="{ child:'courseSchedule/batchAddCourses',parent:'/accompanys'}" class="newBand" @click="addCourse">网管课加课</div>
|
|
|
- <div class="newBand" v-permission="'courseSchedule/batchUpdateCourseSchedule'" @click="adjustment">批量调整</div>
|
|
|
+ <div
|
|
|
+ v-permission="{ child:'courseSchedule/batchAddCourses',parent:'/accompanys'}"
|
|
|
+ class="newBand"
|
|
|
+ @click="addCourse"
|
|
|
+ >网管课加课</div>
|
|
|
+ <div
|
|
|
+ class="newBand"
|
|
|
+ v-permission="'courseSchedule/batchUpdateCourseSchedule'"
|
|
|
+ @click="adjustment"
|
|
|
+ >批量调整</div>
|
|
|
</div>
|
|
|
|
|
|
<div class="tableWrap">
|
|
@@ -184,7 +196,12 @@
|
|
|
<el-input v-model.trim="teacherForm.name" disabled></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="课程组声部" v-if="isMultiple">
|
|
|
- <el-select v-model.trim="teacherForm.subjectId" @change="changeSound" filterable clearable>
|
|
|
+ <el-select
|
|
|
+ v-model.trim="teacherForm.subjectId"
|
|
|
+ @change="changeSound"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ >
|
|
|
<el-option
|
|
|
v-for="(item,index) in subjectList"
|
|
|
:key="index"
|
|
@@ -212,7 +229,7 @@
|
|
|
<el-button type="primary" @click="subresetTeacher">确 定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
- <el-dialog :title="adjustmentName" width="800px" :visible.sync="adjustmentVisible">
|
|
|
+ <el-dialog :title="adjustmentName" width="800px" :visible.sync="adjustmentVisible">
|
|
|
<el-form
|
|
|
:model="adjustmentForm"
|
|
|
label-position="right"
|
|
@@ -401,7 +418,8 @@ export default {
|
|
|
{ value: "6", label: "星期六" },
|
|
|
{ value: "7", label: "星期日" }
|
|
|
],
|
|
|
- activeList: []
|
|
|
+ activeList: [],
|
|
|
+ timers: null
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -444,6 +462,10 @@ export default {
|
|
|
this.courseData = res.data.rows;
|
|
|
if (this.courseData.length > 0) {
|
|
|
this.name = this.courseData[0].name;
|
|
|
+ this.timers =
|
|
|
+ this.courseData[0].coursesStartDate.substring(0, 10) +
|
|
|
+ "至" +
|
|
|
+ this.courseData[0].coursesExpireDate.substring(0, 10);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
@@ -536,24 +558,24 @@ export default {
|
|
|
if (some) {
|
|
|
if (this.isMultiple) {
|
|
|
// 修改课程组老师
|
|
|
-
|
|
|
- practiceGroupTeacherAdjust({
|
|
|
- practiceGroupId: this.practiceId,
|
|
|
- teacherId: this.teacherForm.teacher,
|
|
|
- subjectId:this.teacherForm.subjectId
|
|
|
- }).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message.success("修改成功");
|
|
|
- this.getCourseGroup();
|
|
|
- this.getList();
|
|
|
- this.teacherVisible = false;
|
|
|
- }
|
|
|
- });
|
|
|
+
|
|
|
+ practiceGroupTeacherAdjust({
|
|
|
+ practiceGroupId: this.practiceId,
|
|
|
+ teacherId: this.teacherForm.teacher,
|
|
|
+ subjectId: this.teacherForm.subjectId
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success("修改成功");
|
|
|
+ this.getCourseGroup();
|
|
|
+ this.getList();
|
|
|
+ this.teacherVisible = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
} else {
|
|
|
// 修改单节课老师
|
|
|
practiceCourseTeacherAdjust({
|
|
|
courseScheduleId: this.activeRow.id,
|
|
|
- teacherId: this.teacherForm.teacher,
|
|
|
+ teacherId: this.teacherForm.teacher
|
|
|
}).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.$message.success("修改成功");
|
|
@@ -600,16 +622,15 @@ export default {
|
|
|
this.adjustmentVisible = true;
|
|
|
}
|
|
|
},
|
|
|
- changeSound(val){
|
|
|
- if(val){
|
|
|
- this.subjectList.forEach(item=>{
|
|
|
- if(item.id == val){
|
|
|
- let strArr = this.teacherForm.name.split('•')
|
|
|
- this.teacherForm.name = item.name+'•'+strArr[1]
|
|
|
- }
|
|
|
- })
|
|
|
+ changeSound(val) {
|
|
|
+ if (val) {
|
|
|
+ this.subjectList.forEach(item => {
|
|
|
+ if (item.id == val) {
|
|
|
+ let strArr = this.teacherForm.name.split("•");
|
|
|
+ this.teacherForm.name = item.name + "•" + strArr[1];
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
addWeek() {
|
|
|
// 添加循环周期
|
|
@@ -645,13 +666,13 @@ export default {
|
|
|
// courseScheduleIdList
|
|
|
let courseScheduleIdList = idArr;
|
|
|
obj.courseScheduleIdList = courseScheduleIdList;
|
|
|
- obj.startDate = this.adjustmentForm.courseTime;
|
|
|
+ obj.startDate = this.adjustmentForm.courseTime;
|
|
|
obj.coursesTimes = this.adjustmentForm.addCount;
|
|
|
obj.teachingArrangementList = this.weekList;
|
|
|
|
|
|
obj.isJumpHoliday = this.adjustmentForm.checked;
|
|
|
obj.musicGroupId = this.practiceId;
|
|
|
- obj.teachMode = this.adjustmentForm.courseType;
|
|
|
+ obj.teachMode = 'ONLINE';
|
|
|
obj.type = "PRACTICE";
|
|
|
batchUpdateCourseSchedule(obj).then(res => {
|
|
|
if (res.code == 200) {
|
|
@@ -708,7 +729,7 @@ export default {
|
|
|
|
|
|
obj.isJumpHoliday = this.adjustmentForm.checked;
|
|
|
obj.musicGroupId = this.practiceId;
|
|
|
- obj.teachMode = this.adjustmentForm.courseType;
|
|
|
+ obj.teachMode = 'ONLINE';
|
|
|
obj.type = "PRACTICE";
|
|
|
// console.log(obj)
|
|
|
// return
|
|
@@ -736,22 +757,28 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
- },
|
|
|
+ }
|
|
|
// closeAdjustment(){
|
|
|
// console.log(111)
|
|
|
-
|
|
|
+
|
|
|
// }
|
|
|
},
|
|
|
- watch:{
|
|
|
- adjustmentVisible(val){
|
|
|
- if(!val){
|
|
|
- this.$refs.adjustmentForm.resetFields();
|
|
|
+ watch: {
|
|
|
+ adjustmentVisible(val) {
|
|
|
+ if (!val) {
|
|
|
+ this.$refs.adjustmentForm.resetFields();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
+.titlewrap {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ justify-content: flex-start;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
.wrap {
|
|
|
display: flex;
|
|
|
flex-direction: row;
|