| | |
| | | children?: TreeNode[]; |
| | | } |
| | | |
| | | const treeData = ref<TreeNode[]>([ |
| | | const modelTreeData = ref<TreeNode[]>([ |
| | | { |
| | | label: "模型管理", |
| | | icon: "Document", |
| | | path: "/model", |
| | | }, |
| | | { |
| | | label: "可视化仿真", |
| | | label: "型号", |
| | | icon: "FolderOpened", |
| | | children: [ |
| | | { |
| | | label: "测试仿真", |
| | | path: "/simulation-test", |
| | | icon: "FolderOpened", |
| | | children: [ |
| | | { |
| | | label: "仿真详情", |
| | | path: "/simulation-config", |
| | | icon: "Document", |
| | | label: "型号1", |
| | | path: "/model/childrenModel01", |
| | | }, |
| | | { |
| | | label: "测试报告", |
| | | path: "/simulation-result", |
| | | icon: "Document", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "实时仿真", |
| | | path: "/simulation-test", |
| | | icon: "Document", |
| | | label: "型号2", |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | label: "label", |
| | | }; |
| | | |
| | | const filteredData = ref(treeData.value); |
| | | const filteredData = ref(modelTreeData.value); |
| | | |
| | | const filterNode = (value: string, data: TreeNode) => { |
| | | if (!value) return true; |
| | |
| | | } |
| | | }; |
| | | |
| | | |
| | | watch( |
| | | () => props.menuItem, |
| | | (value) => { |
| | | console.log(value,'tree'); |
| | | if (value == "/" || value == "/model") { |
| | | filteredData.value = modelTreeData.value; |
| | | } else { |
| | | filteredData.value = [] |
| | | } |
| | | } |
| | | ); |
| | | </script> |
| | |
| | | { |
| | | path: '/model', |
| | | name: 'model', |
| | | component: () => import('../views/model/index.vue') |
| | | }, |
| | | redirect: '/model/childrenModel01', |
| | | component: () => import('../views/model/index.vue'), |
| | | children: [ |
| | | { |
| | | path: '/kinematic', |
| | | name: 'kinematic', |
| | | component: () => import('../views/model/index.vue') |
| | | path: '/model/childrenModel01', |
| | | name: 'childrenModel01', |
| | | component: () => import('../views/model/children/childrenModel01.vue') |
| | | }, |
| | | ] |
| | | }, |
| | | |
| | | { |
| | | path: '/simulation-config', |
| | | name: 'simulationConfig', |
New file |
| | |
| | | <template> |
| | | <div class="kinematic"> |
| | | <h2>着陆器模型库</h2> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | .kinematic { |
| | | padding: 20px; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="kinematic"> |
| | | <h2>运动学模型</h2> |
| | | <RouterView /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | .kinematic { |
| | | padding: 20px; |
| | | } |
| | | </style> |