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