Commit 07ba88f5ca24d7138ef9847eebe96de896966aa8

Authored by ww
1 parent 122b41a0

fix: DEFECT-1236 修复任务中心回显设备名称首选别名

... ... @@ -161,18 +161,21 @@
161 161 api: async () => {
162 162 try {
163 163 if (!organizationId) return [];
164   - return await getMeetTheConditionsDevice({
  164 + const result = await getMeetTheConditionsDevice({
165 165 deviceProfileId,
166 166 deviceType,
167 167 organizationId,
168 168 });
  169 + return result.map((item) => ({
  170 + ...item,
  171 + value: item.tbDeviceId,
  172 + label: item.alias || item.name,
  173 + }));
169 174 } catch (error) {
170 175 return [];
171 176 }
172 177 },
173 178 mode: props.multiple ? 'multiple' : 'combobox',
174   - labelField: 'name',
175   - valueField: 'tbDeviceId',
176 179 placeholder: '请选择设备',
177 180 maxTagCount: 3,
178 181 maxTagTextLength: 4,
... ...