import Request from '@/utils/request/request-util';

/**
 * low_code 业务预览api
 *
 */
export class PreviewApi {
  /**
   * 获取业务渲染的配置
   * @param {*} params
   * @returns
   */
  static getConfig(params) {
    return Request.get('/businessRenderConfig/getConfig', params);
  }
  /**
   * 获取业务渲染的配置
   * @param {*} params
   * @returns
   */
  static getViewConfig(params) {
    return Request.get('/devopsViewDetail/getViewConfig', params);
  }

  /**
   * 获取表单详情
   * @param {*} params
   * @returns
   */
  static getDetail(params) {
    return Request.get('/businessRender/getDetail', params);
  }

  /**
   * 删除单个记录
   * @param {*} params
   * @returns
   */
  static delete(params) {
    return Request.post('/businessRender/delete', params);
  }

  /**
   * 批量删除数据
   * @param {*} params
   * @returns
   */
  static batchDelete(params) {
    return Request.post('/businessRender/batchDelete', params);
  }

  /**
   * 保存
   * @param {*} params
   * @returns
   */
  static save(params) {
    return Request.post('/businessRender/save', params);
  }

  /**
   * 更新
   * @param {*} params
   * @returns
   */
  static update(params) {
    return Request.post('/businessRender/update', params);
  }

  /**
   * 导出
   * @param {*} params
   * @returns
   */
  static exportData(params) {
    return Request.downLoad('/businessRender/exportData', params);
  }
}