Files
smart_grid_iot/database/migrations/20260911_menu_iconfont.sql
T
andyesfly 68af363ca9 feat: 新增自定义图标库并调整菜单图标与菜单归属
1. 新增 iconfont 自定义图标库及相关依赖文件
2. 调整菜单图标为自定义字体图标,替换原有 Ant Design 图标
3. 将客户拜访菜单从客户管理移动到项目管理作为首个子菜单
4. 优化侧边菜单展开逻辑与图标样式适配
2026-09-11 17:01:24 +08:00

32 lines
1.5 KiB
PL/PgSQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- ============================================================
-- 增量脚本:导航菜单图标切换为 iconfont 自定义图标
-- 日期:2026-09-11
-- 数据库:PostgreSQL 15+ (xintong)
-- 说明:将 5 个业务菜单的 sys_menu.icon 由 ant-design 图标名
-- 改为前端 iconfont 类名(xt- 前缀),前端据此渲染字体图标。
-- 图标源自 client/src/assets/fonts/iconfont(css_prefix_text = xt-)。
-- 幂等脚本,可重复执行。
--
-- 用法:
-- psql -U postgres -d xintong -f 20260911_menu_iconfont.sql
-- ============================================================
BEGIN;
UPDATE sys_menu SET icon = 'xt-xiaochengxu' WHERE menu_path = '/customer/account'; -- 客户小程序授权管理
UPDATE sys_menu SET icon = 'xt-jihuabaifang' WHERE menu_path = '/customer/visit'; -- 客户拜访
UPDATE sys_menu SET icon = 'xt-topology' WHERE menu_path = '/customer/topology'; -- 空间拓扑与用电架构
UPDATE sys_menu SET icon = 'xt-xiangmukancha' WHERE menu_path = '/project/survey'; -- 项目勘察
UPDATE sys_menu SET icon = 'xt-xiangmufangan' WHERE menu_path = '/project/plan'; -- 项目方案
COMMIT;
-- ============================================================
-- 验证查询(可选)
-- ============================================================
SELECT id, menu_name, menu_path, icon
FROM sys_menu
WHERE menu_path IN ('/customer/account', '/customer/visit', '/customer/topology',
'/project/survey', '/project/plan')
ORDER BY id;