|
@@ -8,14 +8,19 @@ import type {
|
|
|
CustomParameters,
|
|
|
DeviceGroupItem,
|
|
|
DevicesList,
|
|
|
+ DevicesListItemData,
|
|
|
DictTypeData,
|
|
|
DictTypeDataParams,
|
|
|
EquipmentInformationForm,
|
|
|
EquipmentTypeItem,
|
|
|
EquipmentUpdateForm,
|
|
|
+ GatewayBody,
|
|
|
GatewayInformation,
|
|
|
GatewayInterface,
|
|
|
+ GatewayListItemData,
|
|
|
GatewayModelInfo,
|
|
|
+ GatewayParameterBody,
|
|
|
+ GatewayParameterItemData,
|
|
|
GetListItem,
|
|
|
GroupingList,
|
|
|
GroupingListData,
|
|
@@ -125,17 +130,19 @@ export const deviceAdd = async (equipmentInformationForm: EquipmentInformationFo
|
|
|
return data;
|
|
|
};
|
|
|
|
|
|
-export const deviceDeletion = async (id: number) => {
|
|
|
- await request(apiBiz(`${'/device/delete/'}${id}`), {
|
|
|
+export const deviceDeletion = async (ids: number[]) => {
|
|
|
+ await request(apiBiz('/device/delete/batch'), {
|
|
|
method: 'POST',
|
|
|
+ body: JSON.stringify(ids),
|
|
|
});
|
|
|
};
|
|
|
|
|
|
export const queryDevicesList = async (devicesList: DevicesList) => {
|
|
|
- await request(apiBiz('/device/getPageList'), {
|
|
|
+ const data = await request<DevicesListItemData>(apiBiz('/device/getPageList'), {
|
|
|
method: 'POST',
|
|
|
body: JSON.stringify(devicesList),
|
|
|
});
|
|
|
+ return data;
|
|
|
};
|
|
|
|
|
|
// 设备网关
|
|
@@ -205,6 +212,14 @@ export const validateGatewayInfo = async (registerGatewayForm: VerificationEquip
|
|
|
return data;
|
|
|
};
|
|
|
|
|
|
+export const gatewayList = async (gatewayBody: GatewayBody) => {
|
|
|
+ const data = await request<GatewayListItemData>(apiBiz('/gateway/getPageList'), {
|
|
|
+ method: 'POST',
|
|
|
+ body: JSON.stringify(gatewayBody),
|
|
|
+ });
|
|
|
+ return data;
|
|
|
+};
|
|
|
+
|
|
|
// 网关通讯
|
|
|
|
|
|
export const gatewayLinkAdd = async (addInterface: AddInterface) => {
|
|
@@ -305,6 +320,14 @@ export const postProtocolCandidatesList = async (protocolList: ProtocolList, gat
|
|
|
return data;
|
|
|
};
|
|
|
|
|
|
+export const gatewayParameterList = async (gatewayParameterBody: GatewayParameterBody) => {
|
|
|
+ const data = await request<GatewayParameterItemData>(apiBiz('/gatewayLinkProtocol/getParamValuePageList'), {
|
|
|
+ method: 'POST',
|
|
|
+ body: JSON.stringify(gatewayParameterBody),
|
|
|
+ });
|
|
|
+ return data;
|
|
|
+};
|
|
|
+
|
|
|
// 组织网关
|
|
|
|
|
|
export const orgGatewayRegister = async (gatewayId: number) => {
|