askbot-dragon 1.7.29-beta → 1.7.31-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 +2 -4
- package/src/assets/js/AliyunlssUtil.js +9 -32
- package/src/components/AiGuide.vue +1 -1
- package/src/components/AnswerDocknowledge.vue +257 -245
- package/src/components/ConversationContainer.vue +17 -6
- package/src/components/MyEditor.vue +11 -2
- package/src/components/QwFeedback.vue +302 -0
- package/src/components/actionSatisfaction.vue +2 -2
- package/src/components/answerRadio.vue +2 -2
- package/src/components/askVideo.vue +2 -2
- package/src/components/assetDetails.vue +1 -1
- package/src/components/assetMessage.vue +12 -10
- package/src/components/fielListView.vue +1 -1
- package/src/components/formTemplate.vue +14 -4
- package/src/components/intelligentSummary.vue +12 -14
- package/src/components/myPopup.vue +10 -10
- package/src/components/pdfPosition.vue +58 -66
- package/src/components/popup.vue +7 -7
- package/src/components/previewPdf.vue +21 -16
- package/src/components/receiverMessagePlatform.vue +19 -20
- package/src/components/senderMessagePlatform.vue +10 -15
- package/src/components/tree.vue +2 -2
- package/src/components/utils/AliyunIssUtil.js +12 -33
- package/src/components/utils/ckeditor.js +48 -59
- package/src/components/welcomeKnowledgeFile.vue +1 -1
- package/src/components/welcomeSuggest.vue +1 -1
- package/src/main.js +0 -16
- package/src/components/imgView.vue +0 -32
- package/src/components/markDownText.vue +0 -164
- package/src/locales/cn.json +0 -60
- package/src/locales/en.json +0 -60
|
@@ -4,163 +4,179 @@
|
|
|
4
4
|
-->
|
|
5
5
|
<template>
|
|
6
6
|
<div class="answer-docknowledge">
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
<div v-if="msg.content.images && msg.content.images.length != 0" class="answer-kn-image-box">
|
|
21
|
-
<img v-for="(imageItem, imageItemIndex) in msg.content.images"
|
|
22
|
-
style="max-width: 230px;border-radius: 25px;margin-bottom: 15px" :src="imageItem.url"
|
|
23
|
-
:key="imageItemIndex" alt @click="lookAttach(imageItem.url, imageItem, $event)" />
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
<template v-if="!isLiBang">
|
|
27
|
-
<div class="ad-list" :class="msg.content.type == 0 ? 'ad-list-recognition' : ''">
|
|
28
|
-
<template v-if="msg.content.type == 1">
|
|
29
|
-
<div v-for="(item, itemIndex) in msg.content.list" :key="itemIndex"
|
|
30
|
-
:style="{ paddingBottom: itemIndex === msg.content.list.length - 1 ? 0 : '10px' }" class="ad-list-cell">
|
|
31
|
-
<div class="alc-title">
|
|
32
|
-
<div class="alc-box">
|
|
33
|
-
<div class="alc-source-left">
|
|
34
|
-
<span class="source-form">{{ $t('dragonCommon.from') }}</span>
|
|
35
|
-
<img class="alc-title-icon" height="24px" width="24px" :src="getIconSrc(item)" alt="" srcset="">
|
|
36
|
-
<span class="alc-title-from">{{ item.from }}</span>
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
39
|
-
<div v-html="item.introduction" v-if="!srcContentTypeIMG(item)" class="alc-box-introduction"></div>
|
|
40
|
-
<div v-else class="alc-box-introduction">
|
|
41
|
-
<img :src="item.expiredUrl" alt="" @click="lookAttach(item.url, item, $event)">
|
|
42
|
-
</div>
|
|
43
|
-
<div v-if="item.previewImage" class="alc-box-introduction-previewImage">
|
|
44
|
-
<img :src="item.previewImage" alt="" @click="lookAttach(item.previewImage, { url: item.previewImage }, $event)">
|
|
45
|
-
</div>
|
|
46
|
-
<div class="alc-updateTime">
|
|
47
|
-
<div v-show="docSource[item.source]" class="upload-source">
|
|
48
|
-
{{ docSource[item.source] }}
|
|
49
|
-
</div>
|
|
50
|
-
<div v-show="item.url" class="alc-content-text">
|
|
51
|
-
<span @click="lookAttach(item.url, item, $event)" class="aci-view">{{ $t('dragonCommon.viewOriginal') }}</span>
|
|
52
|
-
</div>
|
|
53
|
-
</div>
|
|
54
|
-
</div>
|
|
55
|
-
<div class="alc-content" v-if="false">
|
|
56
|
-
<div v-if="msg.content.type == 1" class="alc-content-text">
|
|
57
|
-
{{ item.introduction }}
|
|
58
|
-
<span @click="lookAttach(item.url, item, $event)" class="aci-view">{{ $t('dragonCommon.viewOriginal') }}</span>
|
|
59
|
-
</div>
|
|
60
|
-
<span v-if="!isPC" class="alc-title-updateTime">{{ $t('dragonCommon.lastUpdateTime') }}: {{ item.updateTime }}</span>
|
|
61
|
-
<div v-if="false" class="alc-content-info">
|
|
62
|
-
<div class="alcc-box">
|
|
63
|
-
<span class="aci-owner">{{ $t('dragonCommon.owner') }}: {{ item.owner }}</span>
|
|
64
|
-
<span class="aci-enterprise">{{ $t('dragonCommon.enterprise') }}: {{ item.enterprise }}</span>
|
|
65
|
-
<span class="aci-source">{{ $t('dragonCommon.source') }}: {{ item.source }}</span>
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
</div>
|
|
7
|
+
<div :class="['answer-docknowledge-header', msg.content.isKnowledgeSummary ? 'bgc' : '']">
|
|
8
|
+
<div v-if="msg.content.isKnowledgeSummary" class="tips">AI为您总结生成了以下摘要</div>
|
|
9
|
+
<!-- <div v-if="msg.content.type == 0" class="answer-text">
|
|
10
|
+
<template v-if="msg.content.renderType == 1">
|
|
11
|
+
<p v-html="msg.content.text"></p>
|
|
12
|
+
</template>
|
|
13
|
+
<template v-else>{{ msg.content.text }}</template>
|
|
14
|
+
</div> -->
|
|
15
|
+
<div class="answer-text">
|
|
16
|
+
<template v-if="msg.content.renderType == 1">
|
|
17
|
+
<p v-html="msg.content.text"></p>
|
|
18
|
+
</template>
|
|
19
|
+
<template v-else>{{ msg.content.text }}</template>
|
|
69
20
|
</div>
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
<img class="alc-title-icon" height="18px" width="18px" :src="getIconSrc(item)" alt srcset />
|
|
75
|
-
<span class="alc-title-from">{{ item.from }}</span> -
|
|
76
|
-
<div v-show="docSource[item.source]" class="upload-source">
|
|
77
|
-
{{ docSource[item.source] }}
|
|
78
|
-
</div>
|
|
79
|
-
<i class="iconfont guoran-right"></i>
|
|
80
|
-
</div>
|
|
21
|
+
<div v-if="msg.content.images && msg.content.images.length != 0" class="answer-kn-image-box">
|
|
22
|
+
<img v-for="(imageItem, imageItemIndex) in msg.content.images"
|
|
23
|
+
style="max-width: 230px;border-radius: 10px;margin-bottom: 15px" :src="imageItem.url"
|
|
24
|
+
:key="imageItemIndex" alt @click="lookAttach(imageItem.url, imageItem, $event)" />
|
|
81
25
|
</div>
|
|
82
|
-
</template>
|
|
83
|
-
<div class="ad-loadmore" v-if="loadMoreFlag" @click="lazyLoadKnowledegList">
|
|
84
|
-
{{ $t('dragonCommon.viewMore') }}
|
|
85
|
-
</div>
|
|
86
26
|
</div>
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
27
|
+
<template v-if="!isLiBang">
|
|
28
|
+
<div class="ad-list" :class="msg.content.type == 0 ? 'ad-list-recognition' : ''">
|
|
29
|
+
<template v-if="msg.content.type == 1">
|
|
30
|
+
<div v-for="(item, itemIndex) in msg.content.list" :key="itemIndex" class="ad-list-cell">
|
|
31
|
+
<div class="alc-title">
|
|
32
|
+
<div class="alc-box">
|
|
33
|
+
<div class="alc-source-left">
|
|
34
|
+
<span class="source-form">出自</span>
|
|
35
|
+
<img class="alc-title-icon" height="24px" width="24px" :src="getIconSrc(item)" alt=""
|
|
36
|
+
srcset="">
|
|
37
|
+
<span class="alc-title-from">{{ item.from }}</span>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
<div v-html="item.introduction" v-if="!srcContentTypeIMG(item)" class="alc-box-introduction">
|
|
41
|
+
</div>
|
|
42
|
+
<div v-else class="alc-box-introduction">
|
|
43
|
+
<img :src="item.expiredUrl" alt="" @click="lookAttach(item.url, item, $event)">
|
|
44
|
+
</div>
|
|
45
|
+
<div v-if="item.previewImage" class="alc-box-introduction-previewImage">
|
|
46
|
+
<img :src="item.previewImage" alt=""
|
|
47
|
+
@click="lookAttach(item.previewImage, { url: item.previewImage }, $event)">
|
|
48
|
+
</div>
|
|
49
|
+
<div class="alc-updateTime">
|
|
50
|
+
<div v-show="docSource[item.source]" class="upload-source">
|
|
51
|
+
{{ docSource[item.source] }}
|
|
52
|
+
</div>
|
|
53
|
+
<div v-show="item.url" class="alc-content-text">
|
|
54
|
+
<span @click="lookAttach(item.url, item, $event)" class="aci-view">查看 ></span>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
<div class="alc-content" v-if="false">
|
|
59
|
+
<div v-if="msg.content.type == 1" class="alc-content-text">
|
|
60
|
+
{{ item.introduction }}
|
|
61
|
+
<span @click="lookAttach(item.url, item, $event)" class="aci-view">查看原文 ></span>
|
|
62
|
+
</div>
|
|
63
|
+
<span v-if="!isPC" class="alc-title-updateTime">最后更新时间: {{ item.updateTime }}</span>
|
|
64
|
+
<div v-if="false" class="alc-content-info">
|
|
65
|
+
<div class="alcc-box">
|
|
66
|
+
<span class="aci-owner">所有者: {{ item.owner }}</span>
|
|
67
|
+
<span class="aci-enterprise">所属企业: {{ item.enterprise }}</span>
|
|
68
|
+
<span class="aci-source">文件来源: {{ item.source }}</span>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
111
72
|
</div>
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
73
|
+
</template>
|
|
74
|
+
<template v-if="msg.content.type == 0">
|
|
75
|
+
<div v-for="(item, itemIndex) in msg.content.list" :key="itemIndex" class="ad-list-cell-recognition">
|
|
76
|
+
<div class="alc-source-name" @click="lookAttach(item.url, item, $event)">
|
|
77
|
+
<img class="alc-title-icon" height="18px" width="18px" :src="getIconSrc(item)" alt srcset />
|
|
78
|
+
<span class="alc-title-from">{{ item.from }}</span> -
|
|
79
|
+
<div v-show="docSource[item.source]" class="upload-source">
|
|
80
|
+
{{ docSource[item.source] }}
|
|
81
|
+
</div>
|
|
82
|
+
<i class="iconfont guoran-right"></i>
|
|
83
|
+
</div>
|
|
115
84
|
</div>
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
<span @click="lookAttach(item.url, item, $event)" class="aci-view">{{ $t('dragonCommon.viewOriginal') }}</span>
|
|
119
|
-
</div>
|
|
120
|
-
</div>
|
|
121
|
-
</div>
|
|
85
|
+
</template>
|
|
86
|
+
<div class="ad-loadmore" v-if="loadMoreFlag" @click="lazyLoadKnowledegList">查看更多</div>
|
|
122
87
|
</div>
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
<div
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
88
|
+
</template>
|
|
89
|
+
<template v-if="isLiBang">
|
|
90
|
+
<div class="libang_list" :class="msg.content.type == 0 ? 'libang_list_recognition' : ''">
|
|
91
|
+
<template v-if="msg.content.type == 1">
|
|
92
|
+
<div v-for="(item, itemIndex) in msg.content.list" :key="itemIndex" class="libang_list_cell">
|
|
93
|
+
<div class="libang_title">
|
|
94
|
+
<div class="libang_box">
|
|
95
|
+
<div class="libang_source_left">
|
|
96
|
+
<span class="source-form">出自</span>
|
|
97
|
+
<img class="libang_title_icon" height="24px" width="24px" :src="getIconSrc(item)" alt=""
|
|
98
|
+
srcset="">
|
|
99
|
+
<span class="libang_title_from">{{ item.from }}</span>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
<div v-html="item.introduction" v-if="!srcContentTypeIMG(item)" class="libang_box_introduction">
|
|
103
|
+
</div>
|
|
104
|
+
<div v-else class="libang_box_introduction">
|
|
105
|
+
<img :src="item.expiredUrl" alt="" @click="lookAttach(item.url, item, $event)">
|
|
106
|
+
</div>
|
|
107
|
+
<div v-if="item.previewImage" class="libang_box_introduction_previewImage">
|
|
108
|
+
<img :src="item.previewImage" alt=""
|
|
109
|
+
@click="lookAttach(item.previewImage, { url: item.previewImage }, $event)">
|
|
110
|
+
</div>
|
|
111
|
+
<div class="libang_updateTime">
|
|
112
|
+
<div class="libang_updataTime_left">
|
|
113
|
+
<div v-show="docSource[item.source]" class="upload-source">
|
|
114
|
+
{{ docSource[item.source] }}
|
|
115
|
+
</div>
|
|
116
|
+
<div class="libang_floder" @click.stop="clickFloder(item)">
|
|
117
|
+
<i class="iconfont guoran-tongyichicun-wenjianjia-zhankaizhuangtai--folderOpen"></i>
|
|
118
|
+
{{ item.folderName }}
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
<div v-show="item.url" class="libang_content_text">
|
|
122
|
+
<span @click="lookAttach(item.url, item, $event)" class="aci-view">查看 ></span>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
<!-- <div class="alc-content" v-if="false">
|
|
127
|
+
<div v-if="msg.content.type == 1" class="alc-content-text">
|
|
128
|
+
{{ item.introduction }}
|
|
129
|
+
<span @click="lookAttach(item.url, item, $event)" class="aci-view">查看原文 ></span>
|
|
130
|
+
</div>
|
|
131
|
+
<span v-if="!isPC" class="alc-title-updateTime">最后更新时间: {{ item.updateTime }}</span>
|
|
132
|
+
<div v-if="false" class="alc-content-info">
|
|
133
|
+
<div class="alcc-box">
|
|
134
|
+
<span class="aci-owner">所有者: {{ item.owner }}</span>
|
|
135
|
+
<span class="aci-enterprise">所属企业: {{ item.enterprise }}</span>
|
|
136
|
+
<span class="aci-source">文件来源: {{ item.source }}</span>
|
|
137
|
+
</div>
|
|
138
|
+
</div>
|
|
139
|
+
</div> -->
|
|
140
|
+
</div>
|
|
141
|
+
</template>
|
|
142
|
+
<template v-if="msg.content.type == 0">
|
|
143
|
+
<div v-for="(item, itemIndex) in msg.content.list" :key="itemIndex"
|
|
144
|
+
class="libang_list_cell_recognition" @click="lookAttach(item.url, item, $event)">
|
|
145
|
+
<div class="libang_list_cell_left" >
|
|
146
|
+
<div class="libang_source_name" >
|
|
147
|
+
<img class="libang_title_icon" height="18px" width="18px" :src="getIconSrc(item)" alt srcset />
|
|
148
|
+
<span class="libang_title_from">{{ item.from }}</span> -
|
|
149
|
+
<div v-show="docSource[item.source]" class="upload_source">
|
|
150
|
+
{{ docSource[item.source] }}
|
|
151
|
+
</div>
|
|
152
|
+
</div>
|
|
153
|
+
<div class="libang_source_floder" @click.stop="clickFloder(item)">
|
|
154
|
+
<i class="iconfont guoran-tongyichicun-wenjianjia-zhankaizhuangtai--folderOpen"></i>
|
|
155
|
+
{{ item.folderName }}
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
<i class="iconfont guoran-right" @click="lookAttach(item.url, item, $event)"></i>
|
|
159
|
+
</div>
|
|
160
|
+
</template>
|
|
161
|
+
<div class="ad-loadmore" v-if="loadMoreFlag" @click="lazyLoadKnowledegList">查看更多</div>
|
|
140
162
|
</div>
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
<previewPdf ref="previewPdf" :url="previewHref" :previewOssPath="previewOssPath" :title="title"
|
|
149
|
-
:folderName="folderName" :folderUrl="folderUrl"
|
|
150
|
-
:sourceFileType="sourceFileType" officePreviewType="pdf" @previewToDialog="previewToDialog"
|
|
151
|
-
@recommendQues="recommendQues" @close="close" @open="open" :isHasChat="isHasChat"
|
|
152
|
-
:knowledgeId="previewKnowledgeId" :isLiBang="isLiBang" @previewClickFloder="previewClickFloder"></previewPdf>
|
|
163
|
+
</template>
|
|
164
|
+
|
|
165
|
+
<previewPdf ref="previewPdf" :url="previewHref" :previewOssPath="previewOssPath" :title="title"
|
|
166
|
+
:folderName="folderName" :folderUrl="folderUrl"
|
|
167
|
+
:sourceFileType="sourceFileType" officePreviewType="pdf" @previewToDialog="previewToDialog"
|
|
168
|
+
@recommendQues="recommendQues" @close="close" @open="open" :isHasChat="isHasChat"
|
|
169
|
+
:knowledgeId="previewKnowledgeId" :isLiBang="isLiBang" @previewClickFloder="previewClickFloder"></previewPdf>
|
|
153
170
|
</div>
|
|
154
|
-
|
|
171
|
+
</template>
|
|
155
172
|
|
|
156
173
|
<script>
|
|
157
174
|
/* eslint-disable */
|
|
158
175
|
import previewPdf from "./previewPdf";
|
|
159
176
|
import { isMobile } from "../assets/js/common";
|
|
160
|
-
import markDownText from "./markDownText.vue";
|
|
161
177
|
export default {
|
|
162
178
|
name: "answerDocknowledge",
|
|
163
|
-
components: { previewPdf
|
|
179
|
+
components: { previewPdf },
|
|
164
180
|
data () {
|
|
165
181
|
return {
|
|
166
182
|
isPC: true,
|
|
@@ -175,7 +191,15 @@ export default {
|
|
|
175
191
|
// CORP_LOCAL_FILE: '来源于企业知识库',
|
|
176
192
|
// FEISHU: '来源于飞书-云文档'
|
|
177
193
|
// },
|
|
178
|
-
docSource: {
|
|
194
|
+
docSource: {
|
|
195
|
+
LOCAL_FILE: "个人知识",
|
|
196
|
+
CREATED_BY_ONESELF: "个人知识",
|
|
197
|
+
WECHAT: "个人知识",
|
|
198
|
+
AUTO_SYN_FROM_LOCAL_FILE: "个人知识",
|
|
199
|
+
YUQUE: "企业知识",
|
|
200
|
+
CORP_LOCAL_FILE: '企业知识',
|
|
201
|
+
FEISHU: '企业知识'
|
|
202
|
+
},
|
|
179
203
|
imageObj: {
|
|
180
204
|
PDF: 'pdf1',
|
|
181
205
|
pdf: 'pdf1',
|
|
@@ -239,14 +263,14 @@ export default {
|
|
|
239
263
|
allKnowledgeList: [],
|
|
240
264
|
loadMoreFlag: false,
|
|
241
265
|
title: '',
|
|
242
|
-
folderName:
|
|
243
|
-
folderUrl:
|
|
266
|
+
folderName:'',
|
|
267
|
+
folderUrl:'',
|
|
244
268
|
previewKnowledgeId: "",
|
|
245
269
|
previewKnowledge: {},
|
|
246
270
|
previewOssPath: ""
|
|
247
271
|
}
|
|
248
272
|
},
|
|
249
|
-
props: ['msg', 'isAskLightning', 'isMessageRecord', "isApp", "isHasChat", "activeKnowledgeId", "isLiBang"
|
|
273
|
+
props: ['msg', 'isAskLightning', 'isMessageRecord', "isApp", "isHasChat", "activeKnowledgeId", "isLiBang"],
|
|
250
274
|
beforeMounted () {
|
|
251
275
|
},
|
|
252
276
|
watch: {
|
|
@@ -284,15 +308,6 @@ export default {
|
|
|
284
308
|
// });
|
|
285
309
|
},
|
|
286
310
|
mounted () {
|
|
287
|
-
this.docSource = {
|
|
288
|
-
LOCAL_FILE: this.$t('dragonCommon.personalknowledge'),
|
|
289
|
-
CREATED_BY_ONESELF: this.$t('dragonCommon.personalknowledge'),
|
|
290
|
-
WECHAT: this.$t('dragonCommon.personalknowledge'),
|
|
291
|
-
AUTO_SYN_FROM_LOCAL_FILE: this.$t('dragonCommon.personalknowledge'),
|
|
292
|
-
YUQUE: this.$t('dragonCommon.enterpriseknowledge'),
|
|
293
|
-
CORP_LOCAL_FILE: this.$t('dragonCommon.enterpriseknowledge'),
|
|
294
|
-
FEISHU: this.$t('dragonCommon.enterpriseknowledge'),
|
|
295
|
-
}
|
|
296
311
|
console.log(this.msg.content, 'this.msg.content');
|
|
297
312
|
// if(this.msg.content.type == 1) {
|
|
298
313
|
|
|
@@ -317,78 +332,78 @@ export default {
|
|
|
317
332
|
//预览图片
|
|
318
333
|
lookAttach (url, item, event) {
|
|
319
334
|
// console.log(item.knowledgeId);
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
335
|
+
// this.$http.get("/knowledge-api/internal/knowledgeBaseStructure/" + "642ffbccde420e2772f7787b")
|
|
336
|
+
// debugger
|
|
337
|
+
event.preventDefault();
|
|
338
|
+
if (this.isAskLightning == 1 && !this.isApp){
|
|
339
|
+
window.parent.postMessage({
|
|
340
|
+
data: "bot_preview",
|
|
341
|
+
item: JSON.stringify(item),
|
|
342
|
+
url: url
|
|
343
|
+
},"*");
|
|
344
|
+
} else {
|
|
345
|
+
// if (isMobile()) {
|
|
346
|
+
// this.$refs.previewPdf.drawer = true;
|
|
347
|
+
// this.$refs.previewPdf.previewShowPopup = false;
|
|
348
|
+
// } else {
|
|
349
|
+
// this.$refs.previewPdf.drawer = false;
|
|
350
|
+
// }
|
|
351
|
+
this.title = item.from || item.name
|
|
352
|
+
this.folderName = item.folderName
|
|
338
353
|
this.folderUrl = item.folderUrl
|
|
339
354
|
this.previewKnowledge = item;
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
355
|
+
this.previewKnowledgeId = item.knowledgeId
|
|
356
|
+
this.$refs.previewPdf.previewShowPopup = false;
|
|
357
|
+
this.$refs.previewPdf.drawer = false;
|
|
358
|
+
this.previewOssPath = url;
|
|
359
|
+
let index = url.lastIndexOf('?')
|
|
360
|
+
let type = ''
|
|
361
|
+
let httpUrl = '/knowledge-api/knowledge/getTemporaryCertificate'
|
|
362
|
+
if (index !== -1) {
|
|
363
|
+
url = url.substring(0, index)
|
|
364
|
+
type = this.fileType(url)
|
|
365
|
+
} else {
|
|
366
|
+
type = this.fileType(url)
|
|
367
|
+
}
|
|
368
|
+
if (type === '' || type === 'OTHER') {
|
|
369
|
+
httpUrl = httpUrl += '?needEncrypt=true'
|
|
370
|
+
} else {
|
|
371
|
+
httpUrl = httpUrl += '?needEncrypt=false'
|
|
372
|
+
}
|
|
373
|
+
this.$http.post(httpUrl, {
|
|
374
|
+
"fileInOssPath":url
|
|
375
|
+
}).then(res =>{
|
|
376
|
+
if(res.data.code == '0') {
|
|
377
|
+
this.previewHref = res.data.data;
|
|
378
|
+
this.sourceFileType = url.substring(url.lastIndexOf('.'))
|
|
379
|
+
let isOhmPc = sessionStorage.getItem('isOhmPc')
|
|
380
|
+
if (isMobile() || isOhmPc == 'true'){
|
|
381
|
+
this.$refs.previewPdf.drawer = true;
|
|
382
|
+
this.$refs.previewPdf.previewShowPopup = true;
|
|
350
383
|
} else {
|
|
351
|
-
|
|
384
|
+
this.$refs.previewPdf.previewShowPopup = false;
|
|
385
|
+
this.$refs.previewPdf.drawer = true;
|
|
352
386
|
}
|
|
353
|
-
|
|
354
|
-
|
|
387
|
+
//聊一聊按钮的选中状态
|
|
388
|
+
if (this.activeKnowledgeId == item.knowledgeId){
|
|
389
|
+
this.$refs.previewPdf.previewKnowledgeId = this.activeKnowledgeId
|
|
355
390
|
} else {
|
|
356
|
-
|
|
391
|
+
this.$refs.previewPdf.previewKnowledgeId = ""
|
|
392
|
+
}
|
|
393
|
+
this.$refs.previewPdf.fileType = type
|
|
394
|
+
this.$refs.previewPdf.tagIds = item.tagIds
|
|
395
|
+
this.$refs.previewPdf.isMessageRecord = this.isMessageRecord ? true : false ;
|
|
396
|
+
let index = url.indexOf("?");
|
|
397
|
+
let newFileInOssPath = url;
|
|
398
|
+
if (index !== -1){
|
|
399
|
+
newFileInOssPath = url.substring(0, url.indexOf("?"))
|
|
400
|
+
}
|
|
401
|
+
let fileName = newFileInOssPath.substring(newFileInOssPath.lastIndexOf('.'))
|
|
402
|
+
if (fileName === '.doc' || fileName === '.docx' || fileName === '.txt'|| fileName === '.html'){
|
|
403
|
+
this.$refs.previewPdf.fileName = fileName;
|
|
404
|
+
} else {
|
|
405
|
+
this.$refs.previewPdf.fileName = '';
|
|
357
406
|
}
|
|
358
|
-
this.$http.post(httpUrl, {
|
|
359
|
-
"fileInOssPath": url
|
|
360
|
-
}).then(res => {
|
|
361
|
-
if (res.data.code == '0') {
|
|
362
|
-
this.previewHref = res.data.data;
|
|
363
|
-
this.sourceFileType = url.substring(url.lastIndexOf('.'))
|
|
364
|
-
let isOhmPc = sessionStorage.getItem('isOhmPc')
|
|
365
|
-
if (isMobile() || isOhmPc == 'true') {
|
|
366
|
-
this.$refs.previewPdf.drawer = true;
|
|
367
|
-
this.$refs.previewPdf.previewShowPopup = true;
|
|
368
|
-
} else {
|
|
369
|
-
this.$refs.previewPdf.previewShowPopup = false;
|
|
370
|
-
this.$refs.previewPdf.drawer = true;
|
|
371
|
-
}
|
|
372
|
-
//聊一聊按钮的选中状态
|
|
373
|
-
if (this.activeKnowledgeId == item.knowledgeId) {
|
|
374
|
-
this.$refs.previewPdf.previewKnowledgeId = this.activeKnowledgeId
|
|
375
|
-
} else {
|
|
376
|
-
this.$refs.previewPdf.previewKnowledgeId = ""
|
|
377
|
-
}
|
|
378
|
-
this.$refs.previewPdf.fileType = type
|
|
379
|
-
this.$refs.previewPdf.tagIds = item.tagIds
|
|
380
|
-
this.$refs.previewPdf.isMessageRecord = this.isMessageRecord ? true : false;
|
|
381
|
-
let index = url.indexOf("?");
|
|
382
|
-
let newFileInOssPath = url;
|
|
383
|
-
if (index !== -1) {
|
|
384
|
-
newFileInOssPath = url.substring(0, url.indexOf("?"))
|
|
385
|
-
}
|
|
386
|
-
let fileName = newFileInOssPath.substring(newFileInOssPath.lastIndexOf('.'))
|
|
387
|
-
if (fileName === '.doc' || fileName === '.docx' || fileName === '.txt' || fileName === '.html') {
|
|
388
|
-
this.$refs.previewPdf.fileName = fileName;
|
|
389
|
-
} else {
|
|
390
|
-
this.$refs.previewPdf.fileName = '';
|
|
391
|
-
}
|
|
392
407
|
if (item.tagIds && item.tagIds.length != 0) {
|
|
393
408
|
this.$refs.previewPdf.loading = false
|
|
394
409
|
return
|
|
@@ -416,8 +431,6 @@ export default {
|
|
|
416
431
|
return 'VIDEO'
|
|
417
432
|
} else if (fileType === '.html') {
|
|
418
433
|
return 'HTML'
|
|
419
|
-
} else if (fileType === '.png' || fileType === '.jpg' || fileType === '.jpeg') {
|
|
420
|
-
return 'IMAGE'
|
|
421
434
|
} else {
|
|
422
435
|
return 'OTHER'
|
|
423
436
|
}
|
|
@@ -478,13 +491,13 @@ export default {
|
|
|
478
491
|
recommendQues (item, knowledgeId) {
|
|
479
492
|
this.$emit('recommendQues', item, knowledgeId)
|
|
480
493
|
},
|
|
481
|
-
clickFloder
|
|
494
|
+
clickFloder(item) {
|
|
482
495
|
this.$emit('clickFloder', item)
|
|
483
496
|
},
|
|
484
|
-
previewClickFloder
|
|
497
|
+
previewClickFloder() {
|
|
485
498
|
let item = null
|
|
486
499
|
this.msg.content.list.forEach(element => {
|
|
487
|
-
if
|
|
500
|
+
if(element.knowledgeId == this.previewKnowledgeId) {
|
|
488
501
|
item = element
|
|
489
502
|
}
|
|
490
503
|
});
|
|
@@ -628,25 +641,24 @@ export default {
|
|
|
628
641
|
|
|
629
642
|
.alc-box-introduction-previewImage {
|
|
630
643
|
width: 100%;
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
}
|
|
644
|
+
display: block;
|
|
645
|
+
overflow: hidden;
|
|
646
|
+
text-overflow: ellipsis;
|
|
647
|
+
display: -webkit-box;
|
|
648
|
+
-webkit-line-clamp:3;
|
|
649
|
+
-webkit-box-orient:vertical;
|
|
650
|
+
margin-top: 10px;
|
|
651
|
+
color: #616161;
|
|
652
|
+
// font-size: 12px;
|
|
653
|
+
line-height: 24px;
|
|
654
|
+
text-align: left;
|
|
655
|
+
img {
|
|
656
|
+
max-width: 300px;
|
|
657
|
+
width: 100%;
|
|
658
|
+
max-height: 150px;
|
|
659
|
+
margin: 10px;
|
|
660
|
+
cursor: pointer;
|
|
661
|
+
}
|
|
650
662
|
}
|
|
651
663
|
|
|
652
664
|
.alc-updateTime {
|