27 lines
1.1 KiB
XML
27 lines
1.1 KiB
XML
# 租户品牌设置 - 设置左上角图标和系统名称
|
|
userorgid = await get_userorgid()
|
|
env = request._run_ns
|
|
async with get_sor_context(env, 'sage') as sor:
|
|
org = (await sor.sqlExe('SELECT orgname, iconid FROM organization WHERE id = ${orgid}$', {'orgid': userorgid}))[0]
|
|
|
|
result = {
|
|
"widgettype": "VBox",
|
|
"options": {"width": "100%", "padding": "20px", "spacing": 16},
|
|
"subwidgets": [
|
|
{"widgettype": "Title3", "options": {"text": "租户品牌设置"}},
|
|
{"widgettype": "Text", "options": {"text": "设置左上角显示的图标和系统名称"}},
|
|
{
|
|
"widgettype": "Form",
|
|
"options": {
|
|
"url": entire_url('./tenant_brand_save.dspy'),
|
|
"cols": 1,
|
|
"submit_label": "保存",
|
|
"fields": [
|
|
{"name": "orgname", "type": "text", "label": "系统名称", "default": org.orgname or ''},
|
|
{"name": "iconid", "type": "file", "label": "图标(SVG/PNG)", "uitype": "file", "accept": ".svg,.png,.jpg"}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|