fix: bug#16351

This commit is contained in:
XieYongHong 2023-07-15 16:21:29 +08:00
parent 291b65ba19
commit 0e83e706fa
1 changed files with 18 additions and 6 deletions

View File

@ -284,18 +284,24 @@
.configuration
.port
"
:options="
portOptionsIndex[
index
]
"
placeholder="请选择本地端口"
allowClear
show-search
:filter-option="
filterPortOption
"
/>
>
<j-select-option
v-for="i in getPortList( portOptionsIndex[
index
], cluster
.configuration
.port)"
:value="i.value"
>
{{ i.label }}
</j-select-option>
</j-select>
</j-form-item>
</j-col>
<j-col
@ -1190,6 +1196,12 @@ const filterPortOption = (input: string, option: any) => {
return JSON.stringify(option.label).indexOf(input) >= 0;
};
const getPortList = (list: any[], id: string) => {
const keys = dynamicValidateForm?.cluster?.map?.(item => item.configuration?.port) || []
console.log(dynamicValidateForm?.cluster, id, keys)
return (list || []).filter(item => item.value === id || !keys.includes(item.value) )
}
const filterConfigByType = (data: any[], type: string) => {
let _temp = type;
if (TCPList.includes(type)) {