2
0

fix:ap设备界面功能增加

This commit is contained in:
zhongzm
2025-02-20 15:20:25 +08:00
parent 298d5ef363
commit 4ef332f5e9
6 changed files with 276 additions and 26 deletions

139
src/typings/api.d.ts vendored
View File

@@ -540,21 +540,41 @@ declare namespace Api {
namespace Device {
interface ApDevice {
id: number;
mac: string;
ip: string;
name: string;
status: number;
type: string;
subtype: string | null;
deviceSeriesType: number;
model: string;
ip: string;
ipv6: string | null;
uptime: string;
createBy: string | null;
createTime: string;
updateBy: string | null;
updateTime: string | null;
operate?: string;
status: number;
lastSeen: number;
cpuUtil: number;
memUtil: number;
sn: string;
licenseStatus: number;
tagName: string | null;
uplinkDeviceMac: string | null;
uplinkDeviceName: string | null;
uplinkDevicePort: string | null;
linkSpeed: string | null;
duplex: string | null;
switchConsistent: boolean;
publicIp: string;
firmwareVersion: string;
}
interface ApDeviceListData {
total: number;
rows: ApDevice[];
}
type ApDeviceResponse = App.Service.Response<Api.Common.PaginatingQueryRecord<ApDevice>>;
interface ApDeviceResponse {
code: number;
msg: string;
data: ApDeviceListData;
}
interface ApDeviceParams {
pageNum: number;
@@ -591,6 +611,62 @@ declare namespace Api {
clientDeviceType?: string;
clientMac?: string;
}
/** AP设备添加参数 */
interface AddApDeviceItem {
sn?: string;
name?: string;
username?: string;
password?: string;
}
interface AddApDeviceParams {
devices: AddApDeviceItem[];
}
interface ApDeviceLocation {
longitude: number;
latitude: number;
address: string;
}
interface ApDeviceConfigData {
name: string;
ledSetting: number;
tagIds: string[];
location: ApDeviceLocation;
}
interface ApDeviceConfigResponse {
code: number;
msg: string;
data: {
name: string;
ledSetting: number;
tagIds: string[];
location: {
longitude: number;
latitude: number;
address: string;
}
}|null;
}
interface ApDeviceConfigUpdate {
name?: string;
ledSetting?: number;
tagIds?: string[];
location?: {
longitude?: number;
latitude?: number;
address?: string;
}
}
interface ApDeviceConfigForm {
name: string;
ledSetting: number;
tagIds?: string[];
longitude?: number;
latitude?: number;
address?: string;
}
}
namespace Billing {
@@ -696,4 +772,49 @@ declare namespace Api {
total: number;
}
}
namespace Site {
interface SiteInfo {
siteId: string;
name: string;
tagIds: string[];
region: string;
timeZone: string;
scenario: string;
longitude: number | null;
latitude: number | null;
address: string | null;
type: number;
supportES: boolean;
supportL2: boolean;
}
interface SiteParams {
pageNum: number;
pageSize: number;
}
interface SiteListData {
total: number;
rows: SiteInfo[];
}
interface SiteResponse {
code: number;
msg: string;
data: SiteListData;
}
}
namespace Wlan {
interface WlanGroup {
wlanId: string;
name: string;
primary: boolean;
}
interface WlanGroupResponse {
code: number;
msg: string;
data: WlanGroup[];
}
}
}

View File

@@ -10,11 +10,13 @@ declare global {
const $notification: typeof import('ant-design-vue')['notification']
const EffectScope: typeof import('vue')['EffectScope']
const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate']
const addApDevice: typeof import('../service/api/auth')['addApDevice']
const addData: typeof import('../service/api/dictData')['addData']
const addJob: typeof import('../service/api/job')['addJob']
const addPackage: typeof import('../service/api/auth')['addPackage']
const addRateLimit: typeof import('../service/api/auth')['addRateLimit']
const addThemeVarsToHtml: typeof import('../store/modules/theme/shared')['addThemeVarsToHtml']
const adoptApDevice: typeof import('../service/api/auth')['adoptApDevice']
const afterAll: typeof import('vitest')['afterAll']
const afterEach: typeof import('vitest')['afterEach']
const approveKyc: typeof import('../service/api/auth')['approveKyc']
@@ -141,17 +143,21 @@ declare global {
const fetchRateLimitList: typeof import('../service/api/auth')['fetchRateLimitList']
const fetchRefreshToken: typeof import('../service/api/auth')['fetchRefreshToken']
const fetchRegister: typeof import('../service/api/auth')['fetchRegister']
const fetchSiteList: typeof import('../service/api/auth')['fetchSiteList']
const fetchTerminalList: typeof import('../service/api/auth')['fetchTerminalList']
const fetchWlanGroups: typeof import('../service/api/auth')['fetchWlanGroups']
const filterAuthRoutesByRoles: typeof import('../store/modules/route/shared')['filterAuthRoutesByRoles']
const filterTabsById: typeof import('../store/modules/tab/shared')['filterTabsById']
const filterTabsByIds: typeof import('../store/modules/tab/shared')['filterTabsByIds']
const findTabByRouteName: typeof import('../store/modules/tab/shared')['findTabByRouteName']
const forgetApDevice: typeof import('../service/api/auth')['forgetApDevice']
const formatBandwidth: typeof import('../utils/units')['formatBandwidth']
const formatStorage: typeof import('../utils/units')['formatStorage']
const formatTime: typeof import('../utils/units')['formatTime']
const getActivePinia: typeof import('pinia')['getActivePinia']
const getAllTabs: typeof import('../store/modules/tab/shared')['getAllTabs']
const getAntdTheme: typeof import('../store/modules/theme/shared')['getAntdTheme']
const getApDeviceConfig: typeof import('../service/api/auth')['getApDeviceConfig']
const getBreadcrumbsByRoute: typeof import('../store/modules/route/shared')['getBreadcrumbsByRoute']
const getCacheRouteNames: typeof import('../store/modules/route/shared')['getCacheRouteNames']
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
@@ -283,6 +289,7 @@ declare global {
const unref: typeof import('vue')['unref']
const unrefElement: typeof import('@vueuse/core')['unrefElement']
const until: typeof import('@vueuse/core')['until']
const updateApDeviceConfig: typeof import('../service/api/auth')['updateApDeviceConfig']
const updateBillRule: typeof import('../service/api/auth')['updateBillRule']
const updateData: typeof import('../service/api/dictData')['updateData']
const updateJob: typeof import('../service/api/job')['updateJob']