diff --git a/user-frontend/src/layouts/UserLayout.vue b/user-frontend/src/layouts/UserLayout.vue
index 90078cb..ff05820 100644
--- a/user-frontend/src/layouts/UserLayout.vue
+++ b/user-frontend/src/layouts/UserLayout.vue
@@ -16,17 +16,26 @@
:collapse-transition="false"
@select="showMobileMenu = false"
>
- {{ $t('nav.agent') || 'AI数字员工' }}
- {{ $t('nav.discovery') }}
- {{ $t('nav.workspace') }}
- {{ $t('nav.customers') }}
- {{ $t('nav.products') }}
- {{ $t('nav.quotations') }}
- {{ $t('nav.translate') }}
- {{ $t('nav.marketing') }}
- {{ $t('nav.followup') }}
- {{ $t('nav.analytics') }}
- {{ $t('nav.team') }}
+ {{ $t('nav.home') || '首页工作台' }}
+ {{ $t('nav.customers') }}
+
+
+
+ {{ $t('nav.productsQuotations') || '报价产品' }}
+
+ {{ $t('nav.products') }}
+ {{ $t('nav.quotations') }}
+
+ {{ $t('nav.translate') }}
+
+
+
+ {{ $t('nav.more') || '更多' }}
+
+ {{ $t('nav.profile') }}
+ {{ $t('nav.analytics') }}
+ {{ $t('nav.team') }}
+
@@ -36,17 +45,17 @@
- {{ $t('nav.workspace') }}
- {{ $t('nav.' + route.name?.toLowerCase()) || route.meta.title }}
+ {{ $t('nav.home') || '首页工作台' }}
+ {{ $t('nav.' + route.name?.toLowerCase()) || route.meta.title }}
{{ currentLang }}
-
+
{{ creditBalance }} {{ $t('topbar.credits') }}
-
+
@@ -58,8 +67,8 @@
- {{ $t('nav.profile') }}
- {{ $t('nav.notifications') }}
+ {{ $t('nav.profile') }}
+ {{ $t('nav.notifications') }}
{{ $t('common.confirm') }}退出
diff --git a/user-frontend/src/router/index.js b/user-frontend/src/router/index.js
index f81e129..1cdede0 100644
--- a/user-frontend/src/router/index.js
+++ b/user-frontend/src/router/index.js
@@ -3,52 +3,49 @@ import { createRouter, createWebHistory } from 'vue-router'
const routes = [
{ path: '/login', redirect: '/' },
{ path: '/', name: 'Landing', component: () => import('@/views/WorkspaceLanding.vue') },
- {
- path: '/agent',
- component: () => import('@/layouts/UserLayout.vue'),
- meta: { requiresAuth: true },
- children: [
- { path: '', name: 'Agent', component: () => import('@/views/Agent.vue'), meta: { title: 'AI数字员工' } },
- ]
- },
{
path: '/workspace',
component: () => import('@/layouts/UserLayout.vue'),
meta: { requiresAuth: true },
children: [
- { path: '', name: 'Workspace', component: () => import('@/views/Workspace.vue'), meta: { title: '工作台' } },
+ { path: '', name: 'Home', component: () => import('@/views/NewHome.vue'), meta: { title: '首页工作台' } },
+ { path: 'customers', name: 'Customers', component: () => import('@/views/Customers.vue'), meta: { title: '客户管理' } },
+ { path: 'products', name: 'Products', component: () => import('@/views/Products.vue'), meta: { title: '产品库' } },
+ { path: 'quotations', name: 'Quotations', component: () => import('@/views/Quotations.vue'), meta: { title: '报价单' } },
+ { path: 'translate', name: 'Translate', component: () => import('@/views/Translate.vue'), meta: { title: '智能翻译' } },
+ { path: 'analytics', name: 'Analytics', component: () => import('@/views/Analytics.vue'), meta: { title: '数据分析' } },
+ { path: 'team', name: 'Team', component: () => import('@/views/Team.vue'), meta: { title: '团队协作' } },
+ { path: 'profile', name: 'Profile', component: () => import('@/views/Profile.vue'), meta: { title: '个人中心' } },
+ { path: 'profile/credits', name: 'Credits', component: () => import('@/views/Credits.vue'), meta: { title: '购买次数' } },
+ { path: 'profile/certification', name: 'Certification', component: () => import('@/views/Certification.vue'), meta: { title: '实名认证' } },
+ { path: 'profile/invoice', name: 'Invoice', component: () => import('@/views/Invoice.vue'), meta: { title: '发票管理' } },
+ { path: 'profile/notifications', name: 'Notifications', component: () => import('@/views/Notifications.vue'), meta: { title: '通知中心' } },
+ { path: 'profile/feedback', name: 'Feedback', component: () => import('@/views/Feedback.vue'), meta: { title: '意见反馈' } },
]
},
+ // Redirect old top-level routes to new /workspace children
+ { path: '/customers', redirect: '/workspace/customers' },
+ { path: '/products', redirect: '/workspace/products' },
+ { path: '/quotations', redirect: '/workspace/quotations' },
+ { path: '/translate', redirect: '/workspace/translate' },
+ { path: '/analytics', redirect: '/workspace/analytics' },
+ { path: '/team', redirect: '/workspace/team' },
+ { path: '/profile', redirect: '/workspace/profile' },
+ { path: '/credits', redirect: '/workspace/profile/credits' },
+ { path: '/certification', redirect: '/workspace/profile/certification' },
+ { path: '/invoice', redirect: '/workspace/profile/invoice' },
+ { path: '/notifications', redirect: '/workspace/profile/notifications' },
+ { path: '/feedback', redirect: '/workspace/profile/feedback' },
+ { path: '/agent', redirect: '/workspace' },
+ { path: '/workspace/home', redirect: '/workspace' },
+
+ // Hidden routes – still accessible via direct URL but not in sidebar
{
- path: '/translate',
+ path: '/discovery',
component: () => import('@/layouts/UserLayout.vue'),
meta: { requiresAuth: true },
children: [
- { path: '', name: 'Translate', component: () => import('@/views/Translate.vue'), meta: { title: '智能翻译' } },
- ]
- },
- {
- path: '/customers',
- component: () => import('@/layouts/UserLayout.vue'),
- meta: { requiresAuth: true },
- children: [
- { path: '', name: 'Customers', component: () => import('@/views/Customers.vue'), meta: { title: '客户管理' } },
- ]
- },
- {
- path: '/products',
- component: () => import('@/layouts/UserLayout.vue'),
- meta: { requiresAuth: true },
- children: [
- { path: '', name: 'Products', component: () => import('@/views/Products.vue'), meta: { title: '产品库' } },
- ]
- },
- {
- path: '/quotations',
- component: () => import('@/layouts/UserLayout.vue'),
- meta: { requiresAuth: true },
- children: [
- { path: '', name: 'Quotations', component: () => import('@/views/Quotations.vue'), meta: { title: '报价单' } },
+ { path: '', name: 'Discovery', component: () => import('@/views/Discovery.vue'), meta: { title: '发现客户' } },
]
},
{
@@ -59,14 +56,6 @@ const routes = [
{ path: '', name: 'Marketing', component: () => import('@/views/Marketing.vue'), meta: { title: '营销素材' } },
]
},
- {
- path: '/discovery',
- component: () => import('@/layouts/UserLayout.vue'),
- meta: { requiresAuth: true },
- children: [
- { path: '', name: 'Discovery', component: () => import('@/views/Discovery.vue'), meta: { title: '发现客户' } },
- ]
- },
{
path: '/followup',
component: () => import('@/layouts/UserLayout.vue'),
@@ -75,70 +64,6 @@ const routes = [
{ path: '', name: 'Followup', component: () => import('@/views/Followup.vue'), meta: { title: '智能跟进' } },
]
},
- {
- path: '/analytics',
- component: () => import('@/layouts/UserLayout.vue'),
- meta: { requiresAuth: true },
- children: [
- { path: '', name: 'Analytics', component: () => import('@/views/Analytics.vue'), meta: { title: '数据分析' } },
- ]
- },
- {
- path: '/team',
- component: () => import('@/layouts/UserLayout.vue'),
- meta: { requiresAuth: true },
- children: [
- { path: '', name: 'Team', component: () => import('@/views/Team.vue'), meta: { title: '团队协作' } },
- ]
- },
- {
- path: '/notifications',
- component: () => import('@/layouts/UserLayout.vue'),
- meta: { requiresAuth: true },
- children: [
- { path: '', name: 'Notifications', component: () => import('@/views/Notifications.vue'), meta: { title: '通知中心' } },
- ]
- },
- {
- path: '/profile',
- component: () => import('@/layouts/UserLayout.vue'),
- meta: { requiresAuth: true },
- children: [
- { path: '', name: 'Profile', component: () => import('@/views/Profile.vue'), meta: { title: '个人中心' } },
- ]
- },
- {
- path: '/credits',
- component: () => import('@/layouts/UserLayout.vue'),
- meta: { requiresAuth: true },
- children: [
- { path: '', name: 'Credits', component: () => import('@/views/Credits.vue'), meta: { title: '购买次数' } },
- ]
- },
- {
- path: '/certification',
- component: () => import('@/layouts/UserLayout.vue'),
- meta: { requiresAuth: true },
- children: [
- { path: '', name: 'Certification', component: () => import('@/views/Certification.vue'), meta: { title: '实名认证' } },
- ]
- },
- {
- path: '/invoice',
- component: () => import('@/layouts/UserLayout.vue'),
- meta: { requiresAuth: true },
- children: [
- { path: '', name: 'Invoice', component: () => import('@/views/Invoice.vue'), meta: { title: '发票管理' } },
- ]
- },
- {
- path: '/feedback',
- component: () => import('@/layouts/UserLayout.vue'),
- meta: { requiresAuth: true },
- children: [
- { path: '', name: 'Feedback', component: () => import('@/views/Feedback.vue'), meta: { title: '意见反馈' } },
- ]
- },
{ path: '/:pathMatch(.*)*', redirect: '/' },
]
diff --git a/user-frontend/src/views/NewHome.vue b/user-frontend/src/views/NewHome.vue
new file mode 100644
index 0000000..c316fba
--- /dev/null
+++ b/user-frontend/src/views/NewHome.vue
@@ -0,0 +1,679 @@
+
+
+
+
+
+
+
+
+
{{ $t('home.greeting') || '你好' }},{{ auth.user?.username || '用户' }}
+
{{ $t('home.subtitle') || 'AI 数字员工为你自动挖掘、分析、触达、跟进' }}
+
+
+
+ {{ $t('agent.newTask') || '新建任务' }}
+
+
+
+
+
+
+
+
+
{{ $t('home.creditBalance') || '信用余额' }}
+
{{ creditBalance ?? '...' }} {{ $t('home.credits') || '次' }}
+
+
+ {{ $t('home.buyCredits') || '购买次数' }} →
+
+
+
+
+
+
+
+
+ {{ item.value }}
+ {{ item.label }}
+
+
+
+
+
+
+
+
+
+
{{ s.value }}
+
{{ s.label }}
+
+
+
+
+
+
+
+
+ {{ $t('home.recentActivity') || '最近活动' }}
+
+
+
+ {{ act.tag }}
+ {{ act.text }}
+ {{ act.time }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{ p.product_name }}
+
{{ p.target_market }}
+
+ {{ $t('agent.foundLeads') || '发现' }}
+ {{ p.pipeline_data.summary.total_leads || 0 }}
+ {{ $t('agent.leads') || '个线索' }},
+ {{ $t('agent.highMatch') || '高匹配' }}
+ {{ p.pipeline_data.summary.high_match || 0 }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{ stageLabel(stKey) }}
+
{{ st.message || '' }}
+
+
+
+
+
+
{{ $t('agent.leads') || '客户线索' }} ({{ leads.length }})
+
+
+
+
+ {{ row.name }}
+ {{ $t('agent.hot') || '热' }}
+ {{ $t('agent.warm') || '温' }}
+ {{ $t('agent.cold') || '冷' }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('agent.preview') || '预览' }}
+ {{ $t('agent.noOutreach') || '未生成' }}
+
+
+
+
+
+ {{ $t('agent.addCustomer') || '添加客户' }}
+
+
+ {{ $t('agent.visit') || '访问' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('common.cancel') || '取消' }}
+
+ {{ $t('agent.start') || '开始执行' }}
+
+
+
+
+
+
+
+
+
+ {{ outreachData.whatsapp_message || '未生成' }}
+
+
+ {{ outreachData.linkedin_message || '未生成' }}
+
+
+
+
{{ $t('agent.subject') || '主题' }}:{{ outreachData.subject }}
+
{{ outreachData.email_body || '未生成' }}
+
+
+
+
+
+ {{ $t('agent.keyPoints') || '关键要点' }}:
+ {{ kp }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ leadDetail.match_reason || '暂无' }}
+ {{ leadDetail.company_summary || leadDetail.description || '暂无' }}
+ {{ leadDetail.product_fit || '暂无' }}
+ {{ leadDetail.country || '未知' }}
+ {{ leadDetail.source || '未知' }}
+
+ {{ leadDetail.url.substring(0, 50) }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/user-frontend/src/views/Profile.vue b/user-frontend/src/views/Profile.vue
index ceab703..ab0922f 100644
--- a/user-frontend/src/views/Profile.vue
+++ b/user-frontend/src/views/Profile.vue
@@ -11,19 +11,22 @@