Showing
1 changed file
with
12 additions
and
2 deletions
| ... | ... | @@ -228,13 +228,23 @@ export const commonDataSourceSchemas = (): FormSchema[] => { |
| 228 | 228 | deviceProfileId, |
| 229 | 229 | deviceType, |
| 230 | 230 | }); |
| 231 | - if (data) | |
| 232 | - return data.map((item) => ({ | |
| 231 | + if (data) { | |
| 232 | + const result = data.map((item) => ({ | |
| 233 | 233 | ...item, |
| 234 | 234 | label: item.alias || item.name, |
| 235 | 235 | value: item.tbDeviceId, |
| 236 | 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 | 248 | } catch (error) {} |
| 239 | 249 | } |
| 240 | 250 | return []; | ... | ... |