Commit 885b10beb352f858bfb58c2b7568edd62b2e51d8
Merge branch 'fix/DEFECT-2250' into 'main_dev'
fix: 修复云端 模板和组态产品搜索输入数字结果没有进行筛选 See merge request yunteng/thingskit-front!1394
Showing
2 changed files
with
4 additions
and
8 deletions
@@ -6,6 +6,7 @@ import { useComponentRegister } from '/@/components/Form'; | @@ -6,6 +6,7 @@ import { useComponentRegister } from '/@/components/Form'; | ||
6 | import { OrgTreeSelect } from '../../common/OrgTreeSelect'; | 6 | import { OrgTreeSelect } from '../../common/OrgTreeSelect'; |
7 | import { getDeviceProfile } from '/@/api/alarm/position'; | 7 | import { getDeviceProfile } from '/@/api/alarm/position'; |
8 | import { buildUUID } from '/@/utils/uuid'; | 8 | import { buildUUID } from '/@/utils/uuid'; |
9 | +import { createPickerSearch } from '/@/utils/pickerSearch'; | ||
9 | 10 | ||
10 | useComponentRegister('OrgTreeSelect', OrgTreeSelect); | 11 | useComponentRegister('OrgTreeSelect', OrgTreeSelect); |
11 | export enum Platform { | 12 | export enum Platform { |
@@ -219,14 +220,7 @@ export const formSchema: FormSchema[] = [ | @@ -219,14 +220,7 @@ export const formSchema: FormSchema[] = [ | ||
219 | labelField: 'name', | 220 | labelField: 'name', |
220 | valueField: 'id', | 221 | valueField: 'id', |
221 | placeholder: '请选择产品', | 222 | placeholder: '请选择产品', |
222 | - getPopupContainer: (triggerNode) => triggerNode.parentNode, | ||
223 | - filterOption: (inputValue: string, option: Record<'label' | 'value', string>) => { | ||
224 | - let { label, value } = option; | ||
225 | - label = label.toLowerCase(); | ||
226 | - value = value.toLowerCase(); | ||
227 | - inputValue = inputValue.toLowerCase(); | ||
228 | - return label.includes(inputValue) || value.includes(inputValue); | ||
229 | - }, | 223 | + ...createPickerSearch(), |
230 | }, | 224 | }, |
231 | ifShow: ({ values }) => values['enableTemplate'] === 0, | 225 | ifShow: ({ values }) => values['enableTemplate'] === 0, |
232 | }, | 226 | }, |
@@ -6,6 +6,7 @@ import { useComponentRegister } from '/@/components/Form'; | @@ -6,6 +6,7 @@ import { useComponentRegister } from '/@/components/Form'; | ||
6 | import { OrgTreeSelect } from '../../common/OrgTreeSelect'; | 6 | import { OrgTreeSelect } from '../../common/OrgTreeSelect'; |
7 | import { getDeviceProfile } from '/@/api/alarm/position'; | 7 | import { getDeviceProfile } from '/@/api/alarm/position'; |
8 | import { Platform } from '../center/center.data'; | 8 | import { Platform } from '../center/center.data'; |
9 | +import { createPickerSearch } from '/@/utils/pickerSearch'; | ||
9 | 10 | ||
10 | useComponentRegister('OrgTreeSelect', OrgTreeSelect); | 11 | useComponentRegister('OrgTreeSelect', OrgTreeSelect); |
11 | 12 | ||
@@ -140,6 +141,7 @@ export const formSchema: FormSchema[] = [ | @@ -140,6 +141,7 @@ export const formSchema: FormSchema[] = [ | ||
140 | mode: 'multiple', | 141 | mode: 'multiple', |
141 | labelField: 'name', | 142 | labelField: 'name', |
142 | valueField: 'id', | 143 | valueField: 'id', |
144 | + ...createPickerSearch(), | ||
143 | }, | 145 | }, |
144 | }, | 146 | }, |
145 | { | 147 | { |