style: 全局代码格式化
Former-commit-id: bb50c8419b8fcdeb48c93fce9f399d901e8f5a52
This commit is contained in:
@@ -1,28 +1,30 @@
|
||||
import { DeptFormData, DeptItem, DeptQueryParam, Option } from '@/types'
|
||||
import request from '@/utils/request'
|
||||
import { AxiosPromise } from 'axios'
|
||||
import { DeptFormData, DeptItem, DeptQueryParam, Option } from '@/types';
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
|
||||
/**
|
||||
* 部门树形表格
|
||||
*
|
||||
* @param queryParams
|
||||
*/
|
||||
export function listTableDepartments(queryParams?: DeptQueryParam): AxiosPromise<DeptItem[]> {
|
||||
return request({
|
||||
url: '/youlai-admin/api/v1/depts/table',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
export function listTableDepartments(
|
||||
queryParams?: DeptQueryParam
|
||||
): AxiosPromise<DeptItem[]> {
|
||||
return request({
|
||||
url: '/youlai-admin/api/v1/depts/table',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 部门下拉列表
|
||||
*/
|
||||
export function listSelectDepartments(): AxiosPromise<Option[]> {
|
||||
return request({
|
||||
url: '/youlai-admin/api/v1/depts/select',
|
||||
method: 'get'
|
||||
})
|
||||
return request({
|
||||
url: '/youlai-admin/api/v1/depts/select',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -31,24 +33,23 @@ export function listSelectDepartments(): AxiosPromise<Option[]> {
|
||||
* @param id
|
||||
*/
|
||||
export function getDeptDetail(id: string): AxiosPromise<DeptFormData> {
|
||||
return request({
|
||||
url: '/youlai-admin/api/v1/depts/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
return request({
|
||||
url: '/youlai-admin/api/v1/depts/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增部门
|
||||
*
|
||||
* @param data
|
||||
*/
|
||||
export function addDept(data: DeptFormData) {
|
||||
return request({
|
||||
url: '/youlai-admin/api/v1/depts',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
return request({
|
||||
url: '/youlai-admin/api/v1/depts',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -58,11 +59,11 @@ export function addDept(data: DeptFormData) {
|
||||
* @param data
|
||||
*/
|
||||
export function updateDept(id: string, data: DeptFormData) {
|
||||
return request({
|
||||
url: '/youlai-admin/api/v1/depts/' + id,
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
return request({
|
||||
url: '/youlai-admin/api/v1/depts/' + id,
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -71,9 +72,8 @@ export function updateDept(id: string, data: DeptFormData) {
|
||||
* @param ids
|
||||
*/
|
||||
export function deleteDept(ids: string) {
|
||||
return request({
|
||||
url: '/youlai-admin/api/v1/depts/' + ids,
|
||||
method: 'delete',
|
||||
})
|
||||
return request({
|
||||
url: '/youlai-admin/api/v1/depts/' + ids,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user