Commit 8dde243d authored by shirlyn.guo's avatar shirlyn.guo 👌🏻

Merge branch 'master' of https://gitlab.gsstcloud.com/poc/poc-fe into shirlyn

parents ff7b0ded 5b8ffb5a
...@@ -97,6 +97,7 @@ function handleCreateNewSession() { ...@@ -97,6 +97,7 @@ function handleCreateNewSession() {
isAgentResponding.value = false isAgentResponding.value = false
emit('createNewSession') emit('createNewSession')
handleFileUploadCancel()
/* 延时,避免页面刷新后,历史记录列表未刷新 */ /* 延时,避免页面刷新后,历史记录列表未刷新 */
setTimeout(() => { setTimeout(() => {
...@@ -111,6 +112,7 @@ function handleCreateNewSession() { ...@@ -111,6 +112,7 @@ function handleCreateNewSession() {
} }
emit('createNewSession') emit('createNewSession')
handleFileUploadCancel()
} }
} }
...@@ -283,6 +285,10 @@ function handleFileUploadCancel() { ...@@ -283,6 +285,10 @@ function handleFileUploadCancel() {
function handleFileUploadReplace() { function handleFileUploadReplace() {
handleFileUploadPopup() handleFileUploadPopup()
} }
defineExpose({
clearSessionReferenceFile: handleFileUploadCancel,
})
</script> </script>
<template> <template>
......
...@@ -19,6 +19,7 @@ const emit = defineEmits<{ ...@@ -19,6 +19,7 @@ const emit = defineEmits<{
getMessageRecordList: [recordId: string] getMessageRecordList: [recordId: string]
createNewSession: [] createNewSession: []
historyRecordListUpdate: [] historyRecordListUpdate: []
clearSessionReferenceFile: []
}>() }>()
const isShowHistoryMenu = defineModel<boolean>({ default: true }) const isShowHistoryMenu = defineModel<boolean>({ default: true })
...@@ -143,6 +144,7 @@ function handleRecordItemApply(dialogsId: string) { ...@@ -143,6 +144,7 @@ function handleRecordItemApply(dialogsId: string) {
isAgentResponding.value = false isAgentResponding.value = false
emit('getMessageRecordList', dialogsId) emit('getMessageRecordList', dialogsId)
emit('clearSessionReferenceFile')
/* 延时,避免页面刷新后,历史记录列表未刷新 */ /* 延时,避免页面刷新后,历史记录列表未刷新 */
setTimeout(() => { setTimeout(() => {
...@@ -155,6 +157,7 @@ function handleRecordItemApply(dialogsId: string) { ...@@ -155,6 +157,7 @@ function handleRecordItemApply(dialogsId: string) {
// }) // })
emit('getMessageRecordList', dialogsId) emit('getMessageRecordList', dialogsId)
emit('clearSessionReferenceFile')
} }
} }
......
...@@ -17,6 +17,7 @@ const { t } = useI18n() ...@@ -17,6 +17,7 @@ const { t } = useI18n()
const homeContainerRef = useTemplateRef<HTMLDivElement>('homeContainerRef') const homeContainerRef = useTemplateRef<HTMLDivElement>('homeContainerRef')
const messageListRef = useTemplateRef<InstanceType<typeof MessageList>>('messageListRef') const messageListRef = useTemplateRef<InstanceType<typeof MessageList>>('messageListRef')
const historyMenuSidebarRef = useTemplateRef<InstanceType<typeof HistoryMenuSidebar>>('historyMenuSidebarRef') const historyMenuSidebarRef = useTemplateRef<InstanceType<typeof HistoryMenuSidebar>>('historyMenuSidebarRef')
const footerOperationRef = useTemplateRef<InstanceType<typeof FooterOperation>>('footerOperationRef')
const { width: homeContainerWidth } = useElementSize(homeContainerRef) const { width: homeContainerWidth } = useElementSize(homeContainerRef)
...@@ -195,6 +196,10 @@ function onGetMessageRecordList(recordId: string) { ...@@ -195,6 +196,10 @@ function onGetMessageRecordList(recordId: string) {
loadingCtl.destroy() loadingCtl.destroy()
}) })
} }
function onClearSessionReferenceFile() {
footerOperationRef.value && footerOperationRef.value.clearSessionReferenceFile()
}
</script> </script>
<template> <template>
...@@ -213,6 +218,7 @@ function onGetMessageRecordList(recordId: string) { ...@@ -213,6 +218,7 @@ function onGetMessageRecordList(recordId: string) {
<MessageList v-show="isShowMessageList" ref="messageListRef" :message-list="messageList" /> <MessageList v-show="isShowMessageList" ref="messageListRef" :message-list="messageList" />
<FooterOperation <FooterOperation
ref="footerOperationRef"
v-model:current-agent-application="currentAgentApplication" v-model:current-agent-application="currentAgentApplication"
v-model:is-agent-responding="isAgentResponding" v-model:is-agent-responding="isAgentResponding"
v-model:question-content="questionContent" v-model:question-content="questionContent"
...@@ -237,6 +243,7 @@ function onGetMessageRecordList(recordId: string) { ...@@ -237,6 +243,7 @@ function onGetMessageRecordList(recordId: string) {
@get-message-record-list="onGetMessageRecordList" @get-message-record-list="onGetMessageRecordList"
@create-new-session="onCreateNewSession" @create-new-session="onCreateNewSession"
@history-record-list-update="onHistoryRecordListUpdate" @history-record-list-update="onHistoryRecordListUpdate"
@clear-session-reference-file="onClearSessionReferenceFile"
/> />
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment