| | |
| | | </a-button> |
| | | |
| | | <a-scrollbar |
| | | ref="scrollRef" |
| | | class="left-list" |
| | | style=" |
| | | height: calc(100vh - 100px); |
| | | height: calc(100vh - 160px); |
| | | overflow-y: auto; |
| | | overflow-x: hidden; |
| | | " |
| | |
| | | getDialogListApi, |
| | | getSessionDetailsApi, |
| | | deleteSessionApi, |
| | | sessionListApi |
| | | sessionListApiPage |
| | | } from "@/api/session"; |
| | | |
| | | import { queryCanvasList } from "@/api/Agent"; |
| | |
| | | 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 () => { |
| | |
| | | |
| | | // 查询会话列表 |
| | | 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 { |
| | |
| | | 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(''); |
| | |
| | | querySessionList(''); |
| | | |
| | | }); |
| | | |
| | | // 给元素添加滚动事件监听 |
| | | // if (scrollRef.value) { |
| | | // // 给元素添加滚动监听器 |
| | | // |
| | | // scrollRef.value.addEventListener('scroll', handleScroll, true) |
| | | // |
| | | // // 如果你需要在组件卸载时移除监听器,可以返回一个清理函数 |
| | | // return () => { |
| | | // scrollRef.value.removeEventListener('scroll', handleScroll, true) |
| | | // } |
| | | // } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | }) |
| | | onBeforeUnmount(() => { |
| | | EventBus.off("history"); |