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

/**
 * 分页查询考核奖项列表
 * @param query
 */
export const fetchList = (query?: any) => {
  return request({
    url: '/stuwork/assessmentcategory/page',
    method: 'get',
    params: query
  });
};

/**
 * 获取考核奖项列表（不分页）
 * @param query
 */
export const getList = (query?: any) => {
  return request({
    url: '/stuwork/assessmentcategory/list',
    method: 'get',
    params: query
  });
};

/**
 * 新增考核奖项
 * @param data
 */
export const addObj = (data: any) => {
  return request({
    url: '/stuwork/assessmentcategory',
    method: 'post',
    data
  });
};

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

/**
 * 编辑考核奖项
 * @param data
 */
export const editObj = (data: any) => {
  return request({
    url: '/stuwork/assessmentcategory/edit',
    method: 'post',
    data
  });
};

/**
 * 删除考核奖项
 * @param ids
 */
export const delObj = (ids: string[]) => {
  return request({
    url: '/stuwork/assessmentcategory/delete',
    method: 'post',
    data: ids
  });
};
