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",
"options": {
@ -37,18 +43,18 @@
]
},
{
"widgettype": "Image",
"widgettype": "Svg",
"options": {
"url": "{{entire_url('/imgs/ocai.svg')}}",
"height": "64px",
"marginLeft": "12px"
"css": "sage-logo",
"rate": 2,
"url": "{{entire_url('/appbase/show_icon.dspy')}}?id={{icon}}"
}
},
{
"widgettype": "Title4",
"options": {
"css": "sage-brand-title",
"text": "元境",
"text": "{{orgname}}",
"fontWeight": "bold",
"marginLeft": "8px"
}