Compare commits

..

1 Commits

227 changed files with 2269 additions and 3946 deletions

3
.env
View File

@@ -15,8 +15,5 @@ VITE_LAMP_PASSWORD = fjoc(1KHP(Ls&Bje)C
# 如果 Authorization 已存在则会直接采用, 否则会根据 clientId 和 clientSecret 生成
VITE_LAMP_AUTHORIZATION = Y3VlZGVzX2FkbWluOmN1ZWRlc19hZG1pbl9zZWNyZXQ=
# 当需要重置localStorage时, 修改此变量
VITE_STORAGE_VERSION = 2
# 调试授权码
VITE_DEBUG_CODE = ndm_debug

View File

@@ -13,13 +13,13 @@ const GlobalFeedback = defineComponent({
<script setup lang="ts">
import { dateZhCN, NConfigProvider, NDialogProvider, NLoadingBarProvider, NMessageProvider, NNotificationProvider, useDialog, useLoadingBar, useMessage, useNotification, zhCN } from 'naive-ui';
import { defineComponent } from 'vue';
import { useSettingStore } from '@/stores';
import { useThemeStore } from '@/stores/theme';
import { storeToRefs } from 'pinia';
import { VueQueryDevtools } from '@tanstack/vue-query-devtools';
import { useVersionCheckQuery } from './composables/query';
const settingStore = useSettingStore();
const { themeMode } = storeToRefs(settingStore);
const themeStore = useThemeStore();
const { themeMode } = storeToRefs(themeStore);
useVersionCheckQuery();
</script>

View File

@@ -1,8 +1,44 @@
import { useUserStore } from '@/stores';
import { getAppEnvConfig, RequestClient } from '@/utils';
import type { AxiosError } from 'axios';
export const ndmClient = new RequestClient({
import { Request } from '@/utils/request';
import { useUserStore } from '@/stores/user';
import { getAppEnvConfig } from '@/utils/env';
import router from '@/router';
export const userClient = new Request({
requestInterceptor: (config) => {
const userStore = useUserStore();
const { lampAuthorization, lampClientId, lampClientSecret } = getAppEnvConfig();
const newAuthorization = window.btoa(`${lampClientId}:${lampClientSecret}`);
const authorization = lampAuthorization.trim() !== '' ? lampAuthorization : newAuthorization;
config.headers.set('accept-language', 'zh-CN,zh;q=0.9');
config.headers.set('accept', 'application/json, text/plain, */*');
config.headers.set('Applicationid', '');
config.headers.set('Tenantid', '1');
config.headers.set('Authorization', authorization);
config.headers.set('token', userStore.userLoginResult?.token ?? '');
return config;
},
responseInterceptor: (response) => {
return response;
},
responseErrorInterceptor: (error) => {
const err = error as AxiosError;
if (err.response?.status === 401) {
window.$message.error('登录超时,请重新登录');
const userStore = useUserStore();
userStore.resetStore();
router.push('/login');
}
if (err.response?.status === 404) {
router.push('/404');
}
return Promise.reject(error);
},
});
export const ndmClient = new Request({
requestInterceptor: async (config) => {
const userStore = useUserStore();
const { lampAuthorization, lampClientId, lampClientSecret } = getAppEnvConfig();

View File

@@ -1,2 +0,0 @@
export * from './ndm-client';
export * from './user-client';

View File

@@ -1,33 +0,0 @@
import router from '@/router';
import { useUserStore } from '@/stores';
import { getAppEnvConfig, RequestClient } from '@/utils';
import type { AxiosError } from 'axios';
export const userClient = new RequestClient({
requestInterceptor: (config) => {
const userStore = useUserStore();
const { lampAuthorization, lampClientId, lampClientSecret } = getAppEnvConfig();
const newAuthorization = window.btoa(`${lampClientId}:${lampClientSecret}`);
const authorization = lampAuthorization.trim() !== '' ? lampAuthorization : newAuthorization;
config.headers.set('accept-language', 'zh-CN,zh;q=0.9');
config.headers.set('accept', 'application/json, text/plain, */*');
config.headers.set('Applicationid', '');
config.headers.set('Tenantid', '1');
config.headers.set('Authorization', authorization);
config.headers.set('token', userStore.userLoginResult?.token ?? '');
return config;
},
responseInterceptor: (response) => {
return response;
},
responseErrorInterceptor: (error) => {
const err = error as AxiosError;
if (err.response?.status === 401) {
window.$message.error('登录超时,请重新登录');
const userStore = useUserStore();
userStore.resetStore();
router.push('/login');
}
return Promise.reject(error);
},
});

View File

@@ -1,6 +0,0 @@
export * from './ndm-camera-diag-info';
export * from './ndm-decoder-diag-info';
export * from './ndm-nvr-diag-info';
export * from './ndm-security-box-diag-info';
export * from './ndm-server-diag-info';
export * from './ndm-switch-diag-info';

View File

@@ -1,2 +0,0 @@
export * from './diag';
export * from './station';

View File

@@ -1,18 +0,0 @@
import type { DeviceType } from '@/enums';
export interface StationAlarmCounts {
[DeviceType.AlarmHost]: number;
[DeviceType.Camera]: number;
[DeviceType.Decoder]: number;
[DeviceType.Keyboard]: number;
[DeviceType.MediaServer]: number;
[DeviceType.Nvr]: number;
[DeviceType.SecurityBox]: number;
[DeviceType.Switch]: number;
[DeviceType.VideoServer]: number;
unclassified: number;
}
export interface LineAlarmCounts {
[stationCode: string]: StationAlarmCounts;
}

View File

@@ -1,3 +0,0 @@
export * from './biz';
export * from './user';
export * from './version';

View File

@@ -1 +0,0 @@
export * from './version-info';

View File

@@ -10,12 +10,12 @@ export interface NdmSwitchDiagInfo {
}
export interface NdmSwitchPortInfo {
flow: number;
inBytes: number;
inFlow: number;
lastInBytes: number;
lastOutBytes: number;
outBytes: number;
flow: number;
inFlow: number;
outFlow: number;
portName: string;
upDown: number;

View File

@@ -0,0 +1,6 @@
export * from './diag-info/ndm-camera-diag-info';
export * from './diag-info/ndm-decoder-diag-info';
export * from './diag-info/ndm-nvr-diag-info';
export * from './diag-info/ndm-security-box-diag-info';
export * from './diag-info/ndm-server-diag-info';
export * from './diag-info/ndm-switch-diag-info';

View File

@@ -1,3 +1,2 @@
export * from './alarm';
export * from './device';
export * from './station';

View File

@@ -2,5 +2,5 @@ export interface Station {
code: string;
name: string;
online: boolean;
ip: string;
ip?: string;
}

View File

@@ -1,4 +0,0 @@
export * from './client';
export * from './domain';
export * from './model';
export * from './request';

View File

@@ -1 +0,0 @@
export * from './ndm-alarm-host';

View File

@@ -1,38 +0,0 @@
import type { BaseModel, ReduceForPageQuery, ReduceForSaveVO, ReduceForUpdateVO } from '@/apis';
export interface NdmAlarmHost extends BaseModel {
deviceId: string;
name: string;
manufacturer: string;
state: boolean;
model: string;
ipAddress: string;
manageUrl: string;
manageUsername: string;
managePassword: string;
gbCode: string;
gbPort: number;
gbDomain: string;
gb28181Enabled: boolean;
diagFlag: string;
diagParam: string;
diagFormat: string;
lastDiagInfo: string;
lastDiagTime: string;
icmpEnabled: boolean;
description: string;
deviceStatus: string;
deviceType: string;
community: string;
frontendConfig: string;
linkDescription: string;
snmpEnabled: boolean;
}
export type NdmAlarmHostResultVO = Partial<NdmAlarmHost>;
export type NdmAlarmHostSaveVO = Partial<Omit<NdmAlarmHost, ReduceForSaveVO>>;
export type NdmAlarmHostUpdateVO = Partial<Omit<NdmAlarmHost, ReduceForUpdateVO>>;
export type NdmAlarmHostPageQuery = Partial<Omit<NdmAlarmHost, ReduceForPageQuery>>;

View File

@@ -1,19 +0,0 @@
import type { NdmAlarmHost } from './alarm';
import type { NdmSecurityBox, NdmSwitch } from './other';
import type { NdmNvr } from './storage';
import type { NdmCamera, NdmDecoder, NdmKeyboard, NdmMediaServer, NdmVideoServer } from './video';
export type NdmDeviceVO = NdmAlarmHost | NdmCamera | NdmDecoder | NdmKeyboard | NdmMediaServer | NdmNvr | NdmSecurityBox | NdmSwitch | NdmVideoServer;
export type NdmDeviceResultVO = Partial<NdmDeviceVO>;
export type NdmServerVO = NdmMediaServer | NdmVideoServer;
export type NdmServerResultVO = Partial<NdmServerVO>;
export * from './alarm';
export * from './log';
export * from './other';
export * from './storage';
export * from './upper-ndm';
export * from './video';

View File

@@ -1,6 +0,0 @@
export * from './ndm-call-log';
export * from './ndm-device-alarm-log';
export * from './ndm-icmp-log';
export * from './ndm-record-check';
export * from './ndm-snmp-log';
export * from './ndm-vimp-log';

View File

@@ -1,17 +0,0 @@
import type { BaseModel, ReduceForPageQuery, ReduceForSaveVO, ReduceForUpdateVO } from '@/apis';
export interface NdmCallLog extends BaseModel {
sourceGbId: string;
targetGbId: string;
method: string;
messageType: string;
cmdType: string;
}
export type NdmCallLogResultVO = Partial<NdmCallLog>;
export type NdmCallLogSaveVO = Partial<Omit<NdmCallLog, ReduceForSaveVO>>;
export type NdmCallLogUpdateVO = Partial<Omit<NdmCallLog, ReduceForUpdateVO>>;
export type NdmCallLogPageQuery = Partial<Omit<NdmCallLog, ReduceForPageQuery>>;

View File

@@ -1,16 +0,0 @@
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '@/apis';
export interface NdmIcmpLog extends BaseModel {
deviceId: string;
name: string;
ipAddress: string;
deviceStatus: string;
}
export type NdmIcmpLogResultVO = Partial<NdmIcmpLog>;
export type NdmIcmpLogSaveVO = Partial<Omit<NdmIcmpLog, ReduceForSaveVO>>;
export type NdmIcmpLogUpdateVO = Partial<Omit<NdmIcmpLog, ReduceForUpdateVO>>;
export type NdmIcmpLogPageQuery = Partial<Omit<NdmIcmpLog, ReduceForPageQuery>>;

View File

@@ -1,8 +0,0 @@
export interface NdmRecordCheck {
gbCode: string;
parentGbCode: string;
name: string;
ipAddress: string;
diagInfo: string;
checkDate: string;
}

View File

@@ -1,17 +0,0 @@
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '@/apis';
export interface NdmSnmpLog extends BaseModel {
deviceId: string;
name: string;
ipAddress: string;
diagInfo: string;
deviceType: string;
}
export type NdmSnmpLogResultVO = Partial<NdmSnmpLog>;
export type NdmSnmpLogSaveVO = Partial<Omit<NdmSnmpLog, ReduceForSaveVO>>;
export type NdmSnmpLogUpdateVO = Partial<Omit<NdmSnmpLog, ReduceForUpdateVO>>;
export type NdmSnmpLogPageQuery = Partial<Omit<NdmSnmpLog, ReduceForPageQuery>>;

View File

@@ -1,25 +0,0 @@
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '@/apis';
export interface NdmVimpLog extends BaseModel {
requestIp: string;
description: string;
classPath: string;
methodName: string;
startTime: string;
endTime: string;
consumedTime: string;
params: string;
result: string;
httpMethod: string;
userId: string;
logType: number;
targetCode: string;
}
export type NdmVimpLogResultVO = Partial<NdmVimpLog>;
export type NdmVimpLogSaveVO = Partial<Omit<NdmVimpLog, ReduceForSaveVO>>;
export type NdmVimpLogUpdateVO = Partial<Omit<NdmVimpLog, ReduceForUpdateVO>>;
export type NdmVimpLogPageQuery = Partial<Omit<NdmVimpLog, ReduceForPageQuery>>;

View File

@@ -1,2 +0,0 @@
export * from './ndm-security-box';
export * from './ndm-switch';

View File

@@ -1 +0,0 @@
export * from './ndm-nvr';

View File

@@ -1,45 +0,0 @@
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '@/apis';
export interface NdmNvr extends BaseModel {
deviceId: string;
name: string;
manufacturer: string;
state: boolean;
model: string;
ipAddress: string;
manageUrl: string;
manageUsername: string;
managePassword: string;
gbCode: string;
gbPort: number;
gbDomain: string;
gb28181Enabled: boolean;
onvifPort: number;
onvifUsername: string;
onvifPassword: string;
onvifMajorIndex: number;
onvifMinorIndex: number;
diagFlag: string;
diagParam: string;
diagFormat: string;
lastDiagInfo: string;
lastDiagTime: string;
icmpEnabled: boolean;
description: string;
deviceStatus: string;
deviceType: string;
community: string;
frontendConfig: string;
linkDescription: string;
snmpEnabled: boolean;
recordCheckEnabled: boolean;
clusterList: string;
}
export type NdmNvrResultVO = Partial<NdmNvr>;
export type NdmNvrSaveVO = Partial<Omit<NdmNvr, ReduceForSaveVO>>;
export type NdmNvrUpdateVO = Partial<Omit<NdmNvr, ReduceForUpdateVO>>;
export type NdmNvrPageQuery = Partial<Omit<NdmNvr, ReduceForPageQuery>>;

View File

@@ -1,2 +0,0 @@
export * from './sync-camera-result';
export * from './sync-camera-result-detail';

View File

@@ -1,6 +0,0 @@
export interface SyncCameraResultDetail {
name: string;
deviceId: string;
ipAddress: string;
gbCode: string;
}

View File

@@ -1,10 +0,0 @@
import type { SyncCameraResultDetail } from './sync-camera-result-detail';
export interface SyncCameraResult {
stationCode: string;
startTime: string;
endTime: string;
insertList: SyncCameraResultDetail[];
updateList: SyncCameraResultDetail[];
deleteList: SyncCameraResultDetail[];
}

View File

@@ -1,6 +0,0 @@
export * from './ndm-camera';
export * from './ndm-camera-ignore';
export * from './ndm-decoder';
export * from './ndm-keyboard';
export * from './ndm-media-server';
export * from './ndm-video-server';

View File

@@ -1,14 +0,0 @@
import type { BaseModel, ReduceForPageQuery, ReduceForSaveVO, ReduceForUpdateVO } from '@/apis';
export interface NdmCameraIgnore extends BaseModel {
deviceId: string;
ignoreType: string;
}
export type NdmCameraIgnoreResultVO = Partial<NdmCameraIgnore>;
export type NdmCameraIgnoreSaveVO = Partial<Omit<NdmCameraIgnore, ReduceForSaveVO>>;
export type NdmCameraIgnoreUpdateVO = Partial<Omit<NdmCameraIgnore, ReduceForUpdateVO>>;
export type NdmCameraIgnorePageQuery = Partial<Omit<NdmCameraIgnore, ReduceForPageQuery>>;

View File

@@ -1,4 +0,0 @@
export * from './entity';
export * from './nvr';
export * from './verify';
export * from './vimp';

View File

@@ -1,15 +0,0 @@
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;
}

View File

@@ -1,3 +0,0 @@
export * from './client-channel';
export * from './record-info';
export * from './record-item';

View File

@@ -1,12 +0,0 @@
import type { RecordItem } from './record-item';
export interface RecordInfo {
deviceId: string;
channelId: string;
sn: string;
name: string;
sumNum: number;
count: number;
lastTime: number;
recordList: RecordItem[];
}

View File

@@ -1,4 +0,0 @@
export interface RecordItem {
startTime: string;
endTime: string;
}

View File

@@ -1 +0,0 @@
export * from './verify-server';

View File

@@ -1,7 +0,0 @@
export interface VerifyServer {
name: string;
ipAddress: string;
stationCode: string;
verifyUrl: string;
onlineState: boolean;
}

View File

@@ -1 +0,0 @@
export * from './snap-result';

View File

@@ -1,5 +0,0 @@
export interface SnapResult {
absoluteFilePath: string;
path: string;
url: string;
}

View File

@@ -1,17 +0,0 @@
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '@/apis';
export interface DefParameter extends BaseModel {
key: string;
value: string;
name: string;
remarks: string;
paramType: string;
}
export type DefParameterResultVO = Partial<DefParameter>;
export type DefParameterSaveVO = Partial<Omit<DefParameter, ReduceForSaveVO>>;
export type DefParameterUpdateVO = Partial<Omit<DefParameter, ReduceForUpdateVO>>;
export type DefParameterPageQuery = Partial<Omit<DefParameter, ReduceForPageQuery>>;

View File

@@ -0,0 +1,29 @@
import type { NdmSecurityBoxVO } from './other/ndm-security-box';
import type { NdmSwitchVO } from './other/ndm-switch';
import type { NdmNvrVO } from './storage/ndm-nvr';
import type { NdmCameraVO } from './video/ndm-camera';
import type { NdmDecoderVO } from './video/ndm-decoder';
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 './log/ndm-device-alarm-log';
export * from './log/ndm-icmp-log';
export * from './log/ndm-snmp-log';
export * from './log/ndm-vimp-log';
export * from './other/ndm-security-box';
export * from './other/ndm-switch';
export * from './storage/ndm-nvr';
export * from './video/ndm-camera';
export * from './video/ndm-decoder';
export * from './video/ndm-keyboard';
export * from './video/ndm-media-server';
export * from './video/ndm-video-server';
export type NdmDeviceVO = NdmSecurityBoxVO | NdmSwitchVO | NdmNvrVO | NdmCameraVO | NdmDecoderVO | NdmKeyboardVO | NdmMediaServerVO | NdmVideoServerVO;
export type NdmDeviceResultVO = Partial<NdmDeviceVO>;
export type NdmServerVO = NdmMediaServerVO | NdmVideoServerVO;
export type NdmServerResultVO = Partial<NdmServerVO>;

View File

@@ -1,6 +1,6 @@
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '@/apis';
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '../../base';
export interface NdmDeviceAlarmLog extends BaseModel {
export interface NdmDeviceAlarmLogVO extends BaseModel {
alarmNo: string;
alarmDate: string;
faultLocation: string;
@@ -18,10 +18,10 @@ export interface NdmDeviceAlarmLog extends BaseModel {
stationCode: string;
}
export type NdmDeviceAlarmLogResultVO = Partial<NdmDeviceAlarmLog>;
export type NdmDeviceAlarmLogResultVO = Partial<NdmDeviceAlarmLogVO>;
export type NdmDeviceAlarmLogSaveVO = Partial<Omit<NdmDeviceAlarmLog, ReduceForSaveVO>>;
export type NdmDeviceAlarmLogSaveVO = Partial<Omit<NdmDeviceAlarmLogVO, ReduceForSaveVO>>;
export type NdmDeviceAlarmLogUpdateVO = Partial<Omit<NdmDeviceAlarmLog, ReduceForUpdateVO>>;
export type NdmDeviceAlarmLogUpdateVO = Partial<Omit<NdmDeviceAlarmLogVO, ReduceForUpdateVO>>;
export type NdmDeviceAlarmLogPageQuery = Partial<Omit<NdmDeviceAlarmLog, ReduceForPageQuery>>;
export type NdmDeviceAlarmLogPageQuery = Partial<Omit<NdmDeviceAlarmLogVO, ReduceForPageQuery>>;

View File

@@ -0,0 +1,16 @@
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '../../base';
export interface NdmIcmpLogVO extends BaseModel {
deviceId: string;
name: string;
ipAddress: string;
deviceStatus: string;
}
export type NdmIcmpLogResultVO = Partial<NdmIcmpLogVO>;
export type NdmIcmpLogSaveVO = Partial<Omit<NdmIcmpLogVO, ReduceForSaveVO>>;
export type NdmIcmpLogUpdateVO = Partial<Omit<NdmIcmpLogVO, ReduceForUpdateVO>>;
export type NdmIcmpLogPageQuery = Partial<Omit<NdmIcmpLogVO, ReduceForPageQuery>>;

View File

@@ -0,0 +1,17 @@
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '../../base';
export interface NdmSnmpLogVO extends BaseModel {
deviceId: string;
name: string;
ipAddress: string;
diagInfo: string;
deviceType: string;
}
export type NdmSnmpLogResultVO = Partial<NdmSnmpLogVO>;
export type NdmSnmpLogSaveVO = Partial<Omit<NdmSnmpLogVO, ReduceForSaveVO>>;
export type NdmSnmpLogUpdateVO = Partial<Omit<NdmSnmpLogVO, ReduceForUpdateVO>>;
export type NdmSnmpLogPageQuery = Partial<Omit<NdmSnmpLogVO, ReduceForPageQuery>>;

View File

@@ -0,0 +1,25 @@
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '../../base';
export interface NdmVimpLogVO extends BaseModel {
requestIp: string;
description: string;
classPath: string;
methodName: string;
startTime: string;
endTime: string;
consumedTime: string;
params: string;
result: string;
httpMethod: string;
userId: string;
logType: number;
targetCode: string;
}
export type NdmVimpLogResultVO = Partial<NdmVimpLogVO>;
export type NdmVimpLogSaveVO = Partial<Omit<NdmVimpLogVO, ReduceForSaveVO>>;
export type NdmVimpLogUpdateVO = Partial<Omit<NdmVimpLogVO, ReduceForUpdateVO>>;
export type NdmVimpLogPageQuery = Partial<Omit<NdmVimpLogVO, ReduceForPageQuery>>;

View File

@@ -1,6 +1,6 @@
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '@/apis';
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '../../base';
export interface NdmSecurityBox extends BaseModel {
export interface NdmSecurityBoxVO extends BaseModel {
deviceId: string;
name: string;
manufacturer: string;
@@ -25,10 +25,10 @@ export interface NdmSecurityBox extends BaseModel {
snmpEnabled: boolean;
}
export type NdmSecurityBoxResultVO = Partial<NdmSecurityBox>;
export type NdmSecurityBoxResultVO = Partial<NdmSecurityBoxVO>;
export type NdmSecurityBoxSaveVO = Partial<Omit<NdmSecurityBox, ReduceForSaveVO>>;
export type NdmSecurityBoxSaveVO = Partial<Omit<NdmSecurityBoxVO, ReduceForSaveVO>>;
export type NdmSecurityBoxUpdateVO = Partial<Omit<NdmSecurityBox, ReduceForUpdateVO>>;
export type NdmSecurityBoxUpdateVO = Partial<Omit<NdmSecurityBoxVO, ReduceForUpdateVO>>;
export type NdmSecurityBoxPageQuery = Partial<Omit<NdmSecurityBox, ReduceForPageQuery>>;
export type NdmSecurityBoxPageQuery = Partial<Omit<NdmSecurityBoxVO, ReduceForPageQuery>>;

View File

@@ -1,6 +1,6 @@
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '@/apis';
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '../../base';
export interface NdmSwitch extends BaseModel {
export interface NdmSwitchVO extends BaseModel {
deviceId: string;
name: string;
manufacturer: string;
@@ -25,10 +25,10 @@ export interface NdmSwitch extends BaseModel {
snmpEnabled: boolean;
}
export type NdmSwitchResultVO = Partial<NdmSwitch>;
export type NdmSwitchResultVO = Partial<NdmSwitchVO>;
export type NdmSwitchSaveVO = Partial<Omit<NdmSwitch, ReduceForSaveVO>>;
export type NdmSwitchSaveVO = Partial<Omit<NdmSwitchVO, ReduceForSaveVO>>;
export type NdmSwitchUpdateVO = Partial<Omit<NdmSwitch, ReduceForUpdateVO>>;
export type NdmSwitchUpdateVO = Partial<Omit<NdmSwitchVO, ReduceForUpdateVO>>;
export type NdmSwitchPageQuery = Partial<Omit<NdmSwitch, ReduceForPageQuery>>;
export type NdmSwitchPageQuery = Partial<Omit<NdmSwitchVO, ReduceForPageQuery>>;

View File

@@ -0,0 +1,133 @@
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '../../base';
export interface NdmNvrVO extends BaseModel {
deviceId: string;
name: string;
manufacturer: string;
state: boolean;
model: string;
ipAddress: string;
manageUrl: string;
manageUsername: string;
managePassword: string;
gbCode: string;
gbPort: number;
gbDomain: string;
gb28181Enabled: boolean;
onvifPort: number;
onvifUsername: string;
onvifPassword: string;
onvifMajorIndex: number;
onvifMinorIndex: number;
diagFlag: string;
diagParam: string;
diagFormat: string;
lastDiagInfo: string;
lastDiagTime: string;
icmpEnabled: boolean;
description: string;
deviceStatus: string;
deviceType: string;
community: string;
frontendConfig: string;
linkDescription: string;
snmpEnabled: boolean;
recordCheckEnabled: boolean;
clusterList: string;
}
export type NdmNvrResultVO = Partial<NdmNvrVO>;
export type NdmNvrSaveVO = Partial<Omit<NdmNvrVO, ReduceForSaveVO>>;
export type NdmNvrUpdateVO = Partial<Omit<NdmNvrVO, ReduceForUpdateVO>>;
export type NdmNvrPageQuery = Partial<Omit<NdmNvrVO, ReduceForPageQuery>>;
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;
}

View File

@@ -1,6 +1,6 @@
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '@/apis';
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '../../base';
export interface NdmCamera extends BaseModel {
export interface NdmCameraVO extends BaseModel {
deviceId: string;
name: string;
manufacturer: string;
@@ -35,10 +35,10 @@ export interface NdmCamera extends BaseModel {
snmpEnabled: boolean;
}
export type NdmCameraResultVO = Partial<NdmCamera>;
export type NdmCameraResultVO = Partial<NdmCameraVO>;
export type NdmCameraSaveVO = Partial<Omit<NdmCamera, ReduceForSaveVO>>;
export type NdmCameraSaveVO = Partial<Omit<NdmCameraVO, ReduceForSaveVO>>;
export type NdmCameraUpdateVO = Partial<Omit<NdmCamera, ReduceForUpdateVO>>;
export type NdmCameraUpdateVO = Partial<Omit<NdmCameraVO, ReduceForUpdateVO>>;
export type NdmCameraPageQuery = Partial<Omit<NdmCamera, ReduceForPageQuery>>;
export type NdmCameraPageQuery = Partial<Omit<NdmCameraVO, ReduceForPageQuery>>;

View File

@@ -1,6 +1,6 @@
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '@/apis';
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '../../base';
export interface NdmDecoder extends BaseModel {
export interface NdmDecoderVO extends BaseModel {
deviceId: string;
name: string;
manufacturer: string;
@@ -32,10 +32,10 @@ export interface NdmDecoder extends BaseModel {
snmpEnabled: boolean;
}
export type NdmDecoderResultVO = Partial<NdmDecoder>;
export type NdmDecoderResultVO = Partial<NdmDecoderVO>;
export type NdmDecoderSaveVO = Partial<Omit<NdmDecoder, ReduceForSaveVO>>;
export type NdmDecoderSaveVO = Partial<Omit<NdmDecoderVO, ReduceForSaveVO>>;
export type NdmDecoderUpdateVO = Partial<Omit<NdmDecoder, ReduceForUpdateVO>>;
export type NdmDecoderUpdateVO = Partial<Omit<NdmDecoderVO, ReduceForUpdateVO>>;
export type NdmDecoderPageQuery = Partial<Omit<NdmDecoder, ReduceForPageQuery>>;
export type NdmDecoderPageQuery = Partial<Omit<NdmDecoderVO, ReduceForPageQuery>>;

View File

@@ -1,6 +1,6 @@
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '@/apis';
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '../../base';
export interface NdmKeyboard extends BaseModel {
export interface NdmKeyboardVO extends BaseModel {
deviceId: string;
name: string;
manufacturer: string;
@@ -25,10 +25,10 @@ export interface NdmKeyboard extends BaseModel {
snmpEnabled: boolean;
}
export type NdmKeyboardResultVO = Partial<NdmKeyboard>;
export type NdmKeyboardResultVO = Partial<NdmKeyboardVO>;
export type NdmKeyboardSaveVO = Partial<Omit<NdmKeyboard, ReduceForSaveVO>>;
export type NdmKeyboardSaveVO = Partial<Omit<NdmKeyboardVO, ReduceForSaveVO>>;
export type NdmKeyboardUpdateVO = Partial<Omit<NdmKeyboard, ReduceForUpdateVO>>;
export type NdmKeyboardUpdateVO = Partial<Omit<NdmKeyboardVO, ReduceForUpdateVO>>;
export type NdmKeyboardPageQuery = Partial<Omit<NdmKeyboard, ReduceForPageQuery>>;
export type NdmKeyboardPageQuery = Partial<Omit<NdmKeyboardVO, ReduceForPageQuery>>;

View File

@@ -1,6 +1,6 @@
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '@/apis';
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '../../base';
export interface NdmMediaServer extends BaseModel {
export interface NdmMediaServerVO extends BaseModel {
deviceId: string;
name: string;
manufacturer: string;
@@ -29,10 +29,10 @@ export interface NdmMediaServer extends BaseModel {
snmpEnabled: boolean;
}
export type NdmMediaServerResultVO = Partial<NdmMediaServer>;
export type NdmMediaServerResultVO = Partial<NdmMediaServerVO>;
export type NdmMediaServerSaveVO = Partial<Omit<NdmMediaServer, ReduceForSaveVO>>;
export type NdmMediaServerSaveVO = Partial<Omit<NdmMediaServerVO, ReduceForSaveVO>>;
export type NdmMediaServerUpdateVO = Partial<Omit<NdmMediaServer, ReduceForUpdateVO>>;
export type NdmMediaServerUpdateVO = Partial<Omit<NdmMediaServerVO, ReduceForUpdateVO>>;
export type NdmMediaServerPageQuery = Partial<Omit<NdmMediaServer, ReduceForPageQuery>>;
export type NdmMediaServerPageQuery = Partial<Omit<NdmMediaServerVO, ReduceForPageQuery>>;

View File

@@ -1,6 +1,6 @@
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '@/apis';
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '../../base';
export interface NdmVideoServer extends BaseModel {
export interface NdmVideoServerVO extends BaseModel {
deviceId: string;
name: string;
manufacturer: string;
@@ -29,10 +29,10 @@ export interface NdmVideoServer extends BaseModel {
snmpEnabled: boolean;
}
export type NdmVideoServerResultVO = Partial<NdmVideoServer>;
export type NdmVideoServerResultVO = Partial<NdmVideoServerVO>;
export type NdmVideoServerSaveVO = Partial<Omit<NdmVideoServer, ReduceForSaveVO>>;
export type NdmVideoServerSaveVO = Partial<Omit<NdmVideoServerVO, ReduceForSaveVO>>;
export type NdmVideoServerUpdateVO = Partial<Omit<NdmVideoServer, ReduceForUpdateVO>>;
export type NdmVideoServerUpdateVO = Partial<Omit<NdmVideoServerVO, ReduceForUpdateVO>>;
export type NdmVideoServerPageQuery = Partial<Omit<NdmVideoServer, ReduceForPageQuery>>;
export type NdmVideoServerPageQuery = Partial<Omit<NdmVideoServerVO, ReduceForPageQuery>>;

View File

@@ -1,3 +1,4 @@
export * from './base';
export * from './biz';
export * from './device';
export * from './system';
export * from './user';

View File

@@ -0,0 +1,17 @@
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '../base';
export interface DefParameterVO extends BaseModel {
key: string;
value: string;
name: string;
remarks: string;
paramType: string;
}
export type DefParameterResultVO = Partial<DefParameterVO>;
export type DefParameterSaveVO = Partial<Omit<DefParameterVO, ReduceForSaveVO>>;
export type DefParameterUpdateVO = Partial<Omit<DefParameterVO, ReduceForUpdateVO>>;
export type DefParameterPageQuery = Partial<Omit<DefParameterVO, ReduceForPageQuery>>;

View File

@@ -1,39 +0,0 @@
import { detailCameraApi, detailDevoderApi, detailKeyboardAPi, detailMediaServerApi, detailNvr, detailSecurityBoxApi, detailSwitchApi, detailVideoServerApi, type NdmDeviceResultVO } from '@/apis';
import { DeviceType, tryGetDeviceTypeVal } from '@/enums';
export const detailDeviceApi = async (device: NdmDeviceResultVO, options?: { stationCode?: string; signal?: AbortSignal }): Promise<NdmDeviceResultVO | undefined> => {
const { stationCode, signal } = options ?? {};
const { id, deviceType: deviceTypeCode } = device;
if (!id || !deviceTypeCode) {
throw new Error('未知的设备');
}
const deviceTypeVal = tryGetDeviceTypeVal(deviceTypeCode);
if (!deviceTypeVal) {
throw new Error('未知的设备类型');
}
if (deviceTypeVal === DeviceType.Camera) {
return await detailCameraApi(id, { stationCode, signal });
}
if (deviceTypeVal === DeviceType.Decoder) {
return await detailDevoderApi(id, { stationCode, signal });
}
if (deviceTypeVal === DeviceType.Keyboard) {
return await detailKeyboardAPi(id, { stationCode, signal });
}
if (deviceTypeVal === DeviceType.MediaServer) {
return await detailMediaServerApi(id, { stationCode, signal });
}
if (deviceTypeVal === DeviceType.Nvr) {
return await detailNvr(id, { stationCode, signal });
}
if (deviceTypeVal === DeviceType.SecurityBox) {
return await detailSecurityBoxApi(id, { stationCode, signal });
}
if (deviceTypeVal === DeviceType.Switch) {
return await detailSwitchApi(id, { stationCode, signal });
}
if (deviceTypeVal === DeviceType.VideoServer) {
return await detailVideoServerApi(id, { stationCode, signal });
}
return undefined;
};

View File

@@ -1,2 +0,0 @@
export * from './detail-device';
export * from './probe-device';

View File

@@ -1,35 +0,0 @@
import { probeDecoderApi, probeMediaServerApi, probeNvrApi, probeSecurityBoxApi, probeSwitchApi, probeVideoServerApi, type NdmDeviceResultVO } from '@/apis';
import { DeviceType, tryGetDeviceTypeVal } from '@/enums';
export const probeDeviceApi = async (device: NdmDeviceResultVO, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const deviceType = tryGetDeviceTypeVal(device.deviceType);
const deviceDbId = device.id;
if (!deviceType || !deviceDbId) {
throw new Error('未知的设备');
}
if (deviceType === DeviceType.Decoder) {
await probeDecoderApi([deviceDbId], { stationCode, signal });
return;
}
if (deviceType === DeviceType.MediaServer) {
await probeMediaServerApi([deviceDbId], { stationCode, signal });
return;
}
if (deviceType === DeviceType.Nvr) {
await probeNvrApi([deviceDbId], { stationCode, signal });
return;
}
if (deviceType === DeviceType.SecurityBox) {
await probeSecurityBoxApi([deviceDbId], { stationCode, signal });
return;
}
if (deviceType === DeviceType.Switch) {
await probeSwitchApi([deviceDbId], { stationCode, signal });
return;
}
if (deviceType === DeviceType.VideoServer) {
await probeVideoServerApi([deviceDbId], { stationCode, signal });
return;
}
};

View File

@@ -1 +0,0 @@
export * from './reset-monitor-shedule';

View File

@@ -1,13 +0,0 @@
import { ndmClient, userClient } from '@/apis';
export const resetMonitorScheduleApi = async (options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmConstant/anyTenant/resetMonitorSchedule`;
const resp = await client.get<void>(endpoint, { signal });
const [err] = resp;
if (err) {
throw err;
}
};

View File

@@ -1,12 +0,0 @@
import { userClient, type VerifyServer } from '@/apis';
export const batchVerifyApi = async (options?: { signal?: AbortSignal }) => {
const { signal } = options ?? {};
const endpoint = '/api/ndm/ndmKeepAlive/batchVerify';
const resp = await userClient.post<VerifyServer[]>(endpoint, {}, { retRaw: true, timeout: 5000, signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};

View File

@@ -1,3 +0,0 @@
export * from './batch-verify';
export * from './ndm-icmp-export';
export * from './verify';

View File

@@ -1,13 +0,0 @@
import { ndmClient, userClient } from '@/apis';
export const verifyApi = async (options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmKeepAlive/verify`;
const resp = await client.post<void>(endpoint, {}, { timeout: 5000, signal });
const [err] = resp;
if (err) {
throw err;
}
};

View File

@@ -1,7 +0,0 @@
export * from './composed';
export * from './constant';
export * from './icmp';
export * from './log';
export * from './storage';
export * from './other';
export * from './video';

View File

@@ -1,6 +0,0 @@
export * from './ndm-call-log';
export * from './ndm-device-alarm-log';
export * from './ndm-icmp-log';
export * from './ndm-record-check';
export * from './ndm-snmp-log';
export * from './ndm-vimp-log';

View File

@@ -1,27 +0,0 @@
import { ndmClient, userClient, type NdmCallLogPageQuery, type NdmCallLogResultVO, type PageParams, type PageResult } from '@/apis';
export const pageCallLogApi = async (pageQuery: PageParams<NdmCallLogPageQuery>, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmCallLog/page`;
const resp = await client.post<PageResult<NdmCallLogResultVO>>(endpoint, pageQuery, { signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const exportCallLogApi = async (pageQuery: PageParams<NdmCallLogPageQuery>, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmCallLog/defaultExportByTemplate`;
const resp = await client.post<Blob>(endpoint, pageQuery, { responseType: 'blob', retRaw: true, signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};

View File

@@ -1,40 +0,0 @@
import { ndmClient, userClient, type NdmDeviceAlarmLogPageQuery, type NdmDeviceAlarmLogResultVO, type NdmDeviceAlarmLogUpdateVO, type PageParams, type PageResult } from '@/apis';
export const pageDeviceAlarmLogApi = async (pageQuery: PageParams<NdmDeviceAlarmLogPageQuery>, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmDeviceAlarmLog/page`;
const resp = await client.post<PageResult<NdmDeviceAlarmLogResultVO>>(endpoint, pageQuery, { signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const updateDeviceAlarmLogApi = async (updateVO: NdmDeviceAlarmLogUpdateVO, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmDeviceAlarmLog`;
const resp = await client.put<NdmDeviceAlarmLogResultVO>(endpoint, updateVO, { signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const exportDeviceAlarmLogApi = async (pageQuery: PageParams<NdmDeviceAlarmLogPageQuery>, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmDeviceAlarmLog/defaultExportByTemplate`;
const resp = await client.post<BlobPart>(endpoint, pageQuery, { responseType: 'blob', retRaw: true, signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};

View File

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

View File

@@ -1,59 +0,0 @@
import { ndmClient, userClient, type ClientChannel, type NdmNvrResultVO, type NdmRecordCheck } from '@/apis';
import dayjs from 'dayjs';
export const getChannelListApi = async (ndmNvr: NdmNvrResultVO, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmRecordCheck/getChannelList`;
const resp = await client.post<ClientChannel[]>(endpoint, { code: ndmNvr.gbCode, time: '' }, { signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const getRecordCheckApi = async (ndmNvr: NdmNvrResultVO, lastDays: number, gbCodeList: string[], options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmRecordCheck/getRecordCheckByParentId`;
const endDateTime = dayjs();
const startDateTime = endDateTime.subtract(lastDays, 'day');
const start = startDateTime.format('YYYY-MM-DD');
const end = endDateTime.format('YYYY-MM-DD');
const parentId = ndmNvr.gbCode;
const resp = await client.post<NdmRecordCheck[]>(endpoint, { start, end, parentId, gbCodeList }, { signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const reloadRecordCheckApi = async (channel: ClientChannel, dayOffset: number, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmRecordCheck/reloadRecordCheckByGbId`;
const resp = await client.post<boolean>(endpoint, { ...channel, dayOffset }, { signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const reloadAllRecordCheckApi = async (dayOffset: number, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmRecordCheck/reloadAllRecordCheck`;
const resp = await client.post<boolean>(endpoint, dayOffset, { signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};

View File

@@ -1,14 +0,0 @@
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;
};

View File

@@ -1,27 +0,0 @@
import { ndmClient, userClient, type NdmVimpLogPageQuery, type NdmVimpLogResultVO, type PageParams, type PageResult } from '@/apis';
export const pageVimpLogApi = async (pageQuery: PageParams<NdmVimpLogPageQuery>, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmVimpLog/page`;
const resp = await client.post<PageResult<NdmVimpLogResultVO>>(endpoint, pageQuery, { signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const exportVimpLogApi = async (pageQuery: PageParams<NdmVimpLogPageQuery>, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmVimpLog/defaultExportByTemplate`;
const resp = await client.post<Blob>(endpoint, pageQuery, { responseType: 'blob', retRaw: true, signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};

View File

@@ -1,2 +0,0 @@
export * from './ndm-security-box';
export * from './ndm-switch';

View File

@@ -1,78 +0,0 @@
import { ndmClient, userClient, type NdmSecurityBoxPageQuery, type NdmSecurityBoxResultVO, type NdmSecurityBoxUpdateVO, type PageParams, type PageResult } from '@/apis';
export const pageSecurityBoxApi = async (pageQuery: PageParams<NdmSecurityBoxPageQuery>, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmSecurityBox/page`;
const resp = await client.post<PageResult<NdmSecurityBoxResultVO>>(endpoint, pageQuery, { signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const detailSecurityBoxApi = async (id: string, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmSecurityBox/detail`;
const resp = await client.get<NdmSecurityBoxResultVO>(endpoint, { params: { id }, signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const updateSecurityBoxApi = async (updateVO: NdmSecurityBoxUpdateVO, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmSecurityBox`;
const resp = await client.put<NdmSecurityBoxResultVO>(endpoint, updateVO, { signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const probeSecurityBoxApi = async (ids: string[], options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmSecurityBox/probeByIds`;
const resp = await client.post<void>(endpoint, ids, { signal });
const [err] = resp;
if (err) {
throw err;
}
};
export const turnCircuitStatusApi = async (ipAddress: string, circuitIndex: number, status: number, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmSecurityBox/turnStatus`;
const resp = await client.post<boolean>(endpoint, { community: 'public', ipAddress, circuit: `${circuitIndex}`, status }, { signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const rebootSecurityBoxApi = async (ipAddress: string, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmSecurityBox/reboot`;
const resp = await client.post<boolean>(endpoint, { community: 'public', ipAddress }, { signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};

View File

@@ -1,52 +0,0 @@
import { ndmClient, userClient, type NdmSwitchPageQuery, type NdmSwitchResultVO, type NdmSwitchUpdateVO, type PageParams, type PageResult } from '@/apis';
export const pageSwitchApi = async (pageQuery: PageParams<NdmSwitchPageQuery>, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmSwitch/page`;
const resp = await client.post<PageResult<NdmSwitchResultVO>>(endpoint, pageQuery, { signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const detailSwitchApi = async (id: string, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmSwitch/detail`;
const resp = await client.get<NdmSwitchResultVO>(endpoint, { params: { id }, signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const updateSwitchApi = async (updateVO: NdmSwitchUpdateVO, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmSwitch`;
const resp = await client.put<NdmSwitchResultVO>(endpoint, updateVO, { signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const probeSwitchApi = async (ids: string[], options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmSwitch/probeByIds`;
const resp = await client.post<void>(endpoint, ids, { signal });
const [err] = resp;
if (err) {
throw err;
}
};

View File

@@ -1 +0,0 @@
export * from './ndm-nvr';

View File

@@ -1,65 +0,0 @@
import { ndmClient, userClient, type ClientChannel, type NdmNvrPageQuery, type NdmNvrResultVO, type NdmNvrUpdateVO, type NdmRecordCheck, type PageParams, type PageResult } from '@/apis';
import dayjs from 'dayjs';
export const pageNvrApi = async (pageQuery: PageParams<NdmNvrPageQuery>, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const cient = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmNvr/page`;
const resp = await cient.post<PageResult<NdmNvrResultVO>>(endpoint, pageQuery, { signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const detailNvr = async (id: string, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const cient = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmNvr/detail`;
const resp = await cient.get<NdmNvrResultVO>(endpoint, { params: { id }, signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const updateNvr = async (updateVO: NdmNvrUpdateVO, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmNvr`;
const resp = await client.put<NdmNvrResultVO>(endpoint, updateVO, { signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const probeNvrApi = async (ids: string[], options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmNvr/probeByIds`;
const resp = await client.post<void>(endpoint, ids, { signal });
const [err] = resp;
if (err) {
throw err;
}
};
export const syncNvrChannelsApi = async (options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmNvr/syncNvrChannels`;
const resp = await client.get<void>(endpoint, { signal });
const [err] = resp;
if (err) {
throw err;
}
};

View File

@@ -1,6 +0,0 @@
export * from './ndm-camera';
export * from './ndm-camera-ignore';
export * from './ndm-decoder';
export * from './ndm-keyboard';
export * from './ndm-media-server';
export * from './ndm-video-server';

View File

@@ -1,66 +0,0 @@
import { ndmClient, userClient, type NdmCameraIgnorePageQuery, type NdmCameraIgnoreResultVO, type NdmCameraIgnoreSaveVO, type NdmCameraIgnoreUpdateVO, type PageParams, type PageResult } from '@/apis';
export const pageCameraIgnoreApi = async (pageQuery: PageParams<NdmCameraIgnorePageQuery>, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmCameraIgnore/page`;
const resp = await client.post<PageResult<NdmCameraIgnoreResultVO>>(endpoint, pageQuery, { signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const detailCameraIgnoreApi = async (id: string, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmCameraIgnore/detail`;
const resp = await client.get<NdmCameraIgnoreResultVO>(endpoint, { params: { id }, signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const saveCameraIgnoreApi = async (saveVO: NdmCameraIgnoreSaveVO, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmCameraIgnore`;
const resp = await client.post<NdmCameraIgnoreResultVO>(endpoint, saveVO, { signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const updateCameraIgnoreApi = async (updateVO: NdmCameraIgnoreUpdateVO, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmCameraIgnore`;
const resp = await client.put<NdmCameraIgnoreResultVO>(endpoint, updateVO, { signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const removeCameraIgnoreApi = async (ids: string[], options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmCameraIgnore`;
const resp = await client.delete<boolean>(endpoint, ids, { signal });
const [err, data] = resp;
if (err || data === null) {
throw err;
}
return data;
};

View File

@@ -1,64 +0,0 @@
import { ndmClient, userClient, type NdmCameraPageQuery, type NdmCameraResultVO, type NdmCameraUpdateVO, type PageParams, type PageResult, type SnapResult } from '@/apis';
export const pageCameraApi = async (pageQuery: PageParams<NdmCameraPageQuery>, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmCamera/page`;
const resp = await client.post<PageResult<NdmCameraResultVO>>(endpoint, pageQuery, { signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const detailCameraApi = async (id: string, optioins?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = optioins ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmCamera/detail`;
const resp = await client.get<NdmCameraResultVO>(endpoint, { params: { id }, signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const updateCameraApi = async (updateVO: NdmCameraUpdateVO, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmCamera`;
const resp = await client.put<NdmCameraResultVO>(endpoint, updateVO, { signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const getCameraSnapApi = async (deviceId: string, options?: { signal?: AbortSignal }) => {
const { signal } = options ?? {};
const endpoint = '/api/ndm/ndmCamera/getSnapByDeviceId';
const resp = await ndmClient.get<SnapResult>(endpoint, { params: { deviceId }, signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const syncCameraApi = async (options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmCamera/syncCamera`;
const resp = await client.get<boolean>(endpoint, { signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};

View File

@@ -1,52 +0,0 @@
import { ndmClient, userClient, type NdmDecoderPageQuery, type NdmDecoderResultVO, type NdmDecoderUpdateVO, type PageParams, type PageResult } from '@/apis';
export const pageDecoderApi = async (pageQuery: PageParams<NdmDecoderPageQuery>, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmDecoder/page`;
const resp = await client.post<PageResult<NdmDecoderResultVO>>(endpoint, pageQuery, { signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const detailDevoderApi = async (id: string, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmDecoder/detail`;
const resp = await client.get<NdmDecoderResultVO>(endpoint, { params: { id }, signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const updateDecoderApi = async (updateVO: NdmDecoderUpdateVO, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmDecoder`;
const resp = await client.put<NdmDecoderResultVO>(endpoint, updateVO, { signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const probeDecoderApi = async (ids: string[], options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmDecoder/probeByIds`;
const resp = await client.post<void>(endpoint, ids, { signal });
const [err] = resp;
if (err) {
throw err;
}
};

View File

@@ -1,40 +0,0 @@
import { ndmClient, userClient, type NdmKeyboardPageQuery, type NdmKeyboardResultVO, type NdmKeyboardUpdateVO, type PageParams, type PageResult } from '@/apis';
export const pageKeyboardApi = async (pageQuery: PageParams<NdmKeyboardPageQuery>, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmKeyboard/page`;
const resp = await client.post<PageResult<NdmKeyboardResultVO>>(endpoint, pageQuery, { signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const detailKeyboardAPi = async (id: string, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmKeyboard/detail`;
const resp = await client.get<NdmKeyboardResultVO>(endpoint, { params: { id }, signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const updateKeyboardApi = async (updateVO: NdmKeyboardUpdateVO, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmKeyboard`;
const resp = await client.put<NdmKeyboardResultVO>(endpoint, updateVO, { signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};

View File

@@ -1,52 +0,0 @@
import { ndmClient, userClient, type NdmMediaServerPageQuery, type NdmMediaServerResultVO, type NdmMediaServerUpdateVO, type PageParams, type PageResult } from '@/apis';
export const pageMediaServerApi = async (pageQuery: PageParams<NdmMediaServerPageQuery>, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmMediaServer/page`;
const resp = await client.post<PageResult<NdmMediaServerResultVO>>(endpoint, pageQuery, { signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const detailMediaServerApi = async (id: string, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmMediaServer/detail`;
const resp = await client.get<NdmMediaServerResultVO>(endpoint, { params: { id }, signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const updateMediaServerApi = async (updateVO: NdmMediaServerUpdateVO, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmMediaServer`;
const resp = await client.put<NdmMediaServerResultVO>(endpoint, updateVO, { signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const probeMediaServerApi = async (ids: string[], options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmMediaServer/probeByIds`;
const resp = await client.post<void>(endpoint, ids, { signal });
const [err] = resp;
if (err) {
throw err;
}
};

View File

@@ -1,52 +0,0 @@
import { ndmClient, userClient, type NdmVideoServerPageQuery, type NdmVideoServerResultVO, type NdmVideoServerUpdateVO, type PageParams, type PageResult } from '@/apis';
export const pageVideoServerApi = async (pageQuery: PageParams<NdmVideoServerPageQuery>, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmVideoServer/page`;
const resp = await client.post<PageResult<NdmVideoServerResultVO>>(endpoint, pageQuery, { signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const detailVideoServerApi = async (id: string, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmVideoServer/detail`;
const resp = await client.get<NdmVideoServerResultVO>(endpoint, { params: { id }, signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const updateVideoServerApi = async (updateVO: NdmVideoServerUpdateVO, options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmVideoServer`;
const resp = await client.put<NdmVideoServerResultVO>(endpoint, updateVO, { signal });
const [err, data] = resp;
if (err || !data) {
throw err;
}
return data;
};
export const probeVideoServerApi = async (ids: string[], options?: { stationCode?: string; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmVideoServer/probeByIds`;
const resp = await client.post<void>(endpoint, ids, { signal });
const [err] = resp;
if (err) {
throw err;
}
};

View File

@@ -1,2 +0,0 @@
export * from './biz';
export * from './system';

Some files were not shown because too many files have changed in this diff Show More