|
@@ -33,408 +33,31 @@
|
|
|
|
|
|
</template>
|
|
|
</el-calendar>
|
|
|
- <div class="tableWrap"
|
|
|
- v-if='tableList.length>0'>
|
|
|
- <el-table :data="tableList"
|
|
|
- :header-cell-style="{background:'#EDEEF0',color:'#444'}">
|
|
|
- <el-table-column align="center"
|
|
|
- prop="organName"
|
|
|
- label="分部名称"></el-table-column>
|
|
|
- <el-table-column align="center"
|
|
|
- width="130px"
|
|
|
- prop="musicGroupId"
|
|
|
- label="乐团/课程组编号"></el-table-column>
|
|
|
- <el-table-column align="center"
|
|
|
- prop="id"
|
|
|
- label="课程编号"></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>
|
|
|
- <el-table-column align="center"
|
|
|
- prop="name"
|
|
|
- label="课程名称"></el-table-column>
|
|
|
- <el-table-column align="center"
|
|
|
- label="课程类型">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div>{{ scope.row.type | coursesType}}</div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="center"
|
|
|
- label="教学模式">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div>{{ scope.row.teachMode | teachMode}}</div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="center"
|
|
|
- prop="schoolName"
|
|
|
- label="教学点">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div>{{scope.row.schoolName?scope.row.schoolName:'网络教室'}}</div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="center"
|
|
|
- prop="courseScheduleStatus"
|
|
|
- label="课程状态">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div>{{ scope.row.status | coursesStatus }}</div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="center"
|
|
|
- label="操作"
|
|
|
- fixed="right"
|
|
|
- width="180px">
|
|
|
- <template slot-scope="scope">
|
|
|
- <!-- v-if="permission('teamCourseList/details')" -->
|
|
|
- <div>
|
|
|
- <el-button v-if="!scope.row.isSettlement && permission('courseSchedule/classStartDateAdjust')&&scope.row.groupType ==='MUSIC'"
|
|
|
- type="text"
|
|
|
- @click="resetClass(scope.row)">调整</el-button>
|
|
|
- <el-button v-if="!scope.row.isSettlement && permission('courseSchedule/classStartDateAdjust')&&scope.row.groupType ==='VIP'"
|
|
|
- type="text"
|
|
|
- @click="resetClass(scope.row)">调整</el-button>
|
|
|
- <el-button type="text"
|
|
|
- v-if="!scope.row.isSettlement && permission('courseSchedule/practiceCourseAdjust')&&scope.row.groupType==='PRACTICE'"
|
|
|
- @click="resetClass(scope.row)">调整</el-button>
|
|
|
- <el-button type="text"
|
|
|
- v-if="scope.row.groupType==='PRACTICE'&&scope.row.status == 'NOT_START'&&scope.row.practiceGroup['type']!='TRIAL'&& permission('courseSchedule/practiceCourseTeacherAdjust')"
|
|
|
- @click="resetTeacher(scope.row)">更换老师</el-button>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <pagination :total="rules.total"
|
|
|
- :page.sync="rules.page"
|
|
|
- :limit.sync="rules.limit"
|
|
|
- :page-sizes="rules.page_size"
|
|
|
- @pagination="getList" />
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- 乐团调整 -->
|
|
|
- <el-dialog title="课程调整"
|
|
|
- destroy-on-close
|
|
|
- width="400px"
|
|
|
- :visible.sync="musicVisible">
|
|
|
- <el-form :model="musicForm"
|
|
|
- ref="musicFormref"
|
|
|
- :rules="musicRules"
|
|
|
- label-position="right"
|
|
|
- label-width="80px;">
|
|
|
- <el-form-item label="指导老师"
|
|
|
- prop="teacher">
|
|
|
- <el-select v-model.trim="musicForm.teacher"
|
|
|
- style="width:220px!important"
|
|
|
- clearable
|
|
|
- filterable>
|
|
|
- <el-option v-for="(item,index) in teacherList"
|
|
|
- :key="index"
|
|
|
- :value="item.id"
|
|
|
- :label="item.realName"></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="上课日期"
|
|
|
- prop="date">
|
|
|
- <el-date-picker v-model.trim="musicForm.date"
|
|
|
- type="date"
|
|
|
- :picker-options="{
|
|
|
- firstDayOfWeek:1
|
|
|
- }"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- placeholder="选择日期"></el-date-picker>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="开始时间"
|
|
|
- prop="startTime">
|
|
|
- <el-time-select placeholder="起始时间"
|
|
|
- v-model="startCourseTime"
|
|
|
- @change="changeStartTime"
|
|
|
- :picker-options="{
|
|
|
- start: '04:30',
|
|
|
- step: '00:05',
|
|
|
- end: '23:30'
|
|
|
- }"></el-time-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="结束时间"
|
|
|
- prop="endTime">
|
|
|
- <el-time-select placeholder="结束时间"
|
|
|
- v-model="endCourseTime"
|
|
|
- :picker-options="{
|
|
|
- start: '04:30',
|
|
|
- step: '00:05',
|
|
|
- end: '23:30',
|
|
|
- minTime: startCourseTime
|
|
|
- }"></el-time-select>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <div slot="footer"
|
|
|
- class="dialog-footer">
|
|
|
- <el-button @click="musicVisible = false">取 消</el-button>
|
|
|
- <el-button type="primary"
|
|
|
- @click="submitResetClass">确 定</el-button>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
- <!-- vip调整 -->
|
|
|
- <el-dialog title="课程调整"
|
|
|
- destroy-on-close
|
|
|
- width="400px"
|
|
|
- :visible.sync="vipVisible">
|
|
|
- <el-form :model="vipForm"
|
|
|
- ref="vipFormref"
|
|
|
- :rules="vipRules"
|
|
|
- label-position="right"
|
|
|
- label-width="80px;"
|
|
|
- :inline="true">
|
|
|
- <el-form-item label="上课日期"
|
|
|
- prop="date">
|
|
|
- <el-date-picker v-model.trim="vipForm.date"
|
|
|
- style="width:200px!important;"
|
|
|
- type="date"
|
|
|
- :picker-options="{
|
|
|
- firstDayOfWeek:1
|
|
|
- }"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- placeholder="选择日期"></el-date-picker>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="开始时间"
|
|
|
- prop="startCourseTime"
|
|
|
- key="time2">
|
|
|
- <el-time-select placeholder="起始时间"
|
|
|
- style="width:200px!important;"
|
|
|
- v-model="startCourseTime"
|
|
|
- :picker-options="{
|
|
|
- start: '04:30',
|
|
|
- step: '00:05',
|
|
|
- end: '23:30'
|
|
|
- }"></el-time-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="课程类型"
|
|
|
- prop="courseType">
|
|
|
- <el-select clearable
|
|
|
- v-model.trim="vipForm.teachMode">
|
|
|
- <el-option label="线上课"
|
|
|
- value="ONLINE"></el-option>
|
|
|
- <el-option label="线下课"
|
|
|
- value="OFFLINE"></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="教学地点"
|
|
|
- v-if="vipForm.teachMode == 'OFFLINE'"
|
|
|
- prop="schoolId">
|
|
|
- <el-select key='school'
|
|
|
- v-model="vipForm.schoolId"
|
|
|
- filterable
|
|
|
- clearable>
|
|
|
- <el-option v-for="(item,index) in schoolList"
|
|
|
- :key="index"
|
|
|
- :value="item.id"
|
|
|
- :label="item.name"></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <div slot="footer"
|
|
|
- class="dialog-footer">
|
|
|
- <el-button @click="vipVisible = false">取 消</el-button>
|
|
|
- <el-button type="primary"
|
|
|
- @click="submitResetVipClass">确 定</el-button>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
- <!-- 网管课调整 -->
|
|
|
- <el-dialog title="课程调整"
|
|
|
- destroy-on-close
|
|
|
- width="400px"
|
|
|
- :visible.sync="practiceVisible">
|
|
|
- <el-form :model="practiceForm"
|
|
|
- ref="practiceFormref"
|
|
|
- :rules="practiceRules"
|
|
|
- label-position="right"
|
|
|
- label-width="80px;"
|
|
|
- :inline="true">
|
|
|
- <el-form-item label="上课日期"
|
|
|
- prop="date"
|
|
|
- v-if="practiceForm.courseType != 'TRIAL'">
|
|
|
- <el-date-picker v-model.trim="practiceForm.date"
|
|
|
- style="width:200px!important;"
|
|
|
- type="date"
|
|
|
- :picker-options="courseOption"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- placeholder="选择日期"></el-date-picker>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="上课日期"
|
|
|
- prop="date"
|
|
|
- v-else>
|
|
|
- <el-date-picker v-model.trim="practiceForm.date"
|
|
|
- style="width:200px!important;"
|
|
|
- type="date"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- :picker-options="{
|
|
|
- firstDayOfWeek: 1
|
|
|
- }"
|
|
|
- placeholder="选择日期"></el-date-picker>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="开始时间"
|
|
|
- key="time1"
|
|
|
- prop="startCourseTime">
|
|
|
- <el-time-select placeholder="起始时间"
|
|
|
- style="width:200px!important;"
|
|
|
- v-model="startCourseTime"
|
|
|
- :picker-options="{
|
|
|
- start: '07:00',
|
|
|
- step: '00:05',
|
|
|
- end: '23:00'
|
|
|
- }"></el-time-select>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <div slot="footer"
|
|
|
- class="dialog-footer">
|
|
|
- <el-button @click="practiceVisible = false">取 消</el-button>
|
|
|
- <el-button type="primary"
|
|
|
- @click="submitPracticeResetClass">确 定</el-button>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
- <!-- 老师调整 -->
|
|
|
- <el-dialog title="老师调整"
|
|
|
- width="400px"
|
|
|
- :visible.sync="teacherVisible">
|
|
|
- <el-form :model="teacherForm"
|
|
|
- ref="teacherForm"
|
|
|
- :rules="teacherRules"
|
|
|
- label-position="right"
|
|
|
- label-width="80px;"
|
|
|
- :inline="true">
|
|
|
- <el-form-item label="指导老师">
|
|
|
- <el-select v-model.trim="teacherForm.teacher"
|
|
|
- filterable
|
|
|
- clearable>
|
|
|
- <el-option v-for="(item,index) in teacherList"
|
|
|
- :key="index"
|
|
|
- :value="item.id"
|
|
|
- :label="item.realName"></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <div slot="footer"
|
|
|
- class="dialog-footer">
|
|
|
- <el-button @click="teacherVisible = false">取 消</el-button>
|
|
|
- <el-button type="primary"
|
|
|
- @click="subresetTeacher">确 定</el-button>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
+ <resetList :startTimes="fomatValue"
|
|
|
+ @getCalendatList='getCalendatList' />
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { superFindCourseSchedules, getTeacher, resetCourse, practiceCourseAdjus, practiceCourseTeacherAdjust } from "@/api/buildTeam";
|
|
|
+import { superFindCourseSchedules } from "@/api/buildTeam";
|
|
|
import { setDate, getCurrentMonthFirst, getCurrentMonthLast } from "@/utils/date"
|
|
|
import { getTeachSchool } from "@/api/teacherManager";
|
|
|
-import pagination from "@/components/Pagination/index";
|
|
|
+import resetList from './resetComponent'
|
|
|
import { permission } from "@/utils/directivePage";
|
|
|
export default {
|
|
|
- components: { pagination },
|
|
|
+ components: { resetList },
|
|
|
data () {
|
|
|
return {
|
|
|
- startCourseTime: '',
|
|
|
- endCourseTime: '',
|
|
|
dataList: [],
|
|
|
value: new Date(),
|
|
|
teacherIdList: '',
|
|
|
vipList: [],
|
|
|
teamList: [],
|
|
|
- newList: [],
|
|
|
- tableList: [],
|
|
|
- teacherList: [],
|
|
|
- schoolList: [],
|
|
|
- educationList: [],
|
|
|
- startTime: '',
|
|
|
- endTime: '',
|
|
|
- rules: {
|
|
|
- // 分页规则
|
|
|
- limit: 10, // 限制显示条数
|
|
|
- page: 1, // 当前页
|
|
|
- total: 0, // 总条数
|
|
|
- page_size: [10, 20, 40, 50] // 选择限制显示条数
|
|
|
- },
|
|
|
- musicVisible: false,
|
|
|
- vipVisible: false,
|
|
|
- practiceVisible: false,
|
|
|
- musicForm: {
|
|
|
- teacher: "",
|
|
|
- assistant: "",
|
|
|
- date: "",
|
|
|
- id: "",
|
|
|
- startTime: "",
|
|
|
- endTime: "",
|
|
|
- type: "",
|
|
|
- },
|
|
|
- musicRules: {
|
|
|
- teacher: [
|
|
|
- { required: true, message: "请选择主教老师名称", trigger: "blur" }
|
|
|
- ],
|
|
|
- date: [{ required: true, message: "请选择上课时间", trigger: "blur" }],
|
|
|
- },
|
|
|
- vipForm: {
|
|
|
- date: "",
|
|
|
- id: "",
|
|
|
- schoolId: '',
|
|
|
- teachMode: ""
|
|
|
- },
|
|
|
- vipRules: {
|
|
|
- date: [{ required: true, message: "请选择上课时间", trigger: "blur" }],
|
|
|
- },
|
|
|
- practiceRules: {
|
|
|
- date: [{ required: true, message: "请选择上课时间", trigger: "blur" }],
|
|
|
- },
|
|
|
-
|
|
|
- practiceForm: {
|
|
|
- id: '',
|
|
|
- date: '',
|
|
|
- courseType: '',
|
|
|
- coursesExpireDate: ''
|
|
|
- },
|
|
|
- courseOption: null,
|
|
|
- pickerOptions: {
|
|
|
- firstDayOfWeek: 1,
|
|
|
- disabledDate (time) {
|
|
|
- return time.getTime() + 86400000 <= new Date().getTime();
|
|
|
- }
|
|
|
- },
|
|
|
- teacherForm: {
|
|
|
- teacher: null,
|
|
|
- courseScheduleId: null
|
|
|
- },
|
|
|
- teacherRules: {
|
|
|
- teacher: [{ required: true, message: "请选择老师", trigger: "blur" }],
|
|
|
- educationalTeacherId: [{ required: true, message: "请选择教务老师", trigger: "blur" }]
|
|
|
- },
|
|
|
- teacherVisible: false
|
|
|
+ newList: []
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|
|
|
- this.courseOption = this.coursesDate();
|
|
|
+ this.teacherIdList = this.$route.query.teacherId
|
|
|
this.getCalendatList()
|
|
|
- getTeacher().then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.teacherList = res.data;
|
|
|
- }
|
|
|
- });
|
|
|
- getTeachSchool({
|
|
|
- userId: this.teacherIdList
|
|
|
- }).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.schoolList = res.data;
|
|
|
- }
|
|
|
- })
|
|
|
-
|
|
|
this.$nextTick(() => {
|
|
|
// 点击上个月
|
|
|
let prevBtn1 = document.querySelector('.el-calendar__button-group .el-button-group>button:nth-child(1)');
|
|
@@ -463,17 +86,6 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
|
|
|
- getList () {
|
|
|
- superFindCourseSchedules({
|
|
|
- teacherIdList: this.teacherIdList, page: this.rules.page,
|
|
|
- rows: this.rules.limit, startTime: this.startTime, endTime: this.endTime
|
|
|
- }).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.tableList = res.data.rows
|
|
|
- this.rules.total = res.data.total
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
getCalendatList () {
|
|
|
this.teacherIdList = this.$route.query.teacherId
|
|
|
// 获取当前月第一天和最后一天
|
|
@@ -511,8 +123,6 @@ export default {
|
|
|
if (scope.data.type === 'next-month' || scope.data.type === 'prev-month') {
|
|
|
this.getCalendatList()
|
|
|
}
|
|
|
-
|
|
|
- this.getList()
|
|
|
},
|
|
|
reduceArray (array, str) {
|
|
|
let hash = {}
|
|
@@ -525,231 +135,21 @@ export default {
|
|
|
setCourseList (val) {
|
|
|
this.startTime = setDate(val)
|
|
|
this.endTime = setDate(val)
|
|
|
- this.getList()
|
|
|
this.getCalendatList()
|
|
|
-
|
|
|
},
|
|
|
permission (str, parent) {
|
|
|
return permission(str, parent);
|
|
|
},
|
|
|
- resetClass (row) {
|
|
|
-
|
|
|
- this.value = new Date(row.classDate.replace(/-/g, '/'))
|
|
|
- switch (row.groupType) {
|
|
|
- case 'MUSIC': {
|
|
|
- this.$nextTick(() => {
|
|
|
- this.musicForm.teacher = parseInt(row.actualTeacherId);
|
|
|
- this.musicForm.date = row.classDate;
|
|
|
- // this.startCourseTime = row.startClassTime.split(' ')[1].substring(0, 5);
|
|
|
- let startClassTime = row.startClassTime.split(' ')[1].substring(0, 5)
|
|
|
- this.$set(this, 'startCourseTime', startClassTime)
|
|
|
- this.endCourseTime = row.endClassTime.split(' ')[1].substring(0, 5);
|
|
|
- this.musicForm.id = row.id;
|
|
|
- this.$forceUpdate()
|
|
|
- this.musicVisible = true;
|
|
|
-
|
|
|
- })
|
|
|
- break
|
|
|
- }
|
|
|
- case 'VIP': {
|
|
|
- this.$nextTick(() => {
|
|
|
- this.vipForm.date = row.classDate;
|
|
|
- this.vipForm.id = row.id;
|
|
|
- this.vipForm.teachMode = row.teachMode
|
|
|
- this.vipForm.schoolId = row.schoolId || ''
|
|
|
- // this.startCourseTime = row.startClassTime.split(' ')[1].substring(0, 5);
|
|
|
-
|
|
|
-
|
|
|
- let startClassTime = row.startClassTime.split(' ')[1].substring(0, 5)
|
|
|
- this.startCourseTime = null;
|
|
|
- this.$set(this, 'startCourseTime', startClassTime)
|
|
|
- this.vipVisible = true;
|
|
|
- this.$forceUpdate()
|
|
|
- })
|
|
|
- break
|
|
|
- }
|
|
|
- case 'PRACTICE': {
|
|
|
- this.$nextTick(() => {
|
|
|
- this.practiceForm.date = row.classDate;
|
|
|
- // this.startCourseTime = row.startClassTime.split(' ')[1].substring(0, 5);
|
|
|
- let startClassTime = row.startClassTime.split(' ')[1].substring(0, 5)
|
|
|
- this.startCourseTime = null;
|
|
|
- this.$set(this, 'startCourseTime', startClassTime)
|
|
|
- console.log(this.startCourseTime)
|
|
|
- this.practiceForm.id = row.id;
|
|
|
- this.practiceForm.courseType = row.practiceGroup.type
|
|
|
- this.practiceForm.coursesExpireDate = row.practiceGroup.coursesExpireDate
|
|
|
-
|
|
|
- this.practiceVisible = true;
|
|
|
- this.$forceUpdate()
|
|
|
- })
|
|
|
- break
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ fomatValue () {
|
|
|
|
|
|
- },
|
|
|
- changeStartTime () {
|
|
|
- this.endCourseTime = '';
|
|
|
- },
|
|
|
- submitResetClass () {
|
|
|
- if (!this.startCourseTime || !this.endCourseTime) {
|
|
|
- this.$message.error("请填写开始时间或结束时间");
|
|
|
- return;
|
|
|
- }
|
|
|
- this.$refs['musicFormref'].validate(res => {
|
|
|
- if (res) {
|
|
|
- let obj = {
|
|
|
- actualTeacherId: this.musicForm.teacher,
|
|
|
- startClassTimeStr: this.startCourseTime,
|
|
|
- endClassTimeStr: this.endCourseTime,
|
|
|
- id: this.musicForm.id,
|
|
|
- classDate: this.musicForm.date,
|
|
|
- };
|
|
|
- resetCourse(obj).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message.success("修改成功");
|
|
|
- console.log(this.value)
|
|
|
- this.setCourseList(this.value)
|
|
|
- this.musicVisible = false;
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- submitResetVipClass () {
|
|
|
- if (!this.startTime) {
|
|
|
- this.$message.error("请填写修改时间");
|
|
|
- return;
|
|
|
- }
|
|
|
- let classTime = this.vipForm.date
|
|
|
- ? new Date(this.vipForm.date)
|
|
|
- : new Date();
|
|
|
- let ymd =
|
|
|
- classTime.getFullYear() +
|
|
|
- "-" +
|
|
|
- (classTime.getMonth() + 1) +
|
|
|
- "-" +
|
|
|
- classTime.getDate();
|
|
|
- let tempStartTime = this.startCourseTime
|
|
|
- if (this.startCourseTime.length <= 5) {
|
|
|
- tempStartTime = tempStartTime + ":00";
|
|
|
- }
|
|
|
- let obj = {
|
|
|
- startClassTime: ymd + " " + tempStartTime,
|
|
|
- // startClassTimeStr: this.startTime,
|
|
|
- id: this.vipForm.id,
|
|
|
- classDate: this.vipForm.date,
|
|
|
- schoolId: this.vipForm.schoolId || null,
|
|
|
- teachMode: this.vipForm.teachMode || null
|
|
|
- };
|
|
|
- resetCourse(obj).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message.success("修改成功");
|
|
|
- this.vipVisible = false;
|
|
|
- this.setCourseList(this.value)
|
|
|
- } //else {
|
|
|
- // this.$message.error(res.msg)
|
|
|
- // }
|
|
|
- });
|
|
|
- },
|
|
|
- submitPracticeResetClass () {
|
|
|
- if (!this.startCourseTime) {
|
|
|
- this.$message.error("请填写修改时间");
|
|
|
- return;
|
|
|
- }
|
|
|
- let obj = {
|
|
|
- startClassTimeStr: this.startCourseTime,
|
|
|
- id: this.practiceForm.id,
|
|
|
- classDate: this.practiceForm.date
|
|
|
- };
|
|
|
- practiceCourseAdjus(obj).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message.success("修改成功");
|
|
|
- this.practiceVisible = false;
|
|
|
- this.setCourseList(this.value)
|
|
|
- } //else {
|
|
|
- // this.$message.error(res.msg)
|
|
|
- // }
|
|
|
- });
|
|
|
- },
|
|
|
- coursesDate () {
|
|
|
- let self = this;
|
|
|
- return {
|
|
|
- firstDayOfWeek: 1,
|
|
|
- disabledDate: time => {
|
|
|
- // if (self.leftForm.courseStart) {
|
|
|
- // let date = new Date(self.leftForm.courseStart.replace(/-/, "/"));
|
|
|
- // coursesExpireDate
|
|
|
- let date = new Date(this.practiceForm.coursesExpireDate.replace(/-/, "/"));
|
|
|
- return time.getTime() > date.getTime();
|
|
|
- // }
|
|
|
- // return;
|
|
|
- }
|
|
|
- };
|
|
|
- },
|
|
|
- resetTeacher (row) {
|
|
|
- this.teacherForm.teacher = row.actualTeacherId;
|
|
|
- this.teacherForm.courseScheduleId = row.id;
|
|
|
- this.teacherVisible = true;
|
|
|
- },
|
|
|
- subresetTeacher () {
|
|
|
- this.$refs.teacherForm.validate(some => {
|
|
|
- if (some) {
|
|
|
- // 修改单节课老师
|
|
|
- practiceCourseTeacherAdjust({
|
|
|
- courseScheduleId: this.teacherForm.courseScheduleId,
|
|
|
- teacherId: this.teacherForm.teacher
|
|
|
- }).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message.success("修改成功");
|
|
|
- this.teacherVisible = false;
|
|
|
- this.setCourseList(this.value)
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
- return;
|
|
|
- }
|
|
|
- });
|
|
|
+ return setDate(this.value)
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
- musicVisible (val) {
|
|
|
- if (!val) {
|
|
|
- this.musicForm = {
|
|
|
- teacher: "",
|
|
|
- assistant: "",
|
|
|
- date: "",
|
|
|
- id: "",
|
|
|
- type: "",
|
|
|
- }
|
|
|
- this.startCourseTime = ""
|
|
|
- this.endCourseTime = ""
|
|
|
- this.$refs['musicFormref'].resetFields()
|
|
|
- }
|
|
|
- },
|
|
|
- vipVisible (val) {
|
|
|
- if (!val) {
|
|
|
- this.startCourseTime = ""
|
|
|
- this.vipForm = {
|
|
|
- date: "",
|
|
|
- id: "",
|
|
|
- schoolId: "",
|
|
|
- teachMode: ""
|
|
|
- }
|
|
|
- this.$refs['vipFormref'].resetFields()
|
|
|
- }
|
|
|
- },
|
|
|
- practiceVisible (val) {
|
|
|
- if (!val) {
|
|
|
- this.startCourseTime = ""
|
|
|
- this.practiceForm = {
|
|
|
- id: '',
|
|
|
- date: '',
|
|
|
- courseType: '',
|
|
|
- coursesExpireDate: ''
|
|
|
- }
|
|
|
- this.$refs['practiceFormref'].resetFields()
|
|
|
- }
|
|
|
+ value (val) {
|
|
|
+ console.log(setDate(val))
|
|
|
}
|
|
|
}
|
|
|
}
|