From 3fb8bad805df315a7325f805413087ca2eba9905 Mon Sep 17 00:00:00 2001 From: zhengwr Date: Fri, 12 Jun 2026 07:25:39 +0800 Subject: [PATCH] =?UTF-8?q?F2-17:=20=E7=99=BB=E5=BD=95=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E8=B7=B3=E5=B7=A5=E4=BD=9C=E5=8F=B0+=E6=B8=85=20PoC=20?= =?UTF-8?q?=E9=A2=84=E5=A1=AB=E8=B4=A6=E5=8F=B7+mock=20=E9=A1=B5=E6=A0=87?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E6=AD=A3(#1/#2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- public/schemas/role-maintain.json | 48 ++++++++++++- public/schemas/usergroup-manage.json | 102 ++++++++++++++++++++++++++- src/pages/LoginPage.tsx | 7 +- 3 files changed, 152 insertions(+), 5 deletions(-) diff --git a/public/schemas/role-maintain.json b/public/schemas/role-maintain.json index ddfa616..8dca031 100644 --- a/public/schemas/role-maintain.json +++ b/public/schemas/role-maintain.json @@ -1 +1,47 @@ -{"type":"page","title":"测试","body":{"type":"crud","api":"/api/entity/SYS_ROLE/list?page=${page}&perPage=${perPage}","syncLocation":false,"filter":{"title":"查询","body":[{"name":"NAME","label":"角色名称","type":"input-text"},{"name":"DESCRIPTION","label":"描述","type":"input-text"}]},"columns":[{"name":"NAME","label":"角色名称","width":200},{"name":"DESCRIPTION","label":"描述","width":200},{"name":"SYS_ROLE_ID","label":"主键","width":200,"toggled":false}],"headerToolbar":["bulkActions","pagination"],"primaryField":"SYS_ROLE_ID"}} \ No newline at end of file +{ + "type": "page", + "title": "角色维护", + "body": { + "type": "crud", + "api": "/api/entity/SYS_ROLE/list?page=${page}&perPage=${perPage}", + "syncLocation": false, + "filter": { + "title": "查询", + "body": [ + { + "name": "NAME", + "label": "角色名称", + "type": "input-text" + }, + { + "name": "DESCRIPTION", + "label": "描述", + "type": "input-text" + } + ] + }, + "columns": [ + { + "name": "NAME", + "label": "角色名称", + "width": 200 + }, + { + "name": "DESCRIPTION", + "label": "描述", + "width": 200 + }, + { + "name": "SYS_ROLE_ID", + "label": "主键", + "width": 200, + "toggled": false + } + ], + "headerToolbar": [ + "bulkActions", + "pagination" + ], + "primaryField": "SYS_ROLE_ID" + } +} \ No newline at end of file diff --git a/public/schemas/usergroup-manage.json b/public/schemas/usergroup-manage.json index af01a5b..975fbb0 100644 --- a/public/schemas/usergroup-manage.json +++ b/public/schemas/usergroup-manage.json @@ -1 +1,101 @@ -{"type":"page","title":"测试","body":{"type":"crud","api":"/api/entity/SYS_USERGROUP/list?page=${page}&perPage=${perPage}","syncLocation":false,"filter":{"title":"查询","body":[{"name":"NAME","label":"名称","type":"input-text"},{"name":"DESCRIPTION","label":"说明","type":"input-text"}]},"columns":[{"name":"SYS_USERGROUP_ID","label":"主键","width":200,"toggled":false},{"name":"NAME","label":"名称","width":200},{"name":"DESCRIPTION","label":"说明","width":200},{"name":"USERS","label":"用户","width":200,"toggled":false},{"name":"ROLES","label":"角色","width":200,"toggled":false}],"headerToolbar":["bulkActions",{"type":"button","label":"添加用户组","level":"primary","actionType":"dialog","dialog":{"type":"dialog","title":"添加用户组","body":{"type":"tpl","tpl":"表单页(pageid=b3482a80-8676-4037-83c7-9a9c293fc8dc)待 EDITFORM 模板转换"}}},{"type":"button","label":"修改用户组"},{"type":"button","label":"删除用户组","level":"danger","actionType":"ajax","confirmText":"确认删除选中记录?","api":"delete:/api/entity/SYS_USERGROUP/${ids}"},{"type":"button","label":"查看用户组"},{"type":"button","label":"分配用户"},{"type":"button","label":"分配角色"},{"type":"button","label":"复制用户组"},"pagination"],"primaryField":"SYS_USERGROUP_ID"}} \ No newline at end of file +{ + "type": "page", + "title": "用户组管理", + "body": { + "type": "crud", + "api": "/api/entity/SYS_USERGROUP/list?page=${page}&perPage=${perPage}", + "syncLocation": false, + "filter": { + "title": "查询", + "body": [ + { + "name": "NAME", + "label": "名称", + "type": "input-text" + }, + { + "name": "DESCRIPTION", + "label": "说明", + "type": "input-text" + } + ] + }, + "columns": [ + { + "name": "SYS_USERGROUP_ID", + "label": "主键", + "width": 200, + "toggled": false + }, + { + "name": "NAME", + "label": "名称", + "width": 200 + }, + { + "name": "DESCRIPTION", + "label": "说明", + "width": 200 + }, + { + "name": "USERS", + "label": "用户", + "width": 200, + "toggled": false + }, + { + "name": "ROLES", + "label": "角色", + "width": 200, + "toggled": false + } + ], + "headerToolbar": [ + "bulkActions", + { + "type": "button", + "label": "添加用户组", + "level": "primary", + "actionType": "dialog", + "dialog": { + "type": "dialog", + "title": "添加用户组", + "body": { + "type": "tpl", + "tpl": "表单页(pageid=b3482a80-8676-4037-83c7-9a9c293fc8dc)待 EDITFORM 模板转换" + } + } + }, + { + "type": "button", + "label": "修改用户组" + }, + { + "type": "button", + "label": "删除用户组", + "level": "danger", + "actionType": "ajax", + "confirmText": "确认删除选中记录?", + "api": "delete:/api/entity/SYS_USERGROUP/${ids}" + }, + { + "type": "button", + "label": "查看用户组" + }, + { + "type": "button", + "label": "分配用户" + }, + { + "type": "button", + "label": "分配角色" + }, + { + "type": "button", + "label": "复制用户组" + }, + "pagination" + ], + "primaryField": "SYS_USERGROUP_ID" + } +} \ No newline at end of file diff --git a/src/pages/LoginPage.tsx b/src/pages/LoginPage.tsx index 83ff1bf..8112443 100644 --- a/src/pages/LoginPage.tsx +++ b/src/pages/LoginPage.tsx @@ -7,10 +7,11 @@ import { setSession } from '../auth/token'; export function LoginPage() { const navigate = useNavigate(); const location = useLocation(); - const from = (location.state as { from?: string })?.from || '/page/usergroup-manage'; + // F2-17 #1:默认落工作台(原 /page/usergroup-manage 是 PoC 脚手架残留) + const from = (location.state as { from?: string })?.from || '/workbench'; - const [account, setAccount] = useState('alice'); - const [password, setPassword] = useState('123456'); + const [account, setAccount] = useState(''); + const [password, setPassword] = useState(''); const [error, setError] = useState(''); const [loading, setLoading] = useState(false);