import request from '@/utils/request'
import state from '@/store'
import router from '@/router'

// 初始化工位
export function getMachine() {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: '车间生产管理工艺_加工顺序调整_查询工位及人员'
    }
  })
}
// 获取状态
export function searchState() {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: 'MES_机加工MES_设备状态查询_初始化'
    }
  })
}

export function getData3(num, num1, num2) {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: '车间生产管理_设备运行情况_查询数据_状态分布图_新',
      param: '工位号=' + num + '&开始时间=' + num1 + '&结束时间=' + num2
    }
  })
}
