Record.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. <template>
  2. <div class="record">
  3. <div class="record-head"></div>
  4. <div class="record-wrap" ref="pdfContent">
  5. <div class="record-wrap-content">
  6. <div class="record-wrap-content__overview" v-loading="loading">
  7. <span class="overview-text">
  8. <span>概述关于你的产品的描述,通常的英语表述为</span>
  9. <span class="active">{{ keywordEn }},</span>
  10. <span>在互联网上搜索的关键词为</span>
  11. <span class="active">{{ keywords }}</span>
  12. </span>
  13. </div>
  14. <div class="overview-left">概述</div>
  15. <div class="overview-right">
  16. <el-button v-show="!expanded" @click="download">下载报告</el-button>
  17. </div>
  18. <div class="record-wrap-content__keyword">
  19. <img :src="keywordPng" />
  20. <div class="content">
  21. <div class="content-left">
  22. <KeywordSearch></KeywordSearch>
  23. </div>
  24. <div class="content-right">
  25. <KeywordTable></KeywordTable>
  26. </div>
  27. </div>
  28. </div>
  29. <div class="record-wrap-content__competitor" v-if="isShowCompetitor">
  30. <img :src="CompetitorPng" />
  31. <div class="list">
  32. <CompetitorList></CompetitorList>
  33. </div>
  34. </div>
  35. <div class="record-wrap-content__ai">
  36. <img :src="AiAnalysisPng" />
  37. <AiAnalysis></AiAnalysis>
  38. </div>
  39. <div class="record-wrap-content__tips">
  40. <span
  41. >以上内容为AI根据三方网站获取的数据生成的内容,仅供参考,请仔细甄别。我司不对报告的真伪负责。</span
  42. >
  43. <span>如果需要更详细研究请联系我们:contact@njnaexport.cn</span>
  44. </div>
  45. </div>
  46. </div>
  47. </div>
  48. </template>
  49. <script lang="ts" setup>
  50. import { ref, computed, onMounted } from 'vue';
  51. import { useMainStore } from '../store';
  52. import KeywordSearch from '../components/keyword/search.vue';
  53. import KeywordTable from '../components/keyword/table.vue';
  54. import CompetitorList from '../components/competitor/list.vue';
  55. import AiAnalysis from '@/components/AiAnalysis.vue';
  56. import keywordPng from '../assets/images/keyword.png';
  57. import CompetitorPng from '../assets/images/competitor.png';
  58. import AiAnalysisPng from '../assets/images/ai-analysis.png';
  59. import { downloadPDF } from '@/utils/pdf';
  60. const mainStore = useMainStore();
  61. // mainStore.initData();
  62. const pdfContent = ref<HTMLElement | null>(null);
  63. const keywordData = computed(() => mainStore.getKeywordInfo);
  64. const loading = computed(() => keywordData.value.loading);
  65. const keywordEn = computed(() => keywordData.value.data?.keywordEn);
  66. const keywords = computed(() => keywordData.value?.data?.keywords?.join(','));
  67. const expanded = computed(() => mainStore.getExpanded);
  68. const isShowCompetitor = computed(() => mainStore.getIsShowCompetitor);
  69. const download = () => {
  70. downloadPDF(pdfContent.value!);
  71. };
  72. onMounted(() => {
  73. mainStore.setCurrentStep(1);
  74. });
  75. </script>
  76. <style lang="scss" scoped>
  77. .record {
  78. position: relative;
  79. max-width: 1920px;
  80. height: 100%;
  81. // overflow: auto;
  82. background-color: #fff;
  83. &-head {
  84. height: 1330px;
  85. background-image: url('https://assets.njnaexport.com//images/lookeen/record-top.svg');
  86. background-repeat: no-repeat; /* 不重复 */
  87. background-position: center center; /* 居中显示 */
  88. background-size: cover;
  89. }
  90. &-wrap {
  91. position: absolute;
  92. top: 460px;
  93. width: 100%;
  94. display: flex;
  95. justify-content: center;
  96. background-color: rgba(246, 248, 250, 0.5);
  97. &-content {
  98. position: relative;
  99. width: 1336px;
  100. &__overview {
  101. display: flex;
  102. // justify-content: center;
  103. align-items: center;
  104. height: 179px;
  105. padding: 0 58px;
  106. background: rgba(255, 255, 255, 0.65);
  107. box-shadow: -9px 13px 22px 0px rgba(5, 112, 183, 0.06);
  108. border-radius: 4px;
  109. margin-top: 35px;
  110. font-weight: bold;
  111. font-size: 20px;
  112. color: #282e30;
  113. .overview-text {
  114. word-break: break-all;
  115. }
  116. .active {
  117. color: var(--promotion--color-primary);
  118. }
  119. }
  120. .overview-left {
  121. position: absolute;
  122. top: 0;
  123. left: 30px;
  124. width: 136px;
  125. height: 70px;
  126. background: #ffffff;
  127. text-align: center;
  128. line-height: 70px;
  129. box-shadow: 0px 10px 30px 0px rgba(0, 98, 165, 0.2);
  130. border-radius: 8px;
  131. font-weight: bold;
  132. font-size: 32px;
  133. color: #282e30;
  134. z-index: 2000;
  135. }
  136. .overview-right {
  137. position: absolute;
  138. top: 14px;
  139. right: 30px;
  140. z-index: 2000;
  141. :deep(.el-button) {
  142. width: 126px;
  143. height: 48px;
  144. font-weight: 400;
  145. font-size: 16px;
  146. color: #ffffff;
  147. border-radius: 0;
  148. border: none;
  149. background: var(--promotion--color-primary);
  150. }
  151. }
  152. &__keyword {
  153. display: flex;
  154. flex-direction: column;
  155. justify-content: center;
  156. align-items: center;
  157. margin-top: 40px;
  158. img {
  159. width: 450px;
  160. height: 125px;
  161. }
  162. .content {
  163. width: 100%;
  164. display: flex;
  165. justify-content: space-between;
  166. margin-top: 20px;
  167. &-left {
  168. width: 666px;
  169. height: 317px;
  170. padding: 45px 60px;
  171. box-sizing: border-box;
  172. background: linear-gradient(
  173. 90deg,
  174. rgba(255, 255, 255, 0.65) 0%,
  175. rgba(255, 255, 255, 0) 100%
  176. );
  177. }
  178. &-right {
  179. width: 650px;
  180. height: 317px;
  181. }
  182. }
  183. }
  184. &__competitor {
  185. display: flex;
  186. flex-direction: column;
  187. justify-content: center;
  188. align-items: center;
  189. margin-top: 65px;
  190. img {
  191. width: 450px;
  192. height: 125px;
  193. }
  194. .list {
  195. width: 100%;
  196. margin-top: 20px;
  197. }
  198. }
  199. &__ai {
  200. display: flex;
  201. flex-direction: column;
  202. justify-content: center;
  203. align-items: center;
  204. margin-top: 60px;
  205. img {
  206. width: 468px;
  207. height: 125px;
  208. }
  209. }
  210. &__tips {
  211. display: flex;
  212. flex-direction: column;
  213. justify-content: center;
  214. width: 100%;
  215. height: 124px;
  216. padding-left: 40px;
  217. box-sizing: border-box;
  218. background: #ecf0f3;
  219. span {
  220. font-weight: 400;
  221. font-size: 16px;
  222. color: #d20000;
  223. }
  224. }
  225. }
  226. }
  227. }
  228. </style>