Showing
1 changed file
with
6 additions
and
3 deletions
... | ... | @@ -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, | ... | ... |