import request from '@/utils/request'
// 数据字典维护列表
export function getDictionary(data) {
  return request({
    url: '/dictionary/page',
    method: 'get',
    params: data
  })
}
// 生产线维护列表
export function getProductlinelist(data) {
  return request({
    url: '/productLine/list',
    method: 'get',
    params: data
  })
}
// 启用的生产线列表
export function enableList() {
  return request({
    url: '/productLine/enableList',
    method: 'get'
  })
}
// 生产线停启用
export function changeStatus(data) {
  return request({
    url: '/productLine/changeStatus',
    method: 'post',
    data: data
  })
}
// 生产线删除
export function productLineDelete(data) {
  return request({
    url: '/productLine/delete',
    method: 'delete',
    data: data
  })
}
// 新增生产线
export function addproductLine(data) {
  return request({
    url: '/productLine/add',
    method: 'put',
    data: data
  })
}
// 生产线详情
export function productLineDetail(data) {
  return request({
    url: '/productLine/detail',
    method: 'get',
    params: data
  })
}
// 生产线编辑
export function productLineEdit(data) {
  return request({
    url: '/productLine/edit',
    method: 'post',
    data
  })
}

//获取当前登录人所在生产厂的生产线
export function getProductLines(params) {
  return request({
    url: '/productLine/getProductLines',
    method: 'get',
    params
  })
}

// 条码新增
export function tataLabelRuleBatchAdd(data) {
  return request({
    url: '/tataLabelRule/batchAdd',
    method: 'put',
    data
  })
}
// 条码编辑
export function tataLabelRuleBatchEdit(data) {
  return request({
    url: '/tataLabelRule/batchEdit',
    method: 'post',
    data
  })
}
// 条码列表
export function tataLabelRuleList(data) {
  return request({
    url: '/tataLabelRule/list',
    method: 'get',
    params: data
  })
}
// 获取生产厂下树形部门结构
export function departmentGetFactoryTreeDepartment(data) {
  return request({
    url: `/department/getFactoryTreeDepartment/${data}`,
    method: 'get'
  })
}
// 查询部门下人员列表
export function departmentGetUserOfDepartment(data) {
  return request({
    url: `/department/getUserOfDepartment/${data}`,
    method: 'get'
  })
}
// 工艺环节新增
export function tataLineProcessBatchAdd(data) {
  return request({
    url: '/tataLineProcess/batchAdd',
    method: 'put',
    data
  })
}
// 工艺环节编辑
export function tataLineProcessBatchEdit(data) {
  return request({
    url: '/tataLineProcess/batchEdit',
    method: 'post',
    data
  })
}
// 工艺环节列表
export function tataLineProcessList(data) {
  return request({
    url: '/tataLineProcess/list',
    method: 'get',
    params: data
  })
}
//查看是否能删除
export function tataLineProcessdelete(params) {
  return request({
    url: '/tataLineProcess/delete',
    method: 'delete',
    params
  })
}
// 提醒人员
export function userremindDepartmentUsers() {
  return request({
    url: '/user/remindDepartmentUsers',
    method: 'get'
  })
}
