refactor(agent): 优化客服和工作流界面布局和样式

- 调整了客服和工作流界面的栅格布局,优化了不同屏幕大小下的显示效果- 改进了历史聊天记录的展示方式,增加了 tooltip 和自适应布局
- 统一了聊天窗口的样式,增加了反馈功能- 优化了工作流内容区域的样式,使其更加适应长内容展示
This commit is contained in:
林志军
2025-07-29 16:00:24 +08:00
parent 7d66dfd076
commit be3843585a
10 changed files with 94 additions and 86 deletions

View File

@ -7,7 +7,9 @@
</div>
<div class="info-section">
<div class="title-group">
<div class="title">{{ cozeInfo.name }}</div>
<a-tooltip :content="cozeInfo.name">
<div class="title">{{ cozeInfo.name }}</div>
</a-tooltip>
<div class="tag">
<div>
<img class="status-icon" :src="chatbotIcon" />
@ -34,7 +36,6 @@
<script lang="ts" setup>
import { defineProps } from 'vue';
import { delAgentMessage, getHistoryChat } from '@/api/all/agent';
import chatbotIcon from '@/assets/svg/chatbot.svg';
const props = defineProps({
@ -44,26 +45,6 @@ const props = defineProps({
},
});
const delMessage = async (chatId, conversationId) => {
const { code, data } = await delAgentMessage({ chat_id: chatId, conversation_id: conversationId });
if (code === 200) {
console.log(data, 'data');
}
};
const conversations = ref([]);
const getHistoryChatData = async (botId) => {
const { code, data } = await getHistoryChat({ bot_id: botId });
if (code === 200) {
conversations.value = data.list;
}
};
const truncateText = (text: string, maxLength = 30) => {
if (text.length <= maxLength) return text;
return text.slice(0, maxLength) + '...';
};
onMounted(() => {});
</script>