Commit 69cad71c361ef2d06b63701b388246269f5118e5
Merge branch 'ww' into 'main'
fix: BUG in teambition See merge request huang/yun-teng-iot-front!418
Showing
3 changed files
with
8 additions
and
7 deletions
1 | 1 | import { DeviceProfileModel } from '../../device/model/deviceModel'; |
2 | 2 | import { HistoryData } from './model'; |
3 | 3 | import { defHttp } from '/@/utils/http/axios'; |
4 | +import { isString } from '/@/utils/is'; | |
4 | 5 | |
5 | 6 | // 获取设备配置 |
6 | 7 | export const getDeviceProfile = (deviceType?: string) => { |
7 | 8 | return defHttp.get<DeviceProfileModel[]>({ |
8 | 9 | url: '/device_profile/me/list', |
9 | - params: { deviceType }, | |
10 | + params: { deviceType: isString(deviceType) ? deviceType : undefined }, | |
10 | 11 | }); |
11 | 12 | }; |
12 | 13 | ... | ... |
... | ... | @@ -146,17 +146,13 @@ export const step1Schemas: FormSchema[] = [ |
146 | 146 | componentProps: ({ formModel }) => { |
147 | 147 | const { organizationId, transportType } = formModel; |
148 | 148 | return { |
149 | - // api: async (params: Record<'transportType' | 'organizationId', string>) => { | |
150 | - // const options = await getGatewayDevice(params); | |
151 | - // return options.filter((item) => item.deviceType === DeviceTypeEnum.GATEWAY); | |
152 | - // }, | |
153 | 149 | api: getGatewayDevice, |
154 | 150 | showSearch: true, |
155 | 151 | params: { |
156 | 152 | organizationId, |
157 | 153 | transportType, |
158 | 154 | }, |
159 | - valueField: 'id', | |
155 | + valueField: 'tbDeviceId', | |
160 | 156 | labelField: 'name', |
161 | 157 | }; |
162 | 158 | }, | ... | ... |
... | ... | @@ -170,7 +170,7 @@ |
170 | 170 | name, |
171 | 171 | unit, |
172 | 172 | showHistoryDataButton: !isStructAndTextType( |
173 | - dataInfo?.detail.dataType as unknown as DateTypeEnum | |
173 | + dataInfo?.detail.dataType?.type as unknown as DateTypeEnum | |
174 | 174 | ), |
175 | 175 | }; |
176 | 176 | }); |
... | ... | @@ -309,6 +309,10 @@ |
309 | 309 | .list-mode:deep(.ant-card-body) { |
310 | 310 | padding-top: 0; |
311 | 311 | } |
312 | + | |
313 | + .list-mode:deep(.ant-card-head-title) { | |
314 | + height: 64px; | |
315 | + } | |
312 | 316 | </style> |
313 | 317 | |
314 | 318 | <style> | ... | ... |