以 ckcloudManage a44810c 为基础,只保留资产页面(台账、单据、基础数据、同步任务)、 登录/错误/个人资料等公共页面,以及资产单据“查看流程”用到的流程详情页; 统一登录应用编码默认 CK_ASSET,标题“资产管理”,本地端口 9090。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
# 管理端列表页样式规范
|
||||
|
||||
适用于管理端所有“搜索 + 表格 + 分页”的内页。新页面优先用 `@/components/PublicView`,组件默认就符合本规范;暂未迁移的旧页面(`ContentWrap` + `el-form` + `el-table` + `Pagination`)在根节点加 `ckyun-list-page` 类并按下文调整结构。
|
||||
|
||||
## 1. 页面框架
|
||||
|
||||
| 区域 | 规范 |
|
||||
|------|------|
|
||||
| 顶栏 | 深红纯色(`--ckyun-header-bg-color`),左侧 logo + 面包屑,右侧“回到门户”和当前身份(只显示到集团/企业,部门岗位在悬停提示和切换下拉里) |
|
||||
| 位置 | 只在顶栏面包屑显示,页面内**不再放页面标题**;需要返回的详情页由路由 `meta.pageBackPath` 显示“返回 + 标题”行 |
|
||||
| 内容区 | 通栏铺满,不留外边距;背景 `--app-content-bg-color`(浅灰) |
|
||||
|
||||
## 2. 从上到下的四个区域
|
||||
|
||||
```
|
||||
┌──────────────────────────────────────────────┐
|
||||
│ ① 搜索区 字段 字段 字段 字段 │ 白底通栏,贴边
|
||||
│ 字段 字段 [筛选][重置] │
|
||||
│ ② 工具栏行 [+ 新增] [导出] … │ 紧接搜索区,同一块白底,靠左
|
||||
├──────────────────────────────────────────────┤
|
||||
│ ③ 表格卡片(四周留 16,圆角 8,阴影) │
|
||||
│ 表头浅灰 37px,行高 45px,操作列在最右 │
|
||||
├──────────────────────────────────────────────┤
|
||||
│ ④ 分页条 共 N 条记录,第 x / y 页 首页 上一页 1 2 … 下一页 尾页 每页 [10] 条 │
|
||||
└──────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
### ① 搜索区
|
||||
|
||||
- 白底通栏,左右内边距 16px,上 12px、下 14px,底部 1px 分隔线(下面有工具栏行时分隔线移到工具栏行底部)。
|
||||
- 标签在输入框**上方**,字号 12px;控件高 30px,宽度占满所在列。
|
||||
- 每行 4 列(≤1200px 3 列,≤768px 1 列),列间距 12px。
|
||||
- “筛选”(主按钮)“重置”固定在最后一个字段右侧、右对齐;字段多时用“展开/收起”。
|
||||
- 按钮文字统一为“筛选”“重置”,不用“搜索”“查询”。
|
||||
|
||||
### ② 工具栏行
|
||||
|
||||
- 放页面级操作:新增、导入导出、批量操作、刷新等;**不放筛选/重置**。
|
||||
- **放在查询条件下面,另起一行靠左**,与搜索区连成同一块白底;主操作(新增)在最前,用 `type="primary"`,其余默认按钮,间距 8px。
|
||||
- 页面需要先选上下文(如应用)时,选择器和按钮放在搜索区**上方**一行,选择器在最左、前面带“选择应用:”,按钮紧跟其后。
|
||||
- 没有任何操作时整行不显示。`PublicView` 在没有标题/`header` 插槽时自动把按钮行放到查询条件下面。
|
||||
|
||||
### ③ 表格卡片
|
||||
|
||||
- 与搜索区、分页条之间留 16px,左右 16px;白底,圆角 8px,阴影 `--ckyun-list-panel-shadow`,无边框。
|
||||
- 表头背景 `--ckyun-table-header-bg`,高 37px;数据行高 45px;单元格左右内边距 12px。
|
||||
- 第一列(名称/编号)加粗;状态用小标签;空数据显示“暂无数据”。
|
||||
- 操作列固定在最右,文字按钮,主操作红色(`--ckyun-table-action-primary-color`),间距 8px;超过 3 个收进“更多”。
|
||||
|
||||
### ④ 分页条
|
||||
|
||||
- 贴在页面底部的白色通栏,高 44px,左右内边距 16px,顶部 1px 分隔线。
|
||||
- 左侧“共 N 条记录,第 x / y 页”;右侧“首页 / 上一页 / 页码 / 下一页 / 尾页 / 每页 [n] 条”。
|
||||
- 旧页面使用 `PublicViewPagination`(从 `@/components/PublicView` 导入),不要用 `Pagination`。
|
||||
|
||||
## 3. 非列表页
|
||||
|
||||
左树右详情(组织架构、岗位、分组)、设计器、看板等不套用表格规范,但遵守:页面内不放页面标题、内容区通栏、卡片圆角 8px + 阴影、主按钮放在所属卡片右上角。
|
||||
|
||||
## 4. 检查清单
|
||||
|
||||
- [ ] 页面内没有和面包屑重复的标题
|
||||
- [ ] 新增等操作在查询条件下面一行靠左,筛选/重置在搜索区右侧
|
||||
- [ ] 搜索区标签在上、4 列网格、通栏白底
|
||||
- [ ] 表格是四周留 16px 的圆角卡片
|
||||
- [ ] 分页条在底部,格式为“共 N 条记录,第 x / y 页”
|
||||
@@ -0,0 +1,84 @@
|
||||
# SSO browser-session contract
|
||||
|
||||
- Login and logout URL creation are POST requests with a cryptographically random
|
||||
32-byte requestId. The initial login requestId is the browser transaction ID;
|
||||
there is no additional state parameter in the Ticket SSO protocol.
|
||||
The callback returns ticket and requestId; logout returns logout=1 and requestId.
|
||||
Ticket exchange sends the original ID as loginRequestId. The adapter generates
|
||||
a different requestId for its signed center exchange request, preserving replay
|
||||
protection. Browser requests include credentials for the HttpOnly binding.
|
||||
- The frontend requestId check is supplementary. The backend must independently bind
|
||||
and consume each transaction; a valid ticket by itself is insufficient.
|
||||
- Login and logout transactions have an 8-hour client lifetime matching the center
|
||||
recovery window, are bound to the
|
||||
originating tab and login generation, and are superseded by a newer transaction
|
||||
for this application. Callback errors remain visible until explicit user retry.
|
||||
- Access/refresh tokens, login generation and center-session binding are written
|
||||
as one application-namespaced localStorage record. Refresh preserves the
|
||||
generation and center binding. Other tabs reload identity and menus when the
|
||||
generation changes; old-page requests and old-generation responses are rejected.
|
||||
- Logout URL creation uses Origin, browser binding, requestId and the captured center
|
||||
generation, not a currently valid access token. Application logout sends the
|
||||
captured token without automatic refresh. Flow creation, login commits, logout cleanup, refresh,
|
||||
revoked-session cleanup and account-switch actions share the same Web Lock and
|
||||
recheck the captured flow or session after acquiring it. The backend must also resolve a replaced access token
|
||||
to its original refresh-token family. The center URL is bound to the captured
|
||||
opaque center-session generation, so a delayed logout cannot clear a newer
|
||||
center session.
|
||||
- Callback and local authentication URLs use Vite BASE_URL. The registered
|
||||
application callback must exactly match the deployed base path.
|
||||
- Legacy unnamespaced tokens are intentionally not migrated: their owning
|
||||
application cannot be established safely. Deployment requires a fresh login.
|
||||
- Browser flow storage uses v2 keys and does not accept previous state-based
|
||||
transactions. Historical OAuth and social-login state parameters remain unchanged.
|
||||
- The standalone center page at /zcy/login is not coupled to the management
|
||||
application's local login generation. Its captcha requests carry no management
|
||||
token; its form is bound by the backend's HttpOnly cookie and login token.
|
||||
- Sliding captcha is temporarily disabled (2026-10-24). `UnifiedLogin.vue` reads
|
||||
`VITE_APP_CAPTCHA_ENABLE`; when false, it submits the account/password form
|
||||
directly and does not mount the captcha widget. The backend
|
||||
`ckcloud.captcha.enable` must also be false. To restore captcha, enable both
|
||||
switches and restart/rebuild the affected services.
|
||||
- Changing an existing mobile number or email address prompts for currentPassword
|
||||
without storing it in the profile or login cache. Successful sensitive changes
|
||||
revoke sessions and send the user directly to forced login.
|
||||
- Profile password changes also revoke all sessions. The success event carries
|
||||
the pre-request session snapshot; cleanup and forced login occur under the
|
||||
shared lock only if that login generation is still current.
|
||||
- HTTPS and same-site deployment of the frontend and first-party adapter are
|
||||
required for browser cookie binding. CORS must allow the exact frontend origin
|
||||
with credentials, never a credentialed wildcard.
|
||||
- A modern browser with the Web Locks API is required by default. Unsupported
|
||||
browsers or insecure origins display an explicit error and cannot change login
|
||||
state. A dedicated HTTP test artifact may explicitly set
|
||||
`VITE_ALLOW_INSECURE_HTTP_SSO=true`; it serializes writes only within the current
|
||||
page and therefore must not be used for production or concurrent cross-tab
|
||||
account switching. Token writes and removals still assert lock ownership.
|
||||
- Test artifacts may set `VITE_SSO_CENTER_PORT_MAP` (for example,
|
||||
`8081:9000,1081:2000`) so browser redirects use the matching internal or
|
||||
externally mapped identity-center port. This is an automatic exact port map;
|
||||
users never choose a center and production artifacts leave it unset.
|
||||
- Requests capture one session snapshot before checking the page generation and
|
||||
use only that snapshot's token. An old page cannot adopt another tab's new
|
||||
identity between the page check and the Authorization header assignment.
|
||||
|
||||
## Focused manual acceptance
|
||||
|
||||
Logout URL or server revocation failures do not prevent local cleanup. Each
|
||||
failure path rechecks the captured flow and session before clearing storage.
|
||||
The callback displays an explicit incomplete-revocation warning; a stale logout
|
||||
must still abort without deleting a newer login. Local-only completion never
|
||||
claims all application or center sessions were revoked.
|
||||
|
||||
No automated tests or builds were executed for this hardening change.
|
||||
|
||||
1. Login each application with an independent requestId and ensure same-origin deployment
|
||||
does not overwrite the other application's token or tenant/user cache.
|
||||
2. Reject absent, mismatched, expired, replayed and foreign-browser callback requestId.
|
||||
3. Start two login attempts; only the current transaction may commit locally.
|
||||
4. Change account in a second tab while requests are pending; reload the first tab
|
||||
without displaying the old identity with the new account's data.
|
||||
5. Logout while refresh is pending, then login in another tab. Old logout responses
|
||||
and callbacks must not remove the new session.
|
||||
6. Confirm revoked application access stops at an error page without a login loop.
|
||||
7. Verify callbacks and retry links when deployed at a non-root base path.
|
||||
Reference in New Issue
Block a user