askbot-dragon 1.4.63 → 1.4.65

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 +89 -89
  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 +472 -472
  23. package/src/components/AnswerVoice.vue +285 -285
  24. package/src/components/AskIFrame.vue +15 -15
  25. package/src/components/ConversationContainer.vue +4287 -4287
  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 +131 -131
  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 +347 -347
  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 +3464 -3400
  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 +1106 -1106
  57. package/src/components/popup.vue +227 -227
  58. package/src/components/previewDoc.vue +228 -228
  59. package/src/components/previewPdf.vue +289 -289
  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 -133
  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,285 +1,285 @@
1
- <template>
2
- <div :style="{ width: boxWidth + 'px' }" class="answer-voice">
3
- <audio :id="'audioTagCom_' + newMsg.content.extInfos[0].newAvCurrentTime" :src="newMsg.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
- import { v4 as uuidv4 } from "uuid";
32
- export default {
33
- name: "answer_voice",
34
- props: ["msg"],
35
- data() {
36
- return {
37
- active: 0,
38
- time: 0,
39
- activeAudio: "",
40
- isPlay: false,
41
- currentPosi: 0,
42
- allTime: 0,
43
- otherTime: 0,
44
- durationNum: 0,
45
- boxWidth: 200
46
- }
47
- },
48
- watch: {
49
- },
50
- computed: {
51
- newMsg(){
52
- let oldMsg = JSON.parse(JSON.stringify(this.msg));
53
- oldMsg.content.extInfos[0].newAvCurrentTime = uuidv4();
54
- return oldMsg;
55
- }
56
- },
57
- mounted() {
58
- console.log(120,this.newMsg);
59
- this.$nextTick(() => {
60
- setTimeout(() => {
61
- console.log(this._$(`#audioTagCom_${this.newMsg.content.extInfos[0].newAvCurrentTime}`)[0]);
62
- this.activeAudio = this._$(`#audioTagCom_${this.newMsg.content.extInfos[0].newAvCurrentTime}`)[0];
63
- this.time = "00:00";
64
- load(this.newMsg.content.url).then(res =>{
65
- this.otherTime = this.transTime(res.duration);
66
- this.durationNum = res.duration;
67
- console.log(res.duration);
68
- this.allTime = this.transTime(res.duration);
69
- if (res.duration >= 60) {
70
- this.boxWidth = 240;
71
- } else {
72
- this.boxWidth = 160 + res.duration;
73
- }
74
- })
75
- this._$(`#audioTagCom_${this.newMsg.content.extInfos[0].newAvCurrentTime}`).on("loadedmetadata", (e) => {
76
- console.log(e.currentTarget);
77
- this.time = "00:00";
78
- console.log(e.currentTarget.duration);
79
- this.allTime = this.transTime(e.currentTarget.duration);
80
- if (this.activeAudio.duration >= 60) {
81
- this.boxWidth = 240;
82
- } else {
83
- this.boxWidth = 160 + this.activeAudio.duration;
84
- }
85
- this.durationNum = e.currentTarget.duration;
86
- this.otherTime = this.transTime(this.activeAudio.duration);
87
- // this.activeAudio.play();
88
- // this.isPlay = true;
89
- });
90
-
91
- document.addEventListener(
92
- "WeixinJSBridgeReady",
93
- function () {
94
- this.activeAudio.play();
95
- },
96
- false
97
- );
98
-
99
- this._$(`#audioTagCom_${this.newMsg.content.extInfos[0].newAvCurrentTime}`).on("timeupdate", () => {
100
- this.updateProgress();
101
- });
102
-
103
- this._$(`#audioTagCom_${this.newMsg.content.extInfos[0].newAvCurrentTime}`).on("timeupdate", () => {
104
- this.updateProgress();
105
- });
106
-
107
- this._$(`#audioTagCom_${this.newMsg.content.extInfos[0].newAvCurrentTime}`).on("ended", () => {
108
- this.audioEnded();
109
- });
110
- }, 500);
111
-
112
- });
113
- },
114
- methods: {
115
- stopAudioPlay(refId){
116
- console.log("stop ", refId, this.newMsg.content.extInfos[0].newAvCurrentTime);
117
- if (refId != this.newMsg.content.extInfos[0].newAvCurrentTime) {
118
- this.activeAudio.pause();
119
- this.isPlay = false;
120
- }
121
- },
122
- bofang() {
123
- if (this.activeAudio.paused) {
124
- this.activeAudio.play();
125
- this.isPlay = true;
126
- this.$emit("stopOtherAudio", this.newMsg.content.extInfos[0].newAvCurrentTime);
127
- } else {
128
- this.activeAudio.pause();
129
- this.isPlay = false;
130
- }
131
-
132
- },
133
- transTime(time) {
134
- var duration = parseInt(time);
135
- var minute = parseInt(duration / 60);
136
- var sec = (duration % 60) + "";
137
- var isM0 = ":";
138
- if (minute == 0) {
139
- minute = "00";
140
- } else if (minute < 10) {
141
- minute = "0" + minute;
142
- }
143
- if (sec.length == 1) {
144
- sec = "0" + sec;
145
- }
146
- return minute + isM0 + sec;
147
- },
148
- transOtherTime(time) {
149
- var duration = parseInt(time);
150
- var minute = parseInt((parseInt(this.durationNum) - duration) / 60);
151
- var sec = ((parseInt(this.durationNum) - duration) % 60) + "";
152
- var isM0 = ":";
153
- if (minute == 0) {
154
- minute = "00";
155
- } else if (minute < 10) {
156
- minute = "0" + minute;
157
- }
158
- if (sec.length == 1) {
159
- sec = "0" + sec;
160
- }
161
- return minute + isM0 + sec;
162
- },
163
- updateProgress() {
164
- this.currentPosi = (this.activeAudio.currentTime / this.activeAudio.duration) * 100;
165
- this.time = this.transTime(this.activeAudio.currentTime);
166
- this.otherTime = this.transOtherTime(this.activeAudio.currentTime);
167
- },
168
-
169
- audioEnded() {
170
- this.activeAudio.currentTime = 0;
171
- this.activeAudio.pause();
172
- this.isPlay = false;
173
- },
174
-
175
- seekTime(e) {
176
- var rate = e.offsetX / e.target.clientWidth;
177
- this.activeAudio.currentTime = this.activeAudio.duration * rate;
178
- this.updateProgress();
179
- },
180
-
181
- }
182
-
183
- }
184
- </script>
185
- <style scoped lang="less">
186
- .answer-voice {
187
- width: 100%;
188
- padding: 4px 0;
189
- // min-width: 240px;
190
-
191
- .audiocon {
192
- display: flex;
193
- align-items: center;
194
- width: 100%;
195
- height: 30px;
196
- justify-content: space-between;
197
- }
198
-
199
- .leftBtn {
200
- width: 30px;
201
-
202
- span {
203
- i {
204
- font-size: 28px;
205
- color: #ADC0F6;
206
- line-height: 32px;
207
- }
208
- }
209
- }
210
-
211
- .adcon {
212
- position: relative;
213
- z-index: 10;
214
- width: calc(100% - 40px);
215
- height: 30px;
216
- display: flex;
217
- align-items: center;
218
- margin-left: 16px;
219
-
220
- .bar {
221
- width: calc(100% - 20px);
222
- position: relative;
223
- height: 30px;
224
- display: flex;
225
- align-items: center;
226
-
227
- .activeLine {
228
- position: absolute;
229
- top: 0;
230
- left: 0px;
231
- z-index: 10;
232
- width: 98%;
233
- height: 30px;
234
- cursor: pointer;
235
-
236
- &::before {
237
- content: "";
238
- position: absolute;
239
- width: 100%;
240
- height: 4px;
241
- top: 50%;
242
- left: 0;
243
- transform: translateY(-50%);
244
- border-radius: 4px;
245
-
246
- background-color: #D5DDEC;
247
- }
248
- }
249
-
250
- .dot {
251
- border-radius: 4px;
252
- z-index: 11;
253
- pointer-events: none;
254
- position: absolute;
255
- height: 4px;
256
- top: 50%;
257
- left: 0px;
258
- transform: translateY(-50%);
259
- background-color: #366AFF;
260
-
261
- &::before {
262
- content: "";
263
- position: absolute;
264
- top: -4px;
265
- right: -6px;
266
- width: 5px;
267
- height: 5px;
268
- border-radius: 50%;
269
- background-color: white;
270
- border: solid 4px #366AFF;
271
- }
272
- }
273
- }
274
-
275
- .time {
276
- width: 58px;
277
- font-size: 14px;
278
- color: #222222;
279
- font-weight: 500;
280
- display: flex;
281
- margin-left: 10px;
282
- }
283
- }
284
- }
285
- </style>
1
+ <template>
2
+ <div :style="{ width: boxWidth + 'px' }" class="answer-voice">
3
+ <audio :id="'audioTagCom_' + newMsg.content.extInfos[0].newAvCurrentTime" :src="newMsg.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
+ import { v4 as uuidv4 } from "uuid";
32
+ export default {
33
+ name: "answer_voice",
34
+ props: ["msg"],
35
+ data() {
36
+ return {
37
+ active: 0,
38
+ time: 0,
39
+ activeAudio: "",
40
+ isPlay: false,
41
+ currentPosi: 0,
42
+ allTime: 0,
43
+ otherTime: 0,
44
+ durationNum: 0,
45
+ boxWidth: 200
46
+ }
47
+ },
48
+ watch: {
49
+ },
50
+ computed: {
51
+ newMsg(){
52
+ let oldMsg = JSON.parse(JSON.stringify(this.msg));
53
+ oldMsg.content.extInfos[0].newAvCurrentTime = uuidv4();
54
+ return oldMsg;
55
+ }
56
+ },
57
+ mounted() {
58
+ console.log(120,this.newMsg);
59
+ this.$nextTick(() => {
60
+ setTimeout(() => {
61
+ console.log(this._$(`#audioTagCom_${this.newMsg.content.extInfos[0].newAvCurrentTime}`)[0]);
62
+ this.activeAudio = this._$(`#audioTagCom_${this.newMsg.content.extInfos[0].newAvCurrentTime}`)[0];
63
+ this.time = "00:00";
64
+ load(this.newMsg.content.url).then(res =>{
65
+ this.otherTime = this.transTime(res.duration);
66
+ this.durationNum = res.duration;
67
+ console.log(res.duration);
68
+ this.allTime = this.transTime(res.duration);
69
+ if (res.duration >= 60) {
70
+ this.boxWidth = 240;
71
+ } else {
72
+ this.boxWidth = 160 + res.duration;
73
+ }
74
+ })
75
+ this._$(`#audioTagCom_${this.newMsg.content.extInfos[0].newAvCurrentTime}`).on("loadedmetadata", (e) => {
76
+ console.log(e.currentTarget);
77
+ this.time = "00:00";
78
+ console.log(e.currentTarget.duration);
79
+ this.allTime = this.transTime(e.currentTarget.duration);
80
+ if (this.activeAudio.duration >= 60) {
81
+ this.boxWidth = 240;
82
+ } else {
83
+ this.boxWidth = 160 + this.activeAudio.duration;
84
+ }
85
+ this.durationNum = e.currentTarget.duration;
86
+ this.otherTime = this.transTime(this.activeAudio.duration);
87
+ // this.activeAudio.play();
88
+ // this.isPlay = true;
89
+ });
90
+
91
+ document.addEventListener(
92
+ "WeixinJSBridgeReady",
93
+ function () {
94
+ this.activeAudio.play();
95
+ },
96
+ false
97
+ );
98
+
99
+ this._$(`#audioTagCom_${this.newMsg.content.extInfos[0].newAvCurrentTime}`).on("timeupdate", () => {
100
+ this.updateProgress();
101
+ });
102
+
103
+ this._$(`#audioTagCom_${this.newMsg.content.extInfos[0].newAvCurrentTime}`).on("timeupdate", () => {
104
+ this.updateProgress();
105
+ });
106
+
107
+ this._$(`#audioTagCom_${this.newMsg.content.extInfos[0].newAvCurrentTime}`).on("ended", () => {
108
+ this.audioEnded();
109
+ });
110
+ }, 500);
111
+
112
+ });
113
+ },
114
+ methods: {
115
+ stopAudioPlay(refId){
116
+ console.log("stop ", refId, this.newMsg.content.extInfos[0].newAvCurrentTime);
117
+ if (refId != this.newMsg.content.extInfos[0].newAvCurrentTime) {
118
+ this.activeAudio.pause();
119
+ this.isPlay = false;
120
+ }
121
+ },
122
+ bofang() {
123
+ if (this.activeAudio.paused) {
124
+ this.activeAudio.play();
125
+ this.isPlay = true;
126
+ this.$emit("stopOtherAudio", this.newMsg.content.extInfos[0].newAvCurrentTime);
127
+ } else {
128
+ this.activeAudio.pause();
129
+ this.isPlay = false;
130
+ }
131
+
132
+ },
133
+ transTime(time) {
134
+ var duration = parseInt(time);
135
+ var minute = parseInt(duration / 60);
136
+ var sec = (duration % 60) + "";
137
+ var isM0 = ":";
138
+ if (minute == 0) {
139
+ minute = "00";
140
+ } else if (minute < 10) {
141
+ minute = "0" + minute;
142
+ }
143
+ if (sec.length == 1) {
144
+ sec = "0" + sec;
145
+ }
146
+ return minute + isM0 + sec;
147
+ },
148
+ transOtherTime(time) {
149
+ var duration = parseInt(time);
150
+ var minute = parseInt((parseInt(this.durationNum) - duration) / 60);
151
+ var sec = ((parseInt(this.durationNum) - duration) % 60) + "";
152
+ var isM0 = ":";
153
+ if (minute == 0) {
154
+ minute = "00";
155
+ } else if (minute < 10) {
156
+ minute = "0" + minute;
157
+ }
158
+ if (sec.length == 1) {
159
+ sec = "0" + sec;
160
+ }
161
+ return minute + isM0 + sec;
162
+ },
163
+ updateProgress() {
164
+ this.currentPosi = (this.activeAudio.currentTime / this.activeAudio.duration) * 100;
165
+ this.time = this.transTime(this.activeAudio.currentTime);
166
+ this.otherTime = this.transOtherTime(this.activeAudio.currentTime);
167
+ },
168
+
169
+ audioEnded() {
170
+ this.activeAudio.currentTime = 0;
171
+ this.activeAudio.pause();
172
+ this.isPlay = false;
173
+ },
174
+
175
+ seekTime(e) {
176
+ var rate = e.offsetX / e.target.clientWidth;
177
+ this.activeAudio.currentTime = this.activeAudio.duration * rate;
178
+ this.updateProgress();
179
+ },
180
+
181
+ }
182
+
183
+ }
184
+ </script>
185
+ <style scoped lang="less">
186
+ .answer-voice {
187
+ width: 100%;
188
+ padding: 4px 0;
189
+ // min-width: 240px;
190
+
191
+ .audiocon {
192
+ display: flex;
193
+ align-items: center;
194
+ width: 100%;
195
+ height: 30px;
196
+ justify-content: space-between;
197
+ }
198
+
199
+ .leftBtn {
200
+ width: 30px;
201
+
202
+ span {
203
+ i {
204
+ font-size: 28px;
205
+ color: #ADC0F6;
206
+ line-height: 32px;
207
+ }
208
+ }
209
+ }
210
+
211
+ .adcon {
212
+ position: relative;
213
+ z-index: 10;
214
+ width: calc(100% - 40px);
215
+ height: 30px;
216
+ display: flex;
217
+ align-items: center;
218
+ margin-left: 16px;
219
+
220
+ .bar {
221
+ width: calc(100% - 20px);
222
+ position: relative;
223
+ height: 30px;
224
+ display: flex;
225
+ align-items: center;
226
+
227
+ .activeLine {
228
+ position: absolute;
229
+ top: 0;
230
+ left: 0px;
231
+ z-index: 10;
232
+ width: 98%;
233
+ height: 30px;
234
+ cursor: pointer;
235
+
236
+ &::before {
237
+ content: "";
238
+ position: absolute;
239
+ width: 100%;
240
+ height: 4px;
241
+ top: 50%;
242
+ left: 0;
243
+ transform: translateY(-50%);
244
+ border-radius: 4px;
245
+
246
+ background-color: #D5DDEC;
247
+ }
248
+ }
249
+
250
+ .dot {
251
+ border-radius: 4px;
252
+ z-index: 11;
253
+ pointer-events: none;
254
+ position: absolute;
255
+ height: 4px;
256
+ top: 50%;
257
+ left: 0px;
258
+ transform: translateY(-50%);
259
+ background-color: #366AFF;
260
+
261
+ &::before {
262
+ content: "";
263
+ position: absolute;
264
+ top: -4px;
265
+ right: -6px;
266
+ width: 5px;
267
+ height: 5px;
268
+ border-radius: 50%;
269
+ background-color: white;
270
+ border: solid 4px #366AFF;
271
+ }
272
+ }
273
+ }
274
+
275
+ .time {
276
+ width: 58px;
277
+ font-size: 14px;
278
+ color: #222222;
279
+ font-weight: 500;
280
+ display: flex;
281
+ margin-left: 10px;
282
+ }
283
+ }
284
+ }
285
+ </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>