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
+19 -10
View File
@@ -1,22 +1,31 @@
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: "documents", content: "文档列表,新增,修改" }
]
}
return [
{ title: "文档列表 - 中国烟草AI合同及卷宗审核系统" },
{ name: "documents", content: "文档列表,新增,修改" }
];
};
export const handle = {
breadcrumb: "文档列表"
breadcrumb: "文档列表"
};
export async function loader({ request }: LoaderFunctionArgs) {
const url = new URL(request.url);
if (url.pathname === '/documents') {
const query = url.searchParams.toString();
throw redirect(query ? `/documents/list?${query}` : '/documents/list');
}
return null;
}
/**
* 文档列表路由布局
*/
export default function DocumentsLayout() {
return (
<Outlet />
)
return <Outlet />;
}