1. 设备管理界面完成
2. 用户管理界面完成
3. 会话列表完成
This commit is contained in:
Zy
2026-10-10 17:02:31 +08:00
parent 23703a66c2
commit 2ccce95d44
64 changed files with 5341 additions and 1254 deletions

View File

@@ -0,0 +1,96 @@
<template>
<div class="agent-message">
<img :src="avatar" class="avatar"/>
<div class="msg-body">
<div class="msg-header">
<span class="name">客服{{ name }}</span>
<span v-if="tag" class="tag agent-tag">{{ tag }}</span>
<span class="time">{{ time }}</span>
</div>
<!-- 文本消息 -->
<div v-if="type === 'text'" class="bubble" v-html="content"></div>
<!-- 图片消息 -->
<div v-else-if="type === 'image'" class="bubble img-bubble">
<img :src="content" class="chat-img" @click="$emit('preview', content)"/>
</div>
</div>
</div>
</template>
<script lang="ts" setup>
defineProps({
name: {type: String, default: '客服'},
avatar: {type: String, default: ''},
content: {type: String, required: true},
type: {type: String as () => 'text' | 'image', default: 'text'},
tag: {type: String, default: '人工客服'},
time: {type: String, default: ''}
})
defineEmits(['preview'])
</script>
<style scoped>
.agent-message {
display: flex;
margin-bottom: 16px;
}
.avatar {
width: 36px;
height: 36px;
border-radius: 50%;
flex-shrink: 0;
}
.msg-body {
margin-left: 8px;
max-width: 75%;
}
.msg-header {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 4px;
}
.name {
font-size: 12px;
color: #333;
font-weight: 500;
}
.agent-tag {
background: #eff6ff;
color: #2563eb;
font-weight: bold;
font-size: 11px;
padding: 1px 6px;
border-radius: 4px;
}
.time {
font-size: 11px;
color: #999;
}
.bubble {
background: #fff;
border-radius: 4px 16px 16px 16px;
padding: 10px 14px;
font-size: 14px;
line-height: 22px;
color: rgba(31, 41, 55, 1);
}
.img-bubble {
padding: 4px;
}
.chat-img {
max-width: 200px;
max-height: 200px;
border-radius: 8px;
display: block;
}
</style>