保存规则库 YAML 维护改造进展

This commit is contained in:
2026-04-28 22:00:00 +08:00
parent 7b86293263
commit dce5ac0c9a
96 changed files with 36801 additions and 615 deletions
+10 -1
View File
@@ -35,6 +35,7 @@ export interface RulesQueryParams {
isActive?: boolean;
keyword?: string;
area?: string; // 地区过滤
documentAttributeType?: string; // 子类型(原文档属性类型)
orderBy?: string;
orderDirection?: 'asc' | 'desc';
userRole?: string; // 用户角色
@@ -116,6 +117,8 @@ export interface Rule {
priority: string;
description: string;
isActive: boolean;
area?: string;
documentAttributeType?: string;
createdAt: string;
updatedAt: string;
}
@@ -194,6 +197,7 @@ export async function getRulesList(params: RulesQueryParams): Promise<{data: Rul
isActive,
keyword,
area,
documentAttributeType,
userRole,
token
} = params;
@@ -238,6 +242,11 @@ export async function getRulesList(params: RulesQueryParams): Promise<{data: Rul
queryParams.append('is_enabled', isActive.toString());
}
// 添加子类型过滤(原 document_attribute_type
if (documentAttributeType) {
queryParams.append('document_attribute_type', documentAttributeType);
}
// 🔑 添加地区过滤
// if (user_role === 'provincial_admin') {
// queryParams.append('area', '省级');
@@ -1276,4 +1285,4 @@ export async function getAttributeTypes(
]
};
}
}
}