mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-10-04 17:14:21 +00:00
fix(web): 修复代码格式和文件清理问题
清理无用文件和资源,调整代码格式统一双引号,修复部分组件路径引用问题 删除大量无用图片资源和组件文件,统一代码风格使用双引号,修复国际化文件路径引用,调整部分组件逻辑,优化项目结构
This commit is contained in:
@@ -1,78 +1,51 @@
|
||||
import request from '@/utils/http';
|
||||
import request from "@/utils/request";
|
||||
|
||||
const API_PATH = '/system/dept';
|
||||
const API_PATH = "/system/dept";
|
||||
|
||||
const DeptAPI = {
|
||||
/**
|
||||
* 获取部门树
|
||||
* @param query 查询参数
|
||||
* @returns 部门树
|
||||
*/
|
||||
listDept(query?: DeptPageQuery) {
|
||||
return request<ApiResponse<DeptTable[]>>({
|
||||
url: `${API_PATH}/tree`,
|
||||
method: 'get',
|
||||
method: "get",
|
||||
params: query,
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取部门详情
|
||||
* @param query 部门ID
|
||||
* @returns 部门详情
|
||||
*/
|
||||
detailDept(query: number) {
|
||||
return request<ApiResponse<DeptTable>>({
|
||||
url: `${API_PATH}/detail/${query}`,
|
||||
method: 'get',
|
||||
method: "get",
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 创建部门
|
||||
* @param body 部门信息
|
||||
*/
|
||||
createDept(body: DeptForm) {
|
||||
return request({
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/create`,
|
||||
method: 'post',
|
||||
method: "post",
|
||||
data: body,
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 更新部门
|
||||
* @param id 部门ID
|
||||
* @param body 部门信息
|
||||
*/
|
||||
updateDept(id: number, body: DeptForm) {
|
||||
return request({
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/update/${id}`,
|
||||
method: 'put',
|
||||
method: "put",
|
||||
data: body,
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 删除部门
|
||||
* @param body 部门ID列表
|
||||
*/
|
||||
deleteDept(body: number[]) {
|
||||
return request({
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/delete`,
|
||||
method: 'delete',
|
||||
method: "delete",
|
||||
data: body,
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 批量设置部门状态
|
||||
* @param body 批量设置部门状态请求体
|
||||
*/
|
||||
batchDept(body: BatchType) {
|
||||
return request({
|
||||
return request<ApiResponse>({
|
||||
url: `${API_PATH}/available/setting`,
|
||||
method: 'patch',
|
||||
method: "patch",
|
||||
data: body,
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user