Files
leaudit-platform-frontend/app/models/rule.ts
T
LiangShiyong d4000cd292 fix: 1. 继续对齐交叉评查的接口,完善创建交叉评查的逻辑 和 相关组件的渲染布局。
2. 文档的基本信息修改改用接口。      3. 重新完善角色权限管理的页面逻辑。     4.将评查点列表中的返回逻辑改用浏览器的记忆返回。
2025-12-12 12:00:36 +08:00

62 lines
1.5 KiB
TypeScript

/**
* 评查点数据模型
*/
export type RuleType = 'essential' | 'content' | 'format' | 'legal' | 'business';
export type RulePriority = 'high' | 'medium' | 'low';
export interface Rule {
id: string;
code: string;
name: string;
ruleGroupId: string;
groupName?: string; // 关联查询名称
ruleType: RuleType;
priority: RulePriority;
description: string;
checkMethod: 'automatic' | 'manual' | 'mixed';
prompt: string;
isActive: boolean;
area?: string; // 地区
createdAt: string;
updatedAt: string;
}
export interface RuleGroup {
id: string; // 分组ID
name: string; // 分组名称
code: string; // 分组编码
description: string; // 分组描述
status: 'active' | 'inactive'; // 分组状态
sortOrder: number; // 排序顺序
createdAt: string; // 创建时间
updatedAt: string; // 更新时间
}
export const RULE_TYPE_LABELS: Record<RuleType, string> = {
essential: '基本要素类',
content: '内容合规类',
format: '格式规范类',
legal: '法律风险类',
business: '业务专项类'
};
export const RULE_TYPE_COLORS: Record<RuleType, string> = {
essential: 'blue',
content: 'purple',
format: 'green',
legal: 'cyan',
business: 'orange'
};
export const RULE_PRIORITY_LABELS: Record<RulePriority, string> = {
high: '高',
medium: '中',
low: '低'
};
export const RULE_PRIORITY_COLORS: Record<RulePriority, string> = {
high: 'red',
medium: 'orange',
low: 'green'
};