- 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个端点)
82 lines
3.3 KiB
XML
82 lines
3.3 KiB
XML
{
|
|
"widgettype": "VBox",
|
|
"options": {
|
|
"width": "100%",
|
|
"padding": "16px"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "Title4",
|
|
"options": {
|
|
"text": "上传虚拟人素材",
|
|
"fontWeight": "600",
|
|
"marginBottom": "16px"
|
|
}
|
|
},
|
|
{
|
|
"widgettype": "VScrollPanel",
|
|
"options": {
|
|
"height": "600px"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "VBox",
|
|
"options": {
|
|
"padding": "16px",
|
|
"spacing": 12
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "Form",
|
|
"id": "virtual_upload_form",
|
|
"options": {
|
|
"submit_url": "{{entire_url('api/submit_virtual_upload.dspy')}}",
|
|
"fields": [
|
|
{
|
|
"uitype": "code",
|
|
"name": "vendor_group_id",
|
|
"label": "素材组合",
|
|
"dataurl": "{{entire_url('api/get_virtual_groups.dspy')}}",
|
|
"data_field": "value",
|
|
"text_field": "text",
|
|
"required": true
|
|
},
|
|
{
|
|
"uitype": "file",
|
|
"name": "source_url",
|
|
"label": "素材文件",
|
|
"accept": "image/*,audio/*,video/*",
|
|
"required": true
|
|
},
|
|
{
|
|
"uitype": "code",
|
|
"name": "asset_type",
|
|
"label": "素材类型",
|
|
"dataurl": "{{entire_url('api/get_asset_type_list.dspy')}}",
|
|
"data_field": "value",
|
|
"text_field": "text"
|
|
},
|
|
{
|
|
"uitype": "str",
|
|
"name": "name",
|
|
"label": "素材名称",
|
|
"placeholder": "可选,方便管理的名称"
|
|
}
|
|
]
|
|
},
|
|
"binds": [
|
|
{
|
|
"wid": "self",
|
|
"event": "submited",
|
|
"actiontype": "script",
|
|
"script": "await bricks.show_resp_message_or_error(event.params)"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|