askbot-dragon 1.7.24-beta → 1.7.26-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.
- package/package.json +12 -14
- package/public/index.html +10 -8
- package/src/assets/js/AliyunlssUtil.js +26 -50
- package/src/assets/js/hammer.js +2 -13
- package/src/assets/less/converSationContainer/common.less +0 -7
- package/src/components/ActionAlertIframe.vue +1 -24
- package/src/components/AiGuide.vue +154 -121
- package/src/components/AnswerDocknowledge.vue +100 -108
- package/src/components/ConversationContainer.vue +220 -13
- package/src/components/MyEditor.vue +1 -2
- package/src/components/QwFeedback.vue +301 -0
- package/src/components/actionSatisfaction.vue +3 -3
- package/src/components/answerRadio.vue +3 -3
- package/src/components/askVideo.vue +0 -23
- package/src/components/associationIntention.vue +7 -11
- package/src/components/formTemplate.vue +50 -54
- package/src/components/intelligentSummary.vue +4 -8
- package/src/components/message/TextMessage.vue +11 -15
- package/src/components/message/swiper/ticketSwiper.vue +1 -1
- package/src/components/pdfPosition.vue +37 -217
- package/src/components/popup.vue +2 -2
- package/src/components/previewDoc.vue +2 -6
- package/src/components/previewPdf.vue +134 -159
- package/src/components/senderMessagePlatform.vue +4 -4
- package/src/components/utils/ckeditor.js +1 -1
- package/src/components/welcomeKnowledgeFile.vue +2 -6
- package/src/components/welcomeLlmCard.vue +1 -5
- package/src/components/welcomeSuggest.vue +1 -1
- package/src/main.js +0 -18
- package/src/components/imgView.vue +0 -32
- package/src/components/markDownText.vue +0 -128
- package/src/components/newPdfPosition.vue +0 -878
- package/src/locales/cn.json +0 -72
- package/src/locales/en.json +0 -73
- package/src/locales/jp.json +0 -73
|
@@ -5,34 +5,34 @@
|
|
|
5
5
|
另外增加了在知识项目中预览当前文件的一些功能
|
|
6
6
|
-->
|
|
7
7
|
<template>
|
|
8
|
-
<el-drawer
|
|
9
|
-
:modal="
|
|
8
|
+
<el-drawer title="我是标题" :visible.sync="drawer" :with-header="false" :append-to-body="true" :destroy-on-close="true"
|
|
9
|
+
:modal="false" :direction="previewShowPopup ? 'btt' : 'rtl'" :size="previewShowPopup ? '90%' : '65%'"
|
|
10
10
|
custom-class="pdf-preview-drawer" v-if="drawer">
|
|
11
11
|
<!-- v-else-if="drawer" -->
|
|
12
12
|
<div class="drawer-header" :class="isLiBang ? 'libang_head' : ''" v-if="!isPc">
|
|
13
13
|
<div class="header-btn btn_position">
|
|
14
14
|
<div class="onload_btn" v-if="isDownload" @click="downLoad">
|
|
15
|
-
|
|
15
|
+
下载
|
|
16
16
|
</div>
|
|
17
17
|
<div class="summaryBtn" :class="showSummary ? 'summaryActiveBtn' : ''" @click="summaryFun" v-if="isHasChat">
|
|
18
18
|
<i class="iconfont guoran-tongyichicun-write-29-jiqiren"></i>
|
|
19
|
-
<span
|
|
19
|
+
<span>智能摘要</span>
|
|
20
20
|
</div>
|
|
21
21
|
<template v-if="isHasChat">
|
|
22
22
|
<div class="chat" @click="previewToDialog(true)" v-if="!previewKnowledgeId">
|
|
23
23
|
<i class="iconfont guoran-wendapingjia"></i>
|
|
24
|
-
|
|
24
|
+
聊一聊
|
|
25
25
|
</div>
|
|
26
26
|
<div class="chat chat_active" @click="previewToDialog(false)" v-else>
|
|
27
27
|
<i class="iconfont guoran-wendapingjia"></i>
|
|
28
|
-
|
|
28
|
+
聊一聊
|
|
29
29
|
</div>
|
|
30
30
|
</template>
|
|
31
31
|
</div>
|
|
32
32
|
<div class="header_title">
|
|
33
33
|
<div class="header_close">
|
|
34
34
|
<span class="title_left">
|
|
35
|
-
{{ title ? title :
|
|
35
|
+
{{ title ? title : "查看详情" }}
|
|
36
36
|
</span>
|
|
37
37
|
<section @click="close">
|
|
38
38
|
<i class="iconfont guoran-shanchu"></i>
|
|
@@ -53,21 +53,21 @@
|
|
|
53
53
|
</span>
|
|
54
54
|
<div class="header-btn">
|
|
55
55
|
<div class="onload_btn" v-if="isDownload || true" @click="downLoad">
|
|
56
|
-
|
|
56
|
+
下载
|
|
57
57
|
</div>
|
|
58
58
|
<div class="summaryBtn" :class="showSummary ? 'summaryActiveBtn' : ''" @click="summaryFun"
|
|
59
|
-
v-if="isHasChat ||
|
|
59
|
+
v-if="isHasChat || true">
|
|
60
60
|
<i class="iconfont guoran-tongyichicun-write-29-jiqiren"></i>
|
|
61
|
-
<span
|
|
61
|
+
<span>智能摘要</span>
|
|
62
62
|
</div>
|
|
63
|
-
<template v-if="isHasChat">
|
|
63
|
+
<template v-if="isHasChat || true">
|
|
64
64
|
<div class="chat" @click="previewToDialog(true)" v-if="!previewKnowledgeId">
|
|
65
65
|
<i class="iconfont guoran-wendapingjia"></i>
|
|
66
|
-
|
|
66
|
+
聊一聊
|
|
67
67
|
</div>
|
|
68
68
|
<div class="chat chat_active" @click="previewToDialog(false)" v-else>
|
|
69
69
|
<i class="iconfont guoran-wendapingjia"></i>
|
|
70
|
-
|
|
70
|
+
聊一聊
|
|
71
71
|
</div>
|
|
72
72
|
</template>
|
|
73
73
|
<section @click="close">
|
|
@@ -84,11 +84,7 @@
|
|
|
84
84
|
</div>
|
|
85
85
|
<div id="drawer_content_pre" :class="isLiBang && folderName ? 'libang_content_pre' : ''">
|
|
86
86
|
<!-- :style="{marginTop:tagIds && tagIds.length != 0 && isPc ? '50px' : ''}" -->
|
|
87
|
-
<intelligent-summary
|
|
88
|
-
v-show="showSummary && (isHasChat || formKnowledgeManagement) && fileType !== 'VIDEO' && fileType !== 'IMAGE'"
|
|
89
|
-
:tagIds="tagIds"
|
|
90
|
-
:knowledgeId="knowledgeId"
|
|
91
|
-
:formKnowledgeManagement="formKnowledgeManagement"
|
|
87
|
+
<intelligent-summary v-show="showSummary && isHasChat" :tagIds="tagIds" :knowledgeId="knowledgeId"
|
|
92
88
|
@closeSummary="closeSummary" @recommendQues="recommendQues"
|
|
93
89
|
@getSummarySuccess="getSummarySuccess"></intelligent-summary>
|
|
94
90
|
<div class="pdf_positon" :style="pdfStyle" v-if="tagIds && tagIds.length != 0 && drawer">
|
|
@@ -96,7 +92,7 @@
|
|
|
96
92
|
</pdfPosition>
|
|
97
93
|
</div>
|
|
98
94
|
<template v-else>
|
|
99
|
-
<div v-if="fileType == 'VIDEO'" style="width: 100%;
|
|
95
|
+
<div v-if="fileType == 'VIDEO'" style="width: 100%;">
|
|
100
96
|
<video :src="url" controls width="100%;" height="98%"></video>
|
|
101
97
|
</div>
|
|
102
98
|
<div v-else-if="fileType == 'HTML'" style="width: 100%;">
|
|
@@ -133,59 +129,59 @@ import { Toast } from 'vant';
|
|
|
133
129
|
export default {
|
|
134
130
|
data () {
|
|
135
131
|
return {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
132
|
+
previewShowPopup: false,
|
|
133
|
+
fileText: '',
|
|
134
|
+
fileType: "",
|
|
135
|
+
isPc: false,
|
|
136
|
+
drawer: false,
|
|
137
|
+
tagIds: [],
|
|
138
|
+
// '6454aa1a70573a6ead6f0f7d', '6454aa1a70573a6ead6f0f81',
|
|
139
|
+
loading: true,
|
|
140
|
+
previewKnowledgeId: "",
|
|
141
|
+
showSummary: true,
|
|
142
|
+
iframeHeight: "100%",
|
|
143
|
+
isDownload: false,
|
|
144
|
+
textWatermarkStr: "",
|
|
145
|
+
copy:''
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
mounted () {
|
|
149
|
+
window.addEventListener('message', this.handleIframeMessage, false);
|
|
150
|
+
this.isPcFun();
|
|
151
|
+
},
|
|
152
|
+
props: {
|
|
153
|
+
url: {
|
|
154
|
+
type: String,
|
|
155
|
+
required: true,
|
|
156
|
+
},
|
|
157
|
+
officePreviewType: {
|
|
158
|
+
type: String,
|
|
159
|
+
default: ''
|
|
160
|
+
},
|
|
161
|
+
isMessageRecord: {
|
|
162
|
+
type: Boolean,
|
|
163
|
+
default: false,
|
|
164
|
+
},
|
|
165
|
+
sourceFileType: {
|
|
166
|
+
type: String,
|
|
167
|
+
default: '',
|
|
168
|
+
},
|
|
169
|
+
title: {
|
|
170
|
+
type: String,
|
|
171
|
+
default: ''
|
|
151
172
|
},
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
173
|
+
isHasChat: {
|
|
174
|
+
type: Boolean,
|
|
175
|
+
default: false
|
|
176
|
+
},
|
|
177
|
+
knowledgeId: {
|
|
178
|
+
type: String,
|
|
179
|
+
default: '',
|
|
180
|
+
},
|
|
181
|
+
previewOssPath: {
|
|
182
|
+
type: String,
|
|
183
|
+
default: '',
|
|
155
184
|
},
|
|
156
|
-
props:{
|
|
157
|
-
url:{
|
|
158
|
-
type: String,
|
|
159
|
-
required: true,
|
|
160
|
-
},
|
|
161
|
-
officePreviewType:{
|
|
162
|
-
type: String,
|
|
163
|
-
default: ''
|
|
164
|
-
},
|
|
165
|
-
isMessageRecord:{
|
|
166
|
-
type: Boolean,
|
|
167
|
-
default:false,
|
|
168
|
-
},
|
|
169
|
-
sourceFileType:{
|
|
170
|
-
type: String,
|
|
171
|
-
default: '',
|
|
172
|
-
},
|
|
173
|
-
title: {
|
|
174
|
-
type: String,
|
|
175
|
-
default: ''
|
|
176
|
-
},
|
|
177
|
-
isHasChat:{
|
|
178
|
-
type:Boolean,
|
|
179
|
-
default:false
|
|
180
|
-
},
|
|
181
|
-
knowledgeId:{
|
|
182
|
-
type: String,
|
|
183
|
-
default: '',
|
|
184
|
-
},
|
|
185
|
-
previewOssPath:{
|
|
186
|
-
type: String,
|
|
187
|
-
default: '',
|
|
188
|
-
},
|
|
189
185
|
folderName: {
|
|
190
186
|
type: String,
|
|
191
187
|
default: '',
|
|
@@ -197,12 +193,7 @@ export default {
|
|
|
197
193
|
isLiBang: {
|
|
198
194
|
type: Boolean,
|
|
199
195
|
default: false
|
|
200
|
-
},
|
|
201
|
-
formKnowledgeManagement:{
|
|
202
|
-
type: Boolean,
|
|
203
|
-
default: false
|
|
204
|
-
}
|
|
205
|
-
},
|
|
196
|
+
}},
|
|
206
197
|
components: {
|
|
207
198
|
IntelligentSummary,
|
|
208
199
|
pdfPosition
|
|
@@ -212,71 +203,58 @@ export default {
|
|
|
212
203
|
if (value) {
|
|
213
204
|
this.$emit('open')
|
|
214
205
|
this.$nextTick(() => {
|
|
215
|
-
|
|
216
|
-
zoomElement(document.getElementById('pdf_container_view'))
|
|
217
|
-
}
|
|
218
|
-
})
|
|
219
|
-
} else {
|
|
220
|
-
this.$emit('close')
|
|
221
|
-
}
|
|
222
|
-
setTimeout(() => {
|
|
223
|
-
let previewIframe = document.getElementsByClassName('preview_iframe')
|
|
224
|
-
Array.from(previewIframe).forEach(item =>{
|
|
225
|
-
item.onload = () =>{
|
|
226
|
-
console.debug('previewIframe 106',previewIframe,this.drawer)
|
|
227
|
-
item.style.backgroundImage = 'none'
|
|
228
|
-
}
|
|
229
|
-
})
|
|
206
|
+
zoomElement(document.getElementById('drawer_content_pre'))
|
|
230
207
|
})
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
208
|
+
} else {
|
|
209
|
+
this.$emit('close')
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
showSummary: {
|
|
213
|
+
handler (val) {
|
|
214
|
+
// if (!val){
|
|
215
|
+
// this.$nextTick(() => {
|
|
216
|
+
// let preCon = document.querySelector('.pdf_view');
|
|
217
|
+
// if (preCon){
|
|
218
|
+
// preCon.style.height = 'calc(100% - ' + 50 + 'px)'
|
|
219
|
+
// }
|
|
220
|
+
// })
|
|
221
|
+
// } else {
|
|
222
|
+
// this.getSummarySuccess();
|
|
223
|
+
// }
|
|
224
|
+
if (val) {
|
|
225
|
+
this.getSummarySuccess();
|
|
247
226
|
}
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
knowledgeId: {
|
|
230
|
+
handler (val) {
|
|
231
|
+
if (val) {
|
|
232
|
+
this.getTextWatermark();
|
|
254
233
|
}
|
|
255
234
|
}
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
computed: {
|
|
238
|
+
pdfStyle () {
|
|
239
|
+
return {
|
|
240
|
+
paddingTop: this.isPc ? '30px' : '0', // 30px 是 加上外层的 20 流出 50的上边距展示 放大缩小操作栏
|
|
241
|
+
paddingBottom: this.tagIds > 1 ? '60px' : '0',
|
|
242
|
+
height: '100%'
|
|
243
|
+
}
|
|
256
244
|
},
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
// url += btoa(encodeURIComponent(this.url))
|
|
271
|
-
// } else {
|
|
272
|
-
// url += btoa(this.url)
|
|
273
|
-
// }
|
|
274
|
-
// }
|
|
275
|
-
url = url + this.url
|
|
276
|
-
url += '&officePreviewType=pdf'
|
|
277
|
-
if(this.watermark) {
|
|
278
|
-
url = this.watermark.textWatermarkValue ? (url += '&textWatermarkValue=' + this.watermark.textWatermarkValue) : url
|
|
279
|
-
url = this.watermark.visitorWatermarkValue ? (url += '&visitorWatermarkValue=' + this.watermark.visitorWatermarkValue) : url
|
|
245
|
+
previewUrl () {
|
|
246
|
+
console.debug('VUE_APP_ENV', process.env.VUE_APP_ENV)
|
|
247
|
+
let url = process.env.VUE_APP_ENV === 'production' ? 'https://kkfileview.askbot.cn/onlinePreview?url=' : 'https://test.open.askbot.cn/kkfileview/onlinePreview?url='
|
|
248
|
+
// if(this.url != '') {
|
|
249
|
+
// if(/[\u4E00-\u9FA5]+/g.test(this.url)) {
|
|
250
|
+
// url += btoa(encodeURIComponent(this.url))
|
|
251
|
+
// } else {
|
|
252
|
+
// url += btoa(this.url)
|
|
253
|
+
// }
|
|
254
|
+
// }
|
|
255
|
+
url = url + this.url
|
|
256
|
+
if (this.sourceFileType == '.ppt' || this.sourceFileType == '.pptx' || this.sourceFileType == '.pdf') {
|
|
257
|
+
url += '&officePreviewType=pdf'
|
|
280
258
|
}
|
|
281
259
|
console.log('textWatermarkStr 216', this.textWatermarkStr)
|
|
282
260
|
if (this.textWatermarkStr) {
|
|
@@ -395,10 +373,6 @@ export default {
|
|
|
395
373
|
})
|
|
396
374
|
},
|
|
397
375
|
downLoad () {
|
|
398
|
-
if (this.formKnowledgeManagement){
|
|
399
|
-
this.$emit('downLoad',this.previewOssPath);
|
|
400
|
-
return
|
|
401
|
-
}
|
|
402
376
|
let url = this.previewOssPath
|
|
403
377
|
if (decodeURIComponent(url) != url) {
|
|
404
378
|
url = decodeURIComponent(url)
|
|
@@ -410,7 +384,7 @@ export default {
|
|
|
410
384
|
}
|
|
411
385
|
}).then(res => {
|
|
412
386
|
console.log('downLoad 341', res)
|
|
413
|
-
if (res.data|| res.bodyText) {
|
|
387
|
+
if (res.data || res.bodyText) {
|
|
414
388
|
if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
|
|
415
389
|
this.copy = res.data
|
|
416
390
|
if (isMobile()) {
|
|
@@ -423,7 +397,7 @@ export default {
|
|
|
423
397
|
selection.addRange(range);
|
|
424
398
|
document.execCommand('copy');
|
|
425
399
|
selection.removeAllRanges()
|
|
426
|
-
Toast(
|
|
400
|
+
Toast('下载地址已复制,请前往Safari浏览器访问下载');
|
|
427
401
|
this.close()
|
|
428
402
|
},100)
|
|
429
403
|
} else {
|
|
@@ -439,17 +413,16 @@ export default {
|
|
|
439
413
|
// }, 2000)
|
|
440
414
|
// window.open(res.data,'下载', 'noopener')
|
|
441
415
|
if (isMobile()) {
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
iframe.setAttribute("src", res.data );
|
|
416
|
+
const iframe = document.createElement("iframe");
|
|
417
|
+
iframe.setAttribute("hidden", "hidden");
|
|
418
|
+
iframe.onload = () => {
|
|
419
|
+
if (iframe) {
|
|
420
|
+
console.log("iframe onload....")
|
|
421
|
+
iframe.setAttribute('src', 'about:blank');
|
|
422
|
+
}
|
|
423
|
+
};
|
|
424
|
+
document.body.insertBefore(iframe, null);
|
|
425
|
+
iframe.setAttribute("src", res.data);
|
|
453
426
|
} else {
|
|
454
427
|
let a = document.createElement('a')
|
|
455
428
|
a.href = res.data
|
|
@@ -457,7 +430,7 @@ export default {
|
|
|
457
430
|
a.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true, view: window }))
|
|
458
431
|
}
|
|
459
432
|
this.close()
|
|
460
|
-
}
|
|
433
|
+
}
|
|
461
434
|
}
|
|
462
435
|
})
|
|
463
436
|
},
|
|
@@ -538,7 +511,6 @@ export default {
|
|
|
538
511
|
height: 100%;
|
|
539
512
|
}
|
|
540
513
|
|
|
541
|
-
|
|
542
514
|
.preview_iframe_html {
|
|
543
515
|
width: 100%;
|
|
544
516
|
height: 100%;
|
|
@@ -634,7 +606,6 @@ justify-content: space-between;
|
|
|
634
606
|
.header-right {
|
|
635
607
|
display: flex;
|
|
636
608
|
}
|
|
637
|
-
|
|
638
609
|
.summaryBtn {
|
|
639
610
|
flex: none;
|
|
640
611
|
//width: 95px;
|
|
@@ -701,9 +672,9 @@ justify-content: space-between;
|
|
|
701
672
|
justify-content: space-between;
|
|
702
673
|
line-height: 26px;
|
|
703
674
|
.title_left {
|
|
704
|
-
white-space: nowrap; /* 确保文本不会换行 */
|
|
705
|
-
overflow: hidden; /* 隐藏超出容器的文本 */
|
|
706
|
-
text-overflow: ellipsis; /* 当文本超出容器时显示省略号 */
|
|
675
|
+
white-space: nowrap; /* 确保文本不会换行 */
|
|
676
|
+
overflow: hidden; /* 隐藏超出容器的文本 */
|
|
677
|
+
text-overflow: ellipsis; /* 当文本超出容器时显示省略号 */
|
|
707
678
|
margin-right: 8px;
|
|
708
679
|
}
|
|
709
680
|
}
|
|
@@ -736,6 +707,10 @@ justify-content: space-between;
|
|
|
736
707
|
overflow: auto;
|
|
737
708
|
height: calc(100% - 50px);
|
|
738
709
|
background: #FFF;
|
|
710
|
+
background-image: url('https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif');
|
|
711
|
+
background-position: center;
|
|
712
|
+
background-size: 50px;
|
|
713
|
+
background-repeat: no-repeat;
|
|
739
714
|
}
|
|
740
715
|
|
|
741
716
|
.libang_content_pre {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="">
|
|
3
3
|
<span v-if="messagePlateform == 'IM'">
|
|
4
|
-
|
|
4
|
+
IM人工 <span class="text_color">{{payload.newSession.receiverDisplayInfo.name}}</span> 将为您服务
|
|
5
5
|
</span>
|
|
6
6
|
<span v-if="messagePlateform == 'BOT'">
|
|
7
|
-
<span class="text_color">{{payload.newSession.receiverDisplayInfo.name}}</span>  
|
|
7
|
+
<span class="text_color">{{payload.newSession.receiverDisplayInfo.name}}</span> 将为您服务
|
|
8
8
|
</span>
|
|
9
9
|
<span v-if="messagePlateform == 'Transfer' && (isShow === true || isShow === null)">
|
|
10
|
-
<span class="text_color">{{payload.oldSession.receiverDisplayInfo.name}}</span>  
|
|
10
|
+
<span class="text_color">{{payload.oldSession.receiverDisplayInfo.name}}</span> 将会话转接给 <span class="text_color">{{payload.newSession.receiverDisplayInfo.name}}</span>
|
|
11
11
|
</span>
|
|
12
12
|
</div>
|
|
13
13
|
</template>
|
|
@@ -20,7 +20,7 @@ export default {
|
|
|
20
20
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
|
-
props:['source','payload',
|
|
23
|
+
props:['source','payload', 'isShow'],
|
|
24
24
|
computed: {
|
|
25
25
|
messagePlateform() {
|
|
26
26
|
if(this.payload) {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
<!-- v-if="msgContent.totalCount > msgContent.knowledgeFileInfos.length" -->
|
|
32
32
|
|
|
33
33
|
<div class="load_moreKnowledge" v-if="page < msgContent.totalPages" @click="loadMore">
|
|
34
|
-
<span
|
|
34
|
+
<span>查看更多</span>
|
|
35
35
|
</div>
|
|
36
36
|
</div>
|
|
37
37
|
<previewPdf ref="previewPdf"
|
|
@@ -92,11 +92,7 @@ export default {
|
|
|
92
92
|
bindCode:{
|
|
93
93
|
type: String,
|
|
94
94
|
default: ''
|
|
95
|
-
}
|
|
96
|
-
language:{
|
|
97
|
-
type: String,
|
|
98
|
-
default: 'en'
|
|
99
|
-
}
|
|
95
|
+
}
|
|
100
96
|
},
|
|
101
97
|
data () {
|
|
102
98
|
return {
|
|
@@ -39,11 +39,7 @@ export default {
|
|
|
39
39
|
clickFun (item) {
|
|
40
40
|
this.$emit('llmCardClickFun', item)
|
|
41
41
|
}
|
|
42
|
-
}
|
|
43
|
-
mounted() {
|
|
44
|
-
let languageCode = sessionStorage.getItem('languageCode');
|
|
45
|
-
console.log('languageCode',languageCode,this.$i18n.locale,localStorage.getItem('languageCode'))
|
|
46
|
-
}
|
|
42
|
+
}
|
|
47
43
|
};
|
|
48
44
|
</script>
|
|
49
45
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<div class="title_desc">{{ msg.content.problemRecommendationDesc }}</div>
|
|
5
5
|
<div class="title_change_batch" v-if="msg.content.page && msg.content.problemRecommendationValue.length > msg.content.pageCount" @click="changeBatch">
|
|
6
6
|
<i class="iconfont guoran-tongyichicun-huanyipi"></i>
|
|
7
|
-
<span
|
|
7
|
+
<span>换一批</span>
|
|
8
8
|
</div>
|
|
9
9
|
</div>
|
|
10
10
|
<div class="content">
|
package/src/main.js
CHANGED
|
@@ -16,23 +16,6 @@ Vue.use(vConsole);*/
|
|
|
16
16
|
import $ from 'jquery'
|
|
17
17
|
Vue.prototype._$ = $;
|
|
18
18
|
Vue.use(Vant);
|
|
19
|
-
import VueI18n from 'vue-i18n'; //多语言
|
|
20
|
-
|
|
21
|
-
// 导入多语言的 JSON 文件
|
|
22
|
-
import enLocale from './locales/en.json';
|
|
23
|
-
import cnLocale from './locales/cn.json';
|
|
24
|
-
|
|
25
|
-
Vue.use(VueI18n);
|
|
26
|
-
console.log('languageCode',sessionStorage.getItem('languageCode'))
|
|
27
|
-
// 创建 VueI18n 实例,并设置默认语言和多语言内容
|
|
28
|
-
const i18n = new VueI18n({
|
|
29
|
-
locale: sessionStorage.getItem('languageCode') || 'cn', // 默认语言
|
|
30
|
-
messages: {
|
|
31
|
-
en: enLocale, // 英文
|
|
32
|
-
cn: cnLocale, // 中文
|
|
33
|
-
// 其他语言...
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
19
|
Date.prototype.Format = function (fmt) { //author: meizz
|
|
37
20
|
var o = {
|
|
38
21
|
"M+": this.getMonth() + 1, //月份
|
|
@@ -70,6 +53,5 @@ Vue.prototype.requestUrl = requestUrl;
|
|
|
70
53
|
Vue.prototype.utils = utils;
|
|
71
54
|
|
|
72
55
|
new Vue({
|
|
73
|
-
i18n,
|
|
74
56
|
render: h => h(App),
|
|
75
57
|
}).$mount('#app')
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<el-image-viewer :zIndex="999999" :on-close="closeViewer" :url-list="urlList" />
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
import ElementUI from 'element-ui';
|
|
9
|
-
// import ElImageViewer from ElementUI.Image.components.ImageViewer;
|
|
10
|
-
|
|
11
|
-
export default {
|
|
12
|
-
name: "imgView",
|
|
13
|
-
components: {
|
|
14
|
-
ElImageViewer: ElementUI.Image.components.ImageViewer
|
|
15
|
-
},
|
|
16
|
-
data () {
|
|
17
|
-
return {};
|
|
18
|
-
},
|
|
19
|
-
props: ["urlList"],
|
|
20
|
-
methods: {
|
|
21
|
-
closeViewer () {
|
|
22
|
-
// 关闭组件后从父级dom销毁这个挂载
|
|
23
|
-
if (this.$el.parentNode) {
|
|
24
|
-
this.$el.parentNode.removeChild(this.$el);
|
|
25
|
-
}
|
|
26
|
-
this.$emit("closeViewer");
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
</script>
|
|
31
|
-
|
|
32
|
-
<style scoped></style>
|