Files
kefu_cloud/web/src/pages/agent/settings/tabs.tsx
T
yml2213 6304f97bc3 refactor(web): 拆分 Dashboard/Settings/VisitorChat 超大组件为子模块
- Dashboard 2591→1944 行,抽出 dashboard/ 纯函数、客户资料字段与 5 个状态自持弹窗
- Settings 1602→478 行,抽出 settings/ 16 个分区模块(设置卡片、弹窗与工具函数)
- VisitorChat 1343→1045 行,抽出 visitor/ 头部、消息区、输入区与评价浮层
- 均为纯代码搬移:行为、路由入口与导出不变;tsc -b 与 vite build 通过
2026-09-05 14:40:14 +08:00

47 lines
1.7 KiB
TypeScript

import type { ReactNode } from 'react'
import {
SettingOutlined, ApiOutlined, UserSwitchOutlined,
TeamOutlined, TagsOutlined, ClockCircleOutlined,
MessageOutlined, BellOutlined,
} from '@ant-design/icons'
export interface TabItem {
key: string
label: string
desc: string
icon: ReactNode
}
export interface TabGroup {
groupName: string
items: TabItem[]
}
export const tabGroups: TabGroup[] = [
{
groupName: '企业与渠道',
items: [
{ key: 'basic', label: '基本设置', desc: '租户展示名称、默认昵称与时区', icon: <SettingOutlined /> },
{ key: 'channels', label: '渠道管理', desc: '配置客户服务接入渠道与嵌入代码', icon: <ApiOutlined /> },
{ key: 'staff', label: '坐席账号', desc: '管理客服/主管账号与坐席配额', icon: <UserSwitchOutlined /> },
],
},
{
groupName: '规则与路由',
items: [
{ key: 'assignment', label: '客服分配规则', desc: '自动分配策略与并发上限', icon: <TeamOutlined /> },
{ key: 'tags', label: '客户标签', desc: '维护标签库,坐席为客户打标时选择', icon: <TagsOutlined /> },
{ key: 'worktime', label: '工作时间', desc: '在线服务时段与非工作时间提示', icon: <ClockCircleOutlined /> },
],
},
{
groupName: '自动化与通知',
items: [
{ key: 'autoreply', label: '自动回复', desc: '多段欢迎语(含图片)与离线留言提示', icon: <MessageOutlined /> },
{ key: 'notify', label: '通知设置', desc: '新会话、留言与日报偏好', icon: <BellOutlined /> },
],
},
]
export const tabItems: TabItem[] = tabGroups.flatMap(g => g.items)