Compare commits
52 Commits
70e3063b40
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bd7238a7f1 | ||
|
|
6c7897198c | ||
|
|
15a9f68db7 | ||
|
|
70f52eb3bb | ||
|
|
c189f79aa4 | ||
|
|
8e9bd75067 | ||
|
|
a215f2e391 | ||
|
|
e19fcf79a6 | ||
|
|
54591f401f | ||
|
|
2116631ba6 | ||
|
|
b4e2926f08 | ||
|
|
168d11c71b | ||
|
|
b0c0b88091 | ||
|
|
f7d1d2d44c | ||
|
|
de723dce00 | ||
|
|
f0ab42613b | ||
|
|
4272cd90de | ||
|
|
fb7657f99c | ||
|
|
7f9d868643 | ||
|
|
f278a690c6 | ||
|
|
d4eade65c4 | ||
|
|
dec1c4ea17 | ||
|
|
68052f7630 | ||
|
|
8fa904dfc0 | ||
|
|
05297b22cb | ||
|
|
41c9b4c5ed | ||
|
|
7e007e68cf | ||
|
|
0f578a43f0 | ||
|
|
68636d13a4 | ||
|
|
3390f4806a | ||
|
|
226d8855fd | ||
|
|
0e1fb75d2c | ||
|
|
ffdc8b0d4b | ||
|
|
3616276460 | ||
|
|
5e464f6e80 | ||
|
|
2dd599d2eb | ||
|
|
a486f76aaf | ||
|
|
00a961c346 | ||
|
|
b5b0c5448d | ||
|
|
9b3c5c9fc3 | ||
|
|
3ede757843 | ||
|
|
c5c363d32c | ||
|
|
cbb51aa501 | ||
|
|
4ab33d2021 | ||
|
|
fa9b435a0f | ||
|
|
dfbdc6d828 | ||
|
|
5fa668acd3 | ||
|
|
2f06054e66 | ||
|
|
df3888d8b5 | ||
|
|
91a665695e | ||
|
|
0c3e9c24f9 | ||
|
|
799a5af857 |
3
.env
3
.env
@@ -15,5 +15,8 @@ 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
|
||||
|
||||
@@ -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 { useThemeStore } from '@/stores/theme';
|
||||
import { useSettingStore } from '@/stores';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { VueQueryDevtools } from '@tanstack/vue-query-devtools';
|
||||
import { useVersionCheckQuery } from './composables/query';
|
||||
|
||||
const themeStore = useThemeStore();
|
||||
const { themeMode } = storeToRefs(themeStore);
|
||||
const settingStore = useSettingStore();
|
||||
const { themeMode } = storeToRefs(settingStore);
|
||||
|
||||
useVersionCheckQuery();
|
||||
</script>
|
||||
|
||||
2
src/apis/client/index.ts
Normal file
2
src/apis/client/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from './ndm-client';
|
||||
export * from './user-client';
|
||||
@@ -1,44 +1,8 @@
|
||||
import { useUserStore } from '@/stores';
|
||||
import { getAppEnvConfig, RequestClient } from '@/utils';
|
||||
import type { AxiosError } from 'axios';
|
||||
|
||||
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({
|
||||
export const ndmClient = new RequestClient({
|
||||
requestInterceptor: async (config) => {
|
||||
const userStore = useUserStore();
|
||||
const { lampAuthorization, lampClientId, lampClientSecret } = getAppEnvConfig();
|
||||
33
src/apis/client/user-client.ts
Normal file
33
src/apis/client/user-client.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
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);
|
||||
},
|
||||
});
|
||||
6
src/apis/domain/biz/diag/index.ts
Normal file
6
src/apis/domain/biz/diag/index.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
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';
|
||||
@@ -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;
|
||||
2
src/apis/domain/biz/index.ts
Normal file
2
src/apis/domain/biz/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from './diag';
|
||||
export * from './station';
|
||||
18
src/apis/domain/biz/station/alarm.ts
Normal file
18
src/apis/domain/biz/station/alarm.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
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;
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
import type {
|
||||
NdmAlarmHostResultVO,
|
||||
NdmCameraResultVO,
|
||||
NdmDecoderResultVO,
|
||||
NdmKeyboardResultVO,
|
||||
@@ -7,10 +8,11 @@ import type {
|
||||
NdmSecurityBoxResultVO,
|
||||
NdmSwitchResultVO,
|
||||
NdmVideoServerResultVO,
|
||||
} from '@/apis/models';
|
||||
import type { DeviceType } from '@/enums/device-type';
|
||||
} from '@/apis';
|
||||
import type { DeviceType } from '@/enums';
|
||||
|
||||
export interface StationDevices {
|
||||
[DeviceType.AlarmHost]: NdmAlarmHostResultVO[];
|
||||
[DeviceType.Camera]: NdmCameraResultVO[];
|
||||
[DeviceType.Decoder]: NdmDecoderResultVO[];
|
||||
[DeviceType.Keyboard]: NdmKeyboardResultVO[];
|
||||
@@ -1,2 +1,3 @@
|
||||
export * from './alarm';
|
||||
export * from './device';
|
||||
export * from './station';
|
||||
@@ -2,5 +2,5 @@ export interface Station {
|
||||
code: string;
|
||||
name: string;
|
||||
online: boolean;
|
||||
ip?: string;
|
||||
ip: string;
|
||||
}
|
||||
3
src/apis/domain/index.ts
Normal file
3
src/apis/domain/index.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export * from './biz';
|
||||
export * from './user';
|
||||
export * from './version';
|
||||
1
src/apis/domain/version/index.ts
Normal file
1
src/apis/domain/version/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './version-info';
|
||||
@@ -1,6 +0,0 @@
|
||||
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';
|
||||
4
src/apis/index.ts
Normal file
4
src/apis/index.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export * from './client';
|
||||
export * from './domain';
|
||||
export * from './model';
|
||||
export * from './request';
|
||||
1
src/apis/model/biz/entity/alarm/index.ts
Normal file
1
src/apis/model/biz/entity/alarm/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './ndm-alarm-host';
|
||||
38
src/apis/model/biz/entity/alarm/ndm-alarm-host.ts
Normal file
38
src/apis/model/biz/entity/alarm/ndm-alarm-host.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
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>>;
|
||||
19
src/apis/model/biz/entity/index.ts
Normal file
19
src/apis/model/biz/entity/index.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
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';
|
||||
6
src/apis/model/biz/entity/log/index.ts
Normal file
6
src/apis/model/biz/entity/log/index.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
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';
|
||||
17
src/apis/model/biz/entity/log/ndm-call-log.ts
Normal file
17
src/apis/model/biz/entity/log/ndm-call-log.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
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>>;
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '../../base';
|
||||
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '@/apis';
|
||||
|
||||
export interface NdmDeviceAlarmLogVO extends BaseModel {
|
||||
export interface NdmDeviceAlarmLog extends BaseModel {
|
||||
alarmNo: string;
|
||||
alarmDate: string;
|
||||
faultLocation: string;
|
||||
@@ -18,10 +18,10 @@ export interface NdmDeviceAlarmLogVO extends BaseModel {
|
||||
stationCode: string;
|
||||
}
|
||||
|
||||
export type NdmDeviceAlarmLogResultVO = Partial<NdmDeviceAlarmLogVO>;
|
||||
export type NdmDeviceAlarmLogResultVO = Partial<NdmDeviceAlarmLog>;
|
||||
|
||||
export type NdmDeviceAlarmLogSaveVO = Partial<Omit<NdmDeviceAlarmLogVO, ReduceForSaveVO>>;
|
||||
export type NdmDeviceAlarmLogSaveVO = Partial<Omit<NdmDeviceAlarmLog, ReduceForSaveVO>>;
|
||||
|
||||
export type NdmDeviceAlarmLogUpdateVO = Partial<Omit<NdmDeviceAlarmLogVO, ReduceForUpdateVO>>;
|
||||
export type NdmDeviceAlarmLogUpdateVO = Partial<Omit<NdmDeviceAlarmLog, ReduceForUpdateVO>>;
|
||||
|
||||
export type NdmDeviceAlarmLogPageQuery = Partial<Omit<NdmDeviceAlarmLogVO, ReduceForPageQuery>>;
|
||||
export type NdmDeviceAlarmLogPageQuery = Partial<Omit<NdmDeviceAlarmLog, ReduceForPageQuery>>;
|
||||
16
src/apis/model/biz/entity/log/ndm-icmp-log.ts
Normal file
16
src/apis/model/biz/entity/log/ndm-icmp-log.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
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>>;
|
||||
8
src/apis/model/biz/entity/log/ndm-record-check.ts
Normal file
8
src/apis/model/biz/entity/log/ndm-record-check.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export interface NdmRecordCheck {
|
||||
gbCode: string;
|
||||
parentGbCode: string;
|
||||
name: string;
|
||||
ipAddress: string;
|
||||
diagInfo: string;
|
||||
checkDate: string;
|
||||
}
|
||||
17
src/apis/model/biz/entity/log/ndm-snmp-log.ts
Normal file
17
src/apis/model/biz/entity/log/ndm-snmp-log.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
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>>;
|
||||
25
src/apis/model/biz/entity/log/ndm-vimp-log.ts
Normal file
25
src/apis/model/biz/entity/log/ndm-vimp-log.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
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>>;
|
||||
2
src/apis/model/biz/entity/other/index.ts
Normal file
2
src/apis/model/biz/entity/other/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from './ndm-security-box';
|
||||
export * from './ndm-switch';
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '../../base';
|
||||
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '@/apis';
|
||||
|
||||
export interface NdmSecurityBoxVO extends BaseModel {
|
||||
export interface NdmSecurityBox extends BaseModel {
|
||||
deviceId: string;
|
||||
name: string;
|
||||
manufacturer: string;
|
||||
@@ -25,10 +25,10 @@ export interface NdmSecurityBoxVO extends BaseModel {
|
||||
snmpEnabled: boolean;
|
||||
}
|
||||
|
||||
export type NdmSecurityBoxResultVO = Partial<NdmSecurityBoxVO>;
|
||||
export type NdmSecurityBoxResultVO = Partial<NdmSecurityBox>;
|
||||
|
||||
export type NdmSecurityBoxSaveVO = Partial<Omit<NdmSecurityBoxVO, ReduceForSaveVO>>;
|
||||
export type NdmSecurityBoxSaveVO = Partial<Omit<NdmSecurityBox, ReduceForSaveVO>>;
|
||||
|
||||
export type NdmSecurityBoxUpdateVO = Partial<Omit<NdmSecurityBoxVO, ReduceForUpdateVO>>;
|
||||
export type NdmSecurityBoxUpdateVO = Partial<Omit<NdmSecurityBox, ReduceForUpdateVO>>;
|
||||
|
||||
export type NdmSecurityBoxPageQuery = Partial<Omit<NdmSecurityBoxVO, ReduceForPageQuery>>;
|
||||
export type NdmSecurityBoxPageQuery = Partial<Omit<NdmSecurityBox, ReduceForPageQuery>>;
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '../../base';
|
||||
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '@/apis';
|
||||
|
||||
export interface NdmSwitchVO extends BaseModel {
|
||||
export interface NdmSwitch extends BaseModel {
|
||||
deviceId: string;
|
||||
name: string;
|
||||
manufacturer: string;
|
||||
@@ -25,10 +25,10 @@ export interface NdmSwitchVO extends BaseModel {
|
||||
snmpEnabled: boolean;
|
||||
}
|
||||
|
||||
export type NdmSwitchResultVO = Partial<NdmSwitchVO>;
|
||||
export type NdmSwitchResultVO = Partial<NdmSwitch>;
|
||||
|
||||
export type NdmSwitchSaveVO = Partial<Omit<NdmSwitchVO, ReduceForSaveVO>>;
|
||||
export type NdmSwitchSaveVO = Partial<Omit<NdmSwitch, ReduceForSaveVO>>;
|
||||
|
||||
export type NdmSwitchUpdateVO = Partial<Omit<NdmSwitchVO, ReduceForUpdateVO>>;
|
||||
export type NdmSwitchUpdateVO = Partial<Omit<NdmSwitch, ReduceForUpdateVO>>;
|
||||
|
||||
export type NdmSwitchPageQuery = Partial<Omit<NdmSwitchVO, ReduceForPageQuery>>;
|
||||
export type NdmSwitchPageQuery = Partial<Omit<NdmSwitch, ReduceForPageQuery>>;
|
||||
1
src/apis/model/biz/entity/storage/index.ts
Normal file
1
src/apis/model/biz/entity/storage/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './ndm-nvr';
|
||||
45
src/apis/model/biz/entity/storage/ndm-nvr.ts
Normal file
45
src/apis/model/biz/entity/storage/ndm-nvr.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
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>>;
|
||||
2
src/apis/model/biz/entity/upper-ndm/index.ts
Normal file
2
src/apis/model/biz/entity/upper-ndm/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from './sync-camera-result';
|
||||
export * from './sync-camera-result-detail';
|
||||
@@ -0,0 +1,6 @@
|
||||
export interface SyncCameraResultDetail {
|
||||
name: string;
|
||||
deviceId: string;
|
||||
ipAddress: string;
|
||||
gbCode: string;
|
||||
}
|
||||
10
src/apis/model/biz/entity/upper-ndm/sync-camera-result.ts
Normal file
10
src/apis/model/biz/entity/upper-ndm/sync-camera-result.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import type { SyncCameraResultDetail } from './sync-camera-result-detail';
|
||||
|
||||
export interface SyncCameraResult {
|
||||
stationCode: string;
|
||||
startTime: string;
|
||||
endTime: string;
|
||||
insertList: SyncCameraResultDetail[];
|
||||
updateList: SyncCameraResultDetail[];
|
||||
deleteList: SyncCameraResultDetail[];
|
||||
}
|
||||
6
src/apis/model/biz/entity/video/index.ts
Normal file
6
src/apis/model/biz/entity/video/index.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
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';
|
||||
14
src/apis/model/biz/entity/video/ndm-camera-ignore.ts
Normal file
14
src/apis/model/biz/entity/video/ndm-camera-ignore.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
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>>;
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '../../base';
|
||||
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '@/apis';
|
||||
|
||||
export interface NdmCameraVO extends BaseModel {
|
||||
export interface NdmCamera extends BaseModel {
|
||||
deviceId: string;
|
||||
name: string;
|
||||
manufacturer: string;
|
||||
@@ -35,10 +35,10 @@ export interface NdmCameraVO extends BaseModel {
|
||||
snmpEnabled: boolean;
|
||||
}
|
||||
|
||||
export type NdmCameraResultVO = Partial<NdmCameraVO>;
|
||||
export type NdmCameraResultVO = Partial<NdmCamera>;
|
||||
|
||||
export type NdmCameraSaveVO = Partial<Omit<NdmCameraVO, ReduceForSaveVO>>;
|
||||
export type NdmCameraSaveVO = Partial<Omit<NdmCamera, ReduceForSaveVO>>;
|
||||
|
||||
export type NdmCameraUpdateVO = Partial<Omit<NdmCameraVO, ReduceForUpdateVO>>;
|
||||
export type NdmCameraUpdateVO = Partial<Omit<NdmCamera, ReduceForUpdateVO>>;
|
||||
|
||||
export type NdmCameraPageQuery = Partial<Omit<NdmCameraVO, ReduceForPageQuery>>;
|
||||
export type NdmCameraPageQuery = Partial<Omit<NdmCamera, ReduceForPageQuery>>;
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '../../base';
|
||||
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '@/apis';
|
||||
|
||||
export interface NdmDecoderVO extends BaseModel {
|
||||
export interface NdmDecoder extends BaseModel {
|
||||
deviceId: string;
|
||||
name: string;
|
||||
manufacturer: string;
|
||||
@@ -32,10 +32,10 @@ export interface NdmDecoderVO extends BaseModel {
|
||||
snmpEnabled: boolean;
|
||||
}
|
||||
|
||||
export type NdmDecoderResultVO = Partial<NdmDecoderVO>;
|
||||
export type NdmDecoderResultVO = Partial<NdmDecoder>;
|
||||
|
||||
export type NdmDecoderSaveVO = Partial<Omit<NdmDecoderVO, ReduceForSaveVO>>;
|
||||
export type NdmDecoderSaveVO = Partial<Omit<NdmDecoder, ReduceForSaveVO>>;
|
||||
|
||||
export type NdmDecoderUpdateVO = Partial<Omit<NdmDecoderVO, ReduceForUpdateVO>>;
|
||||
export type NdmDecoderUpdateVO = Partial<Omit<NdmDecoder, ReduceForUpdateVO>>;
|
||||
|
||||
export type NdmDecoderPageQuery = Partial<Omit<NdmDecoderVO, ReduceForPageQuery>>;
|
||||
export type NdmDecoderPageQuery = Partial<Omit<NdmDecoder, ReduceForPageQuery>>;
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '../../base';
|
||||
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '@/apis';
|
||||
|
||||
export interface NdmKeyboardVO extends BaseModel {
|
||||
export interface NdmKeyboard extends BaseModel {
|
||||
deviceId: string;
|
||||
name: string;
|
||||
manufacturer: string;
|
||||
@@ -25,10 +25,10 @@ export interface NdmKeyboardVO extends BaseModel {
|
||||
snmpEnabled: boolean;
|
||||
}
|
||||
|
||||
export type NdmKeyboardResultVO = Partial<NdmKeyboardVO>;
|
||||
export type NdmKeyboardResultVO = Partial<NdmKeyboard>;
|
||||
|
||||
export type NdmKeyboardSaveVO = Partial<Omit<NdmKeyboardVO, ReduceForSaveVO>>;
|
||||
export type NdmKeyboardSaveVO = Partial<Omit<NdmKeyboard, ReduceForSaveVO>>;
|
||||
|
||||
export type NdmKeyboardUpdateVO = Partial<Omit<NdmKeyboardVO, ReduceForUpdateVO>>;
|
||||
export type NdmKeyboardUpdateVO = Partial<Omit<NdmKeyboard, ReduceForUpdateVO>>;
|
||||
|
||||
export type NdmKeyboardPageQuery = Partial<Omit<NdmKeyboardVO, ReduceForPageQuery>>;
|
||||
export type NdmKeyboardPageQuery = Partial<Omit<NdmKeyboard, ReduceForPageQuery>>;
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '../../base';
|
||||
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '@/apis';
|
||||
|
||||
export interface NdmMediaServerVO extends BaseModel {
|
||||
export interface NdmMediaServer extends BaseModel {
|
||||
deviceId: string;
|
||||
name: string;
|
||||
manufacturer: string;
|
||||
@@ -29,10 +29,10 @@ export interface NdmMediaServerVO extends BaseModel {
|
||||
snmpEnabled: boolean;
|
||||
}
|
||||
|
||||
export type NdmMediaServerResultVO = Partial<NdmMediaServerVO>;
|
||||
export type NdmMediaServerResultVO = Partial<NdmMediaServer>;
|
||||
|
||||
export type NdmMediaServerSaveVO = Partial<Omit<NdmMediaServerVO, ReduceForSaveVO>>;
|
||||
export type NdmMediaServerSaveVO = Partial<Omit<NdmMediaServer, ReduceForSaveVO>>;
|
||||
|
||||
export type NdmMediaServerUpdateVO = Partial<Omit<NdmMediaServerVO, ReduceForUpdateVO>>;
|
||||
export type NdmMediaServerUpdateVO = Partial<Omit<NdmMediaServer, ReduceForUpdateVO>>;
|
||||
|
||||
export type NdmMediaServerPageQuery = Partial<Omit<NdmMediaServerVO, ReduceForPageQuery>>;
|
||||
export type NdmMediaServerPageQuery = Partial<Omit<NdmMediaServer, ReduceForPageQuery>>;
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '../../base';
|
||||
import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '@/apis';
|
||||
|
||||
export interface NdmVideoServerVO extends BaseModel {
|
||||
export interface NdmVideoServer extends BaseModel {
|
||||
deviceId: string;
|
||||
name: string;
|
||||
manufacturer: string;
|
||||
@@ -29,10 +29,10 @@ export interface NdmVideoServerVO extends BaseModel {
|
||||
snmpEnabled: boolean;
|
||||
}
|
||||
|
||||
export type NdmVideoServerResultVO = Partial<NdmVideoServerVO>;
|
||||
export type NdmVideoServerResultVO = Partial<NdmVideoServer>;
|
||||
|
||||
export type NdmVideoServerSaveVO = Partial<Omit<NdmVideoServerVO, ReduceForSaveVO>>;
|
||||
export type NdmVideoServerSaveVO = Partial<Omit<NdmVideoServer, ReduceForSaveVO>>;
|
||||
|
||||
export type NdmVideoServerUpdateVO = Partial<Omit<NdmVideoServerVO, ReduceForUpdateVO>>;
|
||||
export type NdmVideoServerUpdateVO = Partial<Omit<NdmVideoServer, ReduceForUpdateVO>>;
|
||||
|
||||
export type NdmVideoServerPageQuery = Partial<Omit<NdmVideoServerVO, ReduceForPageQuery>>;
|
||||
export type NdmVideoServerPageQuery = Partial<Omit<NdmVideoServer, ReduceForPageQuery>>;
|
||||
4
src/apis/model/biz/index.ts
Normal file
4
src/apis/model/biz/index.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export * from './entity';
|
||||
export * from './nvr';
|
||||
export * from './verify';
|
||||
export * from './vimp';
|
||||
15
src/apis/model/biz/nvr/client-channel.ts
Normal file
15
src/apis/model/biz/nvr/client-channel.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
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;
|
||||
}
|
||||
3
src/apis/model/biz/nvr/index.ts
Normal file
3
src/apis/model/biz/nvr/index.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export * from './client-channel';
|
||||
export * from './record-info';
|
||||
export * from './record-item';
|
||||
12
src/apis/model/biz/nvr/record-info.ts
Normal file
12
src/apis/model/biz/nvr/record-info.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
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[];
|
||||
}
|
||||
4
src/apis/model/biz/nvr/record-item.ts
Normal file
4
src/apis/model/biz/nvr/record-item.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export interface RecordItem {
|
||||
startTime: string;
|
||||
endTime: string;
|
||||
}
|
||||
1
src/apis/model/biz/verify/index.ts
Normal file
1
src/apis/model/biz/verify/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './verify-server';
|
||||
7
src/apis/model/biz/verify/verify-server.ts
Normal file
7
src/apis/model/biz/verify/verify-server.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export interface VerifyServer {
|
||||
name: string;
|
||||
ipAddress: string;
|
||||
stationCode: string;
|
||||
verifyUrl: string;
|
||||
onlineState: boolean;
|
||||
}
|
||||
1
src/apis/model/biz/vimp/index.ts
Normal file
1
src/apis/model/biz/vimp/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './snap-result';
|
||||
5
src/apis/model/biz/vimp/snap-result.ts
Normal file
5
src/apis/model/biz/vimp/snap-result.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export interface SnapResult {
|
||||
absoluteFilePath: string;
|
||||
path: string;
|
||||
url: string;
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
export * from './base';
|
||||
export * from './device';
|
||||
export * from './biz';
|
||||
export * from './system';
|
||||
export * from './user';
|
||||
17
src/apis/model/system/def-parameter.ts
Normal file
17
src/apis/model/system/def-parameter.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
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>>;
|
||||
@@ -1,29 +0,0 @@
|
||||
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>;
|
||||
@@ -1,16 +0,0 @@
|
||||
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>>;
|
||||
@@ -1,17 +0,0 @@
|
||||
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>>;
|
||||
@@ -1,25 +0,0 @@
|
||||
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>>;
|
||||
@@ -1,133 +0,0 @@
|
||||
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;
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
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>>;
|
||||
39
src/apis/request/biz/composed/detail-device.ts
Normal file
39
src/apis/request/biz/composed/detail-device.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
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;
|
||||
};
|
||||
2
src/apis/request/biz/composed/index.ts
Normal file
2
src/apis/request/biz/composed/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from './detail-device';
|
||||
export * from './probe-device';
|
||||
35
src/apis/request/biz/composed/probe-device.ts
Normal file
35
src/apis/request/biz/composed/probe-device.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
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;
|
||||
}
|
||||
};
|
||||
1
src/apis/request/biz/constant/index.ts
Normal file
1
src/apis/request/biz/constant/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './reset-monitor-shedule';
|
||||
13
src/apis/request/biz/constant/reset-monitor-shedule.ts
Normal file
13
src/apis/request/biz/constant/reset-monitor-shedule.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
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;
|
||||
}
|
||||
};
|
||||
12
src/apis/request/biz/icmp/batch-verify.ts
Normal file
12
src/apis/request/biz/icmp/batch-verify.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
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;
|
||||
};
|
||||
3
src/apis/request/biz/icmp/index.ts
Normal file
3
src/apis/request/biz/icmp/index.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export * from './batch-verify';
|
||||
export * from './ndm-icmp-export';
|
||||
export * from './verify';
|
||||
@@ -1,13 +1,15 @@
|
||||
import { ndmClient } from '@/apis/client';
|
||||
import { userClient } from '@/apis';
|
||||
|
||||
export const ndmExportDevices = async (status?: string) => {
|
||||
export const exportIcmpApi = async (status?: string, options?: { signal?: AbortSignal }) => {
|
||||
const { signal } = options ?? {};
|
||||
const endpoint = '/api/ndm/ndmIcmpExport/exportByTemplate';
|
||||
const body = new URLSearchParams();
|
||||
body.append('status', status ?? '');
|
||||
const resp = await ndmClient.post<Blob>(endpoint, body, {
|
||||
const resp = await userClient.post<Blob>(endpoint, body, {
|
||||
responseType: 'blob',
|
||||
retRaw: true,
|
||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
||||
signal,
|
||||
});
|
||||
const [err, data] = resp;
|
||||
if (err || !data) {
|
||||
13
src/apis/request/biz/icmp/verify.ts
Normal file
13
src/apis/request/biz/icmp/verify.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
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;
|
||||
}
|
||||
};
|
||||
7
src/apis/request/biz/index.ts
Normal file
7
src/apis/request/biz/index.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export * from './composed';
|
||||
export * from './constant';
|
||||
export * from './icmp';
|
||||
export * from './log';
|
||||
export * from './storage';
|
||||
export * from './other';
|
||||
export * from './video';
|
||||
6
src/apis/request/biz/log/index.ts
Normal file
6
src/apis/request/biz/log/index.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
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';
|
||||
27
src/apis/request/biz/log/ndm-call-log.ts
Normal file
27
src/apis/request/biz/log/ndm-call-log.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
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;
|
||||
};
|
||||
40
src/apis/request/biz/log/ndm-device-alarm-log.ts
Normal file
40
src/apis/request/biz/log/ndm-device-alarm-log.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
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;
|
||||
};
|
||||
14
src/apis/request/biz/log/ndm-icmp-log.ts
Normal file
14
src/apis/request/biz/log/ndm-icmp-log.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
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;
|
||||
};
|
||||
59
src/apis/request/biz/log/ndm-record-check.ts
Normal file
59
src/apis/request/biz/log/ndm-record-check.ts
Normal file
@@ -0,0 +1,59 @@
|
||||
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;
|
||||
};
|
||||
14
src/apis/request/biz/log/ndm-snmp-log.ts
Normal file
14
src/apis/request/biz/log/ndm-snmp-log.ts
Normal 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;
|
||||
};
|
||||
27
src/apis/request/biz/log/ndm-vimp-log.ts
Normal file
27
src/apis/request/biz/log/ndm-vimp-log.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
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;
|
||||
};
|
||||
2
src/apis/request/biz/other/index.ts
Normal file
2
src/apis/request/biz/other/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from './ndm-security-box';
|
||||
export * from './ndm-switch';
|
||||
78
src/apis/request/biz/other/ndm-security-box.ts
Normal file
78
src/apis/request/biz/other/ndm-security-box.ts
Normal file
@@ -0,0 +1,78 @@
|
||||
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;
|
||||
};
|
||||
52
src/apis/request/biz/other/ndm-switch.ts
Normal file
52
src/apis/request/biz/other/ndm-switch.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
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;
|
||||
}
|
||||
};
|
||||
1
src/apis/request/biz/storage/index.ts
Normal file
1
src/apis/request/biz/storage/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './ndm-nvr';
|
||||
65
src/apis/request/biz/storage/ndm-nvr.ts
Normal file
65
src/apis/request/biz/storage/ndm-nvr.ts
Normal file
@@ -0,0 +1,65 @@
|
||||
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;
|
||||
}
|
||||
};
|
||||
6
src/apis/request/biz/video/index.ts
Normal file
6
src/apis/request/biz/video/index.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
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';
|
||||
66
src/apis/request/biz/video/ndm-camera-ignore.ts
Normal file
66
src/apis/request/biz/video/ndm-camera-ignore.ts
Normal file
@@ -0,0 +1,66 @@
|
||||
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;
|
||||
};
|
||||
64
src/apis/request/biz/video/ndm-camera.ts
Normal file
64
src/apis/request/biz/video/ndm-camera.ts
Normal file
@@ -0,0 +1,64 @@
|
||||
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;
|
||||
};
|
||||
52
src/apis/request/biz/video/ndm-decoder.ts
Normal file
52
src/apis/request/biz/video/ndm-decoder.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
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;
|
||||
}
|
||||
};
|
||||
40
src/apis/request/biz/video/ndm-keyboard.ts
Normal file
40
src/apis/request/biz/video/ndm-keyboard.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
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;
|
||||
};
|
||||
52
src/apis/request/biz/video/ndm-media-server.ts
Normal file
52
src/apis/request/biz/video/ndm-media-server.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
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;
|
||||
}
|
||||
};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user