import { defHttp } from '/@/utils/http/axios'; enum Api { list = '/xslmes/mesXslMasterBatchPlan/list', save = '/xslmes/mesXslMasterBatchPlan/add', edit = '/xslmes/mesXslMasterBatchPlan/edit', deleteOne = '/xslmes/mesXslMasterBatchPlan/delete', deleteBatch = '/xslmes/mesXslMasterBatchPlan/deleteBatch', queryById = '/xslmes/mesXslMasterBatchPlan/queryById', exportXls = '/xslmes/mesXslMasterBatchPlan/exportXls', } export const list = (params) => defHttp.get({ url: Api.list, params }); export const deleteOne = (params, handleSuccess) => defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => handleSuccess()); export const batchDelete = (params, handleSuccess) => defHttp.delete({ url: Api.deleteBatch, params }, { joinParamsToUrl: true }).then(() => handleSuccess()); export const saveOrUpdate = (params, isUpdate) => defHttp.post({ url: isUpdate ? Api.edit : Api.save, params }); export const queryById = (params) => defHttp.get({ url: Api.queryById, params }); export const getExportUrl = Api.exportXls;