|
@@ -1,6 +1,7 @@
|
|
|
import { defHttp } from '/@/utils/http/axios';
|
|
|
import {
|
|
|
GetDepartmentListModel,
|
|
|
+ GetDepartmentTreeModel,
|
|
|
DeleteBatchesParams,
|
|
|
DepartmentIdParams,
|
|
|
AddDepartmentParams,
|
|
@@ -10,6 +11,7 @@ import {
|
|
|
|
|
|
enum Api {
|
|
|
DepartmentUrl = '/department/',
|
|
|
+ DepartmentTreeUrl = '/department/menu',
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -35,7 +37,7 @@ export function addDepartment(params: AddDepartmentParams) {
|
|
|
});
|
|
|
}
|
|
|
/**
|
|
|
- * @description: 批量删除交易类型
|
|
|
+ * @description: 批量删除部门
|
|
|
*/
|
|
|
export function deleteBatchesDepartment(params: DeleteBatchesParams) {
|
|
|
return defHttp.request<GetDepartmentListModel>({
|
|
@@ -46,7 +48,7 @@ export function deleteBatchesDepartment(params: DeleteBatchesParams) {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @description: 获取单个交易类型
|
|
|
+ * @description: 获取单个部门
|
|
|
*/
|
|
|
export function getDepartment(params: DepartmentIdParams) {
|
|
|
return defHttp.request<GetDepartmentModel>({
|
|
@@ -55,7 +57,7 @@ export function getDepartment(params: DepartmentIdParams) {
|
|
|
});
|
|
|
}
|
|
|
/**
|
|
|
- * @description: 修改单个交易类型
|
|
|
+ * @description: 修改单个部门
|
|
|
*/
|
|
|
export function editDepartment(params: EditDepartmentParams) {
|
|
|
return defHttp.request<GetDepartmentListModel>({
|
|
@@ -65,7 +67,7 @@ export function editDepartment(params: EditDepartmentParams) {
|
|
|
});
|
|
|
}
|
|
|
/**
|
|
|
- * @description: 删除单个交易类型
|
|
|
+ * @description: 删除单个部门
|
|
|
*/
|
|
|
export function deleteDepartment(params: DepartmentIdParams) {
|
|
|
return defHttp.request<GetDepartmentListModel>({
|
|
@@ -73,3 +75,14 @@ export function deleteDepartment(params: DepartmentIdParams) {
|
|
|
method: 'DELETE',
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @description: GetDepartmentTree
|
|
|
+ */
|
|
|
+export function getDepartmentTree(params) {
|
|
|
+ console.log('-------------------getDepartmentTree---------------');
|
|
|
+ return defHttp.request<GetDepartmentTreeModel>({
|
|
|
+ url: Api.DepartmentTreeUrl + '/' + params.id,
|
|
|
+ method: 'GET',
|
|
|
+ });
|
|
|
+}
|