/** * @description 保存事实逻辑表公用计算逻辑 */ import { getUrl } from 'src/utils/getUrl'; import Request from 'src/utils/requests'; import * as defs from '../../baseClass'; export class Params { /** 事实逻辑表id */ modelId: number; /** 项目id */ projectId: number; /** 锁信息-参数标识-modelId */ lock: number; } export const init = undefined; export async function request(params = {}, bodyParams = {}) { return Request({ url: '/api/publicSql/model/{modelId}/save', params: bodyParams, method: 'post', }); } export function createFetchAction(types, stateKey) { return (params = {}, bodyParams, meta?: any) => { return { types, meta, stateKey, method: 'POST', url: getUrl('/api/publicSql/model/{modelId}/save', params, 'POST'), params: bodyParams, init, }; }; }