askbot-dragon 1.1.2 → 1.1.4

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 (80) 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/script.js +36 -36
  13. package/src/assets/less/common.css +6773 -6773
  14. package/src/assets/less/converSationContainer/common.less +191 -191
  15. package/src/assets/less/converSationContainer/converSatonContainer.less +493 -493
  16. package/src/assets/less/iconfont.css +37 -37
  17. package/src/assets/less/ticketMessage.less +211 -211
  18. package/src/components/ActionAlertIframe.vue +112 -112
  19. package/src/components/AiGuide.vue +467 -467
  20. package/src/components/AnswerDocknowledge.vue +213 -176
  21. package/src/components/AskIFrame.vue +15 -15
  22. package/src/components/ConversationContainer.vue +3996 -3996
  23. package/src/components/FileType.vue +86 -86
  24. package/src/components/Message.vue +27 -27
  25. package/src/components/actionSatisfaction.vue +107 -107
  26. package/src/components/actionSendToBot.vue +62 -62
  27. package/src/components/answerDissatisfaction.vue +62 -62
  28. package/src/components/answerRadio.vue +76 -76
  29. package/src/components/ask-components/DissatisfactionOptions.vue +57 -57
  30. package/src/components/ask-components/Msgloading.vue +37 -37
  31. package/src/components/ask-components/SatisfactionV2.vue +15 -15
  32. package/src/components/askVideo.vue +138 -138
  33. package/src/components/assetDetails.vue +370 -370
  34. package/src/components/assetMessage.vue +228 -228
  35. package/src/components/associationIntention.vue +299 -299
  36. package/src/components/attachmentPreview.vue +90 -90
  37. package/src/components/botActionSatisfactor.vue +68 -68
  38. package/src/components/chatContent.vue +513 -513
  39. package/src/components/feedBack.vue +136 -136
  40. package/src/components/fielListView.vue +312 -312
  41. package/src/components/file/AliyunOssComponents.vue +108 -108
  42. package/src/components/formTemplate.vue +3361 -3361
  43. package/src/components/loadingProcess.vue +164 -164
  44. package/src/components/message/ActionAlertIframe.vue +112 -112
  45. package/src/components/message/ShopMessage.vue +164 -164
  46. package/src/components/message/TextMessage.vue +924 -924
  47. package/src/components/message/TicketMessage.vue +177 -177
  48. package/src/components/message/swiper/index.js +4 -4
  49. package/src/components/message/swiper/ticketSwiper.vue +503 -503
  50. package/src/components/message/swiper/ticketSwiperItem.vue +61 -61
  51. package/src/components/msgLoading.vue +231 -231
  52. package/src/components/myPopup.vue +70 -70
  53. package/src/components/popup.vue +227 -227
  54. package/src/components/previewDoc.vue +85 -85
  55. package/src/components/receiverMessagePlatform.vue +65 -65
  56. package/src/components/recommend.vue +89 -89
  57. package/src/components/selector/hOption.vue +20 -20
  58. package/src/components/selector/hSelector.vue +199 -199
  59. package/src/components/selector/hWrapper.vue +216 -216
  60. package/src/components/senderMessagePlatform.vue +50 -50
  61. package/src/components/source/BotMessage.vue +24 -24
  62. package/src/components/source/CustomMessage.vue +24 -24
  63. package/src/components/test.vue +260 -260
  64. package/src/components/tree.vue +294 -294
  65. package/src/components/utils/AliyunIssUtil.js +72 -72
  66. package/src/components/utils/ckeditor.js +155 -155
  67. package/src/components/utils/ckeditorImageUpload/command.js +109 -109
  68. package/src/components/utils/ckeditorImageUpload/editing.js +11 -11
  69. package/src/components/utils/ckeditorImageUpload/plugin-image.js +11 -11
  70. package/src/components/utils/ckeditorImageUpload/toolbar-ui.js +40 -40
  71. package/src/components/utils/ckeditorfileUpload/common.js +111 -111
  72. package/src/components/utils/ckeditorfileUpload/editing.js +11 -11
  73. package/src/components/utils/ckeditorfileUpload/plugin_file.js +11 -11
  74. package/src/components/utils/ckeditorfileUpload/toolbar_ui.js +34 -34
  75. package/src/components/utils/format_date.js +25 -25
  76. package/src/components/utils/index.js +6 -6
  77. package/src/components/utils/math_utils.js +29 -29
  78. package/src/components/voiceComponent.vue +119 -119
  79. package/src/main.js +60 -60
  80. package/vue.config.js +47 -47
@@ -1,313 +1,313 @@
1
- <template>
2
- <div id="attachment-upload">
3
- <div v-if="attachmentList.length != 0" class="image-list">
4
- <template>
5
- <div v-for="(item, index) in attachmentList" class="attch-item" :key="item.url + index"
6
- >
7
- <span @click.stop="deleteAttch(index)"><i class="iconfont guoran-a-16-09"></i></span>
8
- <div class="attch-item-left" @click="lookAttach(item.url)">
9
- <i v-if="item.url == ''" class="el-icon-loading" style="color:#366AFF;margin: 5px;"></i>
10
- <img src="../assets/image/video.png"
11
- v-else-if="setSrc(item.name) == 'video'"/>
12
- <img src="../assets/image/image.png"
13
- v-else-if="setSrc(item.name) == 'image'" />
14
- <img src="../assets/image/txt.png"
15
- v-else-if="setSrc(item.name) == 'txt'" />
16
- <img src="../assets/image/word.png"
17
- v-else-if="setSrc(item.name) == 'word'" />
18
- <img src="../assets/image/pdf.png"
19
- v-else-if="setSrc(item.name) == 'pdf'" />
20
- <img src="../assets/image/ppt.png"
21
- v-else-if="setSrc(item.name) == 'ppt'" />
22
- <img src="../assets/image/excel.png"
23
- v-else-if="setSrc(item.name) == 'excel'" />
24
- <div class="fileName" v-if="item">
25
- <template v-if="typeof item === 'string'">
26
- <template v-if="item.indexOf('[') !== -1">
27
- {{ JSON.parse(item)[index] }}
28
- </template>
29
- </template>
30
- <template v-else>
31
- {{ item.name }}
32
- </template>
33
- </div>
34
- </div>
35
- </div>
36
- </template>
37
- </div>
38
- <!-- <el-dialog :visible.sync="dialogVisible" width="800px" :close-on-click-modal="false"
39
- custom-class="look-dialog">
40
- <template v-if="fieldType === 'VIDEO'">
41
- <video :src="dialogUrl" controls></video>
42
- </template>
43
- <template v-else-if="fieldType === 'IMAGE'">
44
- <img :src="dialogUrl" />
45
- </template>
46
- <div v-else-if="fieldType === 'txt' || fieldType === 'doc'" style="height: 60vh">
47
- <embed :src="dialogUrl" width="100%" height="100%" />
48
- </div>
49
- </el-dialog> -->
50
- <previewDoc ref="previewDoc" :url="previewHref"></previewDoc>
51
- </div>
52
- </template>
53
-
54
- <script>
55
- import previewDoc from './previewDoc.vue';
56
- export default {
57
- name: "customUpload",
58
- components: {previewDoc},
59
- data () {
60
- return {
61
- dialogVisible: false,
62
- previewHref:""
63
- }
64
- },
65
- props: ["attachmentList"],
66
- methods: {
67
- //查看视频
68
- openDialog (item) {
69
- let url = typeof item == 'object' ? item.url : item
70
- this.previewHref = url
71
- this.$refs.previewDoc.previewShowPopup = true
72
- },
73
- deleteAttch (index) {
74
- this.$emit('attachDeleteAttch', index)
75
- },
76
- //根据上传类型设置图标
77
- setSrc (fileName) {
78
- let file = ""
79
- const fileType = fileName.substring(fileName.lastIndexOf('.'));
80
- if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.mov' || fileType === '.MOV') {
81
- file = 'video'
82
- }
83
- else if (fileType === '.jpg' || fileType === '.png' || fileType === '.JPG' || fileType === '.PNG') {
84
- file = 'image'
85
- }
86
- else if (fileType == '.txt') {
87
- file = 'txt'
88
- }
89
- else if (fileType == '.ppt' || fileType == '.pptx') {
90
- file = 'ppt'
91
- }
92
- else if (fileType == '.doc' || fileType == '.docx') {
93
- file = 'word'
94
- }
95
- else if (fileType == '.xls' || fileType == '.xlsx') {
96
- file = 'excel'
97
- }
98
- else if (fileType == '.pdf') {
99
- file = 'pdf'
100
- }
101
- return file
102
- },
103
- //下载文件
104
- updownload () {
105
- window.location.href = this.dialogUrl
106
- /*window.open(this.dialogUrl,'_black')*/
107
- },
108
- lookAttach(url){
109
- if(url !== '') {
110
- this.previewHref = url
111
- this.$refs.previewDoc.previewShowPopup = true
112
- }
113
- }
114
- }
115
- };
116
- </script>
117
-
118
- <style scoped lang="less">
119
- .custom-upload-o {
120
- display: flex;
121
- align-items: center;
122
- }
123
-
124
- #attachment-upload {
125
- .image-list {
126
- display: flex;
127
- flex-wrap: wrap;
128
- padding: 0 8px;
129
- }
130
-
131
- .image-item {
132
- margin: 0 6px;
133
- position: relative;
134
-
135
- .delete {
136
- // width: 20px;
137
- // height: 22px;
138
- position: absolute;
139
- top: 0px;
140
- right: 0px;
141
- // border-radius: 30px;
142
- background: #ffffff;
143
- display: flex;
144
- align-items: center;
145
- justify-content: flex-end;
146
- }
147
-
148
- .guoran-tongyichicun-16-09-shanchu2 {
149
- color: #366aff;
150
- // position: absolute;
151
- // top: 0px;
152
- // right: 0px;
153
- // cursor: pointer;
154
- }
155
- }
156
-
157
- .guoran-tongyichicun-16-09-shanchu2 {
158
- display: none;
159
- }
160
-
161
- .image-item:hover {
162
- .delete {
163
- width: 18px;
164
- height: 20px;
165
- }
166
-
167
- .guoran-tongyichicun-16-09-shanchu2 {
168
- display: block;
169
- }
170
- }
171
-
172
- .attch-item {
173
- margin: 10px 0 0 0;
174
- color: #606266;
175
- font-size: 13px;
176
- cursor: pointer;
177
- display: flex;
178
- align-items: center;
179
- justify-content: space-between;
180
- width: 100%;
181
-
182
- .guoran-a-16-09 {
183
- color: #366aff;
184
- }
185
-
186
- .attch-item-left {
187
- display: flex;
188
- align-items: center;
189
- flex: none;
190
- width: 97%;
191
- overflow: hidden;
192
- text-overflow: ellipsis;
193
- margin-left: 6px;
194
- img {
195
- margin-right: 4px;
196
- }
197
- }
198
- }
199
-
200
- .video-item {
201
- display: flex;
202
- align-items: center;
203
- justify-content: center;
204
- background-color: #f0f4fc;
205
- width: 60px;
206
- height: 60px;
207
- border-radius: 5px;
208
- margin: 0 6px;
209
- position: relative;
210
- overflow: hidden;
211
-
212
- img {
213
- cursor: pointer;
214
- }
215
-
216
- .delete {
217
- // width: 20px;
218
- // height: 22px;
219
- position: absolute;
220
- top: 0px;
221
- right: 0px;
222
- // border-radius: 30px;
223
- background: #ffffff;
224
- display: flex;
225
- align-items: center;
226
- justify-content: flex-end;
227
-
228
- }
229
-
230
- .guoran-tongyichicun-16-09-shanchu2 {
231
- color: #366aff;
232
- cursor: pointer;
233
- }
234
- }
235
-
236
- .video-item:hover {
237
- .delete {
238
- width: 20px;
239
- height: 22px;
240
- }
241
-
242
- .guoran-tongyichicun-16-09-shanchu2 {
243
- display: block;
244
- }
245
- }
246
-
247
- /deep/.attachment-upload {
248
- .el-upload {
249
- width: 100%;
250
- }
251
-
252
- .el-upload-dragger {
253
- width: 100%;
254
- }
255
- }
256
-
257
- .fileName {
258
- max-width: 80%;
259
- flex: none;
260
- overflow: hidden;
261
- text-overflow: ellipsis;
262
- white-space: nowrap;
263
- }
264
-
265
- /deep/ .el-upload--picture-card {
266
- width: 60px;
267
- height: 60px;
268
- display: flex;
269
- align-items: center;
270
- justify-content: center;
271
- flex: none;
272
- }
273
-
274
- /deep/.el-upload-dragger {
275
- height: 60px;
276
- display: flex;
277
- align-items: center;
278
- justify-content: space-around;
279
-
280
- .el-icon-upload {
281
- margin: 5px 10px 8px;
282
- line-height: 30px;
283
- font-size: 25px;
284
- }
285
-
286
- .el-upload__text {
287
- display: flex;
288
- // flex-direction: column;
289
- flex-wrap: wrap;
290
- flex: 1;
291
- }
292
- }
293
-
294
- .el-upload-dragger>div {
295
- display: flex;
296
- align-items: center;
297
- }
298
- }
299
-
300
- .look-dialog {
301
- video {
302
- height: 500px;
303
- object-fit: contain;
304
- width: 100%;
305
- }
306
-
307
- img {
308
- height: 500px;
309
- width: 100%;
310
- object-fit: contain;
311
- }
312
- }
1
+ <template>
2
+ <div id="attachment-upload">
3
+ <div v-if="attachmentList.length != 0" class="image-list">
4
+ <template>
5
+ <div v-for="(item, index) in attachmentList" class="attch-item" :key="item.url + index"
6
+ >
7
+ <span @click.stop="deleteAttch(index)"><i class="iconfont guoran-a-16-09"></i></span>
8
+ <div class="attch-item-left" @click="lookAttach(item.url)">
9
+ <i v-if="item.url == ''" class="el-icon-loading" style="color:#366AFF;margin: 5px;"></i>
10
+ <img src="../assets/image/video.png"
11
+ v-else-if="setSrc(item.name) == 'video'"/>
12
+ <img src="../assets/image/image.png"
13
+ v-else-if="setSrc(item.name) == 'image'" />
14
+ <img src="../assets/image/txt.png"
15
+ v-else-if="setSrc(item.name) == 'txt'" />
16
+ <img src="../assets/image/word.png"
17
+ v-else-if="setSrc(item.name) == 'word'" />
18
+ <img src="../assets/image/pdf.png"
19
+ v-else-if="setSrc(item.name) == 'pdf'" />
20
+ <img src="../assets/image/ppt.png"
21
+ v-else-if="setSrc(item.name) == 'ppt'" />
22
+ <img src="../assets/image/excel.png"
23
+ v-else-if="setSrc(item.name) == 'excel'" />
24
+ <div class="fileName" v-if="item">
25
+ <template v-if="typeof item === 'string'">
26
+ <template v-if="item.indexOf('[') !== -1">
27
+ {{ JSON.parse(item)[index] }}
28
+ </template>
29
+ </template>
30
+ <template v-else>
31
+ {{ item.name }}
32
+ </template>
33
+ </div>
34
+ </div>
35
+ </div>
36
+ </template>
37
+ </div>
38
+ <!-- <el-dialog :visible.sync="dialogVisible" width="800px" :close-on-click-modal="false"
39
+ custom-class="look-dialog">
40
+ <template v-if="fieldType === 'VIDEO'">
41
+ <video :src="dialogUrl" controls></video>
42
+ </template>
43
+ <template v-else-if="fieldType === 'IMAGE'">
44
+ <img :src="dialogUrl" />
45
+ </template>
46
+ <div v-else-if="fieldType === 'txt' || fieldType === 'doc'" style="height: 60vh">
47
+ <embed :src="dialogUrl" width="100%" height="100%" />
48
+ </div>
49
+ </el-dialog> -->
50
+ <previewDoc ref="previewDoc" :url="previewHref"></previewDoc>
51
+ </div>
52
+ </template>
53
+
54
+ <script>
55
+ import previewDoc from './previewDoc.vue';
56
+ export default {
57
+ name: "customUpload",
58
+ components: {previewDoc},
59
+ data () {
60
+ return {
61
+ dialogVisible: false,
62
+ previewHref:""
63
+ }
64
+ },
65
+ props: ["attachmentList"],
66
+ methods: {
67
+ //查看视频
68
+ openDialog (item) {
69
+ let url = typeof item == 'object' ? item.url : item
70
+ this.previewHref = url
71
+ this.$refs.previewDoc.previewShowPopup = true
72
+ },
73
+ deleteAttch (index) {
74
+ this.$emit('attachDeleteAttch', index)
75
+ },
76
+ //根据上传类型设置图标
77
+ setSrc (fileName) {
78
+ let file = ""
79
+ const fileType = fileName.substring(fileName.lastIndexOf('.'));
80
+ if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.mov' || fileType === '.MOV') {
81
+ file = 'video'
82
+ }
83
+ else if (fileType === '.jpg' || fileType === '.png' || fileType === '.JPG' || fileType === '.PNG') {
84
+ file = 'image'
85
+ }
86
+ else if (fileType == '.txt') {
87
+ file = 'txt'
88
+ }
89
+ else if (fileType == '.ppt' || fileType == '.pptx') {
90
+ file = 'ppt'
91
+ }
92
+ else if (fileType == '.doc' || fileType == '.docx') {
93
+ file = 'word'
94
+ }
95
+ else if (fileType == '.xls' || fileType == '.xlsx') {
96
+ file = 'excel'
97
+ }
98
+ else if (fileType == '.pdf') {
99
+ file = 'pdf'
100
+ }
101
+ return file
102
+ },
103
+ //下载文件
104
+ updownload () {
105
+ window.location.href = this.dialogUrl
106
+ /*window.open(this.dialogUrl,'_black')*/
107
+ },
108
+ lookAttach(url){
109
+ if(url !== '') {
110
+ this.previewHref = url
111
+ this.$refs.previewDoc.previewShowPopup = true
112
+ }
113
+ }
114
+ }
115
+ };
116
+ </script>
117
+
118
+ <style scoped lang="less">
119
+ .custom-upload-o {
120
+ display: flex;
121
+ align-items: center;
122
+ }
123
+
124
+ #attachment-upload {
125
+ .image-list {
126
+ display: flex;
127
+ flex-wrap: wrap;
128
+ padding: 0 8px;
129
+ }
130
+
131
+ .image-item {
132
+ margin: 0 6px;
133
+ position: relative;
134
+
135
+ .delete {
136
+ // width: 20px;
137
+ // height: 22px;
138
+ position: absolute;
139
+ top: 0px;
140
+ right: 0px;
141
+ // border-radius: 30px;
142
+ background: #ffffff;
143
+ display: flex;
144
+ align-items: center;
145
+ justify-content: flex-end;
146
+ }
147
+
148
+ .guoran-tongyichicun-16-09-shanchu2 {
149
+ color: #366aff;
150
+ // position: absolute;
151
+ // top: 0px;
152
+ // right: 0px;
153
+ // cursor: pointer;
154
+ }
155
+ }
156
+
157
+ .guoran-tongyichicun-16-09-shanchu2 {
158
+ display: none;
159
+ }
160
+
161
+ .image-item:hover {
162
+ .delete {
163
+ width: 18px;
164
+ height: 20px;
165
+ }
166
+
167
+ .guoran-tongyichicun-16-09-shanchu2 {
168
+ display: block;
169
+ }
170
+ }
171
+
172
+ .attch-item {
173
+ margin: 10px 0 0 0;
174
+ color: #606266;
175
+ font-size: 13px;
176
+ cursor: pointer;
177
+ display: flex;
178
+ align-items: center;
179
+ justify-content: space-between;
180
+ width: 100%;
181
+
182
+ .guoran-a-16-09 {
183
+ color: #366aff;
184
+ }
185
+
186
+ .attch-item-left {
187
+ display: flex;
188
+ align-items: center;
189
+ flex: none;
190
+ width: 97%;
191
+ overflow: hidden;
192
+ text-overflow: ellipsis;
193
+ margin-left: 6px;
194
+ img {
195
+ margin-right: 4px;
196
+ }
197
+ }
198
+ }
199
+
200
+ .video-item {
201
+ display: flex;
202
+ align-items: center;
203
+ justify-content: center;
204
+ background-color: #f0f4fc;
205
+ width: 60px;
206
+ height: 60px;
207
+ border-radius: 5px;
208
+ margin: 0 6px;
209
+ position: relative;
210
+ overflow: hidden;
211
+
212
+ img {
213
+ cursor: pointer;
214
+ }
215
+
216
+ .delete {
217
+ // width: 20px;
218
+ // height: 22px;
219
+ position: absolute;
220
+ top: 0px;
221
+ right: 0px;
222
+ // border-radius: 30px;
223
+ background: #ffffff;
224
+ display: flex;
225
+ align-items: center;
226
+ justify-content: flex-end;
227
+
228
+ }
229
+
230
+ .guoran-tongyichicun-16-09-shanchu2 {
231
+ color: #366aff;
232
+ cursor: pointer;
233
+ }
234
+ }
235
+
236
+ .video-item:hover {
237
+ .delete {
238
+ width: 20px;
239
+ height: 22px;
240
+ }
241
+
242
+ .guoran-tongyichicun-16-09-shanchu2 {
243
+ display: block;
244
+ }
245
+ }
246
+
247
+ /deep/.attachment-upload {
248
+ .el-upload {
249
+ width: 100%;
250
+ }
251
+
252
+ .el-upload-dragger {
253
+ width: 100%;
254
+ }
255
+ }
256
+
257
+ .fileName {
258
+ max-width: 80%;
259
+ flex: none;
260
+ overflow: hidden;
261
+ text-overflow: ellipsis;
262
+ white-space: nowrap;
263
+ }
264
+
265
+ /deep/ .el-upload--picture-card {
266
+ width: 60px;
267
+ height: 60px;
268
+ display: flex;
269
+ align-items: center;
270
+ justify-content: center;
271
+ flex: none;
272
+ }
273
+
274
+ /deep/.el-upload-dragger {
275
+ height: 60px;
276
+ display: flex;
277
+ align-items: center;
278
+ justify-content: space-around;
279
+
280
+ .el-icon-upload {
281
+ margin: 5px 10px 8px;
282
+ line-height: 30px;
283
+ font-size: 25px;
284
+ }
285
+
286
+ .el-upload__text {
287
+ display: flex;
288
+ // flex-direction: column;
289
+ flex-wrap: wrap;
290
+ flex: 1;
291
+ }
292
+ }
293
+
294
+ .el-upload-dragger>div {
295
+ display: flex;
296
+ align-items: center;
297
+ }
298
+ }
299
+
300
+ .look-dialog {
301
+ video {
302
+ height: 500px;
303
+ object-fit: contain;
304
+ width: 100%;
305
+ }
306
+
307
+ img {
308
+ height: 500px;
309
+ width: 100%;
310
+ object-fit: contain;
311
+ }
312
+ }
313
313
  </style>