yumoqing 925f58b025 feat: 添加私域虚拟人素材功能
- init.py: 新增6个虚拟人函数(create/list/upload/sync等),注册到ServerEnv
- api_mapping: 新增create_group→CreateAssetGroup映射
- 外部API: 5个rl_virtual_*.dspy端点(创建组合/列表/上传/素材列表/状态)
- 前端API: 4个submit/get dspy端点(UI表单提交和数据获取)
- UI页面: 3个页面(创建组合/上传素材/查看素材)
- index.ui: 左侧导航新增虚拟人素材分区(3个按钮)
- load_path.py: RBAC新增virtual页面和api/%路径
- docs: api_downapp.md新增虚拟人API文档(5个端点)
2026-06-02 15:25:14 +08:00

302 lines
12 KiB
XML

{% set roles = get_user_roles(get_user()) %}
{% set role_str = roles|join(',') %}
{% set is_customer = 'customer.' in role_str %}
{% set is_admin = 'owner.superuser' in roles or 'reseller.operator' in roles %}
{
"widgettype": "HBox",
"options": {
"width": "100%",
"height": "100%",
"spacing": 0
},
"subwidgets": [
{
"widgettype": "VScrollPanel",
"options": {
"cwidth": 9,
"bgcolor": "#1e293b"
},
"subwidgets": [
{
"widgettype": "VBox",
"options": {
"padding": "16px",
"spacing": 8
},
"subwidgets": [
{
"widgettype": "Title5",
"options": {
"text": "真人素材",
"color": "#94a3b8"
}
}
{% if is_customer or is_admin %}
,{
"widgettype": "Button",
"options": {
"label": "🔐 真人认证",
"width": "100%",
"textAlign": "left"
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "app.rl_content",
"options": {
"url": "{{entire_url('create_validate.ui')}}"
},
"mode": "replace"
}
]
},
{
"widgettype": "Button",
"options": {
"label": "📤 上传素材",
"width": "100%",
"textAlign": "left"
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "app.rl_content",
"options": {
"url": "{{entire_url('upload_asset.ui')}}"
},
"mode": "replace"
}
]
},
{
"widgettype": "Button",
"options": {
"label": "🖼️ 查看素材",
"width": "100%",
"textAlign": "left"
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "app.rl_content",
"options": {
"url": "{{entire_url('view_assets.ui')}}"
},
"mode": "replace"
}
]
}
{% endif %}
,{
"widgettype": "VBox",
"options": {
"padding": "12px 0 8px",
"spacing": 0
},
"subwidgets": [
{
"widgettype": "Title5",
"options": {
"text": "虚拟人素材",
"color": "#94a3b8"
}
}
]
}
{% if is_customer or is_admin %}
,{
"widgettype": "Button",
"options": {
"label": "📁 创建素材组合",
"width": "100%",
"textAlign": "left"
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "app.rl_content",
"options": {
"url": "{{entire_url('virtual_create_group.ui')}}"
},
"mode": "replace"
}
]
},
{
"widgettype": "Button",
"options": {
"label": "📤 上传虚拟人素材",
"width": "100%",
"textAlign": "left"
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "app.rl_content",
"options": {
"url": "{{entire_url('virtual_upload_asset.ui')}}"
},
"mode": "replace"
}
]
},
{
"widgettype": "Button",
"options": {
"label": "🖼️ 查看虚拟人素材",
"width": "100%",
"textAlign": "left"
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "app.rl_content",
"options": {
"url": "{{entire_url('virtual_view_assets.ui')}}"
},
"mode": "replace"
}
]
}
{% endif %}
{% if is_admin %}
,{
"widgettype": "VBox",
"options": {
"padding": "12px 0 8px",
"spacing": 0
},
"subwidgets": [
{
"widgettype": "Title5",
"options": {
"text": "管理功能",
"color": "#94a3b8"
}
}
]
},
{
"widgettype": "Button",
"options": {
"label": "📁 素材组合管理",
"width": "100%",
"textAlign": "left"
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "app.rl_content",
"options": {
"url": "{{entire_url('group_manage.ui')}}"
},
"mode": "replace"
}
]
},
{
"widgettype": "Button",
"options": {
"label": "🖼️ 素材资产管理",
"width": "100%",
"textAlign": "left"
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "app.rl_content",
"options": {
"url": "{{entire_url('asset_manage.ui')}}"
},
"mode": "replace"
}
]
},
{
"widgettype": "Button",
"options": {
"label": "⚙️ 供应商配置",
"width": "100%",
"textAlign": "left"
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "app.rl_content",
"options": {
"url": "{{entire_url('vendor_config_manage.ui')}}"
},
"mode": "replace"
}
]
},
{
"widgettype": "Button",
"options": {
"label": "🔗 机构映射管理",
"width": "100%",
"textAlign": "left"
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "app.rl_content",
"options": {
"url": "{{entire_url('org_group_manage.ui')}}"
},
"mode": "replace"
}
]
}
{% endif %}
]
}
]
},
{
"widgettype": "VBox",
"options": {
"css": "filler",
"padding": "20px"
},
"subwidgets": [
{
"widgettype": "VScrollPanel",
"options": {
"css": "filler"
},
"subwidgets": [
{
"widgettype": "VBox",
"id": "rl_content",
"options": {
"width": "100%"
}
}
]
}
]
}
]
}