1.添加移动端用户的检测工具类,移动端用户只能访问对话页面。

2.评查点列表添加文档属性类型字段。
3.优化dify的对话侧边栏的显示效果。
4.评查点规则添加使用文档属性类型的输入框。添加多实体开关的操作开关。
This commit is contained in:
2025-12-30 18:35:48 +08:00
parent d2aba899cc
commit 66d2f7cef4
18 changed files with 552 additions and 56 deletions
+19 -9
View File
@@ -67,6 +67,7 @@ interface ApiRule {
description: string;
isActive: boolean;
area?: string; // 地区
documentAttributeType?: string; // 文档属性类型
createdAt: string;
updatedAt: string;
}
@@ -98,6 +99,7 @@ function mapApiRuleToModel(apiRule: ApiRule): Rule {
prompt: apiRule.description, // 使用描述作为默认prompt
isActive: apiRule.isActive,
area: apiRule.area || '', // 地区
documentAttributeType: apiRule.documentAttributeType || '', // 文档属性类型
createdAt: apiRule.createdAt,
updatedAt: apiRule.updatedAt
};
@@ -667,7 +669,7 @@ export default function RulesIndex() {
),
key: "selection",
align: "center" as const,
width: "50px",
width: "3%",
render: (_: unknown, record: Rule) => (
<input
type="checkbox"
@@ -682,7 +684,7 @@ export default function RulesIndex() {
dataIndex: "code" as keyof Rule,
key: "code",
align: "left" as const,
width: "15%",
width: "9%",
className: "whitespace-normal break-all",
render: (value: string) => (
<div className="whitespace-normal break-all overflow-visible">{value}</div>
@@ -693,13 +695,13 @@ export default function RulesIndex() {
dataIndex: "name" as keyof Rule,
key: "name",
align: "left" as const,
width: "15%"
width: "12%"
},
{
title: "评查点类型",
key: "ruleType",
align: "left" as const,
width: "10%",
width: "8%",
render: (_: unknown, record: Rule) => {
const typeColor = RULE_TYPE_COLORS[record.ruleType] as TagColor;
return (
@@ -714,13 +716,21 @@ export default function RulesIndex() {
dataIndex: "groupName" as keyof Rule,
key: "groupName",
align: "left" as const,
width: "10%"
width: "8%"
},
{
title: "地区",
dataIndex: "area" as keyof Rule,
key: "area",
align: "left" as const,
width: "5%",
render: (value: string) => value || '-'
},
{
title: "属性类型",
dataIndex: "documentAttributeType" as keyof Rule,
key: "documentAttributeType",
align: "left" as const,
width: "6%",
render: (value: string) => value || '-'
},
@@ -728,7 +738,7 @@ export default function RulesIndex() {
title: "优先级",
key: "priority",
align: "left" as const,
width: "6%",
width: "5%",
render: (_: unknown, record: Rule) => {
const priorityColor = RULE_PRIORITY_COLORS[record.priority] as TagColor;
return (
@@ -742,7 +752,7 @@ export default function RulesIndex() {
title: "状态",
key: "isActive",
align: "left" as const,
width: "6%",
width: "5%",
render: (_: unknown, record: Rule) => (
<StatusDot status={record.isActive} text={record.isActive ? "启用" : "禁用"} />
)
@@ -752,13 +762,13 @@ export default function RulesIndex() {
dataIndex: "createdAt" as keyof Rule,
key: "createdAt",
align: "left" as const,
width: "10%"
width: "9%"
},
{
title: "操作",
key: "operation",
align: "left" as const,
width: "150px",
width: "14%",
render: (_: unknown, record: Rule) => (
<div className="operations-cell">
{/* ✅ 查看/编辑和复制按钮 - 需要查看权限 */}