2025-07-15 15:16:03 +08:00
|
|
|
<template>
|
2025-07-28 13:47:40 +08:00
|
|
|
<div class="agent-card">
|
|
|
|
|
<div class="header-section">
|
|
|
|
|
<div class="image-container">
|
2025-07-28 17:07:49 +08:00
|
|
|
<img :src="cozeInfo.icon_url" alt="" />
|
2025-07-25 13:48:49 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-07-28 13:47:40 +08:00
|
|
|
<div class="info-section">
|
|
|
|
|
<div class="title-group">
|
|
|
|
|
<div class="title">{{cozeInfo.name}}</div>
|
|
|
|
|
<div class="tag">
|
|
|
|
|
<div class="">
|
|
|
|
|
<img
|
|
|
|
|
class="status-icon"
|
|
|
|
|
:src="workflow"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="text">工作流</div>
|
2025-07-25 13:48:49 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-07-28 13:47:40 +08:00
|
|
|
<div class="usage-info">
|
|
|
|
|
<div class="count">{{cozeInfo.views}}</div>
|
|
|
|
|
<div class="label">次使用</div>
|
2025-07-25 13:48:49 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-07-28 13:47:40 +08:00
|
|
|
<div class="description-section">
|
|
|
|
|
<div class="description">
|
|
|
|
|
{{cozeInfo.description}}
|
|
|
|
|
</div>
|
2025-07-15 15:16:03 +08:00
|
|
|
</div>
|
2025-07-28 13:47:40 +08:00
|
|
|
<div class="divider"></div>
|
|
|
|
|
<!-- <div class="history-section">-->
|
|
|
|
|
<!-- <div class="history-title">-->
|
|
|
|
|
<!-- <div class="text">历史对话</div>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- <div class="history-list">-->
|
|
|
|
|
<!-- <div class="history-item">-->
|
|
|
|
|
<!-- <div class="item-text">梳理这次舆情的时间线和关键节点</div>-->
|
|
|
|
|
<!-- </div>-->
|
2025-07-16 18:49:28 +08:00
|
|
|
|
2025-07-28 13:47:40 +08:00
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </div>-->
|
2025-07-25 13:48:49 +08:00
|
|
|
</div>
|
2025-07-15 15:16:03 +08:00
|
|
|
</template>
|
2025-07-28 13:47:40 +08:00
|
|
|
|
2025-07-15 15:16:03 +08:00
|
|
|
<script lang="ts" setup>
|
|
|
|
|
import { defineProps } from 'vue';
|
2025-07-28 13:47:40 +08:00
|
|
|
import { delAgentMessage, getHistoryChat } from '@/api/all/agent';
|
2025-07-25 13:48:49 +08:00
|
|
|
import workflow from '@/assets/svg/workflow.svg';
|
2025-07-15 15:16:03 +08:00
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
|
|
|
cozeInfo: {
|
|
|
|
|
type: Object as () => any,
|
|
|
|
|
default: () => ({}),
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
|
2025-07-28 13:47:40 +08:00
|
|
|
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) + '...';
|
|
|
|
|
};
|
|
|
|
|
|
2025-07-15 15:16:03 +08:00
|
|
|
onMounted(() => {
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
2025-07-28 13:47:40 +08:00
|
|
|
@import './history.scss';
|
2025-07-15 15:16:03 +08:00
|
|
|
</style>
|