Commit Graph

606 Commits

Author SHA1 Message Date
chengkai3 fa4834a9e2 fix:[FL-191][修复用户创建失败的数据库事务错误]
Co-authored-by: multica-agent <github@multica.ai>
2026-06-18 11:00:38 +08:00
chengkai3 a332ba58ba [fix]:[FL-190][系统接口中的stacktrace信息不要直接展示到页面给用户看]
- 后端:在 exception_handlers.py 添加文档注释,明确说明 stacktrace 字段仅供开发调试使用
- 前端:在 api.ts 添加 ApiErrorResponse 类型定义和文档注释,明确 readApiError 函数只提取 detail 字段展示给用户
- stacktrace 在 debug 模式下会返回给浏览器(可在开发者工具中查看),但前端不会展示到页面上

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-18 10:19:25 +08:00
chengkai3 33db320c0e feat:[FL-189][给用户管理增加卡片视图]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-18 10:10:01 +08:00
chengkai3 5796797120 fix:[FL-188][菜单管理页面关键字过滤后查不到数据时分页组件不要隐藏]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-18 10:04:18 +08:00
chengkai3 af14490042 fix: [FL-186][菜单管理页面输入关键字时不要触发查询动作]
将关键字输入与实际查询参数分离,用户在输入框中输入时不会立即触发API请求。
只有在点击「搜索」按钮或按下Enter键时才执行查询。

改动点:
- 新增activeKeyword和activeStatusFilter状态用于存储实际查询参数
- 修改loadMenus依赖为activeKeyword和activeStatusFilter
- 新增handleSearch函数,在点击搜索时更新查询参数
- 为关键字输入框添加onPressEnter支持

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-18 08:41:13 +08:00
chengkai3 3cc35c0336 feat: [FL-184] 添加调试模式配置以返回异常堆栈跟踪
- 在配置文件中添加 debug_mode 参数,默认值为 true
- 创建全局异常处理器,当 debug_mode 开启时返回 stacktrace 信息
- 在 .env.example 中添加 DEBUG_MODE 配置项说明
- 新增测试文件验证调试模式功能

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-18 08:39:21 +08:00
chengkai3 e47fd7e855 fix:[FL-183][菜单管理页面优化]
- 移除排序方式过滤表单和重置筛选按钮
- 新增主题色搜索按钮,查询需手动触发
- 修复表单值变化触发两次查询的问题
- 输入关键字时不再自动触发查询

Co-authored-by: multica-agent <github@multica.ai>
2026-06-18 08:25:51 +08:00
chengkai3 4a97c4f80c fix:[FL-182][菜单列表改名菜单管理]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-18 08:20:33 +08:00
chengkai3 5f10af0b30 fix:[FL-181][用户管理页面去掉操作列固定]
Co-authored-by: multica-agent <github@multica.ai>
2026-06-18 08:07:22 +08:00
chengkai3 cb1c883ce7 feat:[FL-179][角色管理页面所有角色都要支持删除]
移除了对admin和user角色的删除限制,现在所有角色都可以删除。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-18 08:06:44 +08:00
chengkai3 aecf0ca396 fix: [FL-178][缩小角色管理页面表格列宽度]
- 角色编码列宽从180px缩小到140px
- 角色名称列宽从180px缩小到140px
- 菜单列最大宽度从420px缩小到300px
- 操作列宽从160px缩小到140px
- 移除表格横向滚动配置(x: 1400),使表格自适应容器宽度

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-18 08:06:19 +08:00
chengkai3 b1f3785f77 fix:[FL-180][角色管理页面新增编辑表单宽度调整]
移除角色管理页面 Modal 的 width={760} 属性,使其使用默认宽度,与用户管理页面保持一致

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-18 08:05:51 +08:00
chengkai3 84e74fda3f fix:[FL-177][去掉主题中的紧凑主题]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-18 00:35:03 +08:00
chengkai3 6519fee729 [feat]:[FL-172][用户管理页面新增用户时邮箱放最后,且不要必填]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-18 00:34:20 +08:00
chengkai3 e37ecac9af fix:[FL-175][角色管理页面搜索无结果时显示分页组件]
Co-authored-by: multica-agent <github@multica.ai>
2026-06-18 00:30:46 +08:00
chengkai3 31d65094b1 fix:[FL-176][用户管理页面用户列表改成用户管理]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-18 00:29:02 +08:00
chengkai3 db843dc31a [fix]:[FL-171][角色管理页面角色编码不要用标签展示]
Co-authored-by: multica-agent <github@multica.ai>
2026-06-18 00:27:11 +08:00
chengkai3 c54b0faceb [fix]:[FL-173][系统右上角点击用户头像展开下来信息时,不要展示状态信息]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-18 00:26:55 +08:00
chengkai3 67a895fe01 [fix]:[FL-170][角色管理页面输入关键字时不要直接触发查询]
将角色管理页面的搜索行为从输入时自动触发改为手动触发(点击搜索按钮或按回车键)。

主要改动:
- 修改 loadData 函数接收可选的 keyword 参数,不再依赖 searchKeyword 状态
- 移除 searchKeyword 从 loadData 的依赖数组,避免每次输入都触发请求
- 更新搜索按钮和回车事件处理,显式传入 searchKeyword 参数

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-18 00:25:36 +08:00
chengkai3 4d8cfa4b02 [fix]:[FL-169][用户管理页面loading位置调整]
将用户管理页面查询时的loading从新增用户按钮左边移到表格上方,
与角色管理页面保持一致。移除Card extra中的Spin组件,loading
完全由Table组件的loading属性控制。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-18 00:23:28 +08:00
chengkai3 cdc0b4b054 feat:[FL-165][角色管理页面查询时合并角色和菜单请求]
将角色管理页面的角色和菜单两个独立API请求合并为单个请求,减少网络开销。

后端改动:
- 新增 RolesWithMenusResponse 响应模型
- 新增 list_roles_with_menus 服务函数
- 新增 GET /api/v1/admin/roles-with-menus 接口

前端改动:
- 更新 loadData 函数使用新的合并接口
- 减少从两个并发请求改为单个请求

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-18 00:05:11 +08:00
chengkai3 22f3bdd438 fix:[FL-164][角色列表标题改成角色管理]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-18 00:00:24 +08:00
chengkai3 f281a1aebc [fix]:[FL-168][新建角色时角色编码要加唯一性校验]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-17 23:55:57 +08:00
chengkai3 1ef379304c feat:[FL-166][角色管理新建编辑角色表单单列展示]
将角色管理表单中的"角色编码"和"角色名称"从双列布局改为单列展示,提升表单可读性。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-17 23:53:08 +08:00
chengkai3 6535863691 [fix]:[FL-162][优化用户管理页面表格宽度,移除横向滚动条]
Co-authored-by: multica-agent <github@multica.ai>
2026-06-17 23:51:01 +08:00
chengkai3 5835de1601 feat:[FL-163][角色管理页面去掉重置筛选按钮,搜索按钮用主题色]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-17 23:48:40 +08:00
chengkai3 864fd5e239 fix:[FL-161][用户管理页面操作列宽度固定在120px]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-17 23:48:10 +08:00
chengkai3 dd15768623 feat:[FL-160][角色管理页面表单过滤改成后台查询]
- 后端API新增keyword查询参数支持角色搜索
- 在数据库层面实现基础过滤优化性能
- 前端移除客户端过滤逻辑改为调用后端API
- 添加搜索按钮和回车搜索功能

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-17 23:23:38 +08:00
chengkai3 1384c0c449 fix:[FL-157][新建用户表单改为单列展示]
- 移除新建用户表单的grid双列布局
- 表单字段现在以单列形式垂直排列展示

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-17 23:14:14 +08:00
chengkai3 371d1fdfe1 fix:[FL-159][登录后跳转到菜单数据中的第一个菜单]
- 修改登录后的重定向逻辑,从硬编码的 /users 改为动态获取用户菜单数据的第一个菜单路径
- 新增 findFirstMenuPath 函数递归查找第一个有效菜单路径
- 新增 normalizeMenuTreePaths 函数标准化菜单路径
- 在 useEffect 中调用 /api/v1/admin/me/menus 接口获取菜单数据
- 如果菜单获取失败或没有有效路径,仍回退到 /users 作为默认页面

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-17 23:12:37 +08:00
chengkai3 22e316850e fix:[FL-157][移除用户ID列的标签样式]
- 移除用户ID列的Typography.Text code渲染
- 用户ID现在以普通文本形式显示

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-17 23:06:24 +08:00
chengkai3 1c1843e180 fix:[FL-157][修复搜索无结果时操作列宽度变宽问题]
- 添加tableLayout="fixed"属性强制固定表格布局
- 确保即使数据为空时,操作列宽度也保持180px不变

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-17 23:02:19 +08:00
chengkai3 9d6bd733a2 fix:[FL-157][搜索无结果时保持分页组件显示]
- 设置分页total最小值为1,确保即使数据为0时分页组件也显示
- showTotal显示真实的数据条数,不受最小值影响

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-17 22:59:26 +08:00
chengkai3 cf5bbc3548 fix: [FL-158] 去掉登录页面的立即注册
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-17 22:46:19 +08:00
chengkai3 c64a0584f3 fix:[FL-157][去掉编辑用户状态字段必填校验]
- 移除状态字段的required校验规则
- 允许编辑用户时状态为可选项

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-17 22:43:44 +08:00
chengkai3 9f869284d2 feat:[FL-157][编辑用户表单增强]
- 编辑用户时添加用户ID字段并可编辑
- 调整表单字段顺序:用户ID、用户名、邮箱、状态
- 邮箱改为非必填项
- 用户ID添加唯一性校验,防止与已有用户冲突
- 更新API payload支持new_user_id字段

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-17 22:31:14 +08:00
chengkai3 6cb8cf8cba fix:[FL-157][状态过滤清空时不显示all]
- 修改statusFilter类型为可选值,去除all类型
- 清空时保持undefined状态,不回退到all
- 添加placeholder显示全部提示
- 调整查询逻辑仅在statusFilter有值时添加status参数

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-17 22:01:46 +08:00
chengkai3 fcff08afce fix:[FL-150][给ant-card增加height:100%确保占满父容器]
在所有管理页面的AntCard/Card组件上添加style={{ height: '100%' }},
确保卡片占满父容器的高度,解决页面底部padding看起来比顶部多的问题。

修改文件:
- web/src/app/admin/users/page.tsx
- web/src/app/admin/menus/page.tsx
- web/src/app/admin/system-params/page.tsx
- web/src/app/admin/task-monitor/page.tsx
- web/src/app/admin/syslog/page.tsx
- web/src/app/admin/workers/page.tsx
- web/src/app/admin/atp-models/page.tsx
- web/src/app/admin/roles/page.tsx
- web/src/app/admin/scheduled-tasks/page.tsx
- web/src/app/admin/elevation/page.tsx
- web/src/app/admin/system-messages/page.tsx

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-17 21:29:15 +08:00
chengkai3 e8c6de3c6d fix:[FL-155][确保所有页面分页组件始终显示]
为所有管理页面的分页组件添加 hideOnSinglePage: false 配置,
确保即使在数据为空或只有一页时,分页组件也保持可见。

涉及页面:
- elevation (高程数据)
- fault-recurrence (故障再现)
- fl-analysis (雷电流分析)
- lightning-currents (雷电流)
- lightning-distribution (地闪密度)
- menus (菜单管理)
- power-lines (线路管理)
- roles (角色管理)
- scheduled-tasks (定时任务)
- syslog (系统日志)
- system-messages (系统消息)
- system-params (系统参数)
- task-monitor (任务监控)
- users (用户管理)
- workers (Worker监控)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-17 21:25:53 +08:00
chengkai3 dacead3751 feat:[FL-157][用户管理页面样式优化]
- 邮箱列宽度从240px调整为220px
- 状态列添加居中对齐
- 操作列宽度从120px扩展为180px
- 移除重置筛选按钮
- 状态筛选去除全部选项,支持清空操作

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-17 21:22:14 +08:00
chengkai3 9f4a121712 feat:[FL-156][菜单管理页面的过滤表单实时查询后台数据]
- 后端API添加keyword和status查询参数支持
- 前端改为调用后端API进行实时过滤
- 添加300ms防抖优化性能

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-17 18:41:37 +08:00
chengkai3 5617ca1d39 fix:[FL-155][排查系统中所有页面,没数据时分页组件不要隐藏]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-17 18:39:14 +08:00
chengkai3 dfca6277b0 fix:[FL-154][线路管理页面删除线路后,如果没有可选线路了,后续触发的接口调用会报错]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-17 15:38:44 +08:00
chengkai3 c451a20f76 fix:[FL-153][导入雷电分布数据改成导入地闪密度数据]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-17 15:35:07 +08:00
chengkai3 89c0f4a2a0 feat:[FL-151][UI 组件对比度和视觉层级优化]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-17 15:31:22 +08:00
chengkai3 900a6db58b fix:[FL-152][将雷电分布统计(空间维度)改为地闪密度统计]
Co-authored-by: multica-agent <github@multica.ai>
2026-06-17 15:27:03 +08:00
chengkai3 9ebdbacbf2 fix:[FL-150][修复admin-design-page-body高度未填满问题]
在所有管理页面中添加flex-1样式,使space-y-6容器填满父元素admin-design-page-body,
解决页面底部padding看起来比顶部padding多的问题。

修改文件:
- web/src/app/admin/users/page.tsx
- web/src/app/admin/menus/page.tsx
- web/src/app/admin/system-params/page.tsx
- web/src/app/admin/task-monitor/page.tsx
- web/src/app/admin/syslog/page.tsx
- web/src/app/admin/workers/page.tsx
- web/src/app/admin/atp-models/page.tsx
- web/src/app/admin/roles/page.tsx
- web/src/app/admin/scheduled-tasks/page.tsx
- web/src/app/admin/elevation/page.tsx
- web/src/app/admin/system-messages/page.tsx

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-17 15:24:08 +08:00
chengkai3 8e4d0fffa3 fix:[FL-149][去掉ant-pagination默认margin-bottom:16px]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-17 14:50:17 +08:00
chengkai3 cbf4408e05 feat:[FL-148][参考用户关联页面布局给雷电流幅值统计页面增加文件名关键字过滤]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-17 14:28:43 +08:00
chengkai3 820ac6b7e7 [fix]:[FL-147][地闪密度统计页面去掉最小、最大经纬度过滤表单]
Co-authored-by: multica-agent <github@multica.ai>
2026-06-17 14:19:53 +08:00