1
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
// 类型定义
|
||||
// ============================================================
|
||||
|
||||
export type TaskType = 'callback' | 'priority_recall' | 'relationship'
|
||||
export type TaskType = 'callback' | 'priority_recall' | 'relationship' | 'high_priority'
|
||||
|
||||
export interface Task {
|
||||
id: string
|
||||
@@ -46,6 +46,24 @@ export interface Note {
|
||||
createdAt: string
|
||||
}
|
||||
|
||||
export interface RetentionClue {
|
||||
id: string
|
||||
/** 线索大类 */
|
||||
category: 'customer_basic' | 'consumption' | 'play_pref' | 'promo_pref' | 'social' | 'feedback'
|
||||
/** 摘要 */
|
||||
summary: string
|
||||
/** 详情 */
|
||||
detail?: string
|
||||
/** 线索来源:manual=助教手动,ai_consumption=系统自动,ai_note=备注分析 */
|
||||
source: 'manual' | 'ai_consumption' | 'ai_note'
|
||||
/** 记录助教ID(用于判断是否为"我") */
|
||||
recordedByAssistantId?: string
|
||||
/** 记录助教姓名 */
|
||||
recordedByName?: string
|
||||
/** 创建时间 */
|
||||
createdAt: string
|
||||
}
|
||||
|
||||
export interface PerformanceData {
|
||||
monthlyIncome: number
|
||||
incomeChange: number
|
||||
@@ -167,8 +185,8 @@ export const mockTasks: Task[] = [
|
||||
id: 'task-002',
|
||||
customerName: '李娜',
|
||||
customerAvatar: '/assets/images/avatar-default.png',
|
||||
taskType: 'priority_recall',
|
||||
taskTypeLabel: '优先召回',
|
||||
taskType: 'high_priority',
|
||||
taskTypeLabel: '高优先召回',
|
||||
deadline: '2026-03-08',
|
||||
heartScore: 6.5,
|
||||
hobbies: ['snooker'],
|
||||
@@ -233,10 +251,18 @@ export const mockTasks: Task[] = [
|
||||
export const mockTaskDetails: TaskDetail[] = [
|
||||
{
|
||||
...mockTasks[0],
|
||||
customerName: '王先生',
|
||||
taskTypeLabel: '高优先召回',
|
||||
heartScore: 8.5,
|
||||
aiAnalysis: {
|
||||
summary: '张伟是高价值回访客户,近期消费频次稳定,建议维持关系并推荐新课程。',
|
||||
suggestions: ['推荐斯诺克进阶课程', '赠送体验券增强粘性', '了解近期打球偏好变化'],
|
||||
summary: '最近 3 个月每周均有 1-2 次课程互动,客户反馈良好。上次服务评价 5 星,多次指定您为服务助教。',
|
||||
suggestions: ['询问近期是否有空,邀请体验新到的器材', '告知本周末有会员专属活动', '根据其偏好时段(晚间)推荐合适的时间'],
|
||||
},
|
||||
notes: [
|
||||
{ id: 'note-h5-1', content: '已通过微信联系王先生,表示对新到的斯诺克球桌感兴趣,周末可能来体验。', tagType: 'customer' as const, tagLabel: '客户:王先生', createdAt: '2026-02-05' },
|
||||
{ id: 'note-h5-2', content: '王先生最近出差较多,到店频率降低。建议等他回来后再约。', tagType: 'customer' as const, tagLabel: '客户:王先生', createdAt: '2026-01-20' },
|
||||
{ id: 'note-h5-3', content: '上次到店时推荐了会员续费活动,客户说考虑一下。', tagType: 'customer' as const, tagLabel: '客户:王先生', createdAt: '2026-01-08' },
|
||||
],
|
||||
notes: [],
|
||||
lastVisitDate: '2026-03-01',
|
||||
lastSpendAmount: 380,
|
||||
@@ -266,6 +292,98 @@ export const mockTaskDetails: TaskDetail[] = [
|
||||
},
|
||||
]
|
||||
|
||||
// ============================================================
|
||||
// Mock 数据 — 维客线索模块
|
||||
// ============================================================
|
||||
|
||||
// 维客线索 MOCK 数据
|
||||
// 说明:
|
||||
// - 后端已过滤,客户端直接使用
|
||||
// - 任务详情页:后端返回脱敏版本(移除 recordedByAssistantId 和 recordedByName)
|
||||
// - 客户详情页:后端返回完整版本(包含 recordedByAssistantId 和 recordedByName)
|
||||
//
|
||||
// 以下是任务详情页的 MOCK 数据(脱敏版本)
|
||||
export const mockRetentionClues: RetentionClue[] = [
|
||||
{
|
||||
id: 'clue-001',
|
||||
category: 'consumption',
|
||||
summary: '最近 3 个月每周均有 1-2 次课程互动,客户反馈良好',
|
||||
detail: '上次服务评价 5 星,多次指定您为服务助教。消费频次稳定,主要偏好中式台球 1v1 课程。',
|
||||
source: 'ai_consumption',
|
||||
createdAt: '2026-03-05 14:00',
|
||||
},
|
||||
{
|
||||
id: 'clue-002',
|
||||
category: 'play_pref',
|
||||
summary: '中式台球爱好者,技术水平中等偏上',
|
||||
detail: '对斯诺克也有兴趣,建议推荐进阶课程。',
|
||||
source: 'manual',
|
||||
recordedByAssistantId: 'assistant-001',
|
||||
recordedByName: '王芳',
|
||||
createdAt: '2026-03-01 10:30',
|
||||
},
|
||||
{
|
||||
id: 'clue-003',
|
||||
category: 'social',
|
||||
summary: '社交活跃,经常带朋友来店',
|
||||
detail: '可以发展为核心会员,推荐参加周末球友赛。',
|
||||
source: 'ai_note',
|
||||
// 后端脱敏:移除 recordedByAssistantId 和 recordedByName
|
||||
createdAt: '2026-02-28 16:45',
|
||||
},
|
||||
{
|
||||
id: 'clue-004',
|
||||
category: 'promo_pref',
|
||||
summary: '对储值活动敏感,倾向于大额充值',
|
||||
detail: '上次充值 2000 元,选择尊享套餐。建议定期推送专属优惠。',
|
||||
source: 'manual',
|
||||
// 后端脱敏:移除 recordedByAssistantId 和 recordedByName(因为不是当前用户)
|
||||
createdAt: '2026-02-25 09:15',
|
||||
},
|
||||
]
|
||||
|
||||
// 客户详情页的 MOCK 数据(完整版本,不脱敏)
|
||||
export const mockRetentionCluesForCustomerDetail: RetentionClue[] = [
|
||||
{
|
||||
id: 'clue-001',
|
||||
category: 'consumption',
|
||||
summary: '最近 3 个月每周均有 1-2 次课程互动,客户反馈良好',
|
||||
detail: '上次服务评价 5 星,多次指定您为服务助教。消费频次稳定,主要偏好中式台球 1v1 课程。',
|
||||
source: 'ai_consumption',
|
||||
createdAt: '2026-03-05 14:00',
|
||||
},
|
||||
{
|
||||
id: 'clue-002',
|
||||
category: 'play_pref',
|
||||
summary: '中式台球爱好者,技术水平中等偏上',
|
||||
detail: '对斯诺克也有兴趣,建议推荐进阶课程。',
|
||||
source: 'manual',
|
||||
recordedByAssistantId: 'assistant-001',
|
||||
recordedByName: '王芳',
|
||||
createdAt: '2026-03-01 10:30',
|
||||
},
|
||||
{
|
||||
id: 'clue-003',
|
||||
category: 'social',
|
||||
summary: '社交活跃,经常带朋友来店',
|
||||
detail: '可以发展为核心会员,推荐参加周末球友赛。',
|
||||
source: 'ai_note',
|
||||
recordedByAssistantId: 'assistant-003',
|
||||
recordedByName: '李明',
|
||||
createdAt: '2026-02-28 16:45',
|
||||
},
|
||||
{
|
||||
id: 'clue-004',
|
||||
category: 'promo_pref',
|
||||
summary: '对储值活动敏感,倾向于大额充值',
|
||||
detail: '上次充值 2000 元,选择尊享套餐。建议定期推送专属优惠。',
|
||||
source: 'manual',
|
||||
recordedByAssistantId: 'assistant-002',
|
||||
recordedByName: '刘强',
|
||||
createdAt: '2026-02-25 09:15',
|
||||
},
|
||||
]
|
||||
|
||||
// ============================================================
|
||||
// Mock 数据 — 备注模块
|
||||
// ============================================================
|
||||
@@ -295,9 +413,9 @@ export const mockNotes: Note[] = [
|
||||
},
|
||||
{
|
||||
id: 'note-004',
|
||||
content: 'Amy最近工作状态很好,主动承担了培训新员工的任务。但需要注意她最近加班较多,避免过度疲劳。建议适当调整排班。',
|
||||
content: 'Lucy最近工作状态很好,主动承担了培训新员工的任务。但需要注意她最近加班较多,避免过度疲劳。建议适当调整排班。',
|
||||
tagType: 'coach',
|
||||
tagLabel: '助教:Amy',
|
||||
tagLabel: '助教:Lucy',
|
||||
createdAt: '2024-11-26 11:30',
|
||||
},
|
||||
{
|
||||
@@ -344,14 +462,14 @@ export const mockNotes: Note[] = [
|
||||
},
|
||||
{
|
||||
id: 'note-011',
|
||||
content: 'Amy本周请假2天处理家事,已安排泡芙和小燕分担她的客户。回来后需要跟进客户交接情况。',
|
||||
content: 'Lucy本周请假2天处理家事,已安排泡芙和小燕分担她的客户。回来后需要跟进客户交接情况。',
|
||||
tagType: 'coach',
|
||||
tagLabel: '助教:Amy',
|
||||
tagLabel: '助教:Lucy',
|
||||
createdAt: '2024-11-22 10:15',
|
||||
},
|
||||
{
|
||||
id: 'note-012',
|
||||
content: 'Amy最近工作状态很好,主动承担了培训新员工的任务。但需要注意她最近加班较多,避免过度疲劳。',
|
||||
content: 'Lucy最近工作状态很好,主动承担了培训新员工的任务。但需要注意她最近加班较多,避免过度疲劳。',
|
||||
tagType: 'customer',
|
||||
tagLabel: '客户:李女士',
|
||||
createdAt: '2024-11-21 09:45',
|
||||
|
||||
Reference in New Issue
Block a user