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

export function getData(num, num1) {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: '车间生产管理_设备运行情况_查询数据',
      param: '工位号=' + num + '&日期=' + num1
    }
  })
}
export function getData1(num) {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: '车间生产管理_设备运行情况_查询数据_全员',
      param: '日期=' + num
    }
  })
}
export function getData2(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
    }
  })
}
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
    }
  })
}
// 初始化 人员和工位
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_设备状态查询_初始化'
    }
  })
}
