askbot-dragon 1.5.76-beta → 1.5.77-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 +1 -1
- package/src/assets/js/hammer.js +13 -2
- package/src/assets/less/converSationContainer/common.less +7 -0
- package/src/components/AnswerDocknowledge.vue +42 -3
- package/src/components/ConversationContainer.vue +46 -14
- package/src/components/askVideo.vue +24 -1
- package/src/components/associationIntention.vue +1 -1
- package/src/components/newPdfPosition.vue +878 -0
- package/src/components/pdfPosition.vue +261 -62
- package/src/components/previewPdf.vue +21 -8
- package/src/components/utils/ckeditorfileUpload/common.js +1 -0
package/package.json
CHANGED
package/src/assets/js/hammer.js
CHANGED
|
@@ -3,6 +3,15 @@ export function zoomElement (el) {
|
|
|
3
3
|
let store = {
|
|
4
4
|
scale: 1
|
|
5
5
|
};
|
|
6
|
+
if (!el){
|
|
7
|
+
return
|
|
8
|
+
}
|
|
9
|
+
let scale = 1;
|
|
10
|
+
if (el.style.transform){
|
|
11
|
+
let transForm = el.style.transform;
|
|
12
|
+
var values = transForm.split('(')[1].split(')')[0].split(',');
|
|
13
|
+
scale = values[0] ? values[0] : 1
|
|
14
|
+
}
|
|
6
15
|
// 缩放事件的处理
|
|
7
16
|
el.addEventListener('touchstart', function (event) {
|
|
8
17
|
let touches = event.touches;
|
|
@@ -67,13 +76,15 @@ export function zoomElement (el) {
|
|
|
67
76
|
newScale = 3;
|
|
68
77
|
}
|
|
69
78
|
// 最小缩放比例限制
|
|
70
|
-
if(newScale <
|
|
71
|
-
newScale =
|
|
79
|
+
if(newScale < scale) {
|
|
80
|
+
newScale = scale;
|
|
72
81
|
}
|
|
73
82
|
// 记住使用的缩放值
|
|
74
83
|
store.scale = newScale;
|
|
75
84
|
// 图像应用缩放效果
|
|
76
85
|
el.style.transform = 'scale(' + newScale + ')';
|
|
86
|
+
el.style.transformOrigin = 'top left'
|
|
87
|
+
|
|
77
88
|
}
|
|
78
89
|
});
|
|
79
90
|
document.addEventListener('touchend', function () {
|
|
@@ -35,6 +35,13 @@
|
|
|
35
35
|
border-radius: 6px;
|
|
36
36
|
background-color: #bfceec !important;
|
|
37
37
|
}
|
|
38
|
+
@media screen and (max-width: 767px){
|
|
39
|
+
::-webkit-scrollbar {
|
|
40
|
+
width: 0;
|
|
41
|
+
height: 0;
|
|
42
|
+
background-color:@system_bordercolor_4;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
38
45
|
|
|
39
46
|
// 弹窗body
|
|
40
47
|
.el-dialog__body{
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
</div>
|
|
68
68
|
</div>
|
|
69
69
|
</div>
|
|
70
|
-
<previewPdf ref="previewPdf" :url="previewHref" :sourceFileType="sourceFileType" officePreviewType="pdf"></previewPdf>
|
|
70
|
+
<previewPdf ref="previewPdf" :url="previewHref" :watermark="watermark" :sourceFileType="sourceFileType" officePreviewType="pdf"></previewPdf>
|
|
71
71
|
</div>
|
|
72
72
|
</template>
|
|
73
73
|
|
|
@@ -151,6 +151,11 @@ export default {
|
|
|
151
151
|
MP3: "audio",
|
|
152
152
|
yqhtml: "yqhtml",
|
|
153
153
|
feishuhtml:"feishuhtml"
|
|
154
|
+
},
|
|
155
|
+
watermark: {
|
|
156
|
+
textWatermarkValue:'',
|
|
157
|
+
visitorWatermarkValue:'',
|
|
158
|
+
source:""
|
|
154
159
|
}
|
|
155
160
|
}
|
|
156
161
|
},
|
|
@@ -198,6 +203,9 @@ export default {
|
|
|
198
203
|
methods: {
|
|
199
204
|
//预览图片
|
|
200
205
|
lookAttach(url, item, event) {
|
|
206
|
+
// console.log(item.knowledgeId);
|
|
207
|
+
// this.$http.get("/knowledge-api/internal/knowledgeBaseStructure/" + "642ffbccde420e2772f7787b")
|
|
208
|
+
// debugger
|
|
201
209
|
event.preventDefault();
|
|
202
210
|
if (this.isAskLightning == 1 && !this.isApp){
|
|
203
211
|
window.parent.postMessage({
|
|
@@ -230,8 +238,10 @@ export default {
|
|
|
230
238
|
}
|
|
231
239
|
this.$http.post(httpUrl, {
|
|
232
240
|
"fileInOssPath":url
|
|
233
|
-
}).then(res =>{
|
|
241
|
+
}).then(async res =>{
|
|
234
242
|
if(res.data.code == '0') {
|
|
243
|
+
this.watermark = await this.getknowledgeBaseStructure(item.knowledgeId);
|
|
244
|
+
this.watermark.source = item.source;
|
|
235
245
|
this.previewHref = res.data.data;
|
|
236
246
|
this.sourceFileType = url.substring(url.lastIndexOf('.'))
|
|
237
247
|
let isOhmPc = sessionStorage.getItem('isOhmPc')
|
|
@@ -244,7 +254,18 @@ export default {
|
|
|
244
254
|
}
|
|
245
255
|
this.$refs.previewPdf.fileType = type
|
|
246
256
|
this.$refs.previewPdf.tagIds = item.tagIds
|
|
247
|
-
this.$refs.previewPdf.isMessageRecord = this.isMessageRecord ? true : false
|
|
257
|
+
this.$refs.previewPdf.isMessageRecord = this.isMessageRecord ? true : false ;
|
|
258
|
+
let index = url.indexOf("?");
|
|
259
|
+
let newFileInOssPath = url;
|
|
260
|
+
if (index !== -1){
|
|
261
|
+
newFileInOssPath = url.substring(0, url.indexOf("?"))
|
|
262
|
+
}
|
|
263
|
+
let fileName = newFileInOssPath.substring(newFileInOssPath.lastIndexOf('.'))
|
|
264
|
+
if (fileName === '.doc' || fileName === '.docx' || fileName === '.txt'|| fileName === '.html'){
|
|
265
|
+
this.$refs.previewPdf.fileName = fileName;
|
|
266
|
+
} else {
|
|
267
|
+
this.$refs.previewPdf.fileName = '';
|
|
268
|
+
}
|
|
248
269
|
if(item.tagIds && item.tagIds.length != 0) {
|
|
249
270
|
this.$refs.previewPdf.loading = false
|
|
250
271
|
return
|
|
@@ -295,6 +316,24 @@ export default {
|
|
|
295
316
|
// return res.data
|
|
296
317
|
})
|
|
297
318
|
// return imgurl
|
|
319
|
+
},
|
|
320
|
+
async getknowledgeBaseStructure(knowledgeId) {
|
|
321
|
+
let watermark = {
|
|
322
|
+
textWatermarkValue:'',
|
|
323
|
+
visitorWatermarkValue:''
|
|
324
|
+
}
|
|
325
|
+
await this.$http.get("/knowledge-api/internal/knowledgeBaseStructure/" + knowledgeId).then( async res =>{
|
|
326
|
+
if(res.data) {
|
|
327
|
+
watermark.textWatermarkValue = await res.data.textWatermarkValue
|
|
328
|
+
if(res.data.visitorWatermark) {
|
|
329
|
+
let userInfo = sessionStorage.getItem('userInfo') || localStorage.getItem('userInfo')
|
|
330
|
+
if(userInfo && userInfo !== 'null') {
|
|
331
|
+
watermark.visitorWatermarkValue = JSON.parse(userInfo).realName
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
})
|
|
336
|
+
return watermark
|
|
298
337
|
}
|
|
299
338
|
}
|
|
300
339
|
}
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
</div> -->
|
|
35
35
|
|
|
36
36
|
<text-message :text="text" @submitClick="submitClick"></text-message>
|
|
37
|
-
|
|
37
|
+
<answer-docknowledge :isAskLightning="2" :msg="answerDocknowledge"></answer-docknowledge>
|
|
38
38
|
<!-- <voice-component @closeVoice="closeVoice">
|
|
39
39
|
<div slot="voiceTip">
|
|
40
40
|
松开发送
|
|
@@ -108,7 +108,7 @@ import AnswerVoice from "@/components/AnswerVoice";
|
|
|
108
108
|
// import ChatContent from "./chatContent";
|
|
109
109
|
// import FeedBack from '@/components/feedBack'
|
|
110
110
|
// 知识类型
|
|
111
|
-
|
|
111
|
+
import AnswerDocknowledge from "./AnswerDocknowledge.vue";
|
|
112
112
|
export default {
|
|
113
113
|
name: 'ConversationContainer',
|
|
114
114
|
components: {
|
|
@@ -134,7 +134,7 @@ export default {
|
|
|
134
134
|
FormTemplate,
|
|
135
135
|
// FileType,
|
|
136
136
|
// ChatContent,
|
|
137
|
-
|
|
137
|
+
AnswerDocknowledge,
|
|
138
138
|
},
|
|
139
139
|
props: {
|
|
140
140
|
messages: Array
|
|
@@ -191,17 +191,48 @@ export default {
|
|
|
191
191
|
answerDocknowledge:
|
|
192
192
|
// {"content":{"knowledgeId":"64915d6e098ec248701da267","actionType":"answer_doc_knowledge","text":"跳舞不仅要有实力,还要有好的穿搭,本文针对街舞爱好者提供了穿搭指南,给你带来灵感和帮助!","list":[{"tagIds":[],"format":"html","updateTime":"2023-06-20 16:03:58","source":"WECHAT","url":"https://guoranwisdom.oss-cn-zhangjiakou.aliyuncs.com/137993c6d830416696bbd771fc61d423/1937/2023/06/20/16/03/微信同步/52720/501775e41a724d7da06e66b3b4686407.html","knowledgeId":"64915d6e098ec248701da267","from":"跳舞要有范儿,穿搭占一半!快来get你的街舞穿搭指南~"}],"renderType":0,"type":0,"isKnowledgeSummary":true},"type":"answer_doc_knowledge","sessionId":1687251699065,"keyId":"1a079f48-ace3-4064-89b4-8a292c6a8a93_________","isKnowledgeSummary":true},
|
|
193
193
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
194
|
+
{
|
|
195
|
+
"conditionList": null,
|
|
196
|
+
"apiKey": null,
|
|
197
|
+
"effectiveTime": null,
|
|
198
|
+
"intentId": null,
|
|
199
|
+
"msgId": null,
|
|
200
|
+
"actionCategory": null,
|
|
201
|
+
"id": null,
|
|
202
|
+
"type": "answer_doc_knowledge",
|
|
203
|
+
"nodeId": null,
|
|
204
|
+
"content": {
|
|
205
|
+
"knowledgeId": null,
|
|
206
|
+
"actionType": "answer_doc_knowledge",
|
|
207
|
+
"images": null,
|
|
208
|
+
"knowledgePartId": null,
|
|
209
|
+
"srcContentId": null,
|
|
210
|
+
"text": "新能源车是指采用新型能源的轿车、客车、货车等机动车辆,包括纯电动汽车、插电式混合动力汽车和燃料电池汽车。根据数据显示,2020年我国新能源汽车销售量达到139万辆,同比增长10.9%。预计2021年新能源车市场将继续保持高速增长,销售量有望超过200万辆。政府对新能源汽车实行补贴政策,同时逐步放松对新能源车的限购和限行政策。此外,中国汽车企业在新能源车领域的技术研发能力也不断提升,各大品牌纷纷推出新能源车型,采用更优秀的动力电池和电控系统,提高了车辆的续航里程。因此,新能源车市场发展前景广阔。",
|
|
211
|
+
"list": [
|
|
212
|
+
{
|
|
213
|
+
"owner": null,
|
|
214
|
+
"tagId": "6525183560177f6223d52a14",
|
|
215
|
+
"enterprise": null,
|
|
216
|
+
"tagIds": [
|
|
217
|
+
"6525183560177f6223d52a14"
|
|
218
|
+
],
|
|
219
|
+
"format": "docx",
|
|
220
|
+
"srcContentId": "99cada54a02161f979acc28c5b8b913e",
|
|
221
|
+
"updateTime": "2023-10-10 17:24:05",
|
|
222
|
+
"source": "CORP_LOCAL_FILE",
|
|
223
|
+
"srcContent": "新能源车指的是采用新型能源的轿车、客车、货车等机动车辆。目前主要的新能源车包括纯电动汽车、插电式混合动力汽车、燃料电池汽车等。以下是对新能源车的分析报告:市场发展趋势:随着环保和能源安全意识的增强,新能源车市场呈现快速发展态势。数据显示,2020年我国新能源汽车销售量达到139万辆,同比增长10.9%。预计2021年新能源车市场仍将保持高速增长,销售量有望达到200万辆以上。政策扶持力度加大:我国政府对新能源汽车实行补贴政策,以鼓励消费者选择绿色出行方式。此外,对新能源车限购、限行等政策也逐步放松。政策扶持的加大将进一步促进新能",
|
|
224
|
+
"url": "http://guoranwisdom.oss-cn-zhangjiakou.aliyuncs.com/43aadcaac45f4be19b63fd18ca68f2e6/2023/10/10/17/23/a27c5c1dd534d180c5512c907d5c9888/新能源车分析报告 (1).docx?uploadId=0921CB01AB5847E8BEF44730EE5DACF7",
|
|
225
|
+
"knowledgeId": "6525182f002ff5198983a90c",
|
|
226
|
+
"knowledgePartId": "YfHmGIsBvcIPGxbfkvwK",
|
|
227
|
+
"from": "新能源车分析报告 (1)",
|
|
228
|
+
"introduction": "新能源车指的是采用新型能源的轿车、客车、货车等机动车辆。目前主要的新能源车包括纯电动汽车、插电式混合动力汽车、燃料电池汽车等。以下是对新能源车的分析报告:市场发展趋势:随着环保和能源安全意识的增强,新能源车市场呈现快速发展态势。数据显示,2020年我国新能源汽车销售量达到139万辆,同比增长10.9%。预计2021年新能源车市场仍将保持高速增长,销售量有望达到200万辆以上。政策扶持力度加大:我国政府对新能源汽车实行补贴政策,以鼓励消费者选择绿色出行方式。此外,对新能源车限购、限行等政策也逐步放松。政策扶持的加大将进一步促进新能"
|
|
229
|
+
}
|
|
230
|
+
],
|
|
231
|
+
"renderType": 0,
|
|
232
|
+
"type": 0,
|
|
233
|
+
"srcContent": null
|
|
234
|
+
}
|
|
235
|
+
},
|
|
205
236
|
ActionAiGuideObj: {
|
|
206
237
|
// 智能引导
|
|
207
238
|
type: "answer_intellect_guide",
|
|
@@ -4634,6 +4665,7 @@ export default {
|
|
|
4634
4665
|
url:
|
|
4635
4666
|
'https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/2021/08/24/07/35/41221223-c180-4f3f-bdc8-94875b693965/WeChat_20210719215122.mp4',
|
|
4636
4667
|
videoFlag: false,
|
|
4668
|
+
nodownload: false,
|
|
4637
4669
|
videoUploadPercent: 0,
|
|
4638
4670
|
isShowUploadVideo: true,
|
|
4639
4671
|
recommend: {
|
|
@@ -15,13 +15,16 @@
|
|
|
15
15
|
:controlslist="nodownload&&'nodownload'"
|
|
16
16
|
:raw-controls="true"
|
|
17
17
|
x5-video-player-type="h5-page"
|
|
18
|
-
style="object-fit: contain;width: calc(100vw -
|
|
18
|
+
style="object-fit: contain;width: calc(100vw - 169px);height: 160px;background-color: black;border-radius: 25px;max-width: 200px;padding-left: 10px"
|
|
19
19
|
preload
|
|
20
20
|
:poster="videoSrc+'?spm=qipa250&x-oss-process=video/snapshot,t_1000,f_jpg,w_0,h_0,m_fast'"
|
|
21
21
|
class="video-player vjs-custom-skin"
|
|
22
22
|
:id="msg.id+'key'">
|
|
23
23
|
<source :src="videoSrc"/>
|
|
24
24
|
</video>
|
|
25
|
+
<div v-show="!nodownload" class="dragon-video-download">
|
|
26
|
+
<a :href="msg.content.url" download><span class="el-icon-download"></span></a>
|
|
27
|
+
</div>
|
|
25
28
|
<div id="output"></div>
|
|
26
29
|
</div>
|
|
27
30
|
</template>
|
|
@@ -123,6 +126,8 @@
|
|
|
123
126
|
video::-webkit-media-controls-mute-button { display: none !important;}
|
|
124
127
|
#dragon-video{
|
|
125
128
|
position: relative;
|
|
129
|
+
width: calc(100vw - 109px);
|
|
130
|
+
max-width: 260px;
|
|
126
131
|
#outputVideo{
|
|
127
132
|
position: absolute;
|
|
128
133
|
top: 0px;
|
|
@@ -134,6 +139,24 @@ video::-webkit-media-controls-mute-button { display: none !important;}
|
|
|
134
139
|
}
|
|
135
140
|
|
|
136
141
|
}
|
|
142
|
+
.dragon-video-download{
|
|
143
|
+
position: absolute;
|
|
144
|
+
width: 40px;
|
|
145
|
+
height: 26px;
|
|
146
|
+
background-color: rgba(54, 106, 255, 0.5);
|
|
147
|
+
border-radius: 13px;
|
|
148
|
+
text-align: center;
|
|
149
|
+
bottom: 2px;
|
|
150
|
+
right: 6px;
|
|
151
|
+
a {
|
|
152
|
+
span {
|
|
153
|
+
height: 26px;
|
|
154
|
+
line-height: 26px;
|
|
155
|
+
display: block;
|
|
156
|
+
color: white;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
137
160
|
}
|
|
138
161
|
|
|
139
162
|
</style>
|