feat: Support searching application conversation logs by user
parent
934c61538d
commit
89c8821dce
|
|
@ -12,6 +12,7 @@ export default {
|
||||||
},
|
},
|
||||||
table: {
|
table: {
|
||||||
abstract: 'Title',
|
abstract: 'Title',
|
||||||
|
username: 'User',
|
||||||
chat_record_count: 'Total Messages',
|
chat_record_count: 'Total Messages',
|
||||||
user: 'User',
|
user: 'User',
|
||||||
feedback: {
|
feedback: {
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ export default {
|
||||||
},
|
},
|
||||||
table: {
|
table: {
|
||||||
abstract: '摘要',
|
abstract: '摘要',
|
||||||
|
username: '用户',
|
||||||
chat_record_count: '对话提问数',
|
chat_record_count: '对话提问数',
|
||||||
user: '用户',
|
user: '用户',
|
||||||
feedback: {
|
feedback: {
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ export default {
|
||||||
},
|
},
|
||||||
table: {
|
table: {
|
||||||
abstract: '摘要',
|
abstract: '摘要',
|
||||||
|
username: '用戶',
|
||||||
chat_record_count: '對話提問數',
|
chat_record_count: '對話提問數',
|
||||||
user: '用戶',
|
user: '用戶',
|
||||||
feedback: {
|
feedback: {
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,23 @@
|
||||||
|
|
||||||
<el-card style="--el-card-padding: 24px">
|
<el-card style="--el-card-padding: 24px">
|
||||||
<div class="mb-16">
|
<div class="mb-16">
|
||||||
|
<el-select
|
||||||
|
v-model="query_option"
|
||||||
|
class="mr-12"
|
||||||
|
@change="search_type_change"
|
||||||
|
style="width: 75px"
|
||||||
|
>
|
||||||
|
<el-option :label="$t('views.chatLog.table.abstract')" value="abstract" />
|
||||||
|
<el-option :label="$t('views.chatLog.table.username')" value="username" />
|
||||||
|
</el-select>
|
||||||
|
<el-input
|
||||||
|
v-model="search"
|
||||||
|
@change="getList"
|
||||||
|
:placeholder="$t('common.search')"
|
||||||
|
prefix-icon="Search"
|
||||||
|
class="w-240 mr-12"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="history_day"
|
v-model="history_day"
|
||||||
class="mr-12"
|
class="mr-12"
|
||||||
|
|
@ -29,14 +46,6 @@
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
class="mr-12"
|
class="mr-12"
|
||||||
/>
|
/>
|
||||||
<el-input
|
|
||||||
v-model="search"
|
|
||||||
@change="getList"
|
|
||||||
:placeholder="$t('common.search')"
|
|
||||||
prefix-icon="Search"
|
|
||||||
class="w-240"
|
|
||||||
clearable
|
|
||||||
/>
|
|
||||||
<div style="display: flex; align-items: center" class="float-right">
|
<div style="display: flex; align-items: center" class="float-right">
|
||||||
<el-button @click="dialogVisible = true" v-if="permissionPrecise.chat_log_clear(id)">
|
<el-button @click="dialogVisible = true" v-if="permissionPrecise.chat_log_clear(id)">
|
||||||
{{ $t('views.chatLog.buttons.clearStrategy') }}
|
{{ $t('views.chatLog.buttons.clearStrategy') }}
|
||||||
|
|
@ -256,6 +265,15 @@ const {
|
||||||
const emit = defineEmits(['refresh'])
|
const emit = defineEmits(['refresh'])
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
|
|
||||||
|
const search_form = ref<any>({
|
||||||
|
abstract: '',
|
||||||
|
username: '',
|
||||||
|
})
|
||||||
|
|
||||||
|
const search_type_change = () => {
|
||||||
|
search_form.value = {abstract: '', username: ''}
|
||||||
|
}
|
||||||
|
|
||||||
const dayOptions = [
|
const dayOptions = [
|
||||||
{
|
{
|
||||||
value: 7,
|
value: 7,
|
||||||
|
|
@ -308,6 +326,7 @@ const tableIndexMap = computed<Dict<number>>(() => {
|
||||||
.reduce((pre, next) => ({ ...pre, ...next }), {})
|
.reduce((pre, next) => ({ ...pre, ...next }), {})
|
||||||
})
|
})
|
||||||
const history_day = ref<number | string>(7)
|
const history_day = ref<number | string>(7)
|
||||||
|
const query_option = ref<string>('abstract')
|
||||||
|
|
||||||
const search = ref('')
|
const search = ref('')
|
||||||
const detail = ref<any>(null)
|
const detail = ref<any>(null)
|
||||||
|
|
@ -416,7 +435,8 @@ function getList() {
|
||||||
...filter.value,
|
...filter.value,
|
||||||
}
|
}
|
||||||
if (search.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 })
|
return loadSharedApi({ type: 'chatLog', systemType: apiType.value })
|
||||||
.getChatLog(id as string, paginationConfig, obj, loading)
|
.getChatLog(id as string, paginationConfig, obj, loading)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue