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,924 +1,926 @@
1
- <!-- 消息记录容器 -->
2
- <template>
3
- <div class="media-body">
4
- <div class="textMessage" id="textMessage" :class="{remPhoneClass:isPhone,remCompanyClass:isCompany}">
5
- <div style="display: flex;height: auto;line-height: 2;" @mousemove="clickClick" class="htmlClass">
6
- <div v-html="text.template" id="html" :class="{notClickClass:disableds === true}">
7
- {{text.template}}
8
- </div>
9
- </div>
10
- <div id="submit">
11
- <el-button plain size="small" @click="submitClick" :disabled="disableds" >{{submitValue}}</el-button>
12
- </div>
13
- <div v-if="isCompany">
14
- <div v-if="single === true" class="editMessage">
15
- <el-input v-model="input" placeholder="请输入内容" class="inputClass" @input="testClick" @blur="inputBlur"></el-input>
16
- <!-- <span @click="quedingClick" style="display: flex;align-items: center"><i class="el-icon-success" style="color: #4C61E1;font-size: 32px;cursor: pointer"></i></span>
17
- --> </div>
18
- <div v-if="date" class="editMessage">
19
- <el-date-picker
20
- v-model="dateValue"
21
- type="date"
22
- placeholder="选择日期"
23
- style="width: 100%;margin: 10px 0 10px 0"
24
- :clearable=false
25
- @change="dataclick"
26
-
27
- >
28
- </el-date-picker>
29
- <!-- <span @click="quedingClick" style="display: flex;align-items: center"><i class="el-icon-success" style="color: #4C61E1;font-size: 32px;cursor: pointer"></i></span>
30
- --> </div>
31
- <div v-if="time" class="editMessage">
32
- <el-time-picker
33
- v-model="timeValue"
34
- placeholder="任意时间点"
35
- style="margin: 10px 0 10px 0;width: 100%"
36
- :clearable=false
37
- @change="dataclick"
38
- >
39
- </el-time-picker>
40
- <!-- <span @click="quedingClick" style="display: flex;align-items: center"><i class="el-icon-success" style="color: #4C61E1;font-size: 32px;cursor: pointer"></i></span>
41
- --> </div>
42
- <div v-if="dateTime" class="editMessage">
43
- <el-date-picker
44
- v-model="dateTimeValue"
45
- type="datetime"
46
- placeholder="选择日期时间"
47
- style="width: 100%;margin: 10px 0 10px 0"
48
- @change="dataclick"
49
- >
50
- </el-date-picker>
51
- <!-- <span @click="quedingClick(bianliangId)" style="display:flex;align-items:center;"><i class="el-icon-success" style="color: #4C61E1;font-size: 32px;cursor: pointer"></i></span>
52
- --> </div>
53
- <!--<div v-if="dateRange" style="border-top: 1px dashed #ebebeb;">
54
- <el-date-picker
55
- v-model="dateRangeValue"
56
- type="daterange"
57
- range-separator="至"
58
- start-placeholder="开始日期"
59
- end-placeholder="结束日期"
60
- style="margin: 10px 16px;width: 80%"
61
- >
62
- </el-date-picker>
63
- <span @click="quedingClick(bianliangId)" ><i class="el-icon-success" style="color: #409eff;font-size: 32px;text-align: center;vertical-align: middle;cursor: pointer"></i></span>
64
- </div>
65
- <div v-if="timeRange" style="border-top: 1px dashed #ebebeb;">
66
- <el-time-picker
67
- is-range
68
- v-model="timeRangeValue"
69
- range-separator="至"
70
- start-placeholder="开始时间"
71
- end-placeholder="结束时间"
72
- placeholder="选择时间范围"
73
- style="margin: 10px 16px;width: 80%"
74
- >
75
- </el-time-picker>
76
- <span @click="quedingClick(bianliangId)" ><i class="el-icon-success" style="color: #409eff;font-size: 32px;text-align: center;vertical-align: middle;cursor: pointer"></i></span>
77
-
78
- </div>
79
- <div v-if="dateTimeRange" style="border-top: 1px dashed #ebebeb;">
80
- <el-date-picker
81
- v-model="dateTimeValue"
82
- type="datetimerange"
83
- range-separator="至"
84
- start-placeholder="开始日期"
85
- end-placeholder="结束日期"
86
- style="width: 80%;margin: 10px 16px"
87
-
88
- >
89
- </el-date-picker>
90
- <span @click="quedingClick(bianliangId)" ><i class="el-icon-success" style="color: #409eff;font-size: 32px;text-align: center;vertical-align: middle;cursor: pointer"></i></span>
91
- </div>-->
92
- </div>
93
- <div v-if="isPhone">
94
- <div v-if="single" class="editMessage">
95
- <el-input v-model="input" placeholder="请输入内容" class="inputClass" @input="testClick" @blur="inputBlur"></el-input>
96
- <!-- <span @click="quedingClick" style="display: flex;align-items: center"><i class="el-icon-success" style="color: #4C61E1;font-size: 32px;cursor: pointer"></i></span>
97
- --> </div>
98
- <div v-if="date">
99
- <van-calendar v-model="show" @confirm="onConfirm" :default-date="defaultDate"/>
100
- <!-- <el-date-picker
101
- v-model="dateValue"
102
- type="date"
103
- placeholder="选择日期"
104
- style="width: 80%;margin: 10px 10px 10px 0"
105
- :editable=false
106
- >
107
- </el-date-picker>
108
- <span @click="quedingClick" style="display: flex;align-items: center"><i class="el-icon-success" style="color: #4C61E1;font-size: 32px;cursor: pointer"></i></span>
109
- --></div>
110
-
111
- <div v-if="time">
112
- <van-popup v-model="showTimePicker" position="bottom">
113
- <van-datetime-picker
114
- v-model="timeValue"
115
- type="datetime"
116
- title="选择时间"
117
- :min-date="minDate"
118
- :formatter="formatter"
119
- @cancel="showTimePicker = false"
120
- @confirm="onConfirmTime"
121
- />
122
- </van-popup>
123
- <!-- <el-time-picker
124
- v-model="timeValue"
125
- placeholder="任意时间点"
126
- style="margin: 10px 10px 10px 0;width: 80%"
127
- :editable=false
128
- >
129
- </el-time-picker>
130
- <span @click="quedingClick" style="display: flex;align-items: center"><i class="el-icon-success" style="color: #4C61E1;font-size: 32px;cursor: pointer"></i></span>
131
- --> </div>
132
- <div v-if="dateTime">
133
- <van-popup v-model="showDateTimePicker" position="bottom">
134
- <van-datetime-picker
135
- v-model="dateTimeValue"
136
- type="datetime"
137
- title="选择日期时间"
138
- :min-date="minDate"
139
- :formatter="formatter"
140
- @cancel="showDateTimePicker = false"
141
- @confirm="onConfirmDateTime"
142
- />
143
- </van-popup>
144
- <!-- <el-date-picker
145
- v-model="dateTimeValue"
146
- type="datetime"
147
- placeholder="选择日期时间"
148
- style="width: 80%;margin: 10px 10px 10px 0"
149
- :editable=false
150
-
151
- >
152
- </el-date-picker>
153
- <span @click="quedingClick(bianliangId)" style="display: flex;align-items: center"><i class="el-icon-success" style="color: #4C61E1;font-size: 32px;cursor: pointer"></i></span>
154
- --></div>
155
- <!-- <div v-if="dateRange" style="border-top: 1px dashed #ebebeb;display: flex">
156
- &lt;!&ndash;<el-date-picker
157
- v-model="dateRangeValue"
158
- type="daterange"
159
- range-separator="至"
160
- start-placeholder="开始日期"
161
- end-placeholder="结束日期"
162
- style="margin: 10px 16px;width: 80%"
163
- :editable=false
164
-
165
- >
166
- </el-date-picker>&ndash;&gt;
167
- <div style="width: 90%">
168
- <van-cell title="选择日期区间" :value="dateRangeValue" @click="show = true" />
169
- <van-calendar v-model="show" type="range" @confirm="onConfirm" />
170
- </div>
171
- <span @click="quedingClick(bianliangId)" ><i class="el-icon-success" style="color: #409eff;font-size: 32px;text-align: center;vertical-align: middle;cursor: pointer"></i></span>
172
-
173
-
174
-
175
- </div>
176
- <div v-if="timeRange" style="border-top: 1px dashed #ebebeb;">
177
- <el-time-picker
178
- is-range
179
- v-model="timeRangeValue"
180
- range-separator="至"
181
- start-placeholder="开始时间"
182
- end-placeholder="结束时间"
183
- placeholder="选择时间范围"
184
- style="margin: 10px 16px;width: 80%"
185
-
186
- :editable=false
187
- >
188
- </el-time-picker>
189
- <span @click="quedingClick(bianliangId)" ><i class="el-icon-success" style="color: #409eff;font-size: 32px;text-align: center;vertical-align: middle;cursor: pointer"></i></span>
190
-
191
- </div>
192
- <div v-if="dateTimeRange" style="border-top: 1px dashed #ebebeb;display: flex">
193
- &lt;!&ndash; <el-date-picker
194
- v-model="dateTimeValue"
195
- type="datetimerange"
196
- range-separator="至"
197
- start-placeholder="开始日期"
198
- end-placeholder="结束日期"
199
- style="width: 80%;margin: 10px 16px"
200
- :editable=false
201
-
202
-
203
- >
204
- </el-date-picker>&ndash;&gt;
205
- <div style="width: 90%">
206
- <van-field
207
- readonly
208
- clickable
209
- name="datetimePicker"
210
- :value=dateTimeValue[0]
211
- label='选择时间'
212
- placeholder="点击选择开始日期时间"
213
- @click="showDateTimePicker=true"
214
- />
215
- <van-popup v-model="showDateTimePicker" position="bottom">
216
- <van-datetime-picker
217
- v-model="currentDate"
218
- type="datetime"
219
- title="选择开始日期时间"
220
- @confirm="onConfirmDateTime($event)"
221
- @cancel="showDateTimePicker = false"
222
- :min-date="minDate"
223
- :formatter="formatter"
224
- />
225
- </van-popup>
226
- <van-field
227
- readonly
228
- clickable
229
- name="datetimePicker"
230
- :value=dateTimeValue1[0]
231
- label=" "
232
- placeholder="点击选择结束日期时间"
233
- @click="showDateTimePicker1=true"
234
- />
235
- <van-popup v-model="showDateTimePicker1" position="bottom">
236
- <van-datetime-picker
237
- v-model="currentDate"
238
- type="datetime"
239
- title="选择结束日期时间"
240
- @confirm="onConfirmDateTime1($event)"
241
- @cancel="showDateTimePicker1 = false"
242
- :min-date="minDate"
243
- :formatter="formatter"
244
- />
245
- </van-popup>
246
- </div>
247
-
248
- <span @click="quedingClick(bianliangId)" ><i class="el-icon-success" style="color: #409eff;font-size: 32px;text-align: center;vertical-align: middle;cursor: pointer"></i></span>
249
- </div>-->
250
- </div>
251
- </div>
252
- </div>
253
- </template>
254
-
255
- <script>
256
- /*import $ from 'jquery'*/
257
- export default {
258
- name: 'TextMessage',
259
- data(){
260
- return{
261
- show:false,
262
- single:false,
263
- date:false,
264
- time:false,
265
- dateTime:false,
266
- dateRange:false,
267
- timeRange:false,
268
- input:'',
269
- bianliangId:'',
270
- dateValue:'',
271
- message:[{content:'王亚欣',type:'SINGLE',value:'',id:1},{content:['2020-11-18T07:25:16.000+0000','2020-11-21T07:25:16.000+0000'],type:'DATE-RANGE',value:'',id:2},{content:'2020-11-18T07:25:16.000+0000',type:'TIME',value:'',id:3},{content:'2020-11-18T07:25:16.000+0000',type:'DATE',value:'',id:4},{content:['2020-11-18T07:25:16.000+0000','2020-11-21T07:25:16.000+0000'],type:'DATERANGE',value:'',id:5},{content:['2020-11-18T08:25:16.000+0000','2020-11-21T07:25:16.000+0000'],type:'TIMERANGE',value:'',id:6},],
272
- isPhone:false,
273
- isCompany:false,
274
- dateTimeValue:'',
275
- timeValue:'',
276
- dateRangeValue:'',
277
- dateRangeValues:'',
278
- timeRangeValue:[],
279
- dateTimeValue1:[],
280
- test:0,
281
- currentDate:new Date(),
282
- minDate: new Date(2020, 0, 1),
283
- showDateTimePicker1:false,
284
- showDateTimePicker:false,
285
- values:[],
286
- checkValue:'',
287
- disableds:false,
288
- submitValue:'确认',
289
- dateInnerText:'',
290
- defaultDate:'',
291
- showTimePicker:false,
292
-
293
- }
294
- },
295
- props:{
296
- text:{
297
- type:Object,
298
- default(){
299
- return {}
300
- }
301
- },
302
- type:String,
303
- disable:Boolean,
304
- submit:Boolean
305
- },
306
- mounted() {
307
- this.isMobile()
308
- let span=this.$el
309
- let defaults=span.getElementsByClassName('ask-component-placeholder-span')
310
- for (let i=0;i<defaults.length;i++)
311
- {
312
- this.values.push({})
313
- this.values[i]['key']=defaults[i].getAttribute('data')
314
- this.values[i]['value']=defaults[i].innerText
315
- this.values[i]['type']=defaults[i].getAttribute('type')
316
- }
317
- let text=this.$el
318
- let test=text.getElementsByClassName('ask-component-placeholder-span')
319
- let cpntain=text.getElementsByClassName('ask-component-placeholder-container')
320
- let icon=text.getElementsByClassName('arsenalkebianji')
321
- for (let i=0;i<icon.length;i++)
322
- {
323
- icon[i].style.color='#366aff'
324
- }
325
- for (let i=0;i<cpntain.length;i++)
326
- {
327
- if(this.type)
328
- {
329
- cpntain[i].style.paddingRight=0.2+'rem'
330
- cpntain[i].style.paddingLeft=0.2+'rem'
331
- }
332
- else
333
- {
334
- cpntain[i].style.paddingRight=4+'px'
335
- cpntain[i].style.paddingLeft=4+'px'
336
- }
337
-
338
- }
339
- for (let i=0;i<test.length;i++)
340
- {
341
- if(test[i].getAttribute('type')==='DATE_PICKER')
342
- {
343
- let date=Number(test[i].innerText)*1000
344
- test[i].innerText=new Date(date).Format("MM-dd")
345
- }
346
- if(test[i].getAttribute('type')==='TIME_PICKER')
347
- {
348
- let time=Number(test[i].innerText)*1000
349
- test[i].innerText=new Date(time).Format("hh:mm")
350
- }
351
- if(test[i].getAttribute('type') === 'DATE_TIME_PICKER'){
352
- let time=Number(test[i].innerText)*1000
353
- test[i].innerText=new Date(time).Format("yyyy-MM-dd hh:mm")
354
- }
355
- }
356
- },
357
- beforeMount() {
358
- if(this.disable===true)
359
- {
360
- this.disableds=true
361
-
362
- }
363
- else
364
- {
365
- this.disableds=false
366
-
367
- }
368
- if(this.submit===true)
369
- {
370
- this.submitValue='已确认'
371
- }
372
- else
373
- {
374
- this.submitValue='确认'
375
- }
376
- },
377
- methods:{
378
- dataclick(){
379
- if(this.checkValue.getAttribute('type') === 'DATE_PICKER')
380
- {
381
- for (let i=0;i<this.values.length;i++)
382
- {
383
- if(this.values[i].key === this.checkValue.getAttribute('data'))
384
- {
385
- if(this.dateValue!=='')
386
- {
387
- this.checkValue.innerText=new Date(this.dateValue).Format('MM-dd')
388
- this.values[i].value=new Date(this.dateValue).getTime()
389
- }
390
- else
391
- {
392
- this.values[i].value=this.checkValue.innerText
393
- }
394
- }
395
- }
396
- }
397
- if(this.checkValue.getAttribute('type') === 'TIME_PICKER')
398
- {
399
- for (let i=0;i<this.values.length;i++)
400
- {
401
- if(this.values[i].key === this.checkValue.getAttribute('data') )
402
- {
403
- if(this.timeValue!=='')
404
- {
405
-
406
- this.checkValue.innerText=new Date(this.timeValue).Format('hh:mm')
407
- this.values[i].value=new Date(this.timeValue).getTime()
408
- }
409
- else
410
- {
411
- this.values[i].value=this.checkValue.innerText
412
- }
413
- }
414
- }
415
- }
416
- if(this.checkValue.getAttribute('type') === 'DATE_TIME_PICKER')
417
- {
418
- for (let i=0;i<this.values.length;i++)
419
- {
420
- if(this.values[i].key === this.checkValue.getAttribute('data') )
421
- {
422
- if(this.dateTimeValue!=='')
423
- {
424
-
425
- this.checkValue.innerText=new Date(this.dateTimeValue).Format('yyyy-MM-dd hh:mm')
426
- this.values[i].value=new Date(this.dateTimeValue).getTime()
427
- }
428
- else
429
- {
430
- this.values[i].value=this.checkValue.innerText
431
- }
432
- }
433
- }
434
- }
435
- },
436
- clickClick(e){
437
- if(e.target.onclick!==null)
438
- {
439
- let that=this
440
- window._askEditValue=that._askEditValue;
441
- }
442
- },
443
- _askEditValue(a,b){
444
- let type=b.getAttribute('type')
445
- this.checkValue=b
446
- if(type === 'INPUT')
447
- {
448
- this.single=true
449
- this.date=false
450
- this.time=false
451
- this.dateTime=false
452
- this.input= b.innerText
453
- }
454
- if(type === 'DATE_PICKER')
455
- {
456
- this.single=false
457
- this.date=true
458
- this.time=false
459
- this.dateTime=false
460
- this.show=true
461
- for (let i=0;i<this.values.length;i++)
462
- {
463
- if(b.getAttribute('data') === this.values[i].key)
464
- {
465
- if(typeof this.values[i].value == 'string')
466
- {
467
- this.dateInnerText=Number(this.values[i].value)*1000
468
- }
469
- else
470
- {
471
- this.dateInnerText=Number(this.values[i].value)
472
- }
473
- this.dateValue=new Date(this.dateInnerText).Format("yyyy:MM-dd")
474
- this.defaultDate=new Date(this.dateInnerText)
475
- }
476
- return
477
- }
478
-
479
- }
480
- if(type === 'TIME_PICKER')
481
- {
482
- this.single=false
483
- this.date=false
484
- this.time=true
485
- this.dateTime=false
486
- this.showTimePicker=true
487
- for (let i=0;i<this.values.length;i++)
488
- {
489
- if(b.getAttribute('data') === this.values[i].key)
490
- {
491
- let time
492
- if(typeof this.values[i].value == 'string'){
493
- time=Number(this.values[i].value)*1000
494
- }
495
- else
496
- {
497
- time=Number(this.values[i].value)
498
- }
499
- if(this.isPhone ===true)
500
- {
501
- this.timeValue=new Date(time)
502
- }
503
- else
504
- {
505
- this.timeValue=new Date(time).Format("yyyy-MM-dd hh:mm")
506
- }
507
- }
508
- }
509
- }
510
- if(type === 'DATE_TIME_PICKER')
511
- {
512
- this.single=false
513
- this.date=false
514
- this.time=false
515
- this.dateTime=true
516
- this.showDateTimePicker=true
517
- for (let i=0;i<this.values.length;i++)
518
- {
519
- if(b.getAttribute('data') === this.values[i].key)
520
- {
521
- let time
522
- if(typeof this.values[i].value == 'string'){
523
- time=Number(this.values[i].value)*1000
524
- }
525
- else
526
- {
527
- time=Number(this.values[i].value)
528
- }
529
- if(this.isPhone===true)
530
- {
531
- this.dateTimeValue=new Date(time)
532
- }
533
- else
534
- {
535
- this.dateTimeValue=new Date(time).Format("yyyy-MM-dd hh:mm:ss")
536
- }
537
- }
538
- }
539
- }
540
-
541
- },
542
- formatter(type, value) {
543
- // 格式化选择器日期
544
- if (type === "year") {
545
- return `${value}年`;
546
- } else if (type === "month") {
547
- return `${value}月`;
548
- } else if (type === "day") {
549
- return `${value}日`;
550
- } else if (type === "hour") {
551
- return `${value}时`;
552
- } else if (type === "minute") {
553
- return `${value}分`;
554
- }
555
- return value;
556
- },
557
- //提交按钮
558
- submitClick(){
559
- this.single=false
560
- this.date=false
561
- this.time=false
562
- this.dateTime=false
563
- let infomation={}
564
- let obj = {}
565
- this.values.map(item => {
566
- obj[item.key] = item
567
- })
568
- let result = Object.values(obj)
569
- let text=this.$el
570
- let test=text.getElementsByClassName('ask-component-placeholder-span')
571
- for (let i=0;i<test.length;i++)
572
- {
573
- if(test[i].getAttribute('type')==='DATE_PICKER')
574
- {
575
- if(test[i].getAttribute('data')===result[i].key)
576
- {
577
- if(typeof result[i].value =='number'){
578
- result[i].value/=1000
579
- let resu=String(result[i].value)
580
- result[i].value=resu
581
- }
582
- }
583
- }
584
- if(test[i].getAttribute('type')==='TIME_PICKER')
585
- {
586
- if(test[i].getAttribute('data')===result[i].key)
587
- {
588
- if(typeof result[i].value =='number')
589
- {
590
- result[i].value/=1000
591
- let resu=String(result[i].value)
592
- result[i].value=resu
593
- }
594
- }
595
- }
596
- if(test[i].getAttribute('type')==='DATE_TIME_PICKER')
597
- {
598
- if(test[i].getAttribute('data')===result[i].key)
599
- {
600
- if(typeof result[i].value =='number')
601
- {
602
- result[i].value/=1000
603
- let resu=String(result[i].value)
604
- result[i].value=resu
605
- }
606
- }
607
- }
608
- }
609
- infomation['values']=result
610
- infomation['goToAction']=this.text.goToAction
611
- let innerhtml=this.$el
612
- infomation['template']=innerhtml.querySelector('#html').innerHTML
613
- infomation['apiKey']=this.text.apiKey
614
- this.$emit('submitClick',infomation,this.text.apiKey)
615
- this.submitValue='已确认'
616
- this.disableds=true
617
- },
618
- addZero(i){
619
- if (i<10) {
620
- i="0" + i;
621
- }
622
- return i;
623
- },
624
- formatDate(date) {
625
- if(typeof date == 'object')
626
- {
627
- const dateTime = new Date(date[0])
628
- const dateTime1=new Date(date[1])
629
- return `${dateTime.getMonth() + 1}月${dateTime.getDate()}日 ${this.addZero(dateTime.getHours())} : ${this.addZero(dateTime.getMinutes())} - ${dateTime1.getMonth() + 1}月${dateTime1.getDate()}日 ${this.addZero(dateTime1.getHours())} : ${this.addZero(dateTime1.getMinutes())}`;
630
- }
631
- else
632
- {
633
- const dateTime = new Date(date)
634
- return `${dateTime.getMonth() + 1}月${dateTime.getDate()}日`;
635
- }
636
-
637
- },
638
- //格式成时间
639
- formatDate1(date){
640
- const dateTime = new Date(date)
641
- return `${this.addZero(dateTime.getHours())}:${this.addZero(dateTime.getMinutes())}`;
642
- },
643
- //格式成日期
644
- formatDate2(date){
645
- const dateTime = new Date(date)
646
- return `${dateTime.getMonth() + 1} - ${dateTime.getDate()}`;
647
- },
648
- //日期范围
649
- formatDate3(date){
650
- const dateTime = new Date(date[0])
651
- const dateTime1=new Date(date[1])
652
- return `${dateTime.getMonth() + 1}月 ${dateTime.getDate()}日 - ${dateTime1.getMonth() + 1}月 ${dateTime1.getDate()}日`;
653
- },
654
- //时间范围
655
- formatDate4(date){
656
- const dateTime = new Date(date[0])
657
- const dateTime1=new Date(date[1])
658
- return `${dateTime.getHours()}: ${dateTime.getMinutes()} - ${dateTime1.getHours()}: ${dateTime1.getMinutes()}`;
659
- },
660
- testClick(value){
661
- if(this.checkValue.getAttribute('type') === 'INPUT')
662
- {
663
- for (let i=0;i<this.values.length;i++)
664
- {
665
- if(this.values[i].key === this.checkValue.getAttribute('data') )
666
- {
667
- this.checkValue.innerText=value
668
- this.values[i].value=this.checkValue.innerText
669
- }
670
- }
671
- }
672
- },
673
- inputBlur(){
674
- console.debug('inputBlur')
675
- this.single=false
676
- },
677
- quedingClick(){
678
- if(this.checkValue.getAttribute('type') === 'INPUT')
679
- {
680
- for (let i=0;i<this.values.length;i++)
681
- {
682
- if(this.values[i].key === this.checkValue.getAttribute('data') )
683
- {
684
- if(this.input!=='')
685
- {
686
- this.checkValue.innerText=this.input
687
- }
688
- this.values[i].value=this.checkValue.innerText
689
- }
690
- }
691
- this.single = false
692
- this.input=''
693
- }
694
- if(this.checkValue.getAttribute('type') === 'DATE_PICKER')
695
-
696
- {
697
- for (let i=0;i<this.values.length;i++)
698
- {
699
- if(this.values[i].key === this.checkValue.getAttribute('data'))
700
- {
701
- if(this.dateValue!=='')
702
- {
703
- this.checkValue.innerText=new Date(this.dateValue).Format('MM-dd')
704
- this.values[i].value=new Date(this.dateValue).getTime()
705
- }
706
- else
707
- {
708
- this.values[i].value=this.checkValue.innerText
709
- }
710
- }
711
- }
712
- this.date = false
713
- this.dateValue=''
714
- }
715
- if(this.checkValue.getAttribute('type') === 'TIME_PICKER')
716
- {
717
- for (let i=0;i<this.values.length;i++)
718
- {
719
- if(this.values[i].key === this.checkValue.getAttribute('data') )
720
- {
721
- if(this.timeValue!=='')
722
- {
723
-
724
- this.checkValue.innerText=new Date(this.timeValue).Format('hh:mm')
725
- this.values[i].value=new Date(this.timeValue).getTime()
726
- }
727
- else
728
- {
729
- this.values[i].value=this.checkValue.innerText
730
- }
731
- }
732
- }
733
- this.time = false
734
- this.timeValue=''
735
- }
736
- if(this.checkValue.getAttribute('type') === 'DATE_TIME_PICKER')
737
- {
738
- for (let i=0;i<this.values.length;i++)
739
- {
740
- if(this.values[i].key === this.checkValue.getAttribute('data') )
741
- {
742
- if(this.dateTimeValue!=='')
743
- {
744
-
745
- this.checkValue.innerText=new Date(this.dateTimeValue).Format('yyyy-MM-dd hh:mm')
746
- this.values[i].value=new Date(this.dateTimeValue).getTime()
747
- }
748
- else
749
- {
750
- this.values[i].value=this.checkValue.innerText
751
- }
752
- }
753
- }
754
- this.dateTime = false
755
- this.dateTimeValue=''
756
- }
757
-
758
- },
759
- isMobile() {
760
- let flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);
761
- if (flag) {
762
- this.isPhone=true
763
- }
764
- else
765
- {
766
- this.isCompany=true
767
-
768
- }
769
- },
770
- onConfirmDateTime(){
771
- if(this.checkValue.getAttribute('type') === 'DATE_TIME_PICKER')
772
- {
773
- for (let i=0;i<this.values.length;i++)
774
- {
775
- if(this.values[i].key === this.checkValue.getAttribute('data') )
776
- {
777
- if(this.dateTimeValue!=='')
778
- {
779
-
780
- this.checkValue.innerText=new Date(this.dateTimeValue).Format('yyyy-MM-dd hh:mm')
781
- this.values[i].value=new Date(this.dateTimeValue).getTime()
782
- }
783
- else
784
- {
785
- this.values[i].value=this.checkValue.innerText
786
- }
787
- }
788
- }
789
- }
790
- this.showDateTimePicker = false;
791
- },
792
-
793
- onConfirm(date) {
794
- this.show = false;
795
- if(this.checkValue.getAttribute('type') === 'DATE_PICKER')
796
-
797
- {
798
- for (let i=0;i<this.values.length;i++)
799
- {
800
- if(this.values[i].key === this.checkValue.getAttribute('data'))
801
- {
802
- if(date!=='')
803
- {
804
- this.checkValue.innerText=new Date(date).Format('MM-dd')
805
- this.values[i].value=new Date(date).getTime()
806
- }
807
- else
808
- {
809
- this.values[i].value=this.checkValue.innerText
810
- }
811
- }
812
- }
813
- this.date = false
814
- this.dateValue=''
815
- }
816
-
817
- },
818
- onConfirmTime(){
819
- this.showTimePicker=false
820
- if(this.checkValue.getAttribute('type') === 'TIME_PICKER')
821
- {
822
- for (let i=0;i<this.values.length;i++)
823
- {
824
- if(this.values[i].key === this.checkValue.getAttribute('data') )
825
- {
826
- if(this.timeValue!=='')
827
- {
828
-
829
- this.checkValue.innerText=new Date(this.timeValue).Format('hh:mm')
830
- this.values[i].value=new Date(this.timeValue).getTime()
831
- }
832
- else
833
- {
834
- this.values[i].value=this.checkValue.innerText
835
- }
836
- }
837
- }
838
- }
839
- }
840
- }
841
- }
842
- </script>
843
-
844
-
845
- <style lang="less">
846
- @import "../../assets/less/common.css";
847
- #textMessage{
848
- min-width: 200px;
849
- .editMessage{
850
- display: flex;
851
- justify-content: space-between;
852
- margin-top: 10px;
853
- border-top: 1px dashed #ebebeb;
854
- }
855
- #submit{
856
- margin-top: 10px;
857
- display: flex;
858
- align-items: center;
859
- justify-content: center;
860
- .el-button{
861
- border: 1px solid #BBCDFF;
862
- border-radius: 14px;
863
- background-color: white;
864
- color: #366aff;
865
- font-weight: 400;
866
- }
867
- .el-button--small{
868
- padding: 9px 30px;
869
- font-size: 1em;
870
- }
871
- }
872
- #html{
873
- p{
874
- color:#A9B3C6;
875
- }
876
- .ask-component-placeholder-icon{
877
- padding-left: 12px;
878
- color: #366aff;
879
- font-size: 18px;
880
- }
881
- .ask-component-placeholder-span{
882
- color: #616161!important;
883
- }
884
- }
885
- }
886
- .remPhoneClass{
887
- margin: 0 auto;
888
- /*width: 80vw;*/
889
- .inputClass{
890
- margin-top: 8px;
891
- width: 100%;
892
- .el-input__inner{
893
- border-radius: 9px;
894
- }
895
- }
896
- .htmlClass{
897
- padding: 4px 0;
898
- }
899
-
900
- }
901
- .remCompanyClass{
902
-
903
- margin: 0 auto;
904
- /*width: 300px;*/
905
- .inputClass{
906
- padding: 10px 0 10px 0;
907
- width: 100%;
908
- .el-input__inner{
909
- border-radius: 9px;
910
- }
911
- }
912
-
913
-
914
- }
915
- .van-cell::after{
916
- content: none!important;
917
- }
918
- i{
919
- cursor: pointer;
920
- }
921
- .notClickClass{
922
- pointer-events: none;
923
- }
924
- </style>
1
+ <!-- 消息记录容器 -->
2
+ <template>
3
+ <div class="media-body">
4
+ <div class="textMessage" id="textMessage" :class="{remPhoneClass:isPhone,remCompanyClass:isCompany}">
5
+ <div style="display: flex;height: auto;line-height: 2;" @mousemove="clickClick" class="htmlClass">
6
+ <div v-html="text.template" id="html" :class="{notClickClass:disableds === true}">
7
+ {{text.template}}
8
+ </div>
9
+ </div>
10
+ <div id="submit">
11
+ <el-button plain size="small" @click="submitClick" :disabled="disableds" >{{submitValue}}</el-button>
12
+ </div>
13
+ <div v-if="isCompany">
14
+ <div v-if="single === true" class="editMessage">
15
+ <el-input v-model="input" placeholder="请输入内容" class="inputClass" @input="testClick" @blur="inputBlur"></el-input>
16
+ <!-- <span @click="quedingClick" style="display: flex;align-items: center"><i class="el-icon-success" style="color: #4C61E1;font-size: 32px;cursor: pointer"></i></span>
17
+ --> </div>
18
+ <div v-if="date" class="editMessage">
19
+ <el-date-picker
20
+ v-model="dateValue"
21
+ type="date"
22
+ placeholder="选择日期"
23
+ style="width: 100%;margin: 10px 0 10px 0"
24
+ :clearable=false
25
+ @change="dataclick"
26
+
27
+ >
28
+ </el-date-picker>
29
+ <!-- <span @click="quedingClick" style="display: flex;align-items: center"><i class="el-icon-success" style="color: #4C61E1;font-size: 32px;cursor: pointer"></i></span>
30
+ --> </div>
31
+ <div v-if="time" class="editMessage">
32
+ <el-time-picker
33
+ v-model="timeValue"
34
+ placeholder="任意时间点"
35
+ style="margin: 10px 0 10px 0;width: 100%"
36
+ :clearable=false
37
+ @change="dataclick"
38
+ >
39
+ </el-time-picker>
40
+ <!-- <span @click="quedingClick" style="display: flex;align-items: center"><i class="el-icon-success" style="color: #4C61E1;font-size: 32px;cursor: pointer"></i></span>
41
+ --> </div>
42
+ <div v-if="dateTime" class="editMessage">
43
+ <el-date-picker
44
+ v-model="dateTimeValue"
45
+ type="datetime"
46
+ placeholder="选择日期时间"
47
+ style="width: 100%;margin: 10px 0 10px 0"
48
+ @change="dataclick"
49
+ >
50
+ </el-date-picker>
51
+ <!-- <span @click="quedingClick(bianliangId)" style="display:flex;align-items:center;"><i class="el-icon-success" style="color: #4C61E1;font-size: 32px;cursor: pointer"></i></span>
52
+ --> </div>
53
+ <!--<div v-if="dateRange" style="border-top: 1px dashed #ebebeb;">
54
+ <el-date-picker
55
+ v-model="dateRangeValue"
56
+ type="daterange"
57
+ range-separator="至"
58
+ start-placeholder="开始日期"
59
+ end-placeholder="结束日期"
60
+ style="margin: 10px 16px;width: 80%"
61
+ >
62
+ </el-date-picker>
63
+ <span @click="quedingClick(bianliangId)" ><i class="el-icon-success" style="color: #409eff;font-size: 32px;text-align: center;vertical-align: middle;cursor: pointer"></i></span>
64
+ </div>
65
+ <div v-if="timeRange" style="border-top: 1px dashed #ebebeb;">
66
+ <el-time-picker
67
+ is-range
68
+ v-model="timeRangeValue"
69
+ range-separator="至"
70
+ start-placeholder="开始时间"
71
+ end-placeholder="结束时间"
72
+ placeholder="选择时间范围"
73
+ style="margin: 10px 16px;width: 80%"
74
+ >
75
+ </el-time-picker>
76
+ <span @click="quedingClick(bianliangId)" ><i class="el-icon-success" style="color: #409eff;font-size: 32px;text-align: center;vertical-align: middle;cursor: pointer"></i></span>
77
+
78
+ </div>
79
+ <div v-if="dateTimeRange" style="border-top: 1px dashed #ebebeb;">
80
+ <el-date-picker
81
+ v-model="dateTimeValue"
82
+ type="datetimerange"
83
+ range-separator="至"
84
+ start-placeholder="开始日期"
85
+ end-placeholder="结束日期"
86
+ style="width: 80%;margin: 10px 16px"
87
+
88
+ >
89
+ </el-date-picker>
90
+ <span @click="quedingClick(bianliangId)" ><i class="el-icon-success" style="color: #409eff;font-size: 32px;text-align: center;vertical-align: middle;cursor: pointer"></i></span>
91
+ </div>-->
92
+ </div>
93
+ <div v-if="isPhone">
94
+ <div v-if="single" class="editMessage">
95
+ <el-input v-model="input" placeholder="请输入内容" class="inputClass" @input="testClick" @blur="inputBlur"></el-input>
96
+ <!-- <span @click="quedingClick" style="display: flex;align-items: center"><i class="el-icon-success" style="color: #4C61E1;font-size: 32px;cursor: pointer"></i></span>
97
+ --> </div>
98
+ <div v-if="date">
99
+ <van-calendar v-model="show" @confirm="onConfirm" :default-date="defaultDate"/>
100
+ <!-- <el-date-picker
101
+ v-model="dateValue"
102
+ type="date"
103
+ placeholder="选择日期"
104
+ style="width: 80%;margin: 10px 10px 10px 0"
105
+ :editable=false
106
+ >
107
+ </el-date-picker>
108
+ <span @click="quedingClick" style="display: flex;align-items: center"><i class="el-icon-success" style="color: #4C61E1;font-size: 32px;cursor: pointer"></i></span>
109
+ --></div>
110
+
111
+ <div v-if="time">
112
+ <van-popup v-model="showTimePicker" position="bottom">
113
+ <van-datetime-picker
114
+ v-model="timeValue"
115
+ type="datetime"
116
+ title="选择时间"
117
+ :min-date="minDate"
118
+ :formatter="formatter"
119
+ @cancel="showTimePicker = false"
120
+ @confirm="onConfirmTime"
121
+ />
122
+ </van-popup>
123
+ <!-- <el-time-picker
124
+ v-model="timeValue"
125
+ placeholder="任意时间点"
126
+ style="margin: 10px 10px 10px 0;width: 80%"
127
+ :editable=false
128
+ >
129
+ </el-time-picker>
130
+ <span @click="quedingClick" style="display: flex;align-items: center"><i class="el-icon-success" style="color: #4C61E1;font-size: 32px;cursor: pointer"></i></span>
131
+ --> </div>
132
+ <div v-if="dateTime">
133
+ <van-popup v-model="showDateTimePicker" position="bottom">
134
+ <van-datetime-picker
135
+ v-model="dateTimeValue"
136
+ type="datetime"
137
+ title="选择日期时间"
138
+ :min-date="minDate"
139
+ :formatter="formatter"
140
+ @cancel="showDateTimePicker = false"
141
+ @confirm="onConfirmDateTime"
142
+ />
143
+ </van-popup>
144
+ <!-- <el-date-picker
145
+ v-model="dateTimeValue"
146
+ type="datetime"
147
+ placeholder="选择日期时间"
148
+ style="width: 80%;margin: 10px 10px 10px 0"
149
+ :editable=false
150
+
151
+ >
152
+ </el-date-picker>
153
+ <span @click="quedingClick(bianliangId)" style="display: flex;align-items: center"><i class="el-icon-success" style="color: #4C61E1;font-size: 32px;cursor: pointer"></i></span>
154
+ --></div>
155
+ <!-- <div v-if="dateRange" style="border-top: 1px dashed #ebebeb;display: flex">
156
+ &lt;!&ndash;<el-date-picker
157
+ v-model="dateRangeValue"
158
+ type="daterange"
159
+ range-separator="至"
160
+ start-placeholder="开始日期"
161
+ end-placeholder="结束日期"
162
+ style="margin: 10px 16px;width: 80%"
163
+ :editable=false
164
+
165
+ >
166
+ </el-date-picker>&ndash;&gt;
167
+ <div style="width: 90%">
168
+ <van-cell title="选择日期区间" :value="dateRangeValue" @click="show = true" />
169
+ <van-calendar v-model="show" type="range" @confirm="onConfirm" />
170
+ </div>
171
+ <span @click="quedingClick(bianliangId)" ><i class="el-icon-success" style="color: #409eff;font-size: 32px;text-align: center;vertical-align: middle;cursor: pointer"></i></span>
172
+
173
+
174
+
175
+ </div>
176
+ <div v-if="timeRange" style="border-top: 1px dashed #ebebeb;">
177
+ <el-time-picker
178
+ is-range
179
+ v-model="timeRangeValue"
180
+ range-separator="至"
181
+ start-placeholder="开始时间"
182
+ end-placeholder="结束时间"
183
+ placeholder="选择时间范围"
184
+ style="margin: 10px 16px;width: 80%"
185
+
186
+ :editable=false
187
+ >
188
+ </el-time-picker>
189
+ <span @click="quedingClick(bianliangId)" ><i class="el-icon-success" style="color: #409eff;font-size: 32px;text-align: center;vertical-align: middle;cursor: pointer"></i></span>
190
+
191
+ </div>
192
+ <div v-if="dateTimeRange" style="border-top: 1px dashed #ebebeb;display: flex">
193
+ &lt;!&ndash; <el-date-picker
194
+ v-model="dateTimeValue"
195
+ type="datetimerange"
196
+ range-separator="至"
197
+ start-placeholder="开始日期"
198
+ end-placeholder="结束日期"
199
+ style="width: 80%;margin: 10px 16px"
200
+ :editable=false
201
+
202
+
203
+ >
204
+ </el-date-picker>&ndash;&gt;
205
+ <div style="width: 90%">
206
+ <van-field
207
+ readonly
208
+ clickable
209
+ name="datetimePicker"
210
+ :value=dateTimeValue[0]
211
+ label='选择时间'
212
+ placeholder="点击选择开始日期时间"
213
+ @click="showDateTimePicker=true"
214
+ />
215
+ <van-popup v-model="showDateTimePicker" position="bottom">
216
+ <van-datetime-picker
217
+ v-model="currentDate"
218
+ type="datetime"
219
+ title="选择开始日期时间"
220
+ @confirm="onConfirmDateTime($event)"
221
+ @cancel="showDateTimePicker = false"
222
+ :min-date="minDate"
223
+ :formatter="formatter"
224
+ />
225
+ </van-popup>
226
+ <van-field
227
+ readonly
228
+ clickable
229
+ name="datetimePicker"
230
+ :value=dateTimeValue1[0]
231
+ label=" "
232
+ placeholder="点击选择结束日期时间"
233
+ @click="showDateTimePicker1=true"
234
+ />
235
+ <van-popup v-model="showDateTimePicker1" position="bottom">
236
+ <van-datetime-picker
237
+ v-model="currentDate"
238
+ type="datetime"
239
+ title="选择结束日期时间"
240
+ @confirm="onConfirmDateTime1($event)"
241
+ @cancel="showDateTimePicker1 = false"
242
+ :min-date="minDate"
243
+ :formatter="formatter"
244
+ />
245
+ </van-popup>
246
+ </div>
247
+
248
+ <span @click="quedingClick(bianliangId)" ><i class="el-icon-success" style="color: #409eff;font-size: 32px;text-align: center;vertical-align: middle;cursor: pointer"></i></span>
249
+ </div>-->
250
+ </div>
251
+ </div>
252
+ </div>
253
+ </template>
254
+
255
+ <script>
256
+ /*import $ from 'jquery'*/
257
+ export default {
258
+ name: 'TextMessage',
259
+ data(){
260
+ return{
261
+ show:false,
262
+ single:false,
263
+ date:false,
264
+ time:false,
265
+ dateTime:false,
266
+ dateRange:false,
267
+ timeRange:false,
268
+ input:'',
269
+ bianliangId:'',
270
+ dateValue:'',
271
+ message:[{content:'王亚欣',type:'SINGLE',value:'',id:1},{content:['2020-11-18T07:25:16.000+0000','2020-11-21T07:25:16.000+0000'],type:'DATE-RANGE',value:'',id:2},{content:'2020-11-18T07:25:16.000+0000',type:'TIME',value:'',id:3},{content:'2020-11-18T07:25:16.000+0000',type:'DATE',value:'',id:4},{content:['2020-11-18T07:25:16.000+0000','2020-11-21T07:25:16.000+0000'],type:'DATERANGE',value:'',id:5},{content:['2020-11-18T08:25:16.000+0000','2020-11-21T07:25:16.000+0000'],type:'TIMERANGE',value:'',id:6},],
272
+ isPhone:false,
273
+ isCompany:false,
274
+ dateTimeValue:'',
275
+ timeValue:'',
276
+ dateRangeValue:'',
277
+ dateRangeValues:'',
278
+ timeRangeValue:[],
279
+ dateTimeValue1:[],
280
+ test:0,
281
+ currentDate:new Date(),
282
+ minDate: new Date(2020, 0, 1),
283
+ showDateTimePicker1:false,
284
+ showDateTimePicker:false,
285
+ values:[],
286
+ checkValue:'',
287
+ disableds:false,
288
+ submitValue:'确认',
289
+ dateInnerText:'',
290
+ defaultDate:'',
291
+ showTimePicker:false,
292
+
293
+ }
294
+ },
295
+ props:{
296
+ text:{
297
+ type:Object,
298
+ default(){
299
+ return {}
300
+ }
301
+ },
302
+ type:String,
303
+ disable:Boolean,
304
+ submit:Boolean
305
+ },
306
+ mounted() {
307
+ this.isMobile()
308
+ let span=this.$el
309
+ let defaults=span.getElementsByClassName('ask-component-placeholder-span')
310
+ for (let i=0;i<defaults.length;i++)
311
+ {
312
+ this.values.push({})
313
+ this.values[i]['key']=defaults[i].getAttribute('data')
314
+ this.values[i]['value']=defaults[i].innerText
315
+ this.values[i]['type']=defaults[i].getAttribute('type')
316
+ }
317
+ let text=this.$el
318
+ let test=text.getElementsByClassName('ask-component-placeholder-span')
319
+ let cpntain=text.getElementsByClassName('ask-component-placeholder-container')
320
+ let icon=text.getElementsByClassName('arsenalkebianji')
321
+ for (let i=0;i<icon.length;i++)
322
+ {
323
+ icon[i].style.color='#366aff'
324
+ }
325
+ for (let i=0;i<cpntain.length;i++)
326
+ {
327
+ if(this.type)
328
+ {
329
+ cpntain[i].style.paddingRight=0.2+'rem'
330
+ cpntain[i].style.paddingLeft=0.2+'rem'
331
+ }
332
+ else
333
+ {
334
+ cpntain[i].style.paddingRight=4+'px'
335
+ cpntain[i].style.paddingLeft=4+'px'
336
+ }
337
+
338
+ }
339
+ for (let i=0;i<test.length;i++)
340
+ {
341
+ if(test[i].getAttribute('type')==='DATE_PICKER')
342
+ {
343
+ let date=Number(test[i].innerText)*1000
344
+ test[i].innerText=new Date(date).Format("MM-dd")
345
+ }
346
+ if(test[i].getAttribute('type')==='TIME_PICKER')
347
+ {
348
+ let time=Number(test[i].innerText)*1000
349
+ test[i].innerText=new Date(time).Format("hh:mm")
350
+ }
351
+ if(test[i].getAttribute('type') === 'DATE_TIME_PICKER'){
352
+ let time=Number(test[i].innerText)*1000
353
+ test[i].innerText=new Date(time).Format("yyyy-MM-dd hh:mm")
354
+ }
355
+ }
356
+ },
357
+ beforeMount() {
358
+ if(this.disable===true)
359
+ {
360
+ this.disableds=true
361
+
362
+ }
363
+ else
364
+ {
365
+ this.disableds=false
366
+
367
+ }
368
+ if(this.submit===true)
369
+ {
370
+ this.submitValue='已确认'
371
+ }
372
+ else
373
+ {
374
+ this.submitValue='确认'
375
+ }
376
+ },
377
+ methods:{
378
+ dataclick(){
379
+ if(this.checkValue.getAttribute('type') === 'DATE_PICKER')
380
+ {
381
+ for (let i=0;i<this.values.length;i++)
382
+ {
383
+ if(this.values[i].key === this.checkValue.getAttribute('data'))
384
+ {
385
+ if(this.dateValue!=='')
386
+ {
387
+ this.checkValue.innerText=new Date(this.dateValue).Format('MM-dd')
388
+ this.values[i].value=new Date(this.dateValue).getTime()
389
+ }
390
+ else
391
+ {
392
+ this.values[i].value=this.checkValue.innerText
393
+ }
394
+ }
395
+ }
396
+ }
397
+ if(this.checkValue.getAttribute('type') === 'TIME_PICKER')
398
+ {
399
+ for (let i=0;i<this.values.length;i++)
400
+ {
401
+ if(this.values[i].key === this.checkValue.getAttribute('data') )
402
+ {
403
+ if(this.timeValue!=='')
404
+ {
405
+
406
+ this.checkValue.innerText=new Date(this.timeValue).Format('hh:mm')
407
+ this.values[i].value=new Date(this.timeValue).getTime()
408
+ }
409
+ else
410
+ {
411
+ this.values[i].value=this.checkValue.innerText
412
+ }
413
+ }
414
+ }
415
+ }
416
+ if(this.checkValue.getAttribute('type') === 'DATE_TIME_PICKER')
417
+ {
418
+ for (let i=0;i<this.values.length;i++)
419
+ {
420
+ if(this.values[i].key === this.checkValue.getAttribute('data') )
421
+ {
422
+ if(this.dateTimeValue!=='')
423
+ {
424
+
425
+ this.checkValue.innerText=new Date(this.dateTimeValue).Format('yyyy-MM-dd hh:mm')
426
+ this.values[i].value=new Date(this.dateTimeValue).getTime()
427
+ }
428
+ else
429
+ {
430
+ this.values[i].value=this.checkValue.innerText
431
+ }
432
+ }
433
+ }
434
+ }
435
+ },
436
+ clickClick(e){
437
+ if(e.target.onclick!==null)
438
+ {
439
+ let that=this
440
+ window._askEditValue=that._askEditValue;
441
+ }
442
+ },
443
+ _askEditValue(a,b){
444
+ let type=b.getAttribute('type')
445
+ this.checkValue=b
446
+ if(type === 'INPUT')
447
+ {
448
+ this.single=true
449
+ this.date=false
450
+ this.time=false
451
+ this.dateTime=false
452
+ this.input= b.innerText
453
+ }
454
+ if(type === 'DATE_PICKER')
455
+ {
456
+ this.single=false
457
+ this.date=true
458
+ this.time=false
459
+ this.dateTime=false
460
+ this.show=true
461
+ for (let i=0;i<this.values.length;i++)
462
+ {
463
+ if(b.getAttribute('data') === this.values[i].key)
464
+ {
465
+ if(typeof this.values[i].value == 'string')
466
+ {
467
+ this.dateInnerText=Number(this.values[i].value)*1000
468
+ }
469
+ else
470
+ {
471
+ this.dateInnerText=Number(this.values[i].value)
472
+ }
473
+ this.dateValue=new Date(this.dateInnerText).Format("yyyy:MM-dd")
474
+ this.defaultDate=new Date(this.dateInnerText)
475
+ }
476
+ return
477
+ }
478
+
479
+ }
480
+ if(type === 'TIME_PICKER')
481
+ {
482
+ this.single=false
483
+ this.date=false
484
+ this.time=true
485
+ this.dateTime=false
486
+ this.showTimePicker=true
487
+ for (let i=0;i<this.values.length;i++)
488
+ {
489
+ if(b.getAttribute('data') === this.values[i].key)
490
+ {
491
+ let time
492
+ if(typeof this.values[i].value == 'string'){
493
+ time=Number(this.values[i].value)*1000
494
+ }
495
+ else
496
+ {
497
+ time=Number(this.values[i].value)
498
+ }
499
+ if(this.isPhone ===true)
500
+ {
501
+ this.timeValue=new Date(time)
502
+ }
503
+ else
504
+ {
505
+ this.timeValue=new Date(time).Format("yyyy-MM-dd hh:mm")
506
+ }
507
+ }
508
+ }
509
+ }
510
+ if(type === 'DATE_TIME_PICKER')
511
+ {
512
+ this.single=false
513
+ this.date=false
514
+ this.time=false
515
+ this.dateTime=true
516
+ this.showDateTimePicker=true
517
+ for (let i=0;i<this.values.length;i++)
518
+ {
519
+ if(b.getAttribute('data') === this.values[i].key)
520
+ {
521
+ let time
522
+ if(typeof this.values[i].value == 'string'){
523
+ time=Number(this.values[i].value)*1000
524
+ }
525
+ else
526
+ {
527
+ time=Number(this.values[i].value)
528
+ }
529
+ if(this.isPhone===true)
530
+ {
531
+ this.dateTimeValue=new Date(time)
532
+ }
533
+ else
534
+ {
535
+ this.dateTimeValue=new Date(time).Format("yyyy-MM-dd hh:mm:ss")
536
+ }
537
+ }
538
+ }
539
+ }
540
+
541
+ },
542
+ formatter(type, value) {
543
+ // 格式化选择器日期
544
+ if (type === "year") {
545
+ return `${value}年`;
546
+ } else if (type === "month") {
547
+ return `${value}月`;
548
+ } else if (type === "day") {
549
+ return `${value}日`;
550
+ } else if (type === "hour") {
551
+ return `${value}时`;
552
+ } else if (type === "minute") {
553
+ return `${value}分`;
554
+ }
555
+ return value;
556
+ },
557
+ //提交按钮
558
+ submitClick(){
559
+ this.single=false
560
+ this.date=false
561
+ this.time=false
562
+ this.dateTime=false
563
+ let infomation={}
564
+ let obj = {}
565
+ this.values.map(item => {
566
+ obj[item.key] = item
567
+ })
568
+ let result = Object.values(obj)
569
+ let text=this.$el
570
+ let test=text.getElementsByClassName('ask-component-placeholder-span')
571
+ for (let i=0;i<test.length;i++)
572
+ {
573
+ if(test[i].getAttribute('type')==='DATE_PICKER')
574
+ {
575
+ if(test[i].getAttribute('data')===result[i].key)
576
+ {
577
+ if(typeof result[i].value =='number'){
578
+ result[i].value/=1000
579
+ let resu=String(result[i].value)
580
+ result[i].value=resu
581
+ }
582
+ }
583
+ }
584
+ if(test[i].getAttribute('type')==='TIME_PICKER')
585
+ {
586
+ if(test[i].getAttribute('data')===result[i].key)
587
+ {
588
+ if(typeof result[i].value =='number')
589
+ {
590
+ result[i].value/=1000
591
+ let resu=String(result[i].value)
592
+ result[i].value=resu
593
+ }
594
+ }
595
+ }
596
+ if(test[i].getAttribute('type')==='DATE_TIME_PICKER')
597
+ {
598
+ if(test[i].getAttribute('data')===result[i].key)
599
+ {
600
+ if(typeof result[i].value =='number')
601
+ {
602
+ result[i].value/=1000
603
+ let resu=String(result[i].value)
604
+ result[i].value=resu
605
+ }
606
+ }
607
+ }
608
+ }
609
+ infomation['values']=result
610
+ infomation['goToAction']=this.text.goToAction
611
+ let innerhtml=this.$el
612
+ infomation['template']=innerhtml.querySelector('#html').innerHTML
613
+ infomation['apiKey']=this.text.apiKey
614
+ this.$emit('submitClick',infomation,this.text.apiKey)
615
+ this.submitValue='已确认'
616
+ this.disableds=true
617
+ },
618
+ addZero(i){
619
+ if (i<10) {
620
+ i="0" + i;
621
+ }
622
+ return i;
623
+ },
624
+ formatDate(date) {
625
+ if(typeof date == 'object')
626
+ {
627
+ const dateTime = new Date(date[0])
628
+ const dateTime1=new Date(date[1])
629
+ return `${dateTime.getMonth() + 1}月${dateTime.getDate()}日 ${this.addZero(dateTime.getHours())} : ${this.addZero(dateTime.getMinutes())} - ${dateTime1.getMonth() + 1}月${dateTime1.getDate()}日 ${this.addZero(dateTime1.getHours())} : ${this.addZero(dateTime1.getMinutes())}`;
630
+ }
631
+ else
632
+ {
633
+ const dateTime = new Date(date)
634
+ return `${dateTime.getMonth() + 1}月${dateTime.getDate()}日`;
635
+ }
636
+
637
+ },
638
+ //格式成时间
639
+ formatDate1(date){
640
+ const dateTime = new Date(date)
641
+ return `${this.addZero(dateTime.getHours())}:${this.addZero(dateTime.getMinutes())}`;
642
+ },
643
+ //格式成日期
644
+ formatDate2(date){
645
+ const dateTime = new Date(date)
646
+ return `${dateTime.getMonth() + 1} - ${dateTime.getDate()}`;
647
+ },
648
+ //日期范围
649
+ formatDate3(date){
650
+ const dateTime = new Date(date[0])
651
+ const dateTime1=new Date(date[1])
652
+ return `${dateTime.getMonth() + 1}月 ${dateTime.getDate()}日 - ${dateTime1.getMonth() + 1}月 ${dateTime1.getDate()}日`;
653
+ },
654
+ //时间范围
655
+ formatDate4(date){
656
+ const dateTime = new Date(date[0])
657
+ const dateTime1=new Date(date[1])
658
+ return `${dateTime.getHours()}: ${dateTime.getMinutes()} - ${dateTime1.getHours()}: ${dateTime1.getMinutes()}`;
659
+ },
660
+ testClick(value){
661
+ if(this.checkValue.getAttribute('type') === 'INPUT')
662
+ {
663
+ for (let i=0;i<this.values.length;i++)
664
+ {
665
+ if(this.values[i].key === this.checkValue.getAttribute('data') )
666
+ {
667
+ this.checkValue.innerText=value
668
+ this.values[i].value=this.checkValue.innerText
669
+ }
670
+ }
671
+ }
672
+ },
673
+ inputBlur(){
674
+ console.debug('inputBlur')
675
+ this.single=false
676
+ },
677
+ quedingClick(){
678
+ if(this.checkValue.getAttribute('type') === 'INPUT')
679
+ {
680
+ for (let i=0;i<this.values.length;i++)
681
+ {
682
+ if(this.values[i].key === this.checkValue.getAttribute('data') )
683
+ {
684
+ if(this.input!=='')
685
+ {
686
+ this.checkValue.innerText=this.input
687
+ }
688
+ this.values[i].value=this.checkValue.innerText
689
+ }
690
+ }
691
+ this.single = false
692
+ this.input=''
693
+ }
694
+ if(this.checkValue.getAttribute('type') === 'DATE_PICKER')
695
+
696
+ {
697
+ for (let i=0;i<this.values.length;i++)
698
+ {
699
+ if(this.values[i].key === this.checkValue.getAttribute('data'))
700
+ {
701
+ if(this.dateValue!=='')
702
+ {
703
+ this.checkValue.innerText=new Date(this.dateValue).Format('MM-dd')
704
+ this.values[i].value=new Date(this.dateValue).getTime()
705
+ }
706
+ else
707
+ {
708
+ this.values[i].value=this.checkValue.innerText
709
+ }
710
+ }
711
+ }
712
+ this.date = false
713
+ this.dateValue=''
714
+ }
715
+ if(this.checkValue.getAttribute('type') === 'TIME_PICKER')
716
+ {
717
+ for (let i=0;i<this.values.length;i++)
718
+ {
719
+ if(this.values[i].key === this.checkValue.getAttribute('data') )
720
+ {
721
+ if(this.timeValue!=='')
722
+ {
723
+
724
+ this.checkValue.innerText=new Date(this.timeValue).Format('hh:mm')
725
+ this.values[i].value=new Date(this.timeValue).getTime()
726
+ }
727
+ else
728
+ {
729
+ this.values[i].value=this.checkValue.innerText
730
+ }
731
+ }
732
+ }
733
+ this.time = false
734
+ this.timeValue=''
735
+ }
736
+ if(this.checkValue.getAttribute('type') === 'DATE_TIME_PICKER')
737
+ {
738
+ for (let i=0;i<this.values.length;i++)
739
+ {
740
+ if(this.values[i].key === this.checkValue.getAttribute('data') )
741
+ {
742
+ if(this.dateTimeValue!=='')
743
+ {
744
+
745
+ this.checkValue.innerText=new Date(this.dateTimeValue).Format('yyyy-MM-dd hh:mm')
746
+ this.values[i].value=new Date(this.dateTimeValue).getTime()
747
+ }
748
+ else
749
+ {
750
+ this.values[i].value=this.checkValue.innerText
751
+ }
752
+ }
753
+ }
754
+ this.dateTime = false
755
+ this.dateTimeValue=''
756
+ }
757
+
758
+ },
759
+ isMobile() {
760
+ let flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);
761
+ if (flag) {
762
+ this.isPhone=true
763
+ }
764
+ else
765
+ {
766
+ this.isCompany=true
767
+
768
+ }
769
+ },
770
+ onConfirmDateTime(){
771
+ if(this.checkValue.getAttribute('type') === 'DATE_TIME_PICKER')
772
+ {
773
+ for (let i=0;i<this.values.length;i++)
774
+ {
775
+ if(this.values[i].key === this.checkValue.getAttribute('data') )
776
+ {
777
+ if(this.dateTimeValue!=='')
778
+ {
779
+
780
+ this.checkValue.innerText=new Date(this.dateTimeValue).Format('yyyy-MM-dd hh:mm')
781
+ this.values[i].value=new Date(this.dateTimeValue).getTime()
782
+ }
783
+ else
784
+ {
785
+ this.values[i].value=this.checkValue.innerText
786
+ }
787
+ }
788
+ }
789
+ }
790
+ this.showDateTimePicker = false;
791
+ },
792
+
793
+ onConfirm(date) {
794
+ this.show = false;
795
+ if(this.checkValue.getAttribute('type') === 'DATE_PICKER')
796
+
797
+ {
798
+ for (let i=0;i<this.values.length;i++)
799
+ {
800
+ if(this.values[i].key === this.checkValue.getAttribute('data'))
801
+ {
802
+ if(date!=='')
803
+ {
804
+ this.checkValue.innerText=new Date(date).Format('MM-dd')
805
+ this.values[i].value=new Date(date).getTime()
806
+ }
807
+ else
808
+ {
809
+ this.values[i].value=this.checkValue.innerText
810
+ }
811
+ }
812
+ }
813
+ this.date = false
814
+ this.dateValue=''
815
+ }
816
+
817
+ },
818
+ onConfirmTime(){
819
+ this.showTimePicker=false
820
+ if(this.checkValue.getAttribute('type') === 'TIME_PICKER')
821
+ {
822
+ for (let i=0;i<this.values.length;i++)
823
+ {
824
+ if(this.values[i].key === this.checkValue.getAttribute('data') )
825
+ {
826
+ if(this.timeValue!=='')
827
+ {
828
+
829
+ this.checkValue.innerText=new Date(this.timeValue).Format('hh:mm')
830
+ this.values[i].value=new Date(this.timeValue).getTime()
831
+ }
832
+ else
833
+ {
834
+ this.values[i].value=this.checkValue.innerText
835
+ }
836
+ }
837
+ }
838
+ }
839
+ }
840
+ }
841
+ }
842
+ </script>
843
+
844
+
845
+ <style lang="less">
846
+ @import "../../assets/less/common.css";
847
+ @import "../../assets/less/variables.less";
848
+
849
+ #textMessage{
850
+ min-width: 200px;
851
+ .editMessage{
852
+ display: flex;
853
+ justify-content: space-between;
854
+ margin-top: 10px;
855
+ border-top: 1px dashed @border-color-r6;
856
+ }
857
+ #submit{
858
+ margin-top: 10px;
859
+ display: flex;
860
+ align-items: center;
861
+ justify-content: center;
862
+ .el-button{
863
+ border: 1px solid @border-color-search-ipt;
864
+ border-radius: 14px;
865
+ background-color: white;
866
+ color: @primary-color;
867
+ font-weight: 400;
868
+ }
869
+ .el-button--small{
870
+ padding: 9px 30px;
871
+ font-size: 1em;
872
+ }
873
+ }
874
+ #html{
875
+ p{
876
+ color: @font-primary-color-r4;
877
+ }
878
+ .ask-component-placeholder-icon{
879
+ padding-left: 12px;
880
+ color: @font-primary-accent-color;
881
+ font-size: 18px;
882
+ }
883
+ .ask-component-placeholder-span{
884
+ color: @font-secondary-color !important;
885
+ }
886
+ }
887
+ }
888
+ .remPhoneClass{
889
+ margin: 0 auto;
890
+ /*width: 80vw;*/
891
+ .inputClass{
892
+ margin-top: 8px;
893
+ width: 100%;
894
+ .el-input__inner{
895
+ border-radius: 9px;
896
+ }
897
+ }
898
+ .htmlClass{
899
+ padding: 4px 0;
900
+ }
901
+
902
+ }
903
+ .remCompanyClass{
904
+
905
+ margin: 0 auto;
906
+ /*width: 300px;*/
907
+ .inputClass{
908
+ padding: 10px 0 10px 0;
909
+ width: 100%;
910
+ .el-input__inner{
911
+ border-radius: 9px;
912
+ }
913
+ }
914
+
915
+
916
+ }
917
+ .van-cell::after{
918
+ content: none!important;
919
+ }
920
+ i{
921
+ cursor: pointer;
922
+ }
923
+ .notClickClass{
924
+ pointer-events: none;
925
+ }
926
+ </style>