| | |
| | | |
| | | const header = (accessToken: string) => ({ Authorization: `Bearer ${accessToken}` }); |
| | | |
| | | /** |
| | | * 查询某个流程是否免审批。 |
| | | * 后端判定:全局总开关开启,或该流程 Key 单独配置了免审批,都算免审批。 |
| | | * 接口异常时退回 false(走正常审批流程选择),避免误放行。 |
| | | */ |
| | | export function isAutoApproveByKey(accessToken: string, processDefinitionKey: string) { |
| | | return request<boolean>( |
| | | `/bpm/process-auto-approve/ui-policy${query({ key: processDefinitionKey })}`, |
| | | { header: header(accessToken) }, |
| | | ).catch(() => false); |
| | | } |
| | | |
| | | type QueryValue = string | number | boolean | string[] | number[] | undefined; |
| | | |
| | | function query(params: Record<string, QueryValue>) { |