同步业务菜单现有图标配置
This commit is contained in:
@@ -31,8 +31,8 @@ insert into business_menu_icon_expected (
|
|||||||
is_frame, is_cache, menu_type, visible, status, perms,
|
is_frame, is_cache, menu_type, visible, status, perms,
|
||||||
parent_id, order_num, old_icon, new_icon
|
parent_id, order_num, old_icon, new_icon
|
||||||
) values
|
) values
|
||||||
(121, '基础资料维护', 'businessMaster', null, '', '', 1, 0, 'M', '0', '0', '', 0, 1, '#', 'dict'),
|
(121, '基础资料维护', 'businessMaster', null, '', '', 1, 0, 'M', '0', '0', '', 0, 1, '#', 'documentation'),
|
||||||
(122, '业务管理', 'businessOperation', null, '', '', 1, 0, 'M', '0', '0', '', 0, 2, '#', 'form'),
|
(122, '业务管理', 'businessOperation', null, '', '', 1, 0, 'M', '0', '0', '', 0, 2, '#', 'build'),
|
||||||
(123, '报表查询', 'businessReport', null, '', '', 1, 0, 'M', '0', '0', '', 0, 3, '#', 'chart');
|
(123, '报表查询', 'businessReport', null, '', '', 1, 0, 'M', '0', '0', '', 0, 3, '#', 'chart');
|
||||||
|
|
||||||
drop temporary table if exists business_menu_icon_guard;
|
drop temporary table if exists business_menu_icon_guard;
|
||||||
@@ -87,8 +87,8 @@ from (
|
|||||||
-- 唯一永久 DML:只更新三个业务一级目录的图标。
|
-- 唯一永久 DML:只更新三个业务一级目录的图标。
|
||||||
update sys_menu
|
update sys_menu
|
||||||
set icon = case menu_id
|
set icon = case menu_id
|
||||||
when 121 then 'dict'
|
when 121 then 'documentation'
|
||||||
when 122 then 'form'
|
when 122 then 'build'
|
||||||
when 123 then 'chart'
|
when 123 then 'chart'
|
||||||
else icon
|
else icon
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1449,8 +1449,8 @@ create table biz_pallet_inventory (
|
|||||||
-- 初始化-托盘业务一级菜单和权限
|
-- 初始化-托盘业务一级菜单和权限
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
insert into sys_menu values
|
insert into sys_menu values
|
||||||
(121, '基础资料维护', 0, '1', 'businessMaster', null, '', '', 1, 0, 'M', '0', '0', '', 'dict', 'admin', current_timestamp, '', null, ''),
|
(121, '基础资料维护', 0, '1', 'businessMaster', null, '', '', 1, 0, 'M', '0', '0', '', 'documentation', 'admin', current_timestamp, '', null, ''),
|
||||||
(122, '业务管理', 0, '2', 'businessOperation', null, '', '', 1, 0, 'M', '0', '0', '', 'form', 'admin', current_timestamp, '', null, ''),
|
(122, '业务管理', 0, '2', 'businessOperation', null, '', '', 1, 0, 'M', '0', '0', '', 'build', 'admin', current_timestamp, '', null, ''),
|
||||||
(123, '报表查询', 0, '3', 'businessReport', null, '', '', 1, 0, 'M', '0', '0', '', 'chart', 'admin', current_timestamp, '', null, ''),
|
(123, '报表查询', 0, '3', 'businessReport', null, '', '', 1, 0, 'M', '0', '0', '', 'chart', 'admin', current_timestamp, '', null, ''),
|
||||||
(502, '菌种资料', 121, '1', 'strain', 'master/strain/index', '', '', 1, 0, 'C', '0', '0', 'master:strain:list', '#', 'admin', current_timestamp, '', null, ''),
|
(502, '菌种资料', 121, '1', 'strain', 'master/strain/index', '', '', 1, 0, 'C', '0', '0', 'master:strain:list', '#', 'admin', current_timestamp, '', null, ''),
|
||||||
(503, '客户资料', 121, '2', 'customer', 'master/customer/index', '', '', 1, 0, 'C', '0', '0', 'master:customer:list', '#', 'admin', current_timestamp, '', null, ''),
|
(503, '客户资料', 121, '2', 'customer', 'master/customer/index', '', '', 1, 0, 'C', '0', '0', 'master:customer:list', '#', 'admin', current_timestamp, '', null, ''),
|
||||||
|
|||||||
@@ -283,8 +283,8 @@ insert into sys_menu values('1059', '预览代码', '116', '5', '#', '', '', '',
|
|||||||
insert into sys_menu values('1060', '生成代码', '116', '6', '#', '', '', '', 1, 0, 'F', '0', '0', 'tool:gen:code', '#', 'admin', sysdate(), '', null, '');
|
insert into sys_menu values('1060', '生成代码', '116', '6', '#', '', '', '', 1, 0, 'F', '0', '0', 'tool:gen:code', '#', 'admin', sysdate(), '', null, '');
|
||||||
|
|
||||||
-- 托盘业务一级目录
|
-- 托盘业务一级目录
|
||||||
insert into sys_menu values('121', '基础资料维护', '0', '1', 'businessMaster', null, '', '', 1, 0, 'M', '0', '0', '', 'dict', 'admin', sysdate(), '', null, '基础资料维护目录');
|
insert into sys_menu values('121', '基础资料维护', '0', '1', 'businessMaster', null, '', '', 1, 0, 'M', '0', '0', '', 'documentation', 'admin', sysdate(), '', null, '基础资料维护目录');
|
||||||
insert into sys_menu values('122', '业务管理', '0', '2', 'businessOperation', null, '', '', 1, 0, 'M', '0', '0', '', 'form', 'admin', sysdate(), '', null, '业务管理目录');
|
insert into sys_menu values('122', '业务管理', '0', '2', 'businessOperation', null, '', '', 1, 0, 'M', '0', '0', '', 'build', 'admin', sysdate(), '', null, '业务管理目录');
|
||||||
insert into sys_menu values('123', '报表查询', '0', '3', 'businessReport', null, '', '', 1, 0, 'M', '0', '0', '', 'chart', 'admin', sysdate(), '', null, '报表查询目录');
|
insert into sys_menu values('123', '报表查询', '0', '3', 'businessReport', null, '', '', 1, 0, 'M', '0', '0', '', 'chart', 'admin', sysdate(), '', null, '报表查询目录');
|
||||||
|
|
||||||
-- 托盘业务页面
|
-- 托盘业务页面
|
||||||
|
|||||||
@@ -594,13 +594,13 @@ EXPECTED_TOP_LEVEL_MENU_POSITIONS = {
|
|||||||
3: ('系统工具', 0, 6),
|
3: ('系统工具', 0, 6),
|
||||||
}
|
}
|
||||||
EXPECTED_BUSINESS_ROOT_ICONS = {
|
EXPECTED_BUSINESS_ROOT_ICONS = {
|
||||||
121: 'dict',
|
121: 'documentation',
|
||||||
122: 'form',
|
122: 'build',
|
||||||
123: 'chart',
|
123: 'chart',
|
||||||
}
|
}
|
||||||
EXPECTED_TOP_LEVEL_MENU_STABLE_FIELDS = {
|
EXPECTED_TOP_LEVEL_MENU_STABLE_FIELDS = {
|
||||||
121: ('基础资料维护', 'businessMaster', None, '', '', '1', '0', 'M', '0', '0', '', 'dict'),
|
121: ('基础资料维护', 'businessMaster', None, '', '', '1', '0', 'M', '0', '0', '', 'documentation'),
|
||||||
122: ('业务管理', 'businessOperation', None, '', '', '1', '0', 'M', '0', '0', '', 'form'),
|
122: ('业务管理', 'businessOperation', None, '', '', '1', '0', 'M', '0', '0', '', 'build'),
|
||||||
123: ('报表查询', 'businessReport', None, '', '', '1', '0', 'M', '0', '0', '', 'chart'),
|
123: ('报表查询', 'businessReport', None, '', '', '1', '0', 'M', '0', '0', '', 'chart'),
|
||||||
1: ('系统管理', 'system', None, '', '', '1', '0', 'M', '0', '0', '', 'system'),
|
1: ('系统管理', 'system', None, '', '', '1', '0', 'M', '0', '0', '', 'system'),
|
||||||
2: ('系统监控', 'monitor', None, '', '', '1', '0', 'M', '0', '0', '', 'monitor'),
|
2: ('系统监控', 'monitor', None, '', '', '1', '0', 'M', '0', '0', '', 'monitor'),
|
||||||
@@ -1259,8 +1259,25 @@ class SqlContractTest(unittest.TestCase):
|
|||||||
self.assertNotRegex(executable.lower(), r'\bsys_role_menu\b')
|
self.assertNotRegex(executable.lower(), r'\bsys_role_menu\b')
|
||||||
|
|
||||||
expected_rows = [
|
expected_rows = [
|
||||||
('121', '基础资料维护', 'businessMaster', None, '', '', '1', '0', 'M', '0', '0', '', '0', '1', '#', 'dict'),
|
(
|
||||||
('122', '业务管理', 'businessOperation', None, '', '', '1', '0', 'M', '0', '0', '', '0', '2', '#', 'form'),
|
'121',
|
||||||
|
'基础资料维护',
|
||||||
|
'businessMaster',
|
||||||
|
None,
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'1',
|
||||||
|
'0',
|
||||||
|
'M',
|
||||||
|
'0',
|
||||||
|
'0',
|
||||||
|
'',
|
||||||
|
'0',
|
||||||
|
'1',
|
||||||
|
'#',
|
||||||
|
'documentation',
|
||||||
|
),
|
||||||
|
('122', '业务管理', 'businessOperation', None, '', '', '1', '0', 'M', '0', '0', '', '0', '2', '#', 'build'),
|
||||||
('123', '报表查询', 'businessReport', None, '', '', '1', '0', 'M', '0', '0', '', '0', '3', '#', 'chart'),
|
('123', '报表查询', 'businessReport', None, '', '', '1', '0', 'M', '0', '0', '', '0', '3', '#', 'chart'),
|
||||||
]
|
]
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
@@ -1277,7 +1294,7 @@ class SqlContractTest(unittest.TestCase):
|
|||||||
'select menu_id from sys_menu where menu_id in (121, 122, 123) order by menu_id for update'
|
'select menu_id from sys_menu where menu_id in (121, 122, 123) order by menu_id for update'
|
||||||
)
|
)
|
||||||
expected_update = (
|
expected_update = (
|
||||||
"update sys_menu set icon = case menu_id when 121 then 'dict' when 122 then 'form' "
|
"update sys_menu set icon = case menu_id when 121 then 'documentation' when 122 then 'build' "
|
||||||
"when 123 then 'chart' else icon end where menu_id in (121, 122, 123)"
|
"when 123 then 'chart' else icon end where menu_id in (121, 122, 123)"
|
||||||
)
|
)
|
||||||
self.assertEqual(lock_statement, transaction_body[0])
|
self.assertEqual(lock_statement, transaction_body[0])
|
||||||
@@ -1339,7 +1356,7 @@ class SqlContractTest(unittest.TestCase):
|
|||||||
def test_top_level_menu_contract_rejects_same_stable_field_drift_in_both_initializers(self) -> None:
|
def test_top_level_menu_contract_rejects_same_stable_field_drift_in_both_initializers(self) -> None:
|
||||||
mutations = (
|
mutations = (
|
||||||
(1, '系统管理', 'system', 'driftSystemIcon'),
|
(1, '系统管理', 'system', 'driftSystemIcon'),
|
||||||
(121, '基础资料维护', 'dict', 'driftBusinessIcon'),
|
(121, '基础资料维护', 'documentation', 'driftBusinessIcon'),
|
||||||
)
|
)
|
||||||
for filename in INITIALIZERS:
|
for filename in INITIALIZERS:
|
||||||
sql = (SQL_ROOT / filename).read_text(encoding='utf-8')
|
sql = (SQL_ROOT / filename).read_text(encoding='utf-8')
|
||||||
|
|||||||
Reference in New Issue
Block a user