import request from '@/utils/request' // 查询部门树状结构 export function listDepttree(query) { return request({ url: '/system/speedingdept/tree', method: 'get', params: query }) } // 查询部门列表(根据父部门ID查询子部门) export function listDept(query) { return request({ url: '/system/speedingdept/list', method: 'get', params: query }) } // 根据父部门ID查询子部门列表 export function getDept(parentId,data) { return request({ url: '/system/speedingdept/listByParent/' + parentId, method: 'get', params:data }) } // 查询部门层级信息 export function getDeptlevel(deptId) { return request({ url: '/system/speedingdept/level/' + deptId, method: 'get' }) } // 查询部门详细数据 export function getDeptspeedingdept(deptId) { return request({ url: '/system/speedingdept/' + deptId, method: 'get' }) } // 新增部门 export function addDept(data) { return request({ url: '/system/speedingdept', method: 'post', data: data }) } // 修改部门 export function updateDept(data) { return request({ url: '/system/speedingdept', method: 'put', data: data }) } // 获取部门层级选项(用于新增/编辑时的父部门选择) export function levelOptions(data) { return request({ url: '/system/parentOptionsByLevel', method: 'get', data: data }) } // 删除部门 export function delDept(deptId) { return request({ url: '/system/speedingdept/' + deptId, method: 'delete' }) }