dataBox.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <script setup>
  2. import LayoutCard from './LayoutCard.vue';
  3. import ChatText from '@/components/Chat/ChatText.vue';
  4. defineProps({
  5. reportData: {
  6. type: Object,
  7. default: {}
  8. },
  9. })
  10. </script>
  11. <template>
  12. <LayoutCard title="数据分析" class="data-box" name="data" width="100%">
  13. <template #headerRight>
  14. <RouterLink to="/work-order" class="flex items-center space-x-[4px] text-[14px]">
  15. <div class="jump-btn"></div>
  16. </RouterLink>
  17. </template>
  18. <div class="data-box-main">
  19. <div class="content">
  20. <h5 class="title">{{ reportData.showVal }}</h5>
  21. <div class="markdown-inner">
  22. <ChatText :content="reportData.answer" class="html-box"></ChatText>
  23. </div>
  24. </div>
  25. </div>
  26. </LayoutCard>
  27. </template>
  28. <style scoped lang="scss">
  29. .jump-btn {
  30. display: inline-block;
  31. width: 50px;
  32. height: 20px;
  33. }
  34. .data-box {
  35. &-main {
  36. padding: 18px 25px 16px 40px;
  37. display: flex;
  38. align-items: center;
  39. flex-direction: column;
  40. .content {
  41. width: 100%;
  42. .markdown-inner {
  43. width: 100%;
  44. height: 160px;
  45. overflow-y: scroll;
  46. &::-webkit-scrollbar-track {
  47. background-color: rgba(255, 255, 255, 0.3);
  48. }
  49. }
  50. .title {
  51. margin-bottom: 16px;
  52. font-size: 16px;
  53. font-weight: bold;
  54. color: #fff;
  55. text-shadow: 0px 0px 8px #C9FDF3;
  56. }
  57. .html-box {
  58. font-size: 14px;
  59. color: #fff;
  60. }
  61. .markdown-body {
  62. background: initial;
  63. }
  64. }
  65. .btn {
  66. width: 124px;
  67. height: 44px;
  68. background: linear-gradient(270deg, #59CCFA 0%, #3C97F7 100%);
  69. font-size: 16px;
  70. font-weight: 500;
  71. color: #fff;
  72. border-radius: 4px;
  73. display: flex;
  74. align-items: center;
  75. justify-content: center;
  76. margin-top: 20px;
  77. }
  78. }
  79. }
  80. </style>
  81. <style>
  82. .data-box .data-box-main .content .markdown-body .custom-table-wrapper {
  83. width: 450px !important;
  84. }
  85. </style>