import request from '@/utils/request'

//2024-05-01合并
//报表权限 lanbm 2024-04-15 add
export function create(data) {
  return request({
    url: '/Report/EcwReportPermission/create',
    method: 'post',
    data: data
  })
}

export function update(data) {
  return request({
    url: '/Report/EcwReportPermission/update',
    method: 'post',
    data: data
  })
}

export function del(id) {
  return request({
    url: '/Report/EcwReportPermission/delete?id=' + id,
    method: 'get'
  })
}

export function getModel(id) {
  return request({
    url: '/Report/EcwReportPermission/get?id=' + id,
    method: 'get'
  })
}

//获取当前用户的报表权限 lanbm 2024-05-15 add
export function getCurUserPermission() {
  return request({
    url: '/Report/EcwReportPermission/getCurUserPermission',
    method: 'get'
  })
}


export function getPageList(query) {
  return request({
    url: '/Report/EcwReportPermission/page',
    method: 'get',
    params: query
  })
}

export function exportExcel(query) {
  return request({
    url: '/Report/EcwReportPermission/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

//lanbm 2024-04-19 add
//获取指定部门的子部门
export function getDeptChild(query) {
  return request({
    url: '/Report/SysDeptEx/getDeptChild',
    method: 'get',
    params: query
  })
}

//根据部门过滤客户经理 2024-04-27
export function listServiceUser(query) {
  return request({
    url: '/Report/SysDeptEx/listServiceUser',
    method: 'get',
    params: query
  })
}
