feat: 添加入口
This commit is contained in:
5789
pnpm-lock.yaml
generated
5789
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
BIN
src/assets/img/agent/icon-entry-hover.png
Normal file
BIN
src/assets/img/agent/icon-entry-hover.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
BIN
src/assets/img/agent/icon-entry.png
Normal file
BIN
src/assets/img/agent/icon-entry.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
BIN
src/assets/img/agent/icon-home-hover.png
Normal file
BIN
src/assets/img/agent/icon-home-hover.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
BIN
src/assets/img/agent/icon-home.png
Normal file
BIN
src/assets/img/agent/icon-home.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="right-wrap">
|
<div class="right-wrap">
|
||||||
<div class="relative mr-12px" @click="setUnread">
|
<div class="agent-entry" :class="isAgentRoute ? 'agent' : ''" @click="handleAgentClick"></div>
|
||||||
|
<div class="relative mx-16px" @click="setUnread">
|
||||||
<SvgIcon
|
<SvgIcon
|
||||||
name="svg-taskCenter"
|
name="svg-taskCenter"
|
||||||
size="16"
|
size="16"
|
||||||
@ -86,8 +87,12 @@ import icon3 from '@/assets/change.svg';
|
|||||||
const enterpriseStore = useEnterpriseStore();
|
const enterpriseStore = useEnterpriseStore();
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const sideBarStore = useSidebarStore();
|
const sideBarStore = useSidebarStore();
|
||||||
|
const route = useRoute();
|
||||||
|
|
||||||
const hasUnreadInfo = computed(() => sideBarStore.unreadInfo.length);
|
const hasUnreadInfo = computed(() => sideBarStore.unreadInfo.length);
|
||||||
|
const isAgentRoute = computed(() => {
|
||||||
|
return route.meta?.isAgentRoute;
|
||||||
|
});
|
||||||
|
|
||||||
const exitAccountModalRef = ref(null);
|
const exitAccountModalRef = ref(null);
|
||||||
const downloadCenterModalRef = ref(null);
|
const downloadCenterModalRef = ref(null);
|
||||||
@ -117,15 +122,13 @@ const setUnread = () => {
|
|||||||
sideBarStore.removeTaskUnreadInfo();
|
sideBarStore.removeTaskUnreadInfo();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
const handleAgentClick = () => {
|
||||||
|
router.push({ name: isAgentRoute.value ? 'Home' : 'AgentIndex' });
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.right-wrap {
|
@import './style.scss';
|
||||||
display: flex;
|
|
||||||
padding-right: 20px;
|
|
||||||
list-style: none;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.layout-avatar-dropdown,
|
.layout-avatar-dropdown,
|
||||||
|
|||||||
27
src/components/_base/navbar/components/right-side/style.scss
Normal file
27
src/components/_base/navbar/components/right-side/style.scss
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
.right-wrap {
|
||||||
|
display: flex;
|
||||||
|
padding-right: 20px;
|
||||||
|
list-style: none;
|
||||||
|
align-items: center;
|
||||||
|
.agent-entry {
|
||||||
|
width: 100px;
|
||||||
|
height: 32px;
|
||||||
|
background: url('@/assets/img/agent/icon-entry.png') 100% 100%;
|
||||||
|
background-size: cover;
|
||||||
|
transition: all 0.3s;
|
||||||
|
cursor: pointer;
|
||||||
|
&:hover {
|
||||||
|
background: url('@/assets/img/agent/icon-entry-hover.png') 100% 100%;
|
||||||
|
background-size: cover;
|
||||||
|
}
|
||||||
|
&.agent {
|
||||||
|
background: url('@/assets/img/agent/icon-home.png') 100% 100%;
|
||||||
|
background-size: cover;
|
||||||
|
cursor: pointer;
|
||||||
|
&:hover {
|
||||||
|
background: url('@/assets/img/agent/icon-home-hover.png') 100% 100%;
|
||||||
|
background-size: cover;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -35,50 +35,7 @@ export const router = createRouter({
|
|||||||
id: MENU_GROUP_IDS.WORK_BENCH_ID,
|
id: MENU_GROUP_IDS.WORK_BENCH_ID,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: '/agent/chat',
|
|
||||||
name: 'Chat',
|
|
||||||
component: () => import('@/views/agent/chat'),
|
|
||||||
meta: {
|
|
||||||
hideSidebar: true,
|
|
||||||
requiresAuth: false,
|
|
||||||
requireLogin: true,
|
|
||||||
hideFooter: true,
|
|
||||||
id: MENU_GROUP_IDS.WORK_BENCH_ID,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/agent/workFlow',
|
|
||||||
name: 'WorkFlow',
|
|
||||||
component: () => import('@/views/agent/work-flow'),
|
|
||||||
meta: {
|
|
||||||
hideSidebar: true,
|
|
||||||
requiresAuth: false,
|
|
||||||
requireLogin: true,
|
|
||||||
hideFooter: true,
|
|
||||||
id: MENU_GROUP_IDS.WORK_BENCH_ID,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/permission',
|
|
||||||
name: 'permission',
|
|
||||||
component: () => import('@/views/components/permission/choose-enterprise.vue'),
|
|
||||||
meta: {
|
|
||||||
requiresAuth: false,
|
|
||||||
requireLogin: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// path: '/auth',
|
|
||||||
// name: 'auth',
|
|
||||||
// component: () => import('@/views/components/permission/auth.vue'),
|
|
||||||
// meta: {
|
|
||||||
// requiresAuth: false,
|
|
||||||
// requireLogin: true,
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
...appRoutes,
|
...appRoutes,
|
||||||
// REDIRECT_MAIN,
|
|
||||||
NOT_FOUND_ROUTE,
|
NOT_FOUND_ROUTE,
|
||||||
],
|
],
|
||||||
scrollBehavior() {
|
scrollBehavior() {
|
||||||
|
|||||||
@ -26,8 +26,36 @@ const COMPONENTS: AppRouteRecordRaw[] = [
|
|||||||
requiresAuth: false,
|
requiresAuth: false,
|
||||||
requireLogin: true,
|
requireLogin: true,
|
||||||
hideFooter: true,
|
hideFooter: true,
|
||||||
|
isAgentRoute: true
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'chat',
|
||||||
|
name: 'AgentChat',
|
||||||
|
component: () => import('@/views/agent/chat'),
|
||||||
|
meta: {
|
||||||
|
hideSidebar: true,
|
||||||
|
requiresAuth: false,
|
||||||
|
requireLogin: true,
|
||||||
|
hideFooter: true,
|
||||||
|
id: MENU_GROUP_IDS.AGENT,
|
||||||
|
isAgentRoute: true
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
path: 'workFlow',
|
||||||
|
name: 'AgentWorkFlow',
|
||||||
|
component: () => import('@/views/agent/work-flow'),
|
||||||
|
meta: {
|
||||||
|
hideSidebar: true,
|
||||||
|
requiresAuth: false,
|
||||||
|
requireLogin: true,
|
||||||
|
hideFooter: true,
|
||||||
|
id: MENU_GROUP_IDS.AGENT,
|
||||||
|
isAgentRoute: true
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@ -1,7 +1,3 @@
|
|||||||
/*
|
|
||||||
* @Author: RenXiaoDong
|
|
||||||
* @Date: 2025-06-23 06:39:28
|
|
||||||
*/
|
|
||||||
import { IconBookmark } from '@arco-design/web-vue/es/icon';
|
import { IconBookmark } from '@arco-design/web-vue/es/icon';
|
||||||
import type { AppRouteRecordRaw } from '../types';
|
import type { AppRouteRecordRaw } from '../types';
|
||||||
import { MENU_GROUP_IDS } from '@/router/constants';
|
import { MENU_GROUP_IDS } from '@/router/constants';
|
||||||
|
|||||||
@ -1,7 +1,3 @@
|
|||||||
/*
|
|
||||||
* @Author: RenXiaoDong
|
|
||||||
* @Date: 2025-06-23 04:29:03
|
|
||||||
*/
|
|
||||||
import { IconBookmark } from '@arco-design/web-vue/es/icon';
|
import { IconBookmark } from '@arco-design/web-vue/es/icon';
|
||||||
import type { AppRouteRecordRaw } from '../types';
|
import type { AppRouteRecordRaw } from '../types';
|
||||||
import { MENU_GROUP_IDS } from '@/router/constants';
|
import { MENU_GROUP_IDS } from '@/router/constants';
|
||||||
|
|||||||
1
src/router/typeings.d.ts
vendored
1
src/router/typeings.d.ts
vendored
@ -14,6 +14,7 @@ declare module 'vue-router' {
|
|||||||
noAffix?: boolean; // if set true, the tag will not affix in the tab-bar
|
noAffix?: boolean; // if set true, the tag will not affix in the tab-bar
|
||||||
ignoreCache?: boolean; // if set true, the page will not be cached
|
ignoreCache?: boolean; // if set true, the page will not be cached
|
||||||
hideSidebar?: boolean;
|
hideSidebar?: boolean;
|
||||||
|
isAgentRoute?:boolean;
|
||||||
requireLogin?: boolean; // 是否需要登陆才能访问
|
requireLogin?: boolean; // 是否需要登陆才能访问
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user