feat: 添加部门修改和部门搜索
添加部门修改和部门搜索
This commit is contained in:
@@ -1,13 +1,5 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// export function list(queryParams:object) {
|
||||
// return request({
|
||||
// url: '/youlai-admin/api/v1/oauth-clients',
|
||||
// method: 'get',
|
||||
// params: queryParams
|
||||
// })
|
||||
// }
|
||||
|
||||
export const listDept = (queryParams?: object) => {
|
||||
return request({
|
||||
url: '/youlai-admin/api/v1/depts/table',
|
||||
@@ -18,15 +10,11 @@ export const listDept = (queryParams?: object) => {
|
||||
|
||||
export const getDept = (deptId: any) => {
|
||||
return request({
|
||||
url: '/youlai-admin/api/v1/depts/select',
|
||||
url: '/youlai-admin/api/v1/depts/'+deptId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// export const listDeptExcludeChild = (deptId: any) => {
|
||||
// return https().request<RootObject<any>>(`system/dept/list/exclude/${deptId}`, Method.GET, undefined, ContentType.form)
|
||||
// }
|
||||
|
||||
export const delDept = (deptId: any) => {
|
||||
return request({
|
||||
url: '/youlai-admin/api/v1/depts/'+deptId,
|
||||
@@ -34,10 +22,7 @@ export const delDept = (deptId: any) => {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 新增部门
|
||||
|
||||
export const addDept = (data: any) => {
|
||||
return request({
|
||||
url: '/youlai-admin/api/v1/depts',
|
||||
@@ -47,22 +32,18 @@ export const addDept = (data: any) => {
|
||||
}
|
||||
|
||||
// 修改部门
|
||||
|
||||
export const updateDept = (data: any) => {
|
||||
export const updateDept = (id:string,data: any) => {
|
||||
return request({
|
||||
url: '/youlai-admin/api/v1/depts/' + id,
|
||||
url: '/youlai-admin/api/v1/depts/'+id,
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// // 根据角色ID查询部门树结构
|
||||
// export const roleDeptTreeselect = (roleId: number | string) => {
|
||||
// return https().request<any>(`system/dept/roleDeptTreeselect/${roleId}`, Method.GET, undefined, ContentType.form)
|
||||
// }
|
||||
//
|
||||
// // 查询部门下拉树结构
|
||||
//
|
||||
// export const treeselect = () => {
|
||||
// return https().request<RootObject<any>>('system/dept/treeselect', Method.GET, undefined, ContentType.form)
|
||||
// }
|
||||
|
||||
export const getDeptSelectList = ()=> {
|
||||
return request({
|
||||
url: '/youlai-admin/api/v1/depts/select',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user