From 89c8821dce8a00f63c66ff448abdc93362cb51a4 Mon Sep 17 00:00:00 2001 From: zhangzhanwei Date: Mon, 25 Aug 2025 14:35:48 +0800 Subject: [PATCH] feat: Support searching application conversation logs by user --- ui/src/locales/lang/en-US/views/chat-log.ts | 1 + ui/src/locales/lang/zh-CN/views/chat-log.ts | 1 + ui/src/locales/lang/zh-Hant/views/chat-log.ts | 1 + ui/src/views/chat-log/index.vue | 38 ++++++++++++++----- 4 files changed, 32 insertions(+), 9 deletions(-) diff --git a/ui/src/locales/lang/en-US/views/chat-log.ts b/ui/src/locales/lang/en-US/views/chat-log.ts index b8ff8c087..d0abce206 100644 --- a/ui/src/locales/lang/en-US/views/chat-log.ts +++ b/ui/src/locales/lang/en-US/views/chat-log.ts @@ -12,6 +12,7 @@ export default { }, table: { abstract: 'Title', + username: 'User', chat_record_count: 'Total Messages', user: 'User', feedback: { diff --git a/ui/src/locales/lang/zh-CN/views/chat-log.ts b/ui/src/locales/lang/zh-CN/views/chat-log.ts index b7122accc..bafe15bed 100644 --- a/ui/src/locales/lang/zh-CN/views/chat-log.ts +++ b/ui/src/locales/lang/zh-CN/views/chat-log.ts @@ -12,6 +12,7 @@ export default { }, table: { abstract: '摘要', + username: '用户', chat_record_count: '对话提问数', user: '用户', feedback: { diff --git a/ui/src/locales/lang/zh-Hant/views/chat-log.ts b/ui/src/locales/lang/zh-Hant/views/chat-log.ts index 4c774e5fd..b8e27a3e2 100644 --- a/ui/src/locales/lang/zh-Hant/views/chat-log.ts +++ b/ui/src/locales/lang/zh-Hant/views/chat-log.ts @@ -12,6 +12,7 @@ export default { }, table: { abstract: '摘要', + username: '用戶', chat_record_count: '對話提問數', user: '用戶', feedback: { diff --git a/ui/src/views/chat-log/index.vue b/ui/src/views/chat-log/index.vue index 8e775ac62..bf97d0192 100644 --- a/ui/src/views/chat-log/index.vue +++ b/ui/src/views/chat-log/index.vue @@ -4,6 +4,23 @@
+ + + + + -
{{ $t('views.chatLog.buttons.clearStrategy') }} @@ -256,6 +265,15 @@ const { const emit = defineEmits(['refresh']) const formRef = ref() +const search_form = ref({ + abstract: '', + username: '', +}) + +const search_type_change = () => { + search_form.value = {abstract: '', username: ''} +} + const dayOptions = [ { value: 7, @@ -308,6 +326,7 @@ const tableIndexMap = computed>(() => { .reduce((pre, next) => ({ ...pre, ...next }), {}) }) const history_day = ref(7) +const query_option = ref('abstract') const search = ref('') const detail = ref(null) @@ -416,7 +435,8 @@ function getList() { ...filter.value, } if (search.value) { - obj = { ...obj, abstract: search.value } + if (query_option.value === 'abstract'){obj = { ...obj, abstract: search.value }} + else if (query_option.value === 'username'){obj = { ...obj, username: search.value }} } return loadSharedApi({ type: 'chatLog', systemType: apiType.value }) .getChatLog(id as string, paginationConfig, obj, loading)