| | |
| | | top: 10px; |
| | | left: -40px; |
| | | font-size: 30px; |
| | | z-index: 9999; |
| | | z-index: 99; |
| | | cursor: pointer" |
| | | @click="emit('changeAgentType','1')" |
| | | > |
| | |
| | | class="item historyCenter-box" |
| | | v-for="session in sessionList" |
| | | @click="querySessionDetail(session)" |
| | | @mouseenter="handleMouseEnter(session)" |
| | | @mouseleave="handleMouseLeave(session)" |
| | | > |
| | | <div class="text" > |
| | | <img |
| | |
| | | /> |
| | | {{ session.name }} |
| | | </div> |
| | | <a-popover position="rt"> |
| | | <div class="time" |
| | | >{{ |
| | | <div class="time" |
| | | > |
| | | <span v-show="session.showtype == 1" style="font-size: 14px"> |
| | | {{ |
| | | moment(new Date(session.create_time)).format( |
| | | 'YYYY-MM-DD HH:mm:ss' |
| | | ) |
| | | }} |
| | | </div> |
| | | <template #content> |
| | | <span |
| | | style="cursor: pointer; color: #4977ba; font-size: 12px" |
| | | @click="deleteSession(session)" |
| | | ><icon-delete style="font-size: 14px" />删除</span |
| | | > |
| | | </template> |
| | | </a-popover> |
| | | </span> |
| | | </div> |
| | | <a-button type="text" @click.stop="deleteSession(session)" style="color: red;position: absolute;right: 10px;top: 10px;" v-show="session.showtype == 2"> |
| | | <icon-delete style="font-size: 14px" /> |
| | | </a-button> |
| | | </div> |
| | | </div> |
| | | </a-scrollbar> |
| | |
| | | import { useAppStore, useUserStore } from "@/store"; |
| | | import { computed, nextTick, onMounted, watch, reactive, ref, onBeforeMount, onBeforeUnmount } from "vue"; |
| | | |
| | | import { Message } from "@arco-design/web-vue"; |
| | | import { Message, Modal } from "@arco-design/web-vue"; |
| | | import EventBus from '@/utils/EventBus'; |
| | | import moment from "moment"; |
| | | import { |
| | |
| | | import { queryCanvasList } from "@/api/Agent"; |
| | | const emit = defineEmits(["querySessionDetail","changeAgentType"]); |
| | | import logo from "@/assets/images/model.png"; |
| | | import { deleteKnow } from "@/api/kbList"; |
| | | const sessionList = ref([]); //会话列表 |
| | | const activeSessionId = ref(""); |
| | | const fieldNames = { value: "id", label: "name" }; |
| | |
| | | const querySessionList = async (id) => { |
| | | const { code, data } = await sessionListApi(id); |
| | | if (code === 200) { |
| | | sessionList.value = data; |
| | | sessionList.value = data.map((item) => { |
| | | return { |
| | | ...item, |
| | | showtype: 1 |
| | | } |
| | | }); |
| | | |
| | | |
| | | |
| | |
| | | |
| | | //根据会话id删除会话 |
| | | const deleteSession = async (session) => { |
| | | const { code } = await deleteSessionApi([session.id]); |
| | | if (code === 200) { |
| | | Message.success('删除成功'); |
| | | querySessionList(''); |
| | | } |
| | | Modal.confirm({ |
| | | title: '提示信息', |
| | | content: '确认删除吗', |
| | | okText: '确定', |
| | | cancelText: '取消', |
| | | hideTitle: true, |
| | | onOk: async () => { |
| | | const { code } = await deleteSessionApi([session.id]); |
| | | if (code === 200) { |
| | | Message.success('删除成功'); |
| | | querySessionList(''); |
| | | } |
| | | }, |
| | | onCancel: () => {}, |
| | | }); |
| | | }; |
| | | |
| | | const querySessionDetail = async (session) => { |
| | |
| | | emit('changeAgentType','1'); |
| | | emit('querySessionDetail',session); |
| | | } |
| | | |
| | | |
| | | const handleMouseEnter = (session) => { |
| | | session.showtype = 2; |
| | | }; |
| | | |
| | | const handleMouseLeave = (session) => { |
| | | session.showtype = 1; |
| | | }; |
| | | |
| | | onBeforeMount(()=>{ |
| | | // DialogList() |
| | | querySessionList(''); |
| | |
| | | width: 100%; |
| | | margin-top: 30px; |
| | | .historyCenter-box{ |
| | | position: relative; |
| | | display: flex; |
| | | width: 70%; |
| | | margin-left: 15%; |