新建存储
This commit is contained in:
parent
4330584af3
commit
ddcff69920
@ -59,7 +59,7 @@ interface MenuItem {
|
|||||||
const menuItems: MenuItem[] = [
|
const menuItems: MenuItem[] = [
|
||||||
{ path: '/controlPanel/overview', name: '总览', icon: HomeOutlined },
|
{ path: '/controlPanel/overview', name: '总览', icon: HomeOutlined },
|
||||||
{ path: '/controlPanel/container', name: '容器实例', icon: ConsoleSqlOutlined },
|
{ path: '/controlPanel/container', name: '容器实例', icon: ConsoleSqlOutlined },
|
||||||
// { path: '/controlPanel/fileStore', name: '文件存储', icon: FolderOpenOutlined },
|
{ path: '/controlPanel/fileStore', name: '文件存储', icon: FolderOpenOutlined },
|
||||||
{ path: '/controlPanel/image', name: '镜像', icon: GlobalOutlined },
|
{ path: '/controlPanel/image', name: '镜像', icon: GlobalOutlined },
|
||||||
{ path: '/controlPanel/publicData', name: '公开数据', icon: LaptopOutlined },
|
{ path: '/controlPanel/publicData', name: '公开数据', icon: LaptopOutlined },
|
||||||
{
|
{
|
||||||
|
|||||||
@ -249,6 +249,12 @@ const routes: RouteRecordRaw[] = [
|
|||||||
name: "Image",
|
name: "Image",
|
||||||
component: () => import("@/views/admin/image/index.vue"),
|
component: () => import("@/views/admin/image/index.vue"),
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
path: "fileStore",
|
||||||
|
name: "fileStore",
|
||||||
|
component: () => import("@/views/admin/fileStore/index.vue"),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: "contract",
|
path: "contract",
|
||||||
name: "contract",
|
name: "contract",
|
||||||
@ -377,7 +383,7 @@ const router = createRouter({
|
|||||||
// ====== 添加全局前置守卫 ======
|
// ====== 添加全局前置守卫 ======
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
console.log("Navigating to:", to.path);
|
console.log("Navigating to:", to.path);
|
||||||
const list = ["/layout/home","/document/introdution"];
|
const list = ["/layout/home", "/document/introdution"];
|
||||||
if (list.indexOf(to.path) != -1) {
|
if (list.indexOf(to.path) != -1) {
|
||||||
next();
|
next();
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -23,15 +23,16 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { h, reactive, computed,watch } from 'vue';
|
import { h, reactive, computed } from 'vue';
|
||||||
import { useRouter,useRoute } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import {
|
import {
|
||||||
HomeOutlined,
|
HomeOutlined,
|
||||||
ConsoleSqlOutlined,
|
ConsoleSqlOutlined,
|
||||||
GlobalOutlined,
|
GlobalOutlined,
|
||||||
MoneyCollectOutlined,
|
MoneyCollectOutlined,
|
||||||
TeamOutlined,
|
TeamOutlined,
|
||||||
AppstoreAddOutlined
|
AppstoreAddOutlined,
|
||||||
|
InboxOutlined,
|
||||||
} from '@ant-design/icons-vue';
|
} from '@ant-design/icons-vue';
|
||||||
import type { MenuMode, MenuTheme } from 'ant-design-vue';
|
import type { MenuMode, MenuTheme } from 'ant-design-vue';
|
||||||
|
|
||||||
@ -39,9 +40,7 @@ import type { MenuMode, MenuTheme } from 'ant-design-vue';
|
|||||||
import type { MenuProps } from 'ant-design-vue';
|
import type { MenuProps } from 'ant-design-vue';
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
watch(() => router.currentRoute.value.path, (newPath) => {
|
|
||||||
state.selectedKeys = [newPath];
|
|
||||||
});
|
|
||||||
// 定义菜单原始数据
|
// 定义菜单原始数据
|
||||||
interface MenuItem {
|
interface MenuItem {
|
||||||
path: string;
|
path: string;
|
||||||
@ -56,9 +55,10 @@ const menuItems: MenuItem[] = [
|
|||||||
{ path: '/layout/admin/home', name: '总览', icon: HomeOutlined, visible: true },
|
{ path: '/layout/admin/home', name: '总览', icon: HomeOutlined, visible: true },
|
||||||
{ path: '/layout/admin/instance', name: '容器实例', icon: ConsoleSqlOutlined, visible: true },
|
{ path: '/layout/admin/instance', name: '容器实例', icon: ConsoleSqlOutlined, visible: true },
|
||||||
{ path: '/layout/admin/image', name: '镜像', icon: GlobalOutlined, visible: true },
|
{ path: '/layout/admin/image', name: '镜像', icon: GlobalOutlined, visible: true },
|
||||||
|
{ path: '/layout/admin/fileStore', name: '文件存储', icon: InboxOutlined, visible: true },
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
name: '费用中心',
|
name: '费用',
|
||||||
icon: MoneyCollectOutlined,
|
icon: MoneyCollectOutlined,
|
||||||
visible: true,
|
visible: true,
|
||||||
children: [
|
children: [
|
||||||
@ -79,19 +79,18 @@ const menuItems: MenuItem[] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
name: '我的账号',
|
name: '账号',
|
||||||
icon: TeamOutlined,
|
icon: TeamOutlined,
|
||||||
visible: true,
|
visible: true,
|
||||||
children: [
|
children: [
|
||||||
// { path: '/layout/admin/security', name: '账号安全', visible: true },
|
{ path: '/layout/admin/security', name: '账号安全', visible: true },
|
||||||
// { path: '/layout/admin/history', name: '访问记录', visible: true },
|
{ path: '/layout/admin/history', name: '访问记录', visible: true },
|
||||||
{ path: '/layout/admin/accountSet', name: '账户设置', visible: true },
|
{ path: '/layout/admin/accountSet', name: '账户设置', visible: true },
|
||||||
{ path: '/layout/admin/realnameAuth', name: '实名认证', visible: true },
|
{ path: '/layout/admin/realnameAuth', name: '实名认证', visible: true },
|
||||||
{ path: '/layout/admin/myCertificate', name: '我的算力券', visible: true },
|
{ path: '/layout/admin/myCertificate', name: '我的算力券', visible: true },
|
||||||
{ path: '/layout/admin/myInvite', name: '我的邀请', visible: true },
|
{ path: '/layout/admin/myInvite', name: '我的邀请', visible: true },
|
||||||
{ path: '/layout/admin/msgCenter', name: '消息中心', visible: true },
|
{ path: '/layout/admin/msgCenter', name: '消息中心', visible: true },
|
||||||
{ path: '/layout/admin/bankCard', name: '银行卡管理', visible: true },
|
{ path: '/layout/admin/bankCard', name: '银行卡管理', visible: true },
|
||||||
{ path: '/layout/admin/invoices', name: '发票抬头管理', visible: true },
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user