From 6be9ce2d10a85c11709e6daa963af7bb85e5f5e3 Mon Sep 17 00:00:00 2001 From: jingrow Date: Sat, 27 Dec 2025 22:28:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=B8=80=E4=BA=9B=E4=B8=8D?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/app/layouts/AppHeader.vue | 11 - frontend/src/app/layouts/AppSidebar.vue | 6 - frontend/src/app/router/index.ts | 27 - frontend/src/shared/api/auth.ts | 9 - frontend/src/shared/api/common.ts | 37 - frontend/src/shared/api/embedding.ts | 73 -- frontend/src/shared/api/localJobs.ts | 101 --- frontend/src/shared/api/nodes.ts | 39 - frontend/src/shared/api/scheduledJobs.ts | 84 -- frontend/src/shared/stores/menu.ts | 16 +- frontend/src/views/Dashboard.vue | 31 +- frontend/src/views/auth/Login.vue | 2 - frontend/src/views/auth/Signup.vue | 12 +- .../src/views/localJobs/LocalJobDetail.vue | 462 ----------- frontend/src/views/localJobs/LocalJobList.vue | 645 -------------- .../scheduledJobs/ScheduledJobDetail.vue | 582 ------------- .../views/scheduledJobs/ScheduledJobList.vue | 785 ------------------ frontend/src/views/settings/MenuManager.vue | 35 +- .../src/views/workspace/WorkspacePage.vue | 234 ------ 19 files changed, 17 insertions(+), 3174 deletions(-) delete mode 100644 frontend/src/shared/api/embedding.ts delete mode 100644 frontend/src/shared/api/localJobs.ts delete mode 100644 frontend/src/shared/api/nodes.ts delete mode 100644 frontend/src/shared/api/scheduledJobs.ts delete mode 100644 frontend/src/views/localJobs/LocalJobDetail.vue delete mode 100644 frontend/src/views/localJobs/LocalJobList.vue delete mode 100644 frontend/src/views/scheduledJobs/ScheduledJobDetail.vue delete mode 100644 frontend/src/views/scheduledJobs/ScheduledJobList.vue delete mode 100644 frontend/src/views/workspace/WorkspacePage.vue diff --git a/frontend/src/app/layouts/AppHeader.vue b/frontend/src/app/layouts/AppHeader.vue index be702ae..be3ad5d 100644 --- a/frontend/src/app/layouts/AppHeader.vue +++ b/frontend/src/app/layouts/AppHeader.vue @@ -171,13 +171,6 @@ const breadcrumbItems = computed(() => { label: id === 'new' ? t('Create') : id }) } - } else if (route.name === 'WorkspacePage') { - const name = route.params.name as string - if (name) { - items.push({ - label: pathSegmentToLabel(name) - }) - } } else { // 其他页面的标题映射(保留向后兼容) const map: Record = { @@ -186,11 +179,7 @@ const breadcrumbItems = computed(() => { AgentDetail: t('Agent Detail'), NodeList: t('Node Management'), NodeDetail: t('Node Detail'), - LocalJobList: t('Local Jobs'), - LocalJobDetail: t('Local Job Detail'), FlowBuilder: t('Flow Builder'), - ScheduledJobList: t('Scheduled Jobs'), - ScheduledJobDetail: t('Scheduled Job Detail'), MenuManager: t('Menu Manager'), Settings: t('Settings'), SearchResults: t('Search Results') diff --git a/frontend/src/app/layouts/AppSidebar.vue b/frontend/src/app/layouts/AppSidebar.vue index 1249d13..2abae9c 100644 --- a/frontend/src/app/layouts/AppSidebar.vue +++ b/frontend/src/app/layouts/AppSidebar.vue @@ -127,12 +127,6 @@ const handleMenuSelect = (key: string) => { router.push(menuItem.url) } } else { - // 新增:Workspace 类型 - if (menuItem.type === 'workspace' && menuItem.workspaceName) { - const slug = pageTypeToSlug(menuItem.workspaceName) - router.push(`/workspace/${slug}`) - return - } // 兼容旧版本:优先使用url字段,如果没有则使用routeName if (menuItem.url) { if (menuItem.url.startsWith('http://') || menuItem.url.startsWith('https://')) { diff --git a/frontend/src/app/router/index.ts b/frontend/src/app/router/index.ts index 971a255..feecfff 100644 --- a/frontend/src/app/router/index.ts +++ b/frontend/src/app/router/index.ts @@ -33,38 +33,11 @@ const router = createRouter({ name: 'Dashboard', component: () => import('../../views/Dashboard.vue') }, - { - path: 'local-jobs', - name: 'LocalJobList', - component: () => import('../../views/localJobs/LocalJobList.vue') - }, - { - path: 'local-jobs/:id', - name: 'LocalJobDetail', - // @ts-ignore - component: () => import('../../views/localJobs/LocalJobDetail.vue') - }, { path: 'flows', name: 'FlowBuilder', component: () => import('../../views/flows/FlowBuilder.vue') }, - { - path: 'scheduled-jobs', - name: 'ScheduledJobList', - component: () => import('../../views/scheduledJobs/ScheduledJobList.vue') - }, - { - path: 'scheduled-jobs/:id', - name: 'ScheduledJobDetail', - component: () => import('../../views/scheduledJobs/ScheduledJobDetail.vue') - }, - // Workspace 页面 - { - path: 'workspace/:name', - name: 'WorkspacePage', - component: () => import('../../views/workspace/WorkspacePage.vue') - }, // 页面类型 pagetype 列表/详情 - 支持多种格式 { path: 'app/:entity', diff --git a/frontend/src/shared/api/auth.ts b/frontend/src/shared/api/auth.ts index f29aeb5..83bc8a0 100644 --- a/frontend/src/shared/api/auth.ts +++ b/frontend/src/shared/api/auth.ts @@ -46,14 +46,8 @@ export const loginApi = async (username: string, password: string): Promise ({})) throw new Error(errorData.detail || errorData.message || errorData.exc || '登录请求失败') } - - // dashboard 登录接口成功后会设置 cookie,不需要返回数据 - // 登录状态通过 cookie 判断 } -// 获取用户信息 - 已删除,使用 cookie 中的 user_id 判断登录状态 - -// 登出 export const logoutApi = async (): Promise => { const response = await fetch(`/api/action/logout`, { method: 'POST', @@ -70,9 +64,6 @@ export const logoutApi = async (): Promise => { } } -// 注册接口 - 已删除,/jingrow/signup API 无效 - -// 仅使用会话Cookie的最小鉴权头部(不影响现有API Key逻辑) export function get_session_api_headers() { return { 'Content-Type': 'application/json', diff --git a/frontend/src/shared/api/common.ts b/frontend/src/shared/api/common.ts index 046a153..2bc98d1 100644 --- a/frontend/src/shared/api/common.ts +++ b/frontend/src/shared/api/common.ts @@ -3,11 +3,6 @@ import { get_session_api_headers } from './auth' // 统一使用相对路径,通过 Vite 代理转发到后端 -// 删除记录的通用函数 - /jingrow/bulk-delete API 已删除 -export const deleteRecords = async (pagetype: string, names: string[]): Promise<{ success: boolean; message?: string }> => { - // 批量删除功能已移除,/jingrow/bulk-delete API 无效 - return { success: false, message: '批量删除功能已移除' } -} // 创建记录的通用函数 export const createRecord = async (pagetype: string, data: Record): Promise<{ success: boolean; data?: any; message?: string }> => { @@ -86,16 +81,6 @@ export const getRecordAttachments = async (pagetype: string, name: string): Prom } } -// 上传附件 - /jingrow/upload_file API 已删除 -export const uploadAttachment = async ( - file: File, - pagetype: string, - docname: string, - isPrivate: boolean = false -): Promise<{ success: boolean; data?: any; message?: string }> => { - // 上传附件功能已移除,/jingrow/upload_file API 无效 - return { success: false, message: '上传附件功能已移除' } -} // 删除附件 export const deleteAttachment = async (attachmentName: string): Promise<{ success: boolean; message?: string }> => { @@ -113,15 +98,8 @@ export const deleteAttachment = async (attachmentName: string): Promise<{ succes } } -// 获取 Workspace 配置 -export const getWorkspace = async (name: string): Promise<{ success: boolean; data?: any; message?: string }> => { - return getRecord('Workspace', name) -} -// 获取记录总数的通用函数 - /jingrow/get-count API 已删除 export const getCount = async (pagetype: string): Promise<{ success: boolean; count?: number; message?: string }> => { - // 获取记录总数功能已移除,/jingrow/get-count API 无效 - // 可以通过 getRecords 获取总数 try { const result = await getRecords(pagetype, [], [], 'modified desc', 0, 1) return { success: true, count: result.total || 0 } @@ -130,11 +108,6 @@ export const getCount = async (pagetype: string): Promise<{ success: boolean; co } } -// 获取Local Job总数的专用函数 - /jingrow/local-job-count API 已删除 -export const getLocalJobCount = async (): Promise<{ success: boolean; count?: number; message?: string }> => { - // 通过 getRecords 获取 Local Job 总数 - return getCount('Local Job') -} // 获取记录列表的通用函数 export const getRecords = async (pagetype: string, filters: any[] = [], fields: string[] = [], orderBy: string = 'modified desc', limitStart: number = 0, limitPageLength: number = 20): Promise<{ success: boolean; data?: any[]; total?: number; message?: string }> => { @@ -211,14 +184,4 @@ export const downloadImageToLocal = async ( } } -// 上传文件到 Jingrow 服务器 - /jingrow/upload_file API 已删除 -export const uploadFileToJingrow = async ( - file: File, - attachedToPagetype?: string, - attachedToName?: string, - attachedToField?: string -): Promise<{ success: boolean; file_url?: string; file_name?: string; local_path?: string; error?: string }> => { - // 上传文件功能已移除,/jingrow/upload_file API 无效 - return { success: false, error: '上传文件功能已移除' } -} diff --git a/frontend/src/shared/api/embedding.ts b/frontend/src/shared/api/embedding.ts deleted file mode 100644 index 5f9a60c..0000000 --- a/frontend/src/shared/api/embedding.ts +++ /dev/null @@ -1,73 +0,0 @@ -import axios from 'axios' -import { get_session_api_headers } from './auth' - -// 内部函数:调用文本转向量API - /jingrow/embedding/batch API 已删除 -const callEmbeddingApi = async (texts: string[]) => { - console.warn('callEmbeddingApi: /jingrow/embedding/batch API 已删除') - return { - success: false, - message: 'Embedding API 已移除' - } -} - -// 内部函数:向量搜索 - /jingrow/embedding/search API 已删除 -const searchVectors = async ( - queryVector: number[], - collectionName: string = 'knowledge_base', - limit: number = 10, - scoreThreshold: number = 0.7 -) => { - console.warn('searchVectors: /jingrow/embedding/search API 已删除') - return { - success: false, - message: '向量搜索 API 已移除' - } -} - -/** - * 文本搜索接口(先转换为向量再搜索) - * - * @param queryText 查询文本 - * @param collectionName 集合名称 - * @param limit 返回结果数量限制 - * @param scoreThreshold 相似度阈值 - * @returns 搜索结果 - */ -export const searchText = async ( - queryText: string, - collectionName: string = 'knowledge_base', - limit: number = 10, - scoreThreshold: number = 0.7 -): Promise<{ - success: boolean - data?: Array<{ - id: string - score: number - payload: Record - }> - message?: string -}> => { - try { - // 先将查询文本转换为向量 - const embeddingResult = await callEmbeddingApi([queryText]) - if (!embeddingResult.success || !embeddingResult.data?.[0]?.embedding) { - return { - success: false, - message: 'Text to vector conversion failed' - } - } - - // 使用向量进行搜索 - return await searchVectors( - embeddingResult.data[0].embedding, - collectionName, - limit, - scoreThreshold - ) - } catch (error: any) { - return { - success: false, - message: error.message || '' - } - } -} diff --git a/frontend/src/shared/api/localJobs.ts b/frontend/src/shared/api/localJobs.ts deleted file mode 100644 index 808efbb..0000000 --- a/frontend/src/shared/api/localJobs.ts +++ /dev/null @@ -1,101 +0,0 @@ -import axios from 'axios' - -const API_BASE_URL = '/jingrow' - -export interface LocalJob { - name: string - job_id: string - queue: string - job_name: string - status: 'queued' | 'started' | 'finished' | 'failed' | 'deferred' | 'scheduled' | 'canceled' - started_at: string - ended_at: string - time_taken: string - exc_info: string - arguments: string - timeout: string - creation: string - modified: string - _comment_count: number - owner: string - modified_by: string -} - -export interface LocalJobListResponse { - success: boolean - items: LocalJob[] - total: number - page: number - page_length: number -} - -export interface LocalJobDetailResponse { - success: boolean - data: LocalJob -} - -export interface BatchDeleteResponse { - success: boolean - message: string - message_params?: Record - success_count: number - failed_jobs: string[] -} - -/** - * 获取Local Job列表 - */ -export async function getLocalJobList( - page: number = 1, - pageLength: number = 20, - orderBy: string = 'modified desc', - filters?: string -): Promise { - const params = new URLSearchParams({ - page: page.toString(), - page_length: pageLength.toString(), - order_by: orderBy - }) - - if (filters) { - params.append('filters', filters) - } - - const response = await axios.get(`${API_BASE_URL}/local-jobs?${params}`) - return response.data -} - -/** - * 获取Local Job详情 - */ -export async function getLocalJobDetail(jobId: string): Promise { - const response = await axios.get(`${API_BASE_URL}/local-jobs/${jobId}`) - return response.data -} - -/** - * 停止Local Job - */ -export async function stopLocalJob(jobId: string): Promise<{ success: boolean; message: string }> { - const response = await axios.post(`${API_BASE_URL}/local-jobs/${jobId}/stop`) - return response.data -} - -/** - * 删除Local Job - */ -export async function deleteLocalJob(jobId: string): Promise<{ success: boolean; message: string }> { - const response = await axios.delete(`${API_BASE_URL}/local-jobs/${jobId}`) - return response.data -} - -/** - * 批量删除Local Jobs - */ -export async function batchDeleteLocalJobs(jobIds: string[]): Promise { - const response = await axios.post(`${API_BASE_URL}/local-jobs/batch-delete`, { - job_ids: jobIds - }) - return response.data -} - diff --git a/frontend/src/shared/api/nodes.ts b/frontend/src/shared/api/nodes.ts deleted file mode 100644 index ae4c3d3..0000000 --- a/frontend/src/shared/api/nodes.ts +++ /dev/null @@ -1,39 +0,0 @@ -import axios from 'axios' -import { get_session_api_headers } from './auth' - -// 统一使用相对路径,通过 Vite 代理转发到后端 - -// 所有 /jingrow/node/* API 已删除,以下函数已失效 - -// 获取节点Schema字段 - /jingrow/node/schema-fields API 已删除 -export const getNodeSchemaFields = async (nodeType: string): Promise => { - console.warn('getNodeSchemaFields: /jingrow/node/schema-fields API 已删除') - return [] -} - -// 一键导入本地节点 - /jingrow/node/import-local API 已删除 -export const importLocalNodes = async (): Promise<{ success: boolean; matched: number; imported: number; skipped_existing: number; errors?: string[] }> => { - console.warn('importLocalNodes: /jingrow/node/import-local API 已删除') - throw new Error('导入本地节点功能已移除') -} - -// 打包节点为zip文件 - /jingrow/node/package API 已删除 -export const packageNode = async (nodeType: string): Promise<{ blob: Blob; filename: string }> => { - console.warn('packageNode: /jingrow/node/package API 已删除') - throw new Error('打包节点功能已移除') -} - -// 发布节点到节点市场 - /jingrow/node/publish API 已删除 -export const publishNodeToMarketplace = async (data: { - node_type: string - title: string - subtitle?: string - description?: string - file_url: string - repository_url?: string - node_image?: string -}): Promise<{ success: boolean; message?: string }> => { - console.warn('publishNodeToMarketplace: /jingrow/node/publish API 已删除') - return { success: false, message: '发布节点功能已移除' } -} - diff --git a/frontend/src/shared/api/scheduledJobs.ts b/frontend/src/shared/api/scheduledJobs.ts deleted file mode 100644 index d54d137..0000000 --- a/frontend/src/shared/api/scheduledJobs.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { deleteRecords, createRecord, updateRecord, getRecord, getRecords } from './common' - -// 获取 Scheduled Job 列表 - 使用通用函数 -export const getScheduledJobs = async (page: number = 1, pageSize: number = 10, filters: any[] = []): Promise => { - const fields = [ - 'name', 'method', 'frequency', 'cron_format', - 'stopped', 'create_log', 'last_execution', - 'server_script', 'scheduler_event', 'creation', 'modified' - ] - - const result = await getRecords( - 'Local Scheduled Job', - filters, - fields, - 'modified desc', - (page - 1) * pageSize, - pageSize - ) - - if (!result.success) { - throw new Error(result.message || '获取 Scheduled Job 列表失败') - } - - return { - items: result.data || [], - total: result.total || 0 - } -} - -// 获取单个 Scheduled Job 详情 - 使用通用函数 -export const getScheduledJobDetail = async (name: string): Promise => { - const result = await getRecord('Local Scheduled Job', name) - if (!result.success) { - throw new Error(result.message || '获取 Scheduled Job 详情失败') - } - return result.data -} - -// 切换 Scheduled Job 状态 - 使用通用函数 -export const toggleScheduledJobStatus = async (name: string): Promise<{ success: boolean; message?: string }> => { - try { - // 先获取当前状态 - const currentData = await getRecord('Local Scheduled Job', name) - if (!currentData.success) { - throw new Error('获取当前状态失败') - } - - const currentStopped = currentData.data.stopped || 0 - const newStopped = currentStopped ? 0 : 1 - - // 更新状态 - 使用通用函数 - const result = await updateRecord('Local Scheduled Job', name, { stopped: newStopped }) - - if (result.success) { - return { - success: true, - message: `状态已更新为${newStopped ? '停止' : '运行'}` - } - } else { - throw new Error(result.message || '更新状态失败') - } - } catch (error: any) { - console.error('Error in toggleScheduledJobStatus:', error) - return { - success: false, - message: error.message || '更新状态失败' - } - } -} - -// 创建 Scheduled Job - 使用通用函数 -export const createScheduledJob = async (data: Record): Promise<{ success: boolean; data?: any; message?: string }> => { - return createRecord('Local Scheduled Job', data) -} - -// 更新 Scheduled Job - 使用通用函数 -export const updateScheduledJob = async (name: string, data: Record): Promise<{ success: boolean; data?: any; message?: string }> => { - return updateRecord('Local Scheduled Job', name, data) -} - -// 删除 Scheduled Job - 使用通用函数 -export const deleteScheduledJobs = async (names: string[]): Promise<{ success: boolean; message?: string }> => { - return deleteRecords('Local Scheduled Job', names) -} diff --git a/frontend/src/shared/stores/menu.ts b/frontend/src/shared/stores/menu.ts index 649333c..9c55b33 100644 --- a/frontend/src/shared/stores/menu.ts +++ b/frontend/src/shared/stores/menu.ts @@ -7,11 +7,10 @@ export interface AppMenuItem { key: string label: string icon?: string - type: 'pagetype' | 'route' | 'url' | 'workspace' | 'group' // 菜单类型,新增 group + type: 'pagetype' | 'route' | 'url' | 'group' // 菜单类型,新增 group pagetype?: string // 页面类型名称(如:Local AI Agent) routeName?: string // 路由名 url?: string // URL路径 - workspaceName?: string // Workspace 名称(工作区文档名) // 层级关系 parentId?: string | null order?: number @@ -45,19 +44,14 @@ function saveToStorage(items: AppMenuItem[]) { // 默认菜单,与现有路由对应 // 注意:非 System User 用户只能看到部分菜单项(通过 visibleItems 过滤) -// - pagetype 和 workspace 类型菜单仅对 System User 可见 +// - pagetype 类型菜单仅对 System User 可见 // - 开发分组下的应用市场、节点市场、智能体市场仅对 System User 可见 // - 非 System User 只能看到工具市场 function getDefaultMenus(): AppMenuItem[] { return [ { id: 'dashboard', key: 'Dashboard', label: 'Dashboard', icon: 'tabler:dashboard', routeName: 'Dashboard', order: 1, type: 'route' }, - { id: 'work', key: 'work', label: 'Work', icon: 'tabler:device-desktop', type: 'workspace', workspaceName: 'work', url: '/workspace/work', order: 2 }, - { id: 'design', key: 'design', label: 'Design', icon: 'tabler:pencil', type: 'workspace', workspaceName: 'design', url: '/workspace/design', order: 3 }, - { id: 'website', key: 'website', label: 'Website', icon: 'tabler:world', type: 'workspace', workspaceName: 'jsite', url: '/workspace/jsite', order: 4 }, { id: 'agents', key: 'local-ai-agent', label: 'Agents', icon: 'hugeicons:robotic', type: 'pagetype', pagetype: 'Local Ai Agent', order: 5 }, { id: 'nodes', key: 'local-ai-node', label: 'Nodes', icon: 'carbon:add-child-node', type: 'pagetype', pagetype: 'Local Ai Node', order: 6 }, - { id: 'localJobs', key: 'LocalJobList', label: 'Task Queue', icon: 'iconoir:task-list', type: 'route', routeName: 'LocalJobList', order: 7 }, - { id: 'scheduledJobs', key: 'ScheduledJobList', label: 'Scheduled Jobs', icon: 'carbon:event-schedule', type: 'route', routeName: 'ScheduledJobList', order: 8 }, { id: 'tools', key: 'Tools', label: 'Tools', icon: 'tabler:tool', type: 'route', routeName: 'Tools', order: 9 }, { id: 'dev-group', key: 'dev-group', label: 'Development', icon: 'tabler:code', type: 'group', order: 10 }, { id: 'dev-template', key: 'dev-template', label: 'PageType Template', icon: 'tabler:file-code', type: 'route', routeName: 'CreatePagetypeTemplate', parentId: 'dev-group', order: 1 }, @@ -173,7 +167,7 @@ export const useMenuStore = defineStore('menu', () => { const authStore = useAuthStore() const userType = authStore.user?.user_type - // 非 System User 用户类型不显示 pagetype 和 workspace 类型的菜单项 + // 非 System User 用户类型不显示 pagetype 类型的菜单项 const isSystemUser = userType === 'System User' return items.value.filter(m => { @@ -182,8 +176,8 @@ export const useMenuStore = defineStore('menu', () => { // 非 System User 的过滤逻辑 if (!isSystemUser) { - // 过滤掉 pagetype 和 workspace 类型 - if (m.type === 'pagetype' || m.type === 'workspace') { + // 过滤掉 pagetype 类型 + if (m.type === 'pagetype') { return false } diff --git a/frontend/src/views/Dashboard.vue b/frontend/src/views/Dashboard.vue index 95a5224..42ba63f 100644 --- a/frontend/src/views/Dashboard.vue +++ b/frontend/src/views/Dashboard.vue @@ -6,7 +6,7 @@ - + @@ -17,17 +17,6 @@ - - - - - - - - - - - @@ -68,13 +57,11 @@ import { NStatistic } from 'naive-ui' import { t } from '../shared/i18n' -import { getCount, getLocalJobCount } from '../shared/api/common' +import { getCount } from '../shared/api/common' const stats = reactive({ agents: 0, nodes: 0, - taskQueue: 0, - scheduledTasks: 0, knowledgeBase: 0, note: 0, event: 0, @@ -85,7 +72,7 @@ const stats = reactive({ // 加载统计数据 const loadStats = async () => { try { - // 第一行:原来的4个统计 + // 第一行:原来的2个统计 // 获取智能体总数 const agentsResult = await getCount('Local Ai Agent') if (agentsResult.success) { @@ -98,18 +85,6 @@ const loadStats = async () => { stats.nodes = nodesResult.count || 0 } - // 获取任务队列数量 - 使用Local Job (虚拟pagetype,使用专用API) - const taskQueueResult = await getLocalJobCount() - if (taskQueueResult.success) { - stats.taskQueue = taskQueueResult.count || 0 - } - - // 获取定时任务数量 - const scheduledTasksResult = await getCount('Local Scheduled Job') - if (scheduledTasksResult.success) { - stats.scheduledTasks = scheduledTasksResult.count || 0 - } - // 第二行:新增的5个统计 // 获取知识库总数 const knowledgeBaseResult = await getCount('Knowledge Base') diff --git a/frontend/src/views/auth/Login.vue b/frontend/src/views/auth/Login.vue index 3fccb58..8856c1c 100644 --- a/frontend/src/views/auth/Login.vue +++ b/frontend/src/views/auth/Login.vue @@ -133,8 +133,6 @@ onMounted(async () => { return } - // 服务器配置检查已移除,/jingrow/server-config API 无效 - // 默认不显示注册链接 }) diff --git a/frontend/src/views/auth/Signup.vue b/frontend/src/views/auth/Signup.vue index 2f37ce9..5178638 100644 --- a/frontend/src/views/auth/Signup.vue +++ b/frontend/src/views/auth/Signup.vue @@ -113,7 +113,6 @@ import { NForm, NFormItem, NInput, NButton, NText, useMessage } from 'naive-ui' import { Icon } from '@iconify/vue' import { useAuthStore } from '../../shared/stores/auth' import { t, getCurrentLocale } from '../../shared/i18n' -// signupApi 已删除,/jingrow/signup API 无效 const router = useRouter() const message = useMessage() @@ -218,17 +217,8 @@ const handleSignup = async () => { await formRef.value?.validate() loading.value = true - // signupApi 已删除,/jingrow/signup API 无效 - message.error(t('注册功能已移除,/jingrow/signup API 无效')) + message.error(t('注册功能已移除')) return - /* 原代码已删除 - const result = await signupApi({ - username: formData.username, - password: formData.password, - email: formData.email || undefined, - phone_number: isEnglish.value ? (formData.phoneNumber || undefined) : formData.phoneNumber - }) - */ if (result.success) { message.success(t('Sign up successful')) diff --git a/frontend/src/views/localJobs/LocalJobDetail.vue b/frontend/src/views/localJobs/LocalJobDetail.vue deleted file mode 100644 index 06bbcdf..0000000 --- a/frontend/src/views/localJobs/LocalJobDetail.vue +++ /dev/null @@ -1,462 +0,0 @@ - - - - - diff --git a/frontend/src/views/localJobs/LocalJobList.vue b/frontend/src/views/localJobs/LocalJobList.vue deleted file mode 100644 index 06f2d90..0000000 --- a/frontend/src/views/localJobs/LocalJobList.vue +++ /dev/null @@ -1,645 +0,0 @@ - - - - - diff --git a/frontend/src/views/scheduledJobs/ScheduledJobDetail.vue b/frontend/src/views/scheduledJobs/ScheduledJobDetail.vue deleted file mode 100644 index da698e1..0000000 --- a/frontend/src/views/scheduledJobs/ScheduledJobDetail.vue +++ /dev/null @@ -1,582 +0,0 @@ - - - - - diff --git a/frontend/src/views/scheduledJobs/ScheduledJobList.vue b/frontend/src/views/scheduledJobs/ScheduledJobList.vue deleted file mode 100644 index b58bcb0..0000000 --- a/frontend/src/views/scheduledJobs/ScheduledJobList.vue +++ /dev/null @@ -1,785 +0,0 @@ - - - - - diff --git a/frontend/src/views/settings/MenuManager.vue b/frontend/src/views/settings/MenuManager.vue index 1feadd9..cfdfe51 100644 --- a/frontend/src/views/settings/MenuManager.vue +++ b/frontend/src/views/settings/MenuManager.vue @@ -92,19 +92,6 @@ - - - - - - @@ -169,8 +156,8 @@ const filteredItems = computed(() => { // 非 System User 的过滤逻辑 if (!isSystemUser) { - // 过滤掉 pagetype 和 workspace 类型 - if (m.type === 'pagetype' || m.type === 'workspace') { + // 过滤掉 pagetype 类型 + if (m.type === 'pagetype') { return false } @@ -200,7 +187,7 @@ const dialog = useDialog() const columns = [ { title: t('Display Name'), key: 'label' }, { title: t('Type'), key: 'type', render: (row: AppMenuItem) => { - const typeMap = { 'pagetype': t('PageType'), 'route': t('Route'), 'url': t('URL'), 'workspace': t('Workspace'), 'group': t('Group') } + const typeMap = { 'pagetype': t('PageType'), 'route': t('Route'), 'url': t('URL'), 'group': t('Group') } return typeMap[row.type] || row.type }}, @@ -210,7 +197,6 @@ const columns = [ return p ? p.label : t('None') }}, { title: t('PageType'), key: 'pagetype' }, - { title: t('Workspace'), key: 'workspaceName' }, { title: t('Route Name'), key: 'routeName' }, { title: t('URL Path'), key: 'url' }, { title: t('Icon'), key: 'icon' }, @@ -254,13 +240,12 @@ const typeOptions = computed(() => { { label: t('PageType'), value: 'pagetype' }, { label: t('Route'), value: 'route' }, { label: t('URL'), value: 'url' }, - { label: t('Workspace'), value: 'workspace' }, { label: t('Group'), value: 'group' } ] - // 非 System User 过滤掉 pagetype 和 workspace 选项 + // 非 System User 过滤掉 pagetype 选项 if (!isSystemUser) { - return allOptions.filter(opt => opt.value !== 'pagetype' && opt.value !== 'workspace') + return allOptions.filter(opt => opt.value !== 'pagetype') } return allOptions @@ -316,7 +301,6 @@ function onTypeChange() { form.value.pagetype = '' form.value.routeName = '' form.value.url = '' - ;(form.value as any).workspaceName = '' } @@ -331,13 +315,13 @@ function onPageTypeChange() { function save() { const data = { ...form.value } - // 验证:非 System User 不允许保存 pagetype 和 workspace 类型 + // 验证:非 System User 不允许保存 pagetype 类型 const userType = authStore.user?.user_type const isSystemUser = userType === 'System User' - if (!isSystemUser && (data.type === 'pagetype' || data.type === 'workspace')) { + if (!isSystemUser && data.type === 'pagetype') { dialog.error({ title: t('Permission Denied'), - content: t('Non-System User cannot create or edit pagetype and workspace menu items'), + content: t('Non-System User cannot create or edit pagetype menu items'), positiveText: t('OK') }) return @@ -347,9 +331,6 @@ function save() { if (data.type === 'pagetype' && data.pagetype) { data.key = pageTypeToSlug(data.pagetype) data.url = `/app/${data.key}` - } else if (data.type === 'workspace' && (data as any).workspaceName) { - data.key = pageTypeToSlug((data as any).workspaceName) - data.url = `/workspace/${data.key}` } else if (data.type === 'route' && data.routeName) { data.key = data.routeName } else if (data.type === 'url' && data.url) { diff --git a/frontend/src/views/workspace/WorkspacePage.vue b/frontend/src/views/workspace/WorkspacePage.vue deleted file mode 100644 index 3d176c6..0000000 --- a/frontend/src/views/workspace/WorkspacePage.vue +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - - -