Merge remote-tracking branch 'origin/main' into feature/v1.2灵机空间-内容上传审核_rxd

# Conflicts:
#	pnpm-lock.yaml
#	src/components/_base/navbar/index.vue
#	src/components/text-over-tips/index.vue
#	src/layouts/Basic.vue
#	src/layouts/Page.vue
#	src/main.ts
#	src/router/constants.ts
#	src/router/index.ts
#	src/router/typeings.d.ts
#	src/utils/tools.ts
This commit is contained in:
rd
2025-08-14 15:06:46 +08:00
51 changed files with 5928 additions and 152 deletions

View File

@ -23,9 +23,10 @@ export const DEFAULT_ROUTE = {
export const MENU_GROUP_IDS = {
DATA_ENGINE_ID: 1, // 全域数据分析
CREATIVE_GENERATION_WORKSHOP_ID: 2, // 创意生成工坊
AGENT: 2,
MANAGEMENT_ID: 3, // 管理中心
PROPERTY_ID: 4, // 资产营销平台
WORK_BENCH_ID: 5, // 工作台
WRITER_CREATIVE_GENERATION_WORKSHOP_ID: 6, // 内容稿件-写手侧
CREATIVE_GENERATION_WORKSHOP_ID: 7 // 创意生成工坊
};

View File

@ -8,6 +8,7 @@
import type { Router } from 'vue-router';
import { setRouteEmitter } from '@/utils/route-listener';
import setupUserLoginInfoGuard from './userLoginInfo';
import { MENU_GROUP_IDS } from '@/router/constants';
// import setupPermissionGuard from './permission';
function setupPageGuard(router: Router) {
@ -17,7 +18,9 @@ function setupPageGuard(router: Router) {
});
}
export default function createRouteGuard(router: Router) {
setupPageGuard(router);
setupUserLoginInfoGuard(router);
// setupPermissionGuard(router);

View File

@ -0,0 +1,65 @@
import type { AppRouteRecordRaw } from '../types';
import { MENU_GROUP_IDS } from '@/router/constants';
import IconRepository from '@/assets/svg/svg-agent.svg';
const COMPONENTS: AppRouteRecordRaw[] = [
{
path: '/agent',
name: 'Agent',
redirect: 'agent/index',
meta: {
locale: '灵机ai',
icon: IconRepository,
requiresAuth: true,
requireLogin: true,
roles: ['*'],
id: MENU_GROUP_IDS.AGENT,
},
children: [
{
path: 'index',
name: 'AgentIndex',
component: () => import('@/views/agent/index'),
meta: {
locale:'智能体应用',
requiresAuth: false,
requireLogin: 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,
hideInMenu: 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,
hideInMenu: true,
},
},
],
},
];
export default COMPONENTS;

View File

@ -1,7 +1,3 @@
/*
* @Author: RenXiaoDong
* @Date: 2025-06-23 06:39:28
*/
import { IconBookmark } from '@arco-design/web-vue/es/icon';
import type { AppRouteRecordRaw } from '../types';
import { MENU_GROUP_IDS } from '@/router/constants';

View File

@ -1,7 +1,3 @@
/*
* @Author: RenXiaoDong
* @Date: 2025-06-23 04:29:03
*/
import { IconBookmark } from '@arco-design/web-vue/es/icon';
import type { AppRouteRecordRaw } from '../types';
import { MENU_GROUP_IDS } from '@/router/constants';

View File

@ -15,6 +15,7 @@ declare module 'vue-router' {
ignoreCache?: boolean; // if set true, the page will not be cached
hideSidebar?: boolean;
hideFooter?: boolean;
isAgentRoute?:boolean;
requireLogin?: boolean; // 是否需要登陆才能访问
}
}