| | |
| | | /> |
| | | {{ session.name }} |
| | | </div> |
| | | <div class="time" |
| | | >{{ |
| | | moment(new Date(session.create_time)).format( |
| | | 'YYYY-MM-DD HH:mm:ss' |
| | | ) |
| | | }} |
| | | </div> |
| | | <a-popover position="rt"> |
| | | <div class="time" |
| | | >{{ |
| | | 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> |
| | | </div> |
| | | </div> |
| | | </a-scrollbar> |
| | |
| | | chatApi, |
| | | getDialogListApi, |
| | | getSessionDetailsApi, |
| | | deleteSessionApi, |
| | | sessionListApi |
| | | } from "@/api/session"; |
| | | |
| | | import { queryCanvasList } from "@/api/Agent"; |
| | | const emit = defineEmits(["querySessionDetail","changeAgentType"]); |
| | | import logo from "@/assets/images/model.png"; |
| | |
| | | } |
| | | }; |
| | | |
| | | //根据会话id删除会话 |
| | | const deleteSession = async (session) => { |
| | | const { code } = await deleteSessionApi([session.id]); |
| | | if (code === 200) { |
| | | Message.success('删除成功'); |
| | | querySessionList(''); |
| | | } |
| | | }; |
| | | |
| | | const querySessionDetail = async (session) => { |
| | | console.log(session, 'session'); |
| | |
| | | emit('querySessionDetail',session); |
| | | } |
| | | onBeforeMount(()=>{ |
| | | DialogList() |
| | | // DialogList() |
| | | querySessionList(''); |
| | | }) |
| | | |
| | | onMounted(() => { |
| | | EventBus.on("history", () => { |
| | | emit('changeAgentType','3'); |
| | | DialogList() |
| | | // DialogList() |
| | | querySessionList(''); |
| | | |
| | | }); |
| | | }) |
| | |
| | | display: flex; |
| | | width: 70%; |
| | | margin-left: 15%; |
| | | //border: 1px solid var(--color-text-4); |
| | | //border: 1px solid var(--color-neutral-3); |
| | | padding: 16px; |
| | | border-radius: 12px; |
| | | background: var(--color-bg-2); |
| | | background: var(--color-bg-1); |
| | | margin-top: 10px; |
| | | cursor: pointer; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | color: var(--color-text-2); |
| | | } |
| | | .historyCenter-box:hover{ |
| | | color: #2a2a2b; |
| | | border: 1px solid var(--color-neutral-3); |
| | | //background: #e8e8ea; |
| | | color: var(--color-text-2); |
| | | //border: 1px solid var(--color-neutral-3); |
| | | background: var(--color-bg-3); |
| | | box-shadow: 0 1px 2px -2px rgba(0, 0, 0, 0.16), 0 3px 6px 0 rgba(0, 0, 0, 0.12), 0 5px 12px 4px rgba(0, 0, 0, 0.09); |
| | | } |
| | | } |