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