import request from '@/utils/request'

// 查询维修项目类型列表
export function listProjectType(query) {
  return request({
    url: '/business/projectType/list',
    method: 'get',
    params: query
  })
}

// 查询维修项目类型详细
export function getProjectType(typeId) {
  return request({
    url: '/business/projectType/' + typeId,
    method: 'get'
  })
}

// 新增维修项目类型
export function addProjectType(data) {
  return request({
    url: '/business/projectType',
    method: 'post',
    data: data
  })
}

// 修改维修项目类型
export function updateProjectType(data) {
  return request({
    url: '/business/projectType',
    method: 'put',
    data: data
  })
}

// 删除维修项目类型
export function delProjectType(typeId) {
  return request({
    url: '/business/projectType/' + typeId,
    method: 'delete'
  })
}

// 查询维修项目类型详细
export function getTree(type) {
  return request({
    url: '/business/projectType/tree',
    method: 'get',
    params: {type}
  })
}