refactor(权限管理): 统一详情权限标识从query改为detail

- 删除租户和客户管理相关模块代码
- 更新多个视图文件的权限标识
- 修改全局响应类型添加success字段
- 优化基础模型字段索引配置
This commit is contained in:
zhangtao
2025-12-25 01:30:44 +08:00
parent 97c35b0780
commit c7798e5eeb
33 changed files with 36 additions and 3894 deletions
-101
View File
@@ -1,101 +0,0 @@
import request from "@/utils/request";
const API_PATH = "/system/customer";
const CustomerAPI = {
listCustomer(query: CustomerPageQuery) {
return request<ApiResponse<PageResult<CustomerTable[]>>>({
url: `${API_PATH}/list`,
method: "get",
params: query,
});
},
detailCustomer(query: number) {
return request<ApiResponse<CustomerTable>>({
url: `${API_PATH}/detail/${query}`,
method: "get",
});
},
createCustomer(body: CustomerForm) {
return request<ApiResponse>({
url: `${API_PATH}/create`,
method: "post",
data: body,
});
},
updateCustomer(id: number, body: CustomerForm) {
return request<ApiResponse>({
url: `${API_PATH}/update/${id}`,
method: "put",
data: body,
});
},
deleteCustomer(body: number[]) {
return request<ApiResponse>({
url: `${API_PATH}/delete`,
method: "delete",
data: body,
});
},
batchCustomer(body: BatchType) {
return request<ApiResponse>({
url: `${API_PATH}/available/setting`,
method: "patch",
data: body,
});
},
exportCustomer(body: CustomerPageQuery) {
return request<Blob>({
url: `${API_PATH}/export`,
method: "post",
data: body,
responseType: "blob",
});
},
downloadCustomer() {
return request<ApiResponse>({
url: `${API_PATH}/download/template`,
method: "post",
responseType: "blob",
});
},
importCustomer(body: FormData) {
return request<ApiResponse>({
url: `${API_PATH}/import`,
method: "post",
data: body,
headers: {
"Content-Type": "multipart/form-data",
},
});
},
};
export default CustomerAPI;
export interface CustomerPageQuery extends PageQuery {
name?: string;
status?: string;
created_time?: string[];
}
export interface CustomerTable extends BaseType {
name?: string;
code?: string;
created_by?: CommonType;
updated_by?: CommonType;
tenant?: CommonType;
}
export interface CustomerForm extends BaseFormType {
name?: string;
code?: string;
}
-102
View File
@@ -1,102 +0,0 @@
import request from "@/utils/request";
const API_PATH = "/system/tenant";
const TenantAPI = {
listTenant(query: TenantPageQuery) {
return request<ApiResponse<PageResult<TenantTable[]>>>({
url: `${API_PATH}/list`,
method: "get",
params: query,
});
},
detailTenant(query: number) {
return request<ApiResponse<TenantTable>>({
url: `${API_PATH}/detail/${query}`,
method: "get",
});
},
createTenant(body: TenantForm) {
return request<ApiResponse>({
url: `${API_PATH}/create`,
method: "post",
data: body,
});
},
updateTenant(id: number, body: TenantForm) {
return request<ApiResponse>({
url: `${API_PATH}/update/${id}`,
method: "put",
data: body,
});
},
deleteTenant(body: number[]) {
return request<ApiResponse>({
url: `${API_PATH}/delete`,
method: "delete",
data: body,
});
},
batchTenant(body: BatchType) {
return request<ApiResponse>({
url: `${API_PATH}/available/setting`,
method: "patch",
data: body,
});
},
exportTenant(body: TenantPageQuery) {
return request<Blob>({
url: `${API_PATH}/export`,
method: "post",
data: body,
responseType: "blob",
});
},
downloadTenant() {
return request<ApiResponse>({
url: `${API_PATH}/download/template`,
method: "post",
responseType: "blob",
});
},
importTenant(body: FormData) {
return request<ApiResponse>({
url: `${API_PATH}/import`,
method: "post",
data: body,
headers: {
"Content-Type": "multipart/form-data",
},
});
},
};
export default TenantAPI;
export interface TenantPageQuery extends PageQuery {
name?: string;
status?: string;
created_time?: string[];
}
export interface TenantTable extends BaseType {
name?: string;
code?: string;
start_time?: string;
end_time?: string;
}
export interface TenantForm extends BaseFormType {
name?: string;
code?: string;
start_time?: string;
end_time?: string;
}