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,81 +1,103 @@
1
- const OSS = require('ali-oss');
2
-
3
- let IDX = 256, HEX = [], SIZE = 256, BUFFER;
4
- while (IDX--) HEX[IDX] = (IDX + 256).toString(16).substring(1);
5
- let mainId = sessionStorage.getItem('_mainId') ? sessionStorage.getItem('_mainId') : "";
6
- function uid(len) {
7
- let i = 0, tmp = (len || 11);
8
- if (!BUFFER || ((IDX + tmp) > SIZE * 2)) {
9
- for (BUFFER = '', IDX = 0; i < SIZE; i++) {
10
- BUFFER += HEX[Math.random() * 256 | 0];
11
- }
12
- }
13
-
14
- return BUFFER.substring(IDX, IDX++ + tmp);
15
- }
16
-
17
- function dataFormat(fmt, date = new Date()) {
18
- const o = {
19
- "M+": date.getMonth() + 1, //月份
20
- "d+": date.getDate(), //日
21
- "h+": date.getHours(), //小时
22
- "m+": date.getMinutes(), //分
23
- "s+": date.getSeconds(), //秒
24
- "q+": Math.floor((date.getMonth() + 3) / 3), //季度
25
- "S": date.getMilliseconds() //毫秒
26
- };
27
- if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length));
28
- for (const k in o)
29
- if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
30
- return fmt;
31
- }
32
-
33
- function pathGenerate(filename) {
34
- return "front-oss/" + mainId + '/' + dataFormat("yyyy/MM/dd/hh/mm/") + uid(32) + "/" + filename;
35
- }
36
-
37
-
38
- function upload(ossConfig, data) {
39
- let ossClient = new OSS(ossConfig);
40
- // object-key可以自定义为文件名(例如file.txt)或目录(例如abc/test/file.txt)的形式,实现将文件上传至当前Bucket或Bucket下的指定目录。
41
- let objectKey = pathGenerate(data.name);
42
- let result = ossClient.put(objectKey, data, {
43
- headers:{
44
- // 通过文件URL访问文件时,指定以附件形式下载文件,下载后的文件名称定义为example.jpg。
45
- 'Content-Disposition': `attachment; filename="${encodeURIComponent(data.name)}"`
46
- },
47
- });
48
- console.debug(result);
49
- return result;
50
- }
51
-
52
- function multipartUpload(ossConfig, data, callback,extCallback) {
53
- let ossClient = new OSS(ossConfig);
54
- // object-key可以自定义为文件名(例如file.txt)或目录(例如abc/test/file.txt)的形式,实现将文件上传至当前Bucket或Bucket下的指定目录。
55
- let objectKey = pathGenerate(data.name);
56
-
57
- let res = ossClient.multipartUpload(objectKey, data, {
58
- headers:{
59
- // 通过文件URL访问文件时,指定以附件形式下载文件,下载后的文件名称定义为example.jpg。
60
- 'Content-Disposition': `attachment; filename="${encodeURIComponent(data.name)}"`
61
- },
62
- progress: function (p, checkpoint) {
63
- console.debug('progress callback', p, checkpoint);
64
- // 断点记录点。浏览器重启后无法直接继续上传,您需要手动触发上传操作。
65
- if (callback && callback instanceof Function) {
66
- callback(p, checkpoint,data,extCallback);
67
- }
68
- }
69
- })
70
- return res;
71
- }
72
-
73
- function ossFileUrl(ossConfig, path, cname) {
74
- if (cname == null) {
75
- return 'https://' + ossConfig.bucket + '.' + ossConfig.region + '.aliyuncs.com/' + path;
76
- } else {
77
- return cname + '/' + path;
78
- }
79
- }
80
-
81
- export {upload, multipartUpload, ossFileUrl}
1
+ // const OSS = require('ali-oss');
2
+ const OSS = window.OSS
3
+
4
+ const getPrivateOssConfig = () => {
5
+ let mainSource = sessionStorage.getItem('_mainSource') ? sessionStorage.getItem('_mainSource') : "askbot";
6
+ switch (mainSource) {
7
+ case "askbot":
8
+ return {
9
+ region: "oss-cn-zhangjiakou",
10
+ accessKeyId: "LTAI4G3QtdEdwkEbihBngAsK",
11
+ accessKeySecret: "OwgdVfc5PeCkIgqIdug660xmiSPchn",
12
+ bucket: "guoranopen-zjk",
13
+ }
14
+ case "lishi":
15
+ return {
16
+ region: "oss-ap-southeast-1",
17
+ accessKeyId: "LTAI5tAusPLDNJJwkvUbqi2T",
18
+ accessKeySecret: "xqPVaunOIbvTe3g9qsXal2IZO6RftK",
19
+ bucket: "askbotopen-ls",
20
+ };
21
+ }
22
+ }
23
+
24
+ let IDX = 256, HEX = [], SIZE = 256, BUFFER;
25
+ while (IDX--) HEX[IDX] = (IDX + 256).toString(16).substring(1);
26
+ let mainId = sessionStorage.getItem('_mainId') ? sessionStorage.getItem('_mainId') : "";
27
+ function uid(len) {
28
+ let i = 0, tmp = (len || 11);
29
+ if (!BUFFER || ((IDX + tmp) > SIZE * 2)) {
30
+ for (BUFFER = '', IDX = 0; i < SIZE; i++) {
31
+ BUFFER += HEX[Math.random() * 256 | 0];
32
+ }
33
+ }
34
+
35
+ return BUFFER.substring(IDX, IDX++ + tmp);
36
+ }
37
+
38
+ function dataFormat(fmt, date = new Date()) {
39
+ const o = {
40
+ "M+": date.getMonth() + 1, //月份
41
+ "d+": date.getDate(), //日
42
+ "h+": date.getHours(), //小时
43
+ "m+": date.getMinutes(), //分
44
+ "s+": date.getSeconds(), //秒
45
+ "q+": Math.floor((date.getMonth() + 3) / 3), //季度
46
+ "S": date.getMilliseconds() //毫秒
47
+ };
48
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length));
49
+ for (const k in o)
50
+ if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
51
+ return fmt;
52
+ }
53
+
54
+ function pathGenerate(filename) {
55
+ return "front-oss/" + mainId + '/' + dataFormat("yyyy/MM/dd/hh/mm/") + uid(32) + "/" + filename;
56
+ }
57
+
58
+
59
+ function upload(data) {
60
+ let ossClient = new OSS(getPrivateOssConfig());
61
+ // object-key可以自定义为文件名(例如file.txt)或目录(例如abc/test/file.txt)的形式,实现将文件上传至当前Bucket或Bucket下的指定目录。
62
+ let objectKey = pathGenerate(data.name);
63
+ let result = ossClient.put(objectKey, data, {
64
+ headers: {
65
+ // 通过文件URL访问文件时,指定以附件形式下载文件,下载后的文件名称定义为example.jpg。
66
+ 'Content-Disposition': `attachment; filename="${encodeURIComponent(data.name)}"`
67
+ },
68
+ });
69
+ console.debug(result);
70
+ return result;
71
+ }
72
+
73
+ function multipartUpload(data, callback, extCallback) {
74
+ let ossClient = new OSS(getPrivateOssConfig());
75
+ // object-key可以自定义为文件名(例如file.txt)或目录(例如abc/test/file.txt)的形式,实现将文件上传至当前Bucket或Bucket下的指定目录。
76
+ let objectKey = pathGenerate(data.name);
77
+
78
+ let res = ossClient.multipartUpload(objectKey, data, {
79
+ headers: {
80
+ // 通过文件URL访问文件时,指定以附件形式下载文件,下载后的文件名称定义为example.jpg。
81
+ 'Content-Disposition': `attachment; filename="${encodeURIComponent(data.name)}"`
82
+ },
83
+ progress: function (p, checkpoint) {
84
+ console.debug('progress callback', p, checkpoint);
85
+ // 断点记录点。浏览器重启后无法直接继续上传,您需要手动触发上传操作。
86
+ if (callback && callback instanceof Function) {
87
+ callback(p, checkpoint, data, extCallback);
88
+ }
89
+ }
90
+ })
91
+ return res;
92
+ }
93
+
94
+ function ossFileUrl(path, cname) {
95
+ let ossConfig = getPrivateOssConfig();
96
+ if (cname == null) {
97
+ return 'https://' + ossConfig.bucket + '.' + ossConfig.region + '.aliyuncs.com/' + path;
98
+ } else {
99
+ return cname + '/' + path;
100
+ }
101
+ }
102
+
103
+ export { upload, multipartUpload, ossFileUrl }
@@ -1,174 +1,185 @@
1
- /* eslint-disable */
2
- import {multipartUpload, ossFileUrl} from "./AliyunIssUtil";
3
- import { v4 as uuidv4 } from "uuid";
4
- const ossConfig = {
5
- region: "oss-cn-zhangjiakou",
6
- //云账号AccessKey有所有API访问权限,建议遵循阿里云安全最佳实践,创建并使用STS方式来进行API访问
7
- accessKeyId: "LTAI4G3QtdEdwkEbihBngAsK",
8
- accessKeySecret: "OwgdVfc5PeCkIgqIdug660xmiSPchn",
9
- // stsToken: '<Your securityToken(STS)>',
10
- bucket: "guoranopen-zjk",
11
- }
12
- class MyUploadAdapter {
13
- constructor( loader , editor ) {
14
- // 要在上载期间使用的文件加载器实例
15
- this.loader = loader;
16
- this.editor = editor
17
- }
18
-
19
- // 启动上载过程
20
- upload() {
21
- return this.loader.file
22
- .then( file => new Promise(() => {
23
- /* this._initRequest();
24
- this._initListeners( resolve, reject, file );
25
- this._sendRequest( file );*/
26
- let command = this.editor.commands.get("insertAskComponent");
27
- let uid = uuidv4()
28
- command.execute({
29
- tag: "section",
30
- options: {
31
- className: 'self-p-section',
32
- data: 'self-p-section'
33
- },
34
- });
35
- command.execute({
36
- tag: "span-editable",
37
- options: {
38
- name: file.name + '正在上传...',
39
- data: uid,
40
- editable:false,
41
- type:'upload'
42
- }
43
- })
44
- this.uploadFile(file)
45
- }));
46
- }
47
-
48
- // 中止上载过程
49
- abort() {
50
- if ( this.xhr ) {
51
- this.xhr.abort();
52
- }
53
- }
54
- uploadFile(file){
55
- let imgInfo = {
56
- url:'',
57
- }
58
- let res = multipartUpload(
59
- ossConfig,
60
- file,
61
- null,
62
- imgInfo
63
- );
64
- res.then(resp=>{
65
- imgInfo.url = ossFileUrl(ossConfig, resp.name)
66
- let root = this.editor.model.document.getRoot()
67
- let children = root.getChildren()
68
- for(let child of children){
69
- for (let index = 0; index < child._children._nodes.length; index++) {
70
- if(child._children._nodes[index].name == 'askComponentPlaceholderContainer'){
71
- if(child._children._nodes[index]._children._nodes[0]) {
72
- let attrs = child._children._nodes[index]._children._nodes[0]._attrs
73
- if(attrs) {
74
- let attrsList = [...attrs.keys()]
75
- for (let j = 0; j < attrsList.length; j++) {
76
- if(attrsList[j] == 'data') {
77
- // this.editor.uploadImg = this.editor.uploadImg.filter(id =>{return id != attrs.get(attrsList[j])})
78
- this.editor.model.change(writer => {
79
- writer.remove(child._children._nodes[index]);
80
- });
81
- }
82
- }
83
- }
84
- }
85
- }
86
- }
87
- }
88
- let command = this.editor.commands.get("insertAskComponent");
89
- command.execute({
90
- tag: "img",
91
- options: {
92
- width:'100%',
93
- alt: resp.name + 0,
94
- src: imgInfo.url
95
- },
96
- });
97
- this.editor.execute('insertParagraph', {
98
- position: this.editor.model.document.selection.focus
99
- })
100
- })
101
- }
102
- // 使用传递给构造函数的URL初始化XMLHttpRequest对象.
103
- _initRequest() {
104
- const xhr = this.xhr = new XMLHttpRequest();
105
- console.log(xhr)
106
- xhr.open( 'POST', '/open-api/oss/public?token=8c98087dfd2d48f856d8c95c09115def', true );
107
- xhr.responseType = '';
108
- }
109
-
110
- // 初始化 XMLHttpRequest 监听.
111
- _initListeners( resolve, reject, file ) {
112
- const xhr = this.xhr;
113
- const loader = this.loader;
114
- console.log(this.loader)
115
- const genericErrorText = `无法上传文件: ${ file.name }.`;
116
-
117
- xhr.addEventListener( 'error', () => reject( genericErrorText ) );
118
- xhr.addEventListener( 'abort', () => reject() );
119
- xhr.addEventListener( 'load', () => {
120
- const response = xhr.response;
121
- // 当code==200说明上传成功,可以增加弹框提示;
122
- // 当上传失败时,必须调用reject()函数。
123
-
124
- console.log('response', xhr)
125
-
126
- if ( !response || response.error ) {
127
- return reject( response && response.error ? response.error.message : genericErrorText );
128
- }
129
- //上传成功,从后台获取图片的url地址
130
- resolve( {
131
- default: response
132
- } );
133
- } );
134
-
135
- // 支持时上传进度。文件加载器有#uploadTotal和#upload属性,用于在编辑器用户界面中显示上载进度栏。
136
- if ( xhr.upload ) {
137
- xhr.upload.addEventListener( 'progress', evt => {
138
- if ( evt.lengthComputable ) {
139
- loader.uploadTotal = evt.total;
140
- loader.uploaded = evt.loaded;
141
- }
142
- } );
143
- }
144
- }
145
-
146
- // 准备数据并发送请求
147
- _sendRequest( file ) {
148
- //通过FormData构造函数创建一个空对象
149
- const data = new FormData();
150
- //通过append()方法在末尾追加key为files值为file的数据
151
-
152
- console.log('file',file)
153
- data.append( 'file', file );//上传的参数data
154
- // data.append( 'memberId', "666" );
155
- /**
156
- * 重要提示:这是实现诸如身份验证和CSRF保护等安全机制的正确位置。
157
- * 例如,可以使用XMLHttpRequest.setRequestHeader()设置包含应用程序先前生成的CSRF令牌的请求头。
158
- */
159
- this.xhr.send( data );
160
- }
161
- }
162
-
163
- function MyCustomUploadAdapterPlugin( editor ) {
164
- editor.plugins.get( 'FileRepository' ).createUploadAdapter = ( loader ) => {
165
- // 在这里将URL配置为后端上载脚本
166
- console.log(loader,'loader');
167
- return new MyUploadAdapter( loader,editor );
168
- }
169
- }
170
-
171
- export {
172
- MyUploadAdapter,
173
- MyCustomUploadAdapterPlugin
174
- }
1
+ /* eslint-disable */
2
+ import { multipartUpload, ossFileUrl } from "./AliyunIssUtil";
3
+ import { v4 as uuidv4 } from "uuid";
4
+
5
+ const getPrivateOssConfig = () => {
6
+ let mainSource = sessionStorage.getItem('_mainSource') ? sessionStorage.getItem('_mainSource') : "askbot";
7
+ switch (mainSource) {
8
+ case "askbot":
9
+ return {
10
+ region: "oss-cn-zhangjiakou",
11
+ accessKeyId: "LTAI4G3QtdEdwkEbihBngAsK",
12
+ accessKeySecret: "OwgdVfc5PeCkIgqIdug660xmiSPchn",
13
+ bucket: "guoranopen-zjk",
14
+ }
15
+ case "lishi":
16
+ return {
17
+ region: "oss-ap-southeast-1",
18
+ accessKeyId: "LTAI5tAusPLDNJJwkvUbqi2T",
19
+ accessKeySecret: "xqPVaunOIbvTe3g9qsXal2IZO6RftK",
20
+ bucket: "askbotopen-ls",
21
+ };
22
+ }
23
+ }
24
+ class MyUploadAdapter {
25
+ constructor(loader, editor) {
26
+ // 要在上载期间使用的文件加载器实例
27
+ this.loader = loader;
28
+ this.editor = editor
29
+ }
30
+
31
+ // 启动上载过程
32
+ upload() {
33
+ return this.loader.file
34
+ .then(file => new Promise(() => {
35
+ /* this._initRequest();
36
+ this._initListeners( resolve, reject, file );
37
+ this._sendRequest( file );*/
38
+ let command = this.editor.commands.get("insertAskComponent");
39
+ let uid = uuidv4()
40
+ command.execute({
41
+ tag: "section",
42
+ options: {
43
+ className: 'self-p-section',
44
+ data: 'self-p-section'
45
+ },
46
+ });
47
+ command.execute({
48
+ tag: "span-editable",
49
+ options: {
50
+ name: file.name + '正在上传...',
51
+ data: uid,
52
+ editable: false,
53
+ type: 'upload'
54
+ }
55
+ })
56
+ this.uploadFile(file)
57
+ }));
58
+ }
59
+
60
+ // 中止上载过程
61
+ abort() {
62
+ if (this.xhr) {
63
+ this.xhr.abort();
64
+ }
65
+ }
66
+ uploadFile(file) {
67
+ let imgInfo = {
68
+ url: '',
69
+ }
70
+ let res = multipartUpload(
71
+ file,
72
+ null,
73
+ imgInfo
74
+ );
75
+ res.then(resp => {
76
+ imgInfo.url = ossFileUrl(resp.name)
77
+ let root = this.editor.model.document.getRoot()
78
+ let children = root.getChildren()
79
+ for (let child of children) {
80
+ for (let index = 0; index < child._children._nodes.length; index++) {
81
+ if (child._children._nodes[index].name == 'askComponentPlaceholderContainer') {
82
+ if (child._children._nodes[index]._children._nodes[0]) {
83
+ let attrs = child._children._nodes[index]._children._nodes[0]._attrs
84
+ if (attrs) {
85
+ let attrsList = [...attrs.keys()]
86
+ for (let j = 0; j < attrsList.length; j++) {
87
+ if (attrsList[j] == 'data') {
88
+ // this.editor.uploadImg = this.editor.uploadImg.filter(id =>{return id != attrs.get(attrsList[j])})
89
+ this.editor.model.change(writer => {
90
+ writer.remove(child._children._nodes[index]);
91
+ });
92
+ }
93
+ }
94
+ }
95
+ }
96
+ }
97
+ }
98
+ }
99
+ let command = this.editor.commands.get("insertAskComponent");
100
+ command.execute({
101
+ tag: "img",
102
+ options: {
103
+ width: '100%',
104
+ alt: resp.name + 0,
105
+ src: imgInfo.url
106
+ },
107
+ });
108
+ this.editor.execute('insertParagraph', {
109
+ position: this.editor.model.document.selection.focus
110
+ })
111
+ })
112
+ }
113
+ // 使用传递给构造函数的URL初始化XMLHttpRequest对象.
114
+ _initRequest() {
115
+ const xhr = this.xhr = new XMLHttpRequest();
116
+ console.log(xhr)
117
+ xhr.open('POST', '/open-api/oss/public?token=8c98087dfd2d48f856d8c95c09115def', true);
118
+ xhr.responseType = '';
119
+ }
120
+
121
+ // 初始化 XMLHttpRequest 监听.
122
+ _initListeners(resolve, reject, file) {
123
+ const xhr = this.xhr;
124
+ const loader = this.loader;
125
+ console.log(this.loader)
126
+ const genericErrorText = `无法上传文件: ${file.name}.`;
127
+
128
+ xhr.addEventListener('error', () => reject(genericErrorText));
129
+ xhr.addEventListener('abort', () => reject());
130
+ xhr.addEventListener('load', () => {
131
+ const response = xhr.response;
132
+ // 当code==200说明上传成功,可以增加弹框提示;
133
+ // 当上传失败时,必须调用reject()函数。
134
+
135
+ console.log('response', xhr)
136
+
137
+ if (!response || response.error) {
138
+ return reject(response && response.error ? response.error.message : genericErrorText);
139
+ }
140
+ //上传成功,从后台获取图片的url地址
141
+ resolve({
142
+ default: response
143
+ });
144
+ });
145
+
146
+ // 支持时上传进度。文件加载器有#uploadTotal和#upload属性,用于在编辑器用户界面中显示上载进度栏。
147
+ if (xhr.upload) {
148
+ xhr.upload.addEventListener('progress', evt => {
149
+ if (evt.lengthComputable) {
150
+ loader.uploadTotal = evt.total;
151
+ loader.uploaded = evt.loaded;
152
+ }
153
+ });
154
+ }
155
+ }
156
+
157
+ // 准备数据并发送请求
158
+ _sendRequest(file) {
159
+ //通过FormData构造函数创建一个空对象
160
+ const data = new FormData();
161
+ //通过append()方法在末尾追加key为files值为file的数据
162
+
163
+ console.log('file', file)
164
+ data.append('file', file);//上传的参数data
165
+ // data.append( 'memberId', "666" );
166
+ /**
167
+ * 重要提示:这是实现诸如身份验证和CSRF保护等安全机制的正确位置。
168
+ * 例如,可以使用XMLHttpRequest.setRequestHeader()设置包含应用程序先前生成的CSRF令牌的请求头。
169
+ */
170
+ this.xhr.send(data);
171
+ }
172
+ }
173
+
174
+ function MyCustomUploadAdapterPlugin(editor) {
175
+ editor.plugins.get('FileRepository').createUploadAdapter = (loader) => {
176
+ // 在这里将URL配置为后端上载脚本
177
+ console.log(loader, 'loader');
178
+ return new MyUploadAdapter(loader, editor);
179
+ }
180
+ }
181
+
182
+ export {
183
+ MyUploadAdapter,
184
+ MyCustomUploadAdapterPlugin
185
+ }
@@ -1,26 +1,26 @@
1
- const formatDate = (fmt) => { //author: meizz
2
- var o = {
3
- "M+": this.getMonth() + 1, //月份
4
- "d+": this.getDate(), //日
5
- "h+": this.getHours(), //小时
6
- "m+": this.getMinutes(), //分
7
- "s+": this.getSeconds(), //秒
8
- "q+": Math.floor((this.getMonth() + 3) / 3), //季度
9
- "S": this.getMilliseconds() //毫秒
10
- };
11
- if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
12
- for (var k in o)
13
- if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
14
- return fmt;
15
- }
16
- function forMatTime(value){
17
- let startTime = ''
18
- let currentTime = new Date(), year = currentTime.getFullYear(),
19
- month = currentTime.getMonth() + 1 < 10 ? '0' + (currentTime.getMonth() + 1) : currentTime.getMonth() + 1,
20
- day = currentTime.getDate() < 10 ? '0' + currentTime.getDate() : currentTime.getDate();
21
- startTime = year + "-" + month + "-" + day +' ' + value;
22
- return new Date(startTime)
23
- }
24
- export { formatDate,forMatTime };
25
-
1
+ const formatDate = (fmt) => { //author: meizz
2
+ var o = {
3
+ "M+": this.getMonth() + 1, //月份
4
+ "d+": this.getDate(), //日
5
+ "h+": this.getHours(), //小时
6
+ "m+": this.getMinutes(), //分
7
+ "s+": this.getSeconds(), //秒
8
+ "q+": Math.floor((this.getMonth() + 3) / 3), //季度
9
+ "S": this.getMilliseconds() //毫秒
10
+ };
11
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
12
+ for (var k in o)
13
+ if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
14
+ return fmt;
15
+ }
16
+ function forMatTime(value){
17
+ let startTime = ''
18
+ let currentTime = new Date(), year = currentTime.getFullYear(),
19
+ month = currentTime.getMonth() + 1 < 10 ? '0' + (currentTime.getMonth() + 1) : currentTime.getMonth() + 1,
20
+ day = currentTime.getDate() < 10 ? '0' + currentTime.getDate() : currentTime.getDate();
21
+ startTime = year + "-" + month + "-" + day +' ' + value;
22
+ return new Date(startTime)
23
+ }
24
+ export { formatDate,forMatTime };
25
+
26
26
  // new Date("2019-12-14T00:09:16.000+0000").Format("yyyy-MM-dd hh:mm:ss")
@@ -1,7 +1,7 @@
1
- import {formatDate} from './format_date';
2
-
3
- let utils = {
4
- formatDate
5
- }
6
-
1
+ import {formatDate} from './format_date';
2
+
3
+ let utils = {
4
+ formatDate
5
+ }
6
+
7
7
  export { utils }