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

/**
 * 获取教室月卫生列表
 */
export const fetchList = (query: any) => {
  return request({
    url: '/stuwork/classroomhygienemonthly/page',
    method: 'get',
    params: query
  });
};

/**
 * 获取教室月卫生详情
 */
export const getObj = (query: any) => {
  return request({
    url: '/stuwork/classroomhygienemonthly/detail',
    method: 'get',
    params: query
  });
};

/**
 * 删除教室月卫生
 */
export const delObjs = (ids: string[]) => {
  return request({
    url: '/stuwork/classroomhygienemonthly/delete',
    method: 'post',
    data: ids
  });
};

/**
 * 教室卫生考核
 */
export const checkClassRoomHygieneMonthly = (data: { schoolYear: string; schoolTerm: string; month: string }) => {
  return request({
    url: '/stuwork/classroomhygienemonthly/checkClassRoomHygieneMonthly',
    method: 'post',
    data
  });
};

/**
 * 导入教室月卫生数据
 */
export const importData = (data: FormData) => {
  return request({
    url: '/stuwork/classroomhygienemonthly/importData',
    method: 'post',
    data,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  });
};


