简体中文
flow.remind.list.batch.btn.render.before
约 261 字小于 1 分钟
2026-04-17
flow.remind.list.batch.btn.render.before
说明:该钩子用于改写批量操作底部按钮,并能设置批量同意/驳回意见是否必填。支持审批流和业务流。
一. bottomBtnList
功能描述
- 改写批量操作底部按钮,并能设置批量同意/驳回意见是否必填。
参数
| 参数 | 说明 | 类型 |
|---|---|---|
| batchFlowType | 批量待办类型(审批流、业务流) | String |
| templateInfo | 业务类型信息 | Object |
| bottomBtnList | 底部按钮列表 | Array |
| context | 透传给插件的上下文能力 | Object |
context 说明
//批量同意意见是否必填
context.batchAgreeOpinionRequired(isRequire)
//批量驳回意见是否必填
context.batchRejectOpinionRequired(isRequire)
//批量更换处理人意见是否必填
context.batchChangeHandlerOpinionRequired(isRequire)返回结果
| 参数 | 说明 | 类型 |
|---|---|---|
| bottomBtnList | 底部按钮列表 | Array |
参数代码示例
let batchFlowType = options && options.batchFlowType;代码示例
module.exports = function (context, pluginService, pluginParam) {
return {
apply() {
return [
{
event: "flow.remind.list.batch.btn.render.before",
functional: async function (context, options) {
let batchFlowType = options && options.batchFlowType;
let templateInfo = options && options.templateInfo;
let bottomBtnList = options && options.bottomBtnList;
let pluginContext = options && options.context;
//true是必填 false 非必填
pluginContext.batchChangeHandlerOpinionRequired(true);
return Promise.resolve({
bottomBtnList: bottomBtnList
});
}
}
];
}
};
};