/*
 * @Author: your name
 * @Date: 2021-04-25 16:07:41
 * @LastEditTime: 2021-04-29 19:05:08
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: /react-antd-admin-template/src/api/tableapi.js
 */

import request from '@/utils/request'

export function getPersonnelInfoList(data) {
  return request({
    url: '/employee/list',
    method: 'get',
    params:{...data}
  })
}

export function editUser(data) {
    return request({
      url: '/employee/editUser',
      method: 'post',
      data
    })
}

export function addUser(data) {
    return request({
      url: '/employee/addUser',
      method: 'post',
      data
    })
}

export function deleteUsers(data) {
    return request({
      url: '/employee/deleteUsers',
      method: 'post',
      data
    })
}
//单位列表不分页，为添加中间表提供选择
export function getGroupListForBind() {
  return request({
    url: '/sysDeptClass/listAll',
    method: 'get',
  })
}

//人员和查核组关系列表
export function getPersonAndCheckGroup(data) {
    return request({
      url: '/checkGroup/checkGroupEmpPage',
      method: 'get',
      params:{...data}
    })
}

//删除人员和查核组关系列表
export function delPersonAndCheckGroup(data) {
    return request({
      url:'/checkGroup/delCheckGroupEmp',
      method: 'post',
      data
    })
}

//人员和单位关系列表
export function getPersonAndGroupList(data) {
    return request({
      url: '/sysDepartment/deptAndEmpPage',
      method: 'get',
      params:{...data}
    })
}

//删除人员和单位关系列表
export function delPersonAndGroupList(data) {
    return request({
      url: '/sysDepartment/delDeptAndEmp',
      method: 'post',
      data
    })
}

