{% set roles = get_user_roles(get_user()) %} {% set is_fin = ('owner.superuser' in roles) or ('owner.admin' in roles) or ('owner.account' in roles) or ('reseller.admin' in roles) or ('reseller.accountant' in roles) or ('reseller.operator' in roles) %} {% set is_customer = ('customer.customer' in roles) or ('*.customer' in roles) %} {% set is_admin = ('owner.superuser' in roles) or ('owner.admin' in roles) %} { "id": "app", "widgettype": "VBox", "options": { "width": "100%", "height": "100%", "padding": "0" }, "subwidgets": [ { "widgettype": "HBox", "options": { "width": "100%", "cheight": 2, "bgcolor": "#1e293b", "padding": "0 16px", "alignItems": "center", "gap": "12px" }, "subwidgets": [ { "widgettype": "Button", "id": "btn_toggle_sidebar", "options": { "label": "☰", "css": "text", "color": "#fff", "cfontsize": 1.4 }, "binds": [ { "wid": "self", "event": "click", "actiontype": "method", "target": "app.sidebar_menu", "method": "toggle_collapse" } ] }, { "widgettype": "Title4", "options": { "text": "产线平台", "color": "#fff" } }, { "widgettype": "Filler" }, { "widgettype": "Button", "id": "theme_toggle_btn", "options": { "label": "🌙", "css": "text", "width": "36px", "height": "36px", "borderRadius": "50%", "border": "1px solid #475569", "bgcolor": "transparent", "cfontsize": 1.1, "tip": "切换主题" }, "binds": [ { "wid": "self", "event": "click", "actiontype": "script", "target": "self", "script": "var h=document.documentElement;var t=h.getAttribute('data-theme')||'light';var n=t=='light'?'dark':'light';h.setAttribute('data-theme',n);try{localStorage.setItem('pipeline_ui_theme',n);}catch(e){}if(window.applyPipelineTheme){window.applyPipelineTheme(n);}" } ] }, { "widgettype": "Svg", "options": { "css": "clickable", "rate": 2, "tip": "显示所有已最小化的窗口", "url": "{{entire_url('/bricks/imgs/app-dock.svg')}}" }, "binds": [ { "wid": "self", "event": "click", "actiontype": "script", "target": "app", "script": "bricks.app.show_windows_panel(event)" } ] }, { "widgettype": "urlwidget", "options": { "url": "{{entire_url('i18n/language.ui')}}" } }, { "widgettype": "Button", "id": "todo_badge", "options": { "label": "🔔 待办", "css": "text", "color": "#fbbf24", "cfontsize": 0.85 }, "binds": [ { "wid": "self", "event": "click", "actiontype": "script", "target": "self", "script": "if(window.openMyTodos){openMyTodos();}" } ] }, { "widgettype": "urlwidget", "options": { "url": "{{entire_url('/rbac/user/user_panel.ui')}}" } } ] }, { "widgettype": "HBox", "options": { "css": "filler", "padding": "0", "gap": "0" }, "subwidgets": [ { "widgettype": "VBox", "options": { "width": "220px", "minWidth": "200px", "height": "100%", "bgcolor": "#f8fafc" }, "subwidgets": [ { "widgettype": "Menu", "id": "sidebar_menu", "options": { "width": "100%", "height": "100%", "target": "app.main_content", "items": [ {% if is_customer and not is_admin %} { "name": "cust_account", "label": "我的账户", "icon": "", "items": [ { "name": "cust_recharge", "label": "充值", "script": "this.open_tab({name:'cust_recharge',label:'充值',url:'/unipay/recharge.ui',removable:true})" }, { "name": "cust_myaccounts", "label": "我的账户", "script": "this.open_tab({name:'cust_myaccounts',label:'我的账户',url:'/accounting/myaccounts.ui',removable:true})" }, { "name": "cust_subscriptions", "label": "我的权益", "script": "this.open_tab({name:'cust_subscriptions',label:'我的权益',url:'/product_management/storefront/api/my_subscriptions.dspy',removable:true})" } ] } {% else %} { "name": "llm_governance", "label": "模型治理", "icon": "", "script": "this.open_tab({name:'llm_governance',label:'模型治理',url:'/pipeline-llm',removable:true})" }, { "name": "generic_agent", "label": "通用助手", "icon": "", "script": "this.open_tab({name:'generic_agent',label:'通用助手',url:'/pipeline_core/agent_generic',removable:true})" }, {% set is_owner_org = namespace(v=false) %}{% for r in roles %}{% if r.split('.')[0] == 'owner' %}{% set is_owner_org.v = true %}{% endif %}{% endfor %} {% if is_owner_org.v %} { "name": "platform_agent", "label": "平台内部助手", "icon": "", "script": "this.open_tab({name:'platform_agent',label:'平台内部助手',url:'/pipeline-platform/agent_platform',removable:true})" }, {% endif %} { "name": "skill_manage", "label": "技能管理", "icon": "{{entire_url('/imgs/cubes.svg')}}", "script": "this.open_tab({name:'skill_manage',label:'技能管理',url:'/pipeline_core/skill_proposals',removable:true})" }, { "name": "pipelines_group", "label": "产线", "icon": "{{entire_url('/imgs/workflow.svg')}}", "items": [ { "name": "pipeline_opportunity", "label": "商机产线", "script": "this.open_tab({name:'pipeline_opportunity',label:'商机产线',url:'/pipeline-opportunity/agent',removable:true})" }, { "name": "pipeline_bidding", "label": "投标产线", "script": "this.open_tab({name:'pipeline_bidding',label:'投标产线',url:'/pipeline-bidding/agent',removable:true})" }, { "name": "pipeline_sdlc", "label": "开发产线", "script": "this.open_tab({name:'pipeline_sdlc',label:'开发产线',url:'/pipeline_core/agent',removable:true})" }, { "name": "pipeline_foms", "label": "运维产线", "script": "bricks.show_message({title:'运维产线',message:'运维产线(面向FOMS)规划中,尚未开发'});" }, { "name": "pipeline_marketing", "label": "营销产线", "script": "bricks.show_message({title:'营销产线',message:'营销产线规划中,尚未开发'});" } ] }, { "name": "wechat_channel", "label": "微信通道", "icon": "", "script": "this.open_tab({name:'wechat_channel',label:'微信通道',url:'/pipeline-sdlc/wechat_config/index.ui',removable:true})" }, { "name": "pipeline_ops", "label": "运营管理", "icon": "{{entire_url('/imgs/dashboard.svg')}}", "script": "this.open_tab({name:'pipeline_ops',label:'运营管理',url:'/pipeline_ops',removable:true})" }, { "name": "pipeline_dist", "label": "分销管理", "icon": "{{entire_url('/imgs/truck.svg')}}", "script": "this.open_tab({name:'pipeline_dist',label:'分销管理',url:'/pipeline_dist',removable:true})" }, { "name": "pipeline_task", "label": "任务中心", "icon": "{{entire_url('/imgs/rocket.svg')}}", "script": "this.open_tab({name:'pipeline_task',label:'任务中心',url:'/pipeline_task',removable:true})" }, { "name": "accounting", "label": "账务管理", "icon": "{{entire_url('/imgs/database.svg')}}", "items": [ { "name": "acc_myaccounts", "label": "我的账户", "script": "this.open_tab({name:'acc_myaccounts',label:'我的账户',url:'/accounting/myaccounts.ui',removable:true})" }, { "name": "acc_detail", "label": "账务明细", "script": "this.open_tab({name:'acc_detail',label:'账务明细',url:'/accounting/accdetail.ui',removable:true})" }, { "name": "acc_billing", "label": "账单", "script": "this.open_tab({name:'acc_billing',label:'账单',url:'/accounting/billing.ui',removable:true})" }, { "name": "acc_mycredit", "label": "我的信用额度", "script": "this.open_tab({name:'acc_mycredit',label:'我的信用额度',url:'/accounting/credit_limit/credit_overview.ui',removable:true})" } {% if is_fin %} , { "name": "acc_balance", "label": "账户余额", "script": "this.open_tab({name:'acc_balance',label:'账户余额',url:'/accounting/acc_balance/index.ui',removable:true})" }, { "name": "acc_subject", "label": "科目配置", "script": "this.open_tab({name:'acc_subject',label:'科目配置',url:'/accounting/subject/index.ui',removable:true})" }, { "name": "acc_account_config", "label": "参与方科目配置", "script": "this.open_tab({name:'acc_account_config',label:'参与方科目配置',url:'/accounting/account_config/index.ui',removable:true})" }, { "name": "acc_accounting_config", "label": "会计分录配置", "script": "this.open_tab({name:'acc_accounting_config',label:'会计分录配置',url:'/accounting/accounting_config/index.ui',removable:true})" }, { "name": "acc_credit_limit", "label": "信用额度", "script": "this.open_tab({name:'acc_credit_limit',label:'信用额度',url:'/accounting/credit_limit/index.ui',removable:true})" }, { "name": "acc_currency", "label": "币种", "script": "this.open_tab({name:'acc_currency',label:'币种',url:'/accounting/currency/index.ui',removable:true})" }, { "name": "acc_exchange_rate", "label": "汇率", "script": "this.open_tab({name:'acc_exchange_rate',label:'汇率',url:'/accounting/exchange_rate/index.ui',removable:true})" }, { "name": "acc_log", "label": "记账日志", "script": "this.open_tab({name:'acc_log',label:'记账日志',url:'/accounting/accounting_log/index.ui',removable:true})" } {% endif %} ] }, { "name": "supplychain", "label": "供销管理", "icon": "{{entire_url('/imgs/workflow.svg')}}", "items": [ { "name": "sc_suppliers", "label": "供应商管理", "script": "this.open_tab({name:'sc_suppliers',label:'供应商管理',url:'/supplychain/suppliers_list/index.ui',removable:true})" }, { "name": "sc_supplier_price", "label": "供应商资源定价", "script": "this.open_tab({name:'sc_supplier_price',label:'供应商资源定价',url:'/supplychain/supplier_resource_price_list/index.ui',removable:true})" }, { "name": "sc_contracts", "label": "供销合同", "script": "this.open_tab({name:'sc_contracts',label:'供销合同',url:'/supplychain/supply_contracts_list/index.ui',removable:true})" }, { "name": "sc_platform_rel", "label": "平台供销关系", "script": "this.open_tab({name:'sc_platform_rel',label:'平台供销关系',url:'/supplychain/platform_supply_relations_list/index.ui',removable:true})" }, { "name": "sc_prod_mapping", "label": "产品供应映射", "script": "this.open_tab({name:'sc_prod_mapping',label:'产品供应映射',url:'/supplychain/product_supplier_mapping_list/index.ui',removable:true})" }, { "name": "sc_sub_resellers", "label": "二级分销商", "script": "this.open_tab({name:'sc_sub_resellers',label:'二级分销商',url:'/supplychain/sub_resellers_list/index.ui',removable:true})" }, { "name": "sc_agreements", "label": "分销协议", "script": "this.open_tab({name:'sc_agreements',label:'分销协议',url:'/supplychain/distribution_agreements_list/index.ui',removable:true})" }, { "name": "sc_sales_ledger", "label": "销售记账", "script": "this.open_tab({name:'sc_sales_ledger',label:'销售记账',url:'/supplychain/sales_ledger_list/index.ui',removable:true})" } ] }, { "name": "dda_approval", "label": "钉钉审批", "icon": "{{entire_url('/imgs/workflow.svg')}}", "items": [ { "name": "dda_apvcfg", "label": "审批节点配置", "script": "this.open_tab({name:'dda_apvcfg',label:'审批节点配置',url:'/dingdingflow/dda_approval_configs/index.ui',removable:true})" }, { "name": "dda_apvrec", "label": "审批记录", "script": "this.open_tab({name:'dda_apvrec',label:'审批记录',url:'/dingdingflow/dda_approvals/index.ui',removable:true})" } ] }, { "name": "rag_kb", "label": "知识库", "icon": "{{entire_url('/imgs/database.svg')}}", "script": "this.open_tab({name:'rag_kb',label:'知识库',url:'/rag/knowledge_bases_list/index.ui',removable:true})" }, { "name": "showcase", "label": "展示平台", "icon": "{{entire_url('/imgs/user-circle.svg')}}", "script": "this.open_tab({name:'showcase',label:'展示平台',url:'/showcase',removable:true})" }, { "name": "tenant", "label": "租户管理", "icon": "{{entire_url('/imgs/globe.svg')}}", "script": "this.open_tab({name:'tenant',label:'租户管理',url:'/tenant',removable:true})" }, { "name": "app_audit", "label": "审计日志", "icon": "{{entire_url('/imgs/database.svg')}}", "script": "this.open_tab({name:'app_audit',label:'审计日志',url:'/app_audit',removable:true})" }, { "name": "org_remote", "label": "远程空间", "icon": "", "script": "this.open_tab({name:'org_remote',label:'远程空间',url:'/pipeline-sdlc/sd_org_remote',removable:true})" }, { "name": "product_management", "label": "产品管理", "icon": "", "items": [ { "name": "pm_category", "label": "产品类别管理", "script": "this.open_tab({name:'pm_category',label:'产品类别管理',url:'/product_management/product_category_tree',removable:true})" }, { "name": "pm_product", "label": "产品管理", "script": "this.open_tab({name:'pm_product',label:'产品管理',url:'/product_management/product_list',removable:true})" }, { "name": "pm_resource", "label": "产品资源绑定", "script": "this.open_tab({name:'pm_resource',label:'产品资源绑定',url:'/product_management/product_resource_list',removable:true})" }, { "name": "pm_supplier", "label": "资源供应商关联", "script": "this.open_tab({name:'pm_supplier',label:'资源供应商关联',url:'/product_management/product_resource_supplier_list',removable:true})" }, { "name": "pm_subscription", "label": "客户订购管理", "script": "this.open_tab({name:'pm_subscription',label:'客户订购管理',url:'/product_management/product_subscription_list',removable:true})" }, { "name": "pm_usage", "label": "产品消费记录", "script": "this.open_tab({name:'pm_usage',label:'产品消费记录',url:'/product_management/product_usage_log_list',removable:true})" } ] }, { "name": "discount", "label": "折扣管理", "icon": "", "items": [ { "name": "d_list", "label": "折扣管理", "script": "this.open_tab({name:'d_list',label:'折扣管理',url:'/discount/discount_list/index.ui',removable:true})" }, { "name": "d_marketing", "label": "营销方案", "script": "this.open_tab({name:'d_marketing',label:'营销方案',url:'/discount/discount_marketing_list/index.ui',removable:true})" }, { "name": "d_promo", "label": "促销码", "script": "this.open_tab({name:'d_promo',label:'促销码',url:'/discount/discount_promo_code_list/index.ui',removable:true})" }, { "name": "d_bind", "label": "客户归属", "script": "this.open_tab({name:'d_bind',label:'客户归属',url:'/discount/discount_customer_bind_list/index.ui',removable:true})" } ] }, { "name": "pricing", "label": "定价管理", "icon": "", "items": [ { "name": "pricing_program", "label": "定价管理", "script": "this.open_tab({name:'pricing_program',label:'定价管理',url:'/pricing/pricing_program',removable:true})" } ] }, { "name": "unipay", "label": "支付管理", "icon": "", "items": [ { "name": "pay_recharge", "label": "充值", "script": "this.open_tab({name:'pay_recharge',label:'充值',url:'/unipay/recharge.ui',removable:true})" }, { "name": "pay_refund", "label": "退款", "script": "this.open_tab({name:'pay_refund',label:'退款',url:'/unipay/refund.ui',removable:true})" }, { "name": "pay_manual", "label": "手动充值", "script": "this.open_tab({name:'pay_manual',label:'手动充值',url:'/unipay/manual_recharge.ui',removable:true})" }, { "name": "pay_transfer", "label": "转账信息", "script": "this.open_tab({name:'pay_transfer',label:'转账信息',url:'/unipay/transfer_info.ui',removable:true})" } ] }, { "name": "sysmgr", "label": "系统管理", "icon": "", "items": [ { "name": "rbac_users", "label": "用户管理", "script": "this.open_tab({name:'rbac_users',label:'用户管理',url:'/rbac/users',removable:true})" }, { "name": "rbac_addadmin", "label": "添加管理员", "script": "this.open_tab({name:'rbac_addadmin',label:'添加管理员',url:'/rbac/add_adminuser.ui',removable:true})" }, { "name": "rbac_list_path", "label": "查询路径权限角色", "script": "this.open_tab({name:'rbac_list_path',label:'查询路径权限角色',url:'/rbac/list_path_roles.ui',removable:true})" }, { "name": "rbac_find_unauth", "label": "扫描未授权文件", "script": "this.open_tab({name:'rbac_find_unauth',label:'扫描未授权文件',url:'/rbac/find_unauth_files.dspy',removable:true})" }, { "name": "rbac_refresh", "label": "刷新权限缓存", "script": "this.open_tab({name:'rbac_refresh',label:'刷新权限缓存',url:'/rbac/refresh_userperm.dspy',removable:true})" }, { "name": "ab_svgicon", "label": "图标管理", "script": "this.open_tab({name:'ab_svgicon',label:'图标管理',url:'/appbase/svgicon',removable:true})" }, { "name": "ab_codemgr", "label": "代码管理", "script": "this.open_tab({name:'ab_codemgr',label:'代码管理',url:'/appbase/appcodes',removable:true})" }, { "name": "ab_params", "label": "参数管理", "script": "this.open_tab({name:'ab_params',label:'参数管理',url:'/appbase/params',removable:true})" }, { "name": "dapi_downapp", "label": "下位系统", "script": "this.open_tab({name:'dapi_downapp',label:'下位系统',url:'/dapi/downapp',removable:true})" }, { "name": "dapi_downapikey", "label": "下位系统API Key", "script": "this.open_tab({name:'dapi_downapikey',label:'下位系统API Key',url:'/dapi/downapikey',removable:true})" } ] } {% endif %} ] } } ] }, { "widgettype": "TabPanel", "id": "main_content", "options": { "css": "filler", "width": "100%", "height": "100%", "tab_pos": "top", "items": [ { "name": "home", "label": "主页", "removable": false, "content": { "widgettype": "urlwidget", "options": { "url": "{{entire_url('/product_management/storefront/index.ui')}}" } } } ] } } ] } ] }