Commit 69d9340ffc9851d4446b07ee88f575962511dd11

Authored by loveumiko
1 parent abd0a2ac

fix: 修复云端 模板和组态差评搜索输入数字结果没有进行筛选

... ... @@ -6,6 +6,7 @@ import { useComponentRegister } from '/@/components/Form';
6 6 import { OrgTreeSelect } from '../../common/OrgTreeSelect';
7 7 import { getDeviceProfile } from '/@/api/alarm/position';
8 8 import { buildUUID } from '/@/utils/uuid';
  9 +import { createPickerSearch } from '/@/utils/pickerSearch';
9 10
10 11 useComponentRegister('OrgTreeSelect', OrgTreeSelect);
11 12 export enum Platform {
... ... @@ -219,14 +220,7 @@ export const formSchema: FormSchema[] = [
219 220 labelField: 'name',
220 221 valueField: 'id',
221 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 225 ifShow: ({ values }) => values['enableTemplate'] === 0,
232 226 },
... ...
... ... @@ -6,6 +6,7 @@ import { useComponentRegister } from '/@/components/Form';
6 6 import { OrgTreeSelect } from '../../common/OrgTreeSelect';
7 7 import { getDeviceProfile } from '/@/api/alarm/position';
8 8 import { Platform } from '../center/center.data';
  9 +import { createPickerSearch } from '/@/utils/pickerSearch';
9 10
10 11 useComponentRegister('OrgTreeSelect', OrgTreeSelect);
11 12
... ... @@ -140,6 +141,7 @@ export const formSchema: FormSchema[] = [
140 141 mode: 'multiple',
141 142 labelField: 'name',
142 143 valueField: 'id',
  144 + ...createPickerSearch(),
143 145 },
144 146 },
145 147 {
... ...