askbot-dragon 1.7.53-beta → 1.7.55-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 +68 -56
  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 +252 -252
  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 -177
  21. package/src/components/AiGuide.vue +434 -438
  22. package/src/components/AnswerDocknowledge.vue +1103 -1101
  23. package/src/components/AnswerVoice.vue +285 -285
  24. package/src/components/AskIFrame.vue +15 -15
  25. package/src/components/ConversationContainer.vue +10764 -10766
  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 -301
  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 +213 -211
  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 -228
  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 +3502 -3501
  48. package/src/components/imgView.vue +31 -31
  49. package/src/components/intelligentSummary.vue +234 -231
  50. package/src/components/kkview.vue +1138 -1138
  51. package/src/components/loadingProcess.vue +164 -164
  52. package/src/components/markDownText.vue +197 -197
  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 -70
  62. package/src/components/newPdfPosition.vue +877 -877
  63. package/src/components/pagination.vue +128 -128
  64. package/src/components/pdfPosition.vue +1523 -1514
  65. package/src/components/popup.vue +228 -227
  66. package/src/components/preview/docView.vue +113 -113
  67. package/src/components/preview/excelView.vue +178 -178
  68. package/src/components/preview/newPositionPreview.vue +369 -369
  69. package/src/components/preview/pdfView.vue +824 -824
  70. package/src/components/previewDoc.vue +252 -251
  71. package/src/components/previewPdf.vue +1113 -1093
  72. package/src/components/receiverMessagePlatform.vue +69 -65
  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 -50
  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 -344
  89. package/src/components/welcomeLlmCard.vue +144 -144
  90. package/src/components/welcomeSuggest.vue +97 -97
  91. package/src/locales/cn.json +61 -71
  92. package/src/locales/en.json +62 -73
  93. package/src/locales/jp.json +72 -72
  94. package/src/main.js +94 -75
  95. package/vue.config.js +54 -54
@@ -1,1101 +1,1103 @@
1
- <!--
2
- isLiBang 字段判断 是否为立邦主体
3
- 立邦有自己单独的组件分支,但考虑到后期结构改动如果较大改动会不方便,所以还是在推荐知识消息中 在此判断是否是立邦主体。方便后期维护
4
- -->
5
- <template>
6
- <div class="answer-docknowledge">
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-if="msg.content.renderType == 2">
20
- <markDownText :chainValues="msg.content.text" :isHistory="isHistory"></markDownText>
21
- </template>
22
- <template v-else>{{ msg.content.text }}</template>
23
- </div>
24
- <div v-if="msg.content.images && msg.content.images.length != 0" class="answer-kn-image-box">
25
- <img v-for="(imageItem, imageItemIndex) in msg.content.images"
26
- style="max-width: 230px;border-radius: 25px;margin-bottom: 15px" :src="imageItem.url"
27
- :key="imageItemIndex" alt @click="lookAttach(imageItem.url, imageItem, $event)" />
28
- </div>
29
- </div>
30
- <template v-if="!isLiBang">
31
- <div class="ad-list" :class="msg.content.type == 0 ? 'ad-list-recognition' : ''">
32
- <template v-if="msg.content.type == 1">
33
- <div v-for="(item, itemIndex) in msg.content.list" :key="itemIndex"
34
- :style="{ paddingBottom: itemIndex === msg.content.list.length - 1 ? 0 : '10px' }" class="ad-list-cell">
35
- <div class="alc-title">
36
- <div class="alc-box">
37
- <div class="alc-source-left">
38
- <span class="source-form">出自</span>
39
- <img class="alc-title-icon" height="24px" width="24px" :src="getIconSrc(item)" alt=""
40
- srcset="">
41
- <span class="alc-title-from">{{ item.from }}</span>
42
- </div>
43
- </div>
44
- <div v-html="item.introduction" v-if="!srcContentTypeIMG(item)" class="alc-box-introduction">
45
- </div>
46
- <div v-else class="alc-box-introduction">
47
- <img :src="item.expiredUrl" alt="" @click="lookAttach(item.url, item, $event)">
48
- </div>
49
- <div v-if="item.previewImage" class="alc-box-introduction-previewImage">
50
- <img :src="item.previewImage" alt=""
51
- @click="lookAttach(item.previewImage, { url: item.previewImage }, $event)">
52
- </div>
53
- <div class="alc-updateTime">
54
- <div v-show="docSource[item.source]" class="upload-source">
55
- {{ docSource[item.source] }}
56
- </div>
57
- <div v-show="item.url" class="alc-content-text">
58
- <span @click="lookAttach(item.url, item, $event)" class="aci-view">查看 ></span>
59
- </div>
60
- </div>
61
- </div>
62
- <div class="alc-content" v-if="false">
63
- <div v-if="msg.content.type == 1" class="alc-content-text">
64
- {{ item.introduction }}
65
- <span @click="lookAttach(item.url, item, $event)" class="aci-view">查看原文 ></span>
66
- </div>
67
- <span v-if="!isPC" class="alc-title-updateTime">最后更新时间: {{ item.updateTime }}</span>
68
- <div v-if="false" class="alc-content-info">
69
- <div class="alcc-box">
70
- <span class="aci-owner">所有者: {{ item.owner }}</span>
71
- <span class="aci-enterprise">所属企业: {{ item.enterprise }}</span>
72
- <span class="aci-source">文件来源: {{ item.source }}</span>
73
- </div>
74
- </div>
75
- </div>
76
- </div>
77
- </template>
78
- <template v-if="msg.content.type == 0">
79
- <div v-for="(item, itemIndex) in msg.content.list" :key="itemIndex" class="ad-list-cell-recognition" :id="item.knowledgeId + itemIndex">
80
- <div class="alc-source-name" @click="lookAttach(item.url, item, $event,itemIndex)">
81
- <img class="alc-title-icon" height="18px" width="18px" :src="getIconSrc(item)" alt srcset />
82
- <span class="alc-title-from">{{ item.from }}</span>&nbsp;-&nbsp;
83
- <div v-show="docSource[item.source]" class="upload-source">
84
- {{ docSource[item.source] }}
85
- </div>
86
- <i class="iconfont guoran-right"></i>
87
- </div>
88
- </div>
89
- </template>
90
- <div class="ad-loadmore" v-if="loadMoreFlag" @click="lazyLoadKnowledegList">查看更多</div>
91
- </div>
92
- </template>
93
- <template v-if="isLiBang">
94
- <div class="libang_list" :class="msg.content.type == 0 ? 'libang_list_recognition' : ''">
95
- <template v-if="msg.content.type == 1">
96
- <div v-for="(item, itemIndex) in msg.content.list" :key="itemIndex" class="libang_list_cell">
97
- <div class="libang_title">
98
- <div class="libang_box">
99
- <div class="libang_source_left">
100
- <span class="source-form">出自</span>
101
- <img class="libang_title_icon" height="24px" width="24px" :src="getIconSrc(item)" alt=""
102
- srcset="">
103
- <span class="libang_title_from">{{ item.from }}</span>
104
- </div>
105
- </div>
106
- <div v-html="item.introduction" v-if="!srcContentTypeIMG(item)" class="libang_box_introduction">
107
- </div>
108
- <div v-else class="libang_box_introduction">
109
- <img :src="item.expiredUrl" alt="" @click="lookAttach(item.url, item, $event)">
110
- </div>
111
- <div v-if="item.previewImage" class="libang_box_introduction_previewImage">
112
- <img :src="item.previewImage" alt=""
113
- @click="lookAttach(item.previewImage, { url: item.previewImage }, $event)">
114
- </div>
115
- <div class="libang_updateTime">
116
- <div class="libang_updataTime_left">
117
- <div v-show="docSource[item.source]" class="upload-source">
118
- {{ docSource[item.source] }}
119
- </div>
120
- <div class="libang_floder" @click.stop="clickFloder(item)">
121
- <i class="iconfont guoran-tongyichicun-wenjianjia-zhankaizhuangtai--folderOpen"></i>
122
- {{ item.folderName }}
123
- </div>
124
- </div>
125
- <div v-show="item.url" class="libang_content_text">
126
- <span @click="lookAttach(item.url, item, $event)" class="aci-view">查看 ></span>
127
- </div>
128
- </div>
129
- </div>
130
- <!-- <div class="alc-content" v-if="false">
131
- <div v-if="msg.content.type == 1" class="alc-content-text">
132
- {{ item.introduction }}
133
- <span @click="lookAttach(item.url, item, $event)" class="aci-view">查看原文 ></span>
134
- </div>
135
- <span v-if="!isPC" class="alc-title-updateTime">最后更新时间: {{ item.updateTime }}</span>
136
- <div v-if="false" class="alc-content-info">
137
- <div class="alcc-box">
138
- <span class="aci-owner">所有者: {{ item.owner }}</span>
139
- <span class="aci-enterprise">所属企业: {{ item.enterprise }}</span>
140
- <span class="aci-source">文件来源: {{ item.source }}</span>
141
- </div>
142
- </div>
143
- </div> -->
144
- </div>
145
- </template>
146
- <template v-if="msg.content.type == 0">
147
- <div v-for="(item, itemIndex) in msg.content.list" :key="itemIndex"
148
- class="libang_list_cell_recognition" @click="lookAttach(item.url, item, $event,itemIndex)" :id="item.knowledgeId + itemIndex">
149
- <div class="libang_list_cell_left" >
150
- <div class="libang_source_name" >
151
- <img class="libang_title_icon" height="18px" width="18px" :src="getIconSrc(item)" alt srcset />
152
- <span class="libang_title_from">{{ item.from }}</span>&nbsp;-&nbsp;
153
- <div v-show="docSource[item.source]" class="upload_source">
154
- {{ docSource[item.source] }}
155
- </div>
156
- </div>
157
- <div class="libang_source_floder" @click.stop="clickFloder(item)">
158
- <i class="iconfont guoran-tongyichicun-wenjianjia-zhankaizhuangtai--folderOpen"></i>
159
- {{ item.folderName }}
160
- </div>
161
- </div>
162
- <i class="iconfont guoran-right" @click="lookAttach(item.url, item, $event)"></i>
163
- </div>
164
- </template>
165
- <div class="ad-loadmore" v-if="loadMoreFlag" @click="lazyLoadKnowledegList">查看更多</div>
166
- </div>
167
- </template>
168
-
169
- <previewPdf ref="previewPdf" :url="previewHref" :previewOssPath="previewOssPath" :title="title"
170
- :folderName="folderName" :folderUrl="folderUrl"
171
- :sourceFileType="sourceFileType" officePreviewType="pdf" @previewToDialog="previewToDialog"
172
- @recommendQues="recommendQues" @close="close" @open="open" :isHasChat="isHasChat"
173
- :knowledgeId="previewKnowledgeId" :isLiBang="isLiBang" @previewClickFloder="previewClickFloder"></previewPdf>
174
- </div>
175
- </template>
176
-
177
- <script>
178
- /* eslint-disable */
179
- import previewPdf from "./previewPdf";
180
- import { isMobile } from "../assets/js/common";
181
- import markDownText from "./markDownText.vue";
182
- export default {
183
- name: "answerDocknowledge",
184
- components: { previewPdf, markDownText },
185
- data () {
186
- return {
187
- isPC: true,
188
- previewHref: "",
189
- sourceFileType: '',
190
- // docSource: {
191
- // LOCAL_FILE: "来源于本地文件",
192
- // CREATED_BY_ONESELF: "来源于自建知识",
193
- // WECHAT: "来源于微信",
194
- // AUTO_SYN_FROM_LOCAL_FILE: "自动同步于本地",
195
- // YUQUE: "来源于语雀",
196
- // CORP_LOCAL_FILE: '来源于企业知识库',
197
- // FEISHU: '来源于飞书-云文档'
198
- // },
199
- docSource: {
200
- LOCAL_FILE: "个人知识",
201
- CREATED_BY_ONESELF: "个人知识",
202
- WECHAT: "个人知识",
203
- AUTO_SYN_FROM_LOCAL_FILE: "个人知识",
204
- YUQUE: "企业知识",
205
- CORP_LOCAL_FILE: '企业知识',
206
- FEISHU: '企业知识'
207
- },
208
- imageObj: {
209
- PDF: 'pdf1',
210
- pdf: 'pdf1',
211
- TXT: 'txt1',
212
- txt: 'txt1',
213
- selfadd: 'selfadd1',
214
- md: "md2",
215
- html: 'selfadd1',
216
- mode: "mode",
217
- general: 'general',
218
- word: "word1",
219
- Word: "word1",
220
- docx: "word1",
221
- doc: "word1",
222
- WORD: "word1",
223
- Excel: 'excel1',
224
- EXCEL: 'excel1',
225
- excel: 'excel1',
226
- PPT: 'ppt1',
227
- ppt: 'ppt1',
228
- pptx: 'ppt1',
229
- img: "image1",
230
- image: "image1",
231
- video: "video",
232
- audio: 'audio',
233
- link: "link",
234
- wechat: "wechat",
235
- mp4: "video",
236
- MP4: "video",
237
- xlsx: "excel1",
238
- SLSX: "excel1",
239
- xls: "excel1",
240
- XLS: "excel1",
241
- jpg: "image1",
242
- JPG: "image1",
243
- jpeg: "image1",
244
- JPEG: "image1",
245
- png: "image1",
246
- PNG: "image1",
247
- webp: "image1",
248
- WEBP: "image1",
249
- gif: "image1",
250
- GIF: "image1",
251
- svg: "image1",
252
- SVG: "image1",
253
- bmp: "image1",
254
- BMP: "image1",
255
- avi: "video",
256
- AVI: "video",
257
- mov: "video",
258
- MOV: "video",
259
- rmvb: "video",
260
- RMVB: "video",
261
- wav: "audio",
262
- WAV: "audio",
263
- mp3: "audio",
264
- MP3: "audio",
265
- yqhtml: "yqhtml",
266
- feishuhtml: "feishuhtml"
267
- },
268
- allKnowledgeList: [],
269
- loadMoreFlag: false,
270
- title: '',
271
- folderName: '',
272
- folderUrl: '',
273
- previewKnowledgeId: "",
274
- previewKnowledge: {},
275
- previewOssPath: ""
276
- }
277
- },
278
- props: ['msg', 'isAskLightning', 'isMessageRecord', "isApp", "isHasChat", "activeKnowledgeId", "isLiBang","language","isHistory"],
279
- beforeMounted () {
280
- },
281
- watch: {
282
- // msg: {
283
- // handler (n) {
284
- // console.log(n, 'answerDocknowledge');
285
- // n.content.list.forEach(element => {
286
- // console.log(this.imageObj[element.format], 1111);
287
- // element.src = 'https://static.guoranbot.com/cdn-office-website/askbot_doc/' + this.imageObj[element.format] + '.png';
288
- // if ((element.format === "txt" || element.format === "html") && element.source === "WECHAT") {
289
- // element.src = 'https://static.guoranbot.com/cdn-office-website/askbot_doc/wechat.png';
290
- // }
291
- // });
292
- // },
293
- // deep: true,
294
- // immediate: true
295
- // }
296
- },
297
- created () {
298
- var system = {};
299
- system.pingtai = /(Win32|Win16|WinCE|Mac68K|MacIntel|MacIntel|MacPPC|Linux mips64)/i.test(navigator.platform);
300
- if (system.pingtai) {
301
- //电脑
302
- this.isPC = true;
303
- } else {
304
- //手机
305
- this.isPC = false;
306
- }
307
- // this.msg.content.list.forEach(element => {
308
- // console.log(this.imageObj[element.format],1111);
309
- // element.src = 'https://static.guoranbot.com/cdn-office-website/askbot_doc/' + this.imageObj[element.format] + '.png';
310
- // if ((element.format === "txt" || element.format === "html") && element.source === "WECHAT") {
311
- // element.src = 'https://static.guoranbot.com/cdn-office-website/askbot_doc/wechat.png';
312
- // }
313
- // });
314
- },
315
- mounted () {
316
- console.log(this.msg.content, 'this.msg.content');
317
- // if(this.msg.content.type == 1) {
318
-
319
- // }
320
- if (this.msg.content.list && this.msg.content.list.length > 0) {
321
- this.loadMoreFlag = true
322
- this.allKnowledgeList = JSON.parse(JSON.stringify(this.msg.content.list))
323
- // console.log(this.allKnowledgeList.length, 'this.allKnowledgeList');
324
- this.msg.content.list = []
325
- this.lazyLoadKnowledegList()
326
- }
327
- },
328
- methods: {
329
- getIconSrc (element) {
330
- if ((element.format === "txt" || element.format === "html") && element.source === "WECHAT") {
331
- return require("../assets/image/filtType/wechat.png")
332
- } else {
333
- return require("../assets/image/filtType/" + this.imageObj[element.format] + '.png')
334
-
335
- }
336
- },
337
- //预览图片
338
- lookAttach (url, item, event,itemIndex) {
339
- // console.log(item.knowledgeId);
340
- // this.$http.get("/knowledge-api/internal/knowledgeBaseStructure/" + "642ffbccde420e2772f7787b")
341
- // debugger
342
- event.preventDefault();
343
- if (this.isAskLightning == 1 && !this.isApp) {
344
- window.parent.postMessage({
345
- data: "bot_preview",
346
- item: JSON.stringify(item),
347
- url: url
348
- }, "*");
349
- } else {
350
- // if (isMobile()) {
351
- // this.$refs.previewPdf.drawer = true;
352
- // this.$refs.previewPdf.previewShowPopup = false;
353
- // } else {
354
- // this.$refs.previewPdf.drawer = false;
355
- // }
356
- //该事件是为了打开新的弹框时关闭上一个弹框
357
- window.parent.postMessage({
358
- data: "close_drawer"
359
- }, "*");
360
- this.title = item.from || item.name
361
- this.folderName = item.folderName
362
- this.folderUrl = item.folderUrl
363
- this.previewKnowledge = item;
364
- this.previewKnowledgeId = item.knowledgeId
365
- this.$refs.previewPdf.previewShowPopup = false;
366
- this.$refs.previewPdf.drawer = false;
367
- this.previewOssPath = url;
368
- let index = url.lastIndexOf('?')
369
- let type = ''
370
- let httpUrl = '/knowledge-api/knowledge/getTemporaryCertificate'
371
- if (index !== -1) {
372
- url = url.substring(0, index)
373
- type = this.fileType(url)
374
- } else {
375
- type = this.fileType(url)
376
- }
377
- if (type === '' || type === 'OTHER' || type == 'IMAGE') {
378
- httpUrl = httpUrl += '?needEncrypt=true'
379
- } else {
380
- httpUrl = httpUrl += '?needEncrypt=false'
381
- }
382
- this.$refs.previewPdf.getOssPath(url);
383
- this.$http.post(httpUrl, {
384
- "fileInOssPath": url
385
- }).then(res => {
386
- if (res.data.code == '0') {
387
- this.previewHref = res.data.data;
388
- this.sourceFileType = url.substring(url.lastIndexOf('.'))
389
- let isOhmPc = sessionStorage.getItem('isOhmPc')
390
- if (isMobile() || isOhmPc == 'true') {
391
- this.$refs.previewPdf.drawer = true;
392
- this.$refs.previewPdf.previewShowPopup = true;
393
- } else {
394
- this.$refs.previewPdf.previewShowPopup = false;
395
- this.$refs.previewPdf.drawer = true;
396
- }
397
- //聊一聊按钮的选中状态
398
- if (this.activeKnowledgeId == item.knowledgeId) {
399
- this.$refs.previewPdf.previewKnowledgeId = this.activeKnowledgeId
400
- } else {
401
- this.$refs.previewPdf.previewKnowledgeId = ""
402
- }
403
- this.$refs.previewPdf.fileType = type
404
- this.$refs.previewPdf.tagIds = item.tagIds;
405
- if (item.tagIds && item.tagIds.length > 0){
406
- this.$refs.previewPdf.getLocationInfo();
407
- }
408
- this.$refs.previewPdf.isMessageRecord = this.isMessageRecord ? true : false;
409
- let index = url.indexOf("?");
410
- let newFileInOssPath = url;
411
- if (index !== -1) {
412
- newFileInOssPath = url.substring(0, url.indexOf("?"))
413
- }
414
- let fileName = newFileInOssPath.substring(newFileInOssPath.lastIndexOf('.'))
415
- if (fileName === '.doc' || fileName === '.docx' || fileName === '.txt' || fileName === '.html') {
416
- this.$refs.previewPdf.fileName = fileName;
417
- } else {
418
- this.$refs.previewPdf.fileName = '';
419
- }
420
- let domId = item.knowledgeId + itemIndex
421
- let dom = document.getElementById(domId);
422
- console.log('滚动到指定预览知识位置',dom)
423
- if (dom){
424
- dom.scrollIntoView({ behavior: 'smooth', block: 'start' })
425
- }
426
- if (item.tagIds && item.tagIds.length != 0 && this.$refs.previewPdf.newFileType !== 'PPT') {
427
- this.$refs.previewPdf.loading = false
428
- return
429
- }
430
- this.$nextTick(() => {
431
- if (item.source == 'CREATED_BY_ONESELF' || type === 'HTML') {
432
- this.$refs.previewPdf.getBolb(item)
433
- }
434
- this.$refs.previewPdf.loadIframe(item)
435
- this.$refs.previewPdf.showSummary = false;
436
- })
437
- }
438
- })
439
- }
440
- },
441
- open () {
442
- this.$emit('openPreviewDialog')
443
- },
444
- close () {
445
- this.$emit('closePreviewDialog')
446
- },
447
- fileType (url) {
448
- const fileType = url.substring(url.lastIndexOf('.'));
449
- if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.MOVC' || fileType === '.mov' || fileType === '.movc' || fileType === '.mav' || fileType === '.MAV' || fileType == '.mp3' || fileType == '.MP3' || fileType === '.wav') {
450
- return 'VIDEO'
451
- } else if (fileType === '.html') {
452
- return 'HTML'
453
- } else if (fileType === '.png' || fileType === '.jpg' || fileType === '.jpeg') {
454
- return 'IMAGE'
455
- } else {
456
- return 'OTHER'
457
- }
458
- },
459
- srcContentTypeIMG (item) {
460
- let url = item.url || '';
461
- const type = url.substring(url.lastIndexOf('.'));
462
- if (type === '.jpg' || type === '.jpeg' || type === '.png' || type === '.gif') {
463
- this.getSrc(item)
464
- return true
465
- } else {
466
- return false
467
- }
468
- },
469
- getSrc (item) {
470
- // let imgurl = ''
471
- this.$http.post(
472
- '/knowledge-api/temporary-certificate/or-origin?expired=30',
473
- item.url,
474
- {
475
- headers: {
476
- "Content-Type": "application/json",
477
- },
478
- }).then(res => {
479
- console.log(res, '=====');
480
- // imgurl = await res.bodyText
481
- this.$set(item, 'expiredUrl', res.data ? res.data : res.bodyText)
482
- // return res.data
483
- })
484
- // return imgurl
485
- },
486
- lazyLoadKnowledegList () {
487
- if (this.allKnowledgeList.length !== 0) {
488
- let arr = this.allKnowledgeList.splice(0, 5)
489
- if (arr.length < 5) {
490
- this.loadMoreFlag = false
491
- this.msg.content.list = [...this.msg.content.list, ...arr]
492
- return
493
- }
494
- if (this.allKnowledgeList.length == 0) {
495
- this.loadMoreFlag = false
496
- }
497
- this.msg.content.list = [...this.msg.content.list, ...arr]
498
- return
499
- }
500
- },
501
- previewToDialog (flag) {
502
- if (!flag) {
503
- this.$refs.previewPdf.previewKnowledgeId = ""
504
- } else {
505
- this.$refs.previewPdf.previewKnowledgeId = this.previewKnowledgeId
506
- }
507
- this.$emit('previewToDialog', flag, this.previewKnowledgeId, this.previewKnowledge)
508
- },
509
- clearKnowledgeId () {
510
- this.previewKnowledgeId = "";
511
- },
512
- recommendQues (item, knowledgeId) {
513
- this.$emit('recommendQues', item, knowledgeId)
514
- },
515
- clickFloder (item) {
516
- this.$emit('clickFloder', item)
517
- },
518
- previewClickFloder () {
519
- let item = null
520
- this.msg.content.list.forEach(element => {
521
- if (element.knowledgeId == this.previewKnowledgeId) {
522
- item = element
523
- }
524
- });
525
- this.$emit('clickFloder', item)
526
- }
527
- }
528
- }
529
- </script>
530
-
531
- <style scoped lang="less">
532
- .answer-docknowledge {
533
- min-width: 100px;
534
- background: #ffffff;
535
-
536
- .answer-docknowledge-header {
537
- .tips {
538
- width: 154px;
539
- height: 22px;
540
- background: #366aff;
541
- border-radius: 5px;
542
- text-align: center;
543
- line-height: 22px;
544
- color: #fff;
545
- font-size: 12px;
546
- margin-bottom: 7px;
547
- }
548
-
549
- .answer-text {
550
- // font-size: 13px;
551
- text-align: left;
552
- line-height: 25px;
553
- padding: 0px 0px 12px 0px;
554
-
555
- .aci-view {
556
- // font-size: 13px;
557
- display: inline-block;
558
- // margin-left: 5px;
559
- color: #366aff;
560
- cursor: pointer;
561
- }
562
- }
563
-
564
- &.bgc {
565
- padding: 10px;
566
- background: #eef1ff;
567
- border-radius: 10px;
568
- margin-bottom: 16px;
569
-
570
- .answer-text {
571
- padding: 0;
572
- }
573
- }
574
-
575
- .answer-kn-image-box {
576
- margin-bottom: 10px;
577
- }
578
- }
579
-
580
-
581
- .ad-list-recognition {
582
- display: flex;
583
- align-items: center;
584
- flex-wrap: wrap;
585
- }
586
-
587
- .libang_list_recognition {
588
- display: flex;
589
- align-items: center;
590
- flex-wrap: wrap;
591
- }
592
-
593
- .ad-list {
594
- .ad-list-cell {
595
- border-top: solid 1px #eeeeee;
596
- padding: 10px 0 10px;
597
-
598
- .alc-title {
599
- display: flex;
600
- flex-wrap: wrap;
601
- align-items: center;
602
- justify-content: space-between;
603
- line-height: 16px;
604
-
605
- .alc-box {
606
- display: flex;
607
- align-items: center;
608
- justify-content: space-between;
609
- // font-size: 12px;
610
- width: 100%;
611
-
612
- .alc-source-left {
613
- display: flex;
614
- align-items: center;
615
-
616
- .source-form {
617
- width: 34px;
618
- flex: none;
619
- color: #a9b3c6;
620
- }
621
- }
622
-
623
- .alc-content-text {
624
- width: 55px;
625
- flex: none;
626
-
627
- .aci-view {
628
- color: #366aff;
629
- cursor: pointer;
630
- }
631
- }
632
-
633
- .alc-title-from {
634
- line-height: 22px;
635
- word-break: break-all !important;
636
- text-align: left;
637
- flex: auto;
638
- display: flex;
639
- justify-content: flex-start;
640
- }
641
- .upload-source {
642
- // flex: none;
643
- }
644
- }
645
-
646
- .alc-box-introduction {
647
- overflow: hidden;
648
- text-overflow: ellipsis;
649
- display: -webkit-box;
650
- -webkit-line-clamp: 3;
651
- -webkit-box-orient: vertical;
652
- margin-top: 10px;
653
- color: #616161;
654
- // font-size: 12px;
655
- line-height: 24px;
656
- text-align: left;
657
-
658
- img {
659
- width: 50px;
660
- height: 50px;
661
- margin: 10px;
662
- cursor: pointer;
663
- }
664
- }
665
-
666
- .alc-box-introduction-previewImage {
667
- width: 100%;
668
- display: block;
669
- overflow: hidden;
670
- text-overflow: ellipsis;
671
- display: -webkit-box;
672
- -webkit-line-clamp: 3;
673
- -webkit-box-orient: vertical;
674
- margin-top: 10px;
675
- color: #616161;
676
- // font-size: 12px;
677
- line-height: 24px;
678
- text-align: left;
679
-
680
- img {
681
- max-width: 300px;
682
- width: 100%;
683
- max-height: 150px;
684
- margin: 10px;
685
- cursor: pointer;
686
- }
687
- }
688
-
689
- .alc-updateTime {
690
- display: flex;
691
- align-items: center;
692
- justify-content: space-between;
693
- font-size: 13px;
694
- width: 100%;
695
- margin-top: 10px;
696
-
697
- .upload-source {
698
- flex: none;
699
- height: 18px;
700
- line-height: 18px;
701
- background: #e9f9f8;
702
- border: 1px solid #aff2cd;
703
- border-radius: 2px;
704
- display: flex;
705
- align-items: center;
706
- justify-content: center;
707
- padding: 0 8px;
708
- color: #00c2bb;
709
- }
710
-
711
- .time {
712
- color: #999999;
713
- margin-left: 10px;
714
- }
715
-
716
- .alc-content-text {
717
- color: #366aff;
718
- cursor: pointer;
719
- }
720
- }
721
-
722
- .alc-title-icon {
723
- margin: 0 2px;
724
- width: 18px;
725
- height: 18px;
726
- flex: none;
727
- }
728
-
729
- .alc-title-updateTime {
730
- text-align: right;
731
- color: #999999;
732
- // font-size: 13px;
733
- }
734
- }
735
-
736
- .alc-content {
737
- .alc-title-updateTime {
738
- margin-top: 6px;
739
- display: block;
740
- text-align: right;
741
- color: #999999;
742
- // font-size: 13px;
743
- }
744
-
745
- .alc-content-text {
746
- margin-bottom: 6px;
747
- width: 55px;
748
- flex: none;
749
-
750
- .aci-view {
751
- display: inline-block;
752
- margin-left: 30px;
753
- color: #366aff;
754
- cursor: pointer;
755
- }
756
- }
757
-
758
- .alc-content-info {
759
- display: flex;
760
- flex-wrap: wrap;
761
- justify-content: space-between;
762
-
763
- .alcc-box {
764
- display: flex;
765
- flex-wrap: wrap;
766
- color: #999999;
767
-
768
- .aci-owner {
769
- margin-right: 20px;
770
- }
771
-
772
- .aci-enterprise {
773
- margin-right: 20px;
774
- }
775
- }
776
- }
777
- }
778
- }
779
-
780
- .ad-list-cell-recognition {
781
- max-width: 270px;
782
- margin-right: 12px;
783
- font-size: 12px;
784
- .alc-source-name {
785
- flex: none;
786
- padding: 3px;
787
- margin-right: 5px;
788
- margin-bottom: 5px;
789
- background: #f2f6ff;
790
- border-radius: 5px;
791
- display: flex;
792
- align-items: center;
793
- justify-content: space-between;
794
- cursor: pointer;
795
-
796
- img {
797
- vertical-align: middle;
798
- // width: 16px;
799
- // height: 16px;
800
- margin: 0 3px 0 5px;
801
- }
802
-
803
- .alc-title-from {
804
- // margin-right: 5px;
805
- max-width: 240px;
806
- overflow: hidden;
807
- text-overflow: ellipsis;
808
- white-space: nowrap;
809
- }
810
-
811
- .upload-source {
812
- margin-right: 5px;
813
- flex: none;
814
- }
815
-
816
- i {
817
- font-size: 12px;
818
- }
819
- }
820
- }
821
-
822
- .ad-loadmore {
823
- width: 100%;
824
- height: 40px;
825
- display: flex;
826
- align-items: center;
827
- justify-content: center;
828
- // background: #FFFFFF;
829
- color: #366aff;
830
- font-size: 14px;
831
- margin-top: 8px;
832
- cursor: pointer;
833
- }
834
- }
835
-
836
- .libang_list {
837
- .libang_list_cell {
838
- border-top: solid 1px #eeeeee;
839
- padding: 10px 0 10px;
840
- font-size: 12px;
841
- .libang_title {
842
- display: flex;
843
- flex-wrap: wrap;
844
- align-items: center;
845
- justify-content: space-between;
846
- line-height: 16px;
847
-
848
- .libang_box {
849
- display: flex;
850
- align-items: center;
851
- justify-content: space-between;
852
- // font-size: 12px;
853
- width: 100%;
854
-
855
- .libang_source_left {
856
- display: flex;
857
- align-items: center;
858
-
859
- .source-form {
860
- width: 34px;
861
- flex: none;
862
- color: #a9b3c6;
863
- }
864
- }
865
-
866
- .alc-content-text {
867
- width: 55px;
868
- flex: none;
869
-
870
- .aci-view {
871
- color: #366aff;
872
- cursor: pointer;
873
- }
874
- }
875
-
876
- .libang_title_from {
877
- line-height: 22px;
878
- word-break: break-all !important;
879
- text-align: left;
880
- flex: auto;
881
- display: flex;
882
- justify-content: flex-start;
883
- }
884
- }
885
-
886
- .libang_box_introduction {
887
- overflow: hidden;
888
- text-overflow: ellipsis;
889
- display: -webkit-box;
890
- -webkit-line-clamp: 3;
891
- -webkit-box-orient: vertical;
892
- margin-top: 10px;
893
- color: #616161;
894
- // font-size: 12px;
895
- line-height: 24px;
896
- text-align: left;
897
-
898
- img {
899
- width: 50px;
900
- height: 50px;
901
- margin: 10px;
902
- cursor: pointer;
903
- }
904
- }
905
-
906
- .libang_box_introduction_previewImage {
907
- overflow: hidden;
908
- text-overflow: ellipsis;
909
- display: -webkit-box;
910
- -webkit-line-clamp: 3;
911
- -webkit-box-orient: vertical;
912
- margin-top: 10px;
913
- color: #616161;
914
- // font-size: 12px;
915
- line-height: 24px;
916
- text-align: left;
917
-
918
- img {
919
- max-width: 300px;
920
- width: 100%;
921
- max-height: 150px;
922
- margin: 10px;
923
- cursor: pointer;
924
- }
925
- }
926
-
927
- .libang_updateTime {
928
- display: flex;
929
- align-items: center;
930
- justify-content: space-between;
931
- font-size: 13px;
932
- width: 100%;
933
- margin-top: 10px;
934
- .libang_updataTime_left {
935
- width: calc(100% - 40px);
936
- display: flex;
937
- align-items: center;
938
- .upload-source {
939
- flex: none;
940
- height: 18px;
941
- line-height: 18px;
942
- background: #e9f9f8;
943
- border: 1px solid #aff2cd;
944
- border-radius: 2px;
945
- display: flex;
946
- align-items: center;
947
- justify-content: center;
948
- padding: 0 8px;
949
- color: #00c2bb;
950
- }
951
- .libang_floder {
952
- width:calc(100% - 90px);
953
- // margin-left: 10px;
954
- overflow: hidden;
955
- text-overflow: ellipsis;
956
- white-space: nowrap;
957
- color: #366aff;
958
- cursor: pointer;
959
- text-align: left;
960
- i {
961
- margin-left: 8px;
962
- }
963
- }
964
- }
965
- .libang_content_text {
966
- color: #366aff;
967
- cursor: pointer;
968
- }
969
- .time {
970
- color: #999999;
971
- margin-left: 10px;
972
- }
973
- }
974
- .alc-title-icon {
975
- margin: 0 2px;
976
- width: 18px;
977
- height: 18px;
978
- flex: none;
979
- }
980
-
981
- .alc-title-updateTime {
982
- text-align: right;
983
- color: #999999;
984
- // font-size: 13px;
985
- }
986
- }
987
-
988
- .alc-content {
989
- .alc-title-updateTime {
990
- margin-top: 6px;
991
- display: block;
992
- text-align: right;
993
- color: #999999;
994
- // font-size: 13px;
995
- }
996
-
997
- .alc-content-text {
998
- margin-bottom: 6px;
999
- width: 55px;
1000
- flex: none;
1001
-
1002
- .aci-view {
1003
- display: inline-block;
1004
- margin-left: 30px;
1005
- color: #366aff;
1006
- cursor: pointer;
1007
- }
1008
- }
1009
-
1010
- .alc-content-info {
1011
- display: flex;
1012
- flex-wrap: wrap;
1013
- justify-content: space-between;
1014
-
1015
- .alcc-box {
1016
- display: flex;
1017
- flex-wrap: wrap;
1018
- color: #999999;
1019
-
1020
- .aci-owner {
1021
- margin-right: 20px;
1022
- }
1023
-
1024
- .aci-enterprise {
1025
- margin-right: 20px;
1026
- }
1027
- }
1028
- }
1029
- }
1030
- }
1031
-
1032
- .libang_list_cell_recognition {
1033
- background: #f2f6ff;
1034
- display: flex;
1035
- align-items: center;
1036
- justify-content: space-between;
1037
- padding: 3px;
1038
- margin-right: 5px;
1039
- margin-bottom: 5px;
1040
- border-radius: 5px;
1041
- cursor: pointer;
1042
- font-size: 12px;
1043
-
1044
- .libang_list_cell_left {
1045
- margin-right: 5px;
1046
- .libang_source_name {
1047
- display: flex;
1048
- align-items: center;
1049
- height: 20px;
1050
- margin-bottom: 2px;
1051
- img {
1052
- vertical-align: middle;
1053
- // width: 16px;
1054
- // height: 16px;
1055
- margin: 0 3px;
1056
- }
1057
-
1058
- .libang_title_from {
1059
- max-width: 226px;
1060
- overflow: hidden;
1061
- text-overflow: ellipsis;
1062
- white-space: nowrap;
1063
- line-height: 20px;
1064
- }
1065
- .upload_source {
1066
- flex: none;
1067
- }
1068
- }
1069
- .libang_source_floder {
1070
- max-width: calc(226px - 24px);
1071
- text-align: left;
1072
- color: #366aff;
1073
- overflow: hidden;
1074
- text-overflow: ellipsis;
1075
- white-space: nowrap;
1076
- cursor: pointer;
1077
- .iconfont {
1078
- margin: 0 5px;
1079
- font-size: 14px
1080
- }
1081
- }
1082
- }
1083
- i {
1084
- font-size: 12px;
1085
- }
1086
- }
1087
-
1088
- .ad-loadmore {
1089
- width: 100%;
1090
- height: 40px;
1091
- display: flex;
1092
- align-items: center;
1093
- justify-content: center;
1094
- // background: #FFFFFF;
1095
- color: #366aff;
1096
- font-size: 14px;
1097
- margin-top: 8px;
1098
- cursor: pointer;
1099
- }
1100
- }
1101
- }</style>
1
+ <!--
2
+ isLiBang 字段判断 是否为立邦主体
3
+ 立邦有自己单独的组件分支,但考虑到后期结构改动如果较大改动会不方便,所以还是在推荐知识消息中 在此判断是否是立邦主体。方便后期维护
4
+ -->
5
+ <template>
6
+ <div class="answer-docknowledge">
7
+ <div :class="['answer-docknowledge-header', msg.content.isKnowledgeSummary ? 'bgc' : '']">
8
+ <div v-if="msg.content.isKnowledgeSummary" class="tips">{{$t('dragonCommon.summaryGeneratedByAI')}}</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-if="msg.content.renderType == 2">
20
+ <markDownText :chainValues="msg.content.text" :isHistory="isHistory"></markDownText>
21
+ </template>
22
+ <template v-else>{{ msg.content.text }}</template>
23
+ </div>
24
+ <div v-if="msg.content.images && msg.content.images.length != 0" class="answer-kn-image-box">
25
+ <img v-for="(imageItem, imageItemIndex) in msg.content.images"
26
+ style="max-width: 230px;border-radius: 25px;margin-bottom: 15px" :src="imageItem.url"
27
+ :key="imageItemIndex" alt @click="lookAttach(imageItem.url, imageItem, $event)" />
28
+ </div>
29
+ </div>
30
+ <template v-if="!isLiBang">
31
+ <div class="ad-list" :class="msg.content.type == 0 ? 'ad-list-recognition' : ''">
32
+ <template v-if="msg.content.type == 1">
33
+ <div v-for="(item, itemIndex) in msg.content.list" :key="itemIndex"
34
+ :style="{ paddingBottom: itemIndex === msg.content.list.length - 1 ? 0 : '10px' }" class="ad-list-cell">
35
+ <div class="alc-title">
36
+ <div class="alc-box">
37
+ <div class="alc-source-left">
38
+ <span class="source-form">{{$t('dragonCommon.from')}}</span>
39
+ <img class="alc-title-icon" height="24px" width="24px" :src="getIconSrc(item)" alt=""
40
+ srcset="">
41
+ <span class="alc-title-from">{{ item.from }}</span>
42
+ </div>
43
+ </div>
44
+ <div v-html="item.introduction" v-if="!srcContentTypeIMG(item)" class="alc-box-introduction">
45
+ </div>
46
+ <div v-else class="alc-box-introduction">
47
+ <img :src="item.expiredUrl" alt="" @click="lookAttach(item.url, item, $event)">
48
+ </div>
49
+ <div v-if="item.previewImage" class="alc-box-introduction-previewImage">
50
+ <img :src="item.previewImage" alt=""
51
+ @click="lookAttach(item.previewImage, { url: item.previewImage }, $event)">
52
+ </div>
53
+ <div class="alc-updateTime">
54
+ <div v-show="docSource[item.source]" class="upload-source">
55
+ {{ docSource[item.source] }}
56
+ </div>
57
+ <div v-show="item.url" class="alc-content-text">
58
+ <span @click="lookAttach(item.url, item, $event)" class="aci-view">{{$t('dragonCommon.check')}} ></span>
59
+ </div>
60
+ </div>
61
+ </div>
62
+ <div class="alc-content" v-if="false">
63
+ <div v-if="msg.content.type == 1" class="alc-content-text">
64
+ {{ item.introduction }}
65
+ <span @click="lookAttach(item.url, item, $event)" class="aci-view">{{$t('dragonCommon.viewOriginal')}} ></span>
66
+ </div>
67
+ <span v-if="!isPC" class="alc-title-updateTime">{{$t('dragonCommon.lastUpdateTime')}}: {{ item.updateTime }}</span>
68
+ <div v-if="false" class="alc-content-info">
69
+ <div class="alcc-box">
70
+ <span class="aci-owner">{{$t('dragonCommon.owner')}}: {{ item.owner }}</span>
71
+ <span class="aci-enterprise">{{$t('dragonCommon.enterprise')}}: {{ item.enterprise }}</span>
72
+ <span class="aci-source">{{$t('dragonCommon.source')}}: {{ item.source }}</span>
73
+ </div>
74
+ </div>
75
+ </div>
76
+ </div>
77
+ </template>
78
+ <template v-if="msg.content.type == 0">
79
+ <div v-for="(item, itemIndex) in msg.content.list" :key="itemIndex" class="ad-list-cell-recognition" :id="item.knowledgeId + knowledgeIndex">
80
+ <div class="alc-source-name" @click="lookAttach(item.url, item, $event)">
81
+ <img class="alc-title-icon" height="18px" width="18px" :src="getIconSrc(item)" alt srcset />
82
+ <span class="alc-title-from">{{ item.from }}</span>&nbsp;-&nbsp;
83
+ <div v-show="docSource[item.source]" class="upload-source">
84
+ {{ docSource[item.source] }}
85
+ </div>
86
+ <i class="iconfont guoran-right"></i>
87
+ </div>
88
+ </div>
89
+ </template>
90
+ <div class="ad-loadmore" v-if="loadMoreFlag" @click="lazyLoadKnowledegList">{{$t('dragonCommon.viewMore')}}</div>
91
+ </div>
92
+ </template>
93
+ <template v-if="isLiBang">
94
+ <div class="libang_list" :class="msg.content.type == 0 ? 'libang_list_recognition' : ''">
95
+ <template v-if="msg.content.type == 1">
96
+ <div v-for="(item, itemIndex) in msg.content.list" :key="itemIndex" class="libang_list_cell">
97
+ <div class="libang_title">
98
+ <div class="libang_box">
99
+ <div class="libang_source_left">
100
+ <span class="source-form">{{$t('dragonCommon.from')}}</span>
101
+ <img class="libang_title_icon" height="24px" width="24px" :src="getIconSrc(item)" alt=""
102
+ srcset="">
103
+ <span class="libang_title_from">{{ item.from }}</span>
104
+ </div>
105
+ </div>
106
+ <div v-html="item.introduction" v-if="!srcContentTypeIMG(item)" class="libang_box_introduction">
107
+ </div>
108
+ <div v-else class="libang_box_introduction">
109
+ <img :src="item.expiredUrl" alt="" @click="lookAttach(item.url, item, $event)">
110
+ </div>
111
+ <div v-if="item.previewImage" class="libang_box_introduction_previewImage">
112
+ <img :src="item.previewImage" alt=""
113
+ @click="lookAttach(item.previewImage, { url: item.previewImage }, $event)">
114
+ </div>
115
+ <div class="libang_updateTime">
116
+ <div class="libang_updataTime_left">
117
+ <div v-show="docSource[item.source]" class="upload-source">
118
+ {{ docSource[item.source] }}
119
+ </div>
120
+ <div class="libang_floder" @click.stop="clickFloder(item)">
121
+ <i class="iconfont guoran-tongyichicun-wenjianjia-zhankaizhuangtai--folderOpen"></i>
122
+ {{ item.folderName }}
123
+ </div>
124
+ </div>
125
+ <div v-show="item.url" class="libang_content_text">
126
+ <span @click="lookAttach(item.url, item, $event)" class="aci-view">{{$t('dragonCommon.check')}} ></span>
127
+ </div>
128
+ </div>
129
+ </div>
130
+ <!-- <div class="alc-content" v-if="false">
131
+ <div v-if="msg.content.type == 1" class="alc-content-text">
132
+ {{ item.introduction }}
133
+ <span @click="lookAttach(item.url, item, $event)" class="aci-view">查看原文 ></span>
134
+ </div>
135
+ <span v-if="!isPC" class="alc-title-updateTime">最后更新时间: {{ item.updateTime }}</span>
136
+ <div v-if="false" class="alc-content-info">
137
+ <div class="alcc-box">
138
+ <span class="aci-owner">所有者: {{ item.owner }}</span>
139
+ <span class="aci-enterprise">所属企业: {{ item.enterprise }}</span>
140
+ <span class="aci-source">文件来源: {{ item.source }}</span>
141
+ </div>
142
+ </div>
143
+ </div> -->
144
+ </div>
145
+ </template>
146
+ <template v-if="msg.content.type == 0">
147
+ <div v-for="(item, itemIndex) in msg.content.list" :key="itemIndex"
148
+ class="libang_list_cell_recognition" @click="lookAttach(item.url, item, $event)" :id="item.knowledgeId + knowledgeIndex">
149
+ <div class="libang_list_cell_left" >
150
+ <div class="libang_source_name" >
151
+ <img class="libang_title_icon" height="18px" width="18px" :src="getIconSrc(item)" alt srcset />
152
+ <span class="libang_title_from">{{ item.from }}</span>&nbsp;-&nbsp;
153
+ <div v-show="docSource[item.source]" class="upload_source">
154
+ {{ docSource[item.source] }}
155
+ </div>
156
+ </div>
157
+ <div class="libang_source_floder" @click.stop="clickFloder(item)">
158
+ <i class="iconfont guoran-tongyichicun-wenjianjia-zhankaizhuangtai--folderOpen"></i>
159
+ {{ item.folderName }}
160
+ </div>
161
+ </div>
162
+ <i class="iconfont guoran-right" @click="lookAttach(item.url, item, $event)"></i>
163
+ </div>
164
+ </template>
165
+ <div class="ad-loadmore" v-if="loadMoreFlag" @click="lazyLoadKnowledegList">{{$t('dragonCommon.viewMore')}}</div>
166
+ </div>
167
+ </template>
168
+
169
+ <previewPdf ref="previewPdf" :url="previewHref" :previewOssPath="previewOssPath" :title="title"
170
+ :folderName="folderName" :folderUrl="folderUrl"
171
+ :sourceFileType="sourceFileType" officePreviewType="pdf" @previewToDialog="previewToDialog"
172
+ @recommendQues="recommendQues" @close="close" @open="open" :isHasChat="isHasChat"
173
+ :knowledgeId="previewKnowledgeId" :isLiBang="isLiBang" @previewClickFloder="previewClickFloder"></previewPdf>
174
+ </div>
175
+ </template>
176
+
177
+ <script>
178
+ /* eslint-disable */
179
+ import previewPdf from "./previewPdf";
180
+ import { isMobile } from "../assets/js/common";
181
+ import markDownText from "./markDownText.vue";
182
+ export default {
183
+ name: "answerDocknowledge",
184
+ components: { previewPdf, markDownText },
185
+ data () {
186
+ return {
187
+ isPC: true,
188
+ previewHref: "",
189
+ sourceFileType: '',
190
+ // docSource: {
191
+ // LOCAL_FILE: "来源于本地文件",
192
+ // CREATED_BY_ONESELF: "来源于自建知识",
193
+ // WECHAT: "来源于微信",
194
+ // AUTO_SYN_FROM_LOCAL_FILE: "自动同步于本地",
195
+ // YUQUE: "来源于语雀",
196
+ // CORP_LOCAL_FILE: '来源于企业知识库',
197
+ // FEISHU: '来源于飞书-云文档'
198
+ // },
199
+ docSource: {},
200
+ imageObj: {
201
+ PDF: 'pdf1',
202
+ pdf: 'pdf1',
203
+ TXT: 'txt1',
204
+ txt: 'txt1',
205
+ selfadd: 'selfadd1',
206
+ md: "md2",
207
+ html: 'selfadd1',
208
+ mode: "mode",
209
+ general: 'general',
210
+ word: "word1",
211
+ Word: "word1",
212
+ docx: "word1",
213
+ doc: "word1",
214
+ WORD: "word1",
215
+ Excel: 'excel1',
216
+ EXCEL: 'excel1',
217
+ excel: 'excel1',
218
+ PPT: 'ppt1',
219
+ ppt: 'ppt1',
220
+ pptx: 'ppt1',
221
+ img: "image1",
222
+ image: "image1",
223
+ video: "video",
224
+ audio: 'audio',
225
+ link: "link",
226
+ wechat: "wechat",
227
+ mp4: "video",
228
+ MP4: "video",
229
+ xlsx: "excel1",
230
+ SLSX: "excel1",
231
+ xls: "excel1",
232
+ XLS: "excel1",
233
+ jpg: "image1",
234
+ JPG: "image1",
235
+ jpeg: "image1",
236
+ JPEG: "image1",
237
+ png: "image1",
238
+ PNG: "image1",
239
+ webp: "image1",
240
+ WEBP: "image1",
241
+ gif: "image1",
242
+ GIF: "image1",
243
+ svg: "image1",
244
+ SVG: "image1",
245
+ bmp: "image1",
246
+ BMP: "image1",
247
+ avi: "video",
248
+ AVI: "video",
249
+ mov: "video",
250
+ MOV: "video",
251
+ rmvb: "video",
252
+ RMVB: "video",
253
+ wav: "audio",
254
+ WAV: "audio",
255
+ mp3: "audio",
256
+ MP3: "audio",
257
+ yqhtml: "yqhtml",
258
+ feishuhtml: "feishuhtml"
259
+ },
260
+ allKnowledgeList: [],
261
+ loadMoreFlag: false,
262
+ title: '',
263
+ folderName: '',
264
+ folderUrl: '',
265
+ previewKnowledgeId: "",
266
+ previewKnowledge: {},
267
+ previewOssPath: ""
268
+ }
269
+ },
270
+ props: ['msg', 'isAskLightning', 'isMessageRecord', "isApp", "isHasChat", "activeKnowledgeId", "isLiBang","language","isHistory","knowledgeIndex"],
271
+ beforeMounted () {
272
+ },
273
+ watch: {
274
+ // msg: {
275
+ // handler (n) {
276
+ // console.log(n, 'answerDocknowledge');
277
+ // n.content.list.forEach(element => {
278
+ // console.log(this.imageObj[element.format], 1111);
279
+ // element.src = 'https://static.guoranbot.com/cdn-office-website/askbot_doc/' + this.imageObj[element.format] + '.png';
280
+ // if ((element.format === "txt" || element.format === "html") && element.source === "WECHAT") {
281
+ // element.src = 'https://static.guoranbot.com/cdn-office-website/askbot_doc/wechat.png';
282
+ // }
283
+ // });
284
+ // },
285
+ // deep: true,
286
+ // immediate: true
287
+ // }
288
+ },
289
+ created () {
290
+ var system = {};
291
+ system.pingtai = /(Win32|Win16|WinCE|Mac68K|MacIntel|MacIntel|MacPPC|Linux mips64)/i.test(navigator.platform);
292
+ if (system.pingtai) {
293
+ //电脑
294
+ this.isPC = true;
295
+ } else {
296
+ //手机
297
+ this.isPC = false;
298
+ }
299
+ // this.msg.content.list.forEach(element => {
300
+ // console.log(this.imageObj[element.format],1111);
301
+ // element.src = 'https://static.guoranbot.com/cdn-office-website/askbot_doc/' + this.imageObj[element.format] + '.png';
302
+ // if ((element.format === "txt" || element.format === "html") && element.source === "WECHAT") {
303
+ // element.src = 'https://static.guoranbot.com/cdn-office-website/askbot_doc/wechat.png';
304
+ // }
305
+ // });
306
+ },
307
+ mounted () {
308
+ this.$i18n.locale = sessionStorage.getItem("systemLanguage") || 'cn';
309
+ this.docSource = {
310
+ LOCAL_FILE: this.$t('dragonCommon.personalknowledge'),
311
+ CREATED_BY_ONESELF: this.$t('dragonCommon.personalknowledge'),
312
+ WECHAT: this.$t('dragonCommon.personalknowledge'),
313
+ AUTO_SYN_FROM_LOCAL_FILE: this.$t('dragonCommon.personalknowledge'),
314
+ YUQUE: this.$t('dragonCommon.enterpriseknowledge'),
315
+ CORP_LOCAL_FILE: this.$t('dragonCommon.enterpriseknowledge'),
316
+ FEISHU: this.$t('dragonCommon.enterpriseknowledge'),
317
+ }
318
+ console.log(this.msg.content, 'this.msg.content');
319
+ // if(this.msg.content.type == 1) {
320
+
321
+ // }
322
+ if (this.msg.content.list && this.msg.content.list.length > 0) {
323
+ this.loadMoreFlag = true
324
+ this.allKnowledgeList = JSON.parse(JSON.stringify(this.msg.content.list))
325
+ // console.log(this.allKnowledgeList.length, 'this.allKnowledgeList');
326
+ this.msg.content.list = []
327
+ this.lazyLoadKnowledegList()
328
+ }
329
+ },
330
+ methods: {
331
+ getIconSrc (element) {
332
+ if ((element.format === "txt" || element.format === "html") && element.source === "WECHAT") {
333
+ return require("../assets/image/filtType/wechat.png")
334
+ } else {
335
+ return require("../assets/image/filtType/" + this.imageObj[element.format] + '.png')
336
+
337
+ }
338
+ },
339
+ //预览图片
340
+ lookAttach (url, item, event) {
341
+ // console.log(item.knowledgeId);
342
+ // this.$http.get("/knowledge-api/internal/knowledgeBaseStructure/" + "642ffbccde420e2772f7787b")
343
+ // debugger
344
+ event.preventDefault();
345
+ if (this.isAskLightning == 1 && !this.isApp) {
346
+ window.parent.postMessage({
347
+ data: "bot_preview",
348
+ item: JSON.stringify(item),
349
+ url: url
350
+ }, "*");
351
+ } else {
352
+ // if (isMobile()) {
353
+ // this.$refs.previewPdf.drawer = true;
354
+ // this.$refs.previewPdf.previewShowPopup = false;
355
+ // } else {
356
+ // this.$refs.previewPdf.drawer = false;
357
+ // }
358
+ //该事件是为了打开新的弹框时关闭上一个弹框
359
+ window.parent.postMessage({
360
+ data: "close_drawer"
361
+ }, "*");
362
+ this.title = item.from || item.name
363
+ this.folderName = item.folderName
364
+ this.folderUrl = item.folderUrl
365
+ this.previewKnowledge = item;
366
+ this.previewKnowledgeId = item.knowledgeId
367
+ this.$refs.previewPdf.previewShowPopup = false;
368
+ this.$refs.previewPdf.drawer = false;
369
+ this.previewOssPath = url;
370
+ let index = url.lastIndexOf('?')
371
+ let type = ''
372
+ let httpUrl = '/knowledge-api/knowledge/getTemporaryCertificate'
373
+ if (index !== -1) {
374
+ url = url.substring(0, index)
375
+ type = this.fileType(url)
376
+ } else {
377
+ type = this.fileType(url)
378
+ }
379
+ if (type === '' || type === 'OTHER' || type == 'IMAGE') {
380
+ httpUrl = httpUrl += '?needEncrypt=true'
381
+ } else {
382
+ httpUrl = httpUrl += '?needEncrypt=false'
383
+ }
384
+ this.$refs.previewPdf.getOssPath(url);
385
+ this.$http.post(httpUrl, {
386
+ "fileInOssPath": url
387
+ }).then(res => {
388
+ if (res.data.code == '0') {
389
+ this.previewHref = res.data.data;
390
+ this.sourceFileType = url.substring(url.lastIndexOf('.'))
391
+ let isOhmPc = sessionStorage.getItem('isOhmPc')
392
+ if (isMobile() || isOhmPc == 'true') {
393
+ this.$refs.previewPdf.drawer = true;
394
+ this.$refs.previewPdf.previewShowPopup = true;
395
+ } else {
396
+ this.$refs.previewPdf.previewShowPopup = false;
397
+ this.$refs.previewPdf.drawer = true;
398
+ }
399
+ //聊一聊按钮的选中状态
400
+ if (this.activeKnowledgeId == item.knowledgeId) {
401
+ this.$refs.previewPdf.previewKnowledgeId = this.activeKnowledgeId
402
+ } else {
403
+ this.$refs.previewPdf.previewKnowledgeId = ""
404
+ }
405
+ this.$refs.previewPdf.fileType = type
406
+ this.$refs.previewPdf.tagIds = item.tagIds;
407
+ if (item.tagIds && item.tagIds.length > 0){
408
+ this.$refs.previewPdf.getLocationInfo();
409
+ }
410
+ this.$refs.previewPdf.isMessageRecord = this.isMessageRecord ? true : false;
411
+ let index = url.indexOf("?");
412
+ let newFileInOssPath = url;
413
+ if (index !== -1) {
414
+ newFileInOssPath = url.substring(0, url.indexOf("?"))
415
+ }
416
+ let fileName = newFileInOssPath.substring(newFileInOssPath.lastIndexOf('.'))
417
+ if (fileName === '.doc' || fileName === '.docx' || fileName === '.txt' || fileName === '.html') {
418
+ this.$refs.previewPdf.fileName = fileName;
419
+ } else {
420
+ this.$refs.previewPdf.fileName = '';
421
+ }
422
+ let domId = item.knowledgeId + this.knowledgeIndex
423
+ let dom = document.getElementById(domId);
424
+ console.log('滚动到指定预览知识位置',dom,this.knowledgeIndex)
425
+ if (dom){
426
+ dom.scrollIntoView({ behavior: 'smooth', block: 'start' })
427
+ }
428
+ if (item.tagIds && item.tagIds.length != 0 && this.$refs.previewPdf.newFileType !== 'PPT') {
429
+ this.$refs.previewPdf.loading = false
430
+ return
431
+ }
432
+ this.$nextTick(() => {
433
+ if (item.source == 'CREATED_BY_ONESELF' || type === 'HTML') {
434
+ this.$refs.previewPdf.getBolb(item)
435
+ }
436
+ this.$refs.previewPdf.loadIframe(item)
437
+ this.$refs.previewPdf.showSummary = false;
438
+ })
439
+ }
440
+ })
441
+ }
442
+ },
443
+ open () {
444
+ this.$emit('openPreviewDialog')
445
+ },
446
+ close () {
447
+ this.$emit('closePreviewDialog')
448
+ },
449
+ fileType (url) {
450
+ const fileType = url.substring(url.lastIndexOf('.'));
451
+ if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.MOVC' || fileType === '.mov' || fileType === '.movc' || fileType === '.mav' || fileType === '.MAV' || fileType == '.mp3' || fileType == '.MP3' || fileType === '.wav') {
452
+ return 'VIDEO'
453
+ } else if (fileType === '.html') {
454
+ return 'HTML'
455
+ } else if (fileType === '.png' || fileType === '.jpg' || fileType === '.jpeg') {
456
+ return 'IMAGE'
457
+ } else {
458
+ return 'OTHER'
459
+ }
460
+ },
461
+ srcContentTypeIMG (item) {
462
+ let url = item.url || '';
463
+ const type = url.substring(url.lastIndexOf('.'));
464
+ if (type === '.jpg' || type === '.jpeg' || type === '.png' || type === '.gif') {
465
+ this.getSrc(item)
466
+ return true
467
+ } else {
468
+ return false
469
+ }
470
+ },
471
+ getSrc (item) {
472
+ // let imgurl = ''
473
+ this.$http.post(
474
+ '/knowledge-api/temporary-certificate/or-origin?expired=30',
475
+ item.url,
476
+ {
477
+ headers: {
478
+ "Content-Type": "application/json",
479
+ },
480
+ }).then(res => {
481
+ console.log(res, '=====');
482
+ // imgurl = await res.bodyText
483
+ this.$set(item, 'expiredUrl', res.data ? res.data : res.bodyText)
484
+ // return res.data
485
+ })
486
+ // return imgurl
487
+ },
488
+ lazyLoadKnowledegList () {
489
+ if (this.allKnowledgeList.length !== 0) {
490
+ let arr = this.allKnowledgeList.splice(0, 5)
491
+ if (arr.length < 5) {
492
+ this.loadMoreFlag = false
493
+ this.msg.content.list = [...this.msg.content.list, ...arr]
494
+ return
495
+ }
496
+ if (this.allKnowledgeList.length == 0) {
497
+ this.loadMoreFlag = false
498
+ }
499
+ this.msg.content.list = [...this.msg.content.list, ...arr]
500
+ return
501
+ }
502
+ },
503
+ previewToDialog (flag) {
504
+ if (!flag) {
505
+ this.$refs.previewPdf.previewKnowledgeId = ""
506
+ } else {
507
+ this.$refs.previewPdf.previewKnowledgeId = this.previewKnowledgeId
508
+ }
509
+ this.$emit('previewToDialog', flag, this.previewKnowledgeId, this.previewKnowledge)
510
+ },
511
+ clearKnowledgeId () {
512
+ this.previewKnowledgeId = "";
513
+ },
514
+ recommendQues (item, knowledgeId) {
515
+ this.$emit('recommendQues', item, knowledgeId)
516
+ },
517
+ clickFloder (item) {
518
+ this.$emit('clickFloder', item)
519
+ },
520
+ previewClickFloder () {
521
+ let item = null
522
+ this.msg.content.list.forEach(element => {
523
+ if (element.knowledgeId == this.previewKnowledgeId) {
524
+ item = element
525
+ }
526
+ });
527
+ this.$emit('clickFloder', item)
528
+ }
529
+ }
530
+ }
531
+ </script>
532
+
533
+ <style scoped lang="less">
534
+ .answer-docknowledge {
535
+ min-width: 100px;
536
+ background: #ffffff;
537
+
538
+ .answer-docknowledge-header {
539
+ .tips {
540
+ width: 154px;
541
+ height: 22px;
542
+ background: #366aff;
543
+ border-radius: 5px;
544
+ text-align: center;
545
+ line-height: 22px;
546
+ color: #fff;
547
+ font-size: 12px;
548
+ margin-bottom: 7px;
549
+ }
550
+
551
+ .answer-text {
552
+ // font-size: 13px;
553
+ text-align: left;
554
+ line-height: 25px;
555
+ padding: 0px 0px 12px 0px;
556
+
557
+ .aci-view {
558
+ // font-size: 13px;
559
+ display: inline-block;
560
+ // margin-left: 5px;
561
+ color: #366aff;
562
+ cursor: pointer;
563
+ }
564
+ }
565
+
566
+ &.bgc {
567
+ padding: 10px;
568
+ background: #eef1ff;
569
+ border-radius: 10px;
570
+ margin-bottom: 16px;
571
+
572
+ .answer-text {
573
+ padding: 0;
574
+ }
575
+ }
576
+
577
+ .answer-kn-image-box {
578
+ margin-bottom: 10px;
579
+ }
580
+ }
581
+
582
+
583
+ .ad-list-recognition {
584
+ display: flex;
585
+ align-items: center;
586
+ flex-wrap: wrap;
587
+ }
588
+
589
+ .libang_list_recognition {
590
+ display: flex;
591
+ align-items: center;
592
+ flex-wrap: wrap;
593
+ }
594
+
595
+ .ad-list {
596
+ .ad-list-cell {
597
+ border-top: solid 1px #eeeeee;
598
+ padding: 10px 0 10px;
599
+
600
+ .alc-title {
601
+ display: flex;
602
+ flex-wrap: wrap;
603
+ align-items: center;
604
+ justify-content: space-between;
605
+ line-height: 16px;
606
+
607
+ .alc-box {
608
+ display: flex;
609
+ align-items: center;
610
+ justify-content: space-between;
611
+ // font-size: 12px;
612
+ width: 100%;
613
+
614
+ .alc-source-left {
615
+ display: flex;
616
+ align-items: center;
617
+
618
+ .source-form {
619
+ width: 34px;
620
+ flex: none;
621
+ color: #a9b3c6;
622
+ }
623
+ }
624
+
625
+ .alc-content-text {
626
+ width: 55px;
627
+ flex: none;
628
+
629
+ .aci-view {
630
+ color: #366aff;
631
+ cursor: pointer;
632
+ }
633
+ }
634
+
635
+ .alc-title-from {
636
+ line-height: 22px;
637
+ word-break: break-all !important;
638
+ text-align: left;
639
+ flex: auto;
640
+ display: flex;
641
+ justify-content: flex-start;
642
+ }
643
+ .upload-source {
644
+ // flex: none;
645
+ }
646
+ }
647
+
648
+ .alc-box-introduction {
649
+ overflow: hidden;
650
+ text-overflow: ellipsis;
651
+ display: -webkit-box;
652
+ -webkit-line-clamp: 3;
653
+ -webkit-box-orient: vertical;
654
+ margin-top: 10px;
655
+ color: #616161;
656
+ // font-size: 12px;
657
+ line-height: 24px;
658
+ text-align: left;
659
+
660
+ img {
661
+ width: 50px;
662
+ height: 50px;
663
+ margin: 10px;
664
+ cursor: pointer;
665
+ }
666
+ }
667
+
668
+ .alc-box-introduction-previewImage {
669
+ width: 100%;
670
+ display: block;
671
+ overflow: hidden;
672
+ text-overflow: ellipsis;
673
+ display: -webkit-box;
674
+ -webkit-line-clamp: 3;
675
+ -webkit-box-orient: vertical;
676
+ margin-top: 10px;
677
+ color: #616161;
678
+ // font-size: 12px;
679
+ line-height: 24px;
680
+ text-align: left;
681
+
682
+ img {
683
+ max-width: 300px;
684
+ width: 100%;
685
+ max-height: 150px;
686
+ margin: 10px;
687
+ cursor: pointer;
688
+ }
689
+ }
690
+
691
+ .alc-updateTime {
692
+ display: flex;
693
+ align-items: center;
694
+ justify-content: space-between;
695
+ font-size: 13px;
696
+ width: 100%;
697
+ margin-top: 10px;
698
+
699
+ .upload-source {
700
+ flex: none;
701
+ height: 18px;
702
+ line-height: 18px;
703
+ background: #e9f9f8;
704
+ border: 1px solid #aff2cd;
705
+ border-radius: 2px;
706
+ display: flex;
707
+ align-items: center;
708
+ justify-content: center;
709
+ padding: 0 8px;
710
+ color: #00c2bb;
711
+ }
712
+
713
+ .time {
714
+ color: #999999;
715
+ margin-left: 10px;
716
+ }
717
+
718
+ .alc-content-text {
719
+ color: #366aff;
720
+ cursor: pointer;
721
+ }
722
+ }
723
+
724
+ .alc-title-icon {
725
+ margin: 0 2px;
726
+ width: 18px;
727
+ height: 18px;
728
+ flex: none;
729
+ }
730
+
731
+ .alc-title-updateTime {
732
+ text-align: right;
733
+ color: #999999;
734
+ // font-size: 13px;
735
+ }
736
+ }
737
+
738
+ .alc-content {
739
+ .alc-title-updateTime {
740
+ margin-top: 6px;
741
+ display: block;
742
+ text-align: right;
743
+ color: #999999;
744
+ // font-size: 13px;
745
+ }
746
+
747
+ .alc-content-text {
748
+ margin-bottom: 6px;
749
+ width: 55px;
750
+ flex: none;
751
+
752
+ .aci-view {
753
+ display: inline-block;
754
+ margin-left: 30px;
755
+ color: #366aff;
756
+ cursor: pointer;
757
+ }
758
+ }
759
+
760
+ .alc-content-info {
761
+ display: flex;
762
+ flex-wrap: wrap;
763
+ justify-content: space-between;
764
+
765
+ .alcc-box {
766
+ display: flex;
767
+ flex-wrap: wrap;
768
+ color: #999999;
769
+
770
+ .aci-owner {
771
+ margin-right: 20px;
772
+ }
773
+
774
+ .aci-enterprise {
775
+ margin-right: 20px;
776
+ }
777
+ }
778
+ }
779
+ }
780
+ }
781
+
782
+ .ad-list-cell-recognition {
783
+ max-width: 270px;
784
+ margin-right: 12px;
785
+ font-size: 12px;
786
+ .alc-source-name {
787
+ flex: none;
788
+ padding: 3px;
789
+ margin-right: 5px;
790
+ margin-bottom: 5px;
791
+ background: #f2f6ff;
792
+ border-radius: 5px;
793
+ display: flex;
794
+ align-items: center;
795
+ justify-content: space-between;
796
+ cursor: pointer;
797
+
798
+ img {
799
+ vertical-align: middle;
800
+ // width: 16px;
801
+ // height: 16px;
802
+ margin: 0 3px 0 5px;
803
+ }
804
+
805
+ .alc-title-from {
806
+ // margin-right: 5px;
807
+ max-width: 240px;
808
+ overflow: hidden;
809
+ text-overflow: ellipsis;
810
+ white-space: nowrap;
811
+ }
812
+
813
+ .upload-source {
814
+ margin-right: 5px;
815
+ flex: none;
816
+ }
817
+
818
+ i {
819
+ font-size: 12px;
820
+ }
821
+ }
822
+ }
823
+
824
+ .ad-loadmore {
825
+ width: 100%;
826
+ height: 40px;
827
+ display: flex;
828
+ align-items: center;
829
+ justify-content: center;
830
+ // background: #FFFFFF;
831
+ color: #366aff;
832
+ font-size: 14px;
833
+ margin-top: 8px;
834
+ cursor: pointer;
835
+ }
836
+ }
837
+
838
+ .libang_list {
839
+ .libang_list_cell {
840
+ border-top: solid 1px #eeeeee;
841
+ padding: 10px 0 10px;
842
+ font-size: 12px;
843
+ .libang_title {
844
+ display: flex;
845
+ flex-wrap: wrap;
846
+ align-items: center;
847
+ justify-content: space-between;
848
+ line-height: 16px;
849
+
850
+ .libang_box {
851
+ display: flex;
852
+ align-items: center;
853
+ justify-content: space-between;
854
+ // font-size: 12px;
855
+ width: 100%;
856
+
857
+ .libang_source_left {
858
+ display: flex;
859
+ align-items: center;
860
+
861
+ .source-form {
862
+ width: 34px;
863
+ flex: none;
864
+ color: #a9b3c6;
865
+ }
866
+ }
867
+
868
+ .alc-content-text {
869
+ width: 55px;
870
+ flex: none;
871
+
872
+ .aci-view {
873
+ color: #366aff;
874
+ cursor: pointer;
875
+ }
876
+ }
877
+
878
+ .libang_title_from {
879
+ line-height: 22px;
880
+ word-break: break-all !important;
881
+ text-align: left;
882
+ flex: auto;
883
+ display: flex;
884
+ justify-content: flex-start;
885
+ }
886
+ }
887
+
888
+ .libang_box_introduction {
889
+ overflow: hidden;
890
+ text-overflow: ellipsis;
891
+ display: -webkit-box;
892
+ -webkit-line-clamp: 3;
893
+ -webkit-box-orient: vertical;
894
+ margin-top: 10px;
895
+ color: #616161;
896
+ // font-size: 12px;
897
+ line-height: 24px;
898
+ text-align: left;
899
+
900
+ img {
901
+ width: 50px;
902
+ height: 50px;
903
+ margin: 10px;
904
+ cursor: pointer;
905
+ }
906
+ }
907
+
908
+ .libang_box_introduction_previewImage {
909
+ overflow: hidden;
910
+ text-overflow: ellipsis;
911
+ display: -webkit-box;
912
+ -webkit-line-clamp: 3;
913
+ -webkit-box-orient: vertical;
914
+ margin-top: 10px;
915
+ color: #616161;
916
+ // font-size: 12px;
917
+ line-height: 24px;
918
+ text-align: left;
919
+
920
+ img {
921
+ max-width: 300px;
922
+ width: 100%;
923
+ max-height: 150px;
924
+ margin: 10px;
925
+ cursor: pointer;
926
+ }
927
+ }
928
+
929
+ .libang_updateTime {
930
+ display: flex;
931
+ align-items: center;
932
+ justify-content: space-between;
933
+ font-size: 13px;
934
+ width: 100%;
935
+ margin-top: 10px;
936
+ .libang_updataTime_left {
937
+ width: calc(100% - 40px);
938
+ display: flex;
939
+ align-items: center;
940
+ .upload-source {
941
+ flex: none;
942
+ height: 18px;
943
+ line-height: 18px;
944
+ background: #e9f9f8;
945
+ border: 1px solid #aff2cd;
946
+ border-radius: 2px;
947
+ display: flex;
948
+ align-items: center;
949
+ justify-content: center;
950
+ padding: 0 8px;
951
+ color: #00c2bb;
952
+ }
953
+ .libang_floder {
954
+ width:calc(100% - 90px);
955
+ // margin-left: 10px;
956
+ overflow: hidden;
957
+ text-overflow: ellipsis;
958
+ white-space: nowrap;
959
+ color: #366aff;
960
+ cursor: pointer;
961
+ text-align: left;
962
+ i {
963
+ margin-left: 8px;
964
+ }
965
+ }
966
+ }
967
+ .libang_content_text {
968
+ color: #366aff;
969
+ cursor: pointer;
970
+ }
971
+ .time {
972
+ color: #999999;
973
+ margin-left: 10px;
974
+ }
975
+ }
976
+ .alc-title-icon {
977
+ margin: 0 2px;
978
+ width: 18px;
979
+ height: 18px;
980
+ flex: none;
981
+ }
982
+
983
+ .alc-title-updateTime {
984
+ text-align: right;
985
+ color: #999999;
986
+ // font-size: 13px;
987
+ }
988
+ }
989
+
990
+ .alc-content {
991
+ .alc-title-updateTime {
992
+ margin-top: 6px;
993
+ display: block;
994
+ text-align: right;
995
+ color: #999999;
996
+ // font-size: 13px;
997
+ }
998
+
999
+ .alc-content-text {
1000
+ margin-bottom: 6px;
1001
+ width: 55px;
1002
+ flex: none;
1003
+
1004
+ .aci-view {
1005
+ display: inline-block;
1006
+ margin-left: 30px;
1007
+ color: #366aff;
1008
+ cursor: pointer;
1009
+ }
1010
+ }
1011
+
1012
+ .alc-content-info {
1013
+ display: flex;
1014
+ flex-wrap: wrap;
1015
+ justify-content: space-between;
1016
+
1017
+ .alcc-box {
1018
+ display: flex;
1019
+ flex-wrap: wrap;
1020
+ color: #999999;
1021
+
1022
+ .aci-owner {
1023
+ margin-right: 20px;
1024
+ }
1025
+
1026
+ .aci-enterprise {
1027
+ margin-right: 20px;
1028
+ }
1029
+ }
1030
+ }
1031
+ }
1032
+ }
1033
+
1034
+ .libang_list_cell_recognition {
1035
+ background: #f2f6ff;
1036
+ display: flex;
1037
+ align-items: center;
1038
+ justify-content: space-between;
1039
+ padding: 3px;
1040
+ margin-right: 5px;
1041
+ margin-bottom: 5px;
1042
+ border-radius: 5px;
1043
+ cursor: pointer;
1044
+ font-size: 12px;
1045
+
1046
+ .libang_list_cell_left {
1047
+ margin-right: 5px;
1048
+ .libang_source_name {
1049
+ display: flex;
1050
+ align-items: center;
1051
+ height: 20px;
1052
+ margin-bottom: 2px;
1053
+ img {
1054
+ vertical-align: middle;
1055
+ // width: 16px;
1056
+ // height: 16px;
1057
+ margin: 0 3px;
1058
+ }
1059
+
1060
+ .libang_title_from {
1061
+ max-width: 226px;
1062
+ overflow: hidden;
1063
+ text-overflow: ellipsis;
1064
+ white-space: nowrap;
1065
+ line-height: 20px;
1066
+ }
1067
+ .upload_source {
1068
+ flex: none;
1069
+ }
1070
+ }
1071
+ .libang_source_floder {
1072
+ max-width: calc(226px - 24px);
1073
+ text-align: left;
1074
+ color: #366aff;
1075
+ overflow: hidden;
1076
+ text-overflow: ellipsis;
1077
+ white-space: nowrap;
1078
+ cursor: pointer;
1079
+ .iconfont {
1080
+ margin: 0 5px;
1081
+ font-size: 14px
1082
+ }
1083
+ }
1084
+ }
1085
+ i {
1086
+ font-size: 12px;
1087
+ }
1088
+ }
1089
+
1090
+ .ad-loadmore {
1091
+ width: 100%;
1092
+ height: 40px;
1093
+ display: flex;
1094
+ align-items: center;
1095
+ justify-content: center;
1096
+ // background: #FFFFFF;
1097
+ color: #366aff;
1098
+ font-size: 14px;
1099
+ margin-top: 8px;
1100
+ cursor: pointer;
1101
+ }
1102
+ }
1103
+ }</style>