Files
eip4-platform/转换产物-attach/schema/ee3ba981-218a-4e66-9dfd-6ebc312dab37.json
zhengwr 8fe377b0c8 feat(blueprint): master-detail-v1 编译器分支 + PageBlueprintChild
PageBlueprint 加 RECIPE_MASTER_DETAIL 常量与可空 child 组件(14-arg,
保留 13-arg 兼容构造);新增 PageBlueprintChild record。
PageBlueprintCompiler.masterDetail 复用 maintenance 列表骨架,
新增/编辑表单内联 house-style input-table 子表(name=listColumn,
quickEdit 控件),编辑表单 initApi 走 _LOAD 回显主+子行。
validate 接受 master-detail 并要求 child 非空/childTable/listColumn
非空/fields 非空。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20 15:16:30 +08:00

300 lines
8.5 KiB
JSON

{
"type" : "page",
"title" : "公司危险源清单项",
"body" : {
"type" : "crud",
"api" : "/api/flow/PM_DANGERLISTITEM_SEARCH",
"syncLocation" : false,
"selectable" : true,
"checkOnItemClick" : true,
"filter" : {
"title" : "查询",
"body" : [ {
"name" : "DANGERID",
"label" : "作业过程或活动",
"type" : "tree-select",
"clearable" : true,
"source" : "/api/template/82b68117-5b61-4c9f-b188-4592782af30b/tree",
"searchable" : true
}, {
"name" : "DANGERPROPERTY",
"label" : "危险危害因素",
"type" : "input-text"
}, {
"name" : "DANGERSTATUS",
"label" : "状态",
"type" : "select",
"clearable" : true,
"source" : "/api/poc/dict/DANGER_STATUS"
}, {
"name" : "TROUBLE",
"label" : "可能导致事故",
"type" : "input-text"
}, {
"name" : "DANGERGRADE",
"label" : "危险级别",
"type" : "select",
"clearable" : true,
"source" : "/api/picker/PM_DANGERRISKLEVEL/list?perPage=500"
}, {
"name" : "EVALUATIONMETHOD",
"label" : "评价方法",
"type" : "select",
"clearable" : true,
"source" : "/api/poc/dict/evaluationmethod"
}, {
"name" : "SCORE",
"label" : "得分",
"type" : "input-number",
"precision" : 2
}, {
"name" : "CONTROLMEASURE",
"label" : "建议控制措施",
"type" : "input-text"
} ]
},
"columns" : [ {
"name" : "PM_DANGERLISTITEM_ID",
"label" : "主键",
"width" : 200,
"toggled" : false
}, {
"name" : "DANGERID_DISPLAY__",
"label" : "作业过程或活动",
"width" : 200
}, {
"name" : "DANGERPROPERTY",
"label" : "危险危害因素",
"width" : 200
}, {
"name" : "TROUBLE",
"label" : "可能导致事故",
"width" : 200
}, {
"name" : "DANGERSTATUS",
"label" : "状态",
"width" : 200,
"type" : "mapping",
"map" : {
"3" : "紧急"
}
}, {
"name" : "DANGERGRADE_DISPLAY__",
"label" : "危险级别",
"width" : 200
}, {
"name" : "EVALUATIONMETHOD",
"label" : "评价方法",
"width" : 200,
"type" : "mapping",
"map" : {
"1" : "定性评价",
"2" : "定量评价"
}
}, {
"name" : "SCORE",
"label" : "得分",
"width" : 200
}, {
"name" : "CONTROLMEASURE",
"label" : "建议控制措施",
"width" : 200
} ],
"headerToolbar" : [ {
"type" : "button",
"id" : "添加",
"label" : "添加",
"level" : "primary",
"actionType" : "dialog",
"dialog" : {
"type" : "dialog",
"title" : "添加",
"size" : "lg",
"body" : {
"type" : "service",
"schemaApi" : "get:/api/page/schema/bd9b9e41-2dea-4650-a44b-0673443c8aa3?format=amis",
"api" : {
"method" : "get",
"url" : "/api/form/PM_DANGERLISTITEM/defaults?templateId=bd9b9e41-2dea-4650-a44b-0673443c8aa3"
}
},
"actions" : [ {
"type" : "button",
"label" : "保存",
"level" : "primary",
"actionType" : "submit",
"api" : "POST:/api/flow/PM_DANGERLISTITEM_ADD?__egtpl=bd9b9e41-2dea-4650-a44b-0673443c8aa3",
"close" : true
}, {
"type" : "button",
"label" : "取消",
"actionType" : "close"
} ]
}
}, {
"type" : "button",
"id" : "修改",
"label" : "修改",
"actionType" : "dialog",
"disabledOn" : "${!selectedItems || selectedItems.length === 0}",
"dialog" : {
"type" : "dialog",
"title" : "修改",
"size" : "lg",
"data" : {
"&" : "${selectedItems[0]}"
},
"body" : {
"type" : "service",
"schemaApi" : "get:/api/page/schema/bd9b9e41-2dea-4650-a44b-0673443c8aa3?format=amis",
"api" : {
"method" : "post",
"url" : "/api/flow/PM_DANGERLISTITEM_LOAD?__egtpl=bd9b9e41-2dea-4650-a44b-0673443c8aa3",
"data" : {
"PM_DANGERLISTITEM_ID" : "${PM_DANGERLISTITEM_ID}"
},
"responseData" : {
"&" : "${result}"
}
}
},
"actions" : [ {
"type" : "button",
"label" : "保存",
"level" : "primary",
"actionType" : "submit",
"api" : "POST:/api/flow/PM_DANGERLISTITEM_UPDATE?__egtpl=bd9b9e41-2dea-4650-a44b-0673443c8aa3",
"close" : true
}, {
"type" : "button",
"label" : "取消",
"actionType" : "close"
} ]
}
}, {
"type" : "button",
"id" : "删除",
"label" : "删除",
"level" : "danger",
"actionType" : "ajax",
"disabledOn" : "${!selectedItems || selectedItems.length === 0}",
"confirmText" : "确认要删除此记录吗?",
"api" : {
"method" : "post",
"url" : "/api/flow/PM_DANGERLISTITEM_DELETE",
"data" : {
"ids" : "${selectedItems|pick:PM_DANGERLISTITEM_ID|join:','}"
}
}
}, {
"type" : "button",
"id" : "查看",
"label" : "查看",
"actionType" : "dialog",
"disabledOn" : "${!selectedItems || selectedItems.length === 0}",
"dialog" : {
"type" : "dialog",
"title" : "查看",
"size" : "lg",
"data" : {
"&" : "${selectedItems[0]}",
"__readonly" : true
},
"body" : {
"type" : "service",
"schemaApi" : "get:/api/page/schema/bd9b9e41-2dea-4650-a44b-0673443c8aa3?format=amis",
"static" : true,
"api" : {
"method" : "post",
"url" : "/api/flow/PM_DANGERLISTITEM_LOAD?__egtpl=bd9b9e41-2dea-4650-a44b-0673443c8aa3",
"data" : {
"PM_DANGERLISTITEM_ID" : "${PM_DANGERLISTITEM_ID}"
},
"responseData" : {
"&" : "${result}"
}
}
}
}
}, {
"type" : "button",
"id" : "移动",
"label" : "移动",
"actionType" : "dialog",
"disabledOn" : "${!selectedItems || selectedItems.length === 0}",
"dialog" : {
"type" : "dialog",
"title" : "移动",
"size" : "lg",
"data" : {
"&" : "${selectedItems[0]}"
},
"body" : {
"type" : "service",
"schemaApi" : "get:/api/page/schema/a31733c0-462b-4395-aa27-ba3697141a03?format=amis",
"api" : {
"method" : "post",
"url" : "/api/flow/PM_DANGERLISTITEM_LOAD?__egtpl=a31733c0-462b-4395-aa27-ba3697141a03",
"data" : {
"PM_DANGERLISTITEM_ID" : "${PM_DANGERLISTITEM_ID}"
},
"responseData" : {
"&" : "${result}"
}
}
},
"actions" : [ {
"type" : "button",
"label" : "保存",
"level" : "primary",
"actionType" : "submit",
"api" : "POST:/api/flow/PM_DANGERLISTITEM_UPDATE?__egtpl=a31733c0-462b-4395-aa27-ba3697141a03",
"close" : true
}, {
"type" : "button",
"label" : "取消",
"actionType" : "close"
} ]
}
}, {
"type" : "button",
"id" : "项目危险源清单",
"label" : "项目危险源清单",
"actionType" : "dialog",
"dialog" : {
"type" : "dialog",
"title" : "项目危险源清单",
"size" : "lg",
"body" : {
"type" : "service",
"schemaApi" : "get:/api/page/schema/38292e48-8c29-49fc-b341-c13cb20f7157?format=amis"
},
"actions" : [ {
"type" : "button",
"label" : "关闭",
"actionType" : "close"
} ]
}
}, {
"type" : "button",
"id" : "公司危险源清单",
"label" : "公司危险源清单",
"actionType" : "dialog",
"dialog" : {
"type" : "dialog",
"title" : "公司危险源清单",
"size" : "lg",
"body" : {
"type" : "service",
"schemaApi" : "get:/api/page/schema/2750c68b-b8cf-40fc-80ea-d8a41f118fcb?format=amis"
},
"actions" : [ {
"type" : "button",
"label" : "关闭",
"actionType" : "close"
} ]
}
}, "pagination" ],
"primaryField" : "PM_DANGERLISTITEM_ID"
}
}