Commit a8f5c3df24364b7504193d7c280b97dfc1eefe0e

Authored by fengwotao
2 parents b1b3ee2a a93d2248

Merge branch 'main_dev' into ft

... ... @@ -154,7 +154,15 @@ export const step1Schemas: FormSchema[] = [
154 154 const { organizationId, transportType } = formModel;
155 155 if (![organizationId, transportType].every(Boolean)) return {};
156 156 return {
157   - api: getGatewayDevice,
  157 + api: async (params: Recordable) => {
  158 + try {
  159 + const result = await getGatewayDevice(params as any);
  160 + return result.map((item) => ({ ...item, alias: item.alias || item.name }));
  161 + } catch (e) {
  162 + console.error(e);
  163 + return [];
  164 + }
  165 + },
158 166 showSearch: true,
159 167 params: {
160 168 organizationId,
... ...