mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
feat: Cancel the restriction on the number of conversation history records
This commit is contained in:
parent
74b7633c2f
commit
6aa3999e05
|
|
@ -695,7 +695,7 @@ onMounted(() => {
|
||||||
// 2. 解析当前变换状态
|
// 2. 解析当前变换状态
|
||||||
const currentTransform = target.style.transform
|
const currentTransform = target.style.transform
|
||||||
const transformValues = parseTransform(currentTransform)
|
const transformValues = parseTransform(currentTransform)
|
||||||
let { scale, translateX, translateY } = transformValues
|
const { scale, translateX, translateY } = transformValues
|
||||||
// 确保scale是数值类型
|
// 确保scale是数值类型
|
||||||
const currentScale = Array.isArray(scale) ? scale[0] : scale
|
const currentScale = Array.isArray(scale) ? scale[0] : scale
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,13 @@
|
||||||
<div v-infinite-scroll="loadData" :infinite-scroll-disabled="disabledScroll">
|
<div v-infinite-scroll="loadData" :infinite-scroll-disabled="disabledScroll">
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
<div style="padding: 0 10px 16px">
|
<div style="padding: 0 10px 16px" class="text-center lighter color-secondary">
|
||||||
<el-divider v-if="size > 0 && loading" style="background: none">
|
<el-text class="text-with-lines" type="info" v-if="size > 0 && loading">
|
||||||
<el-text type="info"> {{ $t('components.loading') }}...</el-text>
|
{{ $t('components.loading') }}...</el-text
|
||||||
</el-divider>
|
>
|
||||||
<el-divider v-if="noMore" style="background: none !important">
|
<el-text class="text-with-lines" v-if="noMore" type="info">
|
||||||
<el-text type="info"> {{ $t('components.noMore') }}</el-text>
|
{{ $t('components.noMore') }}</el-text
|
||||||
</el-divider>
|
>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|
@ -61,7 +61,9 @@ const noMore = computed(
|
||||||
props.size > 0 && props.size === props.total && props.total > props.page_size && !props.loading,
|
props.size > 0 && props.size === props.total && props.total > props.page_size && !props.loading,
|
||||||
)
|
)
|
||||||
const disabledScroll = computed(() => props.size > 0 && (props.loading || noMore.value))
|
const disabledScroll = computed(() => props.size > 0 && (props.loading || noMore.value))
|
||||||
|
console.log(props.size)
|
||||||
|
console.log(props.total)
|
||||||
|
console.log(props.page_size)
|
||||||
function loadData() {
|
function loadData() {
|
||||||
if (props.total > props.page_size) {
|
if (props.total > props.page_size) {
|
||||||
current.value += 1
|
current.value += 1
|
||||||
|
|
@ -70,4 +72,26 @@ function loadData() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped></style>
|
<style lang="scss" scoped>
|
||||||
|
.text-with-lines {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-with-lines::before,
|
||||||
|
.text-with-lines::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
width: 80px;
|
||||||
|
border-bottom: 1px solid var(--el-border-color);
|
||||||
|
top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-with-lines::before {
|
||||||
|
left: -88px; /* 左侧线条位置 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-with-lines::after {
|
||||||
|
right: -82px; /* 右侧线条位置 */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -662,12 +662,6 @@ function getFolder(bool?: boolean) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function clickFolder(item: any) {
|
|
||||||
folder.setCurrentFolder(item)
|
|
||||||
paginationConfig.current_page = 1
|
|
||||||
applicationList.value = []
|
|
||||||
getList()
|
|
||||||
}
|
|
||||||
|
|
||||||
function folderClickHandle(row: any) {
|
function folderClickHandle(row: any) {
|
||||||
if (row.id === folder.currentFolder?.id) {
|
if (row.id === folder.currentFolder?.id) {
|
||||||
|
|
|
||||||
|
|
@ -52,54 +52,63 @@
|
||||||
</div>
|
</div>
|
||||||
<div v-show="!isPcCollapse" class="left-height" v-if="showHistory">
|
<div v-show="!isPcCollapse" class="left-height" v-if="showHistory">
|
||||||
<el-scrollbar>
|
<el-scrollbar>
|
||||||
<div class="p-16 pt-0">
|
<InfiniteScroll
|
||||||
<common-list
|
:size="chatLogData.length"
|
||||||
:data="chatLogData"
|
:total="_chatLogPagination?.total || 0"
|
||||||
class="mt-8"
|
:page_size="_chatLogPagination?.page_size || 20"
|
||||||
v-loading="leftLoading"
|
v-model:current_page="_chatLogPagination.current_page"
|
||||||
:defaultActive="currentChatId"
|
@load="scrollData"
|
||||||
@click="handleClickList"
|
:loading="leftLoading"
|
||||||
@mouseenter="mouseenter"
|
>
|
||||||
@mouseleave="mouseId = ''"
|
<div class="p-16 pt-0">
|
||||||
>
|
<common-list
|
||||||
<template #default="{ row }">
|
:data="chatLogData"
|
||||||
<div class="flex-between">
|
class="mt-8"
|
||||||
<span :title="row.abstract" class="ellipsis" style="max-width: 180px">
|
v-loading="leftLoading"
|
||||||
{{ row.abstract }}
|
:defaultActive="currentChatId"
|
||||||
</span>
|
@click="handleClickList"
|
||||||
<div @click.stop v-show="mouseId === row.id && row.id !== 'new'">
|
@mouseenter="mouseenter"
|
||||||
<el-dropdown trigger="click" :teleported="false">
|
@mouseleave="mouseId = ''"
|
||||||
<el-button text>
|
>
|
||||||
<AppIcon iconName="app-more"></AppIcon>
|
<template #default="{ row }">
|
||||||
</el-button>
|
<div class="flex-between">
|
||||||
|
<span :title="row.abstract" class="ellipsis" style="max-width: 180px">
|
||||||
|
{{ row.abstract }}
|
||||||
|
</span>
|
||||||
|
<div @click.stop v-show="mouseId === row.id && row.id !== 'new'">
|
||||||
|
<el-dropdown trigger="click" :teleported="false">
|
||||||
|
<el-button text>
|
||||||
|
<AppIcon iconName="app-more"></AppIcon>
|
||||||
|
</el-button>
|
||||||
|
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item @click.stop="editLogTitle(row)">
|
<el-dropdown-item @click.stop="editLogTitle(row)">
|
||||||
<AppIcon iconName="app-edit" class="color-secondary"></AppIcon>
|
<AppIcon iconName="app-edit" class="color-secondary"></AppIcon>
|
||||||
{{ $t('common.edit') }}
|
{{ $t('common.edit') }}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item @click.stop="deleteChatLog(row)">
|
<el-dropdown-item @click.stop="deleteChatLog(row)">
|
||||||
<AppIcon iconName="app-delete" class="color-secondary"></AppIcon>
|
<AppIcon iconName="app-delete" class="color-secondary"></AppIcon>
|
||||||
{{ $t('common.delete') }}
|
{{ $t('common.delete') }}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</template>
|
||||||
</template>
|
|
||||||
|
|
||||||
<template #empty>
|
<template #empty>
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<el-text type="info">{{ $t('chat.noHistory') }}</el-text>
|
<el-text type="info">{{ $t('chat.noHistory') }}</el-text>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</common-list>
|
</common-list>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="chatLogData?.length" class="text-center lighter color-secondary">
|
</InfiniteScroll>
|
||||||
|
<!-- <div v-if="chatLogData?.length" class="text-center lighter color-secondary">
|
||||||
<span>{{ $t('chat.only20history') }}</span>
|
<span>{{ $t('chat.only20history') }}</span>
|
||||||
</div>
|
</div> -->
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
<el-menu-item index="1" v-show="isPcCollapse" @click="newChat">
|
<el-menu-item index="1" v-show="isPcCollapse" @click="newChat">
|
||||||
|
|
@ -164,12 +173,15 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed } from 'vue'
|
import { ref, computed, inject, type Ref } from 'vue'
|
||||||
import { isAppIcon } from '@/utils/common'
|
import { isAppIcon } from '@/utils/common'
|
||||||
import EditTitleDialog from './EditTitleDialog.vue'
|
import EditTitleDialog from './EditTitleDialog.vue'
|
||||||
import useStore from '@/stores'
|
|
||||||
|
|
||||||
const { user } = useStore()
|
const scrollData = inject('scrollData') as any
|
||||||
|
// 子组件
|
||||||
|
const chatLogPagination = inject('chatLogPagination') as any
|
||||||
|
const _chatLogPagination = chatLogPagination()
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
applicationDetail: any
|
applicationDetail: any
|
||||||
chatLogData: any[]
|
chatLogData: any[]
|
||||||
|
|
@ -180,12 +192,18 @@ const props = defineProps<{
|
||||||
const emit = defineEmits(['newChat', 'clickLog', 'deleteLog', 'refreshFieldTitle', 'clearChat'])
|
const emit = defineEmits(['newChat', 'clickLog', 'deleteLog', 'refreshFieldTitle', 'clearChat'])
|
||||||
|
|
||||||
const showHistory = computed(() => {
|
const showHistory = computed(() => {
|
||||||
console.log(props.applicationDetail?.show_history)
|
|
||||||
return props.applicationDetail?.show_history != null || undefined
|
return props.applicationDetail?.show_history != null || undefined
|
||||||
? props.applicationDetail?.show_history
|
? props.applicationDetail?.show_history
|
||||||
: true
|
: true
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 更新页码的方法
|
||||||
|
const updateCurrentPage = (page: number) => {
|
||||||
|
if (chatLogPagination) {
|
||||||
|
chatLogPagination.current_page = page
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const EditTitleDialogRef = ref()
|
const EditTitleDialogRef = ref()
|
||||||
|
|
||||||
const mouseId = ref('')
|
const mouseId = ref('')
|
||||||
|
|
@ -193,6 +211,7 @@ const mouseId = ref('')
|
||||||
function mouseenter(row: any) {
|
function mouseenter(row: any) {
|
||||||
mouseId.value = row.id
|
mouseId.value = row.id
|
||||||
}
|
}
|
||||||
|
|
||||||
const newChat = () => {
|
const newChat = () => {
|
||||||
emit('newChat')
|
emit('newChat')
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -87,13 +87,16 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, reactive, nextTick, computed } from 'vue'
|
import { ref, onMounted, reactive, nextTick, computed, provide } from 'vue'
|
||||||
import { isAppIcon } from '@/utils/common'
|
import { isAppIcon } from '@/utils/common'
|
||||||
import { hexToRgba } from '@/utils/theme'
|
import { hexToRgba } from '@/utils/theme'
|
||||||
import { t } from '@/locales'
|
import { t } from '@/locales'
|
||||||
import ChatHistoryDrawer from './component/ChatHistoryDrawer.vue'
|
import ChatHistoryDrawer from './component/ChatHistoryDrawer.vue'
|
||||||
import chatAPI from '@/api/chat/chat'
|
import chatAPI from '@/api/chat/chat'
|
||||||
|
|
||||||
|
provide('scrollData', loadInfiniteScroll)
|
||||||
|
provide('chatLogPagination', () => chatLogPagination)
|
||||||
|
|
||||||
const AiChatRef = ref()
|
const AiChatRef = ref()
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const left_loading = ref(false)
|
const left_loading = ref(false)
|
||||||
|
|
@ -176,21 +179,28 @@ function newChat() {
|
||||||
show.value = false
|
show.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const chatLogPagination = ref({
|
||||||
|
total: 0,
|
||||||
|
page_size: 20,
|
||||||
|
current_page: 1,
|
||||||
|
})
|
||||||
function getChatLog(refresh?: boolean) {
|
function getChatLog(refresh?: boolean) {
|
||||||
const page = {
|
chatAPI
|
||||||
current_page: 1,
|
.pageChat(chatLogPagination.value.current_page, chatLogPagination.value.page_size, left_loading)
|
||||||
page_size: 20,
|
.then((res: any) => {
|
||||||
}
|
chatLogPagination.value.total = res.data.total
|
||||||
|
chatLogData.value = [...chatLogData.value, ...res.data.records]
|
||||||
|
if (!refresh) {
|
||||||
|
paginationConfig.current_page = 1
|
||||||
|
paginationConfig.total = 0
|
||||||
|
currentRecordList.value = []
|
||||||
|
currentChatId.value = 'new'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
chatAPI.pageChat(page.current_page, page.page_size, left_loading).then((res: any) => {
|
function loadInfiniteScroll() {
|
||||||
chatLogData.value = res.data.records
|
getChatLog(true)
|
||||||
if (!refresh) {
|
|
||||||
paginationConfig.current_page = 1
|
|
||||||
paginationConfig.total = 0
|
|
||||||
currentRecordList.value = []
|
|
||||||
currentChatId.value = 'new'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getChatRecord() {
|
function getChatRecord() {
|
||||||
|
|
@ -241,6 +251,8 @@ function refreshFieldTitle(chatId: string, abstract: string) {
|
||||||
|
|
||||||
function refresh(id: string) {
|
function refresh(id: string) {
|
||||||
currentChatId.value = id
|
currentChatId.value = id
|
||||||
|
chatLogPagination.value.current_page = 1
|
||||||
|
chatLogData.value = []
|
||||||
getChatLog(true)
|
getChatLog(true)
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed, defineModel } from 'vue'
|
import { ref, computed } from 'vue'
|
||||||
import useStore from '@/stores'
|
import useStore from '@/stores'
|
||||||
import UserCenterDrawer from './UserCenterDrawer.vue'
|
import UserCenterDrawer from './UserCenterDrawer.vue'
|
||||||
import HistoryPanel from '@/views/chat/component/HistoryPanel.vue'
|
import HistoryPanel from '@/views/chat/component/HistoryPanel.vue'
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, reactive, nextTick, computed } from 'vue'
|
import { ref, onMounted, reactive, nextTick, computed, provide } from 'vue'
|
||||||
import { isAppIcon } from '@/utils/common'
|
import { isAppIcon } from '@/utils/common'
|
||||||
import { hexToRgba } from '@/utils/theme'
|
import { hexToRgba } from '@/utils/theme'
|
||||||
import useStore from '@/stores'
|
import useStore from '@/stores'
|
||||||
|
|
@ -94,6 +94,9 @@ import { t } from '@/locales'
|
||||||
import ChatHistoryDrawer from './component/ChatHistoryDrawer.vue'
|
import ChatHistoryDrawer from './component/ChatHistoryDrawer.vue'
|
||||||
import chatAPI from '@/api/chat/chat'
|
import chatAPI from '@/api/chat/chat'
|
||||||
|
|
||||||
|
provide('scrollData', loadInfiniteScroll)
|
||||||
|
provide('chatLogPagination', () => chatLogPagination)
|
||||||
|
|
||||||
const { common } = useStore()
|
const { common } = useStore()
|
||||||
|
|
||||||
const AiChatRef = ref()
|
const AiChatRef = ref()
|
||||||
|
|
@ -139,6 +142,8 @@ function clearChat() {
|
||||||
paginationConfig.current_page = 1
|
paginationConfig.current_page = 1
|
||||||
paginationConfig.total = 0
|
paginationConfig.total = 0
|
||||||
currentRecordList.value = []
|
currentRecordList.value = []
|
||||||
|
chatLogPagination.value.current_page = 1
|
||||||
|
chatLogData.value = []
|
||||||
getChatLog()
|
getChatLog()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -182,21 +187,27 @@ function newChat() {
|
||||||
show.value = false
|
show.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const chatLogPagination = ref({
|
||||||
|
total: 0,
|
||||||
|
page_size: 20,
|
||||||
|
current_page: 1,
|
||||||
|
})
|
||||||
function getChatLog(refresh?: boolean) {
|
function getChatLog(refresh?: boolean) {
|
||||||
const page = {
|
chatAPI
|
||||||
current_page: 1,
|
.pageChat(chatLogPagination.value.current_page, chatLogPagination.value.page_size, left_loading)
|
||||||
page_size: 20,
|
.then((res: any) => {
|
||||||
}
|
chatLogPagination.value.total = res.data.total
|
||||||
|
chatLogData.value = [...chatLogData.value, ...res.data.records]
|
||||||
chatAPI.pageChat(page.current_page, page.page_size, left_loading).then((res: any) => {
|
if (!refresh) {
|
||||||
chatLogData.value = res.data.records
|
paginationConfig.current_page = 1
|
||||||
if (!refresh) {
|
paginationConfig.total = 0
|
||||||
paginationConfig.current_page = 1
|
currentRecordList.value = []
|
||||||
paginationConfig.total = 0
|
currentChatId.value = 'new'
|
||||||
currentRecordList.value = []
|
}
|
||||||
currentChatId.value = 'new'
|
})
|
||||||
}
|
}
|
||||||
})
|
function loadInfiniteScroll() {
|
||||||
|
getChatLog(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
function getChatRecord() {
|
function getChatRecord() {
|
||||||
|
|
@ -247,6 +258,8 @@ function refreshFieldTitle(chatId: string, abstract: string) {
|
||||||
|
|
||||||
function refresh(id: string) {
|
function refresh(id: string) {
|
||||||
currentChatId.value = id
|
currentChatId.value = id
|
||||||
|
chatLogPagination.value.current_page = 1
|
||||||
|
chatLogData.value = []
|
||||||
getChatLog(true)
|
getChatLog(true)
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -224,7 +224,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, nextTick, computed, watch } from 'vue'
|
import { ref, onMounted, nextTick, computed, watch, provide } from 'vue'
|
||||||
import { marked } from 'marked'
|
import { marked } from 'marked'
|
||||||
import { saveAs } from 'file-saver'
|
import { saveAs } from 'file-saver'
|
||||||
import chatAPI from '@/api/chat/chat'
|
import chatAPI from '@/api/chat/chat'
|
||||||
|
|
@ -244,6 +244,9 @@ import { getFileUrl } from '@/utils/common'
|
||||||
import PdfExport from '@/components/pdf-export/index.vue'
|
import PdfExport from '@/components/pdf-export/index.vue'
|
||||||
|
|
||||||
useResize()
|
useResize()
|
||||||
|
|
||||||
|
provide('scrollData', loadInfiniteScroll)
|
||||||
|
provide('chatLogPagination', () => chatLogPagination)
|
||||||
const pdfExportRef = ref<InstanceType<typeof PdfExport>>()
|
const pdfExportRef = ref<InstanceType<typeof PdfExport>>()
|
||||||
const { common, chatUser } = useStore()
|
const { common, chatUser } = useStore()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
@ -348,6 +351,8 @@ function clearChat() {
|
||||||
paginationConfig.value.current_page = 1
|
paginationConfig.value.current_page = 1
|
||||||
paginationConfig.value.total = 0
|
paginationConfig.value.total = 0
|
||||||
currentRecordList.value = []
|
currentRecordList.value = []
|
||||||
|
chatLogPagination.value.current_page = 1
|
||||||
|
chatLogData.value = []
|
||||||
getChatLog()
|
getChatLog()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -385,24 +390,31 @@ function newChat() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const chatLogPagination = ref({
|
||||||
|
total: 0,
|
||||||
|
page_size: 20,
|
||||||
|
current_page: 1,
|
||||||
|
})
|
||||||
function getChatLog(refresh?: boolean) {
|
function getChatLog(refresh?: boolean) {
|
||||||
const page = {
|
chatAPI
|
||||||
current_page: 1,
|
.pageChat(chatLogPagination.value.current_page, chatLogPagination.value.page_size, left_loading)
|
||||||
page_size: 20,
|
.then((res: any) => {
|
||||||
}
|
chatLogPagination.value.total = res.data.total
|
||||||
|
chatLogData.value = [...chatLogData.value, ...res.data.records]
|
||||||
|
if (refresh) {
|
||||||
|
currentChatName.value = chatLogData.value?.[0]?.abstract
|
||||||
|
} else {
|
||||||
|
paginationConfig.value.current_page = 1
|
||||||
|
paginationConfig.value.total = 0
|
||||||
|
currentRecordList.value = []
|
||||||
|
currentChatId.value = 'new'
|
||||||
|
currentChatName.value = t('chat.createChat')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
chatAPI.pageChat(page.current_page, page.page_size, left_loading).then((res: any) => {
|
function loadInfiniteScroll() {
|
||||||
chatLogData.value = res.data.records
|
getChatLog(true)
|
||||||
if (refresh) {
|
|
||||||
currentChatName.value = chatLogData.value?.[0]?.abstract
|
|
||||||
} else {
|
|
||||||
paginationConfig.value.current_page = 1
|
|
||||||
paginationConfig.value.total = 0
|
|
||||||
currentRecordList.value = []
|
|
||||||
currentChatId.value = 'new'
|
|
||||||
currentChatName.value = t('chat.createChat')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getChatRecord() {
|
function getChatRecord() {
|
||||||
|
|
@ -459,6 +471,8 @@ const clickListHandle = (item: any) => {
|
||||||
|
|
||||||
function refresh(id: string) {
|
function refresh(id: string) {
|
||||||
currentChatId.value = id
|
currentChatId.value = id
|
||||||
|
chatLogPagination.value.current_page = 1
|
||||||
|
chatLogData.value = []
|
||||||
getChatLog(true)
|
getChatLog(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue