diff --git a/Cunkebao/dist/.vite/manifest.json b/Cunkebao/dist/.vite/manifest.json
index 06997412..426614a4 100644
--- a/Cunkebao/dist/.vite/manifest.json
+++ b/Cunkebao/dist/.vite/manifest.json
@@ -1,17 +1,17 @@
{
- "_charts-BjEBSMrK.js": {
- "file": "assets/charts-BjEBSMrK.js",
+ "_charts-DN1cefc8.js": {
+ "file": "assets/charts-DN1cefc8.js",
"name": "charts",
"imports": [
- "_ui-CiJ_pikt.js",
- "_vendor-BPPoWDlG.js"
+ "_ui-5V-xZWkf.js",
+ "_vendor-Bq99rrm8.js"
]
},
- "_ui-CiJ_pikt.js": {
- "file": "assets/ui-CiJ_pikt.js",
+ "_ui-5V-xZWkf.js": {
+ "file": "assets/ui-5V-xZWkf.js",
"name": "ui",
"imports": [
- "_vendor-BPPoWDlG.js"
+ "_vendor-Bq99rrm8.js"
],
"css": [
"assets/ui-D0C0OGrH.css"
@@ -21,30 +21,30 @@
"file": "assets/ui-D0C0OGrH.css",
"src": "_ui-D0C0OGrH.css"
},
- "_utils-DiZV3oaL.js": {
- "file": "assets/utils-DiZV3oaL.js",
+ "_utils-Ft3ushmX.js": {
+ "file": "assets/utils-Ft3ushmX.js",
"name": "utils",
"imports": [
- "_vendor-BPPoWDlG.js"
+ "_vendor-Bq99rrm8.js"
]
},
- "_vendor-BPPoWDlG.js": {
- "file": "assets/vendor-BPPoWDlG.js",
+ "_vendor-Bq99rrm8.js": {
+ "file": "assets/vendor-Bq99rrm8.js",
"name": "vendor"
},
"index.html": {
- "file": "assets/index-DPe1huLQ.js",
+ "file": "assets/index-9Clf2a7g.js",
"name": "index",
"src": "index.html",
"isEntry": true,
"imports": [
- "_vendor-BPPoWDlG.js",
- "_utils-DiZV3oaL.js",
- "_ui-CiJ_pikt.js",
- "_charts-BjEBSMrK.js"
+ "_vendor-Bq99rrm8.js",
+ "_ui-5V-xZWkf.js",
+ "_utils-Ft3ushmX.js",
+ "_charts-DN1cefc8.js"
],
"css": [
- "assets/index-prcd5sVt.css"
+ "assets/index-CK1wd128.css"
]
}
}
\ No newline at end of file
diff --git a/Cunkebao/dist/index.html b/Cunkebao/dist/index.html
index f953a3da..408e052b 100644
--- a/Cunkebao/dist/index.html
+++ b/Cunkebao/dist/index.html
@@ -11,13 +11,13 @@
-
-
-
-
-
+
+
+
+
+
-
+
diff --git a/Cunkebao/src/pages/mobile/mine/content/form/index.tsx b/Cunkebao/src/pages/mobile/mine/content/form/index.tsx
index 0082d02c..2aed0816 100644
--- a/Cunkebao/src/pages/mobile/mine/content/form/index.tsx
+++ b/Cunkebao/src/pages/mobile/mine/content/form/index.tsx
@@ -48,6 +48,11 @@ export default function ContentForm() {
const [showEndPicker, setShowEndPicker] = useState(false);
const [keywordsInclude, setKeywordsInclude] = useState("");
const [keywordsExclude, setKeywordsExclude] = useState("");
+ const [catchType, setCatchType] = useState([
+ "text",
+ "image",
+ "video",
+ ]);
const [submitting, setSubmitting] = useState(false);
const [loading, setLoading] = useState(false);
@@ -65,6 +70,7 @@ export default function ContentForm() {
setSelectedFriendsOptions(data.friendsGroupsOptions || []);
setKeywordsInclude((data.keywordInclude || []).join(","));
setKeywordsExclude((data.keywordExclude || []).join(","));
+ setCatchType(data.catchType || ["text", "image", "video"]);
setAIPrompt(data.aiPrompt || "");
setUseAI(!!data.aiPrompt);
setEnabled(data.status === 1);
@@ -108,6 +114,7 @@ export default function ContentForm() {
.split(/,|,|\n|\s+/)
.map(s => s.trim())
.filter(Boolean),
+ catchType,
aiPrompt,
timeEnabled: dateRange[0] || dateRange[1] ? 1 : 0,
startTime: dateRange[0] ? formatDate(dateRange[0]) : "",
@@ -236,6 +243,46 @@ export default function ContentForm() {
+ {/* 采集内容类型 */}
+ 采集内容类型
+
+
+ {["text", "image", "video"].map(type => (
+
{
+ setCatchType(prev =>
+ prev.includes(type)
+ ? prev.filter(t => t !== type)
+ : [...prev, type],
+ );
+ }}
+ >
+
+ {type === "text"
+ ? "文本"
+ : type === "image"
+ ? "图片"
+ : "视频"}
+
+
+ ))}
+
+
+
是否启用AI
void;
className?: string;
disabled?: boolean;
}
const ChatRecord: React.FC = ({
- onSearch,
className,
disabled = false,
}) => {
@@ -22,6 +21,7 @@ const ChatRecord: React.FC = ({
null,
);
const [loading, setLoading] = useState(false);
+ const SearchMessage = useWeChatStore(state => state.SearchMessage);
// 打开弹窗
const openModal = () => {
@@ -43,26 +43,15 @@ const ChatRecord: React.FC = ({
return;
}
- if (!searchContent.trim()) {
- message.warning("请输入查找内容");
- return;
- }
-
try {
setLoading(true);
-
+ const [From, To] = dateRange;
const searchData = {
- dateRange: [
- dateRange[0].format("YYYY-MM-DD 00:00:00"),
- dateRange[1].format("YYYY-MM-DD 23:59:59"),
- ] as [string, string],
- content: searchContent.trim(),
+ From: From.unix() * 1000,
+ To: To.unix() * 1000,
+ keyword: searchContent.trim(),
};
-
- // 调用回调函数
- if (onSearch) {
- await onSearch(searchData);
- }
+ await SearchMessage(searchData);
message.success("查找完成");
closeModal();
diff --git a/Cunkebao/src/pages/pc/ckbox/weChat/components/ChatWindow/components/MessageEnter/components/toContract/index.tsx b/Cunkebao/src/pages/pc/ckbox/weChat/components/ChatWindow/components/MessageEnter/components/toContract/index.tsx
index 8fd4c404..be2f9cb2 100644
--- a/Cunkebao/src/pages/pc/ckbox/weChat/components/ChatWindow/components/MessageEnter/components/toContract/index.tsx
+++ b/Cunkebao/src/pages/pc/ckbox/weChat/components/ChatWindow/components/MessageEnter/components/toContract/index.tsx
@@ -7,7 +7,7 @@ import {
WechatFriendRebackAllot,
} from "@/pages/pc/ckbox/weChat/api";
import { useCurrentContact } from "@/store/module/weChat/weChat";
-import { deleteChatSession } from "@/store/module/ckchat/ckchat";
+import { useCkChatStore } from "@/store/module/ckchat/ckchat";
import { contractService, weChatGroupService } from "@/utils/db";
const { TextArea } = Input;
const { Option } = Select;
@@ -39,6 +39,7 @@ const ToContract: React.FC = ({
const [customerServiceList, setCustomerServiceList] = useState(
[],
);
+ const deleteChatSession = useCkChatStore(state => state.deleteChatSession);
// 打开弹窗
const openModal = () => {
setVisible(true);
@@ -89,12 +90,12 @@ const ToContract: React.FC = ({
message.success("转接成功");
try {
// 删除聊天会话
- deleteChatSession(currentContact.id.toString());
+ deleteChatSession(currentContact.id);
// 删除本地数据库记录
if ("chatroomId" in currentContact) {
await weChatGroupService.delete(currentContact.id);
} else {
- await contractService.delete(currentContact.id.toString());
+ await contractService.delete(currentContact.id);
}
} catch (deleteError) {
console.error("删除本地数据失败:", deleteError);
@@ -129,7 +130,7 @@ const ToContract: React.FC = ({
message.success("转回成功");
try {
// 删除聊天会话
- deleteChatSession(currentContact.id.toString());
+ deleteChatSession(currentContact.id);
// 删除本地数据库记录
if ("chatroomId" in currentContact) {
await weChatGroupService.delete(currentContact.id);
diff --git a/Cunkebao/src/pages/pc/ckbox/weChat/components/ChatWindow/components/MessageEnter/index.tsx b/Cunkebao/src/pages/pc/ckbox/weChat/components/ChatWindow/components/MessageEnter/index.tsx
index 7676158d..70dd3370 100644
--- a/Cunkebao/src/pages/pc/ckbox/weChat/components/ChatWindow/components/MessageEnter/index.tsx
+++ b/Cunkebao/src/pages/pc/ckbox/weChat/components/ChatWindow/components/MessageEnter/index.tsx
@@ -1,12 +1,9 @@
import React, { useState } from "react";
-import { Layout, Input, Button, Tooltip, Modal } from "antd";
+import { Layout, Input, Button, Modal } from "antd";
import {
- ShareAltOutlined,
SendOutlined,
- AudioOutlined,
FolderOutlined,
PictureOutlined,
- MessageOutlined,
} from "@ant-design/icons";
import { ContractData, weChatGroup } from "@/pages/pc/ckbox/data";
import { useWebSocketStore } from "@/store/module/websocket/websocket";
@@ -176,24 +173,8 @@ const MessageEnter: React.FC = ({ contract }) => {
/>
- {
- console.log("转接数据:", data);
- // 这里可以添加实际的转接逻辑
- }}
- onReturn={() => {
- console.log("执行一键转回操作");
- // 这里可以添加实际的转回逻辑
- }}
- />
- {
- console.log("查找数据:", data);
- // 这里可以添加实际的查找逻辑
- }}
- />
+
+
diff --git a/Cunkebao/src/store/module/ckchat/ckchat.data.ts b/Cunkebao/src/store/module/ckchat/ckchat.data.ts
index 9477aacb..3d74c36c 100644
--- a/Cunkebao/src/store/module/ckchat/ckchat.data.ts
+++ b/Cunkebao/src/store/module/ckchat/ckchat.data.ts
@@ -60,7 +60,7 @@ export interface CkChatState {
updateCtrlUser: (user: KfUserListData) => void;
clearkfUserList: () => void;
addChatSession: (session: any) => void;
- deleteChatSession: (sessionId: string) => void;
+ deleteChatSession: (sessionId: number) => void;
setUserInfo: (userInfo: CkUserInfo) => void;
clearUserInfo: () => void;
updateAccount: (account: Partial) => void;
diff --git a/Cunkebao/src/store/module/ckchat/ckchat.ts b/Cunkebao/src/store/module/ckchat/ckchat.ts
index 3ac0ba7f..1b44fcbe 100644
--- a/Cunkebao/src/store/module/ckchat/ckchat.ts
+++ b/Cunkebao/src/store/module/ckchat/ckchat.ts
@@ -9,7 +9,10 @@ import {
} from "@/pages/pc/ckbox/data";
import { weChatGroupService, contractService } from "@/utils/db";
import { createContractList } from "@/store/module/ckchat/api";
-
+import { useWeChatStore } from "@/store/module/weChat/weChat";
+// 从weChat store获取clearCurrentContact方法
+const getClearCurrentContact = () =>
+ useWeChatStore.getState().clearCurrentContact;
export const useCkChatStore = createPersistStore(
set => ({
userInfo: null,
@@ -389,10 +392,12 @@ export const useCkChatStore = createPersistStore(
}));
},
// 删除聊天会话
- deleteChatSession: (sessionId: string) => {
+ deleteChatSession: (sessionId: number) => {
set(state => ({
chatSessions: state.chatSessions.filter(item => item.id !== sessionId),
}));
+ //当前选中的客户清空
+ getClearCurrentContact();
},
// 设置用户信息
setUserInfo: (userInfo: CkUserInfo) => {
diff --git a/Cunkebao/src/store/module/weChat/weChat.data.ts b/Cunkebao/src/store/module/weChat/weChat.data.ts
index f7839ef0..7cdd4b73 100644
--- a/Cunkebao/src/store/module/weChat/weChat.data.ts
+++ b/Cunkebao/src/store/module/weChat/weChat.data.ts
@@ -6,7 +6,8 @@ export interface WeChatState {
// 当前聊天用户的消息列表(只存储当前聊天用户的消息)
currentMessages: ChatRecord[];
-
+ // 清空当前联系人
+ clearCurrentContact: () => void;
// 消息加载状态
messagesLoading: boolean;
isLoadingData: boolean;
diff --git a/Cunkebao/src/store/module/weChat/weChat.ts b/Cunkebao/src/store/module/weChat/weChat.ts
index fa537c1d..f4f3cb0c 100644
--- a/Cunkebao/src/store/module/weChat/weChat.ts
+++ b/Cunkebao/src/store/module/weChat/weChat.ts
@@ -24,7 +24,10 @@ export const useWeChatStore = create()(
messagesLoading: false,
isLoadingData: false,
currentGroupMembers: [],
-
+ //清空当前联系人
+ clearCurrentContact: () => {
+ set({ currentContract: null, currentMessages: [] });
+ },
// Actions
setCurrentContact: (
contract: ContractData | weChatGroup,