feat: 租户自定义左上角图标和系统名称,读取organization.iconid+orgname

This commit is contained in:
yumoqing 2026-07-09 12:02:12 +08:00
parent 4a1535563b
commit 876d9ff59e

View File

@ -1,3 +1,9 @@
{% set userorgid = get_userorgid() %}
{% set env = request._run_ns %}
{% set sor = env.get_sor('sage') %}
{% set org = sor.execute_sql('SELECT orgname, iconid FROM organization WHERE id = ${orgid}$', {'orgid': userorgid}).first() %}
{% set orgname = org.orgname if org and org.orgname else 'OpenComputing' %}
{% set icon = org.iconid if org and org.iconid else 'imgs/ocai.svg' %}
{ {
"widgettype": "VBox", "widgettype": "VBox",
"options": { "options": {
@ -37,18 +43,18 @@
] ]
}, },
{ {
"widgettype": "Image", "widgettype": "Svg",
"options": { "options": {
"url": "{{entire_url('/imgs/ocai.svg')}}", "css": "sage-logo",
"height": "64px", "rate": 2,
"marginLeft": "12px" "url": "{{entire_url('/appbase/show_icon.dspy')}}?id={{icon}}"
} }
}, },
{ {
"widgettype": "Title4", "widgettype": "Title4",
"options": { "options": {
"css": "sage-brand-title", "css": "sage-brand-title",
"text": "元境", "text": "{{orgname}}",
"fontWeight": "bold", "fontWeight": "bold",
"marginLeft": "8px" "marginLeft": "8px"
} }