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