entity/wwwroot/import_page.ui

76 lines
2.8 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"widgettype": "VBox",
"options": {"width": "100%", "height": "100%", "padding": "20px"},
"subwidgets": [
{
"widgettype": "Text",
"options": {"label": "实体导入", "fontSize": "20px", "fontWeight": "bold"}
},
{
"widgettype": "Text",
"options": {"label": "支持 CSV首行表头或 JSON 数组字段entity_code, entity_name, entity_type, scene_id, world_id, description, status, sort_no。导入前全量校验任一行非法则整批拦截批量插入失败自动回滚不留脏数据。", "fontSize": "12px", "color": "#666666"}
},
{
"widgettype": "Form",
"options": {
"title": "选择文件并导入",
"submit_url": "{{entire_url('/entity/api/entity_import.dspy')}}",
"method": "POST",
"width": "640px",
"padding": "16px"
},
"subwidgets": [
{
"widgettype": "UiFile",
"options": {"label": "导入文件CSV/JSON", "name": "file", "required": true}
},
{
"widgettype": "HBox",
"options": {"gap": "12px"},
"subwidgets": [
{
"widgettype": "Button",
"options": {"label": "开始导入", "actiontype": "submit", "width": "120px"}
},
{
"widgettype": "Button",
"options": {"label": "校验(不落库)", "width": "120px"},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "PopupWindow",
"popup_options": {"title": "导入预校验(干跑)", "height": "300px", "width": "600px"},
"options": {"method": "POST", "url": "{{entire_url('/entity/api/entity_import_guard.dspy')}}"}
}
]
}
]
}
]
},
{
"widgettype": "Text",
"options": {"label": "最近导入记录", "fontSize": "16px", "fontWeight": "bold", "marginTop": "24px"}
},
{
"widgettype": "Tabular",
"options": {
"title": "导入记录(只读,系统生成)",
"data_url": "{{entire_url('/entity/api/entity_import_list.dspy')}}",
"data_params": {"page": 1, "rows": 20},
"columns": [
{"field": "import_no", "title": "导入单号", "width": "20%"},
{"field": "file_name", "title": "文件名", "width": "22%"},
{"field": "total_count", "title": "总行数", "width": "10%"},
{"field": "success_count", "title": "成功", "width": "10%"},
{"field": "fail_count", "title": "失败", "width": "10%"},
{"field": "status", "title": "状态", "width": "12%"},
{"field": "created_at", "title": "导入时间", "width": "16%"}
]
}
}
]
}