From 743f7142460769c2e442d8679b12829283cee996 Mon Sep 17 00:00:00 2001 From: yin <3313488199@qq.com> Date: Fri, 9 Oct 2026 17:59:55 +0800 Subject: [PATCH] 1 --- src/api/index/index.ts | 40 +++ .../system/setting/account/account-config.ts | 3 +- src/views/system/setting/account/index.vue | 307 ++++++++++++++---- 3 files changed, 278 insertions(+), 72 deletions(-) diff --git a/src/api/index/index.ts b/src/api/index/index.ts index bd75642f..25f874b0 100644 --- a/src/api/index/index.ts +++ b/src/api/index/index.ts @@ -548,4 +548,44 @@ export function uploadClientErrorLog( data, isSystemApi: true } as any) +} + +// ============ index.getWarehousePanelData ============ + +/** index.getWarehousePanelData 入参 */ +export type GetWarehousePanelDataParams = { + /** 最后一次更改的时间戳(Unix 秒);常规调用(force 非真)必填,小于服务端缓存时间戳时返回 is_change=true;force=true 时可选,缺省视为 0 */ + last_change_at?: number + /** 是否强制输出数据(true/1/'true'):前端首次拉取时传 true,is_change 强制为 true,last_change_at 可不传 */ + force?: boolean | number | string +} + +/** index.getWarehousePanelData 响应 */ +export type GetWarehousePanelDataResponse = { + /** 是否已改变:force 为真时恒为 true;否则传入时间戳小于最后缓存时间戳时为 true,反之为 false */ + is_change?: boolean + /** 服务端最后更改时间戳(Unix 秒,缓存未命中为 0),前端保存后作为下次轮询的 last_change_at 入参回传 */ + last_change_at?: number + /** 面板数据,当前为空对象,字段另行约定 */ + data?: Record +} + +/** + * 仓库面板数据接口:按仓库做增量变更检测,返回 is_change 与 last_change_at。 + * ⚠️ 常规调用(force 非真)必须传 `last_change_at`;首次拉取传 `force: true`。 + */ +export function getWarehousePanelData( + data?: GetWarehousePanelDataParams +): Promise { + return request({ + url: '/system', + method: 'post', + params: { + method: 'index.getWarehousePanelData', + v: '1.0', + timestamp: new Date().getTime() + }, + data: data ?? {}, + isSystemApi: true + } as any) } \ No newline at end of file diff --git a/src/views/system/setting/account/account-config.ts b/src/views/system/setting/account/account-config.ts index 0841526b..d602f8e0 100644 --- a/src/views/system/setting/account/account-config.ts +++ b/src/views/system/setting/account/account-config.ts @@ -7,7 +7,8 @@ export const accountColumns = [ { label: '邮箱', prop: 'email', minWidth: 120 }, { label: '角色', prop: 'roles', minWidth: 140 }, { label: '状态', prop: 'status', width: 100 }, - { label: '操作', prop: 'actions', width: 480, fixed: 'right' } + // 操作列改为 link 按钮(对齐 views/mode 模板),宽度按最长 5 个按钮估算 + { label: '操作', prop: 'actions', width: 300, fixed: 'right' } ] export const defaultTemp = { diff --git a/src/views/system/setting/account/index.vue b/src/views/system/setting/account/index.vue index 771e2b8b..62a168c1 100644 --- a/src/views/system/setting/account/index.vue +++ b/src/views/system/setting/account/index.vue @@ -1,66 +1,104 @@