Compare commits
66 Commits
19297c2870
...
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 | ||
|
|
70e3063b40 | ||
|
|
40623eb8fe | ||
|
|
a0021b4c31 | ||
|
|
ac695c5b73 | ||
|
|
b08e818d21 | ||
|
|
686fdc8724 | ||
|
|
1ed091f54d | ||
|
|
8a38da53d7 | ||
|
|
098a315153 | ||
|
|
a5a6ff9dbe | ||
|
|
be88c0b31a | ||
|
|
d2791ad093 | ||
|
|
a583fa2a4b | ||
|
|
8f3c8b7992 |
5
.env
5
.env
@@ -1,5 +1,5 @@
|
||||
# 设备页定时请求时间间隔
|
||||
VITE_REQUEST_INTERVAL = 30
|
||||
VITE_REQUEST_INTERVAL = 120
|
||||
|
||||
# 网管的appKey
|
||||
VITE_NDM_APP_KEY = ndm
|
||||
@@ -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
|
||||
|
||||
10
package.json
10
package.json
@@ -20,15 +20,15 @@
|
||||
"@tanstack/vue-query": "^5.83.1",
|
||||
"@tanstack/vue-query-devtools": "^5.84.0",
|
||||
"@vueuse/core": "^13.6.0",
|
||||
"axios": "^1.11.0",
|
||||
"axios": "^1.13.2",
|
||||
"compressing": "^2.0.0",
|
||||
"crypto-js": "^4.2.0",
|
||||
"dayjs": "^1.11.13",
|
||||
"dayjs": "^1.11.19",
|
||||
"destr": "^2.0.5",
|
||||
"echarts": "^6.0.0",
|
||||
"es-toolkit": "^1.39.9",
|
||||
"naive-ui": "^2.42.0",
|
||||
"nanoid": "^5.1.5",
|
||||
"es-toolkit": "^1.41.0",
|
||||
"naive-ui": "^2.43.1",
|
||||
"nanoid": "^5.1.6",
|
||||
"pinia": "^3.0.3",
|
||||
"pinia-plugin-persistedstate": "^4.5.0",
|
||||
"sass": "^1.90.0",
|
||||
|
||||
60
pnpm-lock.yaml
generated
60
pnpm-lock.yaml
generated
@@ -21,8 +21,8 @@ importers:
|
||||
specifier: ^13.6.0
|
||||
version: 13.6.0(vue@3.5.18(typescript@5.8.3))
|
||||
axios:
|
||||
specifier: ^1.11.0
|
||||
version: 1.11.0
|
||||
specifier: ^1.13.2
|
||||
version: 1.13.2
|
||||
compressing:
|
||||
specifier: ^2.0.0
|
||||
version: 2.0.0
|
||||
@@ -30,8 +30,8 @@ importers:
|
||||
specifier: ^4.2.0
|
||||
version: 4.2.0
|
||||
dayjs:
|
||||
specifier: ^1.11.13
|
||||
version: 1.11.13
|
||||
specifier: ^1.11.19
|
||||
version: 1.11.19
|
||||
destr:
|
||||
specifier: ^2.0.5
|
||||
version: 2.0.5
|
||||
@@ -39,14 +39,14 @@ importers:
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
es-toolkit:
|
||||
specifier: ^1.39.9
|
||||
version: 1.39.9
|
||||
specifier: ^1.41.0
|
||||
version: 1.41.0
|
||||
naive-ui:
|
||||
specifier: ^2.42.0
|
||||
version: 2.42.0(vue@3.5.18(typescript@5.8.3))
|
||||
specifier: ^2.43.1
|
||||
version: 2.43.1(vue@3.5.18(typescript@5.8.3))
|
||||
nanoid:
|
||||
specifier: ^5.1.5
|
||||
version: 5.1.5
|
||||
specifier: ^5.1.6
|
||||
version: 5.1.6
|
||||
pinia:
|
||||
specifier: ^3.0.3
|
||||
version: 3.0.3(typescript@5.8.3)(vue@3.5.18(typescript@5.8.3))
|
||||
@@ -1049,8 +1049,8 @@ packages:
|
||||
resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
axios@1.11.0:
|
||||
resolution: {integrity: sha512-1Lx3WLFQWm3ooKDYZD1eXmoGO9fxYQjrycfHFC8P0sCfQVXyROp0p9PFWBehewBOdCwHc+f/b8I0fMto5eSfwA==}
|
||||
axios@1.13.2:
|
||||
resolution: {integrity: sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA==}
|
||||
|
||||
balanced-match@1.0.2:
|
||||
resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
|
||||
@@ -1179,8 +1179,8 @@ packages:
|
||||
date-fns@3.6.0:
|
||||
resolution: {integrity: sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==}
|
||||
|
||||
dayjs@1.11.13:
|
||||
resolution: {integrity: sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==}
|
||||
dayjs@1.11.19:
|
||||
resolution: {integrity: sha512-t5EcLVS6QPBNqM2z8fakk/NKel+Xzshgt8FFKAn+qwlD1pzZWxh0nVCrvFK7ZDb6XucZeF9z8C7CBWTRIVApAw==}
|
||||
|
||||
de-indent@1.0.2:
|
||||
resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==}
|
||||
@@ -1267,8 +1267,8 @@ packages:
|
||||
resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
es-toolkit@1.39.9:
|
||||
resolution: {integrity: sha512-9OtbkZmTA2Qc9groyA1PUNeb6knVTkvB2RSdr/LcJXDL8IdEakaxwXLHXa7VX/Wj0GmdMJPR3WhnPGhiP3E+qg==}
|
||||
es-toolkit@1.41.0:
|
||||
resolution: {integrity: sha512-bDd3oRmbVgqZCJS6WmeQieOrzpl3URcWBUVDXxOELlUW2FuW+0glPOz1n0KnRie+PdyvUZcXz2sOn00c6pPRIA==}
|
||||
|
||||
esbuild@0.25.8:
|
||||
resolution: {integrity: sha512-vVC0USHGtMi8+R4Kz8rt6JhEWLxsv9Rnu/lGYbPR8u47B+DCBksq9JarW0zOO7bs37hyOK1l2/oqtbciutL5+Q==}
|
||||
@@ -1722,8 +1722,8 @@ packages:
|
||||
muggle-string@0.4.1:
|
||||
resolution: {integrity: sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==}
|
||||
|
||||
naive-ui@2.42.0:
|
||||
resolution: {integrity: sha512-c7cXR2YgOjgtBadXHwiWL4Y0tpGLAI5W5QzzHksOi22iuHXoSGMAzdkVTGVPE/PM0MSGQ/JtUIzCx2Y0hU0vTQ==}
|
||||
naive-ui@2.43.1:
|
||||
resolution: {integrity: sha512-w52W0mOhdOGt4uucFSZmP0DI44PCsFyuxeLSs9aoUThfIuxms90MYjv46Qrr7xprjyJRw5RU6vYpCx4o9ind3A==}
|
||||
peerDependencies:
|
||||
vue: ^3.0.0
|
||||
|
||||
@@ -1732,8 +1732,8 @@ packages:
|
||||
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
|
||||
hasBin: true
|
||||
|
||||
nanoid@5.1.5:
|
||||
resolution: {integrity: sha512-Ir/+ZpE9fDsNH0hQ3C68uyThDXzYcim2EqcZ8zn8Chtt1iylPT9xXJB0kPCnqzgcEGikO9RxSrh63MsmVCU7Fw==}
|
||||
nanoid@5.1.6:
|
||||
resolution: {integrity: sha512-c7+7RQ+dMB5dPwwCp4ee1/iV/q2P6aK1mTZcfr1BTuVlyW9hJYiMPybJCcnBlQtuSmTIWNeazm/zqNoZSSElBg==}
|
||||
engines: {node: ^18 || >=20}
|
||||
hasBin: true
|
||||
|
||||
@@ -2222,8 +2222,8 @@ packages:
|
||||
typescript:
|
||||
optional: true
|
||||
|
||||
vueuc@0.4.64:
|
||||
resolution: {integrity: sha512-wlJQj7fIwKK2pOEoOq4Aro8JdPOGpX8aWQhV8YkTW9OgWD2uj2O8ANzvSsIGjx7LTOc7QbS7sXdxHi6XvRnHPA==}
|
||||
vueuc@0.4.65:
|
||||
resolution: {integrity: sha512-lXuMl+8gsBmruudfxnMF9HW4be8rFziylXFu1VHVNbLVhRTXXV4njvpRuJapD/8q+oFEMSfQMH16E/85VoWRyQ==}
|
||||
peerDependencies:
|
||||
vue: ^3.0.11
|
||||
|
||||
@@ -3049,7 +3049,7 @@ snapshots:
|
||||
'@vue/devtools-kit': 8.0.0
|
||||
'@vue/devtools-shared': 8.0.0
|
||||
mitt: 3.0.1
|
||||
nanoid: 5.1.5
|
||||
nanoid: 5.1.6
|
||||
pathe: 2.0.3
|
||||
vite-hot-client: 2.1.0(vite@7.1.12(@types/node@22.17.1)(jiti@2.5.1)(sass@1.90.0)(tsx@4.20.5))
|
||||
vue: 3.5.18(typescript@5.8.3)
|
||||
@@ -3194,7 +3194,7 @@ snapshots:
|
||||
dependencies:
|
||||
possible-typed-array-names: 1.1.0
|
||||
|
||||
axios@1.11.0:
|
||||
axios@1.13.2:
|
||||
dependencies:
|
||||
follow-redirects: 1.15.11
|
||||
form-data: 4.0.4
|
||||
@@ -3333,7 +3333,7 @@ snapshots:
|
||||
|
||||
date-fns@3.6.0: {}
|
||||
|
||||
dayjs@1.11.13: {}
|
||||
dayjs@1.11.19: {}
|
||||
|
||||
de-indent@1.0.2: {}
|
||||
|
||||
@@ -3405,7 +3405,7 @@ snapshots:
|
||||
has-tostringtag: 1.0.2
|
||||
hasown: 2.0.2
|
||||
|
||||
es-toolkit@1.39.9: {}
|
||||
es-toolkit@1.41.0: {}
|
||||
|
||||
esbuild@0.25.8:
|
||||
optionalDependencies:
|
||||
@@ -3839,7 +3839,7 @@ snapshots:
|
||||
|
||||
muggle-string@0.4.1: {}
|
||||
|
||||
naive-ui@2.42.0(vue@3.5.18(typescript@5.8.3)):
|
||||
naive-ui@2.43.1(vue@3.5.18(typescript@5.8.3)):
|
||||
dependencies:
|
||||
'@css-render/plugin-bem': 0.15.14(css-render@0.15.14)
|
||||
'@css-render/vue3-ssr': 0.15.14(vue@3.5.18(typescript@5.8.3))
|
||||
@@ -3860,11 +3860,11 @@ snapshots:
|
||||
vdirs: 0.1.8(vue@3.5.18(typescript@5.8.3))
|
||||
vooks: 0.2.12(vue@3.5.18(typescript@5.8.3))
|
||||
vue: 3.5.18(typescript@5.8.3)
|
||||
vueuc: 0.4.64(vue@3.5.18(typescript@5.8.3))
|
||||
vueuc: 0.4.65(vue@3.5.18(typescript@5.8.3))
|
||||
|
||||
nanoid@3.3.11: {}
|
||||
|
||||
nanoid@5.1.5: {}
|
||||
nanoid@5.1.6: {}
|
||||
|
||||
natural-compare@1.4.0: {}
|
||||
|
||||
@@ -4336,7 +4336,7 @@ snapshots:
|
||||
optionalDependencies:
|
||||
typescript: 5.8.3
|
||||
|
||||
vueuc@0.4.64(vue@3.5.18(typescript@5.8.3)):
|
||||
vueuc@0.4.65(vue@3.5.18(typescript@5.8.3)):
|
||||
dependencies:
|
||||
'@css-render/vue3-ssr': 0.15.14(vue@3.5.18(typescript@5.8.3))
|
||||
'@juggle/resize-observer': 3.4.0
|
||||
|
||||
@@ -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';
|
||||
@@ -1,5 +1,5 @@
|
||||
export interface NdmCameraDiagInfo {
|
||||
[key: string]: any;
|
||||
logTime: string;
|
||||
info: string;
|
||||
logTime?: string;
|
||||
info?: string;
|
||||
}
|
||||
14
src/apis/domain/biz/diag/ndm-decoder-diag-info.ts
Normal file
14
src/apis/domain/biz/diag/ndm-decoder-diag-info.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
export interface NdmDecoderDiagInfo {
|
||||
[key: string]: any;
|
||||
logTime?: string;
|
||||
stCommonInfo?: {
|
||||
设备ID?: string;
|
||||
软件版本?: string;
|
||||
生产厂商?: string;
|
||||
设备别名?: string;
|
||||
设备型号?: string;
|
||||
硬件版本?: string;
|
||||
内存使用率?: string;
|
||||
CPU使用率?: string;
|
||||
};
|
||||
}
|
||||
31
src/apis/domain/biz/diag/ndm-nvr-diag-info.ts
Normal file
31
src/apis/domain/biz/diag/ndm-nvr-diag-info.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
export interface NdmNvrDiagInfo {
|
||||
[key: string]: any;
|
||||
logTime?: string;
|
||||
info?: {
|
||||
diskHealth?: number[];
|
||||
groupInfoList?: {
|
||||
freeSize?: number;
|
||||
state?: number;
|
||||
stateValue?: string;
|
||||
totalSize?: number;
|
||||
}[];
|
||||
};
|
||||
stCommonInfo?: {
|
||||
设备ID?: string;
|
||||
软件版本?: string;
|
||||
生产厂商?: string;
|
||||
设备别名?: string;
|
||||
设备型号?: string;
|
||||
硬件版本?: string;
|
||||
内存使用率?: string;
|
||||
CPU使用率?: string;
|
||||
};
|
||||
cdFanInfo?: {
|
||||
索引号?: string;
|
||||
'风扇转速(rpm)'?: string;
|
||||
}[];
|
||||
cdPowerSupplyInfo?: {
|
||||
索引号?: string;
|
||||
电源状态?: string;
|
||||
}[];
|
||||
}
|
||||
24
src/apis/domain/biz/diag/ndm-security-box-diag-info.ts
Normal file
24
src/apis/domain/biz/diag/ndm-security-box-diag-info.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
export interface NdmSecurityBoxDiagInfo {
|
||||
[key: string]: any;
|
||||
info?: [
|
||||
{
|
||||
addrCode?: number;
|
||||
circuits?: NdmSecurityBoxCircuit[];
|
||||
fanSpeeds?: number[];
|
||||
humidity?: number;
|
||||
switches?: number[];
|
||||
temperature?: number;
|
||||
},
|
||||
];
|
||||
stCommonInfo?: {
|
||||
[key: string]: any;
|
||||
内存使用率?: string;
|
||||
CPU使用率?: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface NdmSecurityBoxCircuit {
|
||||
current: number;
|
||||
status: number;
|
||||
voltage: number;
|
||||
}
|
||||
9
src/apis/domain/biz/diag/ndm-server-diag-info.ts
Normal file
9
src/apis/domain/biz/diag/ndm-server-diag-info.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export interface NdmServerDiagInfo {
|
||||
[key: string]: any;
|
||||
commInfo?: {
|
||||
CPU使用率?: string;
|
||||
内存使用率?: string;
|
||||
磁盘使用率?: string;
|
||||
系统运行时间?: string;
|
||||
};
|
||||
}
|
||||
@@ -2,20 +2,20 @@ export interface NdmSwitchDiagInfo {
|
||||
[key: string]: any;
|
||||
cpuRatio?: string; // 因环境不同可能不存在
|
||||
memoryRatio?: string; // 因环境不同可能不存在
|
||||
logTime: string;
|
||||
info: {
|
||||
overFlowPorts: string[];
|
||||
portInfoList: NdmSwitchPortInfo[];
|
||||
logTime?: string;
|
||||
info?: {
|
||||
overFlowPorts?: string[];
|
||||
portInfoList?: NdmSwitchPortInfo[];
|
||||
};
|
||||
}
|
||||
|
||||
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,14 +0,0 @@
|
||||
export interface NdmDecoderDiagInfo {
|
||||
[key: string]: any;
|
||||
logTime: string;
|
||||
stCommonInfo: {
|
||||
设备ID: string;
|
||||
软件版本: string;
|
||||
生产厂商: string;
|
||||
设备别名: string;
|
||||
设备型号: string;
|
||||
硬件版本: string;
|
||||
内存使用率: string;
|
||||
CPU使用率: string;
|
||||
};
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
export interface NdmNvrDiagInfo {
|
||||
[key: string]: any;
|
||||
logTime: string;
|
||||
info: {
|
||||
diskHealth: number[];
|
||||
groupInfoList: {
|
||||
freeSize: number;
|
||||
state: number;
|
||||
stateValue: string;
|
||||
totalSize: number;
|
||||
}[];
|
||||
};
|
||||
stCommonInfo: {
|
||||
设备ID: string;
|
||||
软件版本: string;
|
||||
生产厂商: string;
|
||||
设备别名: string;
|
||||
设备型号: string;
|
||||
硬件版本: string;
|
||||
内存使用率: string;
|
||||
CPU使用率: string;
|
||||
};
|
||||
cdFanInfo: {
|
||||
索引号: string;
|
||||
'风扇转速(rpm)': string;
|
||||
}[];
|
||||
cdPowerSupplyInfo: {
|
||||
索引号: string;
|
||||
电源状态: string;
|
||||
}[];
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
export interface NdmSecurityBoxDiagInfo {
|
||||
[key: string]: any;
|
||||
info: [
|
||||
{
|
||||
addrCode: number;
|
||||
circuits: NdmSecurityBoxCircuit[];
|
||||
fanSpeeds: number[];
|
||||
humidity: number;
|
||||
switches: number[];
|
||||
temperature: number;
|
||||
},
|
||||
];
|
||||
stCommonInfo: {
|
||||
内存使用率: string;
|
||||
CPU使用率: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface NdmSecurityBoxCircuit {
|
||||
current: number;
|
||||
status: number;
|
||||
voltage: number;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
export interface NdmServerDiagInfo {
|
||||
[key: string]: any;
|
||||
commInfo: {
|
||||
CPU使用率: string;
|
||||
内存使用率: string;
|
||||
磁盘使用率: string;
|
||||
系统运行时间: string;
|
||||
};
|
||||
}
|
||||
@@ -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,24 +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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user