import request from '@/utils/request'

// 查询部门资源
export function getDeptResource(deptId) {
  return request({
    url: '/system/resourceM/getDeptResource/'+deptId,
    method: 'get'
  })
}

// 查询部门列表
export function getCompanyResource(companyId) {
  return request({
    url: '/system/resourceM/getCompanyResource/'+companyId,
    method: 'get'
  })
}

//更新部门资源
export function addOrEditDeptResource(data) {
  return request({
    url: '/system/resourceM/updateDeptResource',
    method: 'put',
    data: data
  })
}

//更新公司资源
export function addOrEditCompanyResource(data) {
  return request({
    url: '/system/resourceM/updateCompanyResource',
    method: 'put',
    data: data
  })
}
