diff --git a/Touchkebao/src/pages/pc/ckbox/commonConfig/components/ReceptionSettings/api.ts b/Touchkebao/src/pages/pc/ckbox/commonConfig/components/ReceptionSettings/api.ts new file mode 100644 index 00000000..82ed6ff9 --- /dev/null +++ b/Touchkebao/src/pages/pc/ckbox/commonConfig/components/ReceptionSettings/api.ts @@ -0,0 +1,9 @@ +import request from "@/api/request"; + +export const getAiSettings = () => { + return request("/v1/kefu/ai/settings/get", "GET"); +}; + +export const setAiSettings = (data: any) => { + return request("/v1/kefu/ai/settings/set", "POST", data); +}; diff --git a/Touchkebao/src/pages/pc/ckbox/commonConfig/components/ReceptionSettings/index.module.scss b/Touchkebao/src/pages/pc/ckbox/commonConfig/components/ReceptionSettings/index.module.scss new file mode 100644 index 00000000..eff73214 --- /dev/null +++ b/Touchkebao/src/pages/pc/ckbox/commonConfig/components/ReceptionSettings/index.module.scss @@ -0,0 +1,78 @@ +.container { + display: flex; + gap: 24px; + height: 100%; + + .left { + flex: 1; + min-width: 0; + + .tip { + background: #f6f8fa; + border: 1px solid #e1e4e8; + border-radius: 6px; + padding: 12px 16px; + margin-bottom: 20px; + font-size: 14px; + color: #586069; + line-height: 1.5; + } + + .formItem { + margin-bottom: 20px; + + .label { + font-size: 14px; + font-weight: 500; + color: #24292e; + margin-bottom: 8px; + } + } + + .primaryBtn { + margin-top: 20px; + height: 40px; + font-size: 14px; + font-weight: 500; + } + } + + .right { + flex: 1; + min-width: 0; + + :global(.ant-list-item) { + padding: 16px 0; + border-bottom: 1px solid #f0f0f0; + + &:last-child { + border-bottom: none; + } + } + + :global(.ant-list-item-meta-title) { + font-size: 14px; + font-weight: 500; + color: #24292e; + margin-bottom: 4px; + } + + :global(.ant-list-item-meta-description) { + font-size: 12px; + color: #586069; + } + } +} + +// 响应式设计 +@media (max-width: 768px) { + .container { + flex-direction: column; + gap: 16px; + + .left, + .right { + flex: none; + } + } +} diff --git a/Touchkebao/src/pages/pc/ckbox/commonConfig/components/ReceptionSettings/index.tsx b/Touchkebao/src/pages/pc/ckbox/commonConfig/components/ReceptionSettings/index.tsx new file mode 100644 index 00000000..8faa9da1 --- /dev/null +++ b/Touchkebao/src/pages/pc/ckbox/commonConfig/components/ReceptionSettings/index.tsx @@ -0,0 +1,114 @@ +import React, { useState } from "react"; +import { Card, Select, Button, Space, Tag, List } from "antd"; +import { DatabaseOutlined } from "@ant-design/icons"; +import styles from "./index.module.scss"; + +const { Option } = Select; + +const ReceptionSettings: React.FC = () => { + const [pool, setPool] = useState(); + const [mode, setMode] = useState("人工接待"); + + const pools = ["官网咨询", "朋友推荐", "展会获客"]; + const typeOptions = [ + { value: 0, label: "人工接待" }, + { value: 1, label: "AI辅助" }, + { value: 2, label: "AI接管" }, + ]; + const [currentConfig, setCurrentConfig] = useState(null); + + return ( +
+
+ + + 全局接待模式 + + } + > +
+ 支持按流量池批量设置,单个客户设置将覆盖流量池默认配置 +
+ +
+
选择流量池
+ +
+ +
+
接待模式
+ +
+ {JSON.stringify(currentConfig)} + +
+
+ +
+ + + 流量池状态 + + } + > + ( + + + + {index % 3 === 0 + ? "AI辅助" + : index % 3 === 1 + ? "人工接待" + : "AI接管"} + + + )} + /> + +
+
+ ); +}; + +export default ReceptionSettings; diff --git a/Touchkebao/src/pages/pc/ckbox/commonConfig/index.module.scss b/Touchkebao/src/pages/pc/ckbox/commonConfig/index.module.scss index 2fa1794a..23d55035 100644 --- a/Touchkebao/src/pages/pc/ckbox/commonConfig/index.module.scss +++ b/Touchkebao/src/pages/pc/ckbox/commonConfig/index.module.scss @@ -1,32 +1,50 @@ /* common-config page styles */ -.container { - display: grid; - grid-template-columns: 1fr 1fr; - gap: 16px; +.content { + flex: 1; + overflow: hidden; padding: 16px; } .tabsBar { - display: grid; - grid-template-columns: repeat(5, max-content); - gap: 24px; - padding: 12px 16px 0 16px; - color: #667085; + display: flex; + gap: 0; + border-bottom: 1px solid #e8e8e8; + margin-bottom: 24px; + padding: 0 16px; + + .tab { + padding: 12px 24px; + cursor: pointer; + border-bottom: 2px solid transparent; + color: #666; + font-size: 14px; + transition: all 0.3s; + user-select: none; + + &:hover { + color: #1890ff; + background-color: #f5f5f5; + } + } + + .tabActive { + color: #1890ff; + border-bottom-color: #1890ff; + background-color: #f0f8ff; + font-weight: 500; + } } -.tab { - padding: 10px 16px; +.placeholder { + display: flex; + align-items: center; + justify-content: center; + height: 400px; + font-size: 16px; + color: #999; + background: #fafafa; border-radius: 8px; - background: #f7f9fc; - cursor: pointer; -} - -.tabActive { - padding: 10px 16px; - border-radius: 8px; - background: #eef5ff; - color: #1677ff; - box-shadow: inset 0 0 0 1px #d6e6ff; + border: 1px dashed #d9d9d9; } .left, diff --git a/Touchkebao/src/pages/pc/ckbox/commonConfig/index.tsx b/Touchkebao/src/pages/pc/ckbox/commonConfig/index.tsx index e483937e..327d942c 100644 --- a/Touchkebao/src/pages/pc/ckbox/commonConfig/index.tsx +++ b/Touchkebao/src/pages/pc/ckbox/commonConfig/index.tsx @@ -1,18 +1,41 @@ import React, { useState } from "react"; import Layout from "@/components/Layout/LayoutFiexd"; import PowerNavigation from "@/components/PowerNavtion"; -import { Card, Select, Button, Space, Tag, List } from "antd"; -import { SettingOutlined, DatabaseOutlined } from "@ant-design/icons"; +import { Button, Space } from "antd"; +import ReceptionSettings from "./components/ReceptionSettings"; import styles from "./index.module.scss"; -const { Option } = Select; - const CommonConfig: React.FC = () => { - const [pool, setPool] = useState(); - const [mode, setMode] = useState("人工接待"); + const [activeTab, setActiveTab] = useState("reception"); - const pools = ["官网咨询", "朋友推荐", "展会获客"]; + const tabs = [ + { key: "reception", label: "接待设置" }, + { key: "notification", label: "通知设置" }, + { key: "system", label: "系统设置" }, + { key: "security", label: "安全设置" }, + { key: "advanced", label: "高级设置" }, + ]; + const handleTabClick = (tabKey: string) => { + setActiveTab(tabKey); + }; + + const renderTabContent = () => { + switch (activeTab) { + case "reception": + return ; + case "notification": + return
通知设置功能开发中...
; + case "system": + return
系统设置功能开发中...
; + case "security": + return
安全设置功能开发中...
; + case "advanced": + return
高级设置功能开发中...
; + default: + return ; + } + }; return ( { backButtonText="返回功能中心" />
-
接待设置
-
通知设置
-
系统设置
-
安全设置
-
高级设置
+ {tabs.map(tab => ( +
handleTabClick(tab.key)} + > + {tab.label} +
+ ))}
} footer={
- +
} > -
-
- - - 全局接待模式 - - } - > -
- 支持按流量池批量设置,单个客户设置将覆盖流量池默认配置 -
- -
-
选择流量池
- -
- -
-
接待模式
- -
- - -
-
- -
- - - 流量池状态 - - } - > - ( - - - - {index % 3 === 0 - ? "AI辅助" - : index % 3 === 1 - ? "人工接待" - : "AI接管"} - - - )} - /> - -
-
+
{renderTabContent()}
); }; diff --git a/Touchkebao/src/pages/pc/ckbox/index.tsx b/Touchkebao/src/pages/pc/ckbox/index.tsx index 039bac75..a74b6914 100644 --- a/Touchkebao/src/pages/pc/ckbox/index.tsx +++ b/Touchkebao/src/pages/pc/ckbox/index.tsx @@ -4,11 +4,7 @@ import { Outlet } from "react-router-dom"; import NavCommon from "./components/NavCommon"; const CkboxPage: React.FC = () => { return ( - - } - > + }> );