askbot-dragon 1.6.78-beta → 1.6.78

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (275) hide show
  1. package/package.json +9 -6
  2. package/public/index.html +8 -5
  3. package/public/pdfjs/cmaps/78-EUC-H.bcmap +0 -0
  4. package/public/pdfjs/cmaps/78-EUC-V.bcmap +0 -0
  5. package/public/pdfjs/cmaps/78-H.bcmap +0 -0
  6. package/public/pdfjs/cmaps/78-RKSJ-H.bcmap +0 -0
  7. package/public/pdfjs/cmaps/78-RKSJ-V.bcmap +0 -0
  8. package/public/pdfjs/cmaps/78-V.bcmap +0 -0
  9. package/public/pdfjs/cmaps/78ms-RKSJ-H.bcmap +0 -0
  10. package/public/pdfjs/cmaps/78ms-RKSJ-V.bcmap +0 -0
  11. package/public/pdfjs/cmaps/83pv-RKSJ-H.bcmap +0 -0
  12. package/public/pdfjs/cmaps/90ms-RKSJ-H.bcmap +0 -0
  13. package/public/pdfjs/cmaps/90ms-RKSJ-V.bcmap +0 -0
  14. package/public/pdfjs/cmaps/90msp-RKSJ-H.bcmap +0 -0
  15. package/public/pdfjs/cmaps/90msp-RKSJ-V.bcmap +0 -0
  16. package/public/pdfjs/cmaps/90pv-RKSJ-H.bcmap +0 -0
  17. package/public/pdfjs/cmaps/90pv-RKSJ-V.bcmap +0 -0
  18. package/public/pdfjs/cmaps/Add-H.bcmap +0 -0
  19. package/public/pdfjs/cmaps/Add-RKSJ-H.bcmap +0 -0
  20. package/public/pdfjs/cmaps/Add-RKSJ-V.bcmap +0 -0
  21. package/public/pdfjs/cmaps/Add-V.bcmap +0 -0
  22. package/public/pdfjs/cmaps/Adobe-CNS1-0.bcmap +0 -0
  23. package/public/pdfjs/cmaps/Adobe-CNS1-1.bcmap +0 -0
  24. package/public/pdfjs/cmaps/Adobe-CNS1-2.bcmap +0 -0
  25. package/public/pdfjs/cmaps/Adobe-CNS1-3.bcmap +0 -0
  26. package/public/pdfjs/cmaps/Adobe-CNS1-4.bcmap +0 -0
  27. package/public/pdfjs/cmaps/Adobe-CNS1-5.bcmap +0 -0
  28. package/public/pdfjs/cmaps/Adobe-CNS1-6.bcmap +0 -0
  29. package/public/pdfjs/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
  30. package/public/pdfjs/cmaps/Adobe-GB1-0.bcmap +0 -0
  31. package/public/pdfjs/cmaps/Adobe-GB1-1.bcmap +0 -0
  32. package/public/pdfjs/cmaps/Adobe-GB1-2.bcmap +0 -0
  33. package/public/pdfjs/cmaps/Adobe-GB1-3.bcmap +0 -0
  34. package/public/pdfjs/cmaps/Adobe-GB1-4.bcmap +0 -0
  35. package/public/pdfjs/cmaps/Adobe-GB1-5.bcmap +0 -0
  36. package/public/pdfjs/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
  37. package/public/pdfjs/cmaps/Adobe-Japan1-0.bcmap +0 -0
  38. package/public/pdfjs/cmaps/Adobe-Japan1-1.bcmap +0 -0
  39. package/public/pdfjs/cmaps/Adobe-Japan1-2.bcmap +0 -0
  40. package/public/pdfjs/cmaps/Adobe-Japan1-3.bcmap +0 -0
  41. package/public/pdfjs/cmaps/Adobe-Japan1-4.bcmap +0 -0
  42. package/public/pdfjs/cmaps/Adobe-Japan1-5.bcmap +0 -0
  43. package/public/pdfjs/cmaps/Adobe-Japan1-6.bcmap +0 -0
  44. package/public/pdfjs/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
  45. package/public/pdfjs/cmaps/Adobe-Korea1-0.bcmap +0 -0
  46. package/public/pdfjs/cmaps/Adobe-Korea1-1.bcmap +0 -0
  47. package/public/pdfjs/cmaps/Adobe-Korea1-2.bcmap +0 -0
  48. package/public/pdfjs/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
  49. package/public/pdfjs/cmaps/B5-H.bcmap +0 -0
  50. package/public/pdfjs/cmaps/B5-V.bcmap +0 -0
  51. package/public/pdfjs/cmaps/B5pc-H.bcmap +0 -0
  52. package/public/pdfjs/cmaps/B5pc-V.bcmap +0 -0
  53. package/public/pdfjs/cmaps/CNS-EUC-H.bcmap +0 -0
  54. package/public/pdfjs/cmaps/CNS-EUC-V.bcmap +0 -0
  55. package/public/pdfjs/cmaps/CNS1-H.bcmap +0 -0
  56. package/public/pdfjs/cmaps/CNS1-V.bcmap +0 -0
  57. package/public/pdfjs/cmaps/CNS2-H.bcmap +0 -0
  58. package/public/pdfjs/cmaps/CNS2-V.bcmap +3 -0
  59. package/public/pdfjs/cmaps/ETHK-B5-H.bcmap +0 -0
  60. package/public/pdfjs/cmaps/ETHK-B5-V.bcmap +0 -0
  61. package/public/pdfjs/cmaps/ETen-B5-H.bcmap +0 -0
  62. package/public/pdfjs/cmaps/ETen-B5-V.bcmap +0 -0
  63. package/public/pdfjs/cmaps/ETenms-B5-H.bcmap +3 -0
  64. package/public/pdfjs/cmaps/ETenms-B5-V.bcmap +0 -0
  65. package/public/pdfjs/cmaps/EUC-H.bcmap +0 -0
  66. package/public/pdfjs/cmaps/EUC-V.bcmap +0 -0
  67. package/public/pdfjs/cmaps/Ext-H.bcmap +0 -0
  68. package/public/pdfjs/cmaps/Ext-RKSJ-H.bcmap +0 -0
  69. package/public/pdfjs/cmaps/Ext-RKSJ-V.bcmap +0 -0
  70. package/public/pdfjs/cmaps/Ext-V.bcmap +0 -0
  71. package/public/pdfjs/cmaps/GB-EUC-H.bcmap +0 -0
  72. package/public/pdfjs/cmaps/GB-EUC-V.bcmap +0 -0
  73. package/public/pdfjs/cmaps/GB-H.bcmap +4 -0
  74. package/public/pdfjs/cmaps/GB-V.bcmap +0 -0
  75. package/public/pdfjs/cmaps/GBK-EUC-H.bcmap +0 -0
  76. package/public/pdfjs/cmaps/GBK-EUC-V.bcmap +0 -0
  77. package/public/pdfjs/cmaps/GBK2K-H.bcmap +0 -0
  78. package/public/pdfjs/cmaps/GBK2K-V.bcmap +0 -0
  79. package/public/pdfjs/cmaps/GBKp-EUC-H.bcmap +0 -0
  80. package/public/pdfjs/cmaps/GBKp-EUC-V.bcmap +0 -0
  81. package/public/pdfjs/cmaps/GBT-EUC-H.bcmap +0 -0
  82. package/public/pdfjs/cmaps/GBT-EUC-V.bcmap +0 -0
  83. package/public/pdfjs/cmaps/GBT-H.bcmap +0 -0
  84. package/public/pdfjs/cmaps/GBT-V.bcmap +0 -0
  85. package/public/pdfjs/cmaps/GBTpc-EUC-H.bcmap +0 -0
  86. package/public/pdfjs/cmaps/GBTpc-EUC-V.bcmap +0 -0
  87. package/public/pdfjs/cmaps/GBpc-EUC-H.bcmap +0 -0
  88. package/public/pdfjs/cmaps/GBpc-EUC-V.bcmap +0 -0
  89. package/public/pdfjs/cmaps/H.bcmap +0 -0
  90. package/public/pdfjs/cmaps/HKdla-B5-H.bcmap +0 -0
  91. package/public/pdfjs/cmaps/HKdla-B5-V.bcmap +0 -0
  92. package/public/pdfjs/cmaps/HKdlb-B5-H.bcmap +0 -0
  93. package/public/pdfjs/cmaps/HKdlb-B5-V.bcmap +0 -0
  94. package/public/pdfjs/cmaps/HKgccs-B5-H.bcmap +0 -0
  95. package/public/pdfjs/cmaps/HKgccs-B5-V.bcmap +0 -0
  96. package/public/pdfjs/cmaps/HKm314-B5-H.bcmap +0 -0
  97. package/public/pdfjs/cmaps/HKm314-B5-V.bcmap +0 -0
  98. package/public/pdfjs/cmaps/HKm471-B5-H.bcmap +0 -0
  99. package/public/pdfjs/cmaps/HKm471-B5-V.bcmap +0 -0
  100. package/public/pdfjs/cmaps/HKscs-B5-H.bcmap +0 -0
  101. package/public/pdfjs/cmaps/HKscs-B5-V.bcmap +0 -0
  102. package/public/pdfjs/cmaps/Hankaku.bcmap +0 -0
  103. package/public/pdfjs/cmaps/Hiragana.bcmap +0 -0
  104. package/public/pdfjs/cmaps/KSC-EUC-H.bcmap +0 -0
  105. package/public/pdfjs/cmaps/KSC-EUC-V.bcmap +0 -0
  106. package/public/pdfjs/cmaps/KSC-H.bcmap +0 -0
  107. package/public/pdfjs/cmaps/KSC-Johab-H.bcmap +0 -0
  108. package/public/pdfjs/cmaps/KSC-Johab-V.bcmap +0 -0
  109. package/public/pdfjs/cmaps/KSC-V.bcmap +0 -0
  110. package/public/pdfjs/cmaps/KSCms-UHC-H.bcmap +0 -0
  111. package/public/pdfjs/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
  112. package/public/pdfjs/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
  113. package/public/pdfjs/cmaps/KSCms-UHC-V.bcmap +0 -0
  114. package/public/pdfjs/cmaps/KSCpc-EUC-H.bcmap +0 -0
  115. package/public/pdfjs/cmaps/KSCpc-EUC-V.bcmap +0 -0
  116. package/public/pdfjs/cmaps/Katakana.bcmap +0 -0
  117. package/public/pdfjs/cmaps/LICENSE +36 -0
  118. package/public/pdfjs/cmaps/NWP-H.bcmap +0 -0
  119. package/public/pdfjs/cmaps/NWP-V.bcmap +0 -0
  120. package/public/pdfjs/cmaps/RKSJ-H.bcmap +0 -0
  121. package/public/pdfjs/cmaps/RKSJ-V.bcmap +0 -0
  122. package/public/pdfjs/cmaps/Roman.bcmap +0 -0
  123. package/public/pdfjs/cmaps/UniCNS-UCS2-H.bcmap +0 -0
  124. package/public/pdfjs/cmaps/UniCNS-UCS2-V.bcmap +0 -0
  125. package/public/pdfjs/cmaps/UniCNS-UTF16-H.bcmap +0 -0
  126. package/public/pdfjs/cmaps/UniCNS-UTF16-V.bcmap +0 -0
  127. package/public/pdfjs/cmaps/UniCNS-UTF32-H.bcmap +0 -0
  128. package/public/pdfjs/cmaps/UniCNS-UTF32-V.bcmap +0 -0
  129. package/public/pdfjs/cmaps/UniCNS-UTF8-H.bcmap +0 -0
  130. package/public/pdfjs/cmaps/UniCNS-UTF8-V.bcmap +0 -0
  131. package/public/pdfjs/cmaps/UniGB-UCS2-H.bcmap +0 -0
  132. package/public/pdfjs/cmaps/UniGB-UCS2-V.bcmap +0 -0
  133. package/public/pdfjs/cmaps/UniGB-UTF16-H.bcmap +0 -0
  134. package/public/pdfjs/cmaps/UniGB-UTF16-V.bcmap +0 -0
  135. package/public/pdfjs/cmaps/UniGB-UTF32-H.bcmap +0 -0
  136. package/public/pdfjs/cmaps/UniGB-UTF32-V.bcmap +0 -0
  137. package/public/pdfjs/cmaps/UniGB-UTF8-H.bcmap +0 -0
  138. package/public/pdfjs/cmaps/UniGB-UTF8-V.bcmap +0 -0
  139. package/public/pdfjs/cmaps/UniJIS-UCS2-H.bcmap +0 -0
  140. package/public/pdfjs/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
  141. package/public/pdfjs/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
  142. package/public/pdfjs/cmaps/UniJIS-UCS2-V.bcmap +0 -0
  143. package/public/pdfjs/cmaps/UniJIS-UTF16-H.bcmap +0 -0
  144. package/public/pdfjs/cmaps/UniJIS-UTF16-V.bcmap +0 -0
  145. package/public/pdfjs/cmaps/UniJIS-UTF32-H.bcmap +0 -0
  146. package/public/pdfjs/cmaps/UniJIS-UTF32-V.bcmap +0 -0
  147. package/public/pdfjs/cmaps/UniJIS-UTF8-H.bcmap +0 -0
  148. package/public/pdfjs/cmaps/UniJIS-UTF8-V.bcmap +0 -0
  149. package/public/pdfjs/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
  150. package/public/pdfjs/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
  151. package/public/pdfjs/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
  152. package/public/pdfjs/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
  153. package/public/pdfjs/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
  154. package/public/pdfjs/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
  155. package/public/pdfjs/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
  156. package/public/pdfjs/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
  157. package/public/pdfjs/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
  158. package/public/pdfjs/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
  159. package/public/pdfjs/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
  160. package/public/pdfjs/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
  161. package/public/pdfjs/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
  162. package/public/pdfjs/cmaps/UniKS-UCS2-H.bcmap +0 -0
  163. package/public/pdfjs/cmaps/UniKS-UCS2-V.bcmap +0 -0
  164. package/public/pdfjs/cmaps/UniKS-UTF16-H.bcmap +0 -0
  165. package/public/pdfjs/cmaps/UniKS-UTF16-V.bcmap +0 -0
  166. package/public/pdfjs/cmaps/UniKS-UTF32-H.bcmap +0 -0
  167. package/public/pdfjs/cmaps/UniKS-UTF32-V.bcmap +0 -0
  168. package/public/pdfjs/cmaps/UniKS-UTF8-H.bcmap +0 -0
  169. package/public/pdfjs/cmaps/UniKS-UTF8-V.bcmap +0 -0
  170. package/public/pdfjs/cmaps/V.bcmap +0 -0
  171. package/public/pdfjs/cmaps/WP-Symbol.bcmap +0 -0
  172. package/public/pdfjs/standard_fonts/FoxitDingbats.pfb +0 -0
  173. package/public/pdfjs/standard_fonts/FoxitFixed.pfb +0 -0
  174. package/public/pdfjs/standard_fonts/FoxitFixedBold.pfb +0 -0
  175. package/public/pdfjs/standard_fonts/FoxitFixedBoldItalic.pfb +0 -0
  176. package/public/pdfjs/standard_fonts/FoxitFixedItalic.pfb +0 -0
  177. package/public/pdfjs/standard_fonts/FoxitSans.pfb +0 -0
  178. package/public/pdfjs/standard_fonts/FoxitSansBold.pfb +0 -0
  179. package/public/pdfjs/standard_fonts/FoxitSansBoldItalic.pfb +0 -0
  180. package/public/pdfjs/standard_fonts/FoxitSansItalic.pfb +0 -0
  181. package/public/pdfjs/standard_fonts/FoxitSerif.pfb +0 -0
  182. package/public/pdfjs/standard_fonts/FoxitSerifBold.pfb +0 -0
  183. package/public/pdfjs/standard_fonts/FoxitSerifBoldItalic.pfb +0 -0
  184. package/public/pdfjs/standard_fonts/FoxitSerifItalic.pfb +0 -0
  185. package/public/pdfjs/standard_fonts/FoxitSymbol.pfb +0 -0
  186. package/public/pdfjs/standard_fonts/LICENSE_FOXIT +27 -0
  187. package/public/pdfjs/standard_fonts/LICENSE_LIBERATION +102 -0
  188. package/public/pdfjs/standard_fonts/LiberationSans-Bold.ttf +0 -0
  189. package/public/pdfjs/standard_fonts/LiberationSans-BoldItalic.ttf +0 -0
  190. package/public/pdfjs/standard_fonts/LiberationSans-Italic.ttf +0 -0
  191. package/public/pdfjs/standard_fonts/LiberationSans-Regular.ttf +0 -0
  192. package/src/assets/image/default_avt_ui.png +0 -0
  193. package/src/assets/image/filtType/audio.png +0 -0
  194. package/src/assets/image/filtType/excel1.png +0 -0
  195. package/src/assets/image/filtType/general.png +0 -0
  196. package/src/assets/image/filtType/html.png +0 -0
  197. package/src/assets/image/filtType/image1.png +0 -0
  198. package/src/assets/image/filtType/link.png +0 -0
  199. package/src/assets/image/filtType/md2.png +0 -0
  200. package/src/assets/image/filtType/mode.png +0 -0
  201. package/src/assets/image/filtType/news.png +0 -0
  202. package/src/assets/image/filtType/pdf1.png +0 -0
  203. package/src/assets/image/filtType/ppt1.png +0 -0
  204. package/src/assets/image/filtType/selfadd1.png +0 -0
  205. package/src/assets/image/filtType/txt1.png +0 -0
  206. package/src/assets/image/filtType/video.png +0 -0
  207. package/src/assets/image/filtType/wechat.png +0 -0
  208. package/src/assets/image/filtType/word1.png +0 -0
  209. package/src/assets/image/loading.gif +0 -0
  210. package/src/assets/js/AliyunlssUtil.js +35 -10
  211. package/src/assets/js/common.js +44 -9
  212. package/src/assets/js/hammer.js +2 -13
  213. package/src/assets/less/converSationContainer/common.less +0 -7
  214. package/src/assets/less/converSationContainer/converSatonContainer.less +44 -51
  215. package/src/assets/less/variables.less +122 -0
  216. package/src/components/ActionAlertIframe.vue +5 -27
  217. package/src/components/AiGuide.vue +33 -26
  218. package/src/components/AnswerDocknowledge.vue +331 -183
  219. package/src/components/AnswerVoice.vue +8 -7
  220. package/src/components/ConversationContainer.vue +7046 -1100
  221. package/src/components/MyEditor.vue +17 -25
  222. package/src/components/QwFeedback.vue +304 -0
  223. package/src/components/actionSatisfaction.vue +9 -7
  224. package/src/components/actionSendToBot.vue +6 -4
  225. package/src/components/answerDissatisfaction.vue +5 -3
  226. package/src/components/answerRadio.vue +96 -21
  227. package/src/components/ask-components/DissatisfactionOptions.vue +4 -3
  228. package/src/components/ask-components/Msgloading.vue +3 -2
  229. package/src/components/askVideo.vue +78 -26
  230. package/src/components/assetDetails.vue +18 -17
  231. package/src/components/assetMessage.vue +29 -26
  232. package/src/components/associationIntention.vue +85 -26
  233. package/src/components/attachmentPreview.vue +7 -5
  234. package/src/components/botActionSatisfactor.vue +5 -3
  235. package/src/components/chatContent.vue +21 -20
  236. package/src/components/feedBack.vue +6 -4
  237. package/src/components/fielListView.vue +8 -7
  238. package/src/components/file/AliyunOssComponents.vue +1 -1
  239. package/src/components/formTemplate.vue +1593 -1648
  240. package/src/components/imgView.vue +32 -0
  241. package/src/components/intelligentSummary.vue +24 -19
  242. package/src/components/interruptComponents/imageSelectionAnswer.vue +203 -0
  243. package/src/components/interruptComponents/multipleChoiceAnswer.vue +134 -0
  244. package/src/components/interruptComponents/singleChoiceAnswer.vue +82 -0
  245. package/src/components/kkview.vue +20 -28
  246. package/src/components/markDownText.vue +961 -0
  247. package/src/components/message/TextMessage.vue +8 -6
  248. package/src/components/message/swiper/ticketSwiper.vue +1 -1
  249. package/src/components/myPopup.vue +18 -13
  250. package/src/components/outputComponents/outputCom.vue +149 -0
  251. package/src/components/pagination.vue +130 -0
  252. package/src/components/pdfPosition.vue +96 -267
  253. package/src/components/popup.vue +15 -12
  254. package/src/components/preview/docView.vue +263 -0
  255. package/src/components/preview/excelView.vue +260 -0
  256. package/src/components/preview/markDownView.vue +70 -0
  257. package/src/components/preview/newPositionPreview.vue +601 -0
  258. package/src/components/preview/pdfView.vue +976 -0
  259. package/src/components/previewDoc.vue +12 -3
  260. package/src/components/previewPdf.vue +521 -203
  261. package/src/components/previewWisdom.vue +255 -0
  262. package/src/components/receiverMessagePlatform.vue +28 -22
  263. package/src/components/recommend.vue +9 -7
  264. package/src/components/senderMessagePlatform.vue +24 -14
  265. package/src/components/tree.vue +120 -105
  266. package/src/components/utils/AliyunIssUtil.js +35 -13
  267. package/src/components/utils/ckeditor.js +59 -48
  268. package/src/components/voiceComponent.vue +9 -6
  269. package/src/components/welcomeKnowledgeFile.vue +19 -13
  270. package/src/components/welcomeLlmCard.vue +11 -9
  271. package/src/components/welcomeSuggest.vue +6 -4
  272. package/src/locales/cn.json +100 -0
  273. package/src/locales/en.json +99 -0
  274. package/src/main.js +19 -0
  275. package/src/components/newPdfPosition.vue +0 -878
@@ -5,34 +5,43 @@
5
5
  另外增加了在知识项目中预览当前文件的一些功能
6
6
  -->
7
7
  <template>
8
- <el-drawer title="我是标题" :visible.sync="drawer" :with-header="false" :append-to-body="true" :destroy-on-close="true"
9
- :modal="false" :direction="previewShowPopup ? 'btt' : 'rtl'" :size="previewShowPopup ? '90%' : '65%'"
8
+ <el-drawer title="" :visible.sync="drawer" :with-header="false" :append-to-body="true" :destroy-on-close="true"
9
+ :modal="false" :direction="!isPc ? 'btt' : 'rtl'" :size="!isPc ? '90%' : '65%'"
10
10
  custom-class="pdf-preview-drawer" v-if="drawer">
11
- <!-- v-else-if="drawer" -->
12
- <div class="drawer-header" :class="isLiBang ? 'libang_head' : ''" v-if="!isPc">
13
- <div class="header-btn btn_position">
14
- <div class="onload_btn" v-if="isDownload || true" @click="downLoad">
15
- 下载
16
- </div>
17
- <div class="summaryBtn" :class="showSummary ? 'summaryActiveBtn' : ''" @click="summaryFun" v-if="isHasChat || formKnowledgeManagement">
18
- <i class="iconfont guoran-tongyichicun-write-29-jiqiren"></i>
19
- <span>智能摘要</span>
20
- </div>
21
- <template v-if="isHasChat">
22
- <div class="chat" @click="previewToDialog(true)" v-if="!previewKnowledgeId">
23
- <i class="iconfont guoran-wendapingjia"></i>
24
- 聊一聊
25
- </div>
26
- <div class="chat chat_active" @click="previewToDialog(false)" v-else>
27
- <i class="iconfont guoran-wendapingjia"></i>
28
- 聊一聊
11
+ <div class="drawer-header" :class="(isDownload || (isHasChat && fileType != 'IMAGE')) && isLiBang ? 'has_btn_libang_head' : (isLiBang ? 'libang_head' : (isDownload || (isHasChat && fileType != 'IMAGE') ? 'has_btn_head' : ''))" v-if="!isPc">
12
+ <div class="header_title">
13
+ <template v-if="isDownload || (isHasChat && fileType != 'IMAGE')">
14
+ <div class="top-header">
15
+ <div class="header-btn">
16
+ <div class="onload_btn" v-if="isDownload" @click="downLoad">
17
+ {{ $t('dragonCommon.download') }}
18
+ </div>
19
+ <div class="summaryBtn" :class="showSummary ? 'summaryActiveBtn' : ''" @click="summaryFun" v-if="isHasChat && fileType != 'IMAGE'">
20
+ <i class="iconfont guoran-tongyichicun-write-29-jiqiren"></i>
21
+ <span>{{ $t('dragonCommon.smartSummary') }}</span>
22
+ </div>
23
+ <template v-if="isHasChat && fileType != 'IMAGE'">
24
+ <div class="chat" @click="previewToDialog(true)" v-if="!previewKnowledgeId">
25
+ <i class="iconfont guoran-wendapingjia"></i>
26
+ {{ $t('dragonCommon.chat') }}
27
+ </div>
28
+ <div class="chat chat_active" @click="previewToDialog(false)" v-else>
29
+ <i class="iconfont guoran-wendapingjia"></i>
30
+ {{ $t('dragonCommon.chat') }}
31
+ </div>
32
+ </template>
33
+ </div>
34
+ <section @click="close">
35
+ <i class="iconfont guoran-shanchu"></i>
36
+ </section>
29
37
  </div>
38
+ <span class="title_left">
39
+ {{ title ? title : $t('dragonCommon.viewDetails') }}
40
+ </span>
30
41
  </template>
31
- </div>
32
- <div class="header_title">
33
- <div class="header_close">
34
- <span>
35
- {{ title ? title : "查看详情" }}
42
+ <div class="header_close" v-else>
43
+ <span class="title_left">
44
+ {{ title ? title : $t('dragonCommon.viewDetails') }}
36
45
  </span>
37
46
  <section @click="close">
38
47
  <i class="iconfont guoran-shanchu"></i>
@@ -48,26 +57,26 @@
48
57
  <div class="drawer-header" :class="isLiBang && folderName ? 'libang_head' : ''" v-else>
49
58
  <div class="header_title">
50
59
  <div :class="isLiBang && folderName ? 'header_close' : 'header_top'">
51
- <span>
52
- {{ title ? title : "查看详情" }}
60
+ <span class="title_left">
61
+ {{ title ? title : $t('dragonCommon.viewDetails') }}
53
62
  </span>
54
63
  <div class="header-btn">
55
- <div class="onload_btn" v-if="isDownload || true" @click="downLoad">
56
- 下载
64
+ <div class="onload_btn" v-if="isDownload" @click="downLoad">
65
+ {{ $t('dragonCommon.download') }}
57
66
  </div>
58
67
  <div class="summaryBtn" :class="showSummary ? 'summaryActiveBtn' : ''" @click="summaryFun"
59
- v-if="isHasChat || true">
68
+ v-if="isHasChat && fileType != 'IMAGE'">
60
69
  <i class="iconfont guoran-tongyichicun-write-29-jiqiren"></i>
61
- <span>智能摘要</span>
70
+ <span>{{ $t('dragonCommon.smartSummary') }}</span>
62
71
  </div>
63
- <template v-if="isHasChat || true">
72
+ <template v-if="isHasChat && fileType != 'IMAGE'">
64
73
  <div class="chat" @click="previewToDialog(true)" v-if="!previewKnowledgeId">
65
74
  <i class="iconfont guoran-wendapingjia"></i>
66
- 聊一聊
75
+ {{ $t('dragonCommon.chat') }}
67
76
  </div>
68
77
  <div class="chat chat_active" @click="previewToDialog(false)" v-else>
69
78
  <i class="iconfont guoran-wendapingjia"></i>
70
- 聊一聊
79
+ {{ $t('dragonCommon.chat') }}
71
80
  </div>
72
81
  </template>
73
82
  <section @click="close">
@@ -82,21 +91,30 @@
82
91
  </p>
83
92
  </div>
84
93
  </div>
85
- <div id="drawer_content_pre" :class="isLiBang && folderName ? 'libang_content_pre' : ''">
86
- <!-- :style="{marginTop:tagIds && tagIds.length != 0 && isPc ? '50px' : ''}" -->
87
- <intelligent-summary v-show="showSummary && (isHasChat || formKnowledgeManagement)" :tagIds="tagIds" :knowledgeId="knowledgeId"
94
+ <div id="drawer_content_pre" :class="(isDownload || (isHasChat && fileType != 'IMAGE')) && !isPc && isLiBang && folderName ? 'has_btn_libang_content_pre' : (isLiBang && folderName ? 'libang_content_pre' : '')">
95
+ <intelligent-summary v-show="showSummary && (isHasChat && fileType != 'IMAGE')" :tagIds="tagIds" :knowledgeId="knowledgeId"
88
96
  @closeSummary="closeSummary" @recommendQues="recommendQues"
89
97
  @getSummarySuccess="getSummarySuccess"></intelligent-summary>
90
- <div class="pdf_positon" :style="pdfStyle" v-if="tagIds && tagIds.length != 0 && drawer">
98
+ <div class="pdf_positon" :style="pdfStyle" v-if="tagIds && tagIds.length != 0 && drawer && newVersion === false && newFileType !== 'PPT' && newFileType !== 'PPTX' && newFileType !== 'IMAGE'">
91
99
  <pdfPosition :tagIds="tagIds" :isMessageRecord="isMessageRecord" :textWatermarkStr="textWatermarkStr">
92
100
  </pdfPosition>
93
101
  </div>
102
+ <new-position-preview
103
+ ref="newPositionPreview"
104
+ v-else-if="tagIds && tagIds.length!= 0 && newVersion && newFileType !== 'PPT' && newFileType !== 'PPTX' && newFileType !== 'IMAGE'"
105
+ :knowledgeId="knowledgeId"
106
+ :tagIds="tagIds"
107
+ :url="previewHref"
108
+ :textWatermarkStr="textWatermarkStr"
109
+ :previewOssPath="previewOssPath"
110
+ :isLining="isLining"
111
+ ></new-position-preview>
94
112
  <template v-else>
95
113
  <div v-if="fileType == 'VIDEO'" style="width: 100%;">
96
114
  <video :src="url" controls width="100%;" height="98%"></video>
97
115
  </div>
98
116
  <div v-else-if="fileType == 'HTML'" style="width: 100%;">
99
- <div class="preview_iframe_html" style="text-algin:left" v-html="fileText"></div>
117
+ <div class="preview_iframe_html" style="text-align:left" v-html="fileText"></div>
100
118
  </div>
101
119
  <template v-else-if="url.includes('https://www') || url.includes('http://www')">
102
120
  <iframe class="preview_iframe" :src="url" width="100%" height="100%" scrolling="100%" frameborder="no"
@@ -105,11 +123,20 @@
105
123
  <template v-else>
106
124
  <iframe class="preview_iframe_kk" :src="previewUrl" style="border:none;"
107
125
  :style="{ height: iframeHeight }"></iframe>
126
+ <template v-if="!loading && ((newFileType === 'PPT' || newFileType === 'PPTX') && pageChunkData.length > 1)">
127
+ <div class="btn_footer" v-if="!isPc">
128
+ <div class="prev" @click="prev">{{$t('dragonCommon.previous')}}</div>
129
+ <div class="next" @click="next">{{$t('dragonCommon.next')}}</div>
130
+ </div>
131
+ <div id="pagination" v-if="isPc">
132
+ <el-pagination :current-page="currentPage + 1" @current-change="currentChange" @prev-click="prev"
133
+ @next-click="next" layout="slot, prev, pager, next" :page-size="1" :total="pageChunkData.length">
134
+ <span class="total-class">{{$t('dragonCommon.answersGeneratedByPre')}} {{ pageChunkData.length }} {{$t('dragonCommon.answersGeneratedByAfter')}}</span>
135
+ </el-pagination>
136
+ </div>
137
+ </template>
108
138
  </template>
109
139
  </template>
110
- <!-- <div class="mobile_onload_btn" v-if="isDownload && !isPc" @click="downLoad">
111
- 下载
112
- </div> -->
113
140
  </div>
114
141
  <div class="loading_img" v-show="loading">
115
142
  <img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif" alt="">
@@ -126,63 +153,71 @@ import { zoomElement } from '../assets/js/hammer'
126
153
  import IntelligentSummary from "./intelligentSummary";
127
154
  import { isMobile } from "../assets/js/common";
128
155
  import { Toast } from 'vant';
156
+ import NewPositionPreview from "./preview/newPositionPreview";
129
157
  export default {
130
158
  data () {
131
159
  return {
132
- previewShowPopup: false,
133
- fileText: '',
134
- fileType: "",
135
- isPc: false,
136
- drawer: false,
137
- tagIds: [],
138
- // '6454aa1a70573a6ead6f0f7d', '6454aa1a70573a6ead6f0f81',
139
- loading: true,
140
- fileName:'',
141
- previewKnowledgeId:"",
142
- showSummary:true,
143
- iframeHeight:"100%",
144
- isDownload: false,
145
- textWatermarkStr:"",
146
- copy:''}
147
- },
148
- mounted() {
149
- window.addEventListener('message',this.handleIframeMessage,false);
150
- this.isPcFun();
151
- },
152
- props:{
153
- url:{
154
- type: String,
155
- required: true,
156
- },
157
- officePreviewType:{
158
- type: String,
159
- default: ''
160
- },
161
- isMessageRecord:{
162
- type: Boolean,
163
- default:false,
164
- },
165
- sourceFileType:{
166
- type: String,
167
- default: '',
168
- },
169
- title: {
170
- type: String,
171
- default: ''
172
- },
173
- isHasChat:{
174
- type:Boolean,
175
- default:false
176
- },
177
- knowledgeId:{
178
- type: String,
179
- default: '',
180
- },
181
- previewOssPath:{
182
- type: String,
183
- default: '',
184
- },
185
- folderName: {
160
+ previewShowPopup: false,
161
+ fileText: '',
162
+ fileType: "",
163
+ isPc: false,
164
+ drawer: false,
165
+ tagIds: [],
166
+ // '6454aa1a70573a6ead6f0f7d', '6454aa1a70573a6ead6f0f81',
167
+ loading: true,
168
+ previewKnowledgeId: "",
169
+ showSummary: false,
170
+ iframeHeight: "100%",
171
+ isDownload: false,
172
+ textWatermarkStr: "",
173
+ copy:'',
174
+ newVersion:'',
175
+ previewHref:"",
176
+ newFileType:"",
177
+ numberPage:0,
178
+ pageChunkData:[],
179
+ currentPage:0
180
+ }
181
+ },
182
+ mounted () {
183
+ this.$i18n.locale = sessionStorage.getItem("systemLanguage") || 'cn';
184
+ window.addEventListener('message', this.handleIframeMessage, false);
185
+ this.isPcFun();
186
+ },
187
+ props: {
188
+ url: {
189
+ type: String,
190
+ required: true,
191
+ },
192
+ officePreviewType: {
193
+ type: String,
194
+ default: ''
195
+ },
196
+ isMessageRecord: {
197
+ type: Boolean,
198
+ default: false,
199
+ },
200
+ sourceFileType: {
201
+ type: String,
202
+ default: '',
203
+ },
204
+ title: {
205
+ type: String,
206
+ default: ''
207
+ },
208
+ isHasChat: {
209
+ type: Boolean,
210
+ default: false
211
+ },
212
+ knowledgeId: {
213
+ type: String,
214
+ default: '',
215
+ },
216
+ previewOssPath: {
217
+ type: String,
218
+ default: '',
219
+ },
220
+ folderName: {
186
221
  type: String,
187
222
  default: '',
188
223
  },
@@ -194,12 +229,21 @@ export default {
194
229
  type: Boolean,
195
230
  default: false
196
231
  },
197
- formKnowledgeManagement:{
232
+ isLining:{
233
+ type: Boolean,
234
+ default: false
235
+ },
236
+ processEnvUrl:{
237
+ type: String,
238
+ default: ''
239
+ },
240
+ isProduction:{
198
241
  type: Boolean,
199
242
  default: false
200
243
  }
201
244
  },
202
245
  components: {
246
+ NewPositionPreview,
203
247
  IntelligentSummary,
204
248
  pdfPosition
205
249
  },
@@ -208,76 +252,80 @@ export default {
208
252
  if (value) {
209
253
  this.$emit('open')
210
254
  this.$nextTick(() => {
211
- if (this.tagIds && this.tagIds.length != 0){
212
- zoomElement(document.getElementById('pdf_container_view'))
213
- }
214
- })
215
- } else {
216
- this.$emit('close')
217
- }
218
- setTimeout(() => {
219
- let previewIframe = document.getElementsByClassName('preview_iframe')
220
- Array.from(previewIframe).forEach(item =>{
221
- item.onload = () =>{
222
- console.debug('previewIframe 106',previewIframe,this.drawer)
223
- item.style.backgroundImage = 'none'
224
- }
225
- })
255
+ zoomElement(document.getElementById('drawer_content_pre'))
226
256
  })
227
- },
228
- showSummary:{
229
- handler(val){
230
- // if (!val){
231
- // this.$nextTick(() => {
232
- // let preCon = document.querySelector('.pdf_view');
233
- // if (preCon){
234
- // preCon.style.height = 'calc(100% - ' + 50 + 'px)'
235
- // }
236
- // })
237
- // } else {
238
- // this.getSummarySuccess();
239
- // }
240
- if(val) {
241
- this.getSummarySuccess();
242
- }
257
+ } else {
258
+ this.$emit('close')
259
+ }
260
+ },
261
+ showSummary: {
262
+ handler (val) {
263
+ // if (!val){
264
+ // this.$nextTick(() => {
265
+ // let preCon = document.querySelector('.pdf_view');
266
+ // if (preCon){
267
+ // preCon.style.height = 'calc(100% - ' + 50 + 'px)'
268
+ // }
269
+ // })
270
+ // } else {
271
+ // this.getSummarySuccess();
272
+ // }
273
+ if (val) {
274
+ this.getSummarySuccess();
243
275
  }
244
- },
245
- knowledgeId:{
246
- handler(val){
247
- if (val){
248
- this.getTextWatermark();
249
- }
276
+ }
277
+ },
278
+ knowledgeId: {
279
+ handler (val) {
280
+ if (val) {
281
+ this.getTextWatermark();
250
282
  }
251
283
  }
284
+ }
285
+ },
286
+ computed: {
287
+ pdfStyle () {
288
+ return {
289
+ paddingTop: this.isPc ? '30px' : '0', // 30px 是 加上外层的 20 流出 50的上边距展示 放大缩小操作栏
290
+ paddingBottom: this.tagIds > 1 ? '60px' : '0',
291
+ height: '100%'
292
+ }
252
293
  },
253
- computed:{
254
- pdfStyle() {
255
- return {
256
- paddingTop: this.isPc ? '30px' : '0', // 30px 是 加上外层的 20 流出 50的上边距展示 放大缩小操作栏
257
- paddingBottom: this.tagIds > 1 ? '60px' : '0',
258
- height: '100%'
259
- }
260
- },
261
- previewUrl() {
262
- console.debug('VUE_APP_ENV',process.env.VUE_APP_ENV)
263
- let url = process.env.VUE_APP_ENV === 'production' ? 'https://kkfileview.askbot.cn/onlinePreview?url=' : 'https://test.open.askbot.cn/kkfileview/onlinePreview?url='
264
- // if(this.url != '') {
265
- // if(/[\u4E00-\u9FA5]+/g.test(this.url)) {
266
- // url += btoa(encodeURIComponent(this.url))
267
- // } else {
268
- // url += btoa(this.url)
269
- // }
270
- // }
271
- url = url + this.url
272
- url += '&officePreviewType=pdf'
273
- if(this.watermark) {
274
- url = this.watermark.textWatermarkValue ? (url += '&textWatermarkValue=' + this.watermark.textWatermarkValue) : url
275
- url = this.watermark.visitorWatermarkValue ? (url += '&visitorWatermarkValue=' + this.watermark.visitorWatermarkValue) : url
294
+ previewUrl () {
295
+ let url = ""
296
+ if (process.env.VUE_APP_ENV == 'production'){
297
+ url = "https://kkfileview.askbot.cn/onlinePreview?url="
298
+ } else {
299
+ url = "https://test.open.askbot.cn/kkfileview/onlinePreview?url="
300
+ }
301
+ if (this.processEnvUrl){
302
+ url = this.processEnvUrl
303
+ }
304
+ if(process.env.VUE_APP_SOURCE == 'lining_test') {
305
+ url = 'https://wxgw.lining.com/askbot/kkfileview/onlinePreview?url='
306
+ }
307
+ if(process.env.VUE_APP_SOURCE == 'lining_production') {
308
+ url = 'https://wxgw.lining.com/askbot-prd/kkfileview/onlinePreview?url='
309
+ }
310
+ console.debug('VUE_APP_ENV', process.env.VUE_APP_ENV,process.env.VUE_APP_SOURCE,url)
311
+ // if(this.url != '') {
312
+ // if(/[\u4E00-\u9FA5]+/g.test(this.url)) {
313
+ // url += btoa(encodeURIComponent(this.url))
314
+ // } else {
315
+ // url += btoa(this.url)
316
+ // }
317
+ // }
318
+ url = url + this.url
319
+ if (this.sourceFileType == '.ppt' || this.sourceFileType == '.pptx' || this.sourceFileType == '.pdf') {
320
+ url += '&officePreviewType=pdf'
276
321
  }
277
322
  console.log('textWatermarkStr 216', this.textWatermarkStr)
278
323
  if (this.textWatermarkStr) {
279
324
  url += '&textWatermarkValue=' + this.textWatermarkStr
280
325
  }
326
+ if (this.isLining){
327
+ url += '&isLining=true'
328
+ }
281
329
  return url
282
330
  },
283
331
  // fileType() {
@@ -301,7 +349,7 @@ export default {
301
349
  },
302
350
  loadIframe () {
303
351
 
304
- if (this.fileType == 'VIDEO' || this.fileType == 'WECHAT' || (this.tagIds && this.tagIds.length != 0)) {
352
+ if (this.fileType == 'VIDEO' || this.fileType == 'WECHAT' || (this.tagIds && this.tagIds.length != 0 && this.newFileType !== 'PPT' && this.newFileType !== 'PPTX' && this.newFileType !== 'IMAGE')) {
305
353
  this.loading = false
306
354
  } else {
307
355
  let iframe = document.getElementsByClassName('preview_iframe')[0] || document.getElementsByClassName('preview_iframe_kk')[0];
@@ -342,13 +390,23 @@ export default {
342
390
  this.$emit('recommendQues', item, knowledgeId)
343
391
  },
344
392
  handleIframeMessage (res) {
345
- console.log('handleIframeMessage', res)
346
393
  if (res.data.type == 'getViewerHeight') {
347
394
  let iframeHeight = this.iframeHeight.replace('px', '')
348
395
  if (res.data.data && iframeHeight != (res.data.data + 50)) {
349
396
  this.iframeHeight = res.data.data + 50 + 'px'
350
397
  }
351
398
  }
399
+ if (res.data.type == 'getViewPage' && res.data.data){
400
+ this.numberPage = Number(res.data.data);
401
+ if (this.pageChunkData.length > 0){
402
+ this.scrollPPTPage(this.pageChunkData[0])
403
+ }
404
+ }
405
+ if (res.data.type == 'getViewerHeight' || res.data.type == 'getViewPage'){
406
+ if (this.pageChunkData.length > 0){
407
+ this.scrollPPTPage(this.pageChunkData[0])
408
+ }
409
+ }
352
410
  },
353
411
  summaryFun () {
354
412
  this.showSummary = !this.showSummary;
@@ -402,7 +460,7 @@ export default {
402
460
  }
403
461
  }).then(res => {
404
462
  console.log('downLoad 341', res)
405
- if (res.data|| res.bodyText) {
463
+ if (res.data || res.bodyText) {
406
464
  if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
407
465
  this.copy = res.data
408
466
  if (isMobile()) {
@@ -415,7 +473,7 @@ export default {
415
473
  selection.addRange(range);
416
474
  document.execCommand('copy');
417
475
  selection.removeAllRanges()
418
- Toast('下载地址已复制,请前往Safari浏览器访问下载');
476
+ Toast(this.$t('dragonCommon.Safaridownload'));
419
477
  this.close()
420
478
  },100)
421
479
  } else {
@@ -431,17 +489,16 @@ export default {
431
489
  // }, 2000)
432
490
  // window.open(res.data,'下载', 'noopener')
433
491
  if (isMobile()) {
434
-
435
- const iframe = document.createElement("iframe");
436
- iframe.setAttribute("hidden", "hidden");
437
- iframe.onload = () => {
438
- if (iframe) {
439
- console.log("iframe onload....")
440
- iframe.setAttribute('src', 'about:blank');
441
- }
442
- };
443
- document.body.insertBefore(iframe, null);
444
- iframe.setAttribute("src", res.data );
492
+ const iframe = document.createElement("iframe");
493
+ iframe.setAttribute("hidden", "hidden");
494
+ iframe.onload = () => {
495
+ if (iframe) {
496
+ console.log("iframe onload....")
497
+ iframe.setAttribute('src', 'about:blank');
498
+ }
499
+ };
500
+ document.body.insertBefore(iframe, null);
501
+ iframe.setAttribute("src", res.data);
445
502
  } else {
446
503
  let a = document.createElement('a')
447
504
  a.href = res.data
@@ -449,7 +506,7 @@ export default {
449
506
  a.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true, view: window }))
450
507
  }
451
508
  this.close()
452
- }
509
+ }
453
510
  }
454
511
  })
455
512
  },
@@ -457,13 +514,123 @@ export default {
457
514
  if (/(iPhone|iPad|iPod|iOS|Android)/i.test(navigator.userAgent)) {
458
515
  this.isPc = false
459
516
  } else {
460
- this.isPc = true
517
+ let documentWidth = document.documentElement.clientWidth;
518
+ if(documentWidth < 750) {
519
+ this.isPc = false
520
+ } else {
521
+ this.isPc = true
522
+ }
461
523
  }
462
524
  },
463
525
  clickFloder() {
464
526
  this.$emit('previewClickFloder')
527
+ },
528
+ getOssPath(url){
529
+ let httpUrl = '/knowledge-api/knowledge/getTemporaryCertificate';
530
+ let type = this.getFileType(url)
531
+ this.newFileType = type;
532
+ console.log('type',type)
533
+ if (type === 'VIDEO' || type === 'PDF' || type === 'EXCEL' || type === 'TXT' || type === 'DOC' || type === 'MD') {
534
+ httpUrl += '?needEncrypt=false'
535
+ } else {
536
+ httpUrl += '?needEncrypt=true'
537
+ }
538
+ this.$http.post(httpUrl, {
539
+ "fileInOssPath": url
540
+ }).then(res => {
541
+ console.log('getOssPath',res)
542
+ if (res.data.code == '0'){
543
+ this.previewHref = res.data.data;
544
+ }
545
+ })
546
+ },
547
+ getFileType(url){
548
+ let index = url.lastIndexOf('?')
549
+ let newFileInOssPath = url.substring(0, url.indexOf("?"))
550
+ if (index == -1){
551
+ newFileInOssPath = url
552
+ }
553
+ const fileType = newFileInOssPath.substring(newFileInOssPath.lastIndexOf('.'));
554
+ if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.MOVC' || fileType === '.mov' || fileType === '.movc') {
555
+ return 'VIDEO'
556
+ } else if (fileType === '.html') {
557
+ return 'HTML'
558
+ } else if (fileType === '.png' || fileType === '.jpg' || fileType === '.jpeg' || fileType === '.PNG' || fileType === '.JPG' || fileType === '.JPEG') {
559
+ return 'IMAGE'
560
+ } else if (fileType === '.docx' || fileType === '.doc'){
561
+ return 'DOC'
562
+ } else if (fileType === '.ppt' || fileType === '.pptx'){
563
+ return 'PPT'
564
+ } else if (fileType === '.pdf'){
565
+ return 'PDF'
566
+ } else if (fileType === '.txt'){
567
+ return 'TXT'
568
+ } else if (fileType === '.md'){
569
+ return 'MD'
570
+ } else {
571
+ return 'OTHER'
572
+ }
573
+ },
574
+ //判断是否使用新定位组件
575
+ getLocationInfo(){
576
+ this.newVersion = "";
577
+ this.$http.get('/knowledge-api/knowledge/knowledge-part-location-info/list?ids=' + this.tagIds.join(',')).then(res => {
578
+ console.log('getLocationInfo',res)
579
+ this.pageChunkData = [];
580
+ if (res.data.code == 0){
581
+ if (res.data.data && res.data.data.length > 0 && res.data.data[0].extractVersion == 'v3'){
582
+ this.newVersion = true;
583
+ if (this.newFileType !== 'PPT' && this.newFileType !== 'PPTX' && this.newFileType !== 'IMAGE'){
584
+ this.loading = false;
585
+ }
586
+ for (let i=0;i<res.data.data.length;i++){
587
+ if (res.data.data[i].paragraphChunkInfo && res.data.data[i].paragraphChunkInfo.pageChunkData){
588
+ this.pageChunkData.push(res.data.data[i].paragraphChunkInfo.pageChunkData.page_number)
589
+ }
590
+ }
591
+ if (this.pageChunkData.length > 1){
592
+ let iframe = document.getElementsByClassName('preview_iframe_kk')
593
+ if (iframe && iframe.length > 0){
594
+ iframe[0].style.paddingBottom = '50px'
595
+ }
596
+ }
597
+ } else {
598
+ this.newVersion = false;
599
+ }
600
+ }
601
+ })
602
+ },
603
+ currentChange (value) {
604
+ this.currentPage = value - 1;
605
+ this.scrollPPTPage()
606
+ },
607
+ prev(){
608
+ if (this.currentPage == 0){
609
+ return
610
+ }
611
+ this.currentPage--;
612
+ this.scrollPPTPage()
613
+ },
614
+ next(){
615
+ if (this.currentPage === (this.pageChunkData.length - 1)){
616
+ return;
617
+ }
618
+ this.currentPage++;
619
+ this.scrollPPTPage()
620
+ },
621
+ scrollPPTPage(){
622
+ if (this.numberPage > 0){
623
+ let pageNumber = this.pageChunkData[this.currentPage];
624
+ let height = Math.floor(Number(this.iframeHeight.replace('px',"")));
625
+ let pageHeight = Math.floor(height / this.numberPage);
626
+ let scrollHeight = (pageNumber - 1) * pageHeight;
627
+ let dom = document.getElementById('drawer_content_pre');
628
+ if (dom){
629
+ dom.scrollTo(0,scrollHeight)
630
+ }
631
+ }
465
632
  }
466
- },
633
+ },
467
634
  beforeDestroy () {
468
635
  window.removeEventListener('message', this.handleIframeMessage);
469
636
  }
@@ -471,6 +638,8 @@ export default {
471
638
  </script>
472
639
 
473
640
  <style lang="less" scoped>
641
+ @import "../assets/less/variables.less";
642
+
474
643
  #drawer_content_pre {
475
644
  padding: 20px;
476
645
  scroll-behavior: smooth;
@@ -487,9 +656,9 @@ export default {
487
656
  cursor: pointer;
488
657
  border-top-left-radius: 10px;
489
658
  border-bottom-left-radius: 10px;
490
- color: #366aff;
491
- background: #ffffff;
492
- border: 1px solid #a1b9ff;
659
+ color: @font-primary-accent-color;
660
+ background: @background-color-light;
661
+ border: 1px solid @border-color-copy;
493
662
  font-size: 12px;
494
663
  border-right: none;
495
664
  text-align: center;
@@ -510,9 +679,9 @@ export default {
510
679
  cursor: pointer;
511
680
  margin-right: 10px;
512
681
  border-radius: 15px;
513
- color: #366aff;
514
- background: #ffffff;
515
- border: 1px solid #a1b9ff;
682
+ color: @font-primary-accent-color;
683
+ background: @background-color-light;
684
+ border: 1px solid @border-color-copy;
516
685
  box-sizing: border-box;
517
686
  }
518
687
 
@@ -530,8 +699,133 @@ export default {
530
699
  width: 100%;
531
700
  height: 100%;
532
701
  }
702
+ .btn_footer {
703
+ width: 100%;
704
+ height: 60px;
705
+ display: flex;
706
+ align-items: center;
707
+ justify-content: space-around;
708
+ position: absolute;
709
+ bottom: 0px;
710
+ left: 0;
711
+ z-index: 999;
712
+ background: @background-color-light;
713
+
714
+ .prev,
715
+ .next {
716
+ width: 35%;
717
+ height: 40px;
718
+ display: flex;
719
+ align-items: center;
720
+ justify-content: center;
721
+ border-radius: 50px;
722
+ cursor: pointer;
723
+ }
724
+
725
+ .prev {
726
+ background: @background-color-prev;
727
+ color: @font-primary-color;
728
+ }
729
+
730
+ .next {
731
+ background: @primary-color;
732
+ color: @font-primary-light-color;
733
+ }
734
+ }
735
+ #pagination {
736
+ .total-class {
737
+ margin-right: 13px;
738
+ font-weight: 400;
739
+ }
740
+
741
+ position: absolute;
742
+ bottom: 0px;
743
+ right: 0;
744
+ width: 100%;
745
+ display: flex;
746
+ align-items: center;
747
+ justify-content: center;
748
+ height: 50px;
749
+ background-color: @background-color-light;
750
+ box-shadow: 0px 0px 18px 0px rgba(29, 55, 129, 0.07);
751
+ border-radius: 5px;
752
+ z-index: 1000;
753
+
754
+
755
+
756
+ /deep/.el-pagination {
757
+ margin-right: 110px;
758
+ }
759
+
760
+ /deep/.el-pager {
761
+ background: @background-color-pagination;
762
+ border-radius: 15px;
763
+ }
764
+
765
+ /deep/.el-pagination.is-background .btn-next {
766
+ width: 30px;
767
+ height: 30px;
768
+ background: @background-color-pagination;
769
+ border-radius: 50%;
770
+ }
771
+
772
+ /deep/.el-pagination .btn-next {
773
+ width: 30px;
774
+ height: 30px;
775
+ background: @background-color-pagination;
776
+ border-radius: 50%;
777
+ padding-left: 0;
778
+ margin-left: 5px;
779
+ }
780
+
781
+ /deep/.el-pagination .btn-prev {
782
+ width: 30px;
783
+ height: 30px;
784
+ background: @background-color-pagination;
785
+ border-radius: 50%;
786
+ padding-right: 0;
787
+ margin-right: 5px;
788
+ }
789
+
790
+ /deep/.el-pagination button {
791
+ padding: 0;
792
+ min-width: 30px;
793
+ }
794
+
795
+ /deep/.el-pager li {
796
+ background: @background-color-pagination;
797
+ height: 30px;
798
+ min-width: 30px;
799
+ line-height: 30px;
800
+ font-size: 12px;
801
+ color: @font-pagination-color;
802
+ }
803
+
804
+ /deep/.el-pager li:first-child {
805
+ border-bottom-left-radius: 15px !important;
806
+ border-top-left-radius: 15px !important;
807
+ }
533
808
 
809
+ /deep/.el-pager li:last-child {
810
+ border-top-right-radius: 15px !important;
811
+ border-bottom-right-radius: 15px !important;
812
+ }
534
813
 
814
+ /deep/.el-pager li.active {
815
+ width: 30px;
816
+ height: 30px;
817
+ min-width: 30px;
818
+ background: @primary-color;
819
+ border: 3px solid @border-color-copy;
820
+ border-radius: 50%;
821
+ line-height: 24px;
822
+ color: @font-primary-light-color;
823
+ }
824
+
825
+ /deep/.el-pagination.is-background .el-pager li:not(.disabled).active {
826
+ background: @primary-color;
827
+ }
828
+ }
535
829
  .preview_iframe_html {
536
830
  width: 100%;
537
831
  height: 100%;
@@ -583,7 +877,7 @@ export default {
583
877
  justify-content: space-between;
584
878
  cursor: pointer;
585
879
  padding: 0 20px;
586
- border-bottom: 1px solid #cccccc;
880
+ border-bottom: 1px solid @border-color-r5;
587
881
  }
588
882
 
589
883
  .loading_img {
@@ -595,7 +889,7 @@ export default {
595
889
  position: absolute;
596
890
  top: 0;
597
891
  left: 0;
598
- background: #FFF;
892
+ background: @background-color-light;
599
893
 
600
894
  img {
601
895
  width: 50px;
@@ -606,13 +900,18 @@ export default {
606
900
  .libang_head {
607
901
  height: 64px !important;
608
902
  }
609
-
903
+ .has_btn_libang_head{
904
+ height: 85px!important;
905
+ }
906
+ .has_btn_head{
907
+ height: 60px!important;
908
+ }
610
909
  .drawer-header {
611
910
  width: 100%;
612
911
  height: 50px;
613
912
  cursor: pointer;
614
913
  padding: 6px 20px;
615
- border-bottom: 1px solid #cccccc;
914
+ border-bottom: 1px solid @border-color-r5;
616
915
  .btn_position {
617
916
  position: absolute;
618
917
  top: -34px;
@@ -623,25 +922,24 @@ export default {
623
922
  display: flex;
624
923
  align-items: center;
625
924
  justify-content: space-between;
626
-
925
+ flex: none;
627
926
  .header-right {
628
927
  display: flex;
629
928
  }
630
-
631
929
  .summaryBtn {
632
930
  flex: none;
633
931
  //width: 95px;
634
932
  height: 26px;
635
933
  padding: 0 8px;
636
- background: #ffffff;
934
+ background: @background-color-light;
637
935
  display: flex;
638
936
  align-items: center;
639
937
  justify-content: center;
640
938
  box-sizing: border-box;
641
- border: 1px solid #a1b9ff;
939
+ border: 1px solid @border-color-copy;
642
940
  border-radius: 15px;
643
941
  cursor: pointer;
644
- color: #366aff;
942
+ color: @font-primary-accent-color;
645
943
  margin-right: 10px;
646
944
  font-size: 14px;
647
945
 
@@ -652,23 +950,23 @@ export default {
652
950
  }
653
951
 
654
952
  .summaryActiveBtn {
655
- background: #366aff !important;
656
- color: #ffffff !important;
953
+ background: @primary-color !important;
954
+ color: @font-primary-light-color !important;
657
955
  }
658
956
 
659
957
  .chat {
660
958
  flex: none;
661
959
  height: 26px;
662
960
  padding: 0 8px;
663
- background: #ffffff;
961
+ background: @background-color-light;
664
962
  display: flex;
665
963
  align-items: center;
666
964
  justify-content: center;
667
965
  box-sizing: border-box;
668
- border: 1px solid #a1b9ff;
966
+ border: 1px solid @border-color-copy;
669
967
  border-radius: 15px 0px 15px 15px;
670
968
  cursor: pointer;
671
- color: #366aff;
969
+ color: @font-primary-accent-color;
672
970
  margin-right: 10px;
673
971
  font-size: 14px;
674
972
 
@@ -680,8 +978,8 @@ export default {
680
978
  }
681
979
 
682
980
  .chat_active {
683
- background: #366aff !important;
684
- color: #FFFFFF !important;
981
+ background: @primary-color !important;
982
+ color: @font-primary-light-color !important;
685
983
  }
686
984
  }
687
985
 
@@ -694,13 +992,27 @@ export default {
694
992
  justify-content: space-between;
695
993
  line-height: 26px;
696
994
  }
995
+ .title_left {
996
+ white-space: nowrap; /* 确保文本不会换行 */
997
+ overflow: hidden; /* 隐藏超出容器的文本 */
998
+ text-overflow: ellipsis; /* 当文本超出容器时显示省略号 */
999
+ margin-right: 8px;
1000
+ text-align: left;
1001
+ }
1002
+ .top-header{
1003
+ display: flex;
1004
+ align-items: center;
1005
+ justify-content: flex-end;
1006
+ margin-bottom: 6px;
1007
+ }
697
1008
  .header_floder {
698
1009
  display: flex;
699
1010
  align-items: center;
700
1011
  line-height: 26px;
1012
+ text-align: left;
701
1013
  i {
702
1014
  margin: 0 5px;
703
- color: #366aff;
1015
+ color: @font-primary-accent-color;
704
1016
  }
705
1017
  }
706
1018
  .header_top {
@@ -711,7 +1023,9 @@ export default {
711
1023
  }
712
1024
  }
713
1025
  }
714
-
1026
+ .has_btn_libang_content_pre{
1027
+ height: calc(100% - 85px) !important;
1028
+ }
715
1029
  @media screen and (max-width: 767px) {
716
1030
 
717
1031
  /* 这里是针对移动设备的css样式设置 */
@@ -722,7 +1036,11 @@ export default {
722
1036
  #drawer_content_pre {
723
1037
  overflow: auto;
724
1038
  height: calc(100% - 50px);
725
- background: #FFF;
1039
+ background: @background-color-light;
1040
+ background-image: url('https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif');
1041
+ background-position: center;
1042
+ background-size: 50px;
1043
+ background-repeat: no-repeat;
726
1044
  }
727
1045
 
728
1046
  .libang_content_pre {
@@ -740,7 +1058,7 @@ export default {
740
1058
  #drawer_content_pre {
741
1059
  overflow: auto;
742
1060
  height: calc(100% - 50px);
743
- background: #FFF;
1061
+ background: @background-color-light;
744
1062
  }
745
1063
 
746
1064
  .libang_content_pre {
@@ -768,7 +1086,7 @@ export default {
768
1086
  #drawer_content_pre {
769
1087
  overflow: auto;
770
1088
  height: calc(100% - 50px);
771
- background: #FFF;
1089
+ background: @background-color-light;
772
1090
  }
773
1091
 
774
1092
  .libang_content_pre {
@@ -788,4 +1106,4 @@ export default {
788
1106
  top: 74px !important;
789
1107
  }
790
1108
  }
791
- </style>
1109
+ </style>