Commit 87014c48 authored by 黄奎's avatar 黄奎

11

parent def4ebc0
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
<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 v-model="msg.TeacherId" style="width: 100%" placeholder="教师" size="small" @change="getPlanList()"
filterable clearable @clear="getPlanList()">
<el-option v-for="item in TeacherList" :key="item.TeacherName" :label="item.TeacherName" :value="item.TId"> <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">
...@@ -11,7 +12,8 @@ ...@@ -11,7 +12,8 @@
</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 v-model="msg.ClassRoomId" style="width: 100%" placeholder="教室" size="small" @change="getTypeWay()"
filterable clearable @clear="getPlanList()">
<el-option v-for="item in ClassRoomList" :key="item.RoomName" :label="item.RoomName" :value="item.RoomId"> <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">
...@@ -255,6 +257,7 @@ ...@@ -255,6 +257,7 @@
}, },
}, },
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
.xg .el-input--prefix .el-input__inner { .xg .el-input--prefix .el-input__inner {
...@@ -264,4 +267,5 @@ ...@@ -264,4 +267,5 @@
.yuyuezhuangtai .el-input--prefix .el-input__inner { .yuyuezhuangtai .el-input--prefix .el-input__inner {
padding-left: 60px; padding-left: 60px;
} }
</style>
\ No newline at end of file </style>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<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"> <div class="col-2">
<el-select v-model="msg.TeacherId" style="width: 100%" placeholder="教师" size="small" @change="getTypeWay()"> <el-select v-model="msg.TeacherId" style="width: 100%" placeholder="教师" size="small" @change="getTypeWay()" filterable clearable @clear="getTypeWay()">
<el-option v-for="item in TeacherList" :key="item.TeacherName" :label="item.TeacherName" :value="item.TId"> <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">
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
</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 v-model="msg.ClassRoomId" style="width: 100%" placeholder="教室" size="small" @change="getTypeWay()" filterable clearable @clear="getTypeWay()">
<el-option v-for="item in ClassRoomList" :key="item.RoomName" :label="item.RoomName" :value="item.RoomId"> <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">
......
...@@ -3,11 +3,13 @@ ...@@ -3,11 +3,13 @@
<div class="col row wrap q-mr-lg q-col-gutter-md searchBox"> <div class="col row wrap q-mr-lg q-col-gutter-md searchBox">
<div class="col-2"> <div class="col-2">
<q-select filled dense v-model="msg.TeacherId" option-value="TId" option-label="TeacherName" <q-select filled dense v-model="msg.TeacherId" option-value="TId" option-label="TeacherName"
:options="TeacherList2" emit-value map-options label="老师" @input="getData" /> :options="TeacherList2" emit-value map-options label="老师" @input="getData" @filter="filterTeacherFn" use-input
clearable />
</div> </div>
<div class="col-2"> <div class="col-2">
<q-select filled dense v-model="msg.ClassRoomId" option-value="RoomId" option-label="RoomName" <q-select filled dense v-model="msg.ClassRoomId" option-value="RoomId" option-label="RoomName"
:options="classroomList" emit-value map-options label="教室" @input="getData" /> :options="classroomList" emit-value map-options label="教室" @input="getData" @filter="filterRoomFn" use-input
clearable />
</div> </div>
<div class="col-2"> <div class="col-2">
...@@ -158,6 +160,7 @@ ...@@ -158,6 +160,7 @@
AppointState: 0 AppointState: 0
}, },
classroomList: [], classroomList: [],
AllRoomList: [],
ClassTypeList: [{ ClassTypeList: [{
label: "全部", label: "全部",
Id: 0 Id: 0
...@@ -190,6 +193,7 @@ ...@@ -190,6 +193,7 @@
], ],
TeacherList2: [], TeacherList2: [],
AllTeacherList: [],
dateObj: {}, dateObj: {},
saveObj: {}, saveObj: {},
auth: { auth: {
...@@ -239,6 +243,29 @@ ...@@ -239,6 +243,29 @@
} }
}, },
methods: { methods: {
//筛选老师
filterTeacherFn(val, update) {
update(() => {
if (val === "") {
this.TeacherList2 = JSON.parse(JSON.stringify(this.AllTeacherList));
} else {
this.TeacherList2 = this.AllTeacherList.filter(
(v) => v.TeacherName.indexOf(val) > -1
);
}
});
},
filterRoomFn(val, update) {
update(() => {
if (val === "") {
this.AllRoomList = JSON.parse(JSON.stringify(this.AllRoomList));
} else {
this.AllRoomList = this.AllRoomList.filter(
(v) => v.RoomName.indexOf(val) > -1
);
}
});
},
//关闭配置弹窗 //关闭配置弹窗
closeStuConfig() { closeStuConfig() {
this.isShowStuConfig = false; this.isShowStuConfig = false;
...@@ -348,6 +375,7 @@ ...@@ -348,6 +375,7 @@
}).then(res => { }).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.TeacherList2 = JSON.parse(JSON.stringify(res.Data)); this.TeacherList2 = JSON.parse(JSON.stringify(res.Data));
this.AllTeacherList = JSON.parse(JSON.stringify(res.Data));
this.TeacherList2.unshift({ this.TeacherList2.unshift({
TeacherName: "请选择", TeacherName: "请选择",
TId: 0 TId: 0
...@@ -359,6 +387,7 @@ ...@@ -359,6 +387,7 @@
queryClassRoomList({}).then(res => { queryClassRoomList({}).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.classroomList = res.Data; this.classroomList = res.Data;
this.AllRoomList = res.Data;
var obj = { var obj = {
RoomName: "不限", RoomName: "不限",
RoomId: 0 RoomId: 0
......
...@@ -3,11 +3,13 @@ ...@@ -3,11 +3,13 @@
<div class="col row wrap q-mr-lg q-col-gutter-md searchBox"> <div class="col row wrap q-mr-lg q-col-gutter-md searchBox">
<div class="col-2"> <div class="col-2">
<q-select filled dense v-model="msg.TeacherId" option-value="TId" option-label="TeacherName" <q-select filled dense v-model="msg.TeacherId" option-value="TId" option-label="TeacherName"
:options="TeacherList" emit-value map-options label="老师" @input="getData" /> :options="TeacherList" emit-value map-options label="老师" @input="getData" @filter="filterTeacherFn" use-input
clearable />
</div> </div>
<div class="col-2"> <div class="col-2">
<q-select filled dense v-model="msg.ClassRoomId" option-value="RoomId" option-label="RoomName" <q-select filled dense v-model="msg.ClassRoomId" option-value="RoomId" option-label="RoomName"
:options="classroomList" emit-value map-options label="教室" @input="getData" /> :options="classroomList" emit-value map-options label="教室" @input="getData" @filter="filterRoomFn" use-input
clearable />
</div> </div>
<div class="col-2"> <div class="col-2">
<q-select filled dense v-model="msg.ClassType" option-value="Id" option-label="label" :options="ClassTypeList" <q-select filled dense v-model="msg.ClassType" option-value="Id" option-label="label" :options="ClassTypeList"
...@@ -310,7 +312,9 @@ ...@@ -310,7 +312,9 @@
AppointState: 0 AppointState: 0
}, },
TeacherList: [], TeacherList: [],
AllTeacherList: [],
classroomList: [], classroomList: [],
AllRoomList: [],
ClassTypeList: [{ ClassTypeList: [{
label: "全部", label: "全部",
Id: 0 Id: 0
...@@ -428,6 +432,29 @@ ...@@ -428,6 +432,29 @@
} }
}, },
methods: { methods: {
//筛选老师
filterTeacherFn(val, update) {
update(() => {
if (val === "") {
this.TeacherList = JSON.parse(JSON.stringify(this.AllTeacherList));
} else {
this.TeacherList = this.AllTeacherList.filter(
(v) => v.TeacherName.indexOf(val) > -1
);
}
});
},
filterRoomFn(val, update) {
update(() => {
if (val === "") {
this.AllRoomList = JSON.parse(JSON.stringify(this.AllRoomList));
} else {
this.AllRoomList = this.AllRoomList.filter(
(v) => v.RoomName.indexOf(val) > -1
);
}
});
},
badgeClasses(event, type, TeacherId) { badgeClasses(event, type, TeacherId) {
const bg = this.getColor(TeacherId); const bg = this.getColor(TeacherId);
...@@ -502,6 +529,7 @@ ...@@ -502,6 +529,7 @@
}).then(res => { }).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.TeacherList = JSON.parse(JSON.stringify(res.Data)); this.TeacherList = JSON.parse(JSON.stringify(res.Data));
this.AllTeacherList = JSON.parse(JSON.stringify(res.Data));
var obj = { var obj = {
TeacherName: "不限", TeacherName: "不限",
TId: 0 TId: 0
...@@ -523,6 +551,7 @@ ...@@ -523,6 +551,7 @@
queryClassRoomList({}).then(res => { queryClassRoomList({}).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.classroomList = res.Data; this.classroomList = res.Data;
this.AllRoomList = res.Data;
var obj = { var obj = {
RoomName: "不限", RoomName: "不限",
RoomId: 0 RoomId: 0
......
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