| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <template>
- <LayoutExperience>
- <ContentContainer :containerStyle="content_style">
- <ChatAsideMenu />
- <ConversationBoardContainer @agentActive="handleAgentActive" />
- </ContentContainer>
- </LayoutExperience>
- </template>
- <script setup>
- import { useRouter } from 'vue-router';
- import LayoutExperience from './layout/LayoutExperience.vue';
- import ContentContainer from './layout/ContentContainer.vue';
- import ChatAsideMenu from './conversation/ChatAsideMenu.vue';
- import ConversationBoardContainer from './conversation/ConversationBoardContainer.vue';
- import bg_image from '../assets/chat/board-bg.png';
- import { getConfigField } from '../config/index';
- import useOpenWebLink from './conversation/use-open-mode-web-link';
- const router = useRouter();
- const openWebLink = useOpenWebLink();
- const content_style = {
- backgroundImage: `url(${bg_image})`,
- backgroundRepeat: 'no-repeat',
- backgroundSize: 'contain'
- };
- const handleAgentActive = ({ id, agent, index }) => {
- const target_id = id;
- // -->> advanced-chat
- // -->> agent-chat
- // -->> chat
- // -->> workflow
- // -->> web_link
- // -->> agent-dialog
- if (agent.mode === 'web_link') {
- // 直接跳转链接
- // const target_link = getConfigField('WEB_LINK_AUDIO_LINK');
- // const open_mode = getConfigField('WEB_LINK_OPEN_MODE');
- // if (open_mode === 1) {
- // window.open(target_link);
- // } else {
- // // 页面嵌入:和
- // }
- openWebLink();
- } else {
- router.push({
- path: '/chat/qa',
- query: {
- agent: target_id
- }
- });
- }
- };
- </script>
|