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

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

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

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

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