所属部门自动搜索

This commit is contained in:
unknown 2022-10-21 16:35:26 +08:00
parent bd036feee2
commit 44da94a71e
2 changed files with 11 additions and 5 deletions

View File

@ -126,7 +126,13 @@
title="已申请摄像头列表"
@ok="videoVisible = false"
>
<a-select placeholder="请选择归属部门" v-model:value="deptName" :getPopupContainer="(triggerNode) => triggerNode.parentNode" show-search option-filter-prop="children" :filterOption="filterOption" @change="deptIdChangeFunction">
<a-select placeholder="请选择归属部门"
style="width: 200px"
v-model:value="deptName"
:getPopupContainer="(triggerNode) => triggerNode.parentNode"
show-search
:filterOption="true"
@change="deptIdChangeFunction">
<a-select-option v-for="(item, index) in deptNameAll" :key="`${index}-${item}`" :value="item.name">
{{ item.name }}
</a-select-option>
@ -204,6 +210,7 @@
const showItem = (id, type, delFlag, note1) => {
if (type == '基础设施') {
let arr = JSON.parse(note1);
//console.log('arrarr====',arr);
xVideoList.value = []
arr.map((val) => {
xVideoList.value.push({
@ -244,10 +251,6 @@
})
}
getDeptAllData();
//select
const filterOption = (input, option) => {
return option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
</script>
<style scoped lang="less">

View File

@ -88,6 +88,9 @@
v-else
placeholder="请选择归属部门"
v-model:value="formName.unit"
:getPopupContainer="(triggerNode) => triggerNode.parentNode"
show-search
:filterOption="true"
@change="deptIdChangeFunction"
>
<a-select-option