Signed-off-by: TIANHE <TIANHE@GMAIL.COM>
This commit is contained in:
TIANHE
2025-12-29 03:06:49 +08:00
commit f43312a858
292 changed files with 103739 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
// Unified AI model support list for frontend.
// Model IDs follow OpenRouter-style `provider/model` naming.
export const DEFAULT_AI_MODEL_MAP = {
'x-ai/grok-code-fast-1': 'xAI: Grok Code Fast 1',
'x-ai/grok-4-fast': 'xAI: Grok 4 Fast',
'x-ai/grok-4.1-fast': 'xAI: Grok 4.1 Fast',
'google/gemini-2.5-flash': 'Google: Gemini 2.5 Flash',
'google/gemini-2.0-flash-001': 'Google: Gemini 2.0 Flash',
'google/gemini-3-pro-preview': 'Google: Gemini 3 Pro Preview',
'google/gemini-2.5-flash-lite': 'Google: Gemini 2.5 Flash Lite',
'google/gemini-2.5-pro': 'Google: Gemini 2.5 Pro',
'openai/gpt-4o-mini': 'OpenAI: GPT-4o-mini',
'openai/gpt-5-mini': 'OpenAI: GPT-5 Mini',
'openai/gpt-oss-120b': 'OpenAI: gpt-oss-120b',
'deepseek/deepseek-v3.2': 'DeepSeek: DeepSeek V3.2',
'minimax/minimax-m2': 'MiniMax: MiniMax M2',
'anthropic/claude-sonnet-4': 'Anthropic: Claude Sonnet 4',
'anthropic/claude-sonnet-4.5': 'Anthropic: Claude Sonnet 4.5',
'anthropic/claude-opus-4.5': 'Anthropic: Claude Opus 4.5',
'anthropic/claude-haiku-4.5': 'Anthropic: Claude Haiku 4.5',
'z-ai/glm-4.6': 'Z.AI: GLM 4.6'
}
export function isPlainObject (val) {
return val !== null && typeof val === 'object' && !Array.isArray(val)
}
export function mergeModelMaps (baseMap, overrideMap) {
const base = isPlainObject(baseMap) ? baseMap : {}
const override = isPlainObject(overrideMap) ? overrideMap : {}
return { ...base, ...override }
}
export function modelMapToOptions (modelMap) {
const map = isPlainObject(modelMap) ? modelMap : {}
return Object.keys(map).map(key => ({
value: key,
label: map[key]
}))
}
@@ -0,0 +1,33 @@
/**
* 项目默认配置项
* primaryColor - 默认主题色, 如果修改颜色不生效,请清理 localStorage
* navTheme - sidebar theme ['dark', 'light'] 两种主题
* colorWeak - 色盲模式
* layout - 整体布局方式 ['sidemenu', 'topmenu'] 两种布局
* fixedHeader - 固定 Header : boolean
* fixSiderbar - 固定左侧菜单栏 boolean
* contentWidth - 内容区布局: 流式 | 固定
*
* storageOptions: {} - Vue-ls 插件配置项 (localStorage/sessionStorage)
*
*/
export const PYTHON_API_BASE_URL = process.env.VUE_APP_PYTHON_API_BASE_URL || 'http://localhost:5000'
export default {
navTheme: 'light', // theme for nav menu
primaryColor: '#13C2C2', // '#F5222D', // primary color of ant design
layout: 'sidemenu', // nav menu position: `sidemenu` or `topmenu`
contentWidth: 'Fluid', // layout of content: `Fluid` or `Fixed`, only works when layout is topmenu
fixedHeader: true, // sticky header - 固定顶部导航栏
fixSiderbar: true, // sticky siderbar - 固定左侧边栏
colorWeak: false,
menu: {
locale: true
},
title: 'QuantDinger',
pwa: false,
iconfontUrl: '',
production: process.env.NODE_ENV === 'production' && process.env.VUE_APP_PREVIEW !== 'true'
}
+147
View File
@@ -0,0 +1,147 @@
// eslint-disable-next-line
import { UserLayout, BasicLayout, BlankLayout } from '@/layouts'
export const asyncRouterMap = [
{
path: '/',
name: 'index',
component: BasicLayout,
meta: { title: 'menu.home' },
redirect: '/dashboard',
children: [
// 仪表盘
{
path: '/dashboard',
name: 'Dashboard',
component: () => import('@/views/dashboard'),
meta: { title: 'menu.dashboard', keepAlive: true, icon: 'dashboard', permission: ['dashboard'] }
},
// AI 分析
{
path: '/ai-analysis/:pageNo([1-9]\\d*)?',
name: 'Analysis',
component: () => import('@/views/ai-analysis'),
meta: { title: 'menu.dashboard.analysis', keepAlive: false, icon: 'thunderbolt', permission: ['dashboard'] }
},
// 指标分析
{
path: '/indicator-analysis',
name: 'Indicator',
component: () => import('@/views/indicator-analysis'),
meta: { title: 'menu.dashboard.indicator', keepAlive: true, icon: 'line-chart', permission: ['dashboard'] }
},
// 交易助手
{
path: '/trading-assistant',
name: 'TradingAssistant',
component: () => import('@/views/trading-assistant'),
meta: { title: 'menu.dashboard.tradingAssistant', keepAlive: true, icon: 'robot', permission: ['dashboard'] }
},
// 指标社区(keepAlive disabled intentionally for iframe page)
{
path: '/indicator-community',
name: 'IndicatorCommunity',
component: () => import('@/views/indicator-community'),
meta: { title: 'menu.dashboard.community', keepAlive: false, icon: 'shop', permission: ['dashboard'] }
}
// other
/*
{
path: '/other',
name: 'otherPage',
component: PageView,
meta: { title: '其他组件', icon: 'slack', permission: [ 'dashboard' ] },
redirect: '/other/icon-selector',
children: [
{
path: '/other/icon-selector',
name: 'TestIconSelect',
component: () => import('@/views/other/IconSelectorView'),
meta: { title: 'IconSelector', icon: 'tool', keepAlive: true, permission: [ 'dashboard' ] }
},
{
path: '/other/list',
component: RouteView,
meta: { title: '业务布局', icon: 'layout', permission: [ 'support' ] },
redirect: '/other/list/tree-list',
children: [
{
path: '/other/list/tree-list',
name: 'TreeList',
component: () => import('@/views/other/TreeList'),
meta: { title: '树目录表格', keepAlive: true }
},
{
path: '/other/list/edit-table',
name: 'EditList',
component: () => import('@/views/other/TableInnerEditList'),
meta: { title: '内联编辑表格', keepAlive: true }
},
{
path: '/other/list/user-list',
name: 'UserList',
component: () => import('@/views/other/UserList'),
meta: { title: '用户列表', keepAlive: true }
},
{
path: '/other/list/role-list',
name: 'RoleList',
component: () => import('@/views/other/RoleList'),
meta: { title: '角色列表', keepAlive: true }
},
{
path: '/other/list/system-role',
name: 'SystemRole',
component: () => import('@/views/role/RoleList'),
meta: { title: '角色列表2', keepAlive: true }
},
{
path: '/other/list/permission-list',
name: 'PermissionList',
component: () => import('@/views/other/PermissionList'),
meta: { title: '权限列表', keepAlive: true }
}
]
}
]
}
*/
]
},
{
path: '*',
redirect: '/404',
hidden: true
}
]
/**
* 基础路由
* @type { *[] }
*/
export const constantRouterMap = [
{
path: '/user',
component: UserLayout,
redirect: '/user/login',
hidden: true,
children: [
{
path: 'login',
name: 'login',
component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login')
},
{
path: 'recover',
name: 'recover',
component: undefined
}
]
},
{
path: '/404',
component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
}
]