askbot-dragon 1.2.9 → 1.3.11

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 (83) 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 +56 -56
  5. package/public/index.html +43 -43
  6. package/src/App.vue +31 -31
  7. package/src/api/index.js +1 -1
  8. package/src/api/mock.http +2 -2
  9. package/src/api/requestUrl.js +185 -185
  10. package/src/assets/js/AliyunlssUtil.js +92 -92
  11. package/src/assets/js/Base64Util.js +22 -22
  12. package/src/assets/js/common.js +11 -11
  13. package/src/assets/js/script.js +36 -36
  14. package/src/assets/less/common.css +6773 -6773
  15. package/src/assets/less/converSationContainer/common.less +191 -191
  16. package/src/assets/less/converSationContainer/converSatonContainer.less +493 -493
  17. package/src/assets/less/iconfont.css +37 -37
  18. package/src/assets/less/ticketMessage.less +211 -211
  19. package/src/components/ActionAlertIframe.vue +112 -112
  20. package/src/components/AiGuide.vue +467 -467
  21. package/src/components/AnswerDocknowledge.vue +362 -362
  22. package/src/components/AnswerVoice.vue +256 -0
  23. package/src/components/AskIFrame.vue +15 -15
  24. package/src/components/ConversationContainer.vue +4024 -4011
  25. package/src/components/FileType.vue +86 -86
  26. package/src/components/Message.vue +27 -27
  27. package/src/components/actionSatisfaction.vue +107 -107
  28. package/src/components/actionSendToBot.vue +62 -62
  29. package/src/components/answerDissatisfaction.vue +62 -62
  30. package/src/components/answerRadio.vue +76 -76
  31. package/src/components/ask-components/DissatisfactionOptions.vue +57 -57
  32. package/src/components/ask-components/Msgloading.vue +37 -37
  33. package/src/components/ask-components/SatisfactionV2.vue +15 -15
  34. package/src/components/askVideo.vue +138 -138
  35. package/src/components/assetDetails.vue +370 -370
  36. package/src/components/assetMessage.vue +228 -228
  37. package/src/components/associationIntention.vue +323 -323
  38. package/src/components/attachmentPreview.vue +90 -90
  39. package/src/components/botActionSatisfactor.vue +68 -68
  40. package/src/components/chatContent.vue +513 -513
  41. package/src/components/feedBack.vue +136 -136
  42. package/src/components/fielListView.vue +344 -344
  43. package/src/components/file/AliyunOssComponents.vue +108 -108
  44. package/src/components/formTemplate.vue +3363 -3363
  45. package/src/components/loadingProcess.vue +164 -164
  46. package/src/components/message/ActionAlertIframe.vue +112 -112
  47. package/src/components/message/ShopMessage.vue +164 -164
  48. package/src/components/message/TextMessage.vue +924 -924
  49. package/src/components/message/TicketMessage.vue +177 -177
  50. package/src/components/message/swiper/index.js +4 -4
  51. package/src/components/message/swiper/ticketSwiper.vue +503 -503
  52. package/src/components/message/swiper/ticketSwiperItem.vue +61 -61
  53. package/src/components/msgLoading.vue +231 -231
  54. package/src/components/myPopup.vue +70 -70
  55. package/src/components/popup.vue +227 -227
  56. package/src/components/previewDoc.vue +108 -112
  57. package/src/components/previewPdf.vue +205 -205
  58. package/src/components/receiverMessagePlatform.vue +65 -65
  59. package/src/components/recommend.vue +89 -89
  60. package/src/components/selector/hOption.vue +20 -20
  61. package/src/components/selector/hSelector.vue +199 -199
  62. package/src/components/selector/hWrapper.vue +216 -216
  63. package/src/components/senderMessagePlatform.vue +50 -50
  64. package/src/components/source/BotMessage.vue +24 -24
  65. package/src/components/source/CustomMessage.vue +24 -24
  66. package/src/components/test.vue +260 -260
  67. package/src/components/tree.vue +294 -294
  68. package/src/components/utils/AliyunIssUtil.js +72 -72
  69. package/src/components/utils/ckeditor.js +155 -155
  70. package/src/components/utils/ckeditorImageUpload/command.js +109 -109
  71. package/src/components/utils/ckeditorImageUpload/editing.js +11 -11
  72. package/src/components/utils/ckeditorImageUpload/plugin-image.js +11 -11
  73. package/src/components/utils/ckeditorImageUpload/toolbar-ui.js +40 -40
  74. package/src/components/utils/ckeditorfileUpload/common.js +111 -111
  75. package/src/components/utils/ckeditorfileUpload/editing.js +11 -11
  76. package/src/components/utils/ckeditorfileUpload/plugin_file.js +11 -11
  77. package/src/components/utils/ckeditorfileUpload/toolbar_ui.js +34 -34
  78. package/src/components/utils/format_date.js +25 -25
  79. package/src/components/utils/index.js +6 -6
  80. package/src/components/utils/math_utils.js +29 -29
  81. package/src/components/voiceComponent.vue +119 -119
  82. package/src/main.js +60 -60
  83. package/vue.config.js +55 -55
@@ -0,0 +1,256 @@
1
+ <template>
2
+ <div class="answer-voice">
3
+ <audio :id="'audioTagCom_' + msg.id" :src="msg.content.url"></audio>
4
+ <div class="audiocon">
5
+ <!-- 按钮 -->
6
+ <div class="leftBtn">
7
+ <span v-show="!isPlay" @click="bofang"><i class="iconfont guoran-bofang"></i></span>
8
+ <span v-show="isPlay" @click="bofang"><i class="iconfont guoran-zanting"></i></span>
9
+ </div>
10
+ <div class="adcon">
11
+ <!-- <div class="time">
12
+ <span>{{ time }}</span>
13
+ </div> -->
14
+ <div class="bar">
15
+ <div class="activeLine" @click="seekTime">
16
+ <div :style="{ width: currentPosi + '%' }" class="dot"></div>
17
+ </div>
18
+ </div>
19
+ <div class="time">
20
+ <span>{{ otherTime }}</span>
21
+ </div>
22
+ <!-- <div class="time">
23
+ <span>{{ allTime }}</span>
24
+ </div> -->
25
+ </div>
26
+ </div>
27
+ </div>
28
+ </template>
29
+ <script>
30
+
31
+ export default {
32
+ name: "answer_voice",
33
+ props: ["msg"],
34
+ data() {
35
+ return {
36
+ active: 0,
37
+ time: 0,
38
+ activeAudio: "",
39
+ isPlay: false,
40
+ currentPosi: 0,
41
+ allTime: 0,
42
+ otherTime: 0,
43
+ durationNum: 0,
44
+ }
45
+ },
46
+ watch: {
47
+ },
48
+ computed: {
49
+
50
+ },
51
+ mounted() {
52
+ console.log(120);
53
+ this.$nextTick(() => {
54
+ setTimeout(() => {
55
+ console.log(this._$(`#audioTagCom_${this.msg.id}`)[0]);
56
+ this.activeAudio = this._$(`#audioTagCom_${this.msg.id}`)[0];
57
+ this.time = "00:00";
58
+ this.otherTime = this.transTime(this.activeAudio.duration);
59
+ this.durationNum = this.activeAudio.duration;
60
+ console.log(this.activeAudio.duration);
61
+ this.allTime = this.transTime(this.activeAudio.duration);
62
+ this._$(`#audioTagCom_${this.msg.id}`).on("loadedmetadata", (e) => {
63
+ console.log(e.currentTarget);
64
+ this.time = "00:00";
65
+ console.log(e.currentTarget.duration);
66
+ this.allTime = this.transTime(e.currentTarget.duration);
67
+ this.durationNum = e.currentTarget.duration;
68
+ this.otherTime = this.transTime(this.activeAudio.duration);
69
+ // this.activeAudio.play();
70
+ // this.isPlay = true;
71
+ });
72
+
73
+ document.addEventListener(
74
+ "WeixinJSBridgeReady",
75
+ function () {
76
+ this.activeAudio.play();
77
+ },
78
+ false
79
+ );
80
+
81
+ this._$(`#audioTagCom_${this.msg.id}`).on("timeupdate", () => {
82
+ this.updateProgress();
83
+ });
84
+
85
+ this._$(`#audioTagCom_${this.msg.id}`).on("timeupdate", () => {
86
+ this.updateProgress();
87
+ });
88
+
89
+ this._$(`#audioTagCom_${this.msg.id}`).on("ended", () => {
90
+ this.audioEnded();
91
+ });
92
+ }, 500);
93
+
94
+ });
95
+ },
96
+ methods: {
97
+ bofang() {
98
+ if (this.activeAudio.paused) {
99
+ this.activeAudio.play();
100
+ this.isPlay = true;
101
+ } else {
102
+ this.activeAudio.pause();
103
+ this.isPlay = false;
104
+ }
105
+
106
+ },
107
+ transTime(time) {
108
+ var duration = parseInt(time);
109
+ var minute = parseInt(duration / 60);
110
+ var sec = (duration % 60) + "";
111
+ var isM0 = ":";
112
+ if (minute == 0) {
113
+ minute = "00";
114
+ } else if (minute < 10) {
115
+ minute = "0" + minute;
116
+ }
117
+ if (sec.length == 1) {
118
+ sec = "0" + sec;
119
+ }
120
+ return minute + isM0 + sec;
121
+ },
122
+ transOtherTime(time) {
123
+ var duration = parseInt(time);
124
+ var minute = parseInt((parseInt(this.durationNum) - duration) / 60);
125
+ var sec = ((parseInt(this.durationNum) - duration) % 60) + "";
126
+ var isM0 = ":";
127
+ if (minute == 0) {
128
+ minute = "00";
129
+ } else if (minute < 10) {
130
+ minute = "0" + minute;
131
+ }
132
+ if (sec.length == 1) {
133
+ sec = "0" + sec;
134
+ }
135
+ return minute + isM0 + sec;
136
+ },
137
+ updateProgress() {
138
+ this.currentPosi = (this.activeAudio.currentTime / this.activeAudio.duration) * 100;
139
+ this.time = this.transTime(this.activeAudio.currentTime);
140
+ this.otherTime = this.transOtherTime(this.activeAudio.currentTime);
141
+ },
142
+
143
+ audioEnded() {
144
+ this.activeAudio.currentTime = 0;
145
+ this.activeAudio.pause();
146
+ this.isPlay = false;
147
+ },
148
+
149
+ seekTime(e) {
150
+ var rate = e.offsetX / e.target.clientWidth;
151
+ this.activeAudio.currentTime = this.activeAudio.duration * rate;
152
+ this.updateProgress();
153
+ },
154
+
155
+ }
156
+
157
+ }
158
+ </script>
159
+ <style scoped lang="less">
160
+ .answer-voice {
161
+ padding: 4px 0;
162
+
163
+ .audiocon {
164
+ display: flex;
165
+ align-items: center;
166
+ width: 100%;
167
+ height: 30px;
168
+ justify-content: space-between;
169
+ }
170
+
171
+ .leftBtn {
172
+ width: 30px;
173
+
174
+ span {
175
+ i {
176
+ font-size: 28px;
177
+ color: #ADC0F6;
178
+ line-height: 32px;
179
+ }
180
+ }
181
+ }
182
+
183
+ .adcon {
184
+ position: relative;
185
+ z-index: 10;
186
+ width: calc(100% - 40px);
187
+ height: 30px;
188
+ display: flex;
189
+ align-items: center;
190
+ margin-left: 16px;
191
+
192
+ .bar {
193
+ width: calc(100% - 20px);
194
+ position: relative;
195
+ height: 30px;
196
+ display: flex;
197
+ align-items: center;
198
+
199
+ .activeLine {
200
+ position: absolute;
201
+ top: 0;
202
+ left: 0px;
203
+ z-index: 10;
204
+ width: 98%;
205
+ height: 30px;
206
+ cursor: pointer;
207
+
208
+ &::before {
209
+ content: "";
210
+ position: absolute;
211
+ width: 100%;
212
+ height: 4px;
213
+ top: 50%;
214
+ left: 0;
215
+ transform: translateY(-50%);
216
+ border-radius: 4px;
217
+
218
+ background-color: #D5DDEC;
219
+ }
220
+ }
221
+
222
+ .dot {
223
+ border-radius: 4px;
224
+ z-index: 11;
225
+ pointer-events: none;
226
+ position: absolute;
227
+ height: 4px;
228
+ top: 50%;
229
+ left: 0px;
230
+ transform: translateY(-50%);
231
+ background-color: #366AFF;
232
+
233
+ &::before {
234
+ content: "";
235
+ position: absolute;
236
+ top: -4px;
237
+ right: -3px;
238
+ width: 5px;
239
+ height: 5px;
240
+ border-radius: 50%;
241
+ background-color: white;
242
+ border: solid 4px #366AFF;
243
+ }
244
+ }
245
+ }
246
+
247
+ .time {
248
+ width: 58px;
249
+ font-size: 14px;
250
+ color: #222222;
251
+ font-weight: 500;
252
+ display: flex;
253
+ }
254
+ }
255
+ }
256
+ </style>
@@ -1,16 +1,16 @@
1
- <template>
2
-
3
- </template>
4
-
5
- <script>
6
- export default {
7
- name: "AskIFrame",
8
- props:{
9
-
10
- }
11
- }
12
- </script>
13
-
14
- <style scoped>
15
-
1
+ <template>
2
+
3
+ </template>
4
+
5
+ <script>
6
+ export default {
7
+ name: "AskIFrame",
8
+ props:{
9
+
10
+ }
11
+ }
12
+ </script>
13
+
14
+ <style scoped>
15
+
16
16
  </style>