feat: 优化web

This commit is contained in:
2026-04-23 18:58:13 +08:00
commit 544a2f3428
160 changed files with 27327 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
'use client';
import { DeptTreeView } from '@/components/iam/DeptTreeView';
import { IamSectionCard } from '@/components/iam/IamSectionCard';
import { useApi } from '@/lib/hooks/use-api';
import { iamDept } from '@/lib/api/iam';
import type { DeptNode } from '@/lib/api/types/dept';
export default function IamDeptPage() {
const { data, loading, error } = useApi<DeptNode[]>(() => iamDept.tree());
return (
<IamSectionCard title="部门管理" description="对接 GET /api/v1/iam/dept/tree。">
{loading ? <p className="text-sm text-neutral-500"></p> : null}
{error ? <p className="text-sm text-red-600">{error}</p> : null}
{!loading && !error && data ? <DeptTreeView tree={data} /> : null}
</IamSectionCard>
);
}