From f06475e7ce541162e61edce8e47b71c806697bcc Mon Sep 17 00:00:00 2001 From: skycurtain Date: Tue, 12 Aug 2025 15:19:18 +0800 Subject: [PATCH] chore: models & requests --- src/apis/domains/station.ts | 3 +- .../device/alarm/ndm-device-alarm-log.ts | 27 ++++++ src/apis/models/device/index.ts | 2 + src/apis/models/device/log/ndm-icmp-log.ts | 2 +- src/apis/models/device/log/ndm-snmp-log.ts | 2 +- .../models/device/other/ndm-security-box.ts | 2 +- src/apis/models/device/other/ndm-switch.ts | 2 +- src/apis/models/device/storage/ndm-nvr.ts | 90 ++++++++++++++++++- src/apis/models/device/video/ndm-camera.ts | 2 +- src/apis/models/device/video/ndm-decoder.ts | 2 +- src/apis/models/device/video/ndm-keyboard.ts | 2 +- .../models/device/video/ndm-media-server.ts | 2 +- .../models/device/video/ndm-video-server.ts | 2 +- src/apis/requests/device/ndm-camera.ts | 13 +++ src/apis/requests/device/ndm-decoder.ts | 13 +++ src/apis/requests/device/ndm-keyboard.ts | 13 +++ src/apis/requests/device/ndm-media-server.ts | 13 +++ src/apis/requests/device/ndm-monitor.ts | 6 ++ src/apis/requests/device/ndm-nvr.ts | 40 +++++++++ src/apis/requests/device/ndm-security-box.ts | 22 +++++ src/apis/requests/device/ndm-switch.ts | 13 +++ src/apis/requests/device/ndm-video-server.ts | 13 +++ src/apis/requests/index.ts | 15 ++++ src/apis/requests/log/ndm-device-alarm-log.ts | 9 ++ src/apis/requests/log/ndm-icmp-log.ts | 9 ++ src/apis/requests/log/ndm-snmp-log.ts | 9 ++ src/apis/requests/system/index.ts | 10 +++ 27 files changed, 326 insertions(+), 12 deletions(-) create mode 100644 src/apis/models/device/alarm/ndm-device-alarm-log.ts create mode 100644 src/apis/requests/device/ndm-camera.ts create mode 100644 src/apis/requests/device/ndm-decoder.ts create mode 100644 src/apis/requests/device/ndm-keyboard.ts create mode 100644 src/apis/requests/device/ndm-media-server.ts create mode 100644 src/apis/requests/device/ndm-monitor.ts create mode 100644 src/apis/requests/device/ndm-nvr.ts create mode 100644 src/apis/requests/device/ndm-security-box.ts create mode 100644 src/apis/requests/device/ndm-switch.ts create mode 100644 src/apis/requests/device/ndm-video-server.ts create mode 100644 src/apis/requests/index.ts create mode 100644 src/apis/requests/log/ndm-device-alarm-log.ts create mode 100644 src/apis/requests/log/ndm-icmp-log.ts create mode 100644 src/apis/requests/log/ndm-snmp-log.ts create mode 100644 src/apis/requests/system/index.ts diff --git a/src/apis/domains/station.ts b/src/apis/domains/station.ts index 1860aa9..8ecd64c 100644 --- a/src/apis/domains/station.ts +++ b/src/apis/domains/station.ts @@ -2,6 +2,5 @@ export interface Station { id: string; code: string; name: string; + online: boolean; } - -export type StationStatusRecord = Record; diff --git a/src/apis/models/device/alarm/ndm-device-alarm-log.ts b/src/apis/models/device/alarm/ndm-device-alarm-log.ts new file mode 100644 index 0000000..c9916fc --- /dev/null +++ b/src/apis/models/device/alarm/ndm-device-alarm-log.ts @@ -0,0 +1,27 @@ +import type { BaseModel } from '../../base/model'; +import type { ReduceForPageQuery, ReduceForSaveVO, ReduceForUpdateVO } from '../../base/reduce'; + +export interface NdmDeviceAlarmLogVO extends BaseModel { + alarmNo: string; + alarmDate: string; + faultLocation: string; + faultDescription: string; + faultLevel: string; + faultCode: string; + deviceId: string; + deviceName: string; + alarmCategory: string; + alarmConfirm: string; + alarmRepairSuggestion: string; + impactService: string; + alarmType: string; + deviceType: string; +} + +export type NdmDeviceAlarmLogResultVO = Partial; + +export type NdmDeviceAlarmLogSaveVO = Partial>; + +export type NdmDeviceAlarmLogUpdateVO = Partial>; + +export type NdmDeviceAlarmLogPageQuery = Partial>; diff --git a/src/apis/models/device/index.ts b/src/apis/models/device/index.ts index 285b264..8a7c465 100644 --- a/src/apis/models/device/index.ts +++ b/src/apis/models/device/index.ts @@ -7,6 +7,8 @@ import type { NdmKeyboardVO } from './video/ndm-keyboard'; import type { NdmMediaServerVO } from './video/ndm-media-server'; import type { NdmVideoServerVO } from './video/ndm-video-server'; +export * from './alarm/ndm-device-alarm-log'; + export * from './log/ndm-icmp-log'; export * from './log/ndm-snmp-log'; diff --git a/src/apis/models/device/log/ndm-icmp-log.ts b/src/apis/models/device/log/ndm-icmp-log.ts index 863c787..12bc4ee 100644 --- a/src/apis/models/device/log/ndm-icmp-log.ts +++ b/src/apis/models/device/log/ndm-icmp-log.ts @@ -14,4 +14,4 @@ export type NdmIcmpLogSaveVO = Partial>; export type NdmIcmpLogUpdateVO = Partial>; -export type NdmIcmpLogPageVO = Partial>; +export type NdmIcmpLogPageQuery = Partial>; diff --git a/src/apis/models/device/log/ndm-snmp-log.ts b/src/apis/models/device/log/ndm-snmp-log.ts index 8c07407..254be19 100644 --- a/src/apis/models/device/log/ndm-snmp-log.ts +++ b/src/apis/models/device/log/ndm-snmp-log.ts @@ -15,4 +15,4 @@ export type NdmSnmpLogSaveVO = Partial>; export type NdmSnmpLogUpdateVO = Partial>; -export type NdmSnmpLogPageVO = Partial>; +export type NdmSnmpLogPageQuery = Partial>; diff --git a/src/apis/models/device/other/ndm-security-box.ts b/src/apis/models/device/other/ndm-security-box.ts index 39ad33d..3d5d1cd 100644 --- a/src/apis/models/device/other/ndm-security-box.ts +++ b/src/apis/models/device/other/ndm-security-box.ts @@ -32,4 +32,4 @@ export type NdmSecurityBoxSaveVO = Partial>; -export type NdmSecurityBoxPageVO = Partial>; +export type NdmSecurityBoxPageQuery = Partial>; diff --git a/src/apis/models/device/other/ndm-switch.ts b/src/apis/models/device/other/ndm-switch.ts index 21a51b0..9081026 100644 --- a/src/apis/models/device/other/ndm-switch.ts +++ b/src/apis/models/device/other/ndm-switch.ts @@ -32,4 +32,4 @@ export type NdmSwitchSaveVO = Partial>; export type NdmSwitchUpdateVO = Partial>; -export type NdmSwitchPageVO = Partial>; +export type NdmSwitchPageQuery = Partial>; diff --git a/src/apis/models/device/storage/ndm-nvr.ts b/src/apis/models/device/storage/ndm-nvr.ts index 1511d01..723357f 100644 --- a/src/apis/models/device/storage/ndm-nvr.ts +++ b/src/apis/models/device/storage/ndm-nvr.ts @@ -43,4 +43,92 @@ export type NdmNvrSaveVO = Partial>; export type NdmNvrUpdateVO = Partial>; -export type NdmNvrPageVO = Partial>; +export type NdmNvrPageQuery = Partial>; + +export interface RecordSum { + code: string; + recordList: NdmRecordCheck[]; + channel: ClientChannel; + availableRecordList: UnixRecordItem[]; + unavailableRecordList: UnixRecordItem[]; +} + +export interface NdmRecordCheck extends BaseModel { + gbCode: string; + parentGbCode: string; + name: string; + ipAddress: string; + diagInfo: string | RecordInfo; + checkDate: string; +} + +export interface ClientChannel { + code: string; + name: string; + manufacture: string; + model: string; + owner: string; + civilCode: string; + block: string; + address: string; + parental: number; + parentId: string; + status: number; + longitude: number; + latitude: number; +} + +export interface RecordInfo { + deviceId: string; + channelId: string; + sn: string; + name: string; + sumNum: number; + count: number; + lastTime: number; + recordList: RecordItem[]; +} + +export interface RecordItem { + startTime: string; + endTime: string; +} + +export interface UnixRecordItem { + startTime: number; + endTime: number; +} + +export interface QueryGbRecordBody { + code: string; + start: string; + end: string; +} + +export interface QueryGbDeviceBody { + code: string; + time: string; +} + +export interface QueryRecordCheckBody { + parentId: string; + start: string; + end: string; +} + +export interface QueryReloadCheckBody { + code: string; + name: string; + manufacture: string; + model: string; + owner: string; + civilCode: string; + block: string; + address: string; + parental: number; + parentId: string; + status: number; + longitude: number; + latitude: number; + dayOffset: number; +} diff --git a/src/apis/models/device/video/ndm-camera.ts b/src/apis/models/device/video/ndm-camera.ts index 4db83d2..052ea65 100644 --- a/src/apis/models/device/video/ndm-camera.ts +++ b/src/apis/models/device/video/ndm-camera.ts @@ -42,4 +42,4 @@ export type NdmCameraSaveVO = Partial>; export type NdmCameraUpdateVO = Partial>; -export type NdmCameraPageVO = Partial>; +export type NdmCameraPageQuery = Partial>; diff --git a/src/apis/models/device/video/ndm-decoder.ts b/src/apis/models/device/video/ndm-decoder.ts index 927acd4..86bcb7c 100644 --- a/src/apis/models/device/video/ndm-decoder.ts +++ b/src/apis/models/device/video/ndm-decoder.ts @@ -39,4 +39,4 @@ export type NdmDecoderSaveVO = Partial>; export type NdmDecoderUpdateVO = Partial>; -export type NdmDecoderPageVO = Partial>; +export type NdmDecoderPageQuery = Partial>; diff --git a/src/apis/models/device/video/ndm-keyboard.ts b/src/apis/models/device/video/ndm-keyboard.ts index af20b96..dab197b 100644 --- a/src/apis/models/device/video/ndm-keyboard.ts +++ b/src/apis/models/device/video/ndm-keyboard.ts @@ -32,4 +32,4 @@ export type NdmKeyboardSaveVO = Partial>; export type NdmKeyboardUpdateVO = Partial>; -export type NdmKeyboardPageVO = Partial>; +export type NdmKeyboardPageQuery = Partial>; diff --git a/src/apis/models/device/video/ndm-media-server.ts b/src/apis/models/device/video/ndm-media-server.ts index c02a2d0..cd1b184 100644 --- a/src/apis/models/device/video/ndm-media-server.ts +++ b/src/apis/models/device/video/ndm-media-server.ts @@ -36,4 +36,4 @@ export type NdmMediaServerSaveVO = Partial>; -export type NdmMediaServerPageVO = Partial>; +export type NdmMediaServerPageQuery = Partial>; diff --git a/src/apis/models/device/video/ndm-video-server.ts b/src/apis/models/device/video/ndm-video-server.ts index edb4665..633da7d 100644 --- a/src/apis/models/device/video/ndm-video-server.ts +++ b/src/apis/models/device/video/ndm-video-server.ts @@ -36,4 +36,4 @@ export type NdmVideoServerSaveVO = Partial>; -export type NdmVideoServerPageVO = Partial>; +export type NdmVideoServerPageQuery = Partial>; diff --git a/src/apis/requests/device/ndm-camera.ts b/src/apis/requests/device/ndm-camera.ts new file mode 100644 index 0000000..f9b6dd3 --- /dev/null +++ b/src/apis/requests/device/ndm-camera.ts @@ -0,0 +1,13 @@ +import type { PageParams, PageResult } from '@/apis/models/base/page'; +import type { NdmCameraPageQuery, NdmCameraResultVO, NdmCameraUpdateVO } from '@/apis/models/device'; + +import { ndmClient } from '@/apis/client'; + +export const postNdmCameraPage = async (stationCode: string, pageQuery: PageParams) => { + const resp = await ndmClient.post>(`${stationCode}/ndm/ndmCamera/page`, pageQuery); + return resp; +}; +export const putNdmCamera = async (stationCode: string, updateVO: NdmCameraUpdateVO) => { + const resp = await ndmClient.put(`${stationCode}/api/ndm/ndmCamera`, updateVO); + return resp; +}; diff --git a/src/apis/requests/device/ndm-decoder.ts b/src/apis/requests/device/ndm-decoder.ts new file mode 100644 index 0000000..3848380 --- /dev/null +++ b/src/apis/requests/device/ndm-decoder.ts @@ -0,0 +1,13 @@ +import type { PageParams, PageResult } from '@/apis/models/base/page'; +import type { NdmDecoderPageQuery, NdmDecoderResultVO, NdmDecoderUpdateVO } from '@/apis/models/device'; + +import { ndmClient } from '@/apis/client'; + +export const postNdmDecoderPage = async (stationCode: string, pageQuery: PageParams) => { + const resp = await ndmClient.post>(`${stationCode}/api/ndm/ndmDecoder/page`, pageQuery); + return resp; +}; +export const putNdmDecoder = async (stationCode: string, updateVO: NdmDecoderUpdateVO) => { + const resp = await ndmClient.put(`${stationCode}/api/ndm/ndmDecoder`, updateVO); + return resp; +}; diff --git a/src/apis/requests/device/ndm-keyboard.ts b/src/apis/requests/device/ndm-keyboard.ts new file mode 100644 index 0000000..0242180 --- /dev/null +++ b/src/apis/requests/device/ndm-keyboard.ts @@ -0,0 +1,13 @@ +import type { PageParams, PageResult } from '@/apis/models/base/page'; +import type { NdmKeyboardPageQuery, NdmKeyboardResultVO, NdmKeyboardUpdateVO } from '@/apis/models/device'; + +import { ndmClient } from '@/apis/client'; + +export const postNdmKeyboardPage = async (stationCode: string, pageQuery: PageParams) => { + const resp = await ndmClient.post>(`${stationCode}/api/ndm/ndmKeyboard/page`, pageQuery); + return resp; +}; +export const putNdmKeyboard = async (stationCode: string, updateVO: NdmKeyboardUpdateVO) => { + const resp = await ndmClient.put(`${stationCode}/api/ndm/ndmKeyboard`, updateVO); + return resp; +}; diff --git a/src/apis/requests/device/ndm-media-server.ts b/src/apis/requests/device/ndm-media-server.ts new file mode 100644 index 0000000..57c0659 --- /dev/null +++ b/src/apis/requests/device/ndm-media-server.ts @@ -0,0 +1,13 @@ +import type { PageParams, PageResult } from '@/apis/models/base/page'; +import type { NdmMediaServerPageQuery, NdmMediaServerResultVO, NdmMediaServerUpdateVO } from '@/apis/models/device'; + +import { ndmClient } from '@/apis/client'; + +export const postNdmMediaServerPage = async (stationCode: string, pageQuery: PageParams) => { + const resp = await ndmClient.post>(`${stationCode}/api/ndm/ndmMediaServer/page`, pageQuery); + return resp; +}; +export const putNdmMediaServer = async (stationCode: string, updateVO: NdmMediaServerUpdateVO) => { + const resp = await ndmClient.put(`${stationCode}/api/ndm/ndmMediaServer`, updateVO); + return resp; +}; diff --git a/src/apis/requests/device/ndm-monitor.ts b/src/apis/requests/device/ndm-monitor.ts new file mode 100644 index 0000000..c09dd22 --- /dev/null +++ b/src/apis/requests/device/ndm-monitor.ts @@ -0,0 +1,6 @@ +import { ndmClient } from '@/apis/client'; + +export const resetMonitorSchedule = async (stationCode: string) => { + const resp = await ndmClient.get(`${stationCode}/api/ndm/ndmConstant/anyTenant/resetMonitorSchedule`); + return resp; +}; diff --git a/src/apis/requests/device/ndm-nvr.ts b/src/apis/requests/device/ndm-nvr.ts new file mode 100644 index 0000000..eb8a165 --- /dev/null +++ b/src/apis/requests/device/ndm-nvr.ts @@ -0,0 +1,40 @@ +import dayjs from 'dayjs'; + +import type { PageParams, PageResult } from '@/apis/models/base/page'; +import type { ClientChannel, NdmNvrPageQuery, NdmNvrResultVO, NdmNvrUpdateVO, NdmNvrVO, NdmRecordCheck } from '@/apis/models/device'; + +import { ndmClient } from '@/apis/client'; + +export const postNdmNvrPage = async (stationCode: string, pageQuery: PageParams) => { + const resp = await ndmClient.post>(`${stationCode}/api/ndm/ndmNvr/page`, pageQuery); + return resp; +}; +export const putNdmNvr = async (stationCode: string, updateVO: NdmNvrUpdateVO) => { + const resp = await ndmClient.put(`${stationCode}/api/ndm/ndmNvr`, updateVO); + return resp; +}; +export const getChannelList = async (stationCode: string, ndmNvr: NdmNvrVO) => { + const resp = await ndmClient.post(`${stationCode}/api/ndm/ndmRecordCheck/getChannelList`, { + code: ndmNvr.gbCode, + time: '', + }); + return resp; +}; +export const getRecordCheckByParentId = async (stationCode: string, ndmNvr: NdmNvrVO, lastDays: number, gbCodeList: string[] = []) => { + const endDateTime = dayjs(); + const startDateTime = endDateTime.subtract(lastDays, 'day'); + const resp = await ndmClient.post(`${stationCode}/api/ndm/ndmRecordCheck/getRecordCheckByParentId`, { + start: startDateTime.format('YYYY-MM-DD'), + end: endDateTime.format('YYYY-MM-DD'), + parentId: ndmNvr.gbCode, + gbCodeList, + }); + return resp; +}; +export const reloadRecordCheckByGbId = async (stationCode: string, channel: ClientChannel, dayOffset: number) => { + const resp = await ndmClient.post(`${stationCode}/api/ndm/ndmRecordCheck/reloadRecordCheckByGbId`, { + ...channel, + dayOffset, + }); + return resp; +}; diff --git a/src/apis/requests/device/ndm-security-box.ts b/src/apis/requests/device/ndm-security-box.ts new file mode 100644 index 0000000..857fb4c --- /dev/null +++ b/src/apis/requests/device/ndm-security-box.ts @@ -0,0 +1,22 @@ +import type { PageParams, PageResult } from '@/apis/models/base/page'; +import type { NdmSecurityBoxPageQuery, NdmSecurityBoxResultVO, NdmSecurityBoxUpdateVO } from '@/apis/models/device'; + +import { ndmClient } from '@/apis/client'; + +export const postNdmSecurityBoxPage = async (stationCode: string, pageQuery: PageParams) => { + const resp = await ndmClient.post>(`${stationCode}/api/ndm/ndmSecurityBox/page`, pageQuery); + return resp; +}; +export const putNdmSecurityBox = async (stationCode: string, updateVO: NdmSecurityBoxUpdateVO) => { + const resp = await ndmClient.put(`${stationCode}/api/ndm/ndmSecurityBox`, updateVO); + return resp; +}; +export const turnStatus = async (stationCode: string, ipAddress: string, circuitIndex: number, status: number) => { + const resp = await ndmClient.post(`${stationCode}/api/ndm/ndmSecurityBox/turnStatus`, { + community: 'public', + ipAddress, + circuit: `${circuitIndex}`, + status, + }); + return resp; +}; diff --git a/src/apis/requests/device/ndm-switch.ts b/src/apis/requests/device/ndm-switch.ts new file mode 100644 index 0000000..ea263ed --- /dev/null +++ b/src/apis/requests/device/ndm-switch.ts @@ -0,0 +1,13 @@ +import type { PageParams, PageResult } from '@/apis/models/base/page'; +import type { NdmSwitchPageQuery, NdmSwitchResultVO, NdmSwitchUpdateVO } from '@/apis/models/device'; + +import { ndmClient } from '@/apis/client'; + +export const postNdmSwitchPage = async (stationCode: string, pageQuery: PageParams) => { + const resp = await ndmClient.post>(`${stationCode}/api/ndm/ndmSwitch/page`, pageQuery); + return resp; +}; +export const putNdmSwitch = async (stationCode: string, updateVO: NdmSwitchUpdateVO) => { + const resp = await ndmClient.put(`${stationCode}/api/ndm/ndmSwitch`, updateVO); + return resp; +}; diff --git a/src/apis/requests/device/ndm-video-server.ts b/src/apis/requests/device/ndm-video-server.ts new file mode 100644 index 0000000..ce15aea --- /dev/null +++ b/src/apis/requests/device/ndm-video-server.ts @@ -0,0 +1,13 @@ +import type { PageParams, PageResult } from '@/apis/models/base/page'; +import type { NdmVideoServerPageQuery, NdmVideoServerResultVO, NdmVideoServerUpdateVO } from '@/apis/models/device'; + +import { ndmClient } from '@/apis/client'; + +export const postNdmVideoServerPage = async (stationCode: string, pageQuery: PageParams) => { + const resp = await ndmClient.post>(`${stationCode}/api/ndm/ndmVideoServer/page`, pageQuery); + return resp; +}; +export const putNdmVideoServer = async (stationCode: string, updateVO: NdmVideoServerUpdateVO) => { + const resp = await ndmClient.put(`${stationCode}/api/ndm/ndmVideoServer`, updateVO); + return resp; +}; diff --git a/src/apis/requests/index.ts b/src/apis/requests/index.ts new file mode 100644 index 0000000..c86a844 --- /dev/null +++ b/src/apis/requests/index.ts @@ -0,0 +1,15 @@ +export * from './device/ndm-camera'; +export * from './device/ndm-decoder'; +export * from './device/ndm-keyboard'; +export * from './device/ndm-media-server'; +export * from './device/ndm-monitor'; +export * from './device/ndm-nvr'; +export * from './device/ndm-security-box'; +export * from './device/ndm-switch'; +export * from './device/ndm-video-server'; + +export * from './log/device-alarm-log'; +export * from './log/icmp-log'; +export * from './log/snmp-log'; + +export * from './system'; diff --git a/src/apis/requests/log/ndm-device-alarm-log.ts b/src/apis/requests/log/ndm-device-alarm-log.ts new file mode 100644 index 0000000..64817da --- /dev/null +++ b/src/apis/requests/log/ndm-device-alarm-log.ts @@ -0,0 +1,9 @@ +import type { PageParams, PageResult } from '@/apis/models/base/page'; +import type { NdmDeviceAlarmLogPageQuery, NdmDeviceAlarmLogResultVO } from '@/apis/models/device/alarm/ndm-device-alarm-log'; + +import { ndmClient } from '@/apis/client'; + +export const postNdmDeviceAlarmLogPage = async (stationCode: string, pageQuery: PageParams) => { + const resp = await ndmClient.post>(`${stationCode}/api/ndm/ndmDeviceAlarmLog/page`, pageQuery); + return resp; +}; diff --git a/src/apis/requests/log/ndm-icmp-log.ts b/src/apis/requests/log/ndm-icmp-log.ts new file mode 100644 index 0000000..0e6108c --- /dev/null +++ b/src/apis/requests/log/ndm-icmp-log.ts @@ -0,0 +1,9 @@ +import type { PageParams, PageResult } from '@/apis/models/base/page'; +import type { NdmIcmpLogPageQuery, NdmIcmpLogResultVO } from '@/apis/models/device'; + +import { ndmClient } from '@/apis/client'; + +export const postIcmpLogPage = async (stationCode: string, pageQuery: PageParams) => { + const resp = await ndmClient.post>(`${stationCode}/api/ndm/ndmIcmpLog/page`, pageQuery); + return resp; +}; diff --git a/src/apis/requests/log/ndm-snmp-log.ts b/src/apis/requests/log/ndm-snmp-log.ts new file mode 100644 index 0000000..3b2f4c0 --- /dev/null +++ b/src/apis/requests/log/ndm-snmp-log.ts @@ -0,0 +1,9 @@ +import type { PageParams, PageResult } from '@/apis/models/base/page'; +import type { NdmSnmpLogPageQuery, NdmSnmpLogResultVO } from '@/apis/models/device'; + +import { ndmClient } from '@/apis/client'; + +export const postSnmpLogPage = async (stationCode: string, pageQuery: PageParams) => { + const resp = await ndmClient.post>(`${stationCode}/api/ndm/ndmSnmpLog/page`, pageQuery); + return resp; +}; diff --git a/src/apis/requests/system/index.ts b/src/apis/requests/system/index.ts new file mode 100644 index 0000000..8f78132 --- /dev/null +++ b/src/apis/requests/system/index.ts @@ -0,0 +1,10 @@ +import type { Result } from '@/axios'; + +import type { DefParameterResultVO, DefParameterUpdateVO } from '../../models/system'; + +import { ndmClient } from '../../client'; + +export const putDefParameter = async (stationCode: string, updateVO: DefParameterUpdateVO) => { + const resp = ndmClient.put>(`${stationCode}/api/system/defParameter`, { ...updateVO }); + return resp; +};