/** * @description 获取临时查询的结果 * @throws Exception code * QUERY_JOB_NOT_FOUND: 临时查询没找到 * @p1-test * queryId: queryId为空或者随便编造一个值 * @p2-test * QUERY_JOB_NOT_FOUND: 查找一个不存在的查询的查询结果 */ import { getUrl } from 'src/utils/getUrl'; import Request from 'src/utils/requests'; import * as defs from '../../baseClass'; export class Params { /** projectId */ projectId: number; /** queryId */ queryId: string; /** index */ index: number; } export const init = new defs.QueryResultVO(); export async function request(params = {}) { return Request({ url: '/api/smc/project/{projectId}/query/{queryId}/index/{index}/result', params, method: 'get', }); } export function createFetchAction(types, stateKey) { return (params = {}, meta?: any) => { return { types, meta, stateKey, method: 'GET', url: getUrl( '/api/smc/project/{projectId}/query/{queryId}/index/{index}/result', params, 'GET', ), params, init, }; }; }