|
@@ -4,14 +4,11 @@ import { defHttp } from '/@/utils/http/axios'; |
|
@@ -4,14 +4,11 @@ import { defHttp } from '/@/utils/http/axios'; |
|
4
|
import { isString } from '/@/utils/is';
|
4
|
import { isString } from '/@/utils/is';
|
|
5
|
import { OrderByEnum } from '/@/views/device/localtion/cpns/TimePeriodForm/config';
|
5
|
import { OrderByEnum } from '/@/views/device/localtion/cpns/TimePeriodForm/config';
|
|
6
|
|
6
|
|
|
7
|
-// 获取设备配置
|
|
|
|
8
|
-export const getDeviceProfile = ({ deviceType, transportType }) => {
|
7
|
+// 获取设备配置,很多地方使用,不能修改这里
|
|
|
|
8
|
+export const getDeviceProfile = (deviceType?: string) => {
|
|
9
|
return defHttp.get<DeviceProfileModel[]>({
|
9
|
return defHttp.get<DeviceProfileModel[]>({
|
|
10
|
url: '/device_profile/me/list',
|
10
|
url: '/device_profile/me/list',
|
|
11
|
- params: {
|
|
|
|
12
|
- deviceType: isString(deviceType) ? deviceType : undefined,
|
|
|
|
13
|
- transportType: isString(transportType) ? transportType : undefined,
|
|
|
|
14
|
- },
|
11
|
+ params: { deviceType: isString(deviceType) ? deviceType : undefined },
|
|
15
|
});
|
12
|
});
|
|
16
|
};
|
13
|
};
|
|
17
|
|
14
|
|
|
@@ -62,3 +59,14 @@ export const getDeviceAttribute = (entityId: string) => { |
|
@@ -62,3 +59,14 @@ export const getDeviceAttribute = (entityId: string) => { |
|
62
|
}
|
59
|
}
|
|
63
|
);
|
60
|
);
|
|
64
|
};
|
61
|
};
|
|
|
|
62
|
+
|
|
|
|
63
|
+//获取设备配置,新增传协议类型
|
|
|
|
64
|
+export const getDeviceProfileByTransportType = ({ deviceType, transportType }) => {
|
|
|
|
65
|
+ return defHttp.get<DeviceProfileModel[]>({
|
|
|
|
66
|
+ url: '/device_profile/me/list',
|
|
|
|
67
|
+ params: {
|
|
|
|
68
|
+ deviceType: isString(deviceType) ? deviceType : undefined,
|
|
|
|
69
|
+ transportType: isString(transportType) ? transportType : undefined,
|
|
|
|
70
|
+ },
|
|
|
|
71
|
+ });
|
|
|
|
72
|
+}; |