- submit_upload.dspy: frontend form handler returning bricks Message widget with asset_id, status, and '查询处理状态' button - submit_query_status.dspy: frontend status query returning Message widget with current status, retry button when still processing - upload_asset.ui: use submit_upload.dspy + submited bind (was missing) - External APIs (rl_upload.dspy, rl_status.dspy) unchanged for downstream systems
91 lines
3.8 KiB
XML
91 lines
3.8 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": "upload_form",
|
||
"options": {
|
||
"submit_url": "{{entire_url('api/submit_upload.dspy')}}",
|
||
"fields": [
|
||
{
|
||
"uitype": "code",
|
||
"name": "vendor",
|
||
"label": "供应商",
|
||
"dataurl": "{{entire_url('api/get_vendor_list.dspy')}}",
|
||
"data_field": "value",
|
||
"text_field": "text",
|
||
"required": true
|
||
},
|
||
{
|
||
"uitype": "code",
|
||
"name": "vendor_group_id",
|
||
"label": "认证组合",
|
||
"dataurl": "{{entire_url('api/get_org_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": "可选,默认使用URL最后一部分"
|
||
}
|
||
]
|
||
},
|
||
"binds": [
|
||
{
|
||
"wid": "self",
|
||
"event": "submited",
|
||
"actiontype": "script",
|
||
"script": "await bricks.show_resp_message_or_error(event.params)"
|
||
}
|
||
]
|
||
}
|
||
]
|
||
}
|
||
]
|
||
}
|
||
]
|
||
}
|