format
This commit is contained in:
@@ -2,4 +2,4 @@ export interface NdmCameraDiagInfo {
|
||||
[key: string]: any;
|
||||
logTime: string;
|
||||
info: string;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,4 +11,4 @@ export interface NdmDecoderDiagInfo {
|
||||
内存使用率: string;
|
||||
CPU使用率: string;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,4 +20,4 @@ export interface NdmNvrDiagInfo {
|
||||
内存使用率: string;
|
||||
CPU使用率: string;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,4 +18,4 @@ export interface NdmSecurityBoxDiagInfo {
|
||||
内存使用率: string;
|
||||
CPU使用率: string;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,4 +6,4 @@ export interface NdmServerDiagInfo {
|
||||
磁盘使用率: string;
|
||||
系统运行时间: string;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
export interface SuperModel {
|
||||
id: string
|
||||
createdBy: string
|
||||
createdTime: string
|
||||
echoMap?: any
|
||||
id: string;
|
||||
createdBy: string;
|
||||
createdTime: string;
|
||||
echoMap?: any;
|
||||
}
|
||||
|
||||
export interface BaseModel extends SuperModel {
|
||||
updatedBy: string
|
||||
updatedTime: string
|
||||
updatedBy: string;
|
||||
updatedTime: string;
|
||||
}
|
||||
|
||||
export interface TreeModel extends BaseModel {
|
||||
parentId: string
|
||||
sortValue: number
|
||||
treeGrade: number
|
||||
treePath: string
|
||||
parentId: string;
|
||||
sortValue: number;
|
||||
treeGrade: number;
|
||||
treePath: string;
|
||||
}
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
export interface BasicPageParams {
|
||||
page: number
|
||||
pageSize: number
|
||||
page: number;
|
||||
pageSize: number;
|
||||
}
|
||||
|
||||
export interface BasicFetchResult<T> {
|
||||
items: T[]
|
||||
total: number
|
||||
items: T[];
|
||||
total: number;
|
||||
}
|
||||
|
||||
export interface RemoteData {
|
||||
key: string | number
|
||||
data?: any
|
||||
key: string | number;
|
||||
data?: any;
|
||||
}
|
||||
|
||||
export interface PageParams<T> {
|
||||
model: T
|
||||
size: number
|
||||
current: number
|
||||
sort?: string
|
||||
order?: string
|
||||
extra?: any
|
||||
model: T;
|
||||
size: number;
|
||||
current: number;
|
||||
sort?: string;
|
||||
order?: string;
|
||||
extra?: any;
|
||||
}
|
||||
|
||||
export interface PageResult<T> {
|
||||
records: T[]
|
||||
records: T[];
|
||||
// offset: number
|
||||
pages: string
|
||||
current: string
|
||||
total: string
|
||||
size: string
|
||||
orders: any[]
|
||||
pages: string;
|
||||
current: string;
|
||||
total: string;
|
||||
size: string;
|
||||
orders: any[];
|
||||
}
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
export type ReduceForUpdateVO =
|
||||
| 'createdTime'
|
||||
| 'createdBy'
|
||||
| 'updatedTime'
|
||||
| 'updatedBy'
|
||||
| 'echoMap'
|
||||
export type ReduceForSaveVO = ReduceForUpdateVO | 'id'
|
||||
export type ReduceForPageQuery = ReduceForUpdateVO
|
||||
export type ReduceForUpdateVO = 'createdTime' | 'createdBy' | 'updatedTime' | 'updatedBy' | 'echoMap';
|
||||
export type ReduceForSaveVO = ReduceForUpdateVO | 'id';
|
||||
export type ReduceForPageQuery = ReduceForUpdateVO;
|
||||
|
||||
@@ -5,4 +5,4 @@ export * from './ndm-media-server';
|
||||
export * from './ndm-nvr';
|
||||
export * from './ndm-security-box';
|
||||
export * from './ndm-switch';
|
||||
export * from './ndm-video-server';
|
||||
export * from './ndm-video-server';
|
||||
|
||||
28
src/main.ts
28
src/main.ts
@@ -1,16 +1,16 @@
|
||||
import { createApp } from 'vue'
|
||||
import { createPinia } from 'pinia'
|
||||
import persist from 'pinia-plugin-persistedstate'
|
||||
import { VueQueryPlugin, QueryClient } from '@tanstack/vue-query'
|
||||
import { createApp } from 'vue';
|
||||
import { createPinia } from 'pinia';
|
||||
import persist from 'pinia-plugin-persistedstate';
|
||||
import { VueQueryPlugin, QueryClient } from '@tanstack/vue-query';
|
||||
|
||||
import App from './App.vue'
|
||||
import router from './router'
|
||||
import App from './App.vue';
|
||||
import router from './router';
|
||||
|
||||
import '@/styles/reset.scss'
|
||||
import '@/styles/reset.scss';
|
||||
|
||||
import { getAppEnvConfig } from '@/utils/env'
|
||||
import { getAppEnvConfig } from '@/utils/env';
|
||||
|
||||
const app = createApp(App)
|
||||
const app = createApp(App);
|
||||
|
||||
const queryClient = new QueryClient({
|
||||
defaultOptions: {
|
||||
@@ -21,10 +21,10 @@ const queryClient = new QueryClient({
|
||||
refetchOnWindowFocus: true,
|
||||
},
|
||||
},
|
||||
})
|
||||
});
|
||||
|
||||
app.use(createPinia().use(persist))
|
||||
app.use(router)
|
||||
app.use(VueQueryPlugin, { queryClient })
|
||||
app.use(createPinia().use(persist));
|
||||
app.use(router);
|
||||
app.use(VueQueryPlugin, { queryClient });
|
||||
|
||||
app.mount('#app')
|
||||
app.mount('#app');
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import type { Station } from '@/apis/domains'
|
||||
import { defineStore } from 'pinia'
|
||||
import { computed, ref } from 'vue'
|
||||
import type { Station } from '@/apis/domains';
|
||||
import { defineStore } from 'pinia';
|
||||
import { computed, ref } from 'vue';
|
||||
|
||||
export const useStationStore = defineStore('ndmstation', () => {
|
||||
const stationList = ref<Station[]>([])
|
||||
export const useStationStore = defineStore('ndm-station-store', () => {
|
||||
const stationList = ref<Station[]>([]);
|
||||
|
||||
const onlineStationList = computed(() => stationList.value.filter((station) => station.online))
|
||||
const onlineStationList = computed(() => stationList.value.filter((station) => station.online));
|
||||
|
||||
return { stationList, onlineStationList }
|
||||
})
|
||||
return { stationList, onlineStationList };
|
||||
});
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { ref, computed } from 'vue'
|
||||
import { defineStore } from 'pinia'
|
||||
import { darkTheme, lightTheme } from 'naive-ui'
|
||||
import { ref, computed } from 'vue';
|
||||
import { defineStore } from 'pinia';
|
||||
import { darkTheme, lightTheme } from 'naive-ui';
|
||||
|
||||
export const useThemeStore = defineStore('ndm-theme', () => {
|
||||
const darkThemeEnabled = ref(false)
|
||||
export const useThemeStore = defineStore('ndm-theme-store', () => {
|
||||
const darkThemeEnabled = ref(true);
|
||||
const themeMode = computed(() => {
|
||||
return darkThemeEnabled.value ? darkTheme : lightTheme
|
||||
})
|
||||
return darkThemeEnabled.value ? darkTheme : lightTheme;
|
||||
});
|
||||
|
||||
return { darkThemeEnabled, themeMode }
|
||||
})
|
||||
return { darkThemeEnabled, themeMode };
|
||||
});
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
export const getAppEnvConfig = () => {
|
||||
const env = import.meta.env;
|
||||
const {
|
||||
VITE_REQUEST_INTERVAL,
|
||||
VITE_NDM_APP_KEY,
|
||||
VITE_LAMP_CLIENT_ID,
|
||||
VITE_LAMP_CLIENT_SECRET,
|
||||
VITE_LAMP_USERNAME,
|
||||
VITE_LAMP_PASSWORD,
|
||||
VITE_LAMP_AUTHORIZATION,
|
||||
} = env;
|
||||
const { VITE_REQUEST_INTERVAL, VITE_NDM_APP_KEY, VITE_LAMP_CLIENT_ID, VITE_LAMP_CLIENT_SECRET, VITE_LAMP_USERNAME, VITE_LAMP_PASSWORD, VITE_LAMP_AUTHORIZATION } = env;
|
||||
return {
|
||||
requestInterval: Number.parseInt(VITE_REQUEST_INTERVAL as string),
|
||||
ndmAppKey: VITE_NDM_APP_KEY as string,
|
||||
|
||||
Reference in New Issue
Block a user