/*
 * @Author: your name
 * @Date: 2021-04-28 08:40:01
 * @LastEditTime: 2021-05-12 10:42:23
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: /react-antd-admin-template/src/api/checkGroupManage.js
 */

import request from '@/utils/request'

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

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

export function editCheckGroup(data) {
    return request({
      url: '/checkGroup/editDepartment',
      method: 'post',
      data
    })
}

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

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

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

//获取人员列表--绑定用
export function getPersonListForBind() {
  return request({
    url: '/employee/listAll',
    method: 'get'
  })
}

//新增查核组时选择查核组组长列表
export function getCheckGroupManager() {
  return request({
    url: '/employee/getCheckGroupManager',
    method: 'get'
  })
}

//获取查核方式字典列表
export function getCheckTypeDictionary(data) {
  return request({
    url: '/dictionary/list',
    method: 'get',
    params:{...data}
  })
}

//添加查核方式字典时下拉列表
export function getCheckWays() {
  return request({
    url: '/dictionary/getCheckWays',
    method: 'get',
  })
}

export function listAll() {
    return request({
      url: '/checkPoint/listAll',
      method: 'get',
    })
}
//查核方式字典新增
export function addCheckDictionary(data) {
  return request({
    url: '/dictionary/addDictionary',
    method: 'post',
    data
  })
}

//查核方式字典编辑
export function editCheckDictionary(data) {
  return request({
    url: '/dictionary/editDictionary',
    method: 'post',
    data
  })
}

//查核方式字典删除
export function delCheckDictionary(data) {
  return request({
    url: '/dictionary/delDictionary',
    method: 'post',
    data
  })
}