|
@@ -15,56 +15,66 @@
|
|
|
<!-- 列表 -->
|
|
|
<!-- <div class="newBand"
|
|
|
@click="resetClass">班级调整</div> -->
|
|
|
- <div class="newBand"
|
|
|
- v-permission="'courseSchedule/coursePostpone'"
|
|
|
- @click="postpone">课程顺延</div>
|
|
|
+ <div
|
|
|
+ class="newBand"
|
|
|
+ v-permission="'courseSchedule/coursePostpone'"
|
|
|
+ @click="postpone"
|
|
|
+ >
|
|
|
+ 课程顺延
|
|
|
+ </div>
|
|
|
<div class="tableWrap">
|
|
|
- <el-table :data='tableList'
|
|
|
- :header-cell-style="{background:'#EDEEF0',color:'#444'}"
|
|
|
- @selection-change="handleSelectionChange">
|
|
|
- <el-table-column type="selection"
|
|
|
- width="55">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align='center'
|
|
|
- prop="classGroupName"
|
|
|
- label="班级名称">
|
|
|
+ <el-table
|
|
|
+ :data="tableList"
|
|
|
+ :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ >
|
|
|
+ <el-table-column type="selection" width="55"> </el-table-column>
|
|
|
+ <el-table-column align="center" prop="classGroupName" label="班级名称">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div
|
|
|
+ @click="gotoClassList(scope.row.classGroupName)"
|
|
|
+ style="color: #14928a; cursor: pointer"
|
|
|
+ >
|
|
|
+ {{ scope.row.classGroupName }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align='center'
|
|
|
- label="班级类型">
|
|
|
+ <el-table-column align="center" label="班级类型">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
- {{ scope.row.classGroupType | classType}}
|
|
|
+ {{ scope.row.classGroupType | classType }}
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align='center'
|
|
|
- prop="masterTeacher"
|
|
|
- label="主教老师">
|
|
|
+ <el-table-column align="center" prop="masterTeacher" label="主教老师">
|
|
|
</el-table-column>
|
|
|
- <el-table-column align='center'
|
|
|
- prop='subTeacher'
|
|
|
- label="助教老师">
|
|
|
+ <el-table-column align="center" prop="subTeacher" label="助教老师">
|
|
|
</el-table-column>
|
|
|
- <el-table-column align='center'
|
|
|
- prop="currentClassTimes"
|
|
|
- label="当前课次">
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="currentClassTimes"
|
|
|
+ label="当前课次"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
- {{ scope.row.currentClassTimes+'/'+scope.row.totalClassTimes}}
|
|
|
+ {{
|
|
|
+ scope.row.currentClassTimes + "/" + scope.row.totalClassTimes
|
|
|
+ }}
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align='center'
|
|
|
- prop="studyNum"
|
|
|
- label="在读人数">
|
|
|
+ <el-table-column align="center" prop="studyNum" label="在读人数">
|
|
|
</el-table-column>
|
|
|
- <el-table-column align='center'
|
|
|
- v-if="permission('courseSchedule/coursePostpone')"
|
|
|
- label="操作">
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ v-if="permission('courseSchedule/coursePostpone')"
|
|
|
+ label="操作"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
- <el-button type='text'
|
|
|
- @click="signPostpone(scope.row)">顺延课程</el-button>
|
|
|
+ <el-button type="text" @click="signPostpone(scope.row)"
|
|
|
+ >顺延课程</el-button
|
|
|
+ >
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -87,67 +97,70 @@
|
|
|
</el-table-column> -->
|
|
|
</el-table>
|
|
|
<pagination
|
|
|
- sync
|
|
|
- save-key='teamDetails-classList'
|
|
|
- :total.sync="rules.total"
|
|
|
- :page.sync="rules.page"
|
|
|
- :limit.sync="rules.limit"
|
|
|
- :page-sizes="rules.page_size"
|
|
|
- @pagination="getList" />
|
|
|
+ sync
|
|
|
+ save-key="teamDetails-classList"
|
|
|
+ :total.sync="rules.total"
|
|
|
+ :page.sync="rules.page"
|
|
|
+ :limit.sync="rules.limit"
|
|
|
+ :page-sizes="rules.page_size"
|
|
|
+ @pagination="getList"
|
|
|
+ />
|
|
|
</div>
|
|
|
- <el-dialog title="课程顺延"
|
|
|
- :visible.sync="postponeVisible"
|
|
|
- width="600px"
|
|
|
- :before-close="handleClose">
|
|
|
- <el-form :model="postponeForm"
|
|
|
- ref="postponeForm"
|
|
|
- :rules='postponeRules'>
|
|
|
- <el-form-item label="开始日期"
|
|
|
- prop="stopTime">
|
|
|
- <el-date-picker v-model.trim="postponeForm.stopTime"
|
|
|
- type="date"
|
|
|
- :picker-options="bigin"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- placeholder="选择日期">
|
|
|
+ <el-dialog
|
|
|
+ title="课程顺延"
|
|
|
+ :visible.sync="postponeVisible"
|
|
|
+ width="600px"
|
|
|
+ :before-close="handleClose"
|
|
|
+ >
|
|
|
+ <el-form :model="postponeForm" ref="postponeForm" :rules="postponeRules">
|
|
|
+ <el-form-item label="开始日期" prop="stopTime">
|
|
|
+ <el-date-picker
|
|
|
+ v-model.trim="postponeForm.stopTime"
|
|
|
+ type="date"
|
|
|
+ :picker-options="bigin"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="选择日期"
|
|
|
+ >
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="顺延日期"
|
|
|
- prop="resetTime">
|
|
|
- <el-date-picker v-model.trim="postponeForm.resetTime"
|
|
|
- type="date"
|
|
|
- :picker-options="options"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- placeholder="选择日期">
|
|
|
+ <el-form-item label="顺延日期" prop="resetTime">
|
|
|
+ <el-date-picker
|
|
|
+ v-model.trim="postponeForm.resetTime"
|
|
|
+ type="date"
|
|
|
+ :picker-options="options"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="选择日期"
|
|
|
+ >
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="跳过节假日">
|
|
|
<el-checkbox v-model.trim="postponeForm.holiday"></el-checkbox>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
- <span style='color:#F56C6C;'>注意:将会把所选班级的课表,「开始日期」之后的全部未开始课程;
|
|
|
- 调整到「顺延日期」之后重新排课,可以勾选跳过节假日;</span>
|
|
|
- <span slot="footer"
|
|
|
- class="dialog-footer">
|
|
|
+ <span style="color: #f56c6c"
|
|
|
+ >注意:将会把所选班级的课表,「开始日期」之后的全部未开始课程;
|
|
|
+ 调整到「顺延日期」之后重新排课,可以勾选跳过节假日;</span
|
|
|
+ >
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="postponeVisible = false">取 消</el-button>
|
|
|
- <el-button type="primary"
|
|
|
- @click="submitInfo">确 定</el-button>
|
|
|
+ <el-button type="primary" @click="submitInfo">确 定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import pagination from '@/components/Pagination/index'
|
|
|
-import { getClassList, coursePostpone } from '@/api/buildTeam'
|
|
|
-import { permission } from '@/utils/directivePage'
|
|
|
+import pagination from "@/components/Pagination/index";
|
|
|
+import { getClassList, coursePostpone } from "@/api/buildTeam";
|
|
|
+import { permission } from "@/utils/directivePage";
|
|
|
export default {
|
|
|
- name: 'tclassList',
|
|
|
- data () {
|
|
|
+ name: "tclassList",
|
|
|
+ data() {
|
|
|
return {
|
|
|
postponeVisible: false,
|
|
|
searchLsit: [],
|
|
|
searchForm: {
|
|
|
- name: '',
|
|
|
- status: ''
|
|
|
+ name: "",
|
|
|
+ status: "",
|
|
|
},
|
|
|
tableList: [],
|
|
|
rules: {
|
|
@@ -155,78 +168,87 @@ export default {
|
|
|
limit: 10, // 限制显示条数
|
|
|
page: 1, // 当前页
|
|
|
total: 0, // 总条数
|
|
|
- page_size: [10, 20, 40, 50] // 选择限制显示条数
|
|
|
+ page_size: [10, 20, 40, 50], // 选择限制显示条数
|
|
|
},
|
|
|
postponeForm: {
|
|
|
- stopTime: '',
|
|
|
- resetTime: '',
|
|
|
- holiday: false
|
|
|
+ stopTime: "",
|
|
|
+ resetTime: "",
|
|
|
+ holiday: false,
|
|
|
},
|
|
|
postponeRules: {
|
|
|
- stopTime: [{ required: true, message: '请选择开始日期', trigger: 'blur' },],
|
|
|
- resetTime: [{ required: true, message: '请选择顺延日期', trigger: 'blur' },],
|
|
|
+ stopTime: [
|
|
|
+ { required: true, message: "请选择开始日期", trigger: "blur" },
|
|
|
+ ],
|
|
|
+ resetTime: [
|
|
|
+ { required: true, message: "请选择顺延日期", trigger: "blur" },
|
|
|
+ ],
|
|
|
},
|
|
|
- activeClass: '',
|
|
|
+ activeClass: "",
|
|
|
activeList: [],
|
|
|
options: this.processDate(),
|
|
|
- bigin: this.beginDate()
|
|
|
- }
|
|
|
+ bigin: this.beginDate(),
|
|
|
+ };
|
|
|
},
|
|
|
components: {
|
|
|
- pagination
|
|
|
- },
|
|
|
- created () {
|
|
|
-
|
|
|
+ pagination,
|
|
|
},
|
|
|
- mounted () {
|
|
|
+ created() {},
|
|
|
+ mounted() {
|
|
|
this.getList();
|
|
|
},
|
|
|
- activated () {
|
|
|
+ activated() {
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
- permission (str) {
|
|
|
- return permission(str)
|
|
|
+ permission(str) {
|
|
|
+ return permission(str);
|
|
|
},
|
|
|
- getList () {
|
|
|
+ getList() {
|
|
|
this.teamid = this.$route.query.id;
|
|
|
// search: this.teamid
|
|
|
- getClassList({ search: this.teamid, page: this.rules.page, rows: this.rules.limit }).then(res => {
|
|
|
+ getClassList({
|
|
|
+ search: this.teamid,
|
|
|
+ page: this.rules.page,
|
|
|
+ rows: this.rules.limit,
|
|
|
+ }).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
this.tableList = res.data.rows;
|
|
|
- this.rules.total = res.data.total
|
|
|
+ this.rules.total = res.data.total;
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
- resetClass () {
|
|
|
+ resetClass() {
|
|
|
// 跳转到班级详情页
|
|
|
- this.$router.push({ path: '/business/resetClass', query: { id: this.teamid } })
|
|
|
+ this.$router.push({
|
|
|
+ path: "/business/resetClass",
|
|
|
+ query: { id: this.teamid },
|
|
|
+ });
|
|
|
},
|
|
|
- postpone () {
|
|
|
+ postpone() {
|
|
|
if (this.activeList.length <= 0) {
|
|
|
- this.$message.error('请至少选择一个班级');
|
|
|
- return
|
|
|
+ this.$message.error("请至少选择一个班级");
|
|
|
+ return;
|
|
|
}
|
|
|
this.postponeVisible = true;
|
|
|
},
|
|
|
- signPostpone (row) {
|
|
|
+ signPostpone(row) {
|
|
|
this.activeClass = row.classGroupId;
|
|
|
this.postponeVisible = true;
|
|
|
},
|
|
|
- handleClose () {
|
|
|
+ handleClose() {
|
|
|
// 弹窗关闭之前
|
|
|
this.postponeVisible = false;
|
|
|
- this.$refs['postponeForm'].resetFields();
|
|
|
+ this.$refs["postponeForm"].resetFields();
|
|
|
},
|
|
|
- handleSelectionChange (val) {
|
|
|
+ handleSelectionChange(val) {
|
|
|
this.activeList = val;
|
|
|
- let arr = val.map(item => {
|
|
|
- return item.classGroupId
|
|
|
- })
|
|
|
- this.activeClass = arr.join(',')
|
|
|
+ let arr = val.map((item) => {
|
|
|
+ return item.classGroupId;
|
|
|
+ });
|
|
|
+ this.activeClass = arr.join(",");
|
|
|
},
|
|
|
- submitInfo () {
|
|
|
- this.$refs['postponeForm'].validate(res => {
|
|
|
+ submitInfo() {
|
|
|
+ this.$refs["postponeForm"].validate((res) => {
|
|
|
if (res) {
|
|
|
let classGroupIds = this.activeClass;
|
|
|
let pauseDate = this.postponeForm.stopTime;
|
|
@@ -236,42 +258,50 @@ export default {
|
|
|
classGroupIds,
|
|
|
pauseDate,
|
|
|
recoveryDate,
|
|
|
- skipHoliday
|
|
|
- }
|
|
|
- coursePostpone(obj).then(res => {
|
|
|
+ skipHoliday,
|
|
|
+ };
|
|
|
+ coursePostpone(obj).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
- this.$message.success('修改成功')
|
|
|
+ this.$message.success("修改成功");
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
}
|
|
|
- })
|
|
|
-
|
|
|
+ });
|
|
|
},
|
|
|
- processDate () {//提出结束时间必须大于提出开始时间
|
|
|
- let self = this
|
|
|
+ processDate() {
|
|
|
+ //提出结束时间必须大于提出开始时间
|
|
|
+ let self = this;
|
|
|
return {
|
|
|
firstDayOfWeek: 1,
|
|
|
- disabledDate (time) {
|
|
|
+ disabledDate(time) {
|
|
|
if (self.postponeForm.stopTime) {
|
|
|
- return new Date(self.postponeForm.stopTime).getTime() > time.getTime()
|
|
|
+ return (
|
|
|
+ new Date(self.postponeForm.stopTime).getTime() > time.getTime()
|
|
|
+ );
|
|
|
} else {
|
|
|
- return time.getTime() > Date.now()
|
|
|
+ return time.getTime() > Date.now();
|
|
|
//开始时间不选时,结束时间最大值小于等于当天
|
|
|
}
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ };
|
|
|
},
|
|
|
- beginDate () {
|
|
|
- let self = this
|
|
|
+ beginDate() {
|
|
|
+ let self = this;
|
|
|
return {
|
|
|
firstDayOfWeek: 1,
|
|
|
- disabledDate (time) {
|
|
|
- return time.getTime() + 86400000 <= new Date().getTime()//开始时间不选时,结束时间最大值小于等于当天
|
|
|
- }
|
|
|
- }
|
|
|
+ disabledDate(time) {
|
|
|
+ return time.getTime() + 86400000 <= new Date().getTime(); //开始时间不选时,结束时间最大值小于等于当天
|
|
|
+ },
|
|
|
+ };
|
|
|
+ },
|
|
|
+ gotoClassList(search) {
|
|
|
+ this.$router.push({
|
|
|
+ name: "teamCLassList",
|
|
|
+ params: { search: search },
|
|
|
+ });
|
|
|
},
|
|
|
- }
|
|
|
-}
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|
|
|
<style lang="scss" scope>
|
|
|
</style>
|