简体中文
flow.todo.center.remind.init
约 297 字小于 1 分钟
2026-06-04
flow.todo.center.remind.init
说明:该钩子用于新版(2.0)待办中心初始化时,改写批量操作底部按钮,并能设置批量更换处理人意见是否必填。支持审批流和业务流。
一. getBatchBottomBtnList
功能描述
- 新版待办中心批量操作底部按钮渲染前触发,可改写底部按钮并设置更换处理人意见是否必填。
参数
| 参数 | 说明 | 类型 |
|---|---|---|
| todoBizInfo | 流程类型:审批流、业务流 | Object |
返回结果
| 参数 | 说明 | 类型 |
|---|---|---|
| methods | 插件方法集合(含 getBatchBottomBtnList) | Object |
methods.getBatchBottomBtnList 说明
| 参数 | 说明 | 类型 |
|---|---|---|
| bottomBtnList | 底部按钮列表 | Array |
| btnInfo | 按钮信息 | Object |
| batchOptionType | 批量操作类型 | String |
返回结果:
| 参数 | 说明 | 类型 |
|---|---|---|
| batchBottomBtnList | 修改后的底部按钮列表 | Array |
bottomBtnList 每项可设置的属性:
| 属性 | 说明 | 类型 |
|---|---|---|
| changeHandlerOpinionRequired | 设置更换处理人意见是否必填,true是必填 false非必填 | Boolean |
参数代码示例
let todoBizInfo = options && options.todoBizInfo;代码示例
module.exports = function (context, pluginService, pluginParam) {
return {
apply() {
let self = this;
return [
{
event: "flow.todo.center.remind.init",
functional: async function (context, options) {
console.error("flow.todo.center.remind.init start");
console.error(context);
console.error(options);
console.error("flow.todo.center.remind.init end");
return {
methods: {
getBatchBottomBtnList(bottomBtnList, btnInfo, batchOptionType) {
bottomBtnList.forEach(item => {
item.changeHandlerOpinionRequired = true;
})
return { batchBottomBtnList: bottomBtnList };
},
}
};
}
},
];
}
};
};