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>
495 lines
14 KiB
JSON
495 lines
14 KiB
JSON
{
|
|
"type" : "page",
|
|
"title" : "新闻管理",
|
|
"body" : {
|
|
"type" : "crud",
|
|
"api" : "/api/flow/OA_NEWSMANAGE_SEARCH",
|
|
"syncLocation" : false,
|
|
"selectable" : true,
|
|
"checkOnItemClick" : true,
|
|
"filter" : {
|
|
"title" : "查询",
|
|
"body" : [ {
|
|
"name" : "NEWTYPE",
|
|
"label" : "新闻类型",
|
|
"type" : "select",
|
|
"clearable" : true,
|
|
"source" : "/api/poc/dict/NEWS_TYPE"
|
|
}, {
|
|
"name" : "TITLE",
|
|
"label" : "主题",
|
|
"type" : "input-text"
|
|
}, {
|
|
"name" : "IMPORTANT",
|
|
"label" : "重要级别",
|
|
"type" : "select",
|
|
"clearable" : true,
|
|
"source" : "/api/poc/dict/Important"
|
|
}, {
|
|
"name" : "STATUS",
|
|
"label" : "审批状态",
|
|
"type" : "select",
|
|
"clearable" : true,
|
|
"source" : "/api/poc/dict/WFSTATUS"
|
|
}, {
|
|
"name" : "ISSEND",
|
|
"label" : "是否发布",
|
|
"type" : "select",
|
|
"clearable" : true,
|
|
"source" : "/api/poc/dict/YESNO"
|
|
}, {
|
|
"name" : "SENDTIME",
|
|
"label" : "发布时间",
|
|
"type" : "input-datetime-range"
|
|
} ]
|
|
},
|
|
"columns" : [ {
|
|
"name" : "OA_NEWSMANAGE_ID",
|
|
"label" : "主键",
|
|
"width" : 200,
|
|
"toggled" : false
|
|
}, {
|
|
"name" : "TITLE",
|
|
"label" : "主题",
|
|
"width" : 300
|
|
}, {
|
|
"name" : "IMPORTANT",
|
|
"label" : "重要级别",
|
|
"width" : 80,
|
|
"type" : "mapping",
|
|
"map" : {
|
|
"0" : "一般",
|
|
"1" : "重要"
|
|
}
|
|
}, {
|
|
"name" : "NEWTYPE",
|
|
"label" : "新闻类型",
|
|
"width" : 80,
|
|
"type" : "mapping",
|
|
"map" : {
|
|
"0" : "普通",
|
|
"1" : "图片"
|
|
}
|
|
}, {
|
|
"name" : "ISSEND",
|
|
"label" : "是否发布",
|
|
"width" : 80,
|
|
"type" : "mapping",
|
|
"map" : {
|
|
"0" : "否",
|
|
"1" : "是"
|
|
}
|
|
}, {
|
|
"name" : "ISSHOW",
|
|
"label" : "显示/隐藏",
|
|
"width" : 80,
|
|
"type" : "mapping",
|
|
"map" : {
|
|
"1" : "显示",
|
|
"0" : "隐藏"
|
|
}
|
|
}, {
|
|
"name" : "SENDTIME",
|
|
"label" : "发布时间",
|
|
"width" : 150,
|
|
"type" : "datetime",
|
|
"format" : "YYYY-MM-DD HH:mm",
|
|
"inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ"
|
|
}, {
|
|
"name" : "USERSEND_ID_DISPLAY__",
|
|
"label" : "发布人",
|
|
"width" : 80
|
|
}, {
|
|
"name" : "USER_ID_DISPLAY__",
|
|
"label" : "拟稿人",
|
|
"width" : 200,
|
|
"toggled" : false
|
|
}, {
|
|
"name" : "SAVETIME",
|
|
"label" : "保存时间",
|
|
"width" : 200,
|
|
"type" : "datetime",
|
|
"format" : "YYYY-MM-DD HH:mm",
|
|
"inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ",
|
|
"toggled" : false
|
|
}, {
|
|
"name" : "ISTOP",
|
|
"label" : "是否置顶",
|
|
"width" : 80,
|
|
"type" : "mapping",
|
|
"map" : {
|
|
"0" : "否",
|
|
"1" : "是"
|
|
}
|
|
}, {
|
|
"name" : "TOPTIME",
|
|
"label" : "置顶时间",
|
|
"width" : 150,
|
|
"type" : "datetime",
|
|
"format" : "YYYY-MM-DD HH:mm",
|
|
"inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ"
|
|
}, {
|
|
"name" : "ISDEL",
|
|
"label" : "是否删除",
|
|
"width" : 200,
|
|
"type" : "mapping",
|
|
"map" : {
|
|
"0" : "否",
|
|
"1" : "是"
|
|
},
|
|
"toggled" : false
|
|
}, {
|
|
"name" : "STATUS",
|
|
"label" : "审批状态",
|
|
"width" : 80,
|
|
"type" : "mapping",
|
|
"map" : {
|
|
"1" : "未提交",
|
|
"2" : "处理中",
|
|
"3" : "通过",
|
|
"4" : "未通过",
|
|
"5" : "重新提交",
|
|
"6" : "作废"
|
|
}
|
|
}, {
|
|
"name" : "ISPLACE",
|
|
"label" : "归档状态",
|
|
"width" : 80,
|
|
"type" : "mapping",
|
|
"map" : {
|
|
"0" : "未归档",
|
|
"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/0e54cebd-a2eb-4c6d-b927-17ccb906fddb?format=amis",
|
|
"api" : {
|
|
"method" : "get",
|
|
"url" : "/api/form/OA_NEWSMANAGE/defaults?templateId=0e54cebd-a2eb-4c6d-b927-17ccb906fddb"
|
|
}
|
|
},
|
|
"actions" : [ {
|
|
"type" : "button",
|
|
"label" : "保存",
|
|
"level" : "primary",
|
|
"actionType" : "submit",
|
|
"api" : "POST:/api/flow/OA_NEWSMANAGE_ADD?__egtpl=0e54cebd-a2eb-4c6d-b927-17ccb906fddb",
|
|
"close" : true
|
|
}, {
|
|
"type" : "button",
|
|
"label" : "保存并提交审批",
|
|
"level" : "primary",
|
|
"actionType" : "submit",
|
|
"api" : "POST:/api/flow/OA_NEWSMANAGE_ADD_SUBMIT?__egtpl=0e54cebd-a2eb-4c6d-b927-17ccb906fddb",
|
|
"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/0e54cebd-a2eb-4c6d-b927-17ccb906fddb?format=amis",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/OA_NEWSMANAGE_LOAD?__egtpl=0e54cebd-a2eb-4c6d-b927-17ccb906fddb",
|
|
"data" : {
|
|
"OA_NEWSMANAGE_ID" : "${OA_NEWSMANAGE_ID}"
|
|
},
|
|
"responseData" : {
|
|
"&" : "${result}"
|
|
}
|
|
}
|
|
},
|
|
"actions" : [ {
|
|
"type" : "button",
|
|
"label" : "保存",
|
|
"level" : "primary",
|
|
"actionType" : "submit",
|
|
"api" : "POST:/api/flow/OA_NEWSMANAGE_UPDATE?__egtpl=0e54cebd-a2eb-4c6d-b927-17ccb906fddb",
|
|
"close" : true
|
|
}, {
|
|
"type" : "button",
|
|
"label" : "保存并提交审批",
|
|
"level" : "primary",
|
|
"actionType" : "submit",
|
|
"api" : "POST:/api/flow/OA_NEWSMANAGE_ADD_SUBMIT?__egtpl=0e54cebd-a2eb-4c6d-b927-17ccb906fddb",
|
|
"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/OA_NEWSMANAGE_DELETE",
|
|
"data" : {
|
|
"ids" : "${selectedItems|pick:OA_NEWSMANAGE_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/0e54cebd-a2eb-4c6d-b927-17ccb906fddb?format=amis",
|
|
"static" : true,
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/OA_NEWSMANAGE_LOAD?__egtpl=0e54cebd-a2eb-4c6d-b927-17ccb906fddb",
|
|
"data" : {
|
|
"OA_NEWSMANAGE_ID" : "${OA_NEWSMANAGE_ID}"
|
|
},
|
|
"responseData" : {
|
|
"&" : "${result}"
|
|
}
|
|
},
|
|
"onEvent" : {
|
|
"inited" : {
|
|
"actions" : [ {
|
|
"actionType" : "ajax",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/script/execute-template",
|
|
"data" : {
|
|
"seq" : 2,
|
|
"item" : "${&}",
|
|
"templateId" : "ddb75614-ead0-470b-8050-a37111c383b8"
|
|
}
|
|
},
|
|
"outputVar" : "scriptResult2"
|
|
}, {
|
|
"actionType" : "replayScriptCommands",
|
|
"args" : {
|
|
"commands" : "${event.data.scriptResult2.commands}"
|
|
}
|
|
} ]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}, {
|
|
"type" : "button",
|
|
"id" : "发布",
|
|
"label" : "发布",
|
|
"actionType" : "ajax",
|
|
"disabled" : true,
|
|
"confirmText" : "确认要发布此新闻吗?",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/OA_NEWSMANAGE_PUBLISH",
|
|
"data" : {
|
|
"OA_NEWSMANAGE_ID" : "${selectedItems[0].OA_NEWSMANAGE_ID}"
|
|
}
|
|
}
|
|
}, {
|
|
"type" : "button",
|
|
"id" : "显示",
|
|
"label" : "显示",
|
|
"actionType" : "ajax",
|
|
"disabled" : true,
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/OA_NEWSMANAGE_ISSHOW",
|
|
"data" : {
|
|
"OA_NEWSMANAGE_ID" : "${selectedItems[0].OA_NEWSMANAGE_ID}"
|
|
}
|
|
}
|
|
}, {
|
|
"type" : "button",
|
|
"id" : "隐藏",
|
|
"label" : "隐藏",
|
|
"actionType" : "ajax",
|
|
"disabled" : true,
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/OA_NEWSMANAGE_HIDE",
|
|
"data" : {
|
|
"OA_NEWSMANAGE_ID" : "${selectedItems[0].OA_NEWSMANAGE_ID}"
|
|
}
|
|
}
|
|
}, {
|
|
"type" : "button",
|
|
"id" : "置顶",
|
|
"label" : "置顶",
|
|
"actionType" : "ajax",
|
|
"disabled" : true,
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/OA_NEWSMANAGE_ISTOP",
|
|
"data" : {
|
|
"OA_NEWSMANAGE_ID" : "${selectedItems[0].OA_NEWSMANAGE_ID}"
|
|
}
|
|
}
|
|
}, {
|
|
"type" : "button",
|
|
"id" : "文件归档",
|
|
"label" : "文件归档",
|
|
"actionType" : "ajax",
|
|
"disabled" : true,
|
|
"confirmText" : "确认要发送归档吗?",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/OA_NEWSMANAGE_UPDATE_AC",
|
|
"data" : {
|
|
"OA_NEWSMANAGE_ID" : "${selectedItems[0].OA_NEWSMANAGE_ID}"
|
|
}
|
|
}
|
|
}, {
|
|
"type" : "button",
|
|
"id" : "取消置顶",
|
|
"label" : "取消置顶",
|
|
"actionType" : "ajax",
|
|
"disabled" : true,
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/OA_NEWSMANAGE_CANCEL_ISTOP",
|
|
"data" : {
|
|
"OA_NEWSMANAGE_ID" : "${selectedItems[0].OA_NEWSMANAGE_ID}"
|
|
}
|
|
}
|
|
}, {
|
|
"type" : "button",
|
|
"id" : "提交审批",
|
|
"label" : "提交审批",
|
|
"actionType" : "ajax",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/OA_NEWSMANAGE_SUBMIT",
|
|
"data" : {
|
|
"OA_NEWSMANAGE_ID" : "${selectedItems[0].OA_NEWSMANAGE_ID}"
|
|
}
|
|
},
|
|
"disabledOn" : "${!selectedItems || selectedItems.length === 0 || (selectedItems[0].STATUS && selectedItems[0].STATUS != 1 && selectedItems[0].STATUS != 4 && selectedItems[0].STATUS != 5)}"
|
|
}, {
|
|
"type" : "button",
|
|
"id" : "查看审批",
|
|
"label" : "查看审批",
|
|
"icon" : "fa fa-search",
|
|
"disabledOn" : "${!selectedItems || selectedItems.length === 0}",
|
|
"onEvent" : {
|
|
"click" : {
|
|
"actions" : [ {
|
|
"actionType" : "openApprovalDrawer",
|
|
"args" : {
|
|
"taskName" : "审批详情",
|
|
"processInstanceId" : "${selectedItems[0].processInstanceId || selectedItems[0].PROCESSINSTANCEID || ''}",
|
|
"businessKey" : "${selectedItems[0].OA_NEWSMANAGE_ID}",
|
|
"businessTable" : "OA_NEWSMANAGE",
|
|
"readOnly" : true,
|
|
"mode" : "read"
|
|
}
|
|
} ]
|
|
}
|
|
}
|
|
}, "pagination" ],
|
|
"primaryField" : "OA_NEWSMANAGE_ID",
|
|
"onEvent" : {
|
|
"selectedChange" : {
|
|
"actions" : [ {
|
|
"actionType" : "disabled",
|
|
"componentId" : "发布"
|
|
}, {
|
|
"actionType" : "disabled",
|
|
"componentId" : "显示"
|
|
}, {
|
|
"actionType" : "disabled",
|
|
"componentId" : "隐藏"
|
|
}, {
|
|
"actionType" : "disabled",
|
|
"componentId" : "置顶"
|
|
}, {
|
|
"actionType" : "disabled",
|
|
"componentId" : "文件归档"
|
|
}, {
|
|
"actionType" : "disabled",
|
|
"componentId" : "取消置顶"
|
|
}, {
|
|
"actionType" : "ajax",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/script/execute-template",
|
|
"data" : {
|
|
"seq" : 1,
|
|
"item" : "${event.data.selectedItems[0]}",
|
|
"templateId" : "ddb75614-ead0-470b-8050-a37111c383b8"
|
|
}
|
|
},
|
|
"outputVar" : "scriptResult1"
|
|
}, {
|
|
"actionType" : "replayScriptCommands",
|
|
"args" : {
|
|
"commands" : "${event.data.scriptResult1.commands}"
|
|
}
|
|
} ]
|
|
},
|
|
"inited" : {
|
|
"actions" : [ {
|
|
"actionType" : "ajax",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/script/execute-template",
|
|
"data" : {
|
|
"seq" : 2,
|
|
"item" : "${&}",
|
|
"templateId" : "ddb75614-ead0-470b-8050-a37111c383b8"
|
|
}
|
|
},
|
|
"outputVar" : "scriptResult2"
|
|
}, {
|
|
"actionType" : "replayScriptCommands",
|
|
"args" : {
|
|
"commands" : "${event.data.scriptResult2.commands}"
|
|
}
|
|
} ]
|
|
}
|
|
}
|
|
}
|
|
} |