Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
7acc2fcb
authored
May 17, 2024
by
cherishsince
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【增加】AI 对话增加搜索
parent
2b38e62c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
src/views/ai/chat/Conversation.vue
+5
-5
No files found.
src/views/ai/chat/Conversation.vue
View file @
7acc2fcb
...
@@ -106,17 +106,16 @@ const emits = defineEmits(['onConversationClick', 'onConversationClear', 'onConv
...
@@ -106,17 +106,16 @@ const emits = defineEmits(['onConversationClick', 'onConversationClear', 'onConv
/**
/**
* 对话 - 搜索
* 对话 - 搜索
*/
*/
const
searchConversation
=
(
e
)
=>
{
const
searchConversation
=
async
(
e
)
=>
{
// 恢复数据
// 恢复数据
if
(
!
searchName
.
value
.
trim
().
length
)
{
if
(
!
searchName
.
value
.
trim
().
length
)
{
conversationMap
.
value
=
conversationTimeGroup
(
conversationList
.
value
)
conversationMap
.
value
=
await
conversationTimeGroup
(
conversationList
.
value
)
}
else
{
}
else
{
// 过滤
// 过滤
const
filterValues
=
conversationList
.
value
.
filter
(
item
=>
{
const
filterValues
=
conversationList
.
value
.
filter
(
item
=>
{
console
.
log
(
'ss'
,
item
.
title
.
indexOf
(
searchName
.
value
))
return
item
.
title
.
includes
(
searchName
.
value
.
trim
())
return
item
.
title
.
indexOf
(
searchName
.
value
)
!==
-
1
})
})
conversationMap
.
value
=
conversationTimeGroup
(
filterValues
)
conversationMap
.
value
=
await
conversationTimeGroup
(
filterValues
)
}
}
}
}
...
@@ -196,6 +195,7 @@ const conversationTimeGroup = async (list: ChatConversationVO[]) => {
...
@@ -196,6 +195,7 @@ const conversationTimeGroup = async (list: ChatConversationVO[]) => {
groupMap
[
'三十天前'
].
push
(
conversation
)
groupMap
[
'三十天前'
].
push
(
conversation
)
}
}
}
}
console
.
log
(
'----groupMap'
,
groupMap
)
return
groupMap
return
groupMap
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment