Commit 69cad71c361ef2d06b63701b388246269f5118e5

Authored by xp.Huang
2 parents 699f3ff2 e30e59d9

Merge branch 'ww' into 'main'

fix: BUG in teambition

See merge request huang/yun-teng-iot-front!418
1 import { DeviceProfileModel } from '../../device/model/deviceModel'; 1 import { DeviceProfileModel } from '../../device/model/deviceModel';
2 import { HistoryData } from './model'; 2 import { HistoryData } from './model';
3 import { defHttp } from '/@/utils/http/axios'; 3 import { defHttp } from '/@/utils/http/axios';
  4 +import { isString } from '/@/utils/is';
4 5
5 // 获取设备配置 6 // 获取设备配置
6 export const getDeviceProfile = (deviceType?: string) => { 7 export const getDeviceProfile = (deviceType?: string) => {
7 return defHttp.get<DeviceProfileModel[]>({ 8 return defHttp.get<DeviceProfileModel[]>({
8 url: '/device_profile/me/list', 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,17 +146,13 @@ export const step1Schemas: FormSchema[] = [
146 componentProps: ({ formModel }) => { 146 componentProps: ({ formModel }) => {
147 const { organizationId, transportType } = formModel; 147 const { organizationId, transportType } = formModel;
148 return { 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 api: getGatewayDevice, 149 api: getGatewayDevice,
154 showSearch: true, 150 showSearch: true,
155 params: { 151 params: {
156 organizationId, 152 organizationId,
157 transportType, 153 transportType,
158 }, 154 },
159 - valueField: 'id', 155 + valueField: 'tbDeviceId',
160 labelField: 'name', 156 labelField: 'name',
161 }; 157 };
162 }, 158 },
@@ -170,7 +170,7 @@ @@ -170,7 +170,7 @@
170 name, 170 name,
171 unit, 171 unit,
172 showHistoryDataButton: !isStructAndTextType( 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,6 +309,10 @@
309 .list-mode:deep(.ant-card-body) { 309 .list-mode:deep(.ant-card-body) {
310 padding-top: 0; 310 padding-top: 0;
311 } 311 }
  312 +
  313 + .list-mode:deep(.ant-card-head-title) {
  314 + height: 64px;
  315 + }
312 </style> 316 </style>
313 317
314 <style> 318 <style>