diff --git a/src/api/system/device/index.ts b/src/api/system/device/index.ts index 5771b832..8a7817ab 100644 --- a/src/api/system/device/index.ts +++ b/src/api/system/device/index.ts @@ -10,6 +10,11 @@ import type { DevicePasswordVerifyForm, DeviceMobileUpdateForm, DeviceEmailUpdateForm, + DeviceBasicInfo, + DeviceHardwareInfo, + DeviceNetworkInfo, + DeviceOtherInfo, + DeviceSecurityInfo, } from "./types"; import type { ExcelResult, PageResult, OptionItem } from "@/api/common"; @@ -36,21 +41,22 @@ const DeviceAPI = { */ getPage(queryParams: DeviceQueryParams) { return request>({ - url: `${DEVICE_BASE_URL}`, + url: `${DEVICE_BASE_URL}/page`, method: "get", params: queryParams, }); }, /** - * 获取设备表单详情 + * 获取设备头部信息(设备主表详情) + * 对应后端 GET /{sn}/detail (getSnBindInfo) * * @param sn 设备SN - * @returns 设备表单详情 + * @returns 设备头部信息(含在线状态、IMEI、所有者、部门等) */ getFormData(sn: string) { return request({ - url: `${DEVICE_BASE_URL}/${sn}/info`, + url: `${DEVICE_BASE_URL}/${sn}/detail`, method: "get", }); }, @@ -308,15 +314,45 @@ const DeviceAPI = { }); }, - /** - * 推送开发者模式指令到设备 - * @param sn 设备SN号 - */ - deviceDeveloper(sn: string) { - return request({ - url: `${DEVICE_BASE_URL}/developer`, - method: "post", - params: { sn }, + // ===================== 设备系统信息(分面板独立接口) ===================== + + /** 设备基本信息 */ + getBasicInfo(serialno: string) { + return request({ + url: `${DEVICE_BASE_URL}/${serialno}/basic_info`, + method: "get", + }); + }, + + /** 设备硬件信息 */ + getHardwareInfo(serialno: string) { + return request({ + url: `${DEVICE_BASE_URL}/${serialno}/hardware_info`, + method: "get", + }); + }, + + /** 设备网络信息 */ + getNetworkInfo(serialno: string) { + return request({ + url: `${DEVICE_BASE_URL}/${serialno}/network_info`, + method: "get", + }); + }, + + /** 设备安全信息 */ + getSecurityInfo(serialno: string) { + return request({ + url: `${DEVICE_BASE_URL}/${serialno}/security_info`, + method: "get", + }); + }, + + /** 设备其他信息 */ + getOtherInfo(serialno: string) { + return request({ + url: `${DEVICE_BASE_URL}/${serialno}/other_info`, + method: "get", }); }, }; diff --git a/src/api/system/device/types.ts b/src/api/system/device/types.ts index 1cb208e5..995df1c6 100644 --- a/src/api/system/device/types.ts +++ b/src/api/system/device/types.ts @@ -161,3 +161,171 @@ export interface DeviceEmailUpdateForm { /** 当前密码 */ password?: string; } + +// ===================== 设备系统信息(分面板) ===================== + +/** 设备基本信息 */ +export interface DeviceBasicInfo { + id?: number; + serialno?: string; + deviceName?: string; + deviceBrand?: string; + deviceModel?: string; + deviceBoard?: string; + deviceManufacturer?: string; + hardware?: string; + host?: string; + androidVersion?: string; + androidApi?: number; + androidId?: string; + buildId?: string; + buildDisplayId?: string; + buildFingerprint?: string; + buildType?: string; + buildUser?: string; + buildHost?: string; + buildTags?: string; + buildTime?: string; + language?: string; + timezone?: string; + bootTime?: string; + screenResolution?: string; + screenDensity?: number; + kernelVersion?: string; + romVersion?: string; + // ===================== 补充基本信息字段 ===================== + productName?: string; + productModel?: string; + productDevice?: string; + boardPlatform?: string; + deviceType?: string; + isTablet?: number; + releaseVersion?: string; + displayVersion?: string; + bootloader?: string; + basebandVersion?: string; + radioVersion?: string; + screenSize?: string; + screenInch?: number; + refreshRate?: number; + osType?: string; + osVersion?: string; + firmwareVersion?: string; +} + +/** 设备硬件信息 */ +export interface DeviceHardwareInfo { + id?: number; + serialno?: string; + cpuAbi?: string; + cpuAbi2?: string; + cpuMin?: string; + cpuModel?: string; + cpuCores?: number; + cpuMaxFreq?: string; + cpuMinFreq?: string; + totalRam?: string; + availableRam?: string; + internalStorage?: string; + availableStorage?: string; + externalStorage?: string; + batteryCapacity?: string; + batteryLevel?: number; + batteryStatus?: string; + batteryHealth?: string; + batteryTemp?: string; + batteryVoltage?: string; + batteryTechnology?: string; + gpuRenderer?: string; + gpuVendor?: string; + gpuVersion?: string; + sensors?: string; + supportAbi?: string; + supportAbi64?: string; +} + +/** 设备网络信息 */ +export interface DeviceNetworkInfo { + id?: number; + serialno?: string; + networkType?: string; + networkSubtype?: string; + isConnected?: number; + wifiSsid?: string; + wifiBssid?: string; + wifiIp?: string; + wifiMac?: string; + wifiGateway?: string; + wifiNetmask?: string; + wifiDns?: string; + wifiRssi?: number; + wifiSpeed?: string; + mobileIp?: string; + mobileMac?: string; + mobileImei?: string; + mobileImsi?: string; + mobileOperator?: string; + mobileSimSerial?: string; + mobileNetworkType?: string; + bluetoothMac?: string; + bluetoothName?: string; + isVpn?: number; + isProxy?: number; + proxyHost?: string; + proxyPort?: string; +} + +/** 设备安全信息 */ +export interface DeviceSecurityInfo { + id?: number; + serialno?: string; + isRoot?: number; + isJailbreak?: number; + rootStatus?: number; + hasSuBinary?: number; + hasBusybox?: number; + isEmulator?: number; + isDebuggable?: number; + isUsbDebug?: number; + isUnknownSources?: number; + isVerifyApps?: number; + isEncrypted?: number; + lockScreenType?: string; + hasPassword?: number; + passwordType?: string; + securityPatch?: string; + googlePlayProtect?: number; + adbStatus?: number; + isVpnActive?: number; + isDeviceOwner?: number; + androidVersion?: string; + kernelVersion?: string; +} + +/** 设备其他信息 */ +export interface DeviceOtherInfo { + id?: number; + serialno?: string; + appVersion?: string; + appVersionCode?: number; + installTime?: string; + updateTimeApp?: string; + packageName?: string; + channel?: string; + deviceId?: string; + gaid?: string; + oaid?: string; + phoneNumber?: string; + iccid?: string; + imsi?: string; + cameraInfo?: string; + sensorCount?: number; + appListMd5?: string; + isCharging?: number; + chargingType?: string; + temperature?: string; + freeStorage?: string; + totalStorage?: string; + freeRam?: string; + totalRam?: string; +} diff --git a/src/components/DeviceSn/DeviceSnDetail.vue b/src/components/DeviceSn/DeviceSnDetail.vue index 68886f92..19d658d7 100644 --- a/src/components/DeviceSn/DeviceSnDetail.vue +++ b/src/components/DeviceSn/DeviceSnDetail.vue @@ -18,39 +18,39 @@
IMEI: - {{ deviceData.imei }} + {{ formatText(deviceData.imei) }}
设备所有者: - {{ deviceData.owner }} + {{ formatText(deviceData.owner) }}
所属部门: - {{ deviceData.department }} + {{ formatText(deviceData.department) }}
分组: - {{ deviceData.group }} + {{ formatText(deviceData.group) }}
设备类型: - {{ deviceData.deviceType }} + {{ formatText(deviceData.deviceType) }}
设备来源: - {{ deviceData.source }} + {{ formatText(deviceData.source) }}
激活时间: - {{ deviceData.activationTime }} + {{ formatText(deviceData.activationTime) }}
最后上线: - {{ deviceData.lastOnline }} + {{ formatText(deviceData.lastOnline) }}
设备编号: - {{ deviceData.deviceSn }} + {{ formatText(deviceData.deviceSn) }}
@@ -109,257 +109,390 @@ - -
- - -
- -
-

基本信息

- - - {{ basicInfo.deviceName }} - - - {{ basicInfo.deviceModel }} - - {{ basicInfo.os }} - - {{ basicInfo.osVersion }} - - - {{ basicInfo.language }} - + + + + + + + + + + {{ formatText(basicInfo.deviceName) }} + + + {{ formatText(basicInfo.deviceBrand) }} + + + {{ formatText(basicInfo.deviceModel) }} + + + {{ formatText(basicInfo.deviceBoard) }} + + + {{ formatText(basicInfo.deviceManufacturer) }} + + + {{ formatText(basicInfo.hardware) }} + + + {{ formatText(basicInfo.host) }} + + + {{ formatText(basicInfo.androidVersion) }} + + + {{ formatText(basicInfo.androidApi) }} + + + {{ formatText(basicInfo.androidId) }} + + + {{ formatText(basicInfo.buildId) }} + + + {{ formatText(basicInfo.buildDisplayId) }} + + + {{ formatText(basicInfo.buildType) }} + + + {{ formatText(basicInfo.language) }} + + + {{ formatText(basicInfo.timezone) }} + + + {{ formatText(basicInfo.screenResolution) }} + + + {{ formatText(basicInfo.screenDensity) }} + + + {{ formatText(basicInfo.kernelVersion) }} + + + {{ formatText(basicInfo.romVersion) }} + + + - {{ basicInfo.timezone }} - - {{ basicInfo.imei }} - - - {{ basicInfo.bluetoothMac }} - + + + + + + {{ formatText(hardwareInfo.cpuAbi) }} + + + {{ formatText(hardwareInfo.cpuModel) }} + + + {{ formatText(hardwareInfo.cpuCores) }} + + + {{ formatText(hardwareInfo.cpuMaxFreq) }} + + + {{ formatText(hardwareInfo.cpuMinFreq) }} + + + {{ formatText(hardwareInfo.totalRam) }} + + + {{ formatText(hardwareInfo.availableRam) }} + + + {{ formatText(hardwareInfo.internalStorage) }} + + + {{ formatText(hardwareInfo.availableStorage) }} + + + {{ formatText(hardwareInfo.externalStorage) }} + + + {{ formatText(hardwareInfo.batteryCapacity) }} + + + {{ formatText(hardwareInfo.batteryLevel) }} + + + {{ formatText(hardwareInfo.batteryStatus) }} + + + {{ formatText(hardwareInfo.batteryHealth) }} + + + {{ formatText(hardwareInfo.batteryTemp) }} + + + {{ formatText(hardwareInfo.gpuRenderer) }} + + + {{ formatText(hardwareInfo.gpuVendor) }} + + + {{ formatText(hardwareInfo.gpuVersion) }} + + + {{ formatText(hardwareInfo.sensors) }} + + + - - {{ basicInfo.wifiMac }} - - {{ basicInfo.color }} - - {{ basicInfo.capacity }} - - - {{ basicInfo.availableCapacity }} - + + + + + + {{ formatText(networkInfo.networkType) }} + + + {{ formatBool(networkInfo.isConnected) }} + + + {{ formatText(networkInfo.wifiSsid) }} + + + {{ formatText(networkInfo.wifiBssid) }} + + + {{ formatText(networkInfo.wifiIp) }} + + + {{ formatText(networkInfo.wifiMac) }} + + + {{ formatText(networkInfo.wifiGateway) }} + + + {{ formatText(networkInfo.wifiRssi) }} + + + {{ formatText(networkInfo.mobileOperator) }} + + + {{ formatText(networkInfo.mobileImei) }} + + + {{ formatText(networkInfo.mobileImsi) }} + + + {{ formatText(networkInfo.bluetoothMac) }} + + + {{ formatText(networkInfo.bluetoothName) }} + + + {{ formatBool(networkInfo.isVpn) }} + + + {{ formatBool(networkInfo.isProxy) }} + + + {{ formatText(networkInfo.proxyHost) }} + + + {{ formatText(networkInfo.proxyPort) }} + + + - - {{ basicInfo.memoryCapacity }} - + + + + + + {{ formatBool(securityInfo.rootStatus) }} + + + {{ formatBool(securityInfo.isRoot) }} + + + {{ formatBool(securityInfo.isJailbreak) }} + + + {{ formatBool(securityInfo.hasSuBinary) }} + + + {{ formatBool(securityInfo.hasBusybox) }} + + + {{ formatBool(securityInfo.isEmulator) }} + + + {{ formatBool(securityInfo.isDebuggable) }} + + + {{ formatBool(securityInfo.isUsbDebug) }} + + + {{ formatBool(securityInfo.isUnknownSources) }} + + + {{ formatBool(securityInfo.isEncrypted) }} + + + {{ formatBool(securityInfo.hasPassword) }} + + + {{ formatText(securityInfo.lockScreenType) }} + + + {{ formatText(securityInfo.securityPatch) }} + + + {{ formatBool(securityInfo.adbStatus) }} + + + {{ formatBool(securityInfo.isVpnActive) }} + + + {{ formatBool(securityInfo.isDeviceOwner) }} + + + - - {{ basicInfo.availableMemory }} - + + + + + + {{ formatText(otherInfo.appVersion) }} + + + {{ formatText(otherInfo.appVersionCode) }} + + + {{ formatText(otherInfo.packageName) }} + + + {{ formatText(otherInfo.channel) }} + + + {{ formatText(otherInfo.deviceId) }} + + + {{ formatText(otherInfo.gaid) }} + + + {{ formatText(otherInfo.oaid) }} + + + {{ formatText(otherInfo.phoneNumber) }} + + + {{ formatText(otherInfo.iccid) }} + + + {{ formatText(otherInfo.imsi) }} + + + {{ formatBool(otherInfo.isCharging) }} + + + {{ formatText(otherInfo.chargingType) }} + + + {{ formatText(otherInfo.temperature) }} + + + {{ formatText(otherInfo.freeStorage) }} + + + {{ formatText(otherInfo.freeRam) }} + + + {{ formatText(otherInfo.sensorCount) }} + + + {{ formatText(otherInfo.appListMd5) }} + + + + + - - {{ basicInfo.batteryLevel }} - + + +
+ +
+
- - {{ basicInfo.batteryHealth }} - - {{ basicInfo.weight }} - - {{ basicInfo.dimensions }} - - - {{ basicInfo.simStatus }} - + +
+ +
+
- - {{ basicInfo.phoneNumber }} - + +
+ +
+
- - {{ basicInfo.iccid }} - - - {{ basicInfo.meid }} - -
-
+ +
+ +
+
- -
-

硬件信息

- - - {{ hardwareInfo.processor }} - - - - {{ hardwareInfo.processorCores }} - - - - {{ hardwareInfo.gpu }} - - - {{ hardwareInfo.screenSize }} - - - {{ hardwareInfo.screenResolution }} - - - {{ hardwareInfo.screenDensity }} - - - {{ hardwareInfo.camera }} - - - {{ hardwareInfo.sensors }} - - - {{ hardwareInfo.nfc }} - - - {{ hardwareInfo.faceId }} - - -
- - -
-

网络信息

- - - {{ networkInfo.currentNetwork }} - - - {{ networkInfo.carrier }} - - - {{ networkInfo.signalStrength }} - - - {{ networkInfo.ipAddress }} - - - {{ networkInfo.wifiName }} - - - {{ networkInfo.wifiMac }} - - - {{ networkInfo.cellularType }} - - - {{ networkInfo.roamingStatus }} - - -
- - -
-

安全信息

- - - {{ securityInfo.lockScreenPassword }} - - - {{ securityInfo.passwordComplexity }} - - - {{ securityInfo.dataProtection }} - - - {{ securityInfo.findMyIPhone }} - - - {{ securityInfo.deviceEncryption }} - - - {{ securityInfo.jailbreakStatus }} - - - {{ securityInfo.supervisedStatus }} - - - {{ securityInfo.lastSecurityScan }} - - - {{ securityInfo.securityPatchVersion }} - - -
- - -
-

其他信息

- - - {{ otherInfo.purchaseDate }} - - - {{ otherInfo.warrantyExpiry }} - - {{ otherInfo.source }} - - {{ otherInfo.assignDate }} - - {{ otherInfo.remark }} - {{ otherInfo.tags }} - - {{ otherInfo.customField1 }} - - - {{ otherInfo.customField2 }} - - -
-
-
- - -
- -
-
- - -
- -
-
- - -
- -
-
- - -
- -
-
- - -
- -
- , -
-
-
+ +
+ +
+
+