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

11

parent def4ebc0
......@@ -2,7 +2,8 @@
<div class="page-body MainPlan xg">
<div class="col row wrap q-col-gutter-md">
<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>
<div slot="prefix" class="full-height flex items-center" style="color: #000; padding-right: 10px">
......@@ -11,7 +12,8 @@
</el-select>
</div>
<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>
<div slot="prefix" class="full-height flex items-center" style="color: #000; padding-right: 10px">
......@@ -255,6 +257,7 @@
},
},
};
</script>
<style lang="scss">
.xg .el-input--prefix .el-input__inner {
......@@ -264,4 +267,5 @@
.yuyuezhuangtai .el-input--prefix .el-input__inner {
padding-left: 60px;
}
</style>
......@@ -2,7 +2,7 @@
<div class="page-body MainPlan xg">
<div class="col row wrap q-col-gutter-md">
<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>
<div slot="prefix" class="full-height flex items-center" style="color: #000; padding-right: 10px">
......@@ -11,7 +11,7 @@
</el-select>
</div>
<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>
<div slot="prefix" class="full-height flex items-center" style="color: #000; padding-right: 10px">
......
......@@ -3,11 +3,13 @@
<div class="col row wrap q-mr-lg q-col-gutter-md searchBox">
<div class="col-2">
<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 class="col-2">
<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 class="col-2">
......@@ -158,6 +160,7 @@
AppointState: 0
},
classroomList: [],
AllRoomList: [],
ClassTypeList: [{
label: "全部",
Id: 0
......@@ -190,6 +193,7 @@
],
TeacherList2: [],
AllTeacherList: [],
dateObj: {},
saveObj: {},
auth: {
......@@ -239,6 +243,29 @@
}
},
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() {
this.isShowStuConfig = false;
......@@ -348,6 +375,7 @@
}).then(res => {
if (res.Code == 1) {
this.TeacherList2 = JSON.parse(JSON.stringify(res.Data));
this.AllTeacherList = JSON.parse(JSON.stringify(res.Data));
this.TeacherList2.unshift({
TeacherName: "请选择",
TId: 0
......@@ -359,6 +387,7 @@
queryClassRoomList({}).then(res => {
if (res.Code == 1) {
this.classroomList = res.Data;
this.AllRoomList = res.Data;
var obj = {
RoomName: "不限",
RoomId: 0
......
......@@ -3,11 +3,13 @@
<div class="col row wrap q-mr-lg q-col-gutter-md searchBox">
<div class="col-2">
<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 class="col-2">
<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 class="col-2">
<q-select filled dense v-model="msg.ClassType" option-value="Id" option-label="label" :options="ClassTypeList"
......@@ -310,7 +312,9 @@
AppointState: 0
},
TeacherList: [],
AllTeacherList: [],
classroomList: [],
AllRoomList: [],
ClassTypeList: [{
label: "全部",
Id: 0
......@@ -428,6 +432,29 @@
}
},
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) {
const bg = this.getColor(TeacherId);
......@@ -502,6 +529,7 @@
}).then(res => {
if (res.Code == 1) {
this.TeacherList = JSON.parse(JSON.stringify(res.Data));
this.AllTeacherList = JSON.parse(JSON.stringify(res.Data));
var obj = {
TeacherName: "不限",
TId: 0
......@@ -523,6 +551,7 @@
queryClassRoomList({}).then(res => {
if (res.Code == 1) {
this.classroomList = res.Data;
this.AllRoomList = res.Data;
var obj = {
RoomName: "不限",
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