From aebef55e0a53eacbae943719454619bcfdcb1b34 Mon Sep 17 00:00:00 2001 From: TongTongStudio Date: Mon, 10 Aug 2026 01:59:45 +0800 Subject: [PATCH] =?UTF-8?q?refactor(api):=20=E4=BF=AE=E6=AD=A3=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E6=8E=A5=E5=8F=A3=E5=AD=97=E6=AE=B5=E5=B9=B6=E8=A1=A5?= =?UTF-8?q?=E5=85=85=E6=8E=A8=E9=80=81ID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将 DeviceItem 接口从用户字段替换为设备相关字段 - 在 DeviceOtherInfo 中新增 pushId 字段 - 调整设备列表显示顺序,并移除推送ID列的溢出提示 - 在设备详情中展示极光推送ID --- src/api/system/device/types.ts | 41 +++++++++------------- src/components/DeviceSn/DeviceSnDetail.vue | 3 ++ src/views/devices/sn/config/content.ts | 4 +-- 3 files changed, 22 insertions(+), 26 deletions(-) diff --git a/src/api/system/device/types.ts b/src/api/system/device/types.ts index 73a128df..9a1acca7 100644 --- a/src/api/system/device/types.ts +++ b/src/api/system/device/types.ts @@ -34,38 +34,30 @@ export interface DeviceQueryParams extends BaseQueryParams { createTime?: [string, string]; } -/** 用户分页对象 */ +/** 设备分页对象 */ export interface DeviceItem { - /** 用户ID */ + /** 设备ID */ id: string; - /** 用户头像地址 */ - avatar?: string; - /** 创建时间 */ - createTime?: Date; - /** 部门名称 */ - deptName?: string; - /** 用户邮箱 */ - email?: string; - /** 性别 */ - gender?: number; - /** 手机号 */ - mobile?: string; - /** 用户昵称 */ - nickname?: string; - /** 角色名称,多个使用英文逗号(,)分割 */ - roleNames?: string; - /** 用户状态(1:启用;0:禁用) */ - status?: number; - /** 用户名 */ - Devicename?: string; /** 设备序列号 */ serialno?: string; + /** 设备型号 */ + snModel?: string; + /** 设备名 */ + snName?: string; + /** 设备绑定手机 */ + snMobile?: string; + /** 推送ID */ + pushId?: string; + /** 设备状态(1:启用;0:禁用) */ + status?: number; /** 在线状态(1:在线;0:离线) */ online?: number; /** 最后心跳时间 */ lastHeartbeatTime?: string; - /** 推送ID */ - pushId?: string; + /** 激活时间 */ + activateTime?: string; + /** 创建时间 */ + createTime?: Date; } /** 设备在线状态视图对象 */ @@ -337,6 +329,7 @@ export interface DeviceOtherInfo { packageName?: string; channel?: string; deviceId?: string; + pushId?: string; gaid?: string; oaid?: string; phoneNumber?: string; diff --git a/src/components/DeviceSn/DeviceSnDetail.vue b/src/components/DeviceSn/DeviceSnDetail.vue index 77407104..cd0e4692 100644 --- a/src/components/DeviceSn/DeviceSnDetail.vue +++ b/src/components/DeviceSn/DeviceSnDetail.vue @@ -494,6 +494,9 @@ {{ formatText(otherInfo.deviceId) }} + + {{ formatText(otherInfo.pushId) }} + {{ formatText(otherInfo.gaid) }} diff --git a/src/views/devices/sn/config/content.ts b/src/views/devices/sn/config/content.ts index 5956cd20..def0a7c5 100644 --- a/src/views/devices/sn/config/content.ts +++ b/src/views/devices/sn/config/content.ts @@ -68,9 +68,9 @@ const contentConfig: IContentConfig = { slotName: "onlineStatus", width: 100, }, - { label: "设备型号", align: "center", prop: "snModel", width: 200 }, { label: "设备昵称", align: "center", prop: "snName", width: 200 }, - { label: "推送ID", align: "center", prop: "pushId", width: 200, showOverflowTooltip: true }, + { label: "设备型号", align: "center", prop: "snModel", width: 200 }, + { label: "推送ID", align: "center", prop: "pushId", width: 200 }, // { label: "设备 IMEI", align: "center", prop: "snImei", width: 200 }, // { label: "设备版本号", align: "center", prop: "snDispalyId", width: 400 }, // { label: "头像", align: "center", prop: "avatar", templet: "image" },