Commit 2d4fb604 authored by 吴春's avatar 吴春

修改查询条件

parent d6510faf
......@@ -3,10 +3,29 @@
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-input @input="resetSearch" clearable standout="bg-primary text-white" class="col-6 q-pr-lg q-pr-lg"
v-model="msg.Title" label="问题名称" maxlength="20" @clear="resetSearch" />
<q-select
filled
v-model="msg.TeacherId"
use-input
:dense="false"
ref="Teacher_Id"
label="选择评价的老师"
option-value="TId" option-label="TeacherName"
:options="TeacherList"
@filter="filterFnTeacher"
@input="refreshPage()"
class="col-6 q-pb-lg"
emit-value map-options >
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
No results
</q-item-section>
</q-item>
</template>
</q-select>
</div>
<div class="col-3">
<!-- <div class="col-3">
<q-select filled stack-label class="col-6 q-pr-lg" option-value="Id" option-label="Name"
v-model="msg.TeacherId" :options="SurveyTypeEnumList" emit-value map-options label="问题类型"
@input="refreshPage()" />
......@@ -15,7 +34,7 @@
<q-select filled stack-label class="col-6 q-pr-lg" option-value="Id" option-label="Name"
v-model="msg.StudentId" :options="ShowList" emit-value map-options label="是否显示"
@input="refreshPage()" />
</div>
</div> -->
</div>
</div>
......@@ -50,6 +69,9 @@
deleteSurvey,
querySurveyTypeEnumList
} from '../../api/common/common'
import {
getTeacherListByGroupId
} from '../../api/school/index'
import areaForm from '../../components/system/surveyStudentList-form'
export default {
meta: {
......@@ -87,6 +109,8 @@
}
],
data: [],
TeacherList: [], //关联教师下拉数据
AllTeacherList: [], //关联教师下拉数据
loading: true,
msg: {
pageIndex: 1,
......@@ -104,10 +128,37 @@
},
mounted() {
this.currentUrl = this.$route.path
this.GetTeacherList();
this.getSurveypage();
},
methods: {
//获取教师下拉
GetTeacherList() {
getTeacherListByGroupId(this.msg).then(res => {
if (res.Code == 1) {
this.TeacherList = res.Data;
var obj = {
TeacherName: '请选择',
TId: -1
}
this.TeacherList.unshift(obj);
this.AllTeacherList=this.TeacherList;
}
})
},
filterFnTeacher (val, update) {
update(() => {
if (val === "") {
this.TeacherList = JSON.parse(JSON.stringify(this.AllTeacherList));
} else {
const needle = val.toLowerCase();
this.TeacherList = this.AllTeacherList.filter(
(v) => v.TeacherName.toLowerCase().indexOf(needle) > -1
);
}
});
},
//刷新页面
refreshPage() {
this.isShowAreaForm = false;
......
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