askbot-dragon 1.7.44-beta → 1.7.48-beta

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 (95) 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 +75 -73
  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 +117 -141
  11. package/src/assets/js/Base64Util.js +22 -22
  12. package/src/assets/js/common.js +252 -252
  13. package/src/assets/js/hammer.js +89 -100
  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 +192 -199
  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 +294 -294
  20. package/src/components/ActionAlertIframe.vue +154 -177
  21. package/src/components/AiGuide.vue +471 -438
  22. package/src/components/AnswerDocknowledge.vue +1088 -1091
  23. package/src/components/AnswerVoice.vue +285 -285
  24. package/src/components/AskIFrame.vue +15 -15
  25. package/src/components/ConversationContainer.vue +10873 -10766
  26. package/src/components/FileType.vue +86 -86
  27. package/src/components/Message.vue +27 -27
  28. package/src/components/MyEditor.vue +341 -342
  29. package/src/components/QwFeedback.vue +301 -301
  30. package/src/components/actionSatisfaction.vue +107 -107
  31. package/src/components/actionSendToBot.vue +62 -62
  32. package/src/components/answerDissatisfaction.vue +62 -62
  33. package/src/components/answerRadio.vue +211 -211
  34. package/src/components/ask-components/DissatisfactionOptions.vue +57 -57
  35. package/src/components/ask-components/Msgloading.vue +37 -37
  36. package/src/components/ask-components/SatisfactionV2.vue +15 -15
  37. package/src/components/askVideo.vue +139 -162
  38. package/src/components/assetDetails.vue +378 -378
  39. package/src/components/assetMessage.vue +226 -228
  40. package/src/components/associationIntention.vue +374 -378
  41. package/src/components/attachmentPreview.vue +90 -90
  42. package/src/components/botActionSatisfactor.vue +68 -68
  43. package/src/components/chatContent.vue +513 -513
  44. package/src/components/feedBack.vue +136 -136
  45. package/src/components/fielListView.vue +351 -351
  46. package/src/components/file/AliyunOssComponents.vue +108 -108
  47. package/src/components/formTemplate.vue +3497 -3501
  48. package/src/components/imgView.vue +31 -31
  49. package/src/components/intelligentSummary.vue +229 -231
  50. package/src/components/kkview.vue +1138 -1138
  51. package/src/components/loadingProcess.vue +164 -164
  52. package/src/components/markDownText.vue +197 -197
  53. package/src/components/message/ActionAlertIframe.vue +112 -112
  54. package/src/components/message/ShopMessage.vue +164 -164
  55. package/src/components/message/TextMessage.vue +924 -928
  56. package/src/components/message/TicketMessage.vue +201 -201
  57. package/src/components/message/swiper/index.js +4 -4
  58. package/src/components/message/swiper/ticketSwiper.vue +503 -503
  59. package/src/components/message/swiper/ticketSwiperItem.vue +61 -61
  60. package/src/components/msgLoading.vue +231 -231
  61. package/src/components/myPopup.vue +70 -70
  62. package/src/components/pdfPosition.vue +1342 -1514
  63. package/src/components/popup.vue +227 -227
  64. package/src/components/previewDoc.vue +247 -251
  65. package/src/components/previewPdf.vue +774 -1069
  66. package/src/components/receiverMessagePlatform.vue +66 -65
  67. package/src/components/recommend.vue +80 -80
  68. package/src/components/selector/hOption.vue +20 -20
  69. package/src/components/selector/hSelector.vue +199 -199
  70. package/src/components/selector/hWrapper.vue +216 -216
  71. package/src/components/senderMessagePlatform.vue +55 -50
  72. package/src/components/source/BotMessage.vue +24 -24
  73. package/src/components/source/CustomMessage.vue +24 -24
  74. package/src/components/test.vue +260 -260
  75. package/src/components/tree.vue +307 -307
  76. package/src/components/utils/AliyunIssUtil.js +103 -103
  77. package/src/components/utils/ckeditor.js +185 -185
  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/components/welcomeKnowledgeFile.vue +340 -344
  83. package/src/components/welcomeLlmCard.vue +140 -144
  84. package/src/components/welcomeSuggest.vue +97 -97
  85. package/src/locales/cn.json +61 -71
  86. package/src/locales/en.json +62 -73
  87. package/src/main.js +76 -75
  88. package/vue.config.js +54 -54
  89. package/src/components/newPdfPosition.vue +0 -878
  90. package/src/components/pagination.vue +0 -129
  91. package/src/components/preview/docView.vue +0 -107
  92. package/src/components/preview/excelView.vue +0 -177
  93. package/src/components/preview/newPositionPreview.vue +0 -351
  94. package/src/components/preview/pdfView.vue +0 -760
  95. package/src/locales/jp.json +0 -73
@@ -1,351 +0,0 @@
1
- <template>
2
- <div class="positionView">
3
- <div class="positionContainer" :class="splitParagraph.length > 1 && fileType !== 'XLS' && fileType !== 'XLSX' ? 'has-footer' : 'no-footer'">
4
- <doc-view
5
- v-if="fileType === 'TXT' || fileType === 'DOCX' || fileType === 'DOC'"
6
- :html_result="html_result"
7
- :split_paragraphs="splitParagraph"
8
- ref="docView"
9
- :fileSuffix="fileType"
10
- ></doc-view>
11
- <excel-view v-else-if="fileType === 'XLS' || fileType === 'XLSX'"
12
- ref="excelView"
13
- :headerData="excelHeaderData"
14
- :excelRowList="excelRowList"
15
- :tableChunkData="tableChunkData"
16
- ></excel-view>
17
- <pdf-view v-else-if="fileType === 'PDF'" ref="pdfView" :split_paragraphs="splitParagraph" :ossPath="url"></pdf-view>
18
- </div>
19
- <template v-if="splitParagraph.length > 1 && fileType !== 'XLS' && fileType !== 'XLSX'">
20
- <div class="btn_footer" v-if="!isPC">
21
- <div class="prev" @click="prev">上一段</div>
22
- <div class="next" @click="next">下一段</div>
23
- </div>
24
- <div id="pagination" v-if="isPC">
25
- <el-pagination :current-page="currentPage + 1" @current-change="currentChange" @prev-click="prev"
26
- @next-click="next" layout="slot, prev, pager, next" :page-size="1" :total="splitParagraph.length">
27
- <span class="total-class">答案由{{ splitParagraph.length }}段内容生成</span>
28
- </el-pagination>
29
- </div>
30
- </template>
31
- </div>
32
- </template>
33
-
34
- <script>
35
- import DocView from "./docView";
36
- import ExcelView from "./excelView";
37
- import PdfView from "./pdfView";
38
- export default {
39
- name: "newPositionPreview",
40
- components: { PdfView, ExcelView, DocView },
41
- data(){
42
- return{
43
- tagId:[],
44
- newVersion:false,
45
- html_result:"",
46
- parseInfo:{},
47
- fileType:"",
48
- splitParagraph:[],
49
- isPC:true,
50
- currentPage:0,
51
- excelHeaderData:"",
52
- excelRowList:[],
53
- tableChunkData:[]
54
-
55
- }
56
- },
57
- props:{
58
- knowledgeId:{
59
- type:String,
60
- default:""
61
- },
62
- tagIds:{
63
- type:Array,
64
- default(){
65
- return []
66
- }
67
- },
68
- url:{
69
- type:String,
70
- default:""
71
- }
72
- },
73
- methods:{
74
- getLocationInfo(){
75
- this.$http.get('/knowledge-api/knowledge/knowledge-part-location-info/list?ids=' + this.tagIds.join(',')).then(res => {
76
- if (res.data.code == 0){
77
- if (res.data.data && res.data.data.length){
78
- for (let i=0;i<res.data.data.length;i++){
79
- if (res.data.data[i].paragraphChunkInfo && res.data.data[i].paragraphChunkInfo.splitParagraph){
80
- this.splitParagraph.push(res.data.data[i].paragraphChunkInfo.splitParagraph)
81
- }
82
- if (res.data.data[i].paragraphChunkInfo && res.data.data[i].paragraphChunkInfo.tableChunkData){
83
- this.tableChunkData.push(res.data.data[i].paragraphChunkInfo.tableChunkData)
84
- }
85
- }
86
- }
87
- }
88
- this.splitParagraph = this.splitParagraph.concat(this.tableChunkData);
89
- this.getParseInfo();
90
- })
91
- },
92
- getParseInfo(){
93
- let url = '/knowledge-api/correction/knowledge-parse-info/' + this.knowledgeId;
94
- this.$http.get(url).then(res => {
95
- console.log('getParseInfo',res)
96
- if (res.data.code == 0 && res.data.data){
97
- this.parseInfo = res.data.data;
98
- if (res.data.data.extractChunkInfo && res.data.data.extractChunkInfo.docChunkData){
99
- this.html_result = res.data.data.extractChunkInfo.docChunkData.html_result;
100
- }
101
- if (res.data.data.extractChunkInfo && res.data.data.extractChunkInfo.tableChunkData && res.data.data.extractChunkInfo.tableChunkData.length > 0){
102
- this.excelHeaderData = res.data.data.extractChunkInfo.tableChunkData[0].table_md.table_header;
103
- this.excelRowList = res.data.data.extractChunkInfo.tableChunkData[0].table_md.table_data;
104
- }
105
- this.fileType = res.data.data.fileType
106
- }
107
- if (this.fileType === 'XLS' || this.fileType === 'XLSX'){
108
- let dom = document.getElementById('drawer_content_pre');
109
- dom.style.height = 'calc(100% - 90px)'
110
- }
111
- })
112
- },
113
- currentChange (value) {
114
- this.currentPage = value - 1;
115
- this.scrollToParagraph()
116
- },
117
- prev(){
118
- if (this.currentPage == 0){
119
- return
120
- }
121
- this.currentPage--;
122
- this.scrollToParagraph()
123
- },
124
- next(){
125
- if (this.currentPage === (this.splitParagraph.length - 1)){
126
- return
127
- }
128
- this.currentPage++;
129
- this.scrollToParagraph()
130
- },
131
- async scrollToParagraph(type){
132
- if (this.fileType == 'PDF') {
133
- let currentPage = this.splitParagraph[this.currentPage];
134
- let page = 1;
135
- if (currentPage){
136
- page = currentPage.original_paragraph[0].page
137
- }
138
- await this.$refs.pdfView.loadPage(page);
139
- this.$refs.pdfView.jumpToHighlight(this.currentPage)
140
- } else if (this.fileType == 'DOC' || this.fileType == 'DOCX' || this.fileType == 'TXT'){
141
- if (this.splitParagraph[this.currentPage] && this.splitParagraph[this.currentPage].original_paragraph){
142
- const id = this.splitParagraph[this.currentPage].original_paragraph[0].paragraph_id;
143
- const dom = document.getElementById(id);
144
- if (dom){
145
- dom.scrollIntoView({ behavior: 'smooth' });
146
- }
147
- if (type === 'first'){
148
- if (dom){
149
- dom.classList.add('animation')
150
- setTimeout(() => {
151
- dom.classList.remove('animation')
152
- }, 3000)
153
- }
154
- } else {
155
- for (let i=0;i<this.splitParagraph[this.currentPage].original_paragraph.length;i++){
156
- const id = this.splitParagraph[this.currentPage].original_paragraph[i].paragraph_id;
157
- const dom = document.getElementById(id);
158
- if (dom){
159
- dom.scrollIntoView({ behavior: 'smooth' });
160
- dom.classList.add('animation')
161
- setTimeout(() => {
162
- dom.classList.remove('animation')
163
- }, 3000)
164
- }
165
- }
166
- }
167
- } else if (this.splitParagraph[this.currentPage] && this.splitParagraph[this.currentPage].tableId){
168
- const id = this.splitParagraph[this.currentPage].tableId;
169
- const dom = document.getElementById(id);
170
- if (dom){
171
- dom.scrollIntoView({ behavior: 'smooth' });
172
- }
173
- }
174
- }
175
- }
176
- },
177
- mounted() {
178
- this.getLocationInfo();
179
- if (/(iPhone|iPad|iPod|iOS|Android)/i.test(navigator.userAgent)) {
180
- this.isPC = false
181
- } else {
182
- this.isPC = true
183
- }
184
- }
185
- };
186
- </script>
187
-
188
- <style scoped lang="less">
189
- .positionView{
190
- height: 100%;
191
- .has-footer{
192
- height: calc(100% - 60px);
193
- }
194
- .no-footer{
195
- height: 100%;
196
- }
197
- .btn_footer {
198
- width: 100%;
199
- height: 60px;
200
- display: flex;
201
- align-items: center;
202
- justify-content: space-around;
203
- position: absolute;
204
- bottom: 0px;
205
- left: 0;
206
- z-index: 999;
207
- background: #ffffff;
208
-
209
- .prev,
210
- .next {
211
- width: 35%;
212
- height: 40px;
213
- display: flex;
214
- align-items: center;
215
- justify-content: center;
216
- border-radius: 50px;
217
- cursor: pointer;
218
- }
219
-
220
- .prev {
221
- background: #F2F5FA;
222
- color: #000;
223
- }
224
-
225
- .next {
226
- background: #366aff;
227
- color: #ffffff;
228
- }
229
- }
230
- #pagination {
231
- .total-class {
232
- margin-right: 13px;
233
- font-weight: 400;
234
- }
235
-
236
- position: absolute;
237
- bottom: 0px;
238
- right: 0;
239
- width: 100%;
240
- display: flex;
241
- align-items: center;
242
- justify-content: center;
243
- height: 50px;
244
- background-color: white;
245
- box-shadow: 0px 0px 18px 0px rgba(29, 55, 129, 0.07);
246
- border-radius: 5px;
247
- z-index: 1000;
248
-
249
-
250
-
251
- /deep/.el-pagination {
252
- margin-right: 110px;
253
- }
254
-
255
- /deep/.el-pager {
256
- background: #EDF0F6;
257
- border-radius: 15px;
258
- }
259
-
260
- /deep/.el-pagination.is-background .btn-next {
261
- width: 30px;
262
- height: 30px;
263
- background: #EDF0F6;
264
- border-radius: 50%;
265
- }
266
-
267
- /deep/.el-pagination .btn-next {
268
- width: 30px;
269
- height: 30px;
270
- background: #EDF0F6;
271
- border-radius: 50%;
272
- padding-left: 0;
273
- margin-left: 5px;
274
- }
275
-
276
- /deep/.el-pagination .btn-prev {
277
- width: 30px;
278
- height: 30px;
279
- background: #EDF0F6;
280
- border-radius: 50%;
281
- padding-right: 0;
282
- margin-right: 5px;
283
- }
284
-
285
- /deep/.el-pagination button {
286
- padding: 0;
287
- min-width: 30px;
288
- }
289
-
290
- /deep/.el-pager li {
291
- background: #EDF0F6;
292
- height: 30px;
293
- min-width: 30px;
294
- line-height: 30px;
295
- font-size: 12px;
296
- color: #717b90;
297
- }
298
-
299
- /deep/.el-pager li:first-child {
300
- border-bottom-left-radius: 15px !important;
301
- border-top-left-radius: 15px !important;
302
- }
303
-
304
- /deep/.el-pager li:last-child {
305
- border-top-right-radius: 15px !important;
306
- border-bottom-right-radius: 15px !important;
307
- }
308
-
309
- /deep/.el-pager li.active {
310
- width: 30px;
311
- height: 30px;
312
- min-width: 30px;
313
- background: #366AFF;
314
- border: 3px solid #A1B9FF;
315
- border-radius: 50%;
316
- line-height: 24px;
317
- color: white;
318
- }
319
-
320
- /deep/.el-pagination.is-background .el-pager li:not(.disabled).active {
321
- background: #366AFF;
322
- }
323
- }
324
- }
325
- .animation {
326
- animation-name: highlight;
327
- animation-duration: 4s;
328
- }
329
-
330
- @keyframes highlight {
331
- 0% {
332
- background: rgba(255, 136, 0, 0.3);
333
- }
334
-
335
- 25% {
336
- background: rgba(255, 136, 0, 0.6);
337
- }
338
-
339
- 50% {
340
- background: rgba(255, 136, 0, 0.3);
341
- }
342
-
343
- 75% {
344
- background: rgba(255, 136, 0, 0.6);
345
- }
346
-
347
- 100% {
348
- background: rgba(255, 136, 0, 0.3);
349
- }
350
- }
351
- </style>