refactor: 移除多租户和客户相关代码及功能

refactor: 统一状态字段为字符串类型并更新相关组件
refactor: 更新模型基类移除租户和客户相关字段
refactor: 简化数据权限控制逻辑
refactor: 优化类型注解使用Python 3.10+语法
refactor: 清理无用导入和注释
docs: 更新文档移除多租户相关内容
This commit is contained in:
zhangtao
2025-12-01 00:36:05 +08:00
parent 463e2fca23
commit 3c12fa56eb
173 changed files with 3143 additions and 7672 deletions
+3 -5
View File
@@ -125,7 +125,9 @@ export interface JobPageQuery extends PageQuery {
name?: string;
status?: string;
created_id?: number;
updated_id?: number;
created_time?: string[];
updated_time?: string[];
}
export interface JobLogPageQuery extends PageQuery {
@@ -133,6 +135,7 @@ export interface JobLogPageQuery extends PageQuery {
job_name?: string;
status?: string;
created_time?: string[];
updated_time?: string[];
}
export interface JobOptionData {
@@ -155,8 +158,6 @@ export interface JobTable extends BaseType {
end_date?: string;
created_by?: creatorType;
updated_by?: updatorType;
tenant?: CommonType;
customer?: CommonType;
}
export interface JobForm extends BaseFormType {
@@ -187,7 +188,6 @@ export interface JobRunLog extends BaseType {
coalesce: boolean;
max_instances: number;
next_run_time: string;
tenant?: CommonType;
}
// 定时任务日志详情接口(对应数据库日志表)
@@ -201,7 +201,6 @@ export interface JobLogDetail extends BaseType {
job_trigger?: string;
job_message?: string;
exception_info?: string;
tenant?: CommonType;
}
// 定时任务日志列表接口(对应数据库日志表)
@@ -215,5 +214,4 @@ export interface JobLogTable extends BaseType {
job_trigger?: string;
job_message?: string;
exception_info?: string;
tenant?: CommonType;
}
+2 -2
View File
@@ -86,6 +86,8 @@ export interface ApplicationPageQuery extends PageQuery {
status?: string;
created_id?: number;
created_time?: string[];
updated_id?: number;
updated_time?: string[];
}
/**
@@ -97,8 +99,6 @@ export interface ApplicationInfo extends BaseType {
icon_url?: string;
created_by?: creatorType;
updated_by?: updatorType;
tenant?: CommonType;
customer?: CommonType;
}
/**
+2 -6
View File
@@ -82,22 +82,18 @@ const DemoAPI = {
export default DemoAPI;
export interface DemoPageQuery extends PageQuery {
/** 示例标题 */
name?: string;
/** 示例状态 */
status?: string;
/** 创建时间 */
created_time?: string[];
// 创建人ID
updated_time?: string[];
created_id?: number;
updated_id?: number;
}
export interface DemoTable extends BaseType {
name?: string;
created_by?: creatorType;
updated_by?: updatorType;
tenant?: CommonType;
customer?: CommonType;
}
export interface DemoForm extends BaseFormType {
+6 -10
View File
@@ -137,9 +137,7 @@ export interface GenTablePageQuery extends PageQuery {
}
/** 代码生成业务表模型 */
export interface GenTableSchema {
/** 主键 */
id?: number;
export interface GenTableSchema extends BaseType {
/** 表名称 */
table_name?: string;
/** 表描述 */
@@ -160,8 +158,6 @@ export interface GenTableSchema {
function_name?: string;
/** 所属父级分类 */
parent_menu_id?: number;
/** 表描述 */
description?: string;
/** 表列信息 */
columns: GenTableColumnSchema[];
/** 主键信息 */
@@ -170,12 +166,12 @@ export interface GenTableSchema {
sub_table?: GenTableSchema;
/** 是否为子表 */
sub?: boolean;
created_by?: creatorType;
updated_by?: updatorType;
}
/** 代码生成业务表列模型 */
export interface GenTableColumnSchema {
/** 主键 */
id?: number;
export interface GenTableColumnSchema extends BaseType {
/** 归属表编号 */
table_id?: number;
/** 列名称 */
@@ -216,6 +212,6 @@ export interface GenTableColumnSchema {
dict_type?: string;
/** 排序 */
sort?: number;
/** 功能描述 */
description?: string;
created_by?: creatorType;
updated_by?: updatorType;
}
-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?: creatorType;
updated_by?: updatorType;
tenant?: CommonType;
}
export interface CustomerForm extends BaseFormType {
name?: string;
code?: string;
}
-3
View File
@@ -69,9 +69,6 @@ export interface DeptTable extends BaseType {
parent_id?: number;
parent_name?: string;
children?: DeptTable[];
created_by?: creatorType;
updated_by?: updatorType;
tenant?: CommonType;
}
export interface DeptForm extends BaseFormType {
+2 -4
View File
@@ -133,14 +133,11 @@ const DictAPI = {
export default DictAPI;
export interface DictPageQuery extends PageQuery {
/** 通知标题 */
dict_name?: string;
/** 通知类型 */
dict_type?: string;
/** 通知状态 */
status?: string;
/** 创建时间 */
created_time?: string[];
updated_time?: string[];
}
export interface DictDataPageQuery extends PageQuery {
@@ -149,6 +146,7 @@ export interface DictDataPageQuery extends PageQuery {
dict_type_id?: number;
status?: string;
created_time?: string[];
updated_time?: string[];
}
export interface DictTable extends BaseType {
+2 -2
View File
@@ -43,7 +43,9 @@ export interface LogPageQuery extends PageQuery {
request_path?: string;
creator_name?: string;
created_time?: string[];
updated_time?: string[];
created_id?: number;
updated_id?: number;
}
export interface LogTable extends BaseType {
@@ -60,6 +62,4 @@ export interface LogTable extends BaseType {
process_time?: string;
created_by?: creatorType;
updated_by?: updatorType;
tenant?: CommonType;
customer?: CommonType;
}
+1 -1
View File
@@ -56,8 +56,8 @@ export default MenuAPI;
export interface MenuPageQuery {
name?: string;
status?: string;
/** 创建时间 */
created_time?: string[];
updated_time?: string[];
}
export interface MenuTable extends BaseType {
+2 -2
View File
@@ -74,7 +74,9 @@ export interface NoticePageQuery extends PageQuery {
notice_type?: string;
status?: string;
created_time?: string[];
updated_time?: string[];
created_id?: number;
updated_id?: number;
}
export interface NoticeTable extends BaseType {
@@ -83,8 +85,6 @@ export interface NoticeTable extends BaseType {
notice_content?: string;
created_by?: creatorType;
updated_by?: updatorType;
tenant?: CommonType;
customer?: CommonType;
}
export interface NoticeForm extends BaseFormType {
+1 -4
View File
@@ -71,14 +71,11 @@ const ParamsAPI = {
export default ParamsAPI;
export interface ConfigPageQuery extends PageQuery {
/** 配置名称 */
config_name?: string;
/** 配置键 */
config_key?: string;
/** 配置类型 */
config_type?: boolean;
/** 创建时间 */
created_time?: string[];
updated_time?: string[];
}
export interface ConfigTable extends BaseType {
+1 -1
View File
@@ -67,6 +67,7 @@ export interface PositionPageQuery extends PageQuery {
status?: string;
created_id?: number;
created_time?: string[];
updated_time?: string[];
}
export interface PositionTable extends BaseType {
@@ -74,7 +75,6 @@ export interface PositionTable extends BaseType {
order?: number;
created_by?: creatorType;
updated_by?: updatorType;
tenant?: CommonType;
}
export interface PositionForm extends BaseFormType {
+4 -2
View File
@@ -74,10 +74,13 @@ export interface TablePageQuery extends PageQuery {
name?: string;
status?: string;
created_id?: number;
updated_id?: number;
created_time?: string[];
updated_time?: string[];
}
export interface RoleTable extends BaseType {
id: number;
name: string;
order?: number;
code?: string;
@@ -86,7 +89,6 @@ export interface RoleTable extends BaseType {
depts?: permissionDeptType[];
created_by?: creatorType;
updated_by?: updatorType;
tenant?: CommonType;
}
export interface RoleForm extends BaseFormType {
@@ -115,7 +117,7 @@ export interface permissionMenuType {
type: number;
permission: string;
parent_id?: number;
status: boolean;
status: string;
description?: string;
children?: permissionMenuType[];
}
-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;
}
+1 -8
View File
@@ -146,14 +146,8 @@ export interface ForgetPasswordForm {
}
export interface RegisterForm {
name: string;
mobile?: string;
username: string;
password: string;
role_ids?: number[];
customer_id?: number;
description?: string;
user_type?: string;
confirmPassword: string;
}
@@ -166,6 +160,7 @@ export interface UserPageQuery extends PageQuery {
status?: string;
created_time?: string[];
created_id?: number;
updated_id?: number;
}
export interface searchSelectDataType {
@@ -195,8 +190,6 @@ export interface UserInfo extends BaseType {
last_login?: string;
created_by?: creatorType;
updated_by?: updatorType;
tenant?: CommonType;
customer?: CommonType;
}
export interface deptTreeType {