import request from '@/utils/request';
import moment from 'moment';
import { getIsAllParams } from '@/utils';

// 获取列表
export const getList = (params) => request('/resume-work-form', { params });

// 导出
export const exportList = (params) => request('/resume-work-form/export', { params });

// 获取异常列表
export const getAbnormalList = (params) =>{
  return request(
    `/resume-work-form?start=${moment(Date.now()).format('YYYY-MM-DD')}&end=${moment(
      Date.now(),
    ).format('YYYY-MM-DD')}&isAbnormal=true`,
    {params:getIsAllParams(params)},
  );
    }
// 获取删除列表
export const getDeleteformList = (params) =>{
  return request(`/resume-work-form?isDelete=true`, {
    params:getIsAllParams(params),
  });
}

/**
 * 删除提交记录
 * @param {*} data
 * @returns
 */
export const deleteworkForm = (id) => request(`/resume-work-form/${id}`, { method: 'delete' });
