/*
 * @Description:
 * @Author: zhuoda
 * @Date: 2021-11-05
 * @LastEditTime: 2024-07-03 15:36:19
 * @LastEditors: 15902849627 380091478@qq.com
 */
import { param } from 'jquery';
import { postRequest, getRequest, getDownload } from '../../lib/axios.js';

export const workspaceSettingsApi = {
  // 获取员工数据
  getEmployee: (param) => {
    return getRequest('/employee/queryAll', param);
  },
  // 工作区列表
  query: (param) => {
    console.log(param)
    return postRequest('/nWorkPlace/query', param);
  },
  // 更新工作区状态
  updateStatus: (param) => {
    return postRequest('/nWorkPlace/updateStatus', param);
  },
  // 新增工作区
  add: (param) => {
    return postRequest('/nWorkPlace/add', param);
  },
  // 编辑工作区
  update: (param) => {
    return postRequest('/nWorkPlace/update', param);
  },
  // 删除工作区
  del: (param) => {
    return postRequest(`/nWorkPlace/delete/${param.id}`);
  },
  // 工作区详情
  getWorkPlaceById: (param) => {
    return getRequest(`/nWorkPlace/getWorkPlaceById/${param.id}`);
  },
  // 所有工作区
  queryAllPlace: (param) => {
    return postRequest(`/nWorkPlace/queryAllPlace`, param);
  },
  queryFace:(param)=>{
    return postRequest(`/nWorkFace/getAll`, param)
  },
  getSiteAll:(param)=>{
    return postRequest(`/nMineralProcessingSite/getAll`, param)
  },
  workFaceScreenQuery:(param)=>{
    return postRequest(`/workFaceScreen/query`, param)
  },
  workSiteScreenQuery:(param)=>{
    return postRequest(`/workSiteScreen/query`, param)
  },
  carinfoQuery: (param) => {
    return postRequest('/carInfo/query', param);
  },
  getCarById: (param) => {
    return getRequest(`carInfo/getCarById/${param}`);
  },
  queryFaceOrderDetails:(faceId)=>{
    return getRequest(`/workFaceScreen/queryFaceOrderDetails/${faceId}`)
  },
  getTaskByFaceId:(faceId)=>{
    return getRequest(`/workFaceScreen/getTaskByFaceId/${faceId}`)
  },
  workPlaceScreen:(param)=>{
    return postRequest(`/workPlaceScreen/queryLog`, param)
  },
  queryProcessSiteCarTask:(param)=>{
    return postRequest(`/workSiteScreen/queryProcessSiteCarTask`, param)
  },
  queryMineCarInfo:(faceId)=>{
    return getRequest(`/mineCarScreen/queryMineCarInfo/${faceId}`)
  },
  queryMapInfo:(faceId)=>{
    return getRequest(`/mineCarScreen/queryMapInfo/${faceId}`)
  },
};
