import request from '@/utils/request'

// 查询教职工列表
export function getStaffList(query) {
  return request({
    url: '/system/plat/staff/page',
    method: 'get',
    params: query
  })
}

//查询所有幼儿园列表
export function getKinderList(query) {
  return request({
    url: '/system/branch/kindergarten/list/all',
    method: 'get',
    params: query
  })
}

//新增教职工
  export function addTeacher(data) {
    return request({
      url: '/system/plat/staff',
      method: 'post',
      data: data
    })
  }

  //编辑教职工
export function editTeacher(data) {
  return request({
    url: 'system/plat/staff',
    method: 'put',
    data: data
  })
}
//教职工详情
export function teacherDetails(id) {
  return request({
    url: `system/plat/staff/` + id,
    method: 'get',
  })
}

//删除教职工
export function deleteTeacher(id, data) {
  return request({
    url: `system/plat/staff/abandon/${id}`,
    method: 'put',
    data: data
  })
}

