Commit 754ce335 authored by 罗超's avatar 罗超

1

parent 820790b2
...@@ -2,243 +2,328 @@ ...@@ -2,243 +2,328 @@
<div class="page-body MainPlan xg"> <div class="page-body MainPlan xg">
<div class="col row wrap q-col-gutter-md"> <div class="col row wrap q-col-gutter-md">
<div class="col-2 flex"> <div class="col-2 flex">
<el-select v-model="msg.TeacherId" style="width:100%;" placeholder="教师" size="small" @change="getPlanList()"> <el-select
<el-option v-for="item in TeacherList" :key="item.TeacherName" :label="item.TeacherName" :value="item.TId"> v-model="msg.TeacherId"
style="width: 100%"
placeholder="教师"
size="small"
@change="getPlanList()"
>
<el-option
v-for="item in TeacherList"
:key="item.TeacherName"
:label="item.TeacherName"
:value="item.TId"
>
</el-option> </el-option>
<div slot="prefix" class="full-height flex items-center" style="color:#000;padding-right:10px"> <div
slot="prefix"
class="full-height flex items-center"
style="color: #000; padding-right: 10px"
>
教师: 教师:
</div> </div>
</el-select> </el-select>
</div> </div>
<div class="col-2"> <div class="col-2">
<el-select v-model="msg.ClassRoomId" style="width:100%;" placeholder="教室" size="small" @change="getTypeWay()"> <el-select
<el-option v-for="item in ClassRoomList" :key="item.RoomName" :label="item.RoomName" :value="item.RoomId"> v-model="msg.ClassRoomId"
style="width: 100%"
placeholder="教室"
size="small"
@change="getTypeWay()"
>
<el-option
v-for="item in ClassRoomList"
:key="item.RoomName"
:label="item.RoomName"
:value="item.RoomId"
>
</el-option> </el-option>
<div slot="prefix" class="full-height flex items-center" style="color:#000;padding-right:10px"> <div
slot="prefix"
class="full-height flex items-center"
style="color: #000; padding-right: 10px"
>
教室: 教室:
</div> </div>
</el-select> </el-select>
</div> </div>
<div class="col-2" style="width:13%"> <div class="col-2" style="width: 13%">
<el-date-picker v-model="msg.StartTime" type="date" value-format="yyyy-MM-dd" placeholder="开始日期" size="small" <el-date-picker
style="width:100%;" @change="getTypeWay()" :picker-options="picker" :clearable="false"> v-model="msg.StartTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="开始日期"
size="small"
style="width: 100%"
@change="getTypeWay()"
:picker-options="picker"
:clearable="false"
>
</el-date-picker> </el-date-picker>
</div> </div>
<div class="col-2" style="width:13%"> <div class="col-2" style="width: 13%">
<el-date-picker v-model="msg.EndTime" type="date" value-format="yyyy-MM-dd" placeholder="结束日期" size="small" <el-date-picker
style="width:100%;" @change="getTypeWay()" clear-icon="iconfont icon-guanbi" :picker-options="pickerEnd"> v-model="msg.EndTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="结束日期"
size="small"
style="width: 100%"
@change="getTypeWay()"
clear-icon="iconfont icon-guanbi"
:picker-options="pickerEnd"
>
</el-date-picker> </el-date-picker>
</div> </div>
<div class="col-1" style="width:10%"> <div class="col-1" style="width: 10%">
<el-select v-model="msg.ClassType" style="width:100%;" placeholder="类型" size="small" @change="getTypeWay()"> <el-select
<el-option :key="0" label="全部" :value="0"> v-model="msg.ClassType"
</el-option> style="width: 100%"
<el-option :key="1" label="正常" :value="1"> placeholder="类型"
</el-option> size="small"
<el-option :key="2" label="试听课" :value="2"> @change="getTypeWay()"
</el-option> >
<div slot="prefix" class="full-height flex items-center" style="color:#000;padding-right:10px"> <el-option :key="0" label="全部" :value="0"> </el-option>
<el-option :key="1" label="正常" :value="1"> </el-option>
<el-option :key="2" label="试听课" :value="2"> </el-option>
<div
slot="prefix"
class="full-height flex items-center"
style="color: #000; padding-right: 10px"
>
状态: 状态:
</div> </div>
</el-select> </el-select>
</div> </div>
<div class="col-3" style="width:30%"> <div class="col-3" style="width: 30%">
<q-btn color="accent" size="sm" class="q-mr-md" style="margin-top:2px;" @click="exchangeType" <q-btn
:label="typeName" /> color="accent"
<q-btn color="accent" size="sm" class="q-mr-md" label="下载计划" @click="downLoadPlan()" /> size="sm"
<q-btn color="negative" size="sm" label="调课申请" @click="openForm"></q-btn> class="q-mr-md"
style="margin-top: 2px"
@click="exchangeType"
:label="typeName"
/>
<q-btn
color="accent"
size="sm"
class="q-mr-md"
label="下载计划"
@click="downLoadPlan()"
/>
<q-btn
color="negative"
size="sm"
label="调课申请"
@click="openForm"
></q-btn>
</div> </div>
</div> </div>
<classmateForm :dataList="dataList" v-if="commonType==1"></classmateForm> <classmateForm :dataList="dataList" v-if="commonType == 1"></classmateForm>
<change-class-form v-if="persistent" @close="closeSaveForm" @success="refreshPage"></change-class-form> <change-class-form
<teachTable v-if="commonType==2" :tableData="tableData" :PageCount="PageCount" :setMsg="tabMsg" :showCZ="false" v-if="persistent"
@getChange="getChange"></teachTable> @close="closeSaveForm"
@success="refreshPage"
></change-class-form>
<teachTable
v-if="commonType == 2"
:tableData="tableData"
:PageCount="PageCount"
:setMsg="tabMsg"
:showCZ="false"
@getChange="getChange"
></teachTable>
</div> </div>
</template> </template>
<script> <script>
import { import {
getTeacherDropDownList, getTeacherDropDownList,
queryClassRoomList queryClassRoomList,
} from '../../api/school/index' } from "../../api/school/index";
import { import {
GetClassPlanStatistical, GetClassPlanStatistical,
GetClassPlanStatisticalPage GetClassPlanStatisticalPage,
} from '../../api/teacher/index'; } from "../../api/teacher/index";
import { import { EduDownLoad } from "../../api/common/common";
EduDownLoad, import classmateForm from "../../components/course/classmate-form";
} from '../../api/common/common'; import teachTable from "../teacher/components/teachTable";
import classmateForm from '../../components/course/classmate-form'; import changeClassForm from "../../components/teacher/changeClassForm.vue";
import teachTable from '../teacher/components/teachTable';
import changeClassForm from '../../components/teacher/changeClassForm.vue'
export default { export default {
meta: { meta: {
title: "教师课表" title: "教师课表",
}, },
components: { components: {
classmateForm, classmateForm,
teachTable, teachTable,
changeClassForm changeClassForm,
}, },
data() { data() {
return { return {
persistent: false, persistent: false,
TeacherList: [], //教师团队 TeacherList: [], //教师团队
ClassRoomList: [], // ClassRoomList: [], //
StartTime: "",
EndTime: "",
TeacherId: 0,
ClassRoomId: 0,
dataList: {},
activeNames: [1],
msg: {
StartTime: "", StartTime: "",
EndTime: '', EndTime: "",
TeacherId: 0, TeacherId: 0,
ClassRoomId: 0, ClassRoomId: 0,
dataList: {}, ClassType: 0,
activeNames: [1], },
msg: { commonType: 1, //1日历模式 2列表模式
StartTime: "", typeName: "列表模式",
EndTime: '', tabMsg: {
TeacherId: 0, PageIndex: 1,
ClassRoomId: 0, PageSize: 12,
ClassType: 0, rowsPerPage: 12,
}, StartTime: "",
commonType: 1, //1日历模式 2列表模式 EndTime: "",
typeName: '列表模式', TeacherId: 0,
tabMsg: { ClassRoomId: 0,
PageIndex: 1, ClassType: 0,
PageSize: 12, },
rowsPerPage: 12, tableData: [], //表格数据
StartTime: '', PageCount: 0,
EndTime: '', picker: {
TeacherId: 0, disabledDate: (time) => {
ClassRoomId: 0, // let endTime=this.msg.EndTime
ClassType: 0 // if(endTime){
// return Date.now() - 8.64e7>time.getTime()>=new Date(endTime).getTime()- 8.64e7
// }else{
// return time.getTime() < Date.now() - 8.64e7
// }
}, },
tableData: [], //表格数据 },
PageCount: 0, pickerEnd: {
picker: { disabledDate: (time) => {
disabledDate: (time) => { let startTime = this.msg.StartTime;
// let endTime=this.msg.EndTime if (startTime) {
// if(endTime){ return time.getTime() <= new Date(startTime).getTime() - 8.64e7;
// return Date.now() - 8.64e7>time.getTime()>=new Date(endTime).getTime()- 8.64e7 } else {
// }else{ return time.getTime() < Date.now() - 8.64e7;
// return time.getTime() < Date.now() - 8.64e7
// }
} }
}, },
pickerEnd: { },
disabledDate: (time) => { };
let startTime = this.msg.StartTime },
if (startTime) { created() {
return time.getTime() <= new Date(startTime).getTime() - 8.64e7 if (this.$route.query && this.$route.query.ClassType) {
} else { this.msg.ClassType = this.$route.query.ClassType;
return time.getTime() < Date.now() - 8.64e7 }
} let date = new Date();
} let today =
date.getFullYear() +
"-" +
(date.getMonth() < 9
? "0" + (date.getMonth() + 1)
: date.getMonth() + 1) +
"-" +
(date.getDate() < 10 ? "0" + date.getDate() : date.getDate());
this.msg.StartTime = today;
this.tabMsg.StartTime = today;
this.getClassRoomList();
},
mounted() {
this.GetTeacherList();
this.getPlanList();
},
methods: {
downLoadPlan() {
//导出
var newMsg = JSON.parse(JSON.stringify(this.msg));
EduDownLoad("/Class/DownLoadClassPlan", newMsg, "老师上课计划.xls");
},
refreshPage() {
this.getPlanList();
},
openForm() {
this.persistent = true;
},
closeSaveForm() {
this.persistent = false;
},
// 获取校区教室导航列表
getPlanList() {
GetClassPlanStatistical(this.msg).then((res) => {
if (res.Code == 1) {
this.dataList = res.Data;
} }
}; });
}, },
created() { //获取教师下拉
if (this.$route.query && this.$route.query.ClassType) { GetTeacherList() {
this.msg.ClassType = this.$route.query.ClassType; getTeacherDropDownList({}).then((res) => {
} if (res.Code == 1) {
let date = new Date(); this.TeacherList = res.Data;
let today = date.getFullYear() + '-' + (date.getMonth() < 9 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + var obj = {
'-' + (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) TeacherName: "请选择",
this.msg.StartTime = today TId: 0,
this.tabMsg.StartTime = today };
this.getClassRoomList(); this.TeacherList.unshift(obj);
}
});
}, },
mounted() { //获取教室下拉
this.GetTeacherList(); getClassRoomList() {
this.getPlanList(); queryClassRoomList({}).then((res) => {
if (res.Code == 1) {
this.ClassRoomList = res.Data;
var obj = {
RoomName: "请选择",
RoomId: 0,
};
this.ClassRoomList.unshift(obj);
}
});
}, },
methods: { exchangeType() {
downLoadPlan() { //导出 if (this.commonType == 1) {
var newMsg = JSON.parse(JSON.stringify(this.msg)); this.commonType = 2;
EduDownLoad("/Class/DownLoadClassPlan", newMsg, "老师上课计划.xls") this.typeName = "日历模式";
}, this.getTableList();
refreshPage() { } else {
this.commonType = 1;
this.typeName = "列表模式";
this.getPlanList(); this.getPlanList();
}, }
openForm() { },
this.persistent = true getTableList() {
}, this.tabMsg.StartTime = this.msg.StartTime;
closeSaveForm() { this.tabMsg.EndTime = this.msg.EndTime;
this.persistent = false this.tabMsg.ClassRoomId = this.msg.ClassRoomId;
}, this.tabMsg.ClassType = this.msg.ClassType;
// 获取校区教室导航列表 GetClassPlanStatisticalPage(this.tabMsg).then((res) => {
getPlanList() { if (res.Code == 1) {
GetClassPlanStatistical(this.msg).then(res => { this.tableData = res.Data.PageData;
if (res.Code == 1) { this.PageCount = res.Data.PageCount;
this.dataList = res.Data;
}
})
},
//获取教师下拉
GetTeacherList() {
getTeacherDropDownList({}).then(res => {
if (res.Code == 1) {
this.TeacherList = res.Data;
var obj = {
TeacherName: '请选择',
TId: 0
}
this.TeacherList.unshift(obj);
}
})
},
//获取教室下拉
getClassRoomList() {
queryClassRoomList({}).then(res => {
if (res.Code == 1) {
this.ClassRoomList = res.Data;
var obj = {
RoomName: '请选择',
RoomId: 0
}
this.ClassRoomList.unshift(obj);
}
})
},
exchangeType() {
if (this.commonType == 1) {
this.commonType = 2
this.typeName = '日历模式'
this.getTableList()
} else {
this.commonType = 1;
this.typeName = '列表模式'
this.getPlanList()
}
},
getTableList() {
this.tabMsg.StartTime = this.msg.StartTime;
this.tabMsg.EndTime = this.msg.EndTime;
this.tabMsg.ClassRoomId = this.msg.ClassRoomId;
this.tabMsg.ClassType = this.msg.ClassType;
GetClassPlanStatisticalPage(this.tabMsg).then(res => {
if (res.Code == 1) {
this.tableData = res.Data.PageData;
this.PageCount = res.Data.PageCount;
}
})
},
getChange(val) {
this.tabMsg.PageIndex = val;
this.getTableList()
},
getTypeWay() {
if (this.commonType == 2) {
this.getTableList()
} else {
this.getPlanList()
} }
});
},
getChange(val) {
this.tabMsg.PageIndex = val;
this.getTableList();
},
getTypeWay() {
if (this.commonType == 2) {
this.getTableList();
} else {
this.getPlanList();
} }
} },
}; },
};
</script> </script>
<style lang="scss"> <style lang="scss">
.xg .el-input--prefix .el-input__inner { .xg .el-input--prefix .el-input__inner {
padding-left: 50px; padding-left: 50px;
} }
</style> </style>
<template> <template>
<div style="padding:20px 0"> <div style="padding: 20px 0">
<div class="page-content"> <div class="page-content">
<q-table :pagination="setMsg" no-data-label="暂无相关数据" flat class="sticky-column-table sticky-right-column-table" <q-table
separator="none" :data="tableData" :columns="showCZ?columns:columns2" row-key="name"> :pagination="setMsg"
no-data-label="暂无相关数据"
flat
class="sticky-column-table sticky-right-column-table"
separator="none"
:data="tableData"
:columns="showCZ ? columns : columns2"
row-key="name"
>
<template v-slot:body-cell-GuestList="props"> <template v-slot:body-cell-GuestList="props">
<q-td auto-width :props="props"> <q-td auto-width :props="props">
<span v-for="(item,index) in props.row.GuestList" style="margin-right:5px;"> <span
{{item.GuestName}} v-for="(item, index) in props.row.GuestList"
style="margin-right: 5px"
>
{{ item.GuestName }}
</span> </span>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-StartTime="props"> <template v-slot:body-cell-StartTime="props">
<q-td auto-width :props="props"> <q-td auto-width :props="props">
{{props.row.StartTime}}-{{props.row.EndTime}} {{ props.row.StartTime }}-{{ props.row.EndTime }}
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-TotalPlanNum="props"> <template v-slot:body-cell-TotalPlanNum="props">
<q-td> <q-td> {{ props.row.Ranks }}/{{ props.row.TotalPlanNum }} </q-td>
{{props.row.Ranks}}/{{props.row.TotalPlanNum}}
</q-td>
</template> </template>
<template v-slot:body-cell-optioned="props"> <template v-slot:body-cell-optioned="props">
<q-td> <q-td>
<q-btn flat size="xs" icon="iconfont icon-view" v-if="props.row.ClassType==1" color="accent" <q-btn
style="font-weight:400" label="课程回顾" @click="goCourseRecord(props.row)" /> flat
size="xs"
icon="iconfont icon-view"
v-if="props.row.ClassType == 1"
color="accent"
style="font-weight: 400"
label="课程回顾"
@click="goCourseRecord(props.row)"
/>
<q-btn
flat
size="xs"
icon="iconfont icon-view"
v-if="props.row.ClassType == 1"
color="accent"
style="font-weight: 400"
label="课程反馈"
@click="goFeedBack(props.row)"
/>
</q-td> </q-td>
</template> </template>
<template v-slot:bottom> <template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="PageIndex" color="primary" :max="PageCount" <q-pagination
:input="true" @input="changePage" /> class="full-width justify-end"
v-model="PageIndex"
color="primary"
:max="PageCount"
:input="true"
@input="changePage"
/>
</template> </template>
</q-table> </q-table>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
props: { props: {
setMsg: { setMsg: {
type: Object, type: Object,
default: null default: null,
}, },
tableData: { tableData: {
type: Array, type: Array,
default: null default: null,
},
PageCount: {
type: Number,
default: null
},
showCZ:{//是否显示操作栏
Type:Boolean,
default:true
}
}, },
meta: { PageCount: {
title: "我的课表" type: Number,
default: null,
}, },
components: { showCZ: {
//是否显示操作栏
Type: Boolean,
default: true,
}, },
data() { },
return { meta: {
columns: [{ title: "我的课表",
name: 'ClassDate', },
label: '日期', components: {},
field: 'ClassDate', data() {
align: 'left' return {
}, { columns: [
name: 'StartTime', {
label: '上课时间', name: "ClassDate",
field: 'StartTime', label: "日期",
align: 'left' field: "ClassDate",
}, { align: "left",
name: 'ClassName', },
label: '班级', {
field: 'ClassName', name: "StartTime",
align: 'left' label: "上课时间",
}, field: "StartTime",
{ align: "left",
name: 'CourseName', },
label: '课程名称', {
field: 'CourseName', name: "ClassName",
align: 'left', label: "班级",
}, field: "ClassName",
{ align: "left",
name: 'GuestList', },
label: '学员名称', {
field: 'GuestList', name: "CourseName",
align: 'left' label: "课程名称",
}, field: "CourseName",
{ align: "left",
name: 'TeacherName', },
label: '教师', {
field: 'TeacherName', name: "GuestList",
align: 'left' label: "学员名称",
}, field: "GuestList",
{ align: "left",
name: 'TotalPlanNum', },
label: '课程进度', {
field: 'TotalPlanNum', name: "TeacherName",
align: 'left' label: "教师",
}, field: "TeacherName",
{ align: "left",
name: 'optioned',
label: '操作',
field: 'Id'
}
],
columns2: [{
name: 'ClassDate',
label: '日期',
field: 'ClassDate',
align: 'left'
}, {
name: 'StartTime',
label: '上课时间',
field: 'StartTime',
align: 'left'
}, {
name: 'ClassName',
label: '班级',
field: 'ClassName',
align: 'left'
},
{
name: 'CourseName',
label: '课程名称',
field: 'CourseName',
align: 'left',
},
{
name: 'GuestList',
label: '学员名称',
field: 'GuestList',
align: 'left'
},
{
name: 'TeacherName',
label: '教师',
field: 'TeacherName',
align: 'left'
},
{
name: 'TotalPlanNum',
label: '课程进度',
field: 'TotalPlanNum',
align: 'left'
},
],
tabMsg: {
PageIndex: 1,
PageSize: 15,
rowsPerPage: 15,
StartTime: '',
EndTime: '',
TeacherId: 0,
ClassRoomId: 0,
ClassType: 0
}, },
PageIndex: 1 {
} name: "TotalPlanNum",
label: "课程进度",
field: "TotalPlanNum",
align: "left",
},
{
name: "optioned",
label: "操作",
field: "Id",
},
],
columns2: [
{
name: "ClassDate",
label: "日期",
field: "ClassDate",
align: "left",
},
{
name: "StartTime",
label: "上课时间",
field: "StartTime",
align: "left",
},
{
name: "ClassName",
label: "班级",
field: "ClassName",
align: "left",
},
{
name: "CourseName",
label: "课程名称",
field: "CourseName",
align: "left",
},
{
name: "GuestList",
label: "学员名称",
field: "GuestList",
align: "left",
},
{
name: "TeacherName",
label: "教师",
field: "TeacherName",
align: "left",
},
{
name: "TotalPlanNum",
label: "课程进度",
field: "TotalPlanNum",
align: "left",
},
],
tabMsg: {
PageIndex: 1,
PageSize: 15,
rowsPerPage: 15,
StartTime: "",
EndTime: "",
TeacherId: 0,
ClassRoomId: 0,
ClassType: 0,
},
PageIndex: 1,
};
},
created() {},
mounted() {},
methods: {
//翻页
changePage(val) {
this.PageIndex = val;
this.$emit("getChange", this.PageIndex);
}, },
created() { //跳转到课程回顾
goCourseRecord(item) {
this.OpenNewUrl("../../classroom/courseInfo", {
id: item.Id,
});
}, },
mounted() { //跳转到课程反馈
goFeedBack(item) {
this.OpenNewUrl("/teacher/feedBackList", {
id: item.Id,
});
}, },
methods: { },
//翻页 };
changePage(val) {
this.PageIndex = val;
this.$emit('getChange', this.PageIndex);
},
//跳转到课程回顾
goCourseRecord(item) {
this.OpenNewUrl("../../classroom/courseInfo", {
id: item.Id
});
}
}
}
</script> </script>
<style lang="sass"> <style lang="sass">
@import url('~assets/css/table.sass') @import url('~assets/css/table.sass')
</style> </style>
<template> <template>
<div class="page-body MainPlan"> <div class="page-body MainPlan xg">
<div class="col row wrap q-col-gutter-md"> <div class="col row wrap q-col-gutter-md">
<div class="col-2"> <div class="col-2">
<el-select v-model="msg.ClassRoomId" style="width:100%;" placeholder="教室" size="small" @change="getTypeWay()"> <el-select
<el-option v-for="item in ClassRoomList" :key="item.RoomName" :label="item.RoomName" :value="item.RoomId"> v-model="msg.ClassRoomId"
style="width: 100%"
placeholder="教室"
size="small"
@change="getTypeWay()"
>
<el-option
v-for="item in ClassRoomList"
:key="item.RoomName"
:label="item.RoomName"
:value="item.RoomId"
>
</el-option> </el-option>
<div
slot="prefix"
class="full-height flex items-center"
style="color: #000; padding-right: 10px"
>
教室:
</div>
</el-select> </el-select>
</div> </div>
<div class="col-2"> <div class="col-2">
<el-date-picker v-model="msg.StartTime" type="date" value-format="yyyy-MM-dd" placeholder="开始日期" size="small" <el-date-picker
style="width:100%;" @change="getTypeWay()" clear-icon="iconfont icon-guanbi"> v-model="msg.StartTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="开始日期"
size="small"
style="width: 100%"
@change="getTypeWay()"
clear-icon="iconfont icon-guanbi"
>
</el-date-picker> </el-date-picker>
</div> </div>
<div class="col-2"> <div class="col-2">
<el-date-picker v-model="msg.EndTime" type="date" value-format="yyyy-MM-dd" placeholder="结束日期" size="small" <el-date-picker
style="width:100%;" @change="getTypeWay()" clear-icon="iconfont icon-guanbi"> v-model="msg.EndTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="结束日期"
size="small"
style="width: 100%"
@change="getTypeWay()"
clear-icon="iconfont icon-guanbi"
>
</el-date-picker> </el-date-picker>
</div> </div>
<div class="col-2"> <div class="col-2">
<el-select v-model="msg.ClassType" style="width:100%;" placeholder="类型" size="small" @change="getTypeWay()"> <el-select
<el-option :key="0" label="全部" :value="0"> v-model="msg.ClassType"
</el-option> style="width: 100%"
<el-option :key="1" label="正常" :value="1"> placeholder="类型"
</el-option> size="small"
<el-option :key="2" label="试听课" :value="2"> @change="getTypeWay()"
</el-option> >
<el-option :key="0" label="全部" :value="0"> </el-option>
<el-option :key="1" label="正常" :value="1"> </el-option>
<el-option :key="2" label="试听课" :value="2"> </el-option>
<div
slot="prefix"
class="full-height flex items-center"
style="color: #000; padding-right: 10px"
>
状态:
</div>
</el-select>
</div>
<div class="col-2">
<el-select
v-model="msg.FeedBackStatus"
style="width: 100%"
placeholder="反馈"
size="small"
@change="getTypeWay()"
>
<el-option :key="-1" label="不限" :value="-1"> </el-option>
<el-option :key="0" label="未反馈" :value="0"> </el-option>
<el-option :key="1" label="部分" :value="1"> </el-option>
<el-option :key="2" label="已反馈" :value="2"> </el-option>
<div
slot="prefix"
class="full-height flex items-center"
style="color: #000; padding-right: 10px"
>
反馈:
</div>
</el-select> </el-select>
</div> </div>
<div class="col-4"> <div class="col-2">
<q-btn color="accent" size="sm" class="q-mr-md" style="margin-top:2px;" @click="exchangeType" :label="typeName" /> <q-btn
<q-btn color="negative" size="sm" label="调课申请" @click="openForm"></q-btn> color="accent"
size="sm"
class="q-mr-md"
style="margin-top: 2px"
@click="exchangeType"
:label="typeName"
/>
<q-btn
color="negative"
size="sm"
label="调课申请"
@click="openForm"
></q-btn>
</div> </div>
</div> </div>
<classmateForm :dataList="dataList" v-if="commonType==1"></classmateForm> <classmateForm :dataList="dataList" v-if="commonType == 1"></classmateForm>
<change-class-form v-if="persistent" @close="closeSaveForm" @success="refreshPage"></change-class-form> <change-class-form
<teachTable v-if="commonType==2" :tableData="tableData" :PageCount="PageCount" :setMsg="tabMsg" @getChange="getChange"></teachTable> v-if="persistent"
@close="closeSaveForm"
@success="refreshPage"
></change-class-form>
<teachTable
v-if="commonType == 2"
:tableData="tableData"
:PageCount="PageCount"
:setMsg="tabMsg"
@getChange="getChange"
></teachTable>
</div> </div>
</template> </template>
<script> <script>
import { import {
getTeacherDropDownList, getTeacherDropDownList,
queryClassRoomList queryClassRoomList,
} from '../../api/school/index' } from "../../api/school/index";
import { import {
GetClassPlanStatistical, GetClassPlanStatistical,
GetClassPlanStatisticalPage GetClassPlanStatisticalPage,
} from '../../api/teacher/index'; } from "../../api/teacher/index";
import classmateForm from '../teacher/components/classmate-form'; import classmateForm from "../teacher/components/classmate-form";
import teachTable from '../teacher/components/teachTable'; import teachTable from "../teacher/components/teachTable";
import changeClassForm from '../../components/teacher/changeClassForm.vue' import changeClassForm from "../../components/teacher/changeClassForm.vue";
export default { export default {
meta: { meta: {
title: "我的课表" title: "我的课表",
}, },
components: { components: {
classmateForm, classmateForm,
teachTable, teachTable,
changeClassForm changeClassForm,
}, },
data() { data() {
return { return {
persistent:false, persistent: false,
TeacherList: [], //教师团队 TeacherList: [], //教师团队
ClassRoomList: [], // ClassRoomList: [], //
StartTime: "",
EndTime: "",
TeacherId: 0,
ClassRoomId: 0,
dataList: {},
activeNames: [1],
msg: {
StartTime: "", StartTime: "",
EndTime: '', EndTime: "",
TeacherId: 0, TeacherId: 0,
ClassRoomId: 0, ClassRoomId: 0,
dataList: {}, ClassType: 0,
activeNames: [1], FeedBackStatus: 0, //反馈状态 0-未反馈,1-部分,2-已反馈
msg: { },
StartTime: "", commonType: 1, //1日历模式 2列表模式
EndTime: '', typeName: "列表模式",
TeacherId: 0, tabMsg: {
ClassRoomId: 0, PageIndex: 1,
ClassType: 0, PageSize: 12,
}, rowsPerPage: 12,
commonType:1, //1日历模式 2列表模式 StartTime: "",
typeName:'列表模式', EndTime: "",
tabMsg:{ TeacherId: 0,
PageIndex:1, ClassRoomId: 0,
PageSize:12, ClassType: 0,
rowsPerPage: 12, },
StartTime:'', tableData: [], //表格数据
EndTime:'', PageCount: 0,
TeacherId:0, };
ClassRoomId:0, },
ClassType:0 created() {
}, if (this.$route.query && this.$route.query.ClassType) {
tableData:[], //表格数据 this.msg.ClassType = this.$route.query.ClassType;
PageCount:0 }
}; let userinfo = this.getLocalStorage();
}, this.msg.TeacherId = userinfo.AccountId;
created() { this.tabMsg.TeacherId = userinfo.AccountId;
if (this.$route.query && this.$route.query.ClassType) {
this.msg.ClassType = this.$route.query.ClassType;
}
let userinfo = this.getLocalStorage();
this.msg.TeacherId = userinfo.AccountId;
this.tabMsg.TeacherId = userinfo.AccountId;
this.getClassRoomList(); this.getClassRoomList();
}, },
mounted() { mounted() {
this.getPlanList();
},
methods: {
refreshPage() {
this.getPlanList(); this.getPlanList();
}, },
methods: { openForm() {
refreshPage(){ this.persistent = true;
this.getPlanList(); },
}, closeSaveForm() {
openForm() { this.persistent = false;
this.persistent = true },
}, // 获取校区教室导航列表
closeSaveForm() { getPlanList() {
this.persistent = false GetClassPlanStatistical(this.msg)
}, .then((res) => {
// 获取校区教室导航列表
getPlanList() {
GetClassPlanStatistical(this.msg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.dataList = res.Data; this.dataList = res.Data;
} }
}).catch(() => {
})
},
//获取教室下拉
getClassRoomList() {
queryClassRoomList({}).then(res => {
if (res.Code == 1) {
this.ClassRoomList = res.Data;
var obj = {
RoomName: '请选择',
RoomId: 0
}
this.ClassRoomList.unshift(obj);
}
}) })
}, .catch(() => {});
exchangeType(){ },
if(this.commonType==1){ //获取教室下拉
this.commonType=2 getClassRoomList() {
this.typeName='日历模式' queryClassRoomList({}).then((res) => {
this.getTableList() if (res.Code == 1) {
}else{ this.ClassRoomList = res.Data;
this.commonType=1; var obj = {
this.typeName='列表模式' RoomName: "请选择",
this.getPlanList() RoomId: 0,
};
this.ClassRoomList.unshift(obj);
} }
}, });
getTableList(){ },
this.tabMsg.StartTime = this.msg.StartTime; exchangeType() {
this.tabMsg.EndTime = this.msg.EndTime; if (this.commonType == 1) {
this.tabMsg.ClassRoomId = this.msg.ClassRoomId; this.commonType = 2;
this.tabMsg.ClassType = this.msg.ClassType; this.typeName = "日历模式";
GetClassPlanStatisticalPage(this.tabMsg).then(res => { this.getTableList();
if (res.Code == 1) { } else {
this.tableData = res.Data.PageData; this.commonType = 1;
this.PageCount = res.Data.PageCount; this.typeName = "列表模式";
} this.getPlanList();
}) }
}, },
getChange(val) { getTableList() {
this.tabMsg.PageIndex = val; this.tabMsg.StartTime = this.msg.StartTime;
this.getTableList() this.tabMsg.EndTime = this.msg.EndTime;
}, this.tabMsg.ClassRoomId = this.msg.ClassRoomId;
getTypeWay(){ this.tabMsg.ClassType = this.msg.ClassType;
if(this.commonType==2){ GetClassPlanStatisticalPage(this.tabMsg).then((res) => {
this.getTableList() if (res.Code == 1) {
}else{ this.tableData = res.Data.PageData;
this.getPlanList() this.PageCount = res.Data.PageCount;
} }
});
},
getChange(val) {
this.tabMsg.PageIndex = val;
this.getTableList();
},
getTypeWay() {
if (this.commonType == 2) {
this.getTableList();
} else {
this.getPlanList();
} }
} },
}; },
};
</script> </script>
<style lang="scss">
.xg .el-input--prefix .el-input__inner {
padding-left: 50px;
}
</style>
...@@ -1047,6 +1047,11 @@ const routes = [{ ...@@ -1047,6 +1047,11 @@ const routes = [{
component: () => component: () =>
import("pages/classroom/courseInfo") import("pages/classroom/courseInfo")
}, },
{
path: "/teacher/feedBackList", //教室本次上课反馈
component: () =>
import("pages/teacher/feedBackList")
},
{ {
path: "/teacher/myClass", //我的班级 path: "/teacher/myClass", //我的班级
component: () => component: () =>
...@@ -1259,8 +1264,8 @@ const routes = [{ ...@@ -1259,8 +1264,8 @@ const routes = [{
component: () => component: () =>
import("pages/enterprise/customer/customerSetup") import("pages/enterprise/customer/customerSetup")
}, },
], ],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment