chore: reorder import

This commit is contained in:
yangsy
2025-08-22 00:24:05 +08:00
parent a9e52f1e0f
commit a52899b052
43 changed files with 127 additions and 153 deletions

View File

@@ -0,0 +1,3 @@
export * from './model';
export * from './page';
export * from './reduce';

View File

@@ -7,10 +7,10 @@ import type { NdmKeyboardVO } from './video/ndm-keyboard';
import type { NdmMediaServerVO } from './video/ndm-media-server'; import type { NdmMediaServerVO } from './video/ndm-media-server';
import type { NdmVideoServerVO } from './video/ndm-video-server'; import type { NdmVideoServerVO } from './video/ndm-video-server';
export * from './alarm/ndm-device-alarm-log'; export * from './log/ndm-device-alarm-log';
export * from './log/ndm-icmp-log'; export * from './log/ndm-icmp-log';
export * from './log/ndm-snmp-log'; export * from './log/ndm-snmp-log';
export * from './log/ndm-vimp-log';
export * from './other/ndm-security-box'; export * from './other/ndm-security-box';
export * from './other/ndm-switch'; export * from './other/ndm-switch';

View File

@@ -1,5 +1,4 @@
import type { BaseModel } from '../../base/model'; import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '../../base';
import type { ReduceForPageQuery, ReduceForSaveVO, ReduceForUpdateVO } from '../../base/reduce';
export interface NdmDeviceAlarmLogVO extends BaseModel { export interface NdmDeviceAlarmLogVO extends BaseModel {
alarmNo: string; alarmNo: string;

View File

@@ -1,5 +1,4 @@
import type { BaseModel } from '../../base/model'; import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '../../base';
import type { ReduceForPageQuery, ReduceForSaveVO, ReduceForUpdateVO } from '../../base/reduce';
export interface NdmIcmpLogVO extends BaseModel { export interface NdmIcmpLogVO extends BaseModel {
deviceId: string; deviceId: string;

View File

@@ -1,5 +1,4 @@
import type { BaseModel } from '../../base/model'; import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '../../base';
import type { ReduceForPageQuery, ReduceForSaveVO, ReduceForUpdateVO } from '../../base/reduce';
export interface NdmSnmpLogVO extends BaseModel { export interface NdmSnmpLogVO extends BaseModel {
deviceId: string; deviceId: string;

View File

@@ -0,0 +1,23 @@
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;
}
export type NdmVimpLogResultVO = Partial<NdmVimpLogVO>;
export type NdmVimpLogSaveVO = Partial<Omit<NdmVimpLogVO, ReduceForSaveVO>>;
export type NdmVimpLogUpdateVO = Partial<Omit<NdmVimpLogVO, ReduceForUpdateVO>>;
export type NdmVimpLogPageQuery = Partial<Omit<NdmVimpLogVO, ReduceForPageQuery>>;

View File

@@ -1,5 +1,4 @@
import type { BaseModel } from '../../base/model'; import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '../../base';
import type { ReduceForPageQuery, ReduceForSaveVO, ReduceForUpdateVO } from '../../base/reduce';
export interface NdmSecurityBoxVO extends BaseModel { export interface NdmSecurityBoxVO extends BaseModel {
deviceId: string; deviceId: string;

View File

@@ -1,5 +1,4 @@
import type { BaseModel } from '../../base/model'; import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '../../base';
import type { ReduceForPageQuery, ReduceForSaveVO, ReduceForUpdateVO } from '../../base/reduce';
export interface NdmSwitchVO extends BaseModel { export interface NdmSwitchVO extends BaseModel {
deviceId: string; deviceId: string;

View File

@@ -1,5 +1,4 @@
import type { BaseModel } from '../../base/model'; import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '../../base';
import type { ReduceForPageQuery, ReduceForSaveVO, ReduceForUpdateVO } from '../../base/reduce';
export interface NdmNvrVO extends BaseModel { export interface NdmNvrVO extends BaseModel {
deviceId: string; deviceId: string;

View File

@@ -1,5 +1,4 @@
import type { BaseModel } from '../../base/model'; import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '../../base';
import type { ReduceForPageQuery, ReduceForSaveVO, ReduceForUpdateVO } from '../../base/reduce';
export interface NdmCameraVO extends BaseModel { export interface NdmCameraVO extends BaseModel {
deviceId: string; deviceId: string;

View File

@@ -1,5 +1,4 @@
import type { BaseModel } from '../../base/model'; import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '../../base';
import type { ReduceForPageQuery, ReduceForSaveVO, ReduceForUpdateVO } from '../../base/reduce';
export interface NdmDecoderVO extends BaseModel { export interface NdmDecoderVO extends BaseModel {
deviceId: string; deviceId: string;

View File

@@ -1,5 +1,4 @@
import type { BaseModel } from '../../base/model'; import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '../../base';
import type { ReduceForPageQuery, ReduceForSaveVO, ReduceForUpdateVO } from '../../base/reduce';
export interface NdmKeyboardVO extends BaseModel { export interface NdmKeyboardVO extends BaseModel {
deviceId: string; deviceId: string;

View File

@@ -1,5 +1,4 @@
import type { BaseModel } from '../../base/model'; import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '../../base';
import type { ReduceForPageQuery, ReduceForSaveVO, ReduceForUpdateVO } from '../../base/reduce';
export interface NdmMediaServerVO extends BaseModel { export interface NdmMediaServerVO extends BaseModel {
deviceId: string; deviceId: string;

View File

@@ -1,5 +1,4 @@
import type { BaseModel } from '../../base/model'; import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '../../base';
import type { ReduceForPageQuery, ReduceForSaveVO, ReduceForUpdateVO } from '../../base/reduce';
export interface NdmVideoServerVO extends BaseModel { export interface NdmVideoServerVO extends BaseModel {
deviceId: string; deviceId: string;

4
src/apis/models/index.ts Normal file
View File

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

View File

@@ -1,5 +1,4 @@
import type { BaseModel } from '../base/model'; import type { BaseModel, ReduceForSaveVO, ReduceForUpdateVO, ReduceForPageQuery } from '../base';
import type { ReduceForPageQuery, ReduceForSaveVO, ReduceForUpdateVO } from '../base/reduce';
export interface DefParameterVO extends BaseModel { export interface DefParameterVO extends BaseModel {
key: string; key: string;

View File

@@ -1,8 +1,14 @@
export * from './ndm-camera'; export * from './log/ndm-device-alarm-log';
export * from './ndm-decoder'; export * from './log/ndm-icmp-log';
export * from './ndm-keyboard'; export * from './log/ndm-snmp-log';
export * from './ndm-media-server';
export * from './ndm-nvr'; export * from './storage/ndm-nvr';
export * from './ndm-security-box';
export * from './ndm-switch'; export * from './other/ndm-security-box';
export * from './ndm-video-server'; export * from './other/ndm-switch';
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';

View File

@@ -1,7 +1,5 @@
import type { PageParams, PageResult } from '@/apis/models/base/page'; import { userClient, ndmClient } from '@/apis/client';
import type { NdmDeviceAlarmLogPageQuery, NdmDeviceAlarmLogResultVO } from '@/apis/models/device/alarm/ndm-device-alarm-log'; import type { PageParams, NdmDeviceAlarmLogPageQuery, PageResult, NdmDeviceAlarmLogResultVO } from '@/apis/models';
import { ndmClient, userClient } from '@/apis/client';
export const postNdmDeviceAlarmLogPage = async (stationCode: string, pageQuery: PageParams<NdmDeviceAlarmLogPageQuery>) => { export const postNdmDeviceAlarmLogPage = async (stationCode: string, pageQuery: PageParams<NdmDeviceAlarmLogPageQuery>) => {
const endpoint = '/api/ndm/ndmDeviceAlarmLog/page'; const endpoint = '/api/ndm/ndmDeviceAlarmLog/page';

View File

@@ -1,7 +1,5 @@
import type { PageParams, PageResult } from '@/apis/models/base/page';
import type { NdmIcmpLogPageQuery, NdmIcmpLogResultVO } from '@/apis/models/device';
import { ndmClient } from '@/apis/client'; import { ndmClient } from '@/apis/client';
import type { PageParams, NdmIcmpLogPageQuery, PageResult, NdmIcmpLogResultVO } from '@/apis/models';
export const postIcmpLogPage = async (stationCode: string, pageQuery: PageParams<NdmIcmpLogPageQuery>) => { export const postIcmpLogPage = async (stationCode: string, pageQuery: PageParams<NdmIcmpLogPageQuery>) => {
const prefix = stationCode ? `/${stationCode}` : ''; const prefix = stationCode ? `/${stationCode}` : '';

View File

@@ -1,7 +1,5 @@
import type { PageParams, PageResult } from '@/apis/models/base/page';
import type { NdmSnmpLogPageQuery, NdmSnmpLogResultVO } from '@/apis/models/device';
import { ndmClient } from '@/apis/client'; import { ndmClient } from '@/apis/client';
import type { PageParams, NdmSnmpLogPageQuery, PageResult, NdmSnmpLogResultVO } from '@/apis/models';
export const postSnmpLogPage = async (stationCode: string, pageQuery: PageParams<NdmSnmpLogPageQuery>) => { export const postSnmpLogPage = async (stationCode: string, pageQuery: PageParams<NdmSnmpLogPageQuery>) => {
const prefix = stationCode ? `/${stationCode}` : ''; const prefix = stationCode ? `/${stationCode}` : '';

View File

@@ -1,7 +1,5 @@
import type { PageParams, PageResult } from '@/apis/models/base/page';
import type { NdmSecurityBoxPageQuery, NdmSecurityBoxResultVO, NdmSecurityBoxUpdateVO } from '@/apis/models/device';
import { ndmClient } from '@/apis/client'; import { ndmClient } from '@/apis/client';
import type { PageParams, NdmSecurityBoxPageQuery, PageResult, NdmSecurityBoxResultVO, NdmSecurityBoxUpdateVO } from '@/apis/models';
export const postNdmSecurityBoxPage = async (stationCode: string, pageQuery: PageParams<NdmSecurityBoxPageQuery>) => { export const postNdmSecurityBoxPage = async (stationCode: string, pageQuery: PageParams<NdmSecurityBoxPageQuery>) => {
const prefix = stationCode ? `/${stationCode}` : ''; const prefix = stationCode ? `/${stationCode}` : '';

View File

@@ -1,7 +1,5 @@
import type { PageParams, PageResult } from '@/apis/models/base/page';
import type { NdmSwitchPageQuery, NdmSwitchResultVO, NdmSwitchUpdateVO } from '@/apis/models/device';
import { ndmClient } from '@/apis/client'; import { ndmClient } from '@/apis/client';
import type { PageParams, NdmSwitchPageQuery, PageResult, NdmSwitchResultVO, NdmSwitchUpdateVO } from '@/apis/models';
export const postNdmSwitchPage = async (stationCode: string, pageQuery: PageParams<NdmSwitchPageQuery>) => { export const postNdmSwitchPage = async (stationCode: string, pageQuery: PageParams<NdmSwitchPageQuery>) => {
const prefix = stationCode ? `/${stationCode}` : ''; const prefix = stationCode ? `/${stationCode}` : '';

View File

@@ -1,9 +1,6 @@
import dayjs from 'dayjs';
import type { PageParams, PageResult } from '@/apis/models/base/page';
import type { ClientChannel, NdmNvrPageQuery, NdmNvrResultVO, NdmNvrUpdateVO, NdmNvrVO, NdmRecordCheck } from '@/apis/models/device';
import { ndmClient } from '@/apis/client'; import { ndmClient } from '@/apis/client';
import type { PageParams, NdmNvrPageQuery, PageResult, NdmNvrResultVO, NdmNvrUpdateVO, NdmNvrVO, ClientChannel, NdmRecordCheck } from '@/apis/models';
import dayjs from 'dayjs';
export const postNdmNvrPage = async (stationCode: string, pageQuery: PageParams<NdmNvrPageQuery>) => { export const postNdmNvrPage = async (stationCode: string, pageQuery: PageParams<NdmNvrPageQuery>) => {
const prefix = stationCode ? `/${stationCode}` : ''; const prefix = stationCode ? `/${stationCode}` : '';

View File

@@ -1,7 +1,5 @@
import type { PageParams, PageResult } from '@/apis/models/base/page';
import type { NdmCameraPageQuery, NdmCameraResultVO, NdmCameraUpdateVO } from '@/apis/models/device';
import { ndmClient } from '@/apis/client'; import { ndmClient } from '@/apis/client';
import type { PageParams, NdmCameraPageQuery, PageResult, NdmCameraResultVO, NdmCameraUpdateVO } from '@/apis/models';
export const postNdmCameraPage = async (stationCode: string, pageQuery: PageParams<NdmCameraPageQuery>) => { export const postNdmCameraPage = async (stationCode: string, pageQuery: PageParams<NdmCameraPageQuery>) => {
const prefix = stationCode ? `/${stationCode}` : ''; const prefix = stationCode ? `/${stationCode}` : '';

View File

@@ -1,7 +1,5 @@
import type { PageParams, PageResult } from '@/apis/models/base/page';
import type { NdmDecoderPageQuery, NdmDecoderResultVO, NdmDecoderUpdateVO } from '@/apis/models/device';
import { ndmClient } from '@/apis/client'; import { ndmClient } from '@/apis/client';
import type { PageParams, NdmDecoderPageQuery, PageResult, NdmDecoderResultVO, NdmDecoderUpdateVO } from '@/apis/models';
export const postNdmDecoderPage = async (stationCode: string, pageQuery: PageParams<NdmDecoderPageQuery>) => { export const postNdmDecoderPage = async (stationCode: string, pageQuery: PageParams<NdmDecoderPageQuery>) => {
const prefix = stationCode ? `/${stationCode}` : ''; const prefix = stationCode ? `/${stationCode}` : '';

View File

@@ -1,7 +1,5 @@
import type { PageParams, PageResult } from '@/apis/models/base/page';
import type { NdmKeyboardPageQuery, NdmKeyboardResultVO, NdmKeyboardUpdateVO } from '@/apis/models/device';
import { ndmClient } from '@/apis/client'; import { ndmClient } from '@/apis/client';
import type { PageParams, NdmKeyboardPageQuery, PageResult, NdmKeyboardResultVO, NdmKeyboardUpdateVO } from '@/apis/models';
export const postNdmKeyboardPage = async (stationCode: string, pageQuery: PageParams<NdmKeyboardPageQuery>) => { export const postNdmKeyboardPage = async (stationCode: string, pageQuery: PageParams<NdmKeyboardPageQuery>) => {
const prefix = stationCode ? `/${stationCode}` : ''; const prefix = stationCode ? `/${stationCode}` : '';

View File

@@ -1,7 +1,5 @@
import type { PageParams, PageResult } from '@/apis/models/base/page';
import type { NdmMediaServerPageQuery, NdmMediaServerResultVO, NdmMediaServerUpdateVO } from '@/apis/models/device';
import { ndmClient } from '@/apis/client'; import { ndmClient } from '@/apis/client';
import type { PageParams, NdmMediaServerPageQuery, PageResult, NdmMediaServerResultVO, NdmMediaServerUpdateVO } from '@/apis/models';
export const postNdmMediaServerPage = async (stationCode: string, pageQuery: PageParams<NdmMediaServerPageQuery>) => { export const postNdmMediaServerPage = async (stationCode: string, pageQuery: PageParams<NdmMediaServerPageQuery>) => {
const prefix = stationCode ? `/${stationCode}` : ''; const prefix = stationCode ? `/${stationCode}` : '';

View File

@@ -1,7 +1,5 @@
import type { PageParams, PageResult } from '@/apis/models/base/page';
import type { NdmVideoServerPageQuery, NdmVideoServerResultVO, NdmVideoServerUpdateVO } from '@/apis/models/device';
import { ndmClient } from '@/apis/client'; import { ndmClient } from '@/apis/client';
import type { PageParams, NdmVideoServerPageQuery, PageResult, NdmVideoServerResultVO, NdmVideoServerUpdateVO } from '@/apis/models';
export const postNdmVideoServerPage = async (stationCode: string, pageQuery: PageParams<NdmVideoServerPageQuery>) => { export const postNdmVideoServerPage = async (stationCode: string, pageQuery: PageParams<NdmVideoServerPageQuery>) => {
const prefix = stationCode ? `/${stationCode}` : ''; const prefix = stationCode ? `/${stationCode}` : '';

View File

@@ -1,17 +1,5 @@
export * from './device/ndm-camera'; export * from './device';
export * from './device/ndm-decoder';
export * from './device/ndm-keyboard';
export * from './device/ndm-media-server';
export * from './device/ndm-monitor';
export * from './device/ndm-nvr';
export * from './device/ndm-security-box';
export * from './device/ndm-switch';
export * from './device/ndm-video-server';
export * from './log/ndm-device-alarm-log'; export * from './station';
export * from './log/ndm-icmp-log';
export * from './log/ndm-snmp-log';
export * from './station/ndm-verify'; export * from './system';
export * from './system/def-parameter';

View File

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

View File

@@ -1,10 +1,7 @@
import type { PageParams, PageResult } from '@/apis/models/base/page'; import { ndmClient } from '@/apis/client';
import type { PageParams, DefParameterPageQuery, PageResult, DefParameterResultVO, DefParameterUpdateVO } from '@/apis/models';
import type { Result } from '@/axios'; import type { Result } from '@/axios';
import type { DefParameterPageQuery, DefParameterResultVO, DefParameterUpdateVO } from '../../models/system';
import { ndmClient } from '../../client';
export const postDefParameterPage = async (stationCode: string, pageQuery: PageParams<DefParameterPageQuery>) => { export const postDefParameterPage = async (stationCode: string, pageQuery: PageParams<DefParameterPageQuery>) => {
const prefix = stationCode ? `/${stationCode}` : ''; const prefix = stationCode ? `/${stationCode}` : '';
const resp = await ndmClient.post<PageResult<DefParameterResultVO>>(`${prefix}/api/system/defParameter/page`, pageQuery); const resp = await ndmClient.post<PageResult<DefParameterResultVO>>(`${prefix}/api/system/defParameter/page`, pageQuery);

View File

@@ -0,0 +1 @@
export * from './def-parameter';

View File

@@ -1,7 +1,7 @@
` `
<script setup lang="ts"> <script setup lang="ts">
import type { Station } from '@/apis/domains'; import type { Station } from '@/apis/domains';
import type { NdmDeviceAlarmLogResultVO } from '@/apis/models/device'; import type { NdmDeviceAlarmLogResultVO } from '@/apis/models';
import { defaultExportByTemplate } from '@/apis/requests'; import { defaultExportByTemplate } from '@/apis/requests';
import type { StationAlarms } from '@/composables/query/use-line-alarms-query'; import type { StationAlarms } from '@/composables/query/use-line-alarms-query';
import { JAVA_INTEGER_MAX_VALUE } from '@/constants'; import { JAVA_INTEGER_MAX_VALUE } from '@/constants';

View File

@@ -1,13 +1,13 @@
<script setup lang="ts"> <script setup lang="ts">
import type { Station } from '@/apis/domains';
import type { NdmDeviceVO } from '@/apis/models';
import type { StationDevices } from '@/composables/query/use-line-devices-query';
import { DeviceType, DeviceTypeName } from '@/enums/device-type';
import { useQueryControlStore } from '@/stores/query-control';
import { NButton, NCol, NInput, NModal, NRow, NStatistic, NTree } from 'naive-ui'; import { NButton, NCol, NInput, NModal, NRow, NStatistic, NTree } from 'naive-ui';
import type { TreeOption, TreeOverrideNodeClickBehavior } from 'naive-ui';
import { computed, h, ref, toRefs, watch } from 'vue'; import { computed, h, ref, toRefs, watch } from 'vue';
import { useRoute, useRouter } from 'vue-router'; import { useRoute, useRouter } from 'vue-router';
import type { TreeOption, TreeOverrideNodeClickBehavior } from 'naive-ui';
import type { NdmDeviceVO } from '@/apis/models/device';
import { useQueryControlStore } from '@/stores/query-control';
import { DeviceType, DeviceTypeName } from '@/enums/device-type';
import type { Station } from '@/apis/domains';
import type { StationDevices } from '@/composables/query/use-line-devices-query';
interface Props { interface Props {
station: Station; station: Station;

View File

@@ -1,16 +1,16 @@
<script setup lang="ts"> <script setup lang="ts">
import { NCard, NStatistic, NTag, NGrid, NGi, NButton, NIcon, useThemeVars, NSpace } from 'naive-ui';
import { Video as VideoIcon } from '@vicons/carbon';
import { ControlOutlined } from '@vicons/antd';
import { toRefs, computed, ref } from 'vue';
import axios from 'axios';
import { DeviceType } from '@/enums/device-type';
import type { Station } from '@/apis/domains';
import type { StationDevices } from '@/composables/query/use-line-devices-query';
import type { StationAlarms } from '@/composables/query/use-line-alarms-query';
import OfflineDeviceDetailModal from './offline-device-detail-modal.vue';
import DeviceAlarmDetailModal from './device-alarm-detail-modal.vue'; import DeviceAlarmDetailModal from './device-alarm-detail-modal.vue';
import DeviceParamsConfigModal from './device-params-config-modal.vue'; import DeviceParamsConfigModal from './device-params-config-modal.vue';
import OfflineDeviceDetailModal from './offline-device-detail-modal.vue';
import type { Station } from '@/apis/domains';
import { DeviceType } from '@/enums/device-type';
import type { StationAlarms } from '@/composables/query/use-line-alarms-query';
import type { StationDevices } from '@/composables/query/use-line-devices-query';
import { ControlOutlined } from '@vicons/antd';
import { Video as VideoIcon } from '@vicons/carbon';
import axios from 'axios';
import { NCard, NStatistic, NTag, NGrid, NGi, NButton, NIcon, useThemeVars, NSpace } from 'naive-ui';
import { toRefs, computed, ref } from 'vue';
interface Props { interface Props {
station: Station; station: Station;

View File

@@ -1,5 +1,5 @@
import type { Station } from '@/apis/domains'; import type { Station } from '@/apis/domains';
import type { NdmDeviceAlarmLogResultVO } from '@/apis/models/device'; import type { NdmDeviceAlarmLogResultVO } from '@/apis/models';
import { postNdmDeviceAlarmLogPage } from '@/apis/requests'; import { postNdmDeviceAlarmLogPage } from '@/apis/requests';
import { DeviceType } from '@/enums/device-type'; import { DeviceType } from '@/enums/device-type';
import { useStationStore } from '@/stores/station'; import { useStationStore } from '@/stores/station';
@@ -8,11 +8,6 @@ import dayjs from 'dayjs';
import { storeToRefs } from 'pinia'; import { storeToRefs } from 'pinia';
import { computed } from 'vue'; import { computed } from 'vue';
// const AlarmCategory = {
// Occurred: '1',
// Recovered: '2',
// } as const;
export interface CategorizedAlarms { export interface CategorizedAlarms {
occurred: NdmDeviceAlarmLogResultVO[]; occurred: NdmDeviceAlarmLogResultVO[];
recovered: NdmDeviceAlarmLogResultVO[]; recovered: NdmDeviceAlarmLogResultVO[];

View File

@@ -1,19 +1,4 @@
import { useQuery } from '@tanstack/vue-query'; import type { Station } from '@/apis/domains';
import type { PageParams } from '@/apis/models/base/page';
import {
postNdmCameraPage,
postNdmDecoderPage,
postNdmKeyboardPage,
postNdmMediaServerPage,
postNdmNvrPage,
postNdmSecurityBoxPage,
postNdmSwitchPage,
postNdmVideoServerPage,
} from '@/apis/requests/device';
import { useStationStore } from '@/stores/station';
import { storeToRefs } from 'pinia';
import { computed } from 'vue';
import { DeviceType } from '@/enums/device-type';
import type { import type {
NdmCameraResultVO, NdmCameraResultVO,
NdmDecoderResultVO, NdmDecoderResultVO,
@@ -23,8 +8,14 @@ import type {
NdmSecurityBoxResultVO, NdmSecurityBoxResultVO,
NdmSwitchResultVO, NdmSwitchResultVO,
NdmVideoServerResultVO, NdmVideoServerResultVO,
} from '@/apis/models/device'; PageParams,
import type { Station } from '@/apis/domains'; } from '@/apis/models';
import { postNdmCameraPage, postNdmDecoderPage, postNdmKeyboardPage, postNdmMediaServerPage, postNdmNvrPage, postNdmSecurityBoxPage, postNdmSwitchPage, postNdmVideoServerPage } from '@/apis/requests';
import { DeviceType } from '@/enums/device-type';
import { useStationStore } from '@/stores/station';
import { useQuery } from '@tanstack/vue-query';
import { storeToRefs } from 'pinia';
import { computed } from 'vue';
// 定义设备数据类型 // 定义设备数据类型
export interface StationDevices { export interface StationDevices {

View File

@@ -1,12 +1,12 @@
import type { Station } from '@/apis/domains'; import type { Station } from '@/apis/domains';
import { ndmVerify } from '@/apis/requests'; import { ndmVerify } from '@/apis/requests';
import { useQuery } from '@tanstack/vue-query'; import { useQueryControlStore } from '@/stores/query-control';
import { useStationStore } from '@/stores/station'; import { useStationStore } from '@/stores/station';
import { getAppEnvConfig } from '@/utils/env';
import { useQuery } from '@tanstack/vue-query';
import axios from 'axios'; import axios from 'axios';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import { storeToRefs } from 'pinia'; import { storeToRefs } from 'pinia';
import { getAppEnvConfig } from '@/utils/env';
import { useQueryControlStore } from '@/stores/query-control';
import { computed } from 'vue'; import { computed } from 'vue';
export function useStationListQuery() { export function useStationListQuery() {

View File

@@ -1,16 +1,16 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, reactive, onBeforeMount, h } from 'vue'; import type { NdmDeviceAlarmLogResultVO } from '@/apis/models';
import dayjs from 'dayjs'; import { defaultExportByTemplate, postNdmDeviceAlarmLogPage } from '@/apis/requests';
import { JAVA_INTEGER_MAX_VALUE } from '@/constants';
import { DeviceType, DeviceTypeName, type DeviceTypeCode } from '@/enums/device-type';
import { useStationStore } from '@/stores/station';
import { downloadByData } from '@/utils/download';
import { useMutation } from '@tanstack/vue-query'; import { useMutation } from '@tanstack/vue-query';
import dayjs from 'dayjs';
import type { DataTableColumns, DataTableRowData, PaginationProps, SelectOption } from 'naive-ui'; import type { DataTableColumns, DataTableRowData, PaginationProps, SelectOption } from 'naive-ui';
import { NForm, NInput, NButton, NSpace, NDataTable, NFormItemGi, NGrid, NSelect, NGridItem, NDatePicker } from 'naive-ui'; import { NForm, NInput, NButton, NSpace, NDataTable, NFormItemGi, NGrid, NSelect, NGridItem, NDatePicker } from 'naive-ui';
import { DeviceType, DeviceTypeName, type DeviceTypeCode } from '@/enums/device-type';
import { defaultExportByTemplate, postNdmDeviceAlarmLogPage } from '@/apis/requests/log/ndm-device-alarm-log';
import type { NdmDeviceAlarmLogResultVO } from '@/apis/models/device';
import { useStationStore } from '@/stores/station';
import { storeToRefs } from 'pinia'; import { storeToRefs } from 'pinia';
import { downloadByData } from '@/utils/download'; import { ref, reactive, onBeforeMount, h } from 'vue';
import { JAVA_INTEGER_MAX_VALUE } from '@/constants';
const stationStore = useStationStore(); const stationStore = useStationStore();
const { stationList } = storeToRefs(stationStore); const { stationList } = storeToRefs(stationStore);
@@ -95,7 +95,7 @@ const tablePagination = reactive<PaginationProps>({
}, },
}); });
const { mutate: getAlarmList, isPending } = useMutation({ const { mutate: getAlarmList, isPending: isTableLoading } = useMutation({
mutationFn: async () => { mutationFn: async () => {
const res = await postNdmDeviceAlarmLogPage('', { const res = await postNdmDeviceAlarmLogPage('', {
model: {}, model: {},
@@ -214,7 +214,7 @@ onBeforeMount(() => getAlarmList());
<NGridItem> <NGridItem>
<NSpace> <NSpace>
<NButton @click="onClickReset">重置</NButton> <NButton @click="onClickReset">重置</NButton>
<NButton type="primary" :loading="isPending" @click="onClickQuery">查询</NButton> <NButton type="primary" :loading="isTableLoading" @click="onClickQuery">查询</NButton>
</NSpace> </NSpace>
</NGridItem> </NGridItem>
</NGrid> </NGrid>
@@ -231,7 +231,7 @@ onBeforeMount(() => getAlarmList());
<!-- 表格区域填满剩余空间 --> <!-- 表格区域填满剩余空间 -->
<div style="flex: 1 1 auto; min-height: 0; padding: 8px"> <div style="flex: 1 1 auto; min-height: 0; padding: 8px">
<NDataTable remote :columns="tableColumns" :data="tableData" :pagination="tablePagination" :loading="isPending" :single-line="false" flex-height style="height: 100%" /> <NDataTable remote :columns="tableColumns" :data="tableData" :pagination="tablePagination" :loading="isTableLoading" :single-line="false" flex-height style="height: 100%" />
</div> </div>
</div> </div>
</template> </template>

View File

@@ -1,9 +1,11 @@
<script setup lang="ts"> <script setup lang="ts">
import type { NdmDeviceResultVO, NdmNvrResultVO } from '@/apis/models/device'; import type { Station } from '@/apis/domains';
import type { NdmDeviceResultVO, NdmNvrResultVO } from '@/apis/models';
import { useLineDevicesQuery } from '@/composables/query/use-line-devices-query'; import { useLineDevicesQuery } from '@/composables/query/use-line-devices-query';
import { DeviceType, DeviceTypeName, type DeviceTypeCode, type DeviceTypeKey } from '@/enums/device-type'; import { DeviceType, DeviceTypeName, type DeviceTypeCode, type DeviceTypeKey } from '@/enums/device-type';
import { useStationStore } from '@/stores/station'; import { useStationStore } from '@/stores/station';
import { ChevronBack } from '@vicons/ionicons5'; import { ChevronBack } from '@vicons/ionicons5';
import { destr } from 'destr';
import { import {
NButton, NButton,
NButtonGroup, NButtonGroup,
@@ -30,8 +32,6 @@ import { storeToRefs } from 'pinia';
import { h, onMounted, useTemplateRef } from 'vue'; import { h, onMounted, useTemplateRef } from 'vue';
import { computed, ref, watch } from 'vue'; import { computed, ref, watch } from 'vue';
import { useRoute, useRouter, type LocationQuery } from 'vue-router'; import { useRoute, useRouter, type LocationQuery } from 'vue-router';
import { destr } from 'destr';
import type { Station } from '@/apis/domains';
const route = useRoute(); const route = useRoute();
const router = useRouter(); const router = useRouter();

View File

@@ -1,15 +1,15 @@
<script setup lang="ts"> <script setup lang="ts">
import { reactive } from 'vue'; import { userClient } from '@/apis/client';
import { NLayout, NCard, NForm, NFormItem, NInput, NButton, NFlex } from 'naive-ui'; import type { LoginParams } from '@/apis/models';
import ThemeSwitch from '@/components/theme-switch.vue'; import ThemeSwitch from '@/components/theme-switch.vue';
import { useUserStore } from '@/stores/user'; import { useUserStore } from '@/stores/user';
import type { LoginParams } from '@/apis/models/user';
import { randomNum } from '@/utils/random-num'; import { randomNum } from '@/utils/random-num';
import { userClient } from '@/apis/client'; import { useMutation } from '@tanstack/vue-query';
import { NLayout, NCard, NForm, NFormItem, NInput, NButton, NFlex } from 'naive-ui';
import { reactive } from 'vue';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
const router = useRouter(); const router = useRouter();
import { useMutation } from '@tanstack/vue-query';
const formData = reactive<LoginParams>({ const formData = reactive<LoginParams>({
username: '', username: '',