/** * @description 根据类型获取最新的文档内容 */ import { getUrl } from 'src/utils/getUrl'; import Request from 'src/utils/requests'; import * as defs from '../../baseClass'; export class Params { /** 文档类型: OPERATION_INSTRUCTION / LEGAL_AGREEMENT */ type: string; } export const init = new defs.DocBO(); export async function request(params = {}) { return Request({ url: '/api/doc/type/{type}', params, method: 'get', }); } export function createFetchAction(types, stateKey) { return (params = {}, meta?: any) => { return { types, meta, stateKey, method: 'GET', url: getUrl('/api/doc/type/{type}', params, 'GET'), params, init, }; }; }