import request from '@/utils/request';

/**
 * 列表
 */
 export async function getList (params) {
    const res = await request.get('/eom/exceptionmanagement/page', {params});
    if (res.data.code == 0) {
      return res.data.data;
    }
    return Promise.reject(new Error(res.data.message));
  }
/**
 * 详情
 */
export async function getById (id) {
  const res = await request.get('/eom/exceptionmanagement/getById/'+id);
  if (res.data.code == 0) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}
/**
 * 跟新
 */
  // 编辑
  export async function update (data) {
    const res = await request.put(`/eom/exceptionmanagement/update`, data);
    if (res.data.code == 0) {
      return res.data.message;
    }
    return Promise.reject(new Error(res.data.message));
  }