askbot-dragon 1.6.76-beta → 1.6.76

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 (308) hide show
  1. package/README.md +27 -27
  2. package/babel.config.js +6 -6
  3. package/dragon.iml +7 -7
  4. package/package.json +58 -55
  5. package/public/index.html +75 -72
  6. package/public/pdfjs/cmaps/78-EUC-H.bcmap +0 -0
  7. package/public/pdfjs/cmaps/78-EUC-V.bcmap +0 -0
  8. package/public/pdfjs/cmaps/78-H.bcmap +0 -0
  9. package/public/pdfjs/cmaps/78-RKSJ-H.bcmap +0 -0
  10. package/public/pdfjs/cmaps/78-RKSJ-V.bcmap +0 -0
  11. package/public/pdfjs/cmaps/78-V.bcmap +0 -0
  12. package/public/pdfjs/cmaps/78ms-RKSJ-H.bcmap +0 -0
  13. package/public/pdfjs/cmaps/78ms-RKSJ-V.bcmap +0 -0
  14. package/public/pdfjs/cmaps/83pv-RKSJ-H.bcmap +0 -0
  15. package/public/pdfjs/cmaps/90ms-RKSJ-H.bcmap +0 -0
  16. package/public/pdfjs/cmaps/90ms-RKSJ-V.bcmap +0 -0
  17. package/public/pdfjs/cmaps/90msp-RKSJ-H.bcmap +0 -0
  18. package/public/pdfjs/cmaps/90msp-RKSJ-V.bcmap +0 -0
  19. package/public/pdfjs/cmaps/90pv-RKSJ-H.bcmap +0 -0
  20. package/public/pdfjs/cmaps/90pv-RKSJ-V.bcmap +0 -0
  21. package/public/pdfjs/cmaps/Add-H.bcmap +0 -0
  22. package/public/pdfjs/cmaps/Add-RKSJ-H.bcmap +0 -0
  23. package/public/pdfjs/cmaps/Add-RKSJ-V.bcmap +0 -0
  24. package/public/pdfjs/cmaps/Add-V.bcmap +0 -0
  25. package/public/pdfjs/cmaps/Adobe-CNS1-0.bcmap +0 -0
  26. package/public/pdfjs/cmaps/Adobe-CNS1-1.bcmap +0 -0
  27. package/public/pdfjs/cmaps/Adobe-CNS1-2.bcmap +0 -0
  28. package/public/pdfjs/cmaps/Adobe-CNS1-3.bcmap +0 -0
  29. package/public/pdfjs/cmaps/Adobe-CNS1-4.bcmap +0 -0
  30. package/public/pdfjs/cmaps/Adobe-CNS1-5.bcmap +0 -0
  31. package/public/pdfjs/cmaps/Adobe-CNS1-6.bcmap +0 -0
  32. package/public/pdfjs/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
  33. package/public/pdfjs/cmaps/Adobe-GB1-0.bcmap +0 -0
  34. package/public/pdfjs/cmaps/Adobe-GB1-1.bcmap +0 -0
  35. package/public/pdfjs/cmaps/Adobe-GB1-2.bcmap +0 -0
  36. package/public/pdfjs/cmaps/Adobe-GB1-3.bcmap +0 -0
  37. package/public/pdfjs/cmaps/Adobe-GB1-4.bcmap +0 -0
  38. package/public/pdfjs/cmaps/Adobe-GB1-5.bcmap +0 -0
  39. package/public/pdfjs/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
  40. package/public/pdfjs/cmaps/Adobe-Japan1-0.bcmap +0 -0
  41. package/public/pdfjs/cmaps/Adobe-Japan1-1.bcmap +0 -0
  42. package/public/pdfjs/cmaps/Adobe-Japan1-2.bcmap +0 -0
  43. package/public/pdfjs/cmaps/Adobe-Japan1-3.bcmap +0 -0
  44. package/public/pdfjs/cmaps/Adobe-Japan1-4.bcmap +0 -0
  45. package/public/pdfjs/cmaps/Adobe-Japan1-5.bcmap +0 -0
  46. package/public/pdfjs/cmaps/Adobe-Japan1-6.bcmap +0 -0
  47. package/public/pdfjs/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
  48. package/public/pdfjs/cmaps/Adobe-Korea1-0.bcmap +0 -0
  49. package/public/pdfjs/cmaps/Adobe-Korea1-1.bcmap +0 -0
  50. package/public/pdfjs/cmaps/Adobe-Korea1-2.bcmap +0 -0
  51. package/public/pdfjs/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
  52. package/public/pdfjs/cmaps/B5-H.bcmap +0 -0
  53. package/public/pdfjs/cmaps/B5-V.bcmap +0 -0
  54. package/public/pdfjs/cmaps/B5pc-H.bcmap +0 -0
  55. package/public/pdfjs/cmaps/B5pc-V.bcmap +0 -0
  56. package/public/pdfjs/cmaps/CNS-EUC-H.bcmap +0 -0
  57. package/public/pdfjs/cmaps/CNS-EUC-V.bcmap +0 -0
  58. package/public/pdfjs/cmaps/CNS1-H.bcmap +0 -0
  59. package/public/pdfjs/cmaps/CNS1-V.bcmap +0 -0
  60. package/public/pdfjs/cmaps/CNS2-H.bcmap +0 -0
  61. package/public/pdfjs/cmaps/CNS2-V.bcmap +3 -0
  62. package/public/pdfjs/cmaps/ETHK-B5-H.bcmap +0 -0
  63. package/public/pdfjs/cmaps/ETHK-B5-V.bcmap +0 -0
  64. package/public/pdfjs/cmaps/ETen-B5-H.bcmap +0 -0
  65. package/public/pdfjs/cmaps/ETen-B5-V.bcmap +0 -0
  66. package/public/pdfjs/cmaps/ETenms-B5-H.bcmap +3 -0
  67. package/public/pdfjs/cmaps/ETenms-B5-V.bcmap +0 -0
  68. package/public/pdfjs/cmaps/EUC-H.bcmap +0 -0
  69. package/public/pdfjs/cmaps/EUC-V.bcmap +0 -0
  70. package/public/pdfjs/cmaps/Ext-H.bcmap +0 -0
  71. package/public/pdfjs/cmaps/Ext-RKSJ-H.bcmap +0 -0
  72. package/public/pdfjs/cmaps/Ext-RKSJ-V.bcmap +0 -0
  73. package/public/pdfjs/cmaps/Ext-V.bcmap +0 -0
  74. package/public/pdfjs/cmaps/GB-EUC-H.bcmap +0 -0
  75. package/public/pdfjs/cmaps/GB-EUC-V.bcmap +0 -0
  76. package/public/pdfjs/cmaps/GB-H.bcmap +4 -0
  77. package/public/pdfjs/cmaps/GB-V.bcmap +0 -0
  78. package/public/pdfjs/cmaps/GBK-EUC-H.bcmap +0 -0
  79. package/public/pdfjs/cmaps/GBK-EUC-V.bcmap +0 -0
  80. package/public/pdfjs/cmaps/GBK2K-H.bcmap +0 -0
  81. package/public/pdfjs/cmaps/GBK2K-V.bcmap +0 -0
  82. package/public/pdfjs/cmaps/GBKp-EUC-H.bcmap +0 -0
  83. package/public/pdfjs/cmaps/GBKp-EUC-V.bcmap +0 -0
  84. package/public/pdfjs/cmaps/GBT-EUC-H.bcmap +0 -0
  85. package/public/pdfjs/cmaps/GBT-EUC-V.bcmap +0 -0
  86. package/public/pdfjs/cmaps/GBT-H.bcmap +0 -0
  87. package/public/pdfjs/cmaps/GBT-V.bcmap +0 -0
  88. package/public/pdfjs/cmaps/GBTpc-EUC-H.bcmap +0 -0
  89. package/public/pdfjs/cmaps/GBTpc-EUC-V.bcmap +0 -0
  90. package/public/pdfjs/cmaps/GBpc-EUC-H.bcmap +0 -0
  91. package/public/pdfjs/cmaps/GBpc-EUC-V.bcmap +0 -0
  92. package/public/pdfjs/cmaps/H.bcmap +0 -0
  93. package/public/pdfjs/cmaps/HKdla-B5-H.bcmap +0 -0
  94. package/public/pdfjs/cmaps/HKdla-B5-V.bcmap +0 -0
  95. package/public/pdfjs/cmaps/HKdlb-B5-H.bcmap +0 -0
  96. package/public/pdfjs/cmaps/HKdlb-B5-V.bcmap +0 -0
  97. package/public/pdfjs/cmaps/HKgccs-B5-H.bcmap +0 -0
  98. package/public/pdfjs/cmaps/HKgccs-B5-V.bcmap +0 -0
  99. package/public/pdfjs/cmaps/HKm314-B5-H.bcmap +0 -0
  100. package/public/pdfjs/cmaps/HKm314-B5-V.bcmap +0 -0
  101. package/public/pdfjs/cmaps/HKm471-B5-H.bcmap +0 -0
  102. package/public/pdfjs/cmaps/HKm471-B5-V.bcmap +0 -0
  103. package/public/pdfjs/cmaps/HKscs-B5-H.bcmap +0 -0
  104. package/public/pdfjs/cmaps/HKscs-B5-V.bcmap +0 -0
  105. package/public/pdfjs/cmaps/Hankaku.bcmap +0 -0
  106. package/public/pdfjs/cmaps/Hiragana.bcmap +0 -0
  107. package/public/pdfjs/cmaps/KSC-EUC-H.bcmap +0 -0
  108. package/public/pdfjs/cmaps/KSC-EUC-V.bcmap +0 -0
  109. package/public/pdfjs/cmaps/KSC-H.bcmap +0 -0
  110. package/public/pdfjs/cmaps/KSC-Johab-H.bcmap +0 -0
  111. package/public/pdfjs/cmaps/KSC-Johab-V.bcmap +0 -0
  112. package/public/pdfjs/cmaps/KSC-V.bcmap +0 -0
  113. package/public/pdfjs/cmaps/KSCms-UHC-H.bcmap +0 -0
  114. package/public/pdfjs/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
  115. package/public/pdfjs/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
  116. package/public/pdfjs/cmaps/KSCms-UHC-V.bcmap +0 -0
  117. package/public/pdfjs/cmaps/KSCpc-EUC-H.bcmap +0 -0
  118. package/public/pdfjs/cmaps/KSCpc-EUC-V.bcmap +0 -0
  119. package/public/pdfjs/cmaps/Katakana.bcmap +0 -0
  120. package/public/pdfjs/cmaps/LICENSE +36 -0
  121. package/public/pdfjs/cmaps/NWP-H.bcmap +0 -0
  122. package/public/pdfjs/cmaps/NWP-V.bcmap +0 -0
  123. package/public/pdfjs/cmaps/RKSJ-H.bcmap +0 -0
  124. package/public/pdfjs/cmaps/RKSJ-V.bcmap +0 -0
  125. package/public/pdfjs/cmaps/Roman.bcmap +0 -0
  126. package/public/pdfjs/cmaps/UniCNS-UCS2-H.bcmap +0 -0
  127. package/public/pdfjs/cmaps/UniCNS-UCS2-V.bcmap +0 -0
  128. package/public/pdfjs/cmaps/UniCNS-UTF16-H.bcmap +0 -0
  129. package/public/pdfjs/cmaps/UniCNS-UTF16-V.bcmap +0 -0
  130. package/public/pdfjs/cmaps/UniCNS-UTF32-H.bcmap +0 -0
  131. package/public/pdfjs/cmaps/UniCNS-UTF32-V.bcmap +0 -0
  132. package/public/pdfjs/cmaps/UniCNS-UTF8-H.bcmap +0 -0
  133. package/public/pdfjs/cmaps/UniCNS-UTF8-V.bcmap +0 -0
  134. package/public/pdfjs/cmaps/UniGB-UCS2-H.bcmap +0 -0
  135. package/public/pdfjs/cmaps/UniGB-UCS2-V.bcmap +0 -0
  136. package/public/pdfjs/cmaps/UniGB-UTF16-H.bcmap +0 -0
  137. package/public/pdfjs/cmaps/UniGB-UTF16-V.bcmap +0 -0
  138. package/public/pdfjs/cmaps/UniGB-UTF32-H.bcmap +0 -0
  139. package/public/pdfjs/cmaps/UniGB-UTF32-V.bcmap +0 -0
  140. package/public/pdfjs/cmaps/UniGB-UTF8-H.bcmap +0 -0
  141. package/public/pdfjs/cmaps/UniGB-UTF8-V.bcmap +0 -0
  142. package/public/pdfjs/cmaps/UniJIS-UCS2-H.bcmap +0 -0
  143. package/public/pdfjs/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
  144. package/public/pdfjs/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
  145. package/public/pdfjs/cmaps/UniJIS-UCS2-V.bcmap +0 -0
  146. package/public/pdfjs/cmaps/UniJIS-UTF16-H.bcmap +0 -0
  147. package/public/pdfjs/cmaps/UniJIS-UTF16-V.bcmap +0 -0
  148. package/public/pdfjs/cmaps/UniJIS-UTF32-H.bcmap +0 -0
  149. package/public/pdfjs/cmaps/UniJIS-UTF32-V.bcmap +0 -0
  150. package/public/pdfjs/cmaps/UniJIS-UTF8-H.bcmap +0 -0
  151. package/public/pdfjs/cmaps/UniJIS-UTF8-V.bcmap +0 -0
  152. package/public/pdfjs/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
  153. package/public/pdfjs/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
  154. package/public/pdfjs/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
  155. package/public/pdfjs/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
  156. package/public/pdfjs/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
  157. package/public/pdfjs/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
  158. package/public/pdfjs/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
  159. package/public/pdfjs/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
  160. package/public/pdfjs/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
  161. package/public/pdfjs/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
  162. package/public/pdfjs/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
  163. package/public/pdfjs/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
  164. package/public/pdfjs/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
  165. package/public/pdfjs/cmaps/UniKS-UCS2-H.bcmap +0 -0
  166. package/public/pdfjs/cmaps/UniKS-UCS2-V.bcmap +0 -0
  167. package/public/pdfjs/cmaps/UniKS-UTF16-H.bcmap +0 -0
  168. package/public/pdfjs/cmaps/UniKS-UTF16-V.bcmap +0 -0
  169. package/public/pdfjs/cmaps/UniKS-UTF32-H.bcmap +0 -0
  170. package/public/pdfjs/cmaps/UniKS-UTF32-V.bcmap +0 -0
  171. package/public/pdfjs/cmaps/UniKS-UTF8-H.bcmap +0 -0
  172. package/public/pdfjs/cmaps/UniKS-UTF8-V.bcmap +0 -0
  173. package/public/pdfjs/cmaps/V.bcmap +0 -0
  174. package/public/pdfjs/cmaps/WP-Symbol.bcmap +0 -0
  175. package/public/pdfjs/standard_fonts/FoxitDingbats.pfb +0 -0
  176. package/public/pdfjs/standard_fonts/FoxitFixed.pfb +0 -0
  177. package/public/pdfjs/standard_fonts/FoxitFixedBold.pfb +0 -0
  178. package/public/pdfjs/standard_fonts/FoxitFixedBoldItalic.pfb +0 -0
  179. package/public/pdfjs/standard_fonts/FoxitFixedItalic.pfb +0 -0
  180. package/public/pdfjs/standard_fonts/FoxitSans.pfb +0 -0
  181. package/public/pdfjs/standard_fonts/FoxitSansBold.pfb +0 -0
  182. package/public/pdfjs/standard_fonts/FoxitSansBoldItalic.pfb +0 -0
  183. package/public/pdfjs/standard_fonts/FoxitSansItalic.pfb +0 -0
  184. package/public/pdfjs/standard_fonts/FoxitSerif.pfb +0 -0
  185. package/public/pdfjs/standard_fonts/FoxitSerifBold.pfb +0 -0
  186. package/public/pdfjs/standard_fonts/FoxitSerifBoldItalic.pfb +0 -0
  187. package/public/pdfjs/standard_fonts/FoxitSerifItalic.pfb +0 -0
  188. package/public/pdfjs/standard_fonts/FoxitSymbol.pfb +0 -0
  189. package/public/pdfjs/standard_fonts/LICENSE_FOXIT +27 -0
  190. package/public/pdfjs/standard_fonts/LICENSE_LIBERATION +102 -0
  191. package/public/pdfjs/standard_fonts/LiberationSans-Bold.ttf +0 -0
  192. package/public/pdfjs/standard_fonts/LiberationSans-BoldItalic.ttf +0 -0
  193. package/public/pdfjs/standard_fonts/LiberationSans-Italic.ttf +0 -0
  194. package/public/pdfjs/standard_fonts/LiberationSans-Regular.ttf +0 -0
  195. package/src/App.vue +31 -31
  196. package/src/api/index.js +1 -1
  197. package/src/api/mock.http +2 -2
  198. package/src/api/requestUrl.js +185 -185
  199. package/src/assets/image/default_avt_ui.png +0 -0
  200. package/src/assets/image/filtType/audio.png +0 -0
  201. package/src/assets/image/filtType/excel1.png +0 -0
  202. package/src/assets/image/filtType/general.png +0 -0
  203. package/src/assets/image/filtType/html.png +0 -0
  204. package/src/assets/image/filtType/image1.png +0 -0
  205. package/src/assets/image/filtType/link.png +0 -0
  206. package/src/assets/image/filtType/md2.png +0 -0
  207. package/src/assets/image/filtType/mode.png +0 -0
  208. package/src/assets/image/filtType/news.png +0 -0
  209. package/src/assets/image/filtType/pdf1.png +0 -0
  210. package/src/assets/image/filtType/ppt1.png +0 -0
  211. package/src/assets/image/filtType/selfadd1.png +0 -0
  212. package/src/assets/image/filtType/txt1.png +0 -0
  213. package/src/assets/image/filtType/video.png +0 -0
  214. package/src/assets/image/filtType/wechat.png +0 -0
  215. package/src/assets/image/filtType/word1.png +0 -0
  216. package/src/assets/image/loading.gif +0 -0
  217. package/src/assets/js/AliyunlssUtil.js +117 -92
  218. package/src/assets/js/Base64Util.js +22 -22
  219. package/src/assets/js/common.js +287 -252
  220. package/src/assets/js/hammer.js +89 -100
  221. package/src/assets/js/script.js +36 -36
  222. package/src/assets/less/common.css +6773 -6773
  223. package/src/assets/less/converSationContainer/common.less +192 -199
  224. package/src/assets/less/converSationContainer/converSatonContainer.less +486 -493
  225. package/src/assets/less/iconfont.css +37 -37
  226. package/src/assets/less/ticketMessage.less +294 -294
  227. package/src/assets/less/variables.less +122 -0
  228. package/src/components/ActionAlertIframe.vue +155 -177
  229. package/src/components/AiGuide.vue +473 -466
  230. package/src/components/AnswerDocknowledge.vue +1207 -1059
  231. package/src/components/AnswerVoice.vue +286 -285
  232. package/src/components/AskIFrame.vue +15 -15
  233. package/src/components/ConversationContainer.vue +10880 -4934
  234. package/src/components/FileType.vue +86 -86
  235. package/src/components/Message.vue +27 -27
  236. package/src/components/MyEditor.vue +343 -351
  237. package/src/components/QwFeedback.vue +304 -0
  238. package/src/components/actionSatisfaction.vue +109 -107
  239. package/src/components/actionSendToBot.vue +64 -62
  240. package/src/components/answerDissatisfaction.vue +64 -62
  241. package/src/components/answerRadio.vue +261 -186
  242. package/src/components/ask-components/DissatisfactionOptions.vue +58 -57
  243. package/src/components/ask-components/Msgloading.vue +38 -37
  244. package/src/components/ask-components/SatisfactionV2.vue +15 -15
  245. package/src/components/askVideo.vue +214 -162
  246. package/src/components/assetDetails.vue +379 -378
  247. package/src/components/assetMessage.vue +231 -228
  248. package/src/components/associationIntention.vue +414 -355
  249. package/src/components/attachmentPreview.vue +92 -90
  250. package/src/components/botActionSatisfactor.vue +70 -68
  251. package/src/components/chatContent.vue +514 -513
  252. package/src/components/feedBack.vue +138 -136
  253. package/src/components/fielListView.vue +352 -351
  254. package/src/components/file/AliyunOssComponents.vue +108 -108
  255. package/src/components/formTemplate.vue +3517 -3572
  256. package/src/components/imgView.vue +32 -0
  257. package/src/components/intelligentSummary.vue +232 -227
  258. package/src/components/interruptComponents/imageSelectionAnswer.vue +203 -0
  259. package/src/components/interruptComponents/multipleChoiceAnswer.vue +134 -0
  260. package/src/components/interruptComponents/singleChoiceAnswer.vue +82 -0
  261. package/src/components/kkview.vue +1130 -1138
  262. package/src/components/loadingProcess.vue +164 -164
  263. package/src/components/markDownText.vue +961 -0
  264. package/src/components/message/ActionAlertIframe.vue +112 -112
  265. package/src/components/message/ShopMessage.vue +164 -164
  266. package/src/components/message/TextMessage.vue +926 -924
  267. package/src/components/message/TicketMessage.vue +201 -201
  268. package/src/components/message/swiper/index.js +4 -4
  269. package/src/components/message/swiper/ticketSwiper.vue +503 -503
  270. package/src/components/message/swiper/ticketSwiperItem.vue +61 -61
  271. package/src/components/msgLoading.vue +231 -231
  272. package/src/components/myPopup.vue +75 -70
  273. package/src/components/outputComponents/outputCom.vue +149 -0
  274. package/src/components/pagination.vue +130 -0
  275. package/src/components/pdfPosition.vue +1337 -1506
  276. package/src/components/popup.vue +230 -227
  277. package/src/components/preview/docView.vue +263 -0
  278. package/src/components/preview/excelView.vue +260 -0
  279. package/src/components/preview/markDownView.vue +70 -0
  280. package/src/components/preview/newPositionPreview.vue +601 -0
  281. package/src/components/preview/pdfView.vue +973 -0
  282. package/src/components/previewDoc.vue +253 -247
  283. package/src/components/previewPdf.vue +1106 -757
  284. package/src/components/previewWisdom.vue +252 -0
  285. package/src/components/receiverMessagePlatform.vue +71 -65
  286. package/src/components/recommend.vue +82 -80
  287. package/src/components/selector/hOption.vue +20 -20
  288. package/src/components/selector/hSelector.vue +199 -199
  289. package/src/components/selector/hWrapper.vue +216 -216
  290. package/src/components/senderMessagePlatform.vue +60 -50
  291. package/src/components/source/BotMessage.vue +24 -24
  292. package/src/components/source/CustomMessage.vue +24 -24
  293. package/src/components/test.vue +260 -260
  294. package/src/components/tree.vue +310 -295
  295. package/src/components/utils/AliyunIssUtil.js +103 -81
  296. package/src/components/utils/ckeditor.js +185 -174
  297. package/src/components/utils/format_date.js +25 -25
  298. package/src/components/utils/index.js +6 -6
  299. package/src/components/utils/math_utils.js +29 -29
  300. package/src/components/voiceComponent.vue +122 -119
  301. package/src/components/welcomeKnowledgeFile.vue +346 -340
  302. package/src/components/welcomeLlmCard.vue +142 -140
  303. package/src/components/welcomeSuggest.vue +99 -97
  304. package/src/locales/cn.json +100 -0
  305. package/src/locales/en.json +99 -0
  306. package/src/main.js +76 -57
  307. package/vue.config.js +54 -54
  308. package/src/components/newPdfPosition.vue +0 -878
@@ -1,248 +1,254 @@
1
- <!-- preview-document
2
- 组件主要负责 富文本中配置的链接,图片 及上传附件下的附件列表中的单纯预览
3
- 走的是kkview项目预览或者iframe直接打开文件地址,不对预览文件解析不包含其他功能开发
4
- -->
5
- <template>
6
-
7
- <div class="previewDoc">
8
- <div class="footer">
9
- <span>查看详情</span>
10
- <section @click="close">
11
- <i class="iconfont guoran-shanchu"></i>
12
- </section>
13
- </div>
14
- <!-- <div v-if="fileType == 'VIDEO'" style="width: 100%;height: calc(100% - 70px)">
15
- <video :src="url" controls width="100%;" height="98%"></video>
16
- </div>
17
- <template v-else-if="url.includes('https://www') || url.includes('http://www')">
18
- <iframe class="preview_iframe"
19
- :src="url"
20
- width="100%"
21
- height="100%"
22
- scrolling="100%"
23
- frameborder="no"
24
- border="0"></iframe>
25
- </template>
26
- <template v-else>
27
- <iframe class="preview_iframe" :src="previewUrl" style="border:none;"></iframe>
28
- </template> -->
29
- <div v-show="fileType == 'VIDEO'" style="width: 100%;height: calc(100% - 70px)">
30
- <video :src="url" controls width="100%;" height="98%"></video>
31
- </div>
32
- <div style="width: 100%;height: calc(100% - 70px)" v-show="fileType !== 'VIDEO' && fileType !== 'OTHER' && (url.includes('https://www') || url.includes('http://www'))">
33
- <iframe class="preview_iframe"
34
- :src="fileType !== 'VIDEO' && fileType !== 'OTHER' && (url.includes('https://www') || url.includes('http://www')) ? url : ''"
35
- width="100%"
36
- height="100%"
37
- scrolling="100%"
38
- frameborder="no"
39
- border="0"></iframe>
40
- </div>
41
- <div style="width: 100%;height: calc(100% - 70px)" v-show="fileType == 'OTHER' && !url.includes('https://www') && !url.includes('http://www')">
42
- <iframe class="preview_iframe" :src="previewUrl" style="border:none;"></iframe>
43
- </div>
44
- <div class="onload_btn" @click="downLoad">
45
- 下载
46
- </div>
47
- <div id="text">
48
- {{ copy }}
49
- </div>
50
- </div>
51
- </template>
52
-
53
- <script>
54
- import { Toast } from 'vant';
55
- import { isMobile } from "../assets/js/common";
56
-
57
- export default {
58
- data () {
59
- return {
60
- previewShowPopup: false,
61
- title:'工单附件',
62
- copy:''
63
- }
64
- },
65
- props: {
66
- url: {
67
- type: String,
68
- required: true,
69
- },
70
- officePreviewType: {
71
- type: String,
72
- default: ''
73
- }
74
- },
75
- computed: {
76
- previewUrl () {
77
- let url = process.env.VUE_APP_ENV === 'production' ? 'https://kkfileview.askbot.cn/onlinePreview?url=' : 'https://test.open.askbot.cn/kkfileview/onlinePreview?url='
78
- if (this.url != '') {
79
- // if (/[\u4E00-\u9FA5]+/g.test(this.url)) {
80
- // url += btoa(encodeURIComponent(this.url))
81
- // } else {
82
- // url += btoa(this.url)
83
- // }
84
- // url += '&encodeURIComponent=true'
85
- if(decodeURIComponent(this.url) == this.url) {
86
- url += btoa(encodeURIComponent(this.url))
87
- url += '&encodeURIComponent=true'
88
- } else {
89
- url += btoa(encodeURIComponent(decodeURIComponent(this.url)))
90
- url += '&encodeURIComponent=true'
91
- }
92
- }
93
- return url
94
- },
95
- fileType () {
96
- const fileType = this.url.substring(this.url.lastIndexOf('.'));
97
- if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.mov') {
98
- return 'VIDEO'
99
- } else if(fileType === '.html' || fileType === '.HTML') {
100
- return 'HTML'
101
- } else {
102
- return 'OTHER'
103
- }
104
-
105
- }
106
- },
107
- methods: {
108
- close () {
109
- this.$emit('close')
110
- },
111
- loadIframe (item) {
112
- let iframe = document.getElementsByClassName('preview_iframe')[0]
113
- iframe.onload(() => {
114
- iframe.contentWindow.postMessage({
115
- type: "positionText",
116
- data: item.text,
117
- page: item.page
118
- }, '*')
119
- })
120
- // if(preview) {
121
- // preview.postMessage({
122
- // type: "positionText",
123
- // data: ``
124
- // }, '*')
125
- // }
126
- },
127
- downLoad () {
128
- let url = this.url
129
- if (decodeURIComponent(url) != url) {
130
- url = decodeURIComponent(url)
131
- }
132
- const fileType = url.substring(url.lastIndexOf('.'));
133
- this.$http.post('/knowledge-api/temporary-certificate/or-origin?expired=10', url, {
134
- headers:{
135
- "Content-Type": "application/json",
136
- }
137
- }).then(res => {
138
- if (res.data) {
139
- if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
140
- this.copy = res.data
141
- if(isMobile()) {
142
- setTimeout(() =>{
143
- const range = document.createRange();
144
- range.selectNode(document.getElementById('text'));
145
- const selection = window.getSelection();
146
- //移除之前选中内容
147
- if (selection.rangeCount > 0) selection.removeAllRanges();
148
- selection.addRange(range);
149
- document.execCommand('copy');
150
- selection.removeAllRanges()
151
- Toast('下载地址已复制,请前往Safari浏览器访问下载');
152
- this.close()
153
- },100)
154
- } else {
155
- navigator.clipboard.writeText(res.data)
156
- this.$message.success({
157
- message:'下载地址已复制,请前往Safari浏览器访问下载',
158
- })
159
- }
160
- return
161
- } else {
162
- // setTimeout(() =>{
163
- // window.open(res.data,'下载', 'noopener')
164
- // }, 2000)
165
- // window.open(res.data,'下载', 'noopener')
166
- if(isMobile()) {
167
- const iframe = document.createElement("iframe");
168
- iframe.setAttribute("hidden", "hidden");
169
- iframe.onload = () => {
170
- if (iframe) {
171
- console.log("iframe onload....")
172
- iframe.setAttribute('src', 'about:blank');
173
- }
174
- };
175
- document.body.insertBefore(iframe, null);
176
- iframe.setAttribute("src", res.data);
177
- } else {
178
- let a = document.createElement('a')
179
- a.href = res.data
180
- a.download = (this.title) + fileType
181
- a.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true, view: window }))
182
- }
183
- this.close()
184
- }
185
- }
186
- })
187
- }
188
- },
189
- mounted() {
190
- setTimeout(() =>{
191
- let previewIframe = document.getElementsByClassName('preview_iframe')
192
- Array.from(previewIframe).forEach(item =>{
193
- item.onload = () =>{
194
- item.style.backgroundImage = `url('')`
195
- }
196
- })
197
- })
198
- }
199
- }
200
- </script>
201
-
202
- <style lang="less" scoped>
203
- .previewDoc{
204
- height: 100%;
205
- position: relative;
206
- }
207
- .preview_iframe {
208
- width: 100%;
209
- height: calc(100% - 65px);
210
- overflow-y: scroll;
211
- background-image: url('https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif');
212
- background-position: center;
213
- background-size: 50px;
214
- background-repeat: no-repeat;
215
- }
216
- .footer {
217
- width: calc(100% - 40px);
218
- height: 50px;
219
- display: flex;
220
- align-items: center;
221
- justify-content: space-between;
222
- cursor: pointer;
223
- padding: 0 20px;
224
- border-bottom: 1px solid #cccccc;
225
- }
226
- /deep/.el-drawer__body{
227
- height: 100%;
228
- }
229
- .onload_btn {
230
- position: absolute;
231
- left: 50%;
232
- transform: translateX(-50%);
233
- bottom: 40px;
234
- width: 200px;
235
- background-color: #366AFF;
236
- color: white;
237
- height: 48px;
238
- display: flex;
239
- align-items: center;
240
- justify-content: center;
241
- border-radius: 28px;
242
- cursor: pointer;
243
- z-index: 9999;
244
- i{
245
- margin-right: 8px;
246
- }
247
- }
1
+ <!-- preview-document
2
+ 组件主要负责 富文本中配置的链接,图片 及上传附件下的附件列表中的单纯预览
3
+ 走的是kkview项目预览或者iframe直接打开文件地址,不对预览文件解析不包含其他功能开发
4
+ -->
5
+ <template>
6
+
7
+ <div class="previewDoc">
8
+ <div class="footer">
9
+ <span>查看详情</span>
10
+ <section @click="close">
11
+ <i class="iconfont guoran-shanchu"></i>
12
+ </section>
13
+ </div>
14
+ <!-- <div v-if="fileType == 'VIDEO'" style="width: 100%;height: calc(100% - 70px)">
15
+ <video :src="url" controls width="100%;" height="98%"></video>
16
+ </div>
17
+ <template v-else-if="url.includes('https://www') || url.includes('http://www')">
18
+ <iframe class="preview_iframe"
19
+ :src="url"
20
+ width="100%"
21
+ height="100%"
22
+ scrolling="100%"
23
+ frameborder="no"
24
+ border="0"></iframe>
25
+ </template>
26
+ <template v-else>
27
+ <iframe class="preview_iframe" :src="previewUrl" style="border:none;"></iframe>
28
+ </template> -->
29
+ <div v-show="fileType == 'VIDEO'" style="width: 100%;height: calc(100% - 70px)">
30
+ <video :src="url" controls width="100%;" height="98%"></video>
31
+ </div>
32
+ <div style="width: 100%;height: calc(100% - 70px)" v-show="fileType !== 'VIDEO' && fileType !== 'OTHER' && (url.includes('https://www') || url.includes('http://www'))">
33
+ <iframe class="preview_iframe"
34
+ :src="fileType !== 'VIDEO' && fileType !== 'OTHER' && (url.includes('https://www') || url.includes('http://www')) ? url : ''"
35
+ width="100%"
36
+ height="100%"
37
+ scrolling="100%"
38
+ frameborder="no"
39
+ border="0"></iframe>
40
+ </div>
41
+ <div style="width: 100%;height: calc(100% - 70px)" v-show="fileType == 'OTHER' && !url.includes('https://www') && !url.includes('http://www')">
42
+ <iframe class="preview_iframe" :src="previewUrl" style="border:none;"></iframe>
43
+ </div>
44
+ <div class="onload_btn" @click="downLoad">
45
+ 下载
46
+ </div>
47
+ <div id="text">
48
+ {{ copy }}
49
+ </div>
50
+ </div>
51
+ </template>
52
+
53
+ <script>
54
+ import { Toast } from 'vant';
55
+ import { isMobile } from "../assets/js/common";
56
+
57
+ export default {
58
+ data () {
59
+ return {
60
+ previewShowPopup: false,
61
+ title:'工单附件',
62
+ copy:''
63
+ }
64
+ },
65
+ props: {
66
+ url: {
67
+ type: String,
68
+ required: true,
69
+ },
70
+ officePreviewType: {
71
+ type: String,
72
+ default: ''
73
+ }
74
+ },
75
+ computed: {
76
+ previewUrl () {
77
+ let url = process.env.VUE_APP_ENV === 'production' ? 'https://kkfileview.askbot.cn/onlinePreview?url=' : 'https://test.open.askbot.cn/kkfileview/onlinePreview?url='
78
+ if(process.env.VUE_APP_SOURCE == 'lining_test') {
79
+ url = 'https://wxgw.lining.com/askbot/kkfileview/onlinePreview?url='
80
+ }
81
+ if (this.url != '') {
82
+ // if (/[\u4E00-\u9FA5]+/g.test(this.url)) {
83
+ // url += btoa(encodeURIComponent(this.url))
84
+ // } else {
85
+ // url += btoa(this.url)
86
+ // }
87
+ // url += '&encodeURIComponent=true'
88
+ if(decodeURIComponent(this.url) == this.url) {
89
+ url += btoa(encodeURIComponent(this.url))
90
+ url += '&encodeURIComponent=true'
91
+ } else {
92
+ url += btoa(encodeURIComponent(decodeURIComponent(this.url)))
93
+ url += '&encodeURIComponent=true'
94
+ }
95
+ }
96
+ return url
97
+ },
98
+ fileType () {
99
+ const fileType = this.url.substring(this.url.lastIndexOf('.'));
100
+ if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.mov') {
101
+ return 'VIDEO'
102
+ } else if(fileType === '.html' || fileType === '.HTML') {
103
+ return 'HTML'
104
+ } else {
105
+ return 'OTHER'
106
+ }
107
+
108
+ }
109
+ },
110
+ methods: {
111
+ close () {
112
+ this.$emit('close')
113
+ },
114
+ loadIframe (item) {
115
+ let iframe = document.getElementsByClassName('preview_iframe')[0]
116
+ iframe.onload(() => {
117
+ iframe.contentWindow.postMessage({
118
+ type: "positionText",
119
+ data: item.text,
120
+ page: item.page
121
+ }, '*')
122
+ })
123
+ // if(preview) {
124
+ // preview.postMessage({
125
+ // type: "positionText",
126
+ // data: ``
127
+ // }, '*')
128
+ // }
129
+ },
130
+ downLoad () {
131
+ let url = this.url
132
+ if (decodeURIComponent(url) != url) {
133
+ url = decodeURIComponent(url)
134
+ }
135
+ const fileType = url.substring(url.lastIndexOf('.'));
136
+ this.$http.post('/knowledge-api/temporary-certificate/or-origin?expired=10', url, {
137
+ headers:{
138
+ "Content-Type": "application/json",
139
+ }
140
+ }).then(res => {
141
+ if (res.data) {
142
+ if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
143
+ this.copy = res.data
144
+ if(isMobile()) {
145
+ setTimeout(() =>{
146
+ const range = document.createRange();
147
+ range.selectNode(document.getElementById('text'));
148
+ const selection = window.getSelection();
149
+ //移除之前选中内容
150
+ if (selection.rangeCount > 0) selection.removeAllRanges();
151
+ selection.addRange(range);
152
+ document.execCommand('copy');
153
+ selection.removeAllRanges()
154
+ Toast('下载地址已复制,请前往Safari浏览器访问下载');
155
+ this.close()
156
+ },100)
157
+ } else {
158
+ navigator.clipboard.writeText(res.data)
159
+ this.$message.success({
160
+ message:'下载地址已复制,请前往Safari浏览器访问下载',
161
+ })
162
+ }
163
+ return
164
+ } else {
165
+ // setTimeout(() =>{
166
+ // window.open(res.data,'下载', 'noopener')
167
+ // }, 2000)
168
+ // window.open(res.data,'下载', 'noopener')
169
+ if(isMobile()) {
170
+ const iframe = document.createElement("iframe");
171
+ iframe.setAttribute("hidden", "hidden");
172
+ iframe.onload = () => {
173
+ if (iframe) {
174
+ console.log("iframe onload....")
175
+ iframe.setAttribute('src', 'about:blank');
176
+ }
177
+ };
178
+ document.body.insertBefore(iframe, null);
179
+ iframe.setAttribute("src", res.data);
180
+ } else {
181
+ let a = document.createElement('a')
182
+ a.href = res.data
183
+ a.download = (this.title) + fileType
184
+ a.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true, view: window }))
185
+ }
186
+ this.close()
187
+ }
188
+ }
189
+ })
190
+ }
191
+ },
192
+ mounted() {
193
+ this.$i18n.locale = sessionStorage.getItem("systemLanguage") || 'cn';
194
+ setTimeout(() =>{
195
+ let previewIframe = document.getElementsByClassName('preview_iframe')
196
+ Array.from(previewIframe).forEach(item =>{
197
+ item.onload = () =>{
198
+ item.style.backgroundImage = `url('')`
199
+ }
200
+ })
201
+ })
202
+ }
203
+ }
204
+ </script>
205
+
206
+ <style lang="less" scoped>
207
+ @import "../assets/less/variables.less";
208
+
209
+ .previewDoc{
210
+ height: 100%;
211
+ position: relative;
212
+ }
213
+ .preview_iframe {
214
+ width: 100%;
215
+ height: calc(100% - 65px);
216
+ overflow-y: scroll;
217
+ background-image: url('https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif');
218
+ background-position: center;
219
+ background-size: 50px;
220
+ background-repeat: no-repeat;
221
+ }
222
+ .footer {
223
+ width: calc(100% - 40px);
224
+ height: 50px;
225
+ display: flex;
226
+ align-items: center;
227
+ justify-content: space-between;
228
+ cursor: pointer;
229
+ padding: 0 20px;
230
+ border-bottom: 1px solid @border-color-r5;
231
+ }
232
+ /deep/.el-drawer__body{
233
+ height: 100%;
234
+ }
235
+ .onload_btn {
236
+ position: absolute;
237
+ left: 50%;
238
+ transform: translateX(-50%);
239
+ bottom: 40px;
240
+ width: 200px;
241
+ background-color: @primary-color;
242
+ color: @font-primary-light-color;
243
+ height: 48px;
244
+ display: flex;
245
+ align-items: center;
246
+ justify-content: center;
247
+ border-radius: 28px;
248
+ cursor: pointer;
249
+ z-index: 9999;
250
+ i{
251
+ margin-right: 8px;
252
+ }
253
+ }
248
254
  </style>