Commit ab2cc5fb0c0bfa73a4748f9a3ab1a43828e10f00

Authored by ww
1 parent 722e9352

fix: rule data flow select device use tbDeviceId

@@ -168,6 +168,7 @@ export interface DeviceRecord { @@ -168,6 +168,7 @@ export interface DeviceRecord {
168 provisionType: string; 168 provisionType: string;
169 deviceType: string; 169 deviceType: string;
170 deviceCount: number; 170 deviceCount: number;
  171 + tbDeviceId: string;
171 tbProfileId: string; 172 tbProfileId: string;
172 profileData: ProfileData; 173 profileData: ProfileData;
173 defaultQueueName: string; 174 defaultQueueName: string;
@@ -64,9 +64,9 @@ const handleGroupDevice = (options: DeviceRecord[]) => { @@ -64,9 +64,9 @@ const handleGroupDevice = (options: DeviceRecord[]) => {
64 options.forEach((item) => { 64 options.forEach((item) => {
65 if (map.has(item.profileId)) { 65 if (map.has(item.profileId)) {
66 const deviceList = map.get(item.profileId)!; 66 const deviceList = map.get(item.profileId)!;
67 - deviceList.push(item.id); 67 + deviceList.push(item.tbDeviceId);
68 } else { 68 } else {
69 - map.set(item.profileId, [item.id]); 69 + map.set(item.profileId, [item.tbDeviceId]);
70 } 70 }
71 }); 71 });
72 const value = Array.from(map.entries()).map(([product, devices]) => ({ product, devices })); 72 const value = Array.from(map.entries()).map(([product, devices]) => ({ product, devices }));
@@ -230,7 +230,7 @@ export const modeForm = (submitFn?: Function): FormSchema[] => { @@ -230,7 +230,7 @@ export const modeForm = (submitFn?: Function): FormSchema[] => {
230 230
231 return { 231 return {
232 labelField: 'name', 232 labelField: 'name',
233 - valueField: 'id', 233 + valueField: 'tbDeviceId',
234 pendingTableProps: { 234 pendingTableProps: {
235 ...TransferTableProps, 235 ...TransferTableProps,
236 api: devicePage, 236 api: devicePage,
@@ -536,6 +536,7 @@ export const actionSchema: FormSchema[] = [ @@ -536,6 +536,7 @@ export const actionSchema: FormSchema[] = [
536 params: { 536 params: {
537 dictCode: 'custom_define', 537 dictCode: 'custom_define',
538 }, 538 },
  539 + numberToString: true,
539 getPopupContainer: () => document.body, 540 getPopupContainer: () => document.body,
540 onChange: () => { 541 onChange: () => {
541 setFieldsValue({ doContext: null, thingsModelId: null }); 542 setFieldsValue({ doContext: null, thingsModelId: null });