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>
This commit is contained in:
313
转换产物-attach/schema/75fb9a46-b874-46b4-a6e5-c12c14ec54b6.json
Normal file
313
转换产物-attach/schema/75fb9a46-b874-46b4-a6e5-c12c14ec54b6.json
Normal file
@@ -0,0 +1,313 @@
|
||||
{
|
||||
"type" : "page",
|
||||
"title" : "培训签到",
|
||||
"body" : {
|
||||
"type" : "crud",
|
||||
"api" : "/api/flow/HR_TRAIN_SIGN_SEARCH",
|
||||
"syncLocation" : false,
|
||||
"selectable" : true,
|
||||
"checkOnItemClick" : true,
|
||||
"filter" : {
|
||||
"title" : "查询",
|
||||
"body" : [ {
|
||||
"name" : "TRAINPLANID",
|
||||
"label" : "计划名称",
|
||||
"type" : "picker",
|
||||
"clearable" : true,
|
||||
"source" : "/api/picker/093cd444-7bff-4f47-ad30-3b9187ce8c4a/list",
|
||||
"labelField" : "_label",
|
||||
"valueField" : "_id",
|
||||
"modalMode" : "dialog",
|
||||
"modalSize" : "lg",
|
||||
"pickerSchema" : {
|
||||
"mode" : "table",
|
||||
"headerToolbar" : [ {
|
||||
"type" : "search-box",
|
||||
"name" : "q",
|
||||
"placeholder" : "输入关键字搜索"
|
||||
} ],
|
||||
"footerToolbar" : [ "pagination" ]
|
||||
}
|
||||
}, {
|
||||
"name" : "TRAINDATE",
|
||||
"label" : "培训日期",
|
||||
"type" : "input-date-range"
|
||||
}, {
|
||||
"name" : "TRAININTERVAL",
|
||||
"label" : "培训时段",
|
||||
"type" : "select",
|
||||
"clearable" : true,
|
||||
"source" : "/api/poc/dict/HR_TRAIN_INTERVAL"
|
||||
}, {
|
||||
"name" : "COURSETYPE",
|
||||
"label" : "培训课程",
|
||||
"type" : "select",
|
||||
"clearable" : true,
|
||||
"source" : "/api/poc/dict/HR_TRIAN_COURSETYPE"
|
||||
}, {
|
||||
"name" : "DEPART_ID",
|
||||
"label" : "计划部门",
|
||||
"type" : "tree-select",
|
||||
"clearable" : true,
|
||||
"source" : "/api/template/6135bd7d-ba6e-4b46-a2f5-1d5e5190e3bd/tree",
|
||||
"searchable" : true,
|
||||
"onlyLeaf" : true
|
||||
}, {
|
||||
"name" : "DO_STATUS",
|
||||
"label" : "执行状态",
|
||||
"type" : "select",
|
||||
"clearable" : true,
|
||||
"source" : "/api/poc/dict/HR_PLAN_DOSTATUS"
|
||||
} ]
|
||||
},
|
||||
"columns" : [ {
|
||||
"name" : "HR_TRAIN_SIGN_ID",
|
||||
"label" : "主键",
|
||||
"width" : 200,
|
||||
"toggled" : false
|
||||
}, {
|
||||
"name" : "TRAINPLANID_DISPLAY__",
|
||||
"label" : "计划名称",
|
||||
"width" : 180
|
||||
}, {
|
||||
"name" : "TRAINDATE",
|
||||
"label" : "培训日期",
|
||||
"width" : 100,
|
||||
"type" : "date",
|
||||
"format" : "YYYY-MM-DD",
|
||||
"inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ"
|
||||
}, {
|
||||
"name" : "TRAININTERVAL",
|
||||
"label" : "培训时段",
|
||||
"width" : 80,
|
||||
"type" : "mapping",
|
||||
"map" : {
|
||||
"1" : "全天",
|
||||
"2" : "上午",
|
||||
"3" : "下午",
|
||||
"4" : "晚上"
|
||||
}
|
||||
}, {
|
||||
"name" : "COURSETYPE",
|
||||
"label" : "培训课程",
|
||||
"width" : 120,
|
||||
"type" : "mapping",
|
||||
"map" : {
|
||||
"1" : "建造师注册证",
|
||||
"3" : "ABC三类人员证",
|
||||
"4" : "技术工人证",
|
||||
"5" : "十大员",
|
||||
"6" : "职称",
|
||||
"100" : "其他"
|
||||
}
|
||||
}, {
|
||||
"name" : "DEPART_ID_DISPLAY__",
|
||||
"label" : "计划部门",
|
||||
"width" : 220
|
||||
}, {
|
||||
"name" : "PRINCIPAL_DISPLAY__",
|
||||
"label" : "负责人",
|
||||
"width" : 80
|
||||
}, {
|
||||
"name" : "PERSON_COUNT",
|
||||
"label" : "应到人数",
|
||||
"width" : 70
|
||||
}, {
|
||||
"name" : "ACTUALCOUNT",
|
||||
"label" : "实到人数",
|
||||
"width" : 70
|
||||
}, {
|
||||
"name" : "DO_STATUS",
|
||||
"label" : "执行状态",
|
||||
"width" : 80,
|
||||
"type" : "mapping",
|
||||
"map" : {
|
||||
"1" : "执行中",
|
||||
"2" : "已执行",
|
||||
"3" : "未执行"
|
||||
}
|
||||
} ],
|
||||
"headerToolbar" : [ {
|
||||
"type" : "button",
|
||||
"id" : "添加",
|
||||
"label" : "添加",
|
||||
"level" : "primary",
|
||||
"actionType" : "dialog",
|
||||
"dialog" : {
|
||||
"type" : "dialog",
|
||||
"title" : "添加",
|
||||
"size" : "lg",
|
||||
"body" : {
|
||||
"type" : "service",
|
||||
"schemaApi" : "get:/api/page/schema/86e93328-ef1a-4c28-9e2f-13d767a22110?format=amis",
|
||||
"api" : {
|
||||
"method" : "get",
|
||||
"url" : "/api/form/HR_TRAIN_SIGN/defaults?templateId=86e93328-ef1a-4c28-9e2f-13d767a22110"
|
||||
}
|
||||
},
|
||||
"actions" : [ {
|
||||
"type" : "button",
|
||||
"label" : "保存",
|
||||
"level" : "primary",
|
||||
"actionType" : "submit",
|
||||
"api" : "POST:/api/flow/HR_TRAIN_SIGN_ADD?__egtpl=86e93328-ef1a-4c28-9e2f-13d767a22110",
|
||||
"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/86e93328-ef1a-4c28-9e2f-13d767a22110?format=amis",
|
||||
"api" : {
|
||||
"method" : "post",
|
||||
"url" : "/api/flow/HR_TRAIN_SIGN_LOAD?__egtpl=86e93328-ef1a-4c28-9e2f-13d767a22110",
|
||||
"data" : {
|
||||
"HR_TRAIN_SIGN_ID" : "${HR_TRAIN_SIGN_ID}"
|
||||
},
|
||||
"responseData" : {
|
||||
"&" : "${result}"
|
||||
}
|
||||
},
|
||||
"onEvent" : {
|
||||
"inited" : {
|
||||
"actions" : [ {
|
||||
"actionType" : "ajax",
|
||||
"api" : {
|
||||
"method" : "post",
|
||||
"url" : "/api/script/execute-template",
|
||||
"data" : {
|
||||
"seq" : 1,
|
||||
"item" : "${&}",
|
||||
"templateId" : "75fb9a46-b874-46b4-a6e5-c12c14ec54b6"
|
||||
}
|
||||
},
|
||||
"outputVar" : "scriptResult1"
|
||||
}, {
|
||||
"actionType" : "replayScriptCommands",
|
||||
"args" : {
|
||||
"commands" : "${event.data.scriptResult1.commands}"
|
||||
}
|
||||
} ]
|
||||
}
|
||||
}
|
||||
},
|
||||
"actions" : [ {
|
||||
"type" : "button",
|
||||
"label" : "保存",
|
||||
"level" : "primary",
|
||||
"actionType" : "submit",
|
||||
"api" : "POST:/api/flow/HR_TRAIN_SIGN_UPDATE?__egtpl=86e93328-ef1a-4c28-9e2f-13d767a22110",
|
||||
"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/HR_TRAIN_SIGN_DELETE",
|
||||
"data" : {
|
||||
"ids" : "${selectedItems|pick:HR_TRAIN_SIGN_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/86e93328-ef1a-4c28-9e2f-13d767a22110?format=amis",
|
||||
"static" : true,
|
||||
"api" : {
|
||||
"method" : "post",
|
||||
"url" : "/api/flow/HR_TRAIN_SIGN_LOAD?__egtpl=86e93328-ef1a-4c28-9e2f-13d767a22110",
|
||||
"data" : {
|
||||
"HR_TRAIN_SIGN_ID" : "${HR_TRAIN_SIGN_ID}"
|
||||
},
|
||||
"responseData" : {
|
||||
"&" : "${result}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}, "pagination" ],
|
||||
"primaryField" : "HR_TRAIN_SIGN_ID",
|
||||
"onEvent" : {
|
||||
"selectedChange" : {
|
||||
"actions" : [ {
|
||||
"actionType" : "ajax",
|
||||
"api" : {
|
||||
"method" : "post",
|
||||
"url" : "/api/script/execute-template",
|
||||
"data" : {
|
||||
"seq" : 2,
|
||||
"item" : "${event.data.selectedItems[0]}",
|
||||
"templateId" : "75fb9a46-b874-46b4-a6e5-c12c14ec54b6"
|
||||
}
|
||||
},
|
||||
"outputVar" : "scriptResult2"
|
||||
}, {
|
||||
"actionType" : "replayScriptCommands",
|
||||
"args" : {
|
||||
"commands" : "${event.data.scriptResult2.commands}"
|
||||
}
|
||||
} ]
|
||||
},
|
||||
"inited" : {
|
||||
"actions" : [ {
|
||||
"actionType" : "ajax",
|
||||
"api" : {
|
||||
"method" : "post",
|
||||
"url" : "/api/script/execute-template",
|
||||
"data" : {
|
||||
"seq" : 1,
|
||||
"item" : "${&}",
|
||||
"templateId" : "75fb9a46-b874-46b4-a6e5-c12c14ec54b6"
|
||||
}
|
||||
},
|
||||
"outputVar" : "scriptResult1"
|
||||
}, {
|
||||
"actionType" : "replayScriptCommands",
|
||||
"args" : {
|
||||
"commands" : "${event.data.scriptResult1.commands}"
|
||||
}
|
||||
} ]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user