fix: 生成快照入口改真实表单页create_page.ui(原指向create_snapshot.dspy)

This commit is contained in:
agent.develop 2026-08-30 22:14:26 +08:00
parent 6bd61bed20
commit 981c256293
2 changed files with 69 additions and 1 deletions

68
wwwroot/create_page.ui Normal file
View File

@ -0,0 +1,68 @@
{
"widgettype": "VBox",
"options": {
"width": "100%",
"height": "100%",
"padding": "20px"
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"label": "生成快照",
"fontSize": "20px"
}
},
{
"widgettype": "Form",
"options": {
"title": "生成世界快照(聚合世界/场景/实体当前状态)",
"submit_url": "{{entire_url('/world_snapshot/api/create_snapshot.dspy')}}",
"method": "POST",
"submit_label": "生成快照",
"fields": [
{
"name": "world_id",
"label": "目标世界",
"uitype": "code",
"required": true,
"dataurl": "{{entire_url('/world_snapshot/api/get_search_world_id.dspy')}}",
"valueField": "value",
"textField": "text"
},
{
"name": "name",
"label": "快照名称",
"uitype": "str",
"required": true
},
{
"name": "snapshot_type",
"label": "快照类型",
"uitype": "code",
"dataurl": "{{entire_url('/world_snapshot/api/get_search_snapshot_type.dspy')}}",
"valueField": "snapshot_type",
"textField": "snapshot_type_text"
},
{
"name": "status",
"label": "状态",
"uitype": "code",
"dataurl": "{{entire_url('/world_snapshot/api/get_search_status.dspy')}}",
"valueField": "status",
"textField": "status_text"
}
]
},
"binds": [
{
"wid": "self",
"event": "submited",
"actiontype": "script",
"target": "self",
"script": "event.params.json().then(function(r){if(r&&r.widgettype){bricks.widgetBuild(r,bricks.Body)}else{var ok=r&&r.success;new bricks.Message({title:ok?'成功':'失败',message:ok?('已创建'+(r.id?(' id='+r.id):'')):(r&&r.message?r.message:'操作失败'),timeout:4})}})"
}
]
}
]
}

View File

@ -11,7 +11,7 @@
{"widgettype": "Text", "options": {"label": "查看、编辑、删除世界快照", "fontSize": "12px", "color": "#888888"}}
]},
{"widgettype": "VBox", "options": {"backgroundColor": "#FFFFFF", "padding": "20px", "cursor": "pointer"},
"binds": [{"wid": "self", "event": "click", "actiontype": "urlwidget", "target": "app.world_snapshot_content", "options": {"url": "{{entire_url('/world_snapshot/api/create_snapshot.dspy')}}", "method": "GET"}, "mode": "replace"}],
"binds": [{"wid": "self", "event": "click", "actiontype": "urlwidget", "target": "app.world_snapshot_content", "options": {"url": "{{entire_url('/world_snapshot/create_page.ui')}}", "method": "GET"}, "mode": "replace"}],
"subwidgets": [
{"widgettype": "Text", "options": {"label": "生成快照", "fontSize": "16px"}},
{"widgettype": "Text", "options": {"label": "聚合世界/场景/实体当前状态", "fontSize": "12px", "color": "#888888"}}