Commit 36abd69f74241c73f9877aa9787a52716aedd682
1 parent
cfbe72ed
fix: map component history data bind modal device select echo problem
Showing
2 changed files
with
8 additions
and
3 deletions
| ... | ... | @@ -27,15 +27,19 @@ |
| 27 | 27 | const { dataSource = [] } = params; |
| 28 | 28 | const deviceRecord = dataSource?.at(0) || ({} as DataSource); |
| 29 | 29 | if (!deviceRecord.organizationId) return; |
| 30 | - const deviceList = await getAllDeviceByOrg(deviceRecord.organizationId); | |
| 30 | + const deviceList = await getAllDeviceByOrg( | |
| 31 | + deviceRecord.organizationId, | |
| 32 | + deviceRecord.deviceProfileId | |
| 33 | + ); | |
| 31 | 34 | const options = deviceList |
| 32 | - .filter((item) => item.id === deviceRecord.deviceId) | |
| 33 | - .map((item) => ({ ...item, label: item.name, value: item.id })); | |
| 35 | + .filter((item) => item.tbDeviceId === deviceRecord.deviceId) | |
| 36 | + .map((item) => ({ ...item, label: item.name, value: item.tbDeviceId })); | |
| 34 | 37 | const attKey = dataSource.map((item) => ({ |
| 35 | 38 | ...item, |
| 36 | 39 | label: item.attribute, |
| 37 | 40 | value: item.attribute, |
| 38 | 41 | })); |
| 42 | + console.log(options); | |
| 39 | 43 | updateSchema([ |
| 40 | 44 | { |
| 41 | 45 | field: SchemaFiled.DEVICE_ID, | ... | ... |