// 部门管理
import request from '@/utils/request'

//部门管理-新增
export const deptAdd = (data) => {
  return request({
    url: '/point-strategy/v/department/add',
    method: 'post',
    data
  })
}

// 用户部门管理-根据用户id查询部门详情
export const selectDeptDetails = (data) => {
  return request({
    url: '/point-strategy/v/user/selectDeptDetails',
    method: 'post',
    params:data
  })
}

// 用户部门管理-保存按钮
export const saveUserDept = (data) => {
  return request({
    url: '/point-strategy/v/user/saveUserDept',
    method: 'post',
    params:data
  })
}

// 部门门类管理-根据部门查询门类树
export const getClassTreeByDeptId = (params) => {
  return request({
    url: '/point-strategy/v/classTree/getClassTreeByDeptId',
    method: 'get',
    params
  })
}

// 部门门类管理-保存按钮
export const saveDeptClass = (data) => {
  return request({
    url: '/point-strategy/v/department/saveDeptClass',
    method: 'post',
    params:data
  })
}

//部门管理-编辑
export const deptEdit = (data) => {
    return request({
      url: '/point-strategy/v/department/update',
      method: 'post',
      data
    })
  }

//部门管理-删除
export const deptDelete = (data) => {
    return request({
        url: '/point-strategy/v/department/delete',
        method: 'post',
        params:data,
    })
}

//部门管理-查询部门树
export const getDeptTree = (data) => {
    return request({
        url: '/point-strategy/v/department/getTree',
        method: 'post',
        params:data,
    })
}

//部门管理-查询列表
export const queryPage = (data) => {
    return request({
        url: '/point-strategy/v/department/queryPage',
        method: 'post',
        data:data,
    })
}
