From f1be1a3339bddda16aa7dfcef0ad4a55bddee2e2 Mon Sep 17 00:00:00 2001 From: liudong <liudong> Date: 星期二, 20 八月 2024 16:08:03 +0800 Subject: [PATCH] 聊天临时智能体默认图标修改 --- src/views/sessionManager/components/historySession.vue | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 50 insertions(+), 3 deletions(-) diff --git a/src/views/sessionManager/components/historySession.vue b/src/views/sessionManager/components/historySession.vue index e7c9c5e..24ef4e3 100644 --- a/src/views/sessionManager/components/historySession.vue +++ b/src/views/sessionManager/components/historySession.vue @@ -18,9 +18,10 @@ </a-button> <a-scrollbar + ref="scrollRef" class="left-list" style=" - height: calc(100vh - 100px); + height: calc(100vh - 160px); overflow-y: auto; overflow-x: hidden; " @@ -94,7 +95,7 @@ getDialogListApi, getSessionDetailsApi, deleteSessionApi, - sessionListApi + sessionListApiPage } from "@/api/session"; import { queryCanvasList } from "@/api/Agent"; @@ -112,6 +113,7 @@ const searchValue = ref(""); const selectValue = ref(""); const sectionList = ref({}); +const scrollRef = ref(null); const httpUrl = localStorage.getItem('httpUrl'); const imgSrc = ref(logo); const DialogList = async () => { @@ -163,7 +165,11 @@ // 鏌ヨ浼氳瘽鍒楄〃 const querySessionList = async (id) => { - const { code, data } = await sessionListApi(id); + const { code, data } = await sessionListApiPage({ + dialog_id: id, + page: 1, + page_size: 100 + }); if (code === 200) { sessionList.value = data.map((item) => { return { @@ -239,6 +245,30 @@ session.showtype = 1; }; + +const handleScroll = async (e: any) => { + // scrollTopVal.value = e.target.scrollTop + // let offsetHeight = e.target.offsetHeight + // let scrollHeight = e.target.scrollHeight + // + // if (scrollTopVal.value + offsetHeight >= scrollHeight) { + // //婊氬姩鏉″埌杈惧簳閮� + // if (cardData.value.length < total.value) { + // //鏁版嵁涓哄姞杞藉畬锛岀户缁祴鍊� + // serarchData.pageNum++ + // + // + // + // } + // } +} + +const loading: any = computed(() => { + // cardData.value.length >= total.value +}) + + + onBeforeMount(()=>{ // DialogList() querySessionList(''); @@ -251,6 +281,23 @@ querySessionList(''); }); + +// 缁欏厓绱犳坊鍔犳粴鍔ㄤ簨浠剁洃鍚� +// if (scrollRef.value) { +// // 缁欏厓绱犳坊鍔犳粴鍔ㄧ洃鍚櫒 +// +// scrollRef.value.addEventListener('scroll', handleScroll, true) +// +// // 濡傛灉浣犻渶瑕佸湪缁勪欢鍗歌浇鏃剁Щ闄ょ洃鍚櫒锛屽彲浠ヨ繑鍥炰竴涓竻鐞嗗嚱鏁� +// return () => { +// scrollRef.value.removeEventListener('scroll', handleScroll, true) +// } +// } + + + + + }) onBeforeUnmount(() => { EventBus.off("history"); -- Gitblit v1.8.0