| | |
| | | </router-link> |
| | | </div> |
| | | <div class="mb20 flex-display flex-column flex-align-center flex-justify-between"> |
| | | <a-tooltip title="Back to home" placement="right"> |
| | | <a @click="goHome"> <Icon icon="ImportOutlined" style="font-size: 22px; color: white"/></a> |
| | | <a-tooltip title="返回项目列表" placement="right"> |
| | | <a @click="goBack"> <Icon icon="ImportOutlined" style="font-size: 22px; color: white"/></a> |
| | | </a-tooltip> |
| | | </div> |
| | | </div> |
| | |
| | | import { getRoot } from '/@/root' |
| | | import * as icons from '@ant-design/icons-vue' |
| | | import { ERouterName } from '/@/types' |
| | | |
| | | import { UnBind } from '/@/api/manage' |
| | | import { useMyStore } from '/@/store' |
| | | interface IOptions { |
| | | key: number |
| | | label: string |
| | |
| | | setup () { |
| | | const root = getRoot() |
| | | const options = [ |
| | | { key: 0, label: 'Tsa', path: '/' + ERouterName.TSA, icon: 'TeamOutlined' }, |
| | | { key: 1, label: 'Livestream', path: '/' + ERouterName.LIVESTREAM, icon: 'VideoCameraOutlined' }, |
| | | { key: 2, label: 'Annotations', path: '/' + ERouterName.LAYER, icon: 'EnvironmentOutlined' }, |
| | | { key: 3, label: 'Media Files', path: '/' + ERouterName.MEDIA, icon: 'PictureOutlined' }, |
| | | { key: 4, label: 'Flight Route Library', path: '/' + ERouterName.WAYLINE, icon: 'NodeIndexOutlined' }, |
| | | { key: 5, label: 'Task Plan Library', path: '/' + ERouterName.TASK, icon: 'CalendarOutlined' } |
| | | { key: 0, label: '团队', path: '/' + ERouterName.TSA, icon: 'TeamOutlined' }, |
| | | // { key: 1, label: '直播', path: '/' + ERouterName.LIVESTREAM, icon: 'VideoCameraOutlined' }, |
| | | { key: 2, label: '标注', path: '/' + ERouterName.LAYER, icon: 'EnvironmentOutlined' }, |
| | | { key: 3, label: '媒体库', path: '/' + ERouterName.MEDIA, icon: 'PictureOutlined' }, |
| | | { key: 4, label: '航线库', path: '/' + ERouterName.WAYLINE, icon: 'NodeIndexOutlined' }, |
| | | { key: 5, label: '计划库', path: '/' + ERouterName.TASK, icon: 'CalendarOutlined' }, |
| | | { key: 6, label: '设备', path: '/' + ERouterName.IMPLEMENT, icon: 'ClusterOutlined' } |
| | | ] |
| | | |
| | | 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 goHome () { |
| | | root.$router.push('/' + ERouterName.MEMBERS) |
| | | const osdVisible = computed(() => { |
| | | return store.state.osdVisible |
| | | }) |
| | | const snList = computed(() => store.state.common.snList) |
| | | async function goBack () { |
| | | const query = toRefs(osdVisible.value) |
| | | snList.value.forEach(async (v: string) => { |
| | | await UnBind(v) |
| | | }) |
| | | store.commit('SET_OSD_VISIBLE_INFO', { ...query, visible: false }) |
| | | store.commit('SET_SELECT_WAYLINE_INFO', {}) |
| | | store.commit('SET_SELECT_DOCK_INFO', {}) |
| | | root.$router.push('/' + ERouterName.PROJECT_LIST) |
| | | } |
| | | |
| | | return { |
| | | options, |
| | | selectedRoute, |
| | | goHome, |
| | | goBack, |
| | | } |
| | | } |
| | | }) |