import request from '@/utils/request'

// 查询项目成员列表
export function listStaff(query) {
  return request({
    url: '/system/staff/list',
    method: 'get',
    params: query
  })
}

// 查询项目成员详细
export function getStaff(id) {
  return request({
    url: '/system/staff/' + id,
    method: 'get'
  })
}

// 新增项目成员
export function addStaff(data) {
  return request({
    url: '/system/staff',
    method: 'post',
    data: data
  })
}

// 修改项目成员
export function updateStaff(data) {
  return request({
    url: '/system/staff',
    method: 'put',
    data: data
  })
}

// 删除项目成员
export function delStaff(id) {
  return request({
    url: '/system/staff/' + id,
    method: 'delete'
  })
}

export function projectList() {
  return request({
    url: '/system/project/list?pageNum=1&pageSize=1000',
    method: 'get'
  })
}

export function userList(query) {
  return request({
    url: '/system/user/list',
    method: 'get',
    params: query
  })
}

export function roleList(query) {
  return request({
    url: '/system/role/list?pageNum=1&pageSize=1000',
    method: 'get'
  })
}
