2025-03-31 22:32:19 +08:00
|
|
|
<template>
|
2025-03-31 23:02:05 +08:00
|
|
|
<div class="agent-single-view">
|
2025-04-03 16:02:14 +08:00
|
|
|
<!-- 智能体聊天界面 -->
|
2025-08-11 21:29:33 +08:00
|
|
|
<AgentChatComponent :agent-id="agentId" :single-mode="true">
|
2025-05-04 21:04:01 +08:00
|
|
|
<template #header-right>
|
|
|
|
|
<UserInfoComponent />
|
|
|
|
|
</template>
|
|
|
|
|
</AgentChatComponent>
|
2025-03-31 22:32:19 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
2025-03-31 23:02:05 +08:00
|
|
|
<script setup>
|
2025-05-02 23:56:59 +08:00
|
|
|
import { computed, ref } from 'vue';
|
|
|
|
|
import { useRoute } from 'vue-router';
|
2025-03-31 23:02:05 +08:00
|
|
|
import AgentChatComponent from '@/components/AgentChatComponent.vue';
|
2025-05-02 23:56:59 +08:00
|
|
|
import UserInfoComponent from '@/components/UserInfoComponent.vue';
|
2025-03-31 23:02:05 +08:00
|
|
|
|
|
|
|
|
const route = useRoute();
|
|
|
|
|
const agentId = computed(() => route.params.agent_id);
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
|
.agent-single-view {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100vh;
|
|
|
|
|
overflow: hidden;
|
2025-05-02 23:56:59 +08:00
|
|
|
position: relative;
|
2025-05-04 21:04:01 +08:00
|
|
|
display: flex;
|
|
|
|
|
flex-direction: row;
|
2025-03-31 23:02:05 +08:00
|
|
|
}
|
2025-04-03 16:02:14 +08:00
|
|
|
|
2025-05-02 23:56:59 +08:00
|
|
|
.user-info-wrapper {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 10px;
|
|
|
|
|
right: 20px;
|
|
|
|
|
z-index: 10;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 侧边栏样式
|
|
|
|
|
.sidebar {
|
2025-05-04 21:04:01 +08:00
|
|
|
// position: absolute;
|
2025-05-02 23:56:59 +08:00
|
|
|
left: 0;
|
|
|
|
|
top: 0;
|
|
|
|
|
height: 100%;
|
|
|
|
|
width: 240px;
|
|
|
|
|
background-color: #f5f5f5;
|
|
|
|
|
transition: all 0.3s ease;
|
|
|
|
|
z-index: 20;
|
2025-04-03 16:02:14 +08:00
|
|
|
display: flex;
|
|
|
|
|
|
2025-05-02 23:56:59 +08:00
|
|
|
&.collapsed {
|
|
|
|
|
width: 60px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.sidebar-content {
|
|
|
|
|
flex: 1;
|
|
|
|
|
padding: 20px 10px;
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.user-icon {
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
margin-bottom: 20px;
|
2025-05-04 21:04:01 +08:00
|
|
|
padding-left: 4px 8px;
|
2025-05-02 23:56:59 +08:00
|
|
|
|
|
|
|
|
img {
|
|
|
|
|
width: 32px;
|
|
|
|
|
height: 32px;
|
|
|
|
|
}
|
2025-04-03 16:02:14 +08:00
|
|
|
}
|
|
|
|
|
|
2025-05-02 23:56:59 +08:00
|
|
|
.toggle-button {
|
|
|
|
|
position: absolute;
|
|
|
|
|
right: -15px;
|
|
|
|
|
top: 50%;
|
|
|
|
|
transform: translateY(-50%);
|
|
|
|
|
width: 30px;
|
|
|
|
|
height: 30px;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
border-radius: 50%;
|
2025-04-03 16:02:14 +08:00
|
|
|
display: flex;
|
2025-05-02 23:56:59 +08:00
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
|
|
|
|
|
|
|
|
img {
|
|
|
|
|
width: 16px;
|
|
|
|
|
height: 16px;
|
|
|
|
|
}
|
2025-04-03 16:02:14 +08:00
|
|
|
}
|
|
|
|
|
}
|
2025-03-31 23:02:05 +08:00
|
|
|
</style>
|
|
|
|
|
|
2025-03-31 22:32:19 +08:00
|
|
|
|