import request from '/@/utils/request';

/**
 * 分页查询校内请假列表
 * @param query
 */
export const fetchList = (query?: any) => {
  return request({
    url: '/stuwork/stuinnerleaveapplygroup/page',
    method: 'get',
    params: query
  });
};

/**
 * 新增校内请假
 * @param data
 */
export const addObj = (data: any) => {
  return request({
    url: '/stuwork/stuinnerleaveapplygroup',
    method: 'post',
    data
  });
};

/**
 * 获取详情
 * @param id
 */
export const getDetail = (id: string) => {
  return request({
    url: '/stuwork/stuinnerleaveapplygroup/detail',
    method: 'get',
    params: { id }
  });
};

/**
 * 编辑校内请假
 * @param data
 */
export const editObj = (data: any) => {
  return request({
    url: '/stuwork/stuinnerleaveapplygroup/edit',
    method: 'post',
    data
  });
};

/**
 * 删除校内请假
 * @param ids
 */
export const delObj = (ids: string[]) => {
  return request({
    url: '/stuwork/stuinnerleaveapplygroup/delete',
    method: 'post',
    data: ids
  });
};

