Commit 024871c3fd4ed0da5885d30bcb24d74116847017
Merge branch 'ww' into 'main'
fix: BUG in teambition See merge request huang/yun-teng-iot-front!421
Showing
6 changed files
with
7 additions
and
6 deletions
... | ... | @@ -170,7 +170,7 @@ export const getShareBoardComponentInfo = (params: { boardId: string; tenantId: |
170 | 170 | */ |
171 | 171 | export const getAllDeviceByOrg = (organizationId: string, deviceProfileId?: string) => { |
172 | 172 | return defHttp.get<MasterDeviceList[]>({ |
173 | - url: DeviceUrl.GET_DEVICE_MASTER, | |
173 | + url: DeviceUrl.GET_DEVICE, | |
174 | 174 | params: { deviceProfileId, organizationId }, |
175 | 175 | }); |
176 | 176 | }; | ... | ... |
... | ... | @@ -135,6 +135,7 @@ export interface UpdateDataComponentParams { |
135 | 135 | export interface MasterDeviceList { |
136 | 136 | deviceType: 'DIRECT_CONNECTION' | 'GATEWAY'; |
137 | 137 | deviceProfileId: string; |
138 | + tbDeviceId: string; | |
138 | 139 | id: string; |
139 | 140 | name: string; |
140 | 141 | label?: string; | ... | ... |
... | ... | @@ -289,7 +289,7 @@ export const trigger_condition_schema: FormSchema[] = [ |
289 | 289 | deviceProfileId, |
290 | 290 | }, |
291 | 291 | labelField: 'name', |
292 | - valueField: 'id', | |
292 | + valueField: 'tbDeviceId', | |
293 | 293 | }; |
294 | 294 | } |
295 | 295 | }, |
... | ... | @@ -483,7 +483,7 @@ export const actionSchema: FormSchema[] = [ |
483 | 483 | deviceProfileId, |
484 | 484 | }, |
485 | 485 | labelField: 'name', |
486 | - valueField: 'id', | |
486 | + valueField: 'tbDeviceId', | |
487 | 487 | }; |
488 | 488 | } |
489 | 489 | }, | ... | ... |
... | ... | @@ -17,7 +17,7 @@ |
17 | 17 | import { BasicForm, useForm } from '/@/components/Form/index'; |
18 | 18 | import { Icon } from '/@/components/Icon'; |
19 | 19 | import { Tooltip } from 'ant-design-vue'; |
20 | - import { isType } from '../config/formatData.ts'; | |
20 | + import { isType } from '../config/formatData'; | |
21 | 21 | defineProps({ |
22 | 22 | index: { |
23 | 23 | type: Number, | ... | ... |
... | ... | @@ -80,7 +80,7 @@ |
80 | 80 | const { organizationId, value } = record; |
81 | 81 | try { |
82 | 82 | const options = await getAllDeviceByOrg(organizationId); |
83 | - const record = options.find((item) => item.id === value); | |
83 | + const record = options.find((item) => item.tbDeviceId === value); | |
84 | 84 | await getDeviceAttribute(record!); |
85 | 85 | await nextTick(); |
86 | 86 | method.updateSchema({ | ... | ... |
... | ... | @@ -225,7 +225,7 @@ export const dataSourceSchema = (frontId?: FrontComponent): FormSchema[] => { |
225 | 225 | return data.map((item) => ({ |
226 | 226 | ...item, |
227 | 227 | label: item.alias || item.name, |
228 | - value: item.id, | |
228 | + value: item.tbDeviceId, | |
229 | 229 | deviceType: item.deviceType, |
230 | 230 | })); |
231 | 231 | } catch (error) {} | ... | ... |