疯狂的狮子li
2021-12-24 5ca038d888922e93bf45c7bd37f3c6dce849dcff
ruoyi-ui/src/api/system/dept.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,68 @@
import request from '@/utils/request'
// æŸ¥è¯¢éƒ¨é—¨åˆ—表
export function listDept(query) {
  return request({
    url: '/system/dept/list',
    method: 'get',
    params: query
  })
}
// æŸ¥è¯¢éƒ¨é—¨åˆ—表(排除节点)
export function listDeptExcludeChild(deptId) {
  return request({
    url: '/system/dept/list/exclude/' + deptId,
    method: 'get'
  })
}
// æŸ¥è¯¢éƒ¨é—¨è¯¦ç»†
export function getDept(deptId) {
  return request({
    url: '/system/dept/' + deptId,
    method: 'get'
  })
}
// æŸ¥è¯¢éƒ¨é—¨ä¸‹æ‹‰æ ‘结构
export function treeselect() {
  return request({
    url: '/system/dept/treeselect',
    method: 'get'
  })
}
// æ ¹æ®è§’色ID查询部门树结构
export function roleDeptTreeselect(roleId) {
  return request({
    url: '/system/dept/roleDeptTreeselect/' + roleId,
    method: 'get'
  })
}
// æ–°å¢žéƒ¨é—¨
export function addDept(data) {
  return request({
    url: '/system/dept',
    method: 'post',
    data: data
  })
}
// ä¿®æ”¹éƒ¨é—¨
export function updateDept(data) {
  return request({
    url: '/system/dept',
    method: 'put',
    data: data
  })
}
// åˆ é™¤éƒ¨é—¨
export function delDept(deptId) {
  return request({
    url: '/system/dept/' + deptId,
    method: 'delete'
  })
}