refactor: reorganize files

This commit is contained in:
yangsy
2025-11-22 01:46:16 +08:00
parent 00a961c346
commit a486f76aaf
148 changed files with 1440 additions and 1170 deletions

View File

@@ -0,0 +1,14 @@
import { ndmClient, userClient, type NdmSnmpLogPageQuery, type NdmSnmpLogResultVO, type PageParams, type PageResult } from '@/apis';
export const pageSnmpLogApi = async (pageQuery: PageParams<NdmSnmpLogPageQuery>, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmSnmpLog/page`;
const resp = await client.post<PageResult<NdmSnmpLogResultVO>>(endpoint, pageQuery, { signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};