import { get, put, post, del, uploadFile } from '@/utils/request'; import { downloadFile } from '@/utils'; /** * 获得列表数据 * * @param {*} data */ export const getList = data => get('/api/v1/params/businesses', data); /** * 添加 * @param {*} data */ export const add = data => post('/api/v1/params/businesses', data); /** * 更新 * @param {*} data */ export const update = data => put('/api/v1/params/businesses', data); /** * 删除 * @param {*} data */ export const remove = data => del(`/api/v1/params/businesses/${data.paramId}`, data); /** * 导出 * @param {*} params */ export const exportParam = params => downloadFile('/api/v1/params/businessparameter_export_excel', params); /** * 参数导入 * @param {*} param0 */ export const uploadParams = ({ file, onSuccess }) => uploadFile({ action: '/api/v1/params/bp_import', file, onSuccess, });