2024-09-03 17:57:54 +08:00
|
|
|
|
<!-- eslint-disable prettier/prettier -->
|
2024-09-01 23:51:00 +08:00
|
|
|
|
<script setup>
|
2024-09-14 18:03:40 +08:00
|
|
|
|
import { ref, onMounted, computed, watch, nextTick } from 'vue'
|
2024-09-05 10:49:44 +08:00
|
|
|
|
import {
|
|
|
|
|
|
Phone,
|
|
|
|
|
|
VideoCamera,
|
|
|
|
|
|
Position,
|
|
|
|
|
|
CirclePlus,
|
|
|
|
|
|
Setting,
|
|
|
|
|
|
LocationInformation,
|
|
|
|
|
|
Clock,
|
|
|
|
|
|
Picture,
|
|
|
|
|
|
FolderAdd,
|
|
|
|
|
|
CreditCard,
|
|
|
|
|
|
PictureRounded
|
|
|
|
|
|
} from '@element-plus/icons-vue'
|
2024-09-01 23:51:00 +08:00
|
|
|
|
import DragLine from '@/components/common/DragLine.vue'
|
2024-09-03 11:30:26 +08:00
|
|
|
|
import SearchBox from '@/components/common/SearchBox.vue'
|
|
|
|
|
|
import AddBotton from '@/components/common/AddBotton.vue'
|
|
|
|
|
|
import SessionBox from '@/components/message/SessionBox.vue'
|
2024-09-05 10:49:44 +08:00
|
|
|
|
import InputTool from '@/components/message/InputTool.vue'
|
|
|
|
|
|
import InputEditor from '@/components/message/InputEditor.vue'
|
2024-09-08 23:49:43 +08:00
|
|
|
|
import MessageItem from '@/components/message/MessageItem.vue'
|
2024-09-07 00:49:27 +08:00
|
|
|
|
import { userStore, settingStore, messageStore } from '@/stores'
|
2024-09-05 10:49:44 +08:00
|
|
|
|
import backgroupImage from '@/assets/messagebx_bg.webp'
|
2024-09-18 22:50:20 +08:00
|
|
|
|
import { msgChatSessionListService, msgChatPullMsgService } from '@/api/message'
|
2024-09-14 22:36:16 +08:00
|
|
|
|
import { MsgType } from '@/proto/msg'
|
2024-09-15 18:16:19 +08:00
|
|
|
|
import wsConnect from '@/js/websocket/wsConnect'
|
2024-08-23 23:05:57 +08:00
|
|
|
|
|
2024-09-07 00:49:27 +08:00
|
|
|
|
const userData = userStore()
|
2024-09-02 13:59:02 +08:00
|
|
|
|
const settingData = settingStore()
|
2024-09-05 10:49:44 +08:00
|
|
|
|
const messageData = messageStore()
|
|
|
|
|
|
|
2024-09-07 00:49:27 +08:00
|
|
|
|
const asideWidth = ref(0)
|
2024-09-05 10:49:44 +08:00
|
|
|
|
const asideWidthMin = 200
|
|
|
|
|
|
const asideWidthMax = 500
|
|
|
|
|
|
|
2024-09-07 00:49:27 +08:00
|
|
|
|
const inputBoxHeight = ref(0)
|
2024-09-18 22:50:20 +08:00
|
|
|
|
const inputBoxHeightMin = 350
|
|
|
|
|
|
const inputBoxHeightMax = 500
|
2024-09-05 10:49:44 +08:00
|
|
|
|
|
2024-09-18 20:32:35 +08:00
|
|
|
|
const sessionList = ref({})
|
|
|
|
|
|
const choosedSessionId = ref()
|
|
|
|
|
|
const choosedSession = ref({})
|
|
|
|
|
|
const msgRecords = ref([])
|
2024-09-05 10:49:44 +08:00
|
|
|
|
|
2024-09-10 11:51:52 +08:00
|
|
|
|
const isShowTopLoading = ref(true)
|
2024-09-08 23:49:43 +08:00
|
|
|
|
const isTopLoading = ref(false)
|
|
|
|
|
|
const loadMoreTips = ref('查看更多消息')
|
|
|
|
|
|
const loadCursor = computed(() => {
|
|
|
|
|
|
return isTopLoading.value ? 'auto' : 'pointer'
|
|
|
|
|
|
})
|
2024-09-01 23:51:00 +08:00
|
|
|
|
|
2024-09-14 22:36:16 +08:00
|
|
|
|
const msgListDiv = ref()
|
2024-09-14 18:03:40 +08:00
|
|
|
|
|
2024-09-05 17:41:27 +08:00
|
|
|
|
onMounted(async () => {
|
2024-09-07 00:49:27 +08:00
|
|
|
|
asideWidth.value = settingData.sessionListDrag[userData.user.account] || 200
|
2024-09-18 22:50:20 +08:00
|
|
|
|
inputBoxHeight.value = settingData.inputBoxDrag[userData.user.account] || 350
|
2024-09-07 00:49:27 +08:00
|
|
|
|
|
2024-09-05 17:41:27 +08:00
|
|
|
|
const res = await msgChatSessionListService()
|
2024-09-18 20:32:35 +08:00
|
|
|
|
messageData.setSessionList(res.data.data) //入缓存
|
|
|
|
|
|
sessionList.value = messageData.sessionList
|
|
|
|
|
|
choosedSessionId.value = messageData.lastSessionId
|
|
|
|
|
|
|
|
|
|
|
|
if (msgListDiv.value) {
|
|
|
|
|
|
// 首次进到消息页面,不会有有值
|
|
|
|
|
|
msgListDiv.value.scrollTop = msgListDiv.value.scrollHeight
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
2024-09-14 18:03:40 +08:00
|
|
|
|
|
2024-09-18 20:32:35 +08:00
|
|
|
|
// 把sessionList转成数组,并按照lastMsgTime排序
|
|
|
|
|
|
const sessionListSorted = computed(() => {
|
|
|
|
|
|
if (!sessionList.value) {
|
|
|
|
|
|
return []
|
|
|
|
|
|
}
|
|
|
|
|
|
else {
|
|
|
|
|
|
let sessionArr = Object.values(sessionList.value)
|
|
|
|
|
|
return sessionArr.sort((a, b) => b.lastMsgTime - a.lastMsgTime)
|
|
|
|
|
|
}
|
2024-09-05 10:49:44 +08:00
|
|
|
|
})
|
|
|
|
|
|
|
2024-09-05 23:02:44 +08:00
|
|
|
|
const showName = computed(() => {
|
2024-09-18 20:32:35 +08:00
|
|
|
|
switch (choosedSession.value.sessionType) {
|
2024-09-15 14:01:33 +08:00
|
|
|
|
case MsgType.CHAT:
|
2024-09-18 20:32:35 +08:00
|
|
|
|
return choosedSession.value.objectInfo.nickName
|
2024-09-15 14:01:33 +08:00
|
|
|
|
case MsgType.GROUP_CHAT:
|
2024-09-18 20:32:35 +08:00
|
|
|
|
return choosedSession.value.objectInfo.groupName
|
2024-09-05 23:02:44 +08:00
|
|
|
|
default:
|
|
|
|
|
|
return ''
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
const showId = computed(() => {
|
2024-09-18 20:32:35 +08:00
|
|
|
|
switch (choosedSession.value.sessionType) {
|
2024-09-15 14:01:33 +08:00
|
|
|
|
case MsgType.CHAT:
|
2024-09-18 20:32:35 +08:00
|
|
|
|
return choosedSession.value.objectInfo.account
|
2024-09-15 14:01:33 +08:00
|
|
|
|
case MsgType.GROUP_CHAT:
|
2024-09-18 20:32:35 +08:00
|
|
|
|
return choosedSession.value.objectInfo.groupId
|
2024-09-05 23:02:44 +08:00
|
|
|
|
default:
|
|
|
|
|
|
return ''
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
|
2024-09-09 17:49:59 +08:00
|
|
|
|
const getLastMsgTime = (index) => {
|
|
|
|
|
|
if (index > 0) {
|
2024-09-18 20:32:35 +08:00
|
|
|
|
return msgRecords.value[index - 1].msgTime;
|
2024-09-09 17:49:59 +08:00
|
|
|
|
} else {
|
|
|
|
|
|
return null;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-09-05 10:49:44 +08:00
|
|
|
|
const onAsideDragUpdate = ({ width }) => {
|
2024-09-01 23:51:00 +08:00
|
|
|
|
asideWidth.value = width
|
2024-09-07 00:49:27 +08:00
|
|
|
|
settingData.setSessionListDrag({
|
|
|
|
|
|
...settingData.sessionListDrag,
|
|
|
|
|
|
[userData.user.account]: width
|
|
|
|
|
|
})
|
2024-09-01 23:51:00 +08:00
|
|
|
|
}
|
2024-09-03 17:57:54 +08:00
|
|
|
|
|
2024-09-05 10:49:44 +08:00
|
|
|
|
const onInputBoxDragUpdate = ({ height }) => {
|
|
|
|
|
|
inputBoxHeight.value = height
|
2024-09-15 18:31:42 +08:00
|
|
|
|
msgListReachBottom()
|
2024-09-07 00:49:27 +08:00
|
|
|
|
settingData.setInputBoxDrag({
|
|
|
|
|
|
...settingData.inputBoxDrag,
|
|
|
|
|
|
[userData.user.account]: height
|
|
|
|
|
|
})
|
2024-09-05 10:49:44 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-09-18 21:33:01 +08:00
|
|
|
|
const handleIsChoosed = (session) => {
|
2024-09-18 20:32:35 +08:00
|
|
|
|
choosedSessionId.value = session.sessionId // sessionId变化会引发watch
|
|
|
|
|
|
}
|
2024-09-05 23:02:44 +08:00
|
|
|
|
|
2024-09-18 20:32:35 +08:00
|
|
|
|
const handleSwitchTag = (obj) => {
|
2024-09-18 22:50:20 +08:00
|
|
|
|
messageData.updateSession({
|
|
|
|
|
|
...choosedSession,
|
|
|
|
|
|
...obj
|
|
|
|
|
|
})
|
2024-09-05 10:49:44 +08:00
|
|
|
|
}
|
2024-09-18 20:32:35 +08:00
|
|
|
|
|
2024-09-14 18:03:40 +08:00
|
|
|
|
const handleExportContent = (content) => {
|
2024-09-15 14:01:33 +08:00
|
|
|
|
// TODO 这里还要考虑失败情况:1)消息发不出去;2)消息发出去了,服务器不发“已发送”
|
2024-09-18 20:32:35 +08:00
|
|
|
|
wsConnect.sendMsg(showId.value, choosedSession.value.sessionType, content, (deliveredMsg) => {
|
2024-09-18 22:50:20 +08:00
|
|
|
|
|
|
|
|
|
|
// 更新到messageStore中的sessionList:已读,已读时间
|
|
|
|
|
|
// 更新到数据库session表中(发送端)
|
|
|
|
|
|
// 如果当前sessionid和这个“已发送”消息的sessionId,更新到msgRecords中
|
|
|
|
|
|
|
2024-09-18 20:32:35 +08:00
|
|
|
|
messageData.addRecord(choosedSessionId.value, {
|
2024-09-15 10:45:41 +08:00
|
|
|
|
msgId: deliveredMsg.body.msgId,
|
|
|
|
|
|
fromId: userData.user.account,
|
2024-09-18 20:32:35 +08:00
|
|
|
|
msgType: choosedSession.value.sessionType,
|
2024-09-15 10:45:41 +08:00
|
|
|
|
msgTime: new Date(),
|
|
|
|
|
|
content: content
|
|
|
|
|
|
})
|
2024-09-14 22:36:16 +08:00
|
|
|
|
})
|
2024-09-14 18:03:40 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-09-08 23:49:43 +08:00
|
|
|
|
const onLoadMore = () => {
|
|
|
|
|
|
isTopLoading.value = true
|
|
|
|
|
|
loadMoreTips.value = ''
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-09-18 20:32:35 +08:00
|
|
|
|
// watch到哪个,表示哪个会话被选中
|
2024-09-18 22:50:20 +08:00
|
|
|
|
watch(choosedSessionId, (newValue) => {
|
2024-09-18 20:32:35 +08:00
|
|
|
|
messageData.setLastSessionId(newValue)
|
|
|
|
|
|
choosedSession.value = sessionList.value[newValue]
|
|
|
|
|
|
|
|
|
|
|
|
msgChatPullMsgService({
|
|
|
|
|
|
sessionId: choosedSessionId.value,
|
|
|
|
|
|
lastMsgId: sessionList.value[choosedSessionId.value].readMsgId,
|
|
|
|
|
|
lastPullTime: sessionList.value[choosedSessionId.value].readTime,
|
|
|
|
|
|
pageSize: 20
|
|
|
|
|
|
})
|
|
|
|
|
|
.then((res) => {
|
|
|
|
|
|
msgRecords.value = res.data.data.msgList
|
|
|
|
|
|
|
|
|
|
|
|
if (res.data.data.lastMsgId > choosedSession.value.readMsgId) {
|
|
|
|
|
|
const now = new Date()
|
|
|
|
|
|
choosedSession.value.readMsgId = res.data.data.lastMsgId
|
|
|
|
|
|
choosedSession.value.readTime = now
|
|
|
|
|
|
choosedSession.value.unreadCount = 0;
|
|
|
|
|
|
|
2024-09-18 22:50:20 +08:00
|
|
|
|
messageData.updateSession({
|
|
|
|
|
|
...choosedSession,
|
2024-09-18 20:32:35 +08:00
|
|
|
|
sessionId: choosedSessionId.value,
|
|
|
|
|
|
readMsgId: res.data.data.lastMsgId,
|
|
|
|
|
|
readTime: now })
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
watch(msgRecords, () => {
|
|
|
|
|
|
if (msgRecords.value) {
|
|
|
|
|
|
msgRecords.value = msgRecords.value.sort((a, b) => a.msgId - b.msgId)
|
|
|
|
|
|
}
|
2024-09-15 18:31:42 +08:00
|
|
|
|
msgListReachBottom()
|
|
|
|
|
|
}, {deep: true})
|
|
|
|
|
|
|
2024-09-18 20:32:35 +08:00
|
|
|
|
|
|
|
|
|
|
watch(() => messageData.sessionRecordsSize, async () => {
|
|
|
|
|
|
// TODO 这里还要检查messageData中的sessionId是否都在sessionList中
|
|
|
|
|
|
// 如果有不在的,要直接刷新sessionList
|
|
|
|
|
|
// if (xxx)
|
|
|
|
|
|
// const res = await msgChatSessionListService()
|
|
|
|
|
|
// sessionList.value = sessionList.value.concat(res.data.data)
|
|
|
|
|
|
|
|
|
|
|
|
}, {deep: true})
|
|
|
|
|
|
|
2024-09-15 18:31:42 +08:00
|
|
|
|
const msgListReachBottom = () => {
|
2024-09-14 18:03:40 +08:00
|
|
|
|
nextTick(() => {
|
2024-09-14 22:36:16 +08:00
|
|
|
|
msgListDiv.value.scrollTo({
|
|
|
|
|
|
top: msgListDiv.value.scrollHeight,
|
2024-09-14 18:03:40 +08:00
|
|
|
|
behavior: 'smooth'
|
|
|
|
|
|
})
|
|
|
|
|
|
})
|
2024-09-15 18:31:42 +08:00
|
|
|
|
}
|
2024-09-14 18:03:40 +08:00
|
|
|
|
|
2024-09-01 23:51:00 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
|
<el-container class="msg-container-hole">
|
2024-09-02 13:59:02 +08:00
|
|
|
|
<el-aside class="msg-aside bdr-r" :style="{ width: asideWidth + 'px' }">
|
2024-09-03 11:30:26 +08:00
|
|
|
|
<div class="msg-aside-main">
|
2024-09-05 10:49:44 +08:00
|
|
|
|
<div class="header">
|
2024-09-03 11:30:26 +08:00
|
|
|
|
<SearchBox></SearchBox>
|
|
|
|
|
|
<AddBotton></AddBotton>
|
|
|
|
|
|
</div>
|
2024-09-05 22:34:22 +08:00
|
|
|
|
|
2024-09-14 14:15:00 +08:00
|
|
|
|
<div class="session-list my-scrollbar">
|
2024-09-05 10:49:44 +08:00
|
|
|
|
<SessionBox
|
2024-09-18 20:32:35 +08:00
|
|
|
|
v-for="item in sessionListSorted"
|
2024-09-05 20:52:02 +08:00
|
|
|
|
:key="item.sessionId"
|
2024-09-18 20:32:35 +08:00
|
|
|
|
:sesionInfo="item"
|
|
|
|
|
|
:choosedSessionId="choosedSessionId"
|
2024-09-18 21:33:01 +08:00
|
|
|
|
@isChoosed="handleIsChoosed"
|
2024-09-18 20:32:35 +08:00
|
|
|
|
@switchTag="handleSwitchTag"
|
2024-09-05 10:49:44 +08:00
|
|
|
|
></SessionBox>
|
2024-09-03 11:30:26 +08:00
|
|
|
|
</div>
|
2024-09-01 23:51:00 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<DragLine
|
|
|
|
|
|
direction="right"
|
2024-09-05 10:49:44 +08:00
|
|
|
|
:min="asideWidthMin"
|
|
|
|
|
|
:max="asideWidthMax"
|
2024-09-01 23:51:00 +08:00
|
|
|
|
:origin-size="asideWidth"
|
2024-09-05 10:49:44 +08:00
|
|
|
|
@drag-update="onAsideDragUpdate"
|
2024-09-01 23:51:00 +08:00
|
|
|
|
></DragLine>
|
|
|
|
|
|
</el-aside>
|
|
|
|
|
|
|
2024-09-05 10:49:44 +08:00
|
|
|
|
<el-main class="msg-box">
|
|
|
|
|
|
<el-image
|
|
|
|
|
|
class="backgroup-image"
|
2024-09-18 20:32:35 +08:00
|
|
|
|
v-if="!choosedSessionId"
|
2024-09-05 10:49:44 +08:00
|
|
|
|
:src="backgroupImage"
|
|
|
|
|
|
fit="cover"
|
|
|
|
|
|
></el-image>
|
|
|
|
|
|
|
2024-09-05 20:52:02 +08:00
|
|
|
|
<el-container v-else class="container">
|
2024-09-05 10:49:44 +08:00
|
|
|
|
<el-header class="header bdr-b">
|
2024-09-05 23:02:44 +08:00
|
|
|
|
<div class="show-name-id">
|
|
|
|
|
|
<span class="show-name">{{ showName }}</span>
|
2024-09-18 20:32:35 +08:00
|
|
|
|
<span v-if="choosedSession.sessionType === MsgType.CHAT" class="show-id">{{
|
|
|
|
|
|
showId
|
|
|
|
|
|
}}</span>
|
2024-09-05 23:02:44 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
2024-09-05 10:49:44 +08:00
|
|
|
|
<div class="action-set">
|
|
|
|
|
|
<el-button class="action-button" :icon="Phone" circle />
|
|
|
|
|
|
<el-button class="action-button" :icon="VideoCamera" circle />
|
|
|
|
|
|
<el-button class="action-button" :icon="Position" circle />
|
|
|
|
|
|
<el-button class="action-button" :icon="CirclePlus" circle />
|
|
|
|
|
|
<el-button class="action-button" :icon="Setting" circle />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-header>
|
|
|
|
|
|
<el-main class="body">
|
2024-09-10 11:51:52 +08:00
|
|
|
|
<div v-if="isShowTopLoading" class="top-loading">
|
|
|
|
|
|
<div
|
|
|
|
|
|
v-loading="isTopLoading"
|
|
|
|
|
|
:fullscreen="false"
|
|
|
|
|
|
class="loading-box"
|
|
|
|
|
|
@click="onLoadMore"
|
|
|
|
|
|
:style="{ cursor: loadCursor }"
|
|
|
|
|
|
>
|
|
|
|
|
|
{{ loadMoreTips }}
|
2024-09-08 23:49:43 +08:00
|
|
|
|
</div>
|
2024-09-10 11:51:52 +08:00
|
|
|
|
</div>
|
2024-09-14 22:36:16 +08:00
|
|
|
|
<div class="show-box my-scrollbar" ref="msgListDiv">
|
2024-09-08 23:49:43 +08:00
|
|
|
|
<div class="message-main">
|
2024-09-09 16:45:30 +08:00
|
|
|
|
<span class="no-more-message">当前无更多消息</span>
|
2024-09-09 17:49:59 +08:00
|
|
|
|
<MessageItem
|
2024-09-18 20:32:35 +08:00
|
|
|
|
v-for="(item, index) in msgRecords"
|
2024-09-09 17:49:59 +08:00
|
|
|
|
:key="index"
|
2024-09-14 22:36:16 +08:00
|
|
|
|
:msg="item"
|
2024-09-18 20:32:35 +08:00
|
|
|
|
:obj="choosedSession.objectInfo"
|
2024-09-09 17:49:59 +08:00
|
|
|
|
:lastMsgTime="getLastMsgTime(index)"
|
|
|
|
|
|
></MessageItem>
|
2024-09-08 23:49:43 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2024-09-05 10:49:44 +08:00
|
|
|
|
<div class="input-box bdr-t" :style="{ height: inputBoxHeight + 'px' }">
|
|
|
|
|
|
<el-container class="input-box-container">
|
|
|
|
|
|
<el-header class="input-box-header">
|
|
|
|
|
|
<DragLine
|
|
|
|
|
|
direction="top"
|
|
|
|
|
|
:min="inputBoxHeightMin"
|
|
|
|
|
|
:max="inputBoxHeightMax"
|
|
|
|
|
|
:origin-size="inputBoxHeight"
|
|
|
|
|
|
@drag-update="onInputBoxDragUpdate"
|
|
|
|
|
|
></DragLine>
|
|
|
|
|
|
<div class="tool-set">
|
|
|
|
|
|
<div class="left-tools">
|
|
|
|
|
|
<InputTool tips="表情">
|
|
|
|
|
|
<template #iconSlot>
|
|
|
|
|
|
<PictureRounded />
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</InputTool>
|
|
|
|
|
|
<InputTool tips="图片">
|
|
|
|
|
|
<template #iconSlot>
|
|
|
|
|
|
<Picture />
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</InputTool>
|
|
|
|
|
|
<InputTool tips="文件">
|
|
|
|
|
|
<template #iconSlot>
|
|
|
|
|
|
<FolderAdd />
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</InputTool>
|
|
|
|
|
|
<InputTool tips="代码">
|
|
|
|
|
|
<template #iconSlot>
|
|
|
|
|
|
<CreditCard />
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</InputTool>
|
|
|
|
|
|
<InputTool tips="位置">
|
|
|
|
|
|
<template #iconSlot>
|
|
|
|
|
|
<LocationInformation />
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</InputTool>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="right-tools">
|
|
|
|
|
|
<InputTool tips="历史记录">
|
|
|
|
|
|
<template #iconSlot>
|
|
|
|
|
|
<Clock />
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</InputTool>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-header>
|
|
|
|
|
|
<el-main class="input-box-main">
|
2024-09-18 20:32:35 +08:00
|
|
|
|
<InputEditor
|
|
|
|
|
|
:sessionInfo="choosedSession"
|
|
|
|
|
|
@exportContent="handleExportContent"
|
|
|
|
|
|
></InputEditor>
|
2024-09-05 10:49:44 +08:00
|
|
|
|
</el-main>
|
|
|
|
|
|
</el-container>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-main>
|
|
|
|
|
|
</el-container>
|
2024-09-01 23:51:00 +08:00
|
|
|
|
</el-main>
|
|
|
|
|
|
</el-container>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
2024-09-03 11:30:26 +08:00
|
|
|
|
<style lang="scss" scoped>
|
2024-09-01 23:51:00 +08:00
|
|
|
|
.msg-container-hole {
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
user-select: none;
|
|
|
|
|
|
|
|
|
|
|
|
.msg-aside {
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
position: relative;
|
2024-09-03 11:30:26 +08:00
|
|
|
|
|
|
|
|
|
|
.msg-aside-main {
|
2024-09-05 17:41:27 +08:00
|
|
|
|
width: 100%;
|
2024-09-05 22:34:22 +08:00
|
|
|
|
height: 100%;
|
|
|
|
|
|
display: flex; // 需要flex布局,否则session-list的滚动条会有问题
|
|
|
|
|
|
flex-direction: column;
|
2024-09-05 17:41:27 +08:00
|
|
|
|
overflow: hidden; // 禁用它的滚动条
|
|
|
|
|
|
|
2024-09-03 11:30:26 +08:00
|
|
|
|
.header {
|
2024-09-05 10:49:44 +08:00
|
|
|
|
margin-top: 10px;
|
|
|
|
|
|
margin-bottom: 10px;
|
2024-09-05 17:41:27 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.session-list {
|
|
|
|
|
|
width: 100%;
|
2024-09-05 22:34:22 +08:00
|
|
|
|
overflow-y: scroll; // 用它的滚动条
|
2024-09-05 10:49:44 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.msg-box {
|
|
|
|
|
|
padding: 0;
|
2024-09-05 20:57:33 +08:00
|
|
|
|
overflow: hidden; // 禁用它的滚动条
|
2024-09-05 10:49:44 +08:00
|
|
|
|
|
|
|
|
|
|
.backgroup-image {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.container {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
|
|
|
|
.header {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 50px;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
|
2024-09-05 23:02:44 +08:00
|
|
|
|
.show-name-id {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
user-select: text;
|
|
|
|
|
|
|
|
|
|
|
|
.show-name {
|
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.show-id {
|
|
|
|
|
|
margin-left: 10px;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
color: gray;
|
|
|
|
|
|
}
|
2024-09-05 10:49:44 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.action-set {
|
|
|
|
|
|
margin-right: 20px;
|
|
|
|
|
|
|
|
|
|
|
|
.action-button {
|
|
|
|
|
|
border: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.body {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
padding: 0;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
2024-09-09 16:45:30 +08:00
|
|
|
|
overflow: hidden; // 禁用它的滚动条
|
2024-09-10 11:51:52 +08:00
|
|
|
|
position: relative;
|
2024-09-05 10:49:44 +08:00
|
|
|
|
|
2024-09-10 11:51:52 +08:00
|
|
|
|
.top-loading {
|
2024-09-05 10:49:44 +08:00
|
|
|
|
width: 100%;
|
2024-09-10 11:51:52 +08:00
|
|
|
|
height: 30px;
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
top: 0;
|
2024-09-09 12:00:46 +08:00
|
|
|
|
display: flex;
|
2024-09-10 11:51:52 +08:00
|
|
|
|
justify-content: center;
|
|
|
|
|
|
align-items: center;
|
2024-09-08 23:49:43 +08:00
|
|
|
|
|
2024-09-10 11:51:52 +08:00
|
|
|
|
.loading-box {
|
|
|
|
|
|
color: #409eff;
|
|
|
|
|
|
font-size: 14px;
|
2024-09-08 23:49:43 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.circular) {
|
|
|
|
|
|
width: 24px;
|
|
|
|
|
|
height: 24px;
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
top: 12px;
|
|
|
|
|
|
left: -12px;
|
|
|
|
|
|
}
|
2024-09-10 11:51:52 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.show-box {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
overflow-y: scroll; // 用它的滚动条
|
2024-09-08 23:49:43 +08:00
|
|
|
|
|
|
|
|
|
|
.message-main {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100%;
|
2024-09-10 11:51:52 +08:00
|
|
|
|
padding: 20px;
|
|
|
|
|
|
padding-right: 15px;
|
2024-09-09 16:45:30 +08:00
|
|
|
|
|
|
|
|
|
|
.no-more-message {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 40px;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
color: gray;
|
|
|
|
|
|
user-select: text;
|
|
|
|
|
|
}
|
2024-09-08 23:49:43 +08:00
|
|
|
|
}
|
2024-09-05 10:49:44 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.input-box {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
|
|
|
|
.input-box-header {
|
|
|
|
|
|
width: 100%;
|
2024-09-05 11:24:58 +08:00
|
|
|
|
height: auto;
|
2024-09-05 10:49:44 +08:00
|
|
|
|
padding: 0;
|
2024-09-05 11:24:58 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
2024-09-05 10:49:44 +08:00
|
|
|
|
|
|
|
|
|
|
.tool-set {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
|
|
|
|
|
|
.left-tools {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.right-tools {
|
|
|
|
|
|
margin-right: 10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.input-box-main {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
padding: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-09-03 11:30:26 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-09-01 23:51:00 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|