| | |
| | | import { getRoot } from '/@/root' |
| | | import * as icons from '@ant-design/icons-vue' |
| | | import { ERouterName } from '/@/types' |
| | | |
| | | import { testUnBind } from '/@/api/manage' |
| | | import { useMyStore } from '/@/store' |
| | | interface IOptions { |
| | | key: number |
| | | label: string |
| | |
| | | { key: 4, label: '航线库', path: '/' + ERouterName.WAYLINE, icon: 'NodeIndexOutlined' }, |
| | | { key: 5, label: '计划库', path: '/' + ERouterName.TASK, icon: 'CalendarOutlined' } |
| | | ] |
| | | |
| | | const store = useMyStore() |
| | | function selectedRoute (item: IOptions) { |
| | | const path = typeof item.path === 'string' ? item.path : item.path.path |
| | | return root.$route.path?.indexOf(path) === 0 |
| | | } |
| | | |
| | | function goBack () { |
| | | const snList = computed(() => store.state.common.snList) |
| | | async function goBack () { |
| | | snList.value.forEach(async (v: string) => { |
| | | await testUnBind(v) |
| | | }) |
| | | root.$router.push('/' + ERouterName.PROJECT_LIST) |
| | | } |
| | | |
| | | return { |
| | | options, |
| | | selectedRoute, |