feat: 日志详情
This commit is contained in:
parent
5e407c86ff
commit
c66419c104
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-drawer v-model="visible" size="60%" @close="closeHandel" class="chat-record-drawer">
|
<el-drawer v-model="visible" size="60%" @close="closeHandel" class="chat-record-drawer">
|
||||||
<template #header>
|
<template #header>
|
||||||
<h4>{{ application?.name }}</h4>
|
<h4>{{ currentAbstract }}</h4>
|
||||||
</template>
|
</template>
|
||||||
<div
|
<div
|
||||||
v-loading="paginationConfig.current_page === 1 && loading"
|
v-loading="paginationConfig.current_page === 1 && loading"
|
||||||
@ -44,6 +44,7 @@ const props = withDefaults(
|
|||||||
* 对话 记录id
|
* 对话 记录id
|
||||||
*/
|
*/
|
||||||
chartId: string
|
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 route = useRoute()
|
||||||
const {
|
const {
|
||||||
@ -104,6 +105,7 @@ watch(
|
|||||||
watch(visible, (bool) => {
|
watch(visible, (bool) => {
|
||||||
if (!bool) {
|
if (!bool) {
|
||||||
emit('update:chartId', '')
|
emit('update:chartId', '')
|
||||||
|
emit('update:currentAbstract', '')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -69,6 +69,7 @@
|
|||||||
:pre="preChatRecord"
|
:pre="preChatRecord"
|
||||||
ref="ChatRecordRef"
|
ref="ChatRecordRef"
|
||||||
v-model:chartId="currentChatId"
|
v-model:chartId="currentChatId"
|
||||||
|
v-model:currentAbstract="currentAbstract"
|
||||||
:application="detail"
|
:application="detail"
|
||||||
:pre_disable="pre_disable"
|
:pre_disable="pre_disable"
|
||||||
:next_disable="next_disable"
|
:next_disable="next_disable"
|
||||||
@ -129,6 +130,7 @@ const search = ref('')
|
|||||||
const detail = ref<any>(null)
|
const detail = ref<any>(null)
|
||||||
|
|
||||||
const currentChatId = ref<string>('')
|
const currentChatId = ref<string>('')
|
||||||
|
const currentAbstract = ref<string>('')
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 下一页
|
* 下一页
|
||||||
@ -146,9 +148,11 @@ const nextChatRecord = () => {
|
|||||||
getList().then(() => {
|
getList().then(() => {
|
||||||
index = 0
|
index = 0
|
||||||
currentChatId.value = tableData.value[index].id
|
currentChatId.value = tableData.value[index].id
|
||||||
|
currentAbstract.value = tableData.value[index].abstract
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
currentChatId.value = tableData.value[index].id
|
currentChatId.value = tableData.value[index].id
|
||||||
|
currentAbstract.value = tableData.value[index].abstract
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const pre_disable = computed(() => {
|
const pre_disable = computed(() => {
|
||||||
@ -178,14 +182,17 @@ const preChatRecord = () => {
|
|||||||
getList().then((ok) => {
|
getList().then((ok) => {
|
||||||
index = paginationConfig.page_size - 1
|
index = paginationConfig.page_size - 1
|
||||||
currentChatId.value = tableData.value[index].id
|
currentChatId.value = tableData.value[index].id
|
||||||
|
currentAbstract.value = tableData.value[index].abstract
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
currentChatId.value = tableData.value[index].id
|
currentChatId.value = tableData.value[index].id
|
||||||
|
currentAbstract.value = tableData.value[index].abstract
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function rowClickHandle(row: any) {
|
function rowClickHandle(row: any) {
|
||||||
currentChatId.value = row.id
|
currentChatId.value = row.id
|
||||||
|
currentAbstract.value = row.abstract
|
||||||
ChatRecordRef.value.open()
|
ChatRecordRef.value.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user