ConversationHistory.vue 946 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <template>
  2. <LayoutExperience>
  3. <ContentContainer :containerStyle="content_style">
  4. <ChatAsideMenu />
  5. <ConversationHistoryContainer @historyActive="handleHistoryActive" />
  6. </ContentContainer>
  7. </LayoutExperience>
  8. </template>
  9. <script setup>
  10. import { useRouter } from 'vue-router';
  11. import LayoutExperience from './layout/LayoutExperience.vue';
  12. import ContentContainer from './layout/ContentContainer.vue';
  13. import ChatAsideMenu from './conversation/ChatAsideMenu.vue';
  14. import ConversationHistoryContainer from './conversation/ConversationHistoryContainer.vue';
  15. const router = useRouter();
  16. const content_style = {
  17. backgroundImage: 'url(../../../assets/chat/history-bg.png)',
  18. backgroundRepeat: 'no-repeat',
  19. backgroundSize: 'cover'
  20. };
  21. const handleHistoryActive = ({ target_id, agent_id }) => {
  22. router.push({
  23. path: '/chat/qa',
  24. query: {
  25. session: target_id,
  26. agent: agent_id
  27. }
  28. });
  29. };
  30. </script>