From 981c25629348d4873458da03e753792f8ef797f2 Mon Sep 17 00:00:00 2001 From: "agent.develop" Date: Sun, 30 Aug 2026 22:14:26 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=94=9F=E6=88=90=E5=BF=AB=E7=85=A7?= =?UTF-8?q?=E5=85=A5=E5=8F=A3=E6=94=B9=E7=9C=9F=E5=AE=9E=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E9=A1=B5create=5Fpage.ui(=E5=8E=9F=E6=8C=87=E5=90=91create=5Fs?= =?UTF-8?q?napshot.dspy)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wwwroot/create_page.ui | 68 ++++++++++++++++++++++++++++++++++++++++++ wwwroot/index.ui | 2 +- 2 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 wwwroot/create_page.ui diff --git a/wwwroot/create_page.ui b/wwwroot/create_page.ui new file mode 100644 index 0000000..05270a9 --- /dev/null +++ b/wwwroot/create_page.ui @@ -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})}})" + } + ] + } + ] +} \ No newline at end of file diff --git a/wwwroot/index.ui b/wwwroot/index.ui index b387e10..63c7b18 100644 --- a/wwwroot/index.ui +++ b/wwwroot/index.ui @@ -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"}}