Showing
1 changed file
with
12 additions
and
2 deletions
@@ -228,13 +228,23 @@ export const commonDataSourceSchemas = (): FormSchema[] => { | @@ -228,13 +228,23 @@ export const commonDataSourceSchemas = (): FormSchema[] => { | ||
228 | deviceProfileId, | 228 | deviceProfileId, |
229 | deviceType, | 229 | deviceType, |
230 | }); | 230 | }); |
231 | - if (data) | ||
232 | - return data.map((item) => ({ | 231 | + if (data) { |
232 | + const result = data.map((item) => ({ | ||
233 | ...item, | 233 | ...item, |
234 | label: item.alias || item.name, | 234 | label: item.alias || item.name, |
235 | value: item.tbDeviceId, | 235 | value: item.tbDeviceId, |
236 | deviceType: item.deviceType, | 236 | deviceType: item.deviceType, |
237 | })); | 237 | })); |
238 | + | ||
239 | + if ( | ||
240 | + unref(selectWidgetKeys).componentKey === | ||
241 | + ControlComponentEnum.LATERAL_NUMERICAL_CONTROL | ||
242 | + ) { | ||
243 | + return result.filter((item) => item.codeType === TaskTypeEnum.MODBUS_RTU); | ||
244 | + } | ||
245 | + | ||
246 | + return result; | ||
247 | + } | ||
238 | } catch (error) {} | 248 | } catch (error) {} |
239 | } | 249 | } |
240 | return []; | 250 | return []; |