Initial commit
This commit is contained in:
44
src/constants/structures.js
Normal file
44
src/constants/structures.js
Normal file
@@ -0,0 +1,44 @@
|
||||
export const structures = [
|
||||
{ id: "S-001", name: "主桥-0#墩" },
|
||||
{ id: "S-002", name: "主桥-1#墩" },
|
||||
{ id: "S-003", name: "主桥-2#墩" },
|
||||
{ id: "S-004", name: "引桥-桩基" },
|
||||
{ id: "S-005", name: "引桥-承台" },
|
||||
{ id: "S-006", name: "引桥-盖梁" },
|
||||
{ id: "S-007", name: "路基-填筑" },
|
||||
{ id: "S-008", name: "路面-基层" },
|
||||
{ id: "S-009", name: "路面-面层" },
|
||||
];
|
||||
|
||||
export const elementTree = [
|
||||
{
|
||||
id: "E-G-bridge",
|
||||
name: "桥梁工程",
|
||||
children: [
|
||||
{
|
||||
id: "E-G-main-bridge",
|
||||
name: "主桥",
|
||||
children: ["S-001", "S-002", "S-003"].map((id) => ({
|
||||
id,
|
||||
name: structures.find((s) => s.id === id)?.name || id,
|
||||
})),
|
||||
},
|
||||
{
|
||||
id: "E-G-approach",
|
||||
name: "引桥",
|
||||
children: ["S-004", "S-005", "S-006"].map((id) => ({
|
||||
id,
|
||||
name: structures.find((s) => s.id === id)?.name || id,
|
||||
})),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "E-G-road",
|
||||
name: "道路工程",
|
||||
children: ["S-007", "S-008", "S-009"].map((id) => ({
|
||||
id,
|
||||
name: structures.find((s) => s.id === id)?.name || id,
|
||||
})),
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user