askbot-dragon 1.4.39 → 1.4.41
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/public/index.html +1 -1
- package/src/App.vue +3 -0
- package/src/components/AnswerDocknowledge.vue +38 -16
- package/src/components/ConversationContainer.vue +13 -39
- package/src/components/answerRadio.vue +30 -7
- package/src/components/pdfPosition.vue +6 -2
- package/src/components/previewPdf.vue +5 -2
package/package.json
CHANGED
package/public/index.html
CHANGED
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
<script src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/pdfJS2.1.266/pdf_viewer.js" referrerpolicy="no-referrer"></script>
|
|
39
39
|
<link rel="stylesheet" href="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/pdfJS2.1.266/pdf_viewer_01.css" referrerpolicy="no-referrer" />
|
|
40
40
|
<!-- hammer.js -->
|
|
41
|
-
|
|
41
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/hammer.js/2.0.8/hammer.min.js" integrity="sha512-UXumZrZNiOwnTcZSHLOfcTs0aos2MzBWHXOHOuB0J/R44QB0dwY5JgfbvljXcklVf65Gc4El6RjZ+lnwd2az2g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
|
42
42
|
<style>
|
|
43
43
|
*{
|
|
44
44
|
margin: 0;
|
package/src/App.vue
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="answer-docknowledge">
|
|
3
|
-
<div
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
3
|
+
<div :class="['header',msg.content.isKnowledgeSummary ? 'bgc' : '']">
|
|
4
|
+
<div v-if="msg.content.isKnowledgeSummary" class="tips">AI为您总结生成了以下摘要</div>
|
|
5
|
+
<div v-if="msg.content.type == 0" class="answer-text">
|
|
6
|
+
<template v-if="msg.content.renderType == 1">
|
|
7
|
+
<p v-html="msg.content.text"></p>
|
|
8
|
+
</template>
|
|
9
|
+
<template v-else>
|
|
10
|
+
{{ msg.content.text }}
|
|
11
|
+
</template>
|
|
12
|
+
</div>
|
|
13
|
+
<div v-if="msg.content.type == 1" class="answer-text">
|
|
14
|
+
<template v-if="msg.content.renderType == 1">
|
|
15
|
+
<p v-html="msg.content.text"></p>
|
|
16
|
+
</template>
|
|
17
|
+
<template v-else>
|
|
18
|
+
{{ msg.content.text }}
|
|
19
|
+
</template>
|
|
20
|
+
</div>
|
|
18
21
|
</div>
|
|
19
22
|
<div class="ad-list">
|
|
20
23
|
<div v-for="(item, itemIndex) in msg.content.list" :style="{paddingBottom: itemIndex === msg.content.list.length - 1?0:'10px'}" :key="itemIndex" class="ad-list-cell">
|
|
@@ -277,7 +280,26 @@ export default {
|
|
|
277
280
|
<style scoped lang="less">
|
|
278
281
|
.answer-docknowledge {
|
|
279
282
|
min-width: 100px;
|
|
280
|
-
|
|
283
|
+
.header{
|
|
284
|
+
|
|
285
|
+
&.bgc{
|
|
286
|
+
padding: 10px;
|
|
287
|
+
background: #EEF1FF;
|
|
288
|
+
border-radius: 10px;
|
|
289
|
+
}
|
|
290
|
+
.tips{
|
|
291
|
+
width: 154px;
|
|
292
|
+
height: 22px;
|
|
293
|
+
background: #366AFF;
|
|
294
|
+
border-radius: 5px;
|
|
295
|
+
text-align: center;
|
|
296
|
+
line-height: 22px;
|
|
297
|
+
color: #fff;
|
|
298
|
+
font-size: 12px;
|
|
299
|
+
margin-bottom: 7px;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
281
303
|
.answer-text {
|
|
282
304
|
// font-size: 13px;
|
|
283
305
|
text-align: left;
|
|
@@ -165,16 +165,18 @@ export default {
|
|
|
165
165
|
}]
|
|
166
166
|
}
|
|
167
167
|
},
|
|
168
|
-
answerDocknowledge: {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
},
|
|
168
|
+
answerDocknowledge: {"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},
|
|
169
|
+
|
|
170
|
+
// {
|
|
171
|
+
// "content":{
|
|
172
|
+
// "actionType":"answer_doc_knowledge",
|
|
173
|
+
// "text":"中国的省份名称有湖北省、广西壮族自治区等。",
|
|
174
|
+
// "list":[{"tagIds":[],"format":"yqhtml","srcContentId":"8ee0fa9bb5a89ea01f588843589bf931","updateTime":"2023-04-14 20:15:50","source":"YUQUE","srcContent":"功能概述分院科室的建立。分院科室医生关联。分院科室建立时,科室编码需要与集团提供的科室编码保持一致。科室维护进入扁鹊基础配置模块,如图进入科室维护界面进行科室新增输入科室信息进行科室增加。","url":"https://guoranwisdom.oss-cn-zhangjiakou.aliyuncs.com/yuque/7faaefde11374c7992c377731ea4dddc/dinga77cc098b0b5e113ee0f45d8e4f7c288/2023/4/14/19/54/31/acc2421dcfd04db39eba0c37e7d3b580.html","knowledgeId":"643940bb6cbe816b83ebbaaf","knowledgePartId":"lPexf4cBYkmDoUE2eSUt","from":"2.3 科室","introduction":"功能概述分院科室的建立。分院科室医生关联。分院科室建立时,科室编码需要与集团提供的科室编码保持一致。科室维护进入扁鹊基础配置模块,如图进入科室维护界面进行科室新增输入科室信息进行科室增加。"},{"tagIds":[],"format":"yqhtml","srcContentId":"8ee0fa9bb5a89ea01f588843589bf931","updateTime":"2023-04-13 23:19:48","source":"YUQUE","srcContent":"功能概述分院科室的建立。分院科室医生关联。分院科室建立时,科室编码需要与集团提供的科室编码保持一致。科室维护进入扁鹊基础配置模块,如图进入科室维护界面进行科室新增输入科室信息进行科室增加。","url":"https://guoranwisdom.oss-cn-zhangjiakou.aliyuncs.com/yuque/7faaefde11374c7992c377731ea4dddc/dinga77cc098b0b5e113ee0f45d8e4f7c288/2023/4/13/22/20/40/0e48cc7b15b34d2f84fe49fd1a89d606.html","knowledgeId":"643817509ab4545bef50db64","knowledgePartId":"NeYze4cBh77-s6lwjWOl","from":"2.12 重要异常科室对照","introduction":"功能概述分院科室的建立。分院科室医生关联。分院科室建立时,科室编码需要与集团提供的科室编码保持一致。科室维护进入扁鹊基础配置模块,如图进入科室维护界面进行科室新增输入科室信息进行科室增加。"},{"tagIds":['12312313123'],"format":"yqhtml","srcContentId":"8ee0fa9bb5a89ea01f588843589bf931","updateTime":"2023-04-13 23:19:02","source":"YUQUE","srcContent":"功能概述分院科室的建立。分院科室医生关联。分院科室建立时,科室编码需要与集团提供的科室编码保持一致。科室维护进入扁鹊基础配置模块,如图进入科室维护界面进行科室新增输入科室信息进行科室增加。","url":"https://guoranwisdom.oss-cn-zhangjiakou.aliyuncs.com/yuque/7faaefde11374c7992c377731ea4dddc/dinga77cc098b0b5e113ee0f45d8e4f7c288/2023/4/13/22/20/18/5cdf1295ec1649f6ab73948aa82ea810.html","knowledgeId":"643817509ab4545bef50db58","knowledgePartId":"Hvcye4cBYkmDoUE21h6V","from":"2.3 科室","introduction":"功能概述分院科室的建立。分院科室医生关联。分院科室建立时,科室编码需要与集团提供的科室编码保持一致。科室维护进入扁鹊基础配置模块,如图进入科室维护界面进行科室新增输入科室信息进行科室增加。"},{"tagId":"6475eab868110215ab821a7c","tagIds":["6475eab868110215ab821a7c"],"format":"xlsx","srcContentId":"0bf639060655ff3ec217484a2fc7827d","updateTime":"2023-05-30 20:28:21","source":"CORP_LOCAL_FILE","srcContent":"产品:外观,解释:VX50有两种套餐可下单: 套餐一:只购买VX50终端设备,不包含摄像头、麦克风 套餐二:除购买VX50终端设备外,可选购SC701云台摄像头及MC30/MC31麦克风","url":"https://guoranwisdom.oss-cn-zhangjiakou.aliyuncs.com/5ecf2fcd704541149201ab9c1c31162d/2023/05/30/20/11/85b7b2a5f61e2b060387656e88c02d50/VX30与VX50对比表.xlsx","knowledgeId":"6475e7eac724c54c46cbfa2d","knowledgePartId":"T_uhbIgB3v-0X8BLeDAh","from":"VX30与VX50对比表","introduction":"产品:外观,解释:VX50有两种套餐可下单: 套餐一:只购买VX50终端设备,不包含摄像头、麦克风 套餐二:除购买VX50终端设备外,可选购SC701云台摄像头及MC30/MC31麦克风"}],
|
|
175
|
+
// "renderType":0,
|
|
176
|
+
// "type":0
|
|
177
|
+
// },
|
|
178
|
+
// "type":"answer_doc_knowledge"
|
|
179
|
+
// },
|
|
178
180
|
ActionAiGuideObj: {
|
|
179
181
|
// 智能引导
|
|
180
182
|
type: "answer_intellect_guide",
|
|
@@ -3940,35 +3942,7 @@ export default {
|
|
|
3940
3942
|
]
|
|
3941
3943
|
}
|
|
3942
3944
|
},
|
|
3943
|
-
answerRadios: {
|
|
3944
|
-
msgId: 123456789,
|
|
3945
|
-
content: {
|
|
3946
|
-
description: '请点击下方选项继续测试',
|
|
3947
|
-
options: [
|
|
3948
|
-
{
|
|
3949
|
-
name: '跳转节点',
|
|
3950
|
-
scope: 'NODE',
|
|
3951
|
-
value: '60177b9470814d4ce924f1ed'
|
|
3952
|
-
},
|
|
3953
|
-
{
|
|
3954
|
-
name: '跳转意图',
|
|
3955
|
-
scope: 'INTENT',
|
|
3956
|
-
value: '3558'
|
|
3957
|
-
},
|
|
3958
|
-
{
|
|
3959
|
-
name: '跳转节点2',
|
|
3960
|
-
scope: 'NODE',
|
|
3961
|
-
value: '60af4505d0acd7017620c4f2'
|
|
3962
|
-
}
|
|
3963
|
-
],
|
|
3964
|
-
recommend: {
|
|
3965
|
-
description: '',
|
|
3966
|
-
status: false,
|
|
3967
|
-
list: []
|
|
3968
|
-
}
|
|
3969
|
-
},
|
|
3970
|
-
type: 'answer_radio'
|
|
3971
|
-
},
|
|
3945
|
+
answerRadios: {"content":{"options":[{"scope":"KNOWLEDGE","name":"本文提供了什么内容?","value":"64915d6e098ec248701da267"},{"scope":"KNOWLEDGE","name":"什么是街舞穿搭指南?","value":"64915d6e098ec248701da267"},{"scope":"KNOWLEDGE","name":"为什么街舞爱好者需要关注本文?","value":"64915d6e098ec248701da267"}],"description":"了解更多","isKnowledgeSummary":true},"id":"knowledgeRecdNodeId","type":"answer_radio","sessionId":1687251699065,"keyId":"139480f2-5af1-44fd-a7bd-a73dd7b566b7_________","isKnowledgeSummary":true},
|
|
3972
3946
|
htmlContainer: '<input placeholder="请输入"></input>',
|
|
3973
3947
|
isOpen: true
|
|
3974
3948
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div id="answer-radio">
|
|
3
|
-
<p class="radio-description" v-html="msg.content.description" v-if="msg.content.description"></p>
|
|
3
|
+
<p class="radio-description" v-html="msg.content.description" v-if="msg.content.description && !msg.content.isKnowledgeSummary"></p>
|
|
4
4
|
<div class="bottom-link" v-if="msg.content.description"></div>
|
|
5
|
-
<div class="options-list">
|
|
5
|
+
<div :class="['options-list',msg.content.isKnowledgeSummary ? 'isKnowledgeSummary' : '']">
|
|
6
|
+
<div v-if="msg.content.isKnowledgeSummary" class="tips">AI为您推荐了以下内容</div>
|
|
6
7
|
<div
|
|
7
8
|
v-for="(option, index) in msg.content.options"
|
|
8
9
|
class="options-item"
|
|
@@ -13,10 +14,10 @@
|
|
|
13
14
|
'onRadioClick',msg.id +'_' + index + '_' + option.value + '_' + option.name,option.name, msg.apiKey,msg.actionCategory, msg.msgId?msg.msgId:''
|
|
14
15
|
)">
|
|
15
16
|
|
|
16
|
-
<el-tooltip class="item" effect="dark" :content="option.name" placement="bottom-start" v-if="!isMobile">
|
|
17
|
-
<span
|
|
18
|
-
</el-tooltip>
|
|
19
|
-
<span
|
|
17
|
+
<!-- <el-tooltip class="item" effect="dark" :content="option.name" placement="bottom-start" v-if="!isMobile">
|
|
18
|
+
<span > {{ option.name }}</span>
|
|
19
|
+
</el-tooltip> -->
|
|
20
|
+
<span> {{ option.name }}</span>
|
|
20
21
|
<i class="arsenal_icon arsenalangle-right-solid"></i>
|
|
21
22
|
</div>
|
|
22
23
|
</div>
|
|
@@ -33,6 +34,7 @@ export default {
|
|
|
33
34
|
},
|
|
34
35
|
props:['msg'],
|
|
35
36
|
mounted(){
|
|
37
|
+
console.log(this.msg,'msg');
|
|
36
38
|
this.judgeIsMobile();
|
|
37
39
|
},
|
|
38
40
|
methods:{
|
|
@@ -71,8 +73,9 @@ export default {
|
|
|
71
73
|
padding-top: 4px;
|
|
72
74
|
/* padding-top: 10px;*/
|
|
73
75
|
/*padding-right: 10px;*/
|
|
76
|
+
|
|
74
77
|
.options-item{
|
|
75
|
-
height: 25px;
|
|
78
|
+
// height: 25px;
|
|
76
79
|
line-height: 25px;
|
|
77
80
|
background-color: #ffffff;
|
|
78
81
|
color: #366aff;
|
|
@@ -80,6 +83,8 @@ export default {
|
|
|
80
83
|
display: flex;
|
|
81
84
|
align-items: center;
|
|
82
85
|
justify-content: space-between;
|
|
86
|
+
|
|
87
|
+
|
|
83
88
|
i{
|
|
84
89
|
padding-left: 10px;
|
|
85
90
|
}
|
|
@@ -94,6 +99,24 @@ export default {
|
|
|
94
99
|
white-space:pre-line; //
|
|
95
100
|
}
|
|
96
101
|
}
|
|
102
|
+
&.isKnowledgeSummary{
|
|
103
|
+
background: #EEF1FF;
|
|
104
|
+
border-radius: 10px;
|
|
105
|
+
padding: 10px;
|
|
106
|
+
.options-item{
|
|
107
|
+
background: #EEF1FF;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
.tips{
|
|
111
|
+
width: 131px;
|
|
112
|
+
height: 22px;
|
|
113
|
+
background: #366AFF;
|
|
114
|
+
border-radius: 5px;
|
|
115
|
+
text-align: center;
|
|
116
|
+
line-height: 22px;
|
|
117
|
+
color: #fff;
|
|
118
|
+
font-size: 12px;
|
|
119
|
+
}
|
|
97
120
|
.recommend-item{
|
|
98
121
|
padding: 8px 0;
|
|
99
122
|
}
|
|
@@ -305,9 +305,12 @@ export default {
|
|
|
305
305
|
if(this.transformSalce !== null) {
|
|
306
306
|
startNum = Math.ceil(this.$refs.pdfView.scrollTop / ((this.pageSize.height + this.PAGE_INTVERVAL) * this.transformSalce))
|
|
307
307
|
endNum = startNum + Math.ceil(height / ((this.pageSize.height + this.PAGE_INTVERVAL) * this.transformSalce))
|
|
308
|
+
console.log( Math.ceil(height / ((this.pageSize.height + this.PAGE_INTVERVAL) * this.transformSalce)),this.pageSize.height , this.PAGE_INTVERVAL, height, this.transformSalce,'startNum');
|
|
309
|
+
|
|
308
310
|
} else {
|
|
309
311
|
startNum = Math.ceil(this.$refs.pdfView.scrollTop / (this.pageSize.height + this.PAGE_INTVERVAL))
|
|
310
312
|
endNum = startNum + Math.ceil(height / (this.pageSize.height + this.PAGE_INTVERVAL))
|
|
313
|
+
|
|
311
314
|
}
|
|
312
315
|
for (let pageIndex = startNum; pageIndex <= endNum; pageIndex++) {
|
|
313
316
|
if(pageIndex > 0 && pageIndex <= this.pages.length) {
|
|
@@ -351,6 +354,7 @@ export default {
|
|
|
351
354
|
that.loadPdfData(pageIndex)
|
|
352
355
|
}
|
|
353
356
|
}
|
|
357
|
+
console.log('=======');
|
|
354
358
|
}, 200),
|
|
355
359
|
directScrolling (e, that) {
|
|
356
360
|
if (this.fisrtLoad) {
|
|
@@ -386,12 +390,12 @@ export default {
|
|
|
386
390
|
let j = pageIndex + 1;
|
|
387
391
|
// pageIndex - 1 表示当前页码数 对应的下标位置
|
|
388
392
|
pagesToRender.push(this.pages[pageIndex - 1]);
|
|
389
|
-
while (pagesToRender.length <
|
|
393
|
+
while (pagesToRender.length < 8 && pagesToRender.length < this.pages.length) {
|
|
390
394
|
if (i > 0) {
|
|
391
395
|
pagesToRender.push(this.pages[i - 1]);
|
|
392
396
|
i -= 1;
|
|
393
397
|
}
|
|
394
|
-
if (pagesToRender.length >=
|
|
398
|
+
if (pagesToRender.length >= 8) {
|
|
395
399
|
break;
|
|
396
400
|
}
|
|
397
401
|
if (j <= this.pages.length) {
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
|
|
85
85
|
<script>
|
|
86
86
|
import pdfPosition from './pdfPosition.vue'
|
|
87
|
-
import { zoomElement } from '../assets/js/hammer'
|
|
87
|
+
// import { zoomElement } from '../assets/js/hammer'
|
|
88
88
|
export default {
|
|
89
89
|
data () {
|
|
90
90
|
return {
|
|
@@ -99,7 +99,7 @@ export default {
|
|
|
99
99
|
}
|
|
100
100
|
},
|
|
101
101
|
mounted() {
|
|
102
|
-
zoomElement(document.getElementById('drawer_content_pre'))
|
|
102
|
+
// zoomElement(document.getElementById('drawer_content_pre'))
|
|
103
103
|
},
|
|
104
104
|
props:{
|
|
105
105
|
url:{
|
|
@@ -259,4 +259,7 @@ export default {
|
|
|
259
259
|
/deep/.el-drawer__body{
|
|
260
260
|
height: 100%;
|
|
261
261
|
}
|
|
262
|
+
#drawer_content_pre {
|
|
263
|
+
height: 100%;
|
|
264
|
+
}
|
|
262
265
|
</style>
|