作者 lixiang

对外暴露智能助手

1 import type { AppRouteRecordRaw, AppRouteModule } from '/@/router/types'; 1 import type { AppRouteRecordRaw, AppRouteModule } from '/@/router/types';
2 - 2 +import airagPublicRoutes from './modules/airag-public';
3 import { PAGE_NOT_FOUND_ROUTE, REDIRECT_ROUTE } from '/@/router/routes/basic'; 3 import { PAGE_NOT_FOUND_ROUTE, REDIRECT_ROUTE } from '/@/router/routes/basic';
4 4
5 import { mainOutRoutes } from './mainOut'; 5 import { mainOutRoutes } from './mainOut';
@@ -19,6 +19,12 @@ Object.keys(modules).forEach((key) => { @@ -19,6 +19,12 @@ Object.keys(modules).forEach((key) => {
19 19
20 export const asyncRoutes = [PAGE_NOT_FOUND_ROUTE, ...routeModuleList]; 20 export const asyncRoutes = [PAGE_NOT_FOUND_ROUTE, ...routeModuleList];
21 21
  22 +// 公开路由定义
  23 +export const publicRoutes: AppRouteRecordRaw[] = [
  24 + airagPublicRoutes,
  25 + // 其他公开路由...
  26 +];
  27 +
22 export const RootRoute: AppRouteRecordRaw = { 28 export const RootRoute: AppRouteRecordRaw = {
23 path: '/', 29 path: '/',
24 name: 'Root', 30 name: 'Root',
@@ -31,30 +37,21 @@ export const RootRoute: AppRouteRecordRaw = { @@ -31,30 +37,21 @@ export const RootRoute: AppRouteRecordRaw = {
31 export const LoginRoute: AppRouteRecordRaw = { 37 export const LoginRoute: AppRouteRecordRaw = {
32 path: '/login', 38 path: '/login',
33 name: 'Login', 39 name: 'Login',
34 - //新版后台登录,如果想要使用旧版登录放开即可  
35 - // component: () => import('/@/views/sys/login/Login.vue'),  
36 component: () => import('/@/views/system/loginmini/MiniLogin.vue'), 40 component: () => import('/@/views/system/loginmini/MiniLogin.vue'),
37 meta: { 41 meta: {
38 title: t('routes.basic.login'), 42 title: t('routes.basic.login'),
39 }, 43 },
40 }; 44 };
41 45
42 -//update-begin---author:wangshuai ---date:20220629 for:auth2登录页面路由------------  
43 export const Oauth2LoginRoute: AppRouteRecordRaw = { 46 export const Oauth2LoginRoute: AppRouteRecordRaw = {
44 path: '/oauth2-app/login', 47 path: '/oauth2-app/login',
45 name: 'oauth2-app-login', 48 name: 'oauth2-app-login',
46 - //新版钉钉免登录,如果想要使用旧版放开即可  
47 - // component: () => import('/@/views/sys/login/OAuth2Login.vue'),  
48 component: () => import('/@/views/system/loginmini/OAuth2Login.vue'), 49 component: () => import('/@/views/system/loginmini/OAuth2Login.vue'),
49 meta: { 50 meta: {
50 title: t('routes.oauth2.login'), 51 title: t('routes.oauth2.login'),
51 }, 52 },
52 }; 53 };
53 -//update-end---author:wangshuai ---date:20220629 for:auth2登录页面路由------------  
54 54
55 -/**  
56 - * 【通过token直接静默登录】流程办理登录页面 中转跳转  
57 - */  
58 export const TokenLoginRoute: AppRouteRecordRaw = { 55 export const TokenLoginRoute: AppRouteRecordRaw = {
59 path: '/tokenLogin', 56 path: '/tokenLogin',
60 name: 'TokenLoginRoute', 57 name: 'TokenLoginRoute',
@@ -64,5 +61,15 @@ export const TokenLoginRoute: AppRouteRecordRaw = { @@ -64,5 +61,15 @@ export const TokenLoginRoute: AppRouteRecordRaw = {
64 ignoreAuth: true, 61 ignoreAuth: true,
65 }, 62 },
66 }; 63 };
67 -// Basic routing without permission  
68 -export const basicRoutes = [LoginRoute, RootRoute, ...mainOutRoutes, REDIRECT_ROUTE, PAGE_NOT_FOUND_ROUTE, TokenLoginRoute, Oauth2LoginRoute]; 64 +
  65 +// 基础路由(包含公开路由)
  66 +export const basicRoutes = [
  67 + LoginRoute,
  68 + RootRoute,
  69 + ...mainOutRoutes,
  70 + REDIRECT_ROUTE,
  71 + PAGE_NOT_FOUND_ROUTE,
  72 + TokenLoginRoute,
  73 + Oauth2LoginRoute,
  74 + ...publicRoutes
  75 +];
  1 +import type { AppRouteModule } from '/@/router/types';
  2 +
  3 +export default {
  4 + path: '/public/super/airag',
  5 + name: 'PublicAirag',
  6 + meta: {
  7 + ignoreAuth: true,
  8 + title: 'AI-RAG(公开)',
  9 + hideMenu: true,
  10 + },
  11 + children: [
  12 + {
  13 + path: 'zdyrag/ZdyRagList', // 保持与内部路径一致
  14 + name: 'PublicZdyChat',
  15 + component: () => import('/@/views/super/airag/zdyrag/ZdyRagList.vue'),
  16 + meta: {
  17 + title: '智能问答'
  18 + }
  19 + }
  20 + ]
  21 +} as AppRouteModule;
@@ -3,12 +3,12 @@ import { FormSchema } from '/@/components/Table'; @@ -3,12 +3,12 @@ import { FormSchema } from '/@/components/Table';
3 import { listKnowledge } from '@/views/super/airag/questionembedding/QuestionEmbedding.api'; 3 import { listKnowledge } from '@/views/super/airag/questionembedding/QuestionEmbedding.api';
4 4
5 export const columns: BasicColumn[] = [ 5 export const columns: BasicColumn[] = [
6 - {  
7 - title: 'ID',  
8 - align: 'center',  
9 - dataIndex: 'id',  
10 - width: 200,  
11 - }, 6 + // {
  7 + // title: 'ID',
  8 + // align: 'center',
  9 + // dataIndex: 'id',
  10 + // width: 200,
  11 + // },
12 { 12 {
13 title: '知识库', 13 title: '知识库',
14 align: 'center', 14 align: 'center',