askbot-dragon 1.3.85 → 1.3.87

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