Commit 81c00f35 authored by zhengke's avatar zhengke

修改下撒搜索

parent 66336f7c
......@@ -184,7 +184,14 @@
</q-select>
<q-select class="col-6 q-pb" v-if="aItem.AuditType==4" clearable filled stack-label use-input
option-value="PostId" option-label="PostName" v-model="aItem.PostType" :options="PostList" label="选择角色"
:dense="false" emit-value map-options @input="changeType(aItem)">
:dense="false" emit-value map-options @filter="filterPost" @input="changeType(aItem)">
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
未找到相关数据
</q-item-section>
</q-item>
</template>
</q-select>
</div>
<q-toggle
......@@ -264,6 +271,7 @@
AllemployeeList: [], //所有员工列表
EmployeeList: [], //员工列表
PostList: [], //系统角色列表
AllPostList: [],
//固定角色列表
roleList: [{
Name: '班级老师',
......@@ -313,7 +321,11 @@
queryPostList() {
getPostList({}).then(res => {
if (res.Code == 1) {
this.PostList = res.Data;
var jsonData = res.Data;
if (jsonData && jsonData.length > 0) {
this.AllPostList = JSON.parse(JSON.stringify(jsonData));
this.PostList = JSON.parse(JSON.stringify(jsonData));;
}
}
});
},
......@@ -405,6 +417,17 @@
}
})
},
//筛选角色
filterPost(val, update){
update(() => {
if (val === '') {
this.PostList = JSON.parse(JSON.stringify(this.AllPostList))
} else {
const needle = val.toLowerCase();
this.PostList = this.AllPostList.filter(v => v.PostName.toLowerCase().indexOf(needle) > -1);
}
})
},
//保存退课流程
setBackClassFlow() {
for (let i = 0; i < this.saveObj.FlowNodeList[this.NodeIndex].FlowAduitList.length; i++) {
......
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