refactor: 修改部门Options的方式为setup语法糖

修改部门Options的方式为setup语法糖
This commit is contained in:
chuan
2021-12-08 17:51:34 +08:00
parent 48a3f86668
commit 532eed6c74
3 changed files with 236 additions and 248 deletions

View File

@@ -8,16 +8,16 @@ export const listDept = (queryParams?: object) => {
})
}
export const getDept = (deptId: any) => {
export const getDept = (id: any) => {
return request({
url: '/youlai-admin/api/v1/depts/'+deptId,
url: '/youlai-admin/api/v1/depts/'+id,
method: 'get'
})
}
export const delDept = (deptId: any) => {
export const delDept = (id: any) => {
return request({
url: '/youlai-admin/api/v1/depts/'+deptId,
url: '/youlai-admin/api/v1/depts/'+id,
method: 'delete',
})
}
@@ -32,7 +32,7 @@ export const addDept = (data: any) => {
}
// 修改部门
export const updateDept = (id:string,data: any) => {
export const updateDept = (id:number,data: any) => {
return request({
url: '/youlai-admin/api/v1/depts/'+id,
method: 'put',