import request from '@/utils/request'

// 查询演练培训列表
export function listWorkTrain(query) {
  return request({
    url: '/work/workTrain/list',
    method: 'get',
    params: query
  })
}

// 查询演练培训详细
export function getWorkTrain(id) {
  return request({
    url: '/work/workTrain/' + id,
    method: 'get'
  })
}

// 新增演练培训
export function addWorkTrain(data) {
  return request({
    url: '/work/workTrain',
    method: 'post',
    data: data
  })
}

// 修改演练培训
export function updateWorkTrain(data) {
  return request({
    url: '/work/workTrain',
    method: 'put',
    data: data
  })
}

// 修改演练培训
export function updateWorkTrainDataType(data) {
  return request({
    url: '/work/workTrain/editDataType',
    method: 'post',
    data: data
  })
}

// 删除演练培训
export function delWorkTrain(id) {
  return request({
    url: '/work/workTrain/' + id,
    method: 'delete'
  })
}

// 查询演练培训列表
export function listProjectUnit(query) {
  return request({
    url: '/work/workTrain/projectUnitList',
    method: 'get',
    params: query
  })
}