解决es搜索时按人搜索和按群搜索的跳转不正确问题;解决按日期搜索后切换其他条件或取消没有正确重置日期选择问题

This commit is contained in:
wangyifeng 2025-06-10 14:50:15 +08:00
parent d55616e2e7
commit 5f4dd80b2a
3 changed files with 18 additions and 2 deletions

View File

@ -309,7 +309,8 @@ import { MessageComponents } from '@/constant/message'
const emits = defineEmits([
'clearSearchMemberByAlphabet',
'getDisabledDateArray',
'hideSearchResultModal'
'hideSearchResultModal',
'clearSelectedDateTime'
])
const dialogueStore = useDialogueStore()
@ -753,6 +754,10 @@ const resetSearchConditions = (newVal) => {
state.group_member_id = 0
emits('clearSearchMemberByAlphabet')
}
if (newVal !== 'date') {
state.selectedDateTime = null
emits('clearSelectedDateTime')
}
}
//
@ -834,7 +839,6 @@ watch(
queryAllSearch()
},
{
immediate: true,
deep: true
}
)

View File

@ -487,6 +487,11 @@ const hideSearchResultModal = () => {
handleSearchRecordByConditionModalClose()
state.isShowGroupAside = false
}
//
const clearSelectedDateTime = () => {
onDatePickClear()
}
</script>
<template>
@ -714,6 +719,7 @@ const hideSearchResultModal = () => {
:selectedDateTime="state.selectedDateTime"
:nowDateTime="state.nowDateTime"
@hideSearchResultModal="hideSearchResultModal"
@clearSelectedDateTime="clearSelectedDateTime"
/>
</div>
</n-card>

View File

@ -89,6 +89,12 @@ const renderChatAppSearch = () => {
state.searchRecordText = searchText
state.selectItemInList = res
} else {
if(searchResultKey === 'user_infos'){
talk_type = 1
}
if(searchResultKey === 'combinedGroup'){
talk_type = 2
}
talkStore.toTalk(talk_type, receiver_id, router)
}
state.showSearchDropdown = false