Merge branch 'main' into zhufu
commit
991156d71c
|
|
@ -14,6 +14,8 @@ export const chartRoutes: RouteRecordRaw = {
|
||||||
title: '工作空间',
|
title: '工作空间',
|
||||||
isRoot: true,
|
isRoot: true,
|
||||||
noKeepAlive: true,
|
noKeepAlive: true,
|
||||||
|
hideBreadcrumb: true,
|
||||||
|
hideMenu: true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,5 +13,7 @@ export const editRoutes: RouteRecordRaw = {
|
||||||
meta: {
|
meta: {
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
isRoot: true,
|
isRoot: true,
|
||||||
|
hideBreadcrumb: true,
|
||||||
|
hideMenu: true,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -13,5 +13,7 @@ export const previewRoutes: RouteRecordRaw = {
|
||||||
meta: {
|
meta: {
|
||||||
title: '预览',
|
title: '预览',
|
||||||
isRoot: true,
|
isRoot: true,
|
||||||
|
hideBreadcrumb: true,
|
||||||
|
hideMenu: true,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,8 @@ export const projectRoutes: RouteRecordRaw = {
|
||||||
meta: {
|
meta: {
|
||||||
title: '项目',
|
title: '项目',
|
||||||
isRoot: true,
|
isRoot: true,
|
||||||
|
hideBreadcrumb: true,
|
||||||
|
hideMenu: true,
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,14 @@ Object.keys(modules).forEach((key) => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
export const asyncRoutes = [PAGE_NOT_FOUND_ROUTE, ...routeModuleList];
|
export const asyncRoutes = [
|
||||||
|
PAGE_NOT_FOUND_ROUTE,
|
||||||
|
...routeModuleList,
|
||||||
|
projectRoutes,
|
||||||
|
chartRoutes,
|
||||||
|
previewRoutes,
|
||||||
|
editRoutes,
|
||||||
|
];
|
||||||
|
|
||||||
// 根路由
|
// 根路由
|
||||||
export const RootRoute: AppRouteRecordRaw = {
|
export const RootRoute: AppRouteRecordRaw = {
|
||||||
|
|
@ -31,7 +38,7 @@ export const RootRoute: AppRouteRecordRaw = {
|
||||||
meta: {
|
meta: {
|
||||||
title: 'Root',
|
title: 'Root',
|
||||||
},
|
},
|
||||||
children: [projectRoutes, chartRoutes, previewRoutes, editRoutes],
|
// children: [projectRoutes, chartRoutes, previewRoutes, editRoutes],
|
||||||
};
|
};
|
||||||
|
|
||||||
export const LoginRoute: AppRouteRecordRaw = {
|
export const LoginRoute: AppRouteRecordRaw = {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<PageWrapper dense contentFullHeight fixedHeight contentClass="flex"> 首页 </PageWrapper>
|
<PageWrapper dense contentFullHeight fixedHeight contentClass="flex">
|
||||||
|
首页
|
||||||
|
<button @click="handleClick">大屏配置页</button>
|
||||||
|
</PageWrapper>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
|
import { router } from '@/router';
|
||||||
|
|
||||||
|
function handleClick() {
|
||||||
|
router.push('/project/items');
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,19 @@
|
||||||
<template>
|
<template>
|
||||||
|
<div class="layout-button">
|
||||||
|
<div @click="goHomeHandle">
|
||||||
|
<n-tooltip placement="right" trigger="hover">
|
||||||
|
<template #trigger>
|
||||||
|
<n-button ghost type="primary" size="small">
|
||||||
|
<template #icon>
|
||||||
|
<n-icon>
|
||||||
|
<home-icon />
|
||||||
|
</n-icon>
|
||||||
|
</template>
|
||||||
|
</n-button>
|
||||||
|
</template>
|
||||||
|
<span> 后台管理 </span>
|
||||||
|
</n-tooltip>
|
||||||
|
</div>
|
||||||
<div @click="clickHandle">
|
<div @click="clickHandle">
|
||||||
<n-tooltip v-if="collapsed" placement="right" trigger="hover">
|
<n-tooltip v-if="collapsed" placement="right" trigger="hover">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
|
|
@ -27,6 +42,7 @@
|
||||||
</span>
|
</span>
|
||||||
</n-button>
|
</n-button>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<CreateModal :show="modalShow" @close="closeHandle"></CreateModal>
|
<CreateModal :show="modalShow" @close="closeHandle"></CreateModal>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|
@ -35,9 +51,11 @@
|
||||||
import { CreateModal } from './components/CreateModal/index';
|
import { CreateModal } from './components/CreateModal/index';
|
||||||
import { icon } from '@/plugins';
|
import { icon } from '@/plugins';
|
||||||
import { fetchPathByName, routerTurnByPath, getUUID } from '@/utils';
|
import { fetchPathByName, routerTurnByPath, getUUID } from '@/utils';
|
||||||
import { ChartEnum } from '@/enums/pageEnum';
|
import { ChartEnum, PageEnum } from '@/enums/pageEnum';
|
||||||
import { createProjectApi } from '@/api/path';
|
import { createProjectApi } from '@/api/path';
|
||||||
|
import { router } from '@/router';
|
||||||
|
|
||||||
|
const { HomeIcon } = icon.ionicons5;
|
||||||
const { DuplicateIcon, DuplicateOutlineIcon } = icon.ionicons5;
|
const { DuplicateIcon, DuplicateOutlineIcon } = icon.ionicons5;
|
||||||
const designStore = useDesignStore();
|
const designStore = useDesignStore();
|
||||||
|
|
||||||
|
|
@ -71,4 +89,16 @@
|
||||||
const closeHandle = () => {
|
const closeHandle = () => {
|
||||||
modalShow.value = false;
|
modalShow.value = false;
|
||||||
};
|
};
|
||||||
|
const goHomeHandle = () => {
|
||||||
|
router.replace(PageEnum.BASE_HOME);
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.layout-button {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
div:first-child {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue