ConversationHistory.vue 908 B

12345678910111213141516171819202122232425262728293031323334353637
  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 }) => {
  22. router.push({
  23. path: '/chat/qa',
  24. query: {
  25. id: target_id
  26. }
  27. });
  28. };
  29. </script>