feat: align frontend document and rule management flows

This commit is contained in:
wren
2026-05-06 09:40:37 +08:00
parent 8a5044b024
commit c54f84382b
41 changed files with 4239 additions and 2903 deletions
+16 -6
View File
@@ -1,13 +1,12 @@
import { Outlet } from "@remix-run/react";
import { type MetaFunction } from "@remix-run/node";
import { redirect, type LoaderFunctionArgs, type MetaFunction } from "@remix-run/node";
export const meta: MetaFunction = () => {
return [
{ title: "评查规则管理 - 中国烟草AI合同及卷宗审核系统" },
{
name: "rules",
content: "评查规则管理模块,包括评查点列表、创建和编辑功能"
{
name: "rules",
content: "评查规则管理模块,包括评查点列表、创建和编辑功能"
}
];
};
@@ -17,9 +16,20 @@ export const handle = {
to: "/rulesTest/list" // 新版规则维护入口;旧版可从新版页面内返回
};
export async function loader({ request }: LoaderFunctionArgs) {
const url = new URL(request.url);
if (url.pathname === '/rules') {
const query = url.searchParams.toString();
throw redirect(query ? `/rulesTest/list?${query}` : '/rulesTest/list');
}
return null;
}
/**
* 规则管理路由布局
*/
export default function RulesLayout() {
export default function RulesLayout() {
return <Outlet />;
}