refactor: remove shell.ui and global_menu.ui (moved to sage/wwwroot)
dashboard_for_sage now only handles dashboard content when the dashboard menu item is clicked. Shell layout and global menu are sage-level concerns managed in sage/wwwroot/index.ui and sage/wwwroot/global_menu.ui.
This commit is contained in:
parent
741daafdef
commit
56a9a13db1
@ -1,175 +0,0 @@
|
||||
{% set roles = get_user_roles(get_user()) %}
|
||||
{
|
||||
"widgettype": "Menu",
|
||||
"id": "global_nav_menu",
|
||||
"options": {
|
||||
"width": "100%",
|
||||
"height": "100%",
|
||||
"bgcolor": "#111827",
|
||||
"items": [
|
||||
{
|
||||
"name": "dashboard",
|
||||
"label": "仪表盘",
|
||||
"icon": "fa fa-dashboard",
|
||||
"url": "{{entire_url('/dashboard_for_sage/index.ui')}}",
|
||||
"target": "app.sage_main_content"
|
||||
},
|
||||
{% if get_user() %}
|
||||
{
|
||||
"name": "unified_dashboard",
|
||||
"label": "统一仪表板",
|
||||
"icon": "fa fa-chart-line",
|
||||
"url": "{{entire_url('/unified_dashboard/index.ui')}}",
|
||||
"target": "app.sage_main_content"
|
||||
},
|
||||
{
|
||||
"name": "integrated_crm_app",
|
||||
"label": "CRM系统",
|
||||
"icon": "fa fa-handshake",
|
||||
"url": "{{entire_url('/integrated_crm_app/index.ui')}}",
|
||||
"target": "app.sage_main_content"
|
||||
},
|
||||
{
|
||||
"name": "customer_management",
|
||||
"label": "客户管理",
|
||||
"icon": "fa fa-users",
|
||||
"url": "{{entire_url('/customer_management/index.ui')}}",
|
||||
"target": "app.sage_main_content"
|
||||
},
|
||||
{
|
||||
"name": "opportunity_management",
|
||||
"label": "商机管理",
|
||||
"icon": "fa fa-briefcase",
|
||||
"url": "{{entire_url('/opportunity_management/index.ui')}}",
|
||||
"target": "app.sage_main_content"
|
||||
},
|
||||
{
|
||||
"name": "contract_management",
|
||||
"label": "合同管理",
|
||||
"icon": "fa fa-file-contract",
|
||||
"url": "{{entire_url('/contract_management/index.ui')}}",
|
||||
"target": "app.sage_main_content"
|
||||
},
|
||||
{
|
||||
"name": "product_management",
|
||||
"label": "产品管理",
|
||||
"icon": "fa fa-cubes",
|
||||
"url": "{{entire_url('/product_management/index.ui')}}",
|
||||
"target": "app.sage_main_content"
|
||||
},
|
||||
{
|
||||
"name": "supplychain",
|
||||
"label": "供销链管理",
|
||||
"icon": "fa fa-truck",
|
||||
"url": "{{entire_url('/supplychain/index.ui')}}",
|
||||
"target": "app.sage_main_content"
|
||||
},
|
||||
{
|
||||
"name": "pricing",
|
||||
"label": "定价管理",
|
||||
"icon": "fa fa-money-bill",
|
||||
"url": "{{entire_url('/pricing/index.ui')}}",
|
||||
"target": "app.sage_main_content"
|
||||
},
|
||||
{
|
||||
"name": "discount",
|
||||
"label": "折扣管理",
|
||||
"icon": "fa fa-percent",
|
||||
"url": "{{entire_url('/discount/promote.ui')}}",
|
||||
"target": "app.sage_main_content"
|
||||
},
|
||||
{
|
||||
"name": "financial_management",
|
||||
"label": "财务管理",
|
||||
"icon": "fa fa-calculator",
|
||||
"url": "{{entire_url('/financial_management/index.ui')}}",
|
||||
"target": "app.sage_main_content"
|
||||
},
|
||||
{
|
||||
"name": "workflow_approval",
|
||||
"label": "工作流审批",
|
||||
"icon": "fa fa-tasks",
|
||||
"url": "{{entire_url('/workflow_approval/index.ui')}}",
|
||||
"target": "app.sage_main_content"
|
||||
},
|
||||
{
|
||||
"name": "llmage",
|
||||
"label": "LLM 模型管理",
|
||||
"icon": "fa fa-brain",
|
||||
"url": "{{entire_url('/llmage/index.ui')}}",
|
||||
"target": "app.sage_main_content"
|
||||
},
|
||||
{
|
||||
"name": "rag",
|
||||
"label": "知识库管理",
|
||||
"icon": "fa fa-database",
|
||||
"url": "{{entire_url('/rag/index.ui')}}",
|
||||
"target": "app.sage_main_content"
|
||||
},
|
||||
{
|
||||
"name": "cpcc",
|
||||
"label": "算力中心管理",
|
||||
"icon": "fa fa-server",
|
||||
"url": "{{entire_url('/cpcc/index.ui')}}",
|
||||
"target": "app.sage_main_content"
|
||||
},
|
||||
{
|
||||
"name": "msp",
|
||||
"label": "运维管理",
|
||||
"icon": "fa fa-tools",
|
||||
"url": "{{entire_url('/msp/index.ui')}}",
|
||||
"target": "app.sage_main_content"
|
||||
},
|
||||
{% endif %}
|
||||
{% if 'reseller.operator' in roles or 'owner.superuser' in roles %}
|
||||
{
|
||||
"name": "platformbiz",
|
||||
"label": "平台业务",
|
||||
"icon": "fa fa-building",
|
||||
"url": "{{entire_url('/platformbiz/index.ui')}}",
|
||||
"target": "app.sage_main_content"
|
||||
},
|
||||
{% endif %}
|
||||
{% if 'reseller.accountant' in roles or 'owner.superuser' in roles %}
|
||||
{
|
||||
"name": "accounting",
|
||||
"label": "计费管理",
|
||||
"icon": "fa fa-coins",
|
||||
"url": "{{entire_url('/accounting/index.ui')}}",
|
||||
"target": "app.sage_main_content"
|
||||
},
|
||||
{% endif %}
|
||||
{% if get_user() %}
|
||||
{
|
||||
"name": "rbac",
|
||||
"label": "用户与权限",
|
||||
"icon": "fa fa-user-shield",
|
||||
"url": "{{entire_url('/rbac/index.ui')}}",
|
||||
"target": "app.sage_main_content"
|
||||
},
|
||||
{
|
||||
"name": "entcms",
|
||||
"label": "内容管理",
|
||||
"icon": "fa fa-newspaper",
|
||||
"url": "{{entire_url('/cms/entcms/index.ui')}}",
|
||||
"target": "app.sage_main_content"
|
||||
},
|
||||
{
|
||||
"name": "dingdingflow",
|
||||
"label": "钉钉审批",
|
||||
"icon": "fa fa-mobile-alt",
|
||||
"url": "{{entire_url('/cms/dingdingflow/index.ui')}}",
|
||||
"target": "app.sage_main_content"
|
||||
},
|
||||
{% endif %}
|
||||
{
|
||||
"name": "hermes_web_cli",
|
||||
"label": "AI Agent",
|
||||
"icon": "fa fa-robot",
|
||||
"url": "{{entire_url('/hermes-web-cli/index.ui')}}",
|
||||
"target": "app.sage_main_content"
|
||||
}
|
||||
],
|
||||
"menuitem_css": "menuitem"
|
||||
}
|
||||
}
|
||||
158
wwwroot/shell.ui
158
wwwroot/shell.ui
@ -1,158 +0,0 @@
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"width": "100%",
|
||||
"height": "100%",
|
||||
"bgcolor": "#0B1120"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "HBox",
|
||||
"options": {
|
||||
"width": "100%",
|
||||
"height": "56px",
|
||||
"bgcolor": "#111827",
|
||||
"borderBottom": "1px solid #334155",
|
||||
"padding": "0 16px",
|
||||
"alignItems": "center"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "Button",
|
||||
"id": "sidebar_toggle_btn",
|
||||
"options": {
|
||||
"label": "",
|
||||
"bgcolor": "transparent",
|
||||
"color": "#94A3B8",
|
||||
"border": "1px solid #334155",
|
||||
"borderRadius": "8px",
|
||||
"width": "36px",
|
||||
"height": "36px",
|
||||
"padding": "0"
|
||||
},
|
||||
"binds": [
|
||||
{
|
||||
"wid": "self",
|
||||
"event": "click",
|
||||
"actiontype": "script",
|
||||
"target": "self",
|
||||
"script": "sageToggleSidebar()"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "Image",
|
||||
"options": {
|
||||
"url": "{{entire_url('/imgs/msp.png')}}",
|
||||
"height": "32px",
|
||||
"marginLeft": "12px"
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype": "Title4",
|
||||
"options": {
|
||||
"text": "Sage",
|
||||
"color": "#F1F5F9",
|
||||
"fontWeight": "bold",
|
||||
"marginLeft": "8px"
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype": "Filler"
|
||||
},
|
||||
{
|
||||
"widgettype": "Button",
|
||||
"id": "theme_toggle_btn",
|
||||
"options": {
|
||||
"label": "",
|
||||
"bgcolor": "transparent",
|
||||
"color": "#94A3B8",
|
||||
"border": "1px solid #334155",
|
||||
"borderRadius": "50%",
|
||||
"width": "36px",
|
||||
"height": "36px",
|
||||
"padding": "0"
|
||||
},
|
||||
"binds": [
|
||||
{
|
||||
"wid": "self",
|
||||
"event": "click",
|
||||
"actiontype": "script",
|
||||
"target": "self",
|
||||
"script": "sageToggleTheme()"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "urlwidget",
|
||||
"options": {
|
||||
"url": "{{entire_url('/rbac/user/user_panel.ui')}}"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "HBox",
|
||||
"options": {
|
||||
"width": "100%",
|
||||
"height": "calc(100% - 56px)"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"id": "sage_sidebar",
|
||||
"options": {
|
||||
"width": "240px",
|
||||
"height": "100%",
|
||||
"bgcolor": "#111827",
|
||||
"borderRight": "1px solid #334155"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "urlwidget",
|
||||
"id": "global_menu_widget",
|
||||
"options": {
|
||||
"url": "{{entire_url('global_menu.ui')}}"
|
||||
}
|
||||
}
|
||||
],
|
||||
"binds": [
|
||||
{
|
||||
"wid": "app",
|
||||
"event": "user_logined",
|
||||
"actiontype": "script",
|
||||
"target": "self",
|
||||
"script": "sageReloadMenu()"
|
||||
},
|
||||
{
|
||||
"wid": "app",
|
||||
"event": "sage_logout",
|
||||
"actiontype": "script",
|
||||
"target": "self",
|
||||
"script": "sageReloadMenu()"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"id": "sage_main_content",
|
||||
"options": {
|
||||
"css": "filler",
|
||||
"height": "100%",
|
||||
"padding": "24px"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "Text",
|
||||
"options": {
|
||||
"text": "加载中...",
|
||||
"fontSize": "16px",
|
||||
"color": "#94A3B8"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user