askbot-dragon 1.3.16 → 1.3.18

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 +363 -363
  22. package/src/components/AskIFrame.vue +15 -15
  23. package/src/components/ConversationContainer.vue +4011 -4024
  24. package/src/components/FileType.vue +86 -86
  25. package/src/components/Message.vue +27 -27
  26. package/src/components/actionSatisfaction.vue +107 -107
  27. package/src/components/actionSendToBot.vue +62 -62
  28. package/src/components/answerDissatisfaction.vue +62 -62
  29. package/src/components/answerRadio.vue +76 -76
  30. package/src/components/ask-components/DissatisfactionOptions.vue +57 -57
  31. package/src/components/ask-components/Msgloading.vue +37 -37
  32. package/src/components/ask-components/SatisfactionV2.vue +15 -15
  33. package/src/components/askVideo.vue +138 -138
  34. package/src/components/assetDetails.vue +370 -370
  35. package/src/components/assetMessage.vue +228 -228
  36. package/src/components/associationIntention.vue +328 -325
  37. package/src/components/attachmentPreview.vue +90 -90
  38. package/src/components/botActionSatisfactor.vue +68 -68
  39. package/src/components/chatContent.vue +513 -513
  40. package/src/components/feedBack.vue +136 -136
  41. package/src/components/fielListView.vue +347 -347
  42. package/src/components/file/AliyunOssComponents.vue +108 -108
  43. package/src/components/formTemplate.vue +3363 -3363
  44. package/src/components/loadingProcess.vue +164 -164
  45. package/src/components/message/ActionAlertIframe.vue +112 -112
  46. package/src/components/message/ShopMessage.vue +164 -164
  47. package/src/components/message/TextMessage.vue +924 -924
  48. package/src/components/message/TicketMessage.vue +177 -177
  49. package/src/components/message/swiper/index.js +4 -4
  50. package/src/components/message/swiper/ticketSwiper.vue +503 -503
  51. package/src/components/message/swiper/ticketSwiperItem.vue +61 -61
  52. package/src/components/msgLoading.vue +231 -231
  53. package/src/components/myPopup.vue +70 -70
  54. package/src/components/popup.vue +227 -227
  55. package/src/components/previewDoc.vue +112 -112
  56. package/src/components/previewPdf.vue +205 -205
  57. package/src/components/receiverMessagePlatform.vue +65 -65
  58. package/src/components/recommend.vue +89 -89
  59. package/src/components/selector/hOption.vue +20 -20
  60. package/src/components/selector/hSelector.vue +199 -199
  61. package/src/components/selector/hWrapper.vue +216 -216
  62. package/src/components/senderMessagePlatform.vue +50 -50
  63. package/src/components/source/BotMessage.vue +24 -24
  64. package/src/components/source/CustomMessage.vue +24 -24
  65. package/src/components/test.vue +260 -260
  66. package/src/components/tree.vue +294 -294
  67. package/src/components/utils/AliyunIssUtil.js +72 -72
  68. package/src/components/utils/ckeditor.js +155 -155
  69. package/src/components/utils/ckeditorImageUpload/command.js +109 -109
  70. package/src/components/utils/ckeditorImageUpload/editing.js +11 -11
  71. package/src/components/utils/ckeditorImageUpload/plugin-image.js +11 -11
  72. package/src/components/utils/ckeditorImageUpload/toolbar-ui.js +40 -40
  73. package/src/components/utils/ckeditorfileUpload/common.js +111 -111
  74. package/src/components/utils/ckeditorfileUpload/editing.js +11 -11
  75. package/src/components/utils/ckeditorfileUpload/plugin_file.js +11 -11
  76. package/src/components/utils/ckeditorfileUpload/toolbar_ui.js +34 -34
  77. package/src/components/utils/format_date.js +25 -25
  78. package/src/components/utils/index.js +6 -6
  79. package/src/components/utils/math_utils.js +29 -29
  80. package/src/components/voiceComponent.vue +119 -119
  81. package/src/main.js +60 -60
  82. package/vue.config.js +55 -55
  83. package/src/components/AnswerVoice.vue +0 -270
package/vue.config.js CHANGED
@@ -1,56 +1,56 @@
1
- const webpack = require('webpack')
2
-
3
-
4
- module.exports = {
5
- // 修改的配置
6
- // 将baseUrl: '/api',改为baseUrl: '/',
7
- devServer: {
8
- port: '8081', // 指定打开浏览器的端口号
9
- proxy: {
10
- '/api/': {
11
- // target: 'http://test.open.abitai.com:9001',
12
- target: 'http://test.open.askbot.cn:32001',
13
- changeOrigin: true,
14
- ws: true,
15
- pathRewrite: {
16
- '^/api': '/'
17
- }
18
- },
19
- '/open/': {
20
- target: 'http://new-test.guoranbot.com:32001',
21
- changeOrigin: true,
22
- pathRewrite: {
23
- '^/open': '/'
24
- }
25
- },
26
- '/order-api': {
27
- target: 'http://master.test.askbot.cn:32022',
28
- /*target:'http://new-test.guoranbot.com:30672',*/
29
- changeOrigin: true,
30
- ws: true,
31
- pathRewrite: {
32
- '^/order-api': '/'
33
- }
34
- },
35
- '/knowledge-api/': {
36
- target: 'http://master.test.askbot.cn:30202',
37
- changeOrigin: true,
38
- ws: true,
39
- pathRewrite: {
40
- '^/knowledge-api': '/'
41
- }
42
- },
43
- },
44
- },
45
- configureWebpack: {
46
- externals: {
47
- // 'vue': 'Vue',
48
- // 属性名称 element-ui, 表示遇到 import xxx from 'element-ui' 这类引入 'element-ui'的,
49
- // 不去 node_modules 中找,而是去找 全局变量 ELEMENT
50
- // 'element-ui': 'ELEMENT',
51
- // 'vant': 'Vant',
52
- 'ckeditor': 'CKEDITOR',
53
- },
54
- },
55
-
1
+ const webpack = require('webpack')
2
+
3
+
4
+ module.exports = {
5
+ // 修改的配置
6
+ // 将baseUrl: '/api',改为baseUrl: '/',
7
+ devServer: {
8
+ port: '8081', // 指定打开浏览器的端口号
9
+ proxy: {
10
+ '/api/': {
11
+ // target: 'http://test.open.abitai.com:9001',
12
+ target: 'http://test.open.askbot.cn:32001',
13
+ changeOrigin: true,
14
+ ws: true,
15
+ pathRewrite: {
16
+ '^/api': '/'
17
+ }
18
+ },
19
+ '/open/': {
20
+ target: 'http://new-test.guoranbot.com:32001',
21
+ changeOrigin: true,
22
+ pathRewrite: {
23
+ '^/open': '/'
24
+ }
25
+ },
26
+ '/order-api': {
27
+ target: 'http://master.test.askbot.cn:32022',
28
+ /*target:'http://new-test.guoranbot.com:30672',*/
29
+ changeOrigin: true,
30
+ ws: true,
31
+ pathRewrite: {
32
+ '^/order-api': '/'
33
+ }
34
+ },
35
+ '/knowledge-api/': {
36
+ target: 'http://master.test.askbot.cn:30202',
37
+ changeOrigin: true,
38
+ ws: true,
39
+ pathRewrite: {
40
+ '^/knowledge-api': '/'
41
+ }
42
+ },
43
+ },
44
+ },
45
+ configureWebpack: {
46
+ externals: {
47
+ // 'vue': 'Vue',
48
+ // 属性名称 element-ui, 表示遇到 import xxx from 'element-ui' 这类引入 'element-ui'的,
49
+ // 不去 node_modules 中找,而是去找 全局变量 ELEMENT
50
+ // 'element-ui': 'ELEMENT',
51
+ // 'vant': 'Vant',
52
+ 'ckeditor': 'CKEDITOR',
53
+ },
54
+ },
55
+
56
56
  };
@@ -1,270 +0,0 @@
1
- <template>
2
- <div :style="{ width: boxWidth + 'px' }" 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
- 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.id}`)[0]);
57
- this.activeAudio = this._$(`#audioTagCom_${this.msg.id}`)[0];
58
- this.time = "00:00";
59
- this.otherTime = this.transTime(this.activeAudio.duration);
60
- this.durationNum = this.activeAudio.duration;
61
- console.log(this.activeAudio.duration);
62
- this.allTime = this.transTime(this.activeAudio.duration);
63
- if (this.activeAudio.duration >= 60) {
64
- this.boxWidth = 240;
65
- } else {
66
- this.boxWidth = 160 + this.activeAudio.duration;
67
- }
68
- this._$(`#audioTagCom_${this.msg.id}`).on("loadedmetadata", (e) => {
69
- console.log(e.currentTarget);
70
- this.time = "00:00";
71
- console.log(e.currentTarget.duration);
72
- this.allTime = this.transTime(e.currentTarget.duration);
73
- if (this.activeAudio.duration >= 60) {
74
- this.boxWidth = 240;
75
- } else {
76
- this.boxWidth = 160 + this.activeAudio.duration;
77
- }
78
- this.durationNum = e.currentTarget.duration;
79
- this.otherTime = this.transTime(this.activeAudio.duration);
80
- // this.activeAudio.play();
81
- // this.isPlay = true;
82
- });
83
-
84
- document.addEventListener(
85
- "WeixinJSBridgeReady",
86
- function () {
87
- this.activeAudio.play();
88
- },
89
- false
90
- );
91
-
92
- this._$(`#audioTagCom_${this.msg.id}`).on("timeupdate", () => {
93
- this.updateProgress();
94
- });
95
-
96
- this._$(`#audioTagCom_${this.msg.id}`).on("timeupdate", () => {
97
- this.updateProgress();
98
- });
99
-
100
- this._$(`#audioTagCom_${this.msg.id}`).on("ended", () => {
101
- this.audioEnded();
102
- });
103
- }, 500);
104
-
105
- });
106
- },
107
- methods: {
108
- bofang() {
109
- if (this.activeAudio.paused) {
110
- this.activeAudio.play();
111
- this.isPlay = true;
112
- } else {
113
- this.activeAudio.pause();
114
- this.isPlay = false;
115
- }
116
-
117
- },
118
- transTime(time) {
119
- var duration = parseInt(time);
120
- var minute = parseInt(duration / 60);
121
- var sec = (duration % 60) + "";
122
- var isM0 = ":";
123
- if (minute == 0) {
124
- minute = "00";
125
- } else if (minute < 10) {
126
- minute = "0" + minute;
127
- }
128
- if (sec.length == 1) {
129
- sec = "0" + sec;
130
- }
131
- return minute + isM0 + sec;
132
- },
133
- transOtherTime(time) {
134
- var duration = parseInt(time);
135
- var minute = parseInt((parseInt(this.durationNum) - duration) / 60);
136
- var sec = ((parseInt(this.durationNum) - 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
- updateProgress() {
149
- this.currentPosi = (this.activeAudio.currentTime / this.activeAudio.duration) * 100;
150
- this.time = this.transTime(this.activeAudio.currentTime);
151
- this.otherTime = this.transOtherTime(this.activeAudio.currentTime);
152
- },
153
-
154
- audioEnded() {
155
- this.activeAudio.currentTime = 0;
156
- this.activeAudio.pause();
157
- this.isPlay = false;
158
- },
159
-
160
- seekTime(e) {
161
- var rate = e.offsetX / e.target.clientWidth;
162
- this.activeAudio.currentTime = this.activeAudio.duration * rate;
163
- this.updateProgress();
164
- },
165
-
166
- }
167
-
168
- }
169
- </script>
170
- <style scoped lang="less">
171
- .answer-voice {
172
- width: 100%;
173
- padding: 4px 0;
174
- // min-width: 240px;
175
-
176
- .audiocon {
177
- display: flex;
178
- align-items: center;
179
- width: 100%;
180
- height: 30px;
181
- justify-content: space-between;
182
- }
183
-
184
- .leftBtn {
185
- width: 30px;
186
-
187
- span {
188
- i {
189
- font-size: 28px;
190
- color: #ADC0F6;
191
- line-height: 32px;
192
- }
193
- }
194
- }
195
-
196
- .adcon {
197
- position: relative;
198
- z-index: 10;
199
- width: calc(100% - 40px);
200
- height: 30px;
201
- display: flex;
202
- align-items: center;
203
- margin-left: 16px;
204
-
205
- .bar {
206
- width: calc(100% - 20px);
207
- position: relative;
208
- height: 30px;
209
- display: flex;
210
- align-items: center;
211
-
212
- .activeLine {
213
- position: absolute;
214
- top: 0;
215
- left: 0px;
216
- z-index: 10;
217
- width: 98%;
218
- height: 30px;
219
- cursor: pointer;
220
-
221
- &::before {
222
- content: "";
223
- position: absolute;
224
- width: 100%;
225
- height: 4px;
226
- top: 50%;
227
- left: 0;
228
- transform: translateY(-50%);
229
- border-radius: 4px;
230
-
231
- background-color: #D5DDEC;
232
- }
233
- }
234
-
235
- .dot {
236
- border-radius: 4px;
237
- z-index: 11;
238
- pointer-events: none;
239
- position: absolute;
240
- height: 4px;
241
- top: 50%;
242
- left: 0px;
243
- transform: translateY(-50%);
244
- background-color: #366AFF;
245
-
246
- &::before {
247
- content: "";
248
- position: absolute;
249
- top: -4px;
250
- right: -6px;
251
- width: 5px;
252
- height: 5px;
253
- border-radius: 50%;
254
- background-color: white;
255
- border: solid 4px #366AFF;
256
- }
257
- }
258
- }
259
-
260
- .time {
261
- width: 58px;
262
- font-size: 14px;
263
- color: #222222;
264
- font-weight: 500;
265
- display: flex;
266
- margin-left: 10px;
267
- }
268
- }
269
- }
270
- </style>