Commit c1dfef0f5cd39b0181174735e3e3fa3fec29675c
Merge branch 'fix/linkedge-identifer' into 'main_dev'
fix: 修复场景联动设备属性未使用物模型标识符名称 See merge request yunteng/thingskit-front!714
Showing
2 changed files
with
10 additions
and
2 deletions
@@ -372,7 +372,7 @@ export const trigger_condition_schema: FormSchema[] = [ | @@ -372,7 +372,7 @@ export const trigger_condition_schema: FormSchema[] = [ | ||
372 | { | 372 | { |
373 | field: 'type2', | 373 | field: 'type2', |
374 | label: '', | 374 | label: '', |
375 | - component: 'AutoComplete', | 375 | + component: 'Select', |
376 | componentProps: { | 376 | componentProps: { |
377 | placeholder: '请选择属性', | 377 | placeholder: '请选择属性', |
378 | }, | 378 | }, |
@@ -7,12 +7,20 @@ export default () => { | @@ -7,12 +7,20 @@ export default () => { | ||
7 | componentProps: { | 7 | componentProps: { |
8 | placeholder: '请选择属性', | 8 | placeholder: '请选择属性', |
9 | options, | 9 | options, |
10 | + showSearch: true, | ||
11 | + filterOption: (inputValue: string, option: Record<'label' | 'value', string>) => { | ||
12 | + let { label, value } = option; | ||
13 | + label = label.toLowerCase(); | ||
14 | + value = value.toLowerCase(); | ||
15 | + inputValue = inputValue.toLowerCase(); | ||
16 | + return label.includes(inputValue) || value.includes(inputValue); | ||
17 | + }, | ||
10 | }, | 18 | }, |
11 | }); | 19 | }); |
12 | if (Array.isArray(res)) { | 20 | if (Array.isArray(res)) { |
13 | opt = res.map((m) => { | 21 | opt = res.map((m) => { |
14 | return { | 22 | return { |
15 | - label: m?.identifier, | 23 | + label: m?.name, |
16 | value: m?.identifier, | 24 | value: m?.identifier, |
17 | }; | 25 | }; |
18 | }); | 26 | }); |