import _axios from "@/utils/request";
export default {
  // 列表
  getList: (data) => _axios.fetch("/task/list", data, "POST"),
  // 创建
  goCreate: (data) => _axios.fetch("/task/create", data, "POST"),
  // 删除
  goRemove: (data) => _axios.fetch("/task/remove", data, "POST"),
  // 查询任务数
  getTaskCount: (data) => _axios.fetch("/task/statistics", data, "POST"),
  // 新增货架
  addShelf: (data) => _axios.fetch("workbench/add-shelf", data, "POST"),
  // 删除货架
  delShelf: (data) => _axios.fetch("workbench/del-shelf", data, "POST"),
  // 画作列表
  artWorkList: (data) => _axios.fetch("workbench/artwork-list", data, "POST"),
  // 添加画作
  addWork: (data) => _axios.fetch("workbench/shelf-add-artwork", data, "POST"),
  // 保存工作台
  saveShelf: (data) =>
    _axios.fetch("workbench/shelf-drag-artwork", data, "POST"),
  //获取所有货架
  getAllStore: (data) => _axios.fetch("artwork/shelf-no-list", data, "POST"),
  //更换货架
  changeStore: (data) =>
    _axios.fetch("workbench/update-aw-shelf", data, "POST"),
  // 获取所有部门
  getAllDepartment: (data) => _axios.fetch("department/all", data, "POST"),
  // 获取所有岗位
  getAllPosition: (data) => _axios.fetch("position/list", data, "POST"),
  // 计算上下班时长
  getWorkTime: (data) => _axios.fetch("oa/working-time/duration", data, "POST"),
  // 创建班次
  createWorkTime: (data) =>
    _axios.fetch("oa/working-time/create", data, "POST"),
  // 查询班次
  getWorkTimeList: (data) =>
    _axios.fetch("oa/working-time/options", data, "POST"),
  // 运用班次
  useWorkTime: (data) => _axios.fetch("oa/working-time/in-use", data, "POST"),
  // 删除班次
  delWorkTime: (data) => _axios.fetch("oa/working-time/cancel", data, "POST"),
  // 查询申请
  getApplyList: (data) => _axios.fetch("oa/apply/list", data, "POST"),
  // 全员考勤
  getAttendanceList: (data) =>
    _axios.fetch("oa/staff/collection-all", data, "POST"),
  // 个人异常考勤
  getPersonalAttendanceList: (data) =>
    _axios.fetch("oa/abnormal", data, "POST"),
  // 考勤记录查询详情
  getAttendanceDetail: (data) => _axios.fetch("oa/record/other", data, "POST"),
  // 取消班次
  cancelWorkTime: (data) =>
    _axios.fetch("oa/working-time/update", data, "POST"),
  deleteWorkTime: (data) =>
    _axios.fetch("oa/working-time/cancel", data, "POST"),
  // 员工搜索
  searchStaff: (data) => _axios.fetch("oa/users", data, "POST"),
  // 打卡机列表
  getMachineList: (data) => _axios.fetch("clock/list", data, "POST"),
  // 批量绑定打卡机
  bindMachine: (data) => _axios.fetch("clock/batch/bind", data, "POST"),
  // 批量解绑打卡机
  untieMachine: (data) => _axios.fetch("clock/batch/untie", data, "POST"),
  // 获取下一个工作日
  getNextWorkDay: (data) =>
    _axios.fetch("api/workdaymeal/now/nextWorkDay", data, "POST"),
  // 获取点餐列表
  getFoodList: (data) => _axios.fetch("api/workdaymeal/list", data, "POST"),
  // 获取指定预约
  getFoodDetail: (data) =>
    _axios.fetch("api/workdaymeal/user/detail", data, "POST"),
  // 预约
  orderFood: (data) => _axios.fetch("api/workdaymeal/sure", data, "POST"),
  // 取消预约
  cancelOrderFood: (data) =>
    _axios.fetch("api/workdaymeal/cancel", data, "POST"),
  // 导出
  exportExcel: (data) =>
    _axios.fetch("/oa/collection/download/old", data, "POST", "arraybuffer"),
};
