Files
zyt/server/sql/1.9.20260507/add_diagnosis_patient_orders_menu.sql
T
2026-05-11 17:49:38 +08:00

23 lines
1.1 KiB
SQL
Executable File
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.
# 诊单编辑抽屉「业务订单」tab:菜单按钮权限注册(2026-05-07
# 挂在「中医诊单」(perms=tcm.diagnosis/lists) 菜单下,按钮型权限节点:
# tcm.diagnosis/patientOrders 在编辑诊单抽屉查看「业务订单」tab
#
# 说明:
# - 此权限仅控制前端 tab 可见性。
# - tab 内拉取数据复用 /tcm.prescriptionOrder/lists 接口,因此需同时分配
# tcm.prescriptionOrder/lists 接口权限给目标角色,否则 tab 可见但列表为空/被拦截。
SET @diag_menu_id := (SELECT id FROM zyt_system_menu WHERE perms = 'tcm.diagnosis/lists' LIMIT 1);
INSERT INTO zyt_system_menu (
pid, type, name, icon, sort, perms, paths, component,
selected, params, is_cache, is_show, is_disable, create_time, update_time
)
SELECT
@diag_menu_id, 'A', '业务订单查看', '', 70,
'tcm.diagnosis/patientOrders', '', '',
'', '', 0, 1, 0, UNIX_TIMESTAMP(), UNIX_TIMESTAMP()
FROM DUAL
WHERE @diag_menu_id IS NOT NULL
AND NOT EXISTS (SELECT 1 FROM zyt_system_menu WHERE perms = 'tcm.diagnosis/patientOrders');