operation.js 904 Bytes
Newer Older
duanledexianxianxian's avatar
duanledexianxianxian committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
import { get, put, post, del, uploadFile } from '@/utils/request';
import { downloadFile } from '@/utils';

/**
 * 获得列表数据
 *
 * @param {*} data
 */
export const getList = data => get('/api/v1/params/operations', data);
/**
 * 添加
 * @param {*} data
 */
export const add = data => post('/api/v1/params/operations', data);
/**
 * 更新
 * @param {*} data
 */
export const update = data => put('/api/v1/params/operations', data);
/**
 * 删除
 * @param {*} data
 */
export const remove = data => del(`/api/v1/params/operations/${data.paramId}`, data);

/**
 *  导出
 * @param {*} params
 */
export const exportParam = params =>
  downloadFile('/api/v1/params/operationparameter_export_excel', params);

/**
 * 参数导入
 * @param {*} param0
 */
export const uploadParams = ({ file, onSuccess }) =>
  uploadFile({
    action: '/api/v1/params/opp_import',
    file,
    onSuccess,
  });