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>
186 lines
5.0 KiB
JSON
186 lines
5.0 KiB
JSON
{
|
|
"type" : "page",
|
|
"title" : "项目风险",
|
|
"body" : {
|
|
"type" : "crud",
|
|
"api" : "/api/flow/PM_PROJECT_RISK_SEARCH",
|
|
"syncLocation" : false,
|
|
"selectable" : true,
|
|
"checkOnItemClick" : true,
|
|
"filter" : {
|
|
"title" : "查询",
|
|
"body" : [ {
|
|
"name" : "PROJECTID",
|
|
"label" : "项目名称",
|
|
"type" : "picker",
|
|
"clearable" : true,
|
|
"source" : "/api/picker/66e57e6d-0cbb-40cf-8b84-c512345734b7/list",
|
|
"labelField" : "_label",
|
|
"valueField" : "_id",
|
|
"modalMode" : "dialog",
|
|
"modalSize" : "lg",
|
|
"pickerSchema" : {
|
|
"mode" : "table",
|
|
"headerToolbar" : [ {
|
|
"type" : "search-box",
|
|
"name" : "q",
|
|
"placeholder" : "输入关键字搜索"
|
|
} ],
|
|
"footerToolbar" : [ "pagination" ]
|
|
},
|
|
"value" : "${currentProject}"
|
|
}, {
|
|
"name" : "CONTENT",
|
|
"label" : "风险内容",
|
|
"type" : "input-text"
|
|
}, {
|
|
"name" : "LEVEL",
|
|
"label" : "风险等级",
|
|
"type" : "select",
|
|
"clearable" : true,
|
|
"source" : "/api/poc/dict/SYS_RISK_LEVEL"
|
|
}, {
|
|
"name" : "RISKTYPE",
|
|
"label" : "风险类别",
|
|
"type" : "select",
|
|
"clearable" : true,
|
|
"source" : "/api/poc/dict/SYS_RISK_TYPE"
|
|
} ]
|
|
},
|
|
"columns" : [ {
|
|
"name" : "PM_PROJECT_RISK_ID",
|
|
"label" : "主键",
|
|
"width" : 200,
|
|
"toggled" : false
|
|
}, {
|
|
"name" : "PROJECTID_DISPLAY__",
|
|
"label" : "项目名称",
|
|
"width" : 200
|
|
}, {
|
|
"name" : "CONTENT",
|
|
"label" : "风险内容",
|
|
"width" : 200
|
|
}, {
|
|
"name" : "LEVEL",
|
|
"label" : "风险等级",
|
|
"width" : 50,
|
|
"type" : "mapping",
|
|
"map" : {
|
|
"1" : "红灯",
|
|
"2" : "黄灯",
|
|
"3" : "绿灯"
|
|
}
|
|
}, {
|
|
"name" : "RISKTYPE",
|
|
"label" : "风险类别",
|
|
"width" : 100,
|
|
"type" : "mapping",
|
|
"map" : {
|
|
"3" : "合同决算提醒",
|
|
"11" : "法务管理风险"
|
|
}
|
|
}, {
|
|
"name" : "ISIGNORE",
|
|
"label" : "是否手动关闭",
|
|
"width" : 50,
|
|
"type" : "mapping",
|
|
"map" : {
|
|
"0" : "否",
|
|
"1" : "是",
|
|
"false" : "否",
|
|
"true" : "是"
|
|
}
|
|
}, {
|
|
"name" : "UPDATETIME",
|
|
"label" : "发生时间",
|
|
"width" : 100,
|
|
"type" : "datetime",
|
|
"format" : "YYYY-MM-DD HH:mm",
|
|
"inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ"
|
|
} ],
|
|
"headerToolbar" : [ {
|
|
"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/9bc48575-366c-48b3-9267-c95c4c6f8693?format=amis",
|
|
"static" : true,
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/PM_PROJECT_RISK_LOAD?__egtpl=9bc48575-366c-48b3-9267-c95c4c6f8693",
|
|
"data" : {
|
|
"PM_PROJECT_RISK_ID" : "${PM_PROJECT_RISK_ID}"
|
|
},
|
|
"responseData" : {
|
|
"&" : "${result}"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}, {
|
|
"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/ed95e3a3-43da-42d1-99e6-abf7efa2bf0c?format=amis",
|
|
"static" : true,
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/PM_PROJECT_RISK_HISTORY_SEARCH?__egtpl=ed95e3a3-43da-42d1-99e6-abf7efa2bf0c",
|
|
"data" : {
|
|
"PM_PROJECT_RISK_ID" : "${PM_PROJECT_RISK_ID}"
|
|
},
|
|
"responseData" : {
|
|
"&" : "${result}"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}, "pagination" ],
|
|
"primaryField" : "PM_PROJECT_RISK_ID",
|
|
"onEvent" : {
|
|
"selectedChange" : {
|
|
"actions" : [ {
|
|
"actionType" : "ajax",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/script/execute-template",
|
|
"data" : {
|
|
"seq" : 1,
|
|
"item" : "${event.data.selectedItems[0]}",
|
|
"templateId" : "df13b183-6fac-4db3-8c53-8b2923086805"
|
|
}
|
|
},
|
|
"outputVar" : "scriptResult1"
|
|
}, {
|
|
"actionType" : "replayScriptCommands",
|
|
"args" : {
|
|
"commands" : "${event.data.scriptResult1.commands}"
|
|
}
|
|
} ]
|
|
}
|
|
}
|
|
}
|
|
} |