/** * @description 获取单个任务 */ import { getUrl } from 'src/utils/getUrl'; import Request from 'src/utils/requests'; import * as defs from '../../baseClass'; export class Params { /** objectId */ objectId: number; /** objectType */ objectType: 'APPLY' | 'APPROVE'; } export const init = new defs.BaseOaTaskBO(); export async function request(params = {}) { return Request({ url: '/api/dip/permission/task/', params, method: 'get', }); } export function createFetchAction(types, stateKey) { return (params = {}, meta?: any) => { return { types, meta, stateKey, method: 'GET', url: getUrl('/api/dip/permission/task/', params, 'GET'), params, init, }; }; }