所属部门自动搜索
This commit is contained in:
parent
bd036feee2
commit
44da94a71e
|
@ -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">
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue