Sfoglia il codice sorgente

chore(api): 添加算法配置相关接口

wangshun 1 mese fa
parent
commit
3e664e2a23
1 ha cambiato i file con 17 aggiunte e 2 eliminazioni
  1. 17 2
      src/api/index.ts

+ 17 - 2
src/api/index.ts

@@ -10,7 +10,9 @@ import type {
   AlarmHistory,
   AlarmHistoryItem,
   AlarmPageParams,
+  AlgorithmConfigInfo,
   AllDevicesList,
+  AutomaticMatching,
   BatchUpdate,
   ChangeState,
   CoolingHistoryDataQuery,
@@ -65,7 +67,6 @@ import type {
   MonitorPointItem,
   OutdooForm,
   ParameterVerification,
-  ParamValueListAutomaticData,
   ParamValueListAutomaticQuery,
   PointTimeSeriesQuery,
   PostProtocolPage,
@@ -209,6 +210,20 @@ export const getAlarmHistoryList = async (params: AlarmHistory) => {
   return data;
 };
 
+// 算法配置
+
+export const getAlgorithmConfigInfo = async (devGroupId: number) => {
+  const data = await request<AlgorithmConfigInfo>(apiBiz(`/algorithmConfig/info/byGroup/${devGroupId}`));
+  return data;
+};
+
+export const addAlgorithmConfigUpdate = async (params: AlgorithmConfigInfo) => {
+  await request(apiBiz('/algorithmConfig/update'), {
+    method: 'POST',
+    body: JSON.stringify(params),
+  });
+};
+
 // 环境监控-监测点预警配置
 
 export const addBatchMonitorPointAlarm = async (params: WarningItem[]) => {
@@ -605,7 +620,7 @@ export const obtainListInterfaces = async (id: number) => {
 // 网关接口协议
 
 export const getParamValueListAutomatic = async (params: ParamValueListAutomaticQuery) => {
-  const data = await request<ParamValueListAutomaticData[]>(apiBiz('/gatewayLinkProtocol/getParamValueListAutomatic'), {
+  const data = await request<AutomaticMatching>(apiBiz('/gatewayLinkProtocol/getParamValueListAutomatic'), {
     method: 'POST',
     body: JSON.stringify(params),
   });