feat: 日志详情

This commit is contained in:
wangdan-fit2cloud 2024-01-22 10:43:51 +08:00
parent 5e407c86ff
commit c66419c104
2 changed files with 11 additions and 2 deletions

View File

@ -1,7 +1,7 @@
<template>
<el-drawer v-model="visible" size="60%" @close="closeHandel" class="chat-record-drawer">
<template #header>
<h4>{{ application?.name }}</h4>
<h4>{{ currentAbstract }}</h4>
</template>
<div
v-loading="paginationConfig.current_page === 1 && loading"
@ -44,6 +44,7 @@ const props = withDefaults(
* 对话 记录id
*/
chartId: string
currentAbstract: string
/**
* 下一条
*/
@ -60,7 +61,7 @@ const props = withDefaults(
{}
)
const emit = defineEmits(['update:chartId'])
const emit = defineEmits(['update:chartId', 'update:currentAbstract'])
const route = useRoute()
const {
@ -104,6 +105,7 @@ watch(
watch(visible, (bool) => {
if (!bool) {
emit('update:chartId', '')
emit('update:currentAbstract', '')
}
})

View File

@ -69,6 +69,7 @@
:pre="preChatRecord"
ref="ChatRecordRef"
v-model:chartId="currentChatId"
v-model:currentAbstract="currentAbstract"
:application="detail"
:pre_disable="pre_disable"
:next_disable="next_disable"
@ -129,6 +130,7 @@ const search = ref('')
const detail = ref<any>(null)
const currentChatId = ref<string>('')
const currentAbstract = ref<string>('')
/**
* 下一页
@ -146,9 +148,11 @@ const nextChatRecord = () => {
getList().then(() => {
index = 0
currentChatId.value = tableData.value[index].id
currentAbstract.value = tableData.value[index].abstract
})
} else {
currentChatId.value = tableData.value[index].id
currentAbstract.value = tableData.value[index].abstract
}
}
const pre_disable = computed(() => {
@ -178,14 +182,17 @@ const preChatRecord = () => {
getList().then((ok) => {
index = paginationConfig.page_size - 1
currentChatId.value = tableData.value[index].id
currentAbstract.value = tableData.value[index].abstract
})
} else {
currentChatId.value = tableData.value[index].id
currentAbstract.value = tableData.value[index].abstract
}
}
function rowClickHandle(row: any) {
currentChatId.value = row.id
currentAbstract.value = row.abstract
ChatRecordRef.value.open()
}