39 lines
1.2 KiB
JSON
39 lines
1.2 KiB
JSON
{
|
||
"id": "item-import",
|
||
"label": "导入记录",
|
||
"description": "由宿主「导入数据」面板调用:解析 Excel/CSV 并写入业务表(含领域校验与派生字段)。表头可带前/后缀*;lookup 列可为「编号 · 名称」。",
|
||
"replaces": "import",
|
||
"placements": [],
|
||
"executionProfile": "sync",
|
||
"interaction": "form",
|
||
"bind": {
|
||
"tables": ["items"]
|
||
},
|
||
"hostEffects": {
|
||
"onSuccess": ["reloadTable"]
|
||
},
|
||
"inputSchema": {
|
||
"type": "object",
|
||
"required": ["filePath"],
|
||
"properties": {
|
||
"filePath": {
|
||
"type": "string",
|
||
"title": "导入文件",
|
||
"description": "由宿主导入面板传入的 Excel/CSV 路径。表头:显示名(可带前/后缀*);关联列可填编号或「编号 · 名称」。",
|
||
"format": "file"
|
||
},
|
||
"onError": {
|
||
"type": "string",
|
||
"title": "导入规则(出错时)",
|
||
"enum": ["跳过该行,继续导入", "立即停止,不再导入后续行"],
|
||
"default": "跳过该行,继续导入"
|
||
}
|
||
}
|
||
},
|
||
"entrypoint": {
|
||
"type": "cli",
|
||
"command": "item",
|
||
"args": ["import", "--file", "{{filePath}}", "--on-error", "{{onError}}"]
|
||
}
|
||
}
|