diff --git a/apps/web/src/components/models/department/department-children-select.tsx b/apps/web/src/components/models/department/department-children-select.tsx
new file mode 100644
index 0000000..abe6975
--- /dev/null
+++ b/apps/web/src/components/models/department/department-children-select.tsx
@@ -0,0 +1,26 @@
+import { useAuth } from "@web/src/providers/auth-provider"
+import { api } from "@nice/client"
+import { Select } from "antd"
+import { Department } from "packages/common/dist"
+
+export default function DepartmentChildrenSelect() {
+ const { user, isAuthenticated } = useAuth()
+
+ const { data: depts, isLoading: deptsLoading }
+ : { data: Department[], isLoading: boolean }
+ = isAuthenticated ? api.department.getChildSimpleTree.useQuery({
+ rootId: user.deptId
+ }) : { data: null, isLoading: false }
+
+ const deptSelectOptions = depts?.map((dept) => ({
+ label: dept.name,
+ value: dept.id
+ }))
+ return (
+
+ )
+}
\ No newline at end of file
diff --git a/apps/web/src/components/models/trainContent/train-content-tree-select.tsx b/apps/web/src/components/models/trainContent/train-content-tree-select.tsx
new file mode 100644
index 0000000..7e0e9d1
--- /dev/null
+++ b/apps/web/src/components/models/trainContent/train-content-tree-select.tsx
@@ -0,0 +1,54 @@
+import { api } from "@nice/client"
+import { TrainContent } from "@nice/common"
+import { useAuth } from "@web/src/providers/auth-provider"
+import { TreeSelect } from "antd"
+import { useMemo } from "react"
+
+export default function TrainContentTreeSelect() {
+ const { user, isAuthenticated } = useAuth()
+ const { data: trainContents, isLoading: trainContentsLoading }
+ : { data: TrainContent[], isLoading: boolean }
+ = isAuthenticated ? api.trainContent.findMany.useQuery({
+ select: {
+ children: true,
+ id: true,
+ title: true,
+ parentId: true,
+ type: true,
+ parent: {
+ select: {
+ id: true,
+ title: true
+ }
+ }
+ }
+ }) : { data: null, isLoading: false }
+ const treeData = useMemo(() => {
+ if (!trainContents) return [];
+
+ const buildTreeData = (contents: any[], parentId: string | null = null): any[] => {
+ return contents
+ .filter(item => item.parentId === parentId)
+ .map(item => ({
+ title: item.title,
+ value: item.id,
+ key: item.id,
+ type: item.type,
+ children: buildTreeData(contents, item.id)
+ }))
+ .filter(Boolean);
+ };
+
+ return buildTreeData(trainContents);
+ }, [trainContents]);
+ return (
+