|
@@ -47,11 +47,16 @@
|
|
|
v-html="currentMessage?.content"
|
|
|
></pre> -->
|
|
|
<div ref="historyMsgWrap" class="history-box scroll-auto">
|
|
|
- <div v-for="(message, index) in historyReverse" :key="index" class="m-b-base">
|
|
|
- <div
|
|
|
- class="m-b-mini message-header"
|
|
|
- :class="{ 'other-name': message.sendUserId != mainStore?.myUserInfo?.id }"
|
|
|
- >
|
|
|
+ <div
|
|
|
+ v-for="(message, index) in historyReverse"
|
|
|
+ :key="index"
|
|
|
+ class="m-b-base one-message"
|
|
|
+ :class="{
|
|
|
+ 'other-person': message.sendUserId != mainStore?.myUserInfo?.id,
|
|
|
+ 'self-person': message.sendUserId == mainStore?.myUserInfo?.id,
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <div class="m-b-mini message-header">
|
|
|
<span class="m-r-base user-name"
|
|
|
>{{ message.sendUserName }}{{ message.sendUserId == mainStore?.myUserInfo?.id ? '(我)' : '' }}</span
|
|
|
>
|
|
@@ -115,6 +120,7 @@ const props = defineProps<{
|
|
|
replyUserId?: number | null
|
|
|
paperPath?: string | null
|
|
|
replyUserName?: string | null
|
|
|
+ secretNumber?: string | number | null
|
|
|
}>()
|
|
|
|
|
|
const emits = defineEmits(['close', 'change-type', 'reply', 'refresh'])
|
|
@@ -135,7 +141,7 @@ const showSendPaper = computed<boolean>(() => {
|
|
|
/** 发送当前试卷 */
|
|
|
const sendCurrentPaper = () => {
|
|
|
if (props.paperPath) {
|
|
|
- messageContent.value += `<span class="pointer inline link-button" contenteditable="false" data-path="${props.paperPath}">查看试卷</span>`
|
|
|
+ messageContent.value += `<span class="pointer inline link-button" contenteditable="false" data-path="${props.paperPath}">查看试卷(${props.secretNumber})</span>`
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -329,20 +335,69 @@ onUnmounted(() => {
|
|
|
position: relative;
|
|
|
.history-box {
|
|
|
height: 100%;
|
|
|
- border: 1px solid #eee;
|
|
|
+ // border: 1px solid #eee;
|
|
|
+ background-color: #eee;
|
|
|
border-radius: 4px;
|
|
|
padding: 15px;
|
|
|
- .message-header {
|
|
|
- color: $color--primary;
|
|
|
- &.other-name {
|
|
|
- color: #999;
|
|
|
+ &:after {
|
|
|
+ content: '';
|
|
|
+ display: block;
|
|
|
+ clear: both;
|
|
|
+ }
|
|
|
+ .one-message {
|
|
|
+ border-radius: 4px;
|
|
|
+ padding: 12px;
|
|
|
+ max-width: 75%;
|
|
|
+
|
|
|
+ &.other-person {
|
|
|
+ background-color: #fff;
|
|
|
+ float: left;
|
|
|
+ :deep(.link-button) {
|
|
|
+ background-color: #e6f0ff !important;
|
|
|
+ }
|
|
|
+ .message-header {
|
|
|
+ .user-name {
|
|
|
+ color: #444;
|
|
|
+ font-size: 12px;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+ .message-time {
|
|
|
+ color: #888;
|
|
|
+ font-size: 12px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ &.self-person {
|
|
|
+ background-color: $color--primary;
|
|
|
+ float: right;
|
|
|
+ .history-message-info-content {
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+ .message-header {
|
|
|
+ .user-name {
|
|
|
+ color: #fff;
|
|
|
+ font-size: 12px;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+ .message-time {
|
|
|
+ color: #fff;
|
|
|
+ font-size: 12px;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+ // .message-header {
|
|
|
+ // color: $color--primary;
|
|
|
+ // &.other-name {
|
|
|
+ // color: #999;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
.history-message-info-content {
|
|
|
white-space: pre-wrap;
|
|
|
color: #444;
|
|
|
font-size: 12px;
|
|
|
- font-weight: bold;
|
|
|
+ font-weight: 400;
|
|
|
+ line-height: 18px;
|
|
|
}
|
|
|
}
|
|
|
.msg-content-box {
|