/** * @description 删除业务过程 * @throws Exception code * INTERNAL_ERROR: 系统内部错误 * @p1-test * user: 当前用户在项目中无删除权限 * id: id对应的业务过程不存在/ 该业务过程被依赖/ null * @p2-test * INTERNAL_ERROR: 有其他元素依赖该业务过程, 例如: 事实逻辑表已经关联依赖该业务过程, 会导致删除失败 */ import { getUrl } from 'src/utils/getUrl'; import Request from 'src/utils/requests'; import * as defs from '../../baseClass'; export class Params { /** 业务过程ID */ id?: number; /** name */ name?: string; /** projectId */ projectId?: number; /** 提交备注 */ deleteComment: string; } export const init = false; export async function request(params = {}) { return Request({ url: '/api/bizProcess/{id}', params, method: 'delete', }); } export function createFetchAction(types, stateKey) { return (params = {}, meta?: any) => { return { types, meta, stateKey, method: 'DELETE', url: getUrl('/api/bizProcess/{id}', params, 'DELETE'), params, init, }; }; }