Commit 9c9fc2895dd26f4cf062d88771b9076b8f2f1b5b
1 parent
cda6a183
perf(views/chart/ContentConfigurations/components/ChartData/external): 修改设备下拉框里显示别名或名字
Showing
1 changed file
with
8 additions
and
1 deletions
... | ... | @@ -168,18 +168,25 @@ export const useDynamicPublicForm = (paramsItemList: Ref<ParamsItemType[]>) => { |
168 | 168 | } |
169 | 169 | }) |
170 | 170 | |
171 | + /** | |
172 | + * ft 更改设备别名 | |
173 | + * 修改后的代码在注释之间,并标注好源代码和修改后代码,方便回溯 | |
174 | + * 源代码 labelField: 'name' | |
175 | + * 修改后代码 labelField: 'alias' || 'name' | |
176 | + */ | |
171 | 177 | const getSelectDevice = computed<SelectProps>(() => { |
172 | 178 | return { |
173 | 179 | ...basicPreset('name'), |
174 | 180 | value: params[BuiltInVariable.ENTITY_ID], |
175 | 181 | options: unref(optionsSet[BuiltInVariable.ENTITY_ID]), |
176 | - labelField: 'name', | |
182 | + labelField: 'alias' || 'name', | |
177 | 183 | valueField: 'tbDeviceId', |
178 | 184 | onUpdateValue(value) { |
179 | 185 | params[BuiltInVariable.ENTITY_ID] = value |
180 | 186 | } |
181 | 187 | } |
182 | 188 | }) |
189 | + //ft | |
183 | 190 | |
184 | 191 | const getSelectDeviceAttr = computed<SelectProps>(() => { |
185 | 192 | return { | ... | ... |