askbot-dragon 1.7.38-beta → 1.7.41-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 +55 -56
  5. package/public/index.html +75 -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 +117 -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 +89 -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 +192 -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 +154 -177
  21. package/src/components/AiGuide.vue +471 -438
  22. package/src/components/AnswerDocknowledge.vue +1087 -1081
  23. package/src/components/AnswerVoice.vue +285 -285
  24. package/src/components/AskIFrame.vue +15 -15
  25. package/src/components/ConversationContainer.vue +10875 -10764
  26. package/src/components/FileType.vue +86 -86
  27. package/src/components/Message.vue +27 -27
  28. package/src/components/MyEditor.vue +341 -342
  29. package/src/components/QwFeedback.vue +301 -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 +211 -204
  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 +139 -162
  38. package/src/components/assetDetails.vue +378 -378
  39. package/src/components/assetMessage.vue +228 -228
  40. package/src/components/associationIntention.vue +374 -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 +3497 -3501
  48. package/src/components/imgView.vue +31 -31
  49. package/src/components/intelligentSummary.vue +227 -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 +924 -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 +70 -70
  62. package/src/components/pdfPosition.vue +1334 -1514
  63. package/src/components/popup.vue +227 -227
  64. package/src/components/previewDoc.vue +247 -251
  65. package/src/components/previewPdf.vue +779 -866
  66. package/src/components/receiverMessagePlatform.vue +65 -65
  67. package/src/components/recommend.vue +80 -80
  68. package/src/components/selector/hOption.vue +20 -20
  69. package/src/components/selector/hSelector.vue +199 -199
  70. package/src/components/selector/hWrapper.vue +216 -216
  71. package/src/components/senderMessagePlatform.vue +50 -50
  72. package/src/components/source/BotMessage.vue +24 -24
  73. package/src/components/source/CustomMessage.vue +24 -24
  74. package/src/components/test.vue +260 -260
  75. package/src/components/tree.vue +307 -307
  76. package/src/components/utils/AliyunIssUtil.js +103 -103
  77. package/src/components/utils/ckeditor.js +185 -185
  78. package/src/components/utils/format_date.js +25 -25
  79. package/src/components/utils/index.js +6 -6
  80. package/src/components/utils/math_utils.js +29 -29
  81. package/src/components/voiceComponent.vue +119 -119
  82. package/src/components/welcomeKnowledgeFile.vue +340 -344
  83. package/src/components/welcomeLlmCard.vue +140 -144
  84. package/src/components/welcomeSuggest.vue +97 -97
  85. package/src/main.js +57 -75
  86. package/vue.config.js +54 -54
  87. package/src/components/newPdfPosition.vue +0 -878
  88. package/src/components/pagination.vue +0 -129
  89. package/src/components/preview/docView.vue +0 -107
  90. package/src/components/preview/excelView.vue +0 -160
  91. package/src/components/preview/newPositionPreview.vue +0 -322
  92. package/src/components/preview/pdfView.vue +0 -746
  93. package/src/locales/cn.json +0 -72
  94. package/src/locales/en.json +0 -73
  95. package/src/locales/jp.json +0 -73
@@ -1,1081 +1,1087 @@
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">
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">查看更多</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)">
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) {
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
- this.title = item.from || item.name
357
- this.folderName = item.folderName
358
- this.folderUrl = item.folderUrl
359
- this.previewKnowledge = item;
360
- this.previewKnowledgeId = item.knowledgeId
361
- this.$refs.previewPdf.previewShowPopup = false;
362
- this.$refs.previewPdf.drawer = false;
363
- this.previewOssPath = url;
364
- let index = url.lastIndexOf('?')
365
- let type = ''
366
- let httpUrl = '/knowledge-api/knowledge/getTemporaryCertificate'
367
- if (index !== -1) {
368
- url = url.substring(0, index)
369
- type = this.fileType(url)
370
- } else {
371
- type = this.fileType(url)
372
- }
373
- if (type === '' || type === 'OTHER' || type == 'IMAGE') {
374
- httpUrl = httpUrl += '?needEncrypt=true'
375
- } else {
376
- httpUrl = httpUrl += '?needEncrypt=false'
377
- }
378
- this.$refs.previewPdf.getOssPath(url);
379
- this.$http.post(httpUrl, {
380
- "fileInOssPath": url
381
- }).then(res => {
382
- if (res.data.code == '0') {
383
- this.previewHref = res.data.data;
384
- this.sourceFileType = url.substring(url.lastIndexOf('.'))
385
- let isOhmPc = sessionStorage.getItem('isOhmPc')
386
- if (isMobile() || isOhmPc == 'true') {
387
- this.$refs.previewPdf.drawer = true;
388
- this.$refs.previewPdf.previewShowPopup = true;
389
- } else {
390
- this.$refs.previewPdf.previewShowPopup = false;
391
- this.$refs.previewPdf.drawer = true;
392
- }
393
- //聊一聊按钮的选中状态
394
- if (this.activeKnowledgeId == item.knowledgeId) {
395
- this.$refs.previewPdf.previewKnowledgeId = this.activeKnowledgeId
396
- } else {
397
- this.$refs.previewPdf.previewKnowledgeId = ""
398
- }
399
- this.$refs.previewPdf.fileType = type
400
- this.$refs.previewPdf.tagIds = item.tagIds;
401
- this.$refs.previewPdf.getLocationInfo();
402
- this.$refs.previewPdf.isMessageRecord = this.isMessageRecord ? true : false;
403
- let index = url.indexOf("?");
404
- let newFileInOssPath = url;
405
- if (index !== -1) {
406
- newFileInOssPath = url.substring(0, url.indexOf("?"))
407
- }
408
- let fileName = newFileInOssPath.substring(newFileInOssPath.lastIndexOf('.'))
409
- if (fileName === '.doc' || fileName === '.docx' || fileName === '.txt' || fileName === '.html') {
410
- this.$refs.previewPdf.fileName = fileName;
411
- } else {
412
- this.$refs.previewPdf.fileName = '';
413
- }
414
- if (item.tagIds && item.tagIds.length != 0) {
415
- this.$refs.previewPdf.loading = false
416
- return
417
- }
418
- this.$nextTick(() => {
419
- if (item.source == 'CREATED_BY_ONESELF' || type === 'HTML') {
420
- this.$refs.previewPdf.getBolb(item)
421
- }
422
- this.$refs.previewPdf.loadIframe(item)
423
- this.$refs.previewPdf.showSummary = true;
424
- })
425
- }
426
- })
427
- }
428
- },
429
- open () {
430
- this.$emit('openPreviewDialog')
431
- },
432
- close () {
433
- this.$emit('closePreviewDialog')
434
- },
435
- fileType (url) {
436
- const fileType = url.substring(url.lastIndexOf('.'));
437
- if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.MOVC' || fileType === '.mov' || fileType === '.movc' || fileType === '.mav' || fileType === '.MAV' || fileType == '.mp3' || fileType == '.MP3' || fileType === '.wav') {
438
- return 'VIDEO'
439
- } else if (fileType === '.html') {
440
- return 'HTML'
441
- } else if (fileType === '.png' || fileType === '.jpg' || fileType === '.jpeg') {
442
- return 'IMAGE'
443
- } else {
444
- return 'OTHER'
445
- }
446
- },
447
- srcContentTypeIMG (item) {
448
- let url = item.url || '';
449
- const type = url.substring(url.lastIndexOf('.'));
450
- if (type === '.jpg' || type === '.jpeg' || type === '.png' || type === '.gif') {
451
- this.getSrc(item)
452
- return true
453
- } else {
454
- return false
455
- }
456
- },
457
- getSrc (item) {
458
- // let imgurl = ''
459
- this.$http.post(
460
- '/knowledge-api/temporary-certificate/or-origin?expired=30',
461
- item.url,
462
- {
463
- headers: {
464
- "Content-Type": "application/json",
465
- },
466
- }).then(res => {
467
- console.log(res, '=====');
468
- // imgurl = await res.bodyText
469
- this.$set(item, 'expiredUrl', res.data ? res.data : res.bodyText)
470
- // return res.data
471
- })
472
- // return imgurl
473
- },
474
- lazyLoadKnowledegList () {
475
- if (this.allKnowledgeList.length !== 0) {
476
- let arr = this.allKnowledgeList.splice(0, 5)
477
- if (arr.length < 5) {
478
- this.loadMoreFlag = false
479
- this.msg.content.list = [...this.msg.content.list, ...arr]
480
- return
481
- }
482
- if (this.allKnowledgeList.length == 0) {
483
- this.loadMoreFlag = false
484
- }
485
- this.msg.content.list = [...this.msg.content.list, ...arr]
486
- return
487
- }
488
- },
489
- previewToDialog (flag) {
490
- if (!flag) {
491
- this.$refs.previewPdf.previewKnowledgeId = ""
492
- } else {
493
- this.$refs.previewPdf.previewKnowledgeId = this.previewKnowledgeId
494
- }
495
- this.$emit('previewToDialog', flag, this.previewKnowledgeId, this.previewKnowledge)
496
- },
497
- clearKnowledgeId () {
498
- this.previewKnowledgeId = "";
499
- },
500
- recommendQues (item, knowledgeId) {
501
- this.$emit('recommendQues', item, knowledgeId)
502
- },
503
- clickFloder (item) {
504
- this.$emit('clickFloder', item)
505
- },
506
- previewClickFloder () {
507
- let item = null
508
- this.msg.content.list.forEach(element => {
509
- if (element.knowledgeId == this.previewKnowledgeId) {
510
- item = element
511
- }
512
- });
513
- this.$emit('clickFloder', item)
514
- }
515
- }
516
- }
517
- </script>
518
-
519
- <style scoped lang="less">
520
- .answer-docknowledge {
521
- min-width: 100px;
522
- background: #ffffff;
523
-
524
- .answer-docknowledge-header {
525
- .tips {
526
- width: 154px;
527
- height: 22px;
528
- background: #366aff;
529
- border-radius: 5px;
530
- text-align: center;
531
- line-height: 22px;
532
- color: #fff;
533
- font-size: 12px;
534
- margin-bottom: 7px;
535
- }
536
-
537
- .answer-text {
538
- // font-size: 13px;
539
- text-align: left;
540
- line-height: 25px;
541
- padding: 0px 0px 12px 0px;
542
-
543
- .aci-view {
544
- // font-size: 13px;
545
- display: inline-block;
546
- // margin-left: 5px;
547
- color: #366aff;
548
- cursor: pointer;
549
- }
550
- }
551
-
552
- &.bgc {
553
- padding: 10px;
554
- background: #eef1ff;
555
- border-radius: 10px;
556
- margin-bottom: 16px;
557
-
558
- .answer-text {
559
- padding: 0;
560
- }
561
- }
562
-
563
- .answer-kn-image-box {
564
- margin-bottom: 10px;
565
- }
566
- }
567
-
568
-
569
- .ad-list-recognition {
570
- display: flex;
571
- align-items: center;
572
- flex-wrap: wrap;
573
- }
574
-
575
- .libang_list_recognition {
576
- display: flex;
577
- align-items: center;
578
- flex-wrap: wrap;
579
- }
580
-
581
- .ad-list {
582
- .ad-list-cell {
583
- border-top: solid 1px #eeeeee;
584
- padding: 10px 0 10px;
585
-
586
- .alc-title {
587
- display: flex;
588
- flex-wrap: wrap;
589
- align-items: center;
590
- justify-content: space-between;
591
- line-height: 16px;
592
-
593
- .alc-box {
594
- display: flex;
595
- align-items: center;
596
- justify-content: space-between;
597
- // font-size: 12px;
598
- width: 100%;
599
-
600
- .alc-source-left {
601
- display: flex;
602
- align-items: center;
603
-
604
- .source-form {
605
- width: 34px;
606
- flex: none;
607
- color: #a9b3c6;
608
- }
609
- }
610
-
611
- .alc-content-text {
612
- width: 55px;
613
- flex: none;
614
-
615
- .aci-view {
616
- color: #366aff;
617
- cursor: pointer;
618
- }
619
- }
620
-
621
- .alc-title-from {
622
- line-height: 22px;
623
- word-break: break-all !important;
624
- text-align: left;
625
- flex: auto;
626
- display: flex;
627
- justify-content: flex-start;
628
- }
629
- }
630
-
631
- .alc-box-introduction {
632
- overflow: hidden;
633
- text-overflow: ellipsis;
634
- display: -webkit-box;
635
- -webkit-line-clamp: 3;
636
- -webkit-box-orient: vertical;
637
- margin-top: 10px;
638
- color: #616161;
639
- // font-size: 12px;
640
- line-height: 24px;
641
- text-align: left;
642
-
643
- img {
644
- width: 50px;
645
- height: 50px;
646
- margin: 10px;
647
- cursor: pointer;
648
- }
649
- }
650
-
651
- .alc-box-introduction-previewImage {
652
- width: 100%;
653
- display: block;
654
- overflow: hidden;
655
- text-overflow: ellipsis;
656
- display: -webkit-box;
657
- -webkit-line-clamp: 3;
658
- -webkit-box-orient: vertical;
659
- margin-top: 10px;
660
- color: #616161;
661
- // font-size: 12px;
662
- line-height: 24px;
663
- text-align: left;
664
-
665
- img {
666
- max-width: 300px;
667
- width: 100%;
668
- max-height: 150px;
669
- margin: 10px;
670
- cursor: pointer;
671
- }
672
- }
673
-
674
- .alc-updateTime {
675
- display: flex;
676
- align-items: center;
677
- justify-content: space-between;
678
- font-size: 13px;
679
- width: 100%;
680
- margin-top: 10px;
681
-
682
- .upload-source {
683
- flex: none;
684
- height: 18px;
685
- line-height: 18px;
686
- background: #e9f9f8;
687
- border: 1px solid #aff2cd;
688
- border-radius: 2px;
689
- display: flex;
690
- align-items: center;
691
- justify-content: center;
692
- padding: 0 8px;
693
- color: #00c2bb;
694
- }
695
-
696
- .time {
697
- color: #999999;
698
- margin-left: 10px;
699
- }
700
-
701
- .alc-content-text {
702
- color: #366aff;
703
- cursor: pointer;
704
- }
705
- }
706
-
707
- .alc-title-icon {
708
- margin: 0 2px;
709
- width: 18px;
710
- height: 18px;
711
- flex: none;
712
- }
713
-
714
- .alc-title-updateTime {
715
- text-align: right;
716
- color: #999999;
717
- // font-size: 13px;
718
- }
719
- }
720
-
721
- .alc-content {
722
- .alc-title-updateTime {
723
- margin-top: 6px;
724
- display: block;
725
- text-align: right;
726
- color: #999999;
727
- // font-size: 13px;
728
- }
729
-
730
- .alc-content-text {
731
- margin-bottom: 6px;
732
- width: 55px;
733
- flex: none;
734
-
735
- .aci-view {
736
- display: inline-block;
737
- margin-left: 30px;
738
- color: #366aff;
739
- cursor: pointer;
740
- }
741
- }
742
-
743
- .alc-content-info {
744
- display: flex;
745
- flex-wrap: wrap;
746
- justify-content: space-between;
747
-
748
- .alcc-box {
749
- display: flex;
750
- flex-wrap: wrap;
751
- color: #999999;
752
-
753
- .aci-owner {
754
- margin-right: 20px;
755
- }
756
-
757
- .aci-enterprise {
758
- margin-right: 20px;
759
- }
760
- }
761
- }
762
- }
763
- }
764
-
765
- .ad-list-cell-recognition {
766
- max-width: 270px;
767
- margin-right: 12px;
768
- font-size: 12px;
769
- .alc-source-name {
770
- flex: none;
771
- padding: 3px;
772
- margin-right: 5px;
773
- margin-bottom: 5px;
774
- background: #f2f6ff;
775
- border-radius: 5px;
776
- display: flex;
777
- align-items: center;
778
- justify-content: space-between;
779
- cursor: pointer;
780
-
781
- img {
782
- vertical-align: middle;
783
- // width: 16px;
784
- // height: 16px;
785
- margin: 0 3px 0 5px;
786
- }
787
-
788
- .alc-title-from {
789
- // margin-right: 5px;
790
- max-width: 240px;
791
- overflow: hidden;
792
- text-overflow: ellipsis;
793
- white-space: nowrap;
794
- }
795
-
796
- .upload-source {
797
- margin-right: 5px;
798
- }
799
-
800
- i {
801
- font-size: 12px;
802
- }
803
- }
804
- }
805
-
806
- .ad-loadmore {
807
- width: 100%;
808
- height: 40px;
809
- display: flex;
810
- align-items: center;
811
- justify-content: center;
812
- // background: #FFFFFF;
813
- color: #366aff;
814
- font-size: 14px;
815
- margin-top: 8px;
816
- cursor: pointer;
817
- }
818
- }
819
-
820
- .libang_list {
821
- .libang_list_cell {
822
- border-top: solid 1px #eeeeee;
823
- padding: 10px 0 10px;
824
-
825
- .libang_title {
826
- display: flex;
827
- flex-wrap: wrap;
828
- align-items: center;
829
- justify-content: space-between;
830
- line-height: 16px;
831
-
832
- .libang_box {
833
- display: flex;
834
- align-items: center;
835
- justify-content: space-between;
836
- // font-size: 12px;
837
- width: 100%;
838
-
839
- .libang_source_left {
840
- display: flex;
841
- align-items: center;
842
-
843
- .source-form {
844
- width: 34px;
845
- flex: none;
846
- color: #a9b3c6;
847
- }
848
- }
849
-
850
- .alc-content-text {
851
- width: 55px;
852
- flex: none;
853
-
854
- .aci-view {
855
- color: #366aff;
856
- cursor: pointer;
857
- }
858
- }
859
-
860
- .libang_title_from {
861
- line-height: 22px;
862
- word-break: break-all !important;
863
- text-align: left;
864
- flex: auto;
865
- display: flex;
866
- justify-content: flex-start;
867
- }
868
- }
869
-
870
- .libang_box_introduction {
871
- overflow: hidden;
872
- text-overflow: ellipsis;
873
- display: -webkit-box;
874
- -webkit-line-clamp: 3;
875
- -webkit-box-orient: vertical;
876
- margin-top: 10px;
877
- color: #616161;
878
- // font-size: 12px;
879
- line-height: 24px;
880
- text-align: left;
881
-
882
- img {
883
- width: 50px;
884
- height: 50px;
885
- margin: 10px;
886
- cursor: pointer;
887
- }
888
- }
889
-
890
- .libang_box_introduction_previewImage {
891
- overflow: hidden;
892
- text-overflow: ellipsis;
893
- display: -webkit-box;
894
- -webkit-line-clamp: 3;
895
- -webkit-box-orient: vertical;
896
- margin-top: 10px;
897
- color: #616161;
898
- // font-size: 12px;
899
- line-height: 24px;
900
- text-align: left;
901
-
902
- img {
903
- max-width: 300px;
904
- width: 100%;
905
- max-height: 150px;
906
- margin: 10px;
907
- cursor: pointer;
908
- }
909
- }
910
-
911
- .libang_updateTime {
912
- display: flex;
913
- align-items: center;
914
- justify-content: space-between;
915
- font-size: 13px;
916
- width: 100%;
917
- margin-top: 10px;
918
- .libang_updataTime_left {
919
- width: calc(100% - 40px);
920
- display: flex;
921
- align-items: center;
922
- .upload-source {
923
- flex: none;
924
- height: 18px;
925
- line-height: 18px;
926
- background: #e9f9f8;
927
- border: 1px solid #aff2cd;
928
- border-radius: 2px;
929
- display: flex;
930
- align-items: center;
931
- justify-content: center;
932
- padding: 0 8px;
933
- color: #00c2bb;
934
- }
935
- .libang_floder {
936
- width:calc(100% - 90px);
937
- // margin-left: 10px;
938
- overflow: hidden;
939
- text-overflow: ellipsis;
940
- white-space: nowrap;
941
- color: #366aff;
942
- cursor: pointer;
943
- text-align: left;
944
- i {
945
- margin-left: 8px;
946
- }
947
- }
948
- }
949
- .libang_content_text {
950
- color: #366aff;
951
- cursor: pointer;
952
- }
953
- .time {
954
- color: #999999;
955
- margin-left: 10px;
956
- }
957
- }
958
- .alc-title-icon {
959
- margin: 0 2px;
960
- width: 18px;
961
- height: 18px;
962
- flex: none;
963
- }
964
-
965
- .alc-title-updateTime {
966
- text-align: right;
967
- color: #999999;
968
- // font-size: 13px;
969
- }
970
- }
971
-
972
- .alc-content {
973
- .alc-title-updateTime {
974
- margin-top: 6px;
975
- display: block;
976
- text-align: right;
977
- color: #999999;
978
- // font-size: 13px;
979
- }
980
-
981
- .alc-content-text {
982
- margin-bottom: 6px;
983
- width: 55px;
984
- flex: none;
985
-
986
- .aci-view {
987
- display: inline-block;
988
- margin-left: 30px;
989
- color: #366aff;
990
- cursor: pointer;
991
- }
992
- }
993
-
994
- .alc-content-info {
995
- display: flex;
996
- flex-wrap: wrap;
997
- justify-content: space-between;
998
-
999
- .alcc-box {
1000
- display: flex;
1001
- flex-wrap: wrap;
1002
- color: #999999;
1003
-
1004
- .aci-owner {
1005
- margin-right: 20px;
1006
- }
1007
-
1008
- .aci-enterprise {
1009
- margin-right: 20px;
1010
- }
1011
- }
1012
- }
1013
- }
1014
- }
1015
-
1016
- .libang_list_cell_recognition {
1017
- background: #f2f6ff;
1018
- display: flex;
1019
- align-items: center;
1020
- justify-content: space-between;
1021
- padding: 3px;
1022
- margin-right: 5px;
1023
- margin-bottom: 5px;
1024
- border-radius: 5px;
1025
- cursor: pointer;
1026
- font-size: 14px;
1027
-
1028
- .libang_list_cell_left {
1029
- margin-right: 5px;
1030
- .libang_source_name {
1031
- display: flex;
1032
- align-items: center;
1033
- height: 20px;
1034
- margin-bottom: 2px;
1035
- img {
1036
- vertical-align: middle;
1037
- // width: 16px;
1038
- // height: 16px;
1039
- margin: 0 3px;
1040
- }
1041
-
1042
- .libang_title_from {
1043
- max-width: 226px;
1044
- overflow: hidden;
1045
- text-overflow: ellipsis;
1046
- white-space: nowrap;
1047
- line-height: 20px;
1048
- }
1049
- }
1050
- .libang_source_floder {
1051
- max-width: calc(226px - 24px);
1052
- text-align: left;
1053
- color: #366aff;
1054
- overflow: hidden;
1055
- text-overflow: ellipsis;
1056
- white-space: nowrap;
1057
- cursor: pointer;
1058
- .iconfont {
1059
- margin: 0 8px;
1060
- }
1061
- }
1062
- }
1063
- i {
1064
- font-size: 12px;
1065
- }
1066
- }
1067
-
1068
- .ad-loadmore {
1069
- width: 100%;
1070
- height: 40px;
1071
- display: flex;
1072
- align-items: center;
1073
- justify-content: center;
1074
- // background: #FFFFFF;
1075
- color: #366aff;
1076
- font-size: 14px;
1077
- margin-top: 8px;
1078
- cursor: pointer;
1079
- }
1080
- }
1081
- }</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-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">
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>
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)">
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>
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","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) {
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
+ this.title = item.from || item.name
357
+ this.folderName = item.folderName
358
+ this.folderUrl = item.folderUrl
359
+ this.previewKnowledge = item;
360
+ this.previewKnowledgeId = item.knowledgeId
361
+ this.$refs.previewPdf.previewShowPopup = false;
362
+ this.$refs.previewPdf.drawer = false;
363
+ this.previewOssPath = url;
364
+ let index = url.lastIndexOf('?')
365
+ let type = ''
366
+ let httpUrl = '/knowledge-api/knowledge/getTemporaryCertificate'
367
+ if (index !== -1) {
368
+ url = url.substring(0, index)
369
+ type = this.fileType(url)
370
+ } else {
371
+ type = this.fileType(url)
372
+ }
373
+ if (type === '' || type === 'OTHER' || type == 'IMAGE') {
374
+ httpUrl = httpUrl += '?needEncrypt=true'
375
+ } else {
376
+ httpUrl = httpUrl += '?needEncrypt=false'
377
+ }
378
+ this.$http.post(httpUrl, {
379
+ "fileInOssPath": url
380
+ }).then(res => {
381
+ if (res.data.code == '0') {
382
+ this.previewHref = res.data.data;
383
+ this.sourceFileType = url.substring(url.lastIndexOf('.'))
384
+ let isOhmPc = sessionStorage.getItem('isOhmPc')
385
+ if (isMobile() || isOhmPc == 'true') {
386
+ this.$refs.previewPdf.drawer = true;
387
+ this.$refs.previewPdf.previewShowPopup = true;
388
+ } else {
389
+ this.$refs.previewPdf.previewShowPopup = false;
390
+ this.$refs.previewPdf.drawer = true;
391
+ }
392
+ //聊一聊按钮的选中状态
393
+ if (this.activeKnowledgeId == item.knowledgeId) {
394
+ this.$refs.previewPdf.previewKnowledgeId = this.activeKnowledgeId
395
+ } else {
396
+ this.$refs.previewPdf.previewKnowledgeId = ""
397
+ }
398
+ this.$refs.previewPdf.fileType = type
399
+ this.$refs.previewPdf.tagIds = item.tagIds
400
+ this.$refs.previewPdf.isMessageRecord = this.isMessageRecord ? true : false;
401
+ let index = url.indexOf("?");
402
+ let newFileInOssPath = url;
403
+ if (index !== -1) {
404
+ newFileInOssPath = url.substring(0, url.indexOf("?"))
405
+ }
406
+ let fileName = newFileInOssPath.substring(newFileInOssPath.lastIndexOf('.'))
407
+ if (fileName === '.doc' || fileName === '.docx' || fileName === '.txt' || fileName === '.html') {
408
+ this.$refs.previewPdf.fileName = fileName;
409
+ } else {
410
+ this.$refs.previewPdf.fileName = '';
411
+ }
412
+ if (item.tagIds && item.tagIds.length != 0) {
413
+ this.$refs.previewPdf.loading = false
414
+ return
415
+ }
416
+ this.$nextTick(() => {
417
+ if (item.source == 'CREATED_BY_ONESELF' || type === 'HTML') {
418
+ this.$refs.previewPdf.getBolb(item)
419
+ }
420
+ this.$refs.previewPdf.loadIframe(item)
421
+ this.$refs.previewPdf.showSummary = true;
422
+ })
423
+ }
424
+ })
425
+ }
426
+ },
427
+ open () {
428
+ this.$emit('openPreviewDialog')
429
+ },
430
+ close () {
431
+ this.$emit('closePreviewDialog')
432
+ },
433
+ fileType (url) {
434
+ const fileType = url.substring(url.lastIndexOf('.'));
435
+ if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.MOVC' || fileType === '.mov' || fileType === '.movc' || fileType === '.mav' || fileType === '.MAV' || fileType == '.mp3' || fileType == '.MP3' || fileType === '.wav') {
436
+ return 'VIDEO'
437
+ } else if (fileType === '.html') {
438
+ return 'HTML'
439
+ } else if (fileType === '.png' || fileType === '.jpg' || fileType === '.jpeg') {
440
+ return 'IMAGE'
441
+ } else {
442
+ return 'OTHER'
443
+ }
444
+ },
445
+ srcContentTypeIMG (item) {
446
+ let url = item.url || '';
447
+ const type = url.substring(url.lastIndexOf('.'));
448
+ if (type === '.jpg' || type === '.jpeg' || type === '.png' || type === '.gif') {
449
+ this.getSrc(item)
450
+ return true
451
+ } else {
452
+ return false
453
+ }
454
+ },
455
+ getSrc (item) {
456
+ // let imgurl = ''
457
+ this.$http.post(
458
+ '/knowledge-api/temporary-certificate/or-origin?expired=30',
459
+ item.url,
460
+ {
461
+ headers: {
462
+ "Content-Type": "application/json",
463
+ },
464
+ }).then(res => {
465
+ console.log(res, '=====');
466
+ // imgurl = await res.bodyText
467
+ this.$set(item, 'expiredUrl', res.data ? res.data : res.bodyText)
468
+ // return res.data
469
+ })
470
+ // return imgurl
471
+ },
472
+ lazyLoadKnowledegList () {
473
+ if (this.allKnowledgeList.length !== 0) {
474
+ let arr = this.allKnowledgeList.splice(0, 5)
475
+ if (arr.length < 5) {
476
+ this.loadMoreFlag = false
477
+ this.msg.content.list = [...this.msg.content.list, ...arr]
478
+ return
479
+ }
480
+ if (this.allKnowledgeList.length == 0) {
481
+ this.loadMoreFlag = false
482
+ }
483
+ this.msg.content.list = [...this.msg.content.list, ...arr]
484
+ return
485
+ }
486
+ },
487
+ previewToDialog (flag) {
488
+ if (!flag) {
489
+ this.$refs.previewPdf.previewKnowledgeId = ""
490
+ } else {
491
+ this.$refs.previewPdf.previewKnowledgeId = this.previewKnowledgeId
492
+ }
493
+ this.$emit('previewToDialog', flag, this.previewKnowledgeId, this.previewKnowledge)
494
+ },
495
+ clearKnowledgeId () {
496
+ this.previewKnowledgeId = "";
497
+ },
498
+ recommendQues (item, knowledgeId) {
499
+ this.$emit('recommendQues', item, knowledgeId)
500
+ },
501
+ clickFloder (item) {
502
+ this.$emit('clickFloder', item)
503
+ },
504
+ previewClickFloder () {
505
+ let item = null
506
+ this.msg.content.list.forEach(element => {
507
+ if (element.knowledgeId == this.previewKnowledgeId) {
508
+ item = element
509
+ }
510
+ });
511
+ this.$emit('clickFloder', item)
512
+ }
513
+ }
514
+ }
515
+ </script>
516
+
517
+ <style scoped lang="less">
518
+ .answer-docknowledge {
519
+ min-width: 100px;
520
+ background: #ffffff;
521
+
522
+ .answer-docknowledge-header {
523
+ .tips {
524
+ width: 154px;
525
+ height: 22px;
526
+ background: #366aff;
527
+ border-radius: 5px;
528
+ text-align: center;
529
+ line-height: 22px;
530
+ color: #fff;
531
+ font-size: 12px;
532
+ margin-bottom: 7px;
533
+ }
534
+
535
+ .answer-text {
536
+ // font-size: 13px;
537
+ text-align: left;
538
+ line-height: 25px;
539
+ padding: 0px 0px 12px 0px;
540
+
541
+ .aci-view {
542
+ // font-size: 13px;
543
+ display: inline-block;
544
+ // margin-left: 5px;
545
+ color: #366aff;
546
+ cursor: pointer;
547
+ }
548
+ }
549
+
550
+ &.bgc {
551
+ padding: 10px;
552
+ background: #eef1ff;
553
+ border-radius: 10px;
554
+ margin-bottom: 16px;
555
+
556
+ .answer-text {
557
+ padding: 0;
558
+ }
559
+ }
560
+
561
+ .answer-kn-image-box {
562
+ margin-bottom: 10px;
563
+ }
564
+ }
565
+
566
+
567
+ .ad-list-recognition {
568
+ display: flex;
569
+ align-items: center;
570
+ flex-wrap: wrap;
571
+ }
572
+
573
+ .libang_list_recognition {
574
+ display: flex;
575
+ align-items: center;
576
+ flex-wrap: wrap;
577
+ }
578
+
579
+ .ad-list {
580
+ .ad-list-cell {
581
+ border-top: solid 1px #eeeeee;
582
+ padding: 10px 0 10px;
583
+
584
+ .alc-title {
585
+ display: flex;
586
+ flex-wrap: wrap;
587
+ align-items: center;
588
+ justify-content: space-between;
589
+ line-height: 16px;
590
+
591
+ .alc-box {
592
+ display: flex;
593
+ align-items: center;
594
+ justify-content: space-between;
595
+ // font-size: 12px;
596
+ width: 100%;
597
+
598
+ .alc-source-left {
599
+ display: flex;
600
+ align-items: center;
601
+
602
+ .source-form {
603
+ width: 34px;
604
+ flex: none;
605
+ color: #a9b3c6;
606
+ }
607
+ }
608
+
609
+ .alc-content-text {
610
+ width: 55px;
611
+ flex: none;
612
+
613
+ .aci-view {
614
+ color: #366aff;
615
+ cursor: pointer;
616
+ }
617
+ }
618
+
619
+ .alc-title-from {
620
+ line-height: 22px;
621
+ word-break: break-all !important;
622
+ text-align: left;
623
+ flex: auto;
624
+ display: flex;
625
+ justify-content: flex-start;
626
+ }
627
+ .upload-source {
628
+ // flex: none;
629
+ }
630
+ }
631
+
632
+ .alc-box-introduction {
633
+ overflow: hidden;
634
+ text-overflow: ellipsis;
635
+ display: -webkit-box;
636
+ -webkit-line-clamp: 3;
637
+ -webkit-box-orient: vertical;
638
+ margin-top: 10px;
639
+ color: #616161;
640
+ // font-size: 12px;
641
+ line-height: 24px;
642
+ text-align: left;
643
+
644
+ img {
645
+ width: 50px;
646
+ height: 50px;
647
+ margin: 10px;
648
+ cursor: pointer;
649
+ }
650
+ }
651
+
652
+ .alc-box-introduction-previewImage {
653
+ width: 100%;
654
+ display: block;
655
+ overflow: hidden;
656
+ text-overflow: ellipsis;
657
+ display: -webkit-box;
658
+ -webkit-line-clamp: 3;
659
+ -webkit-box-orient: vertical;
660
+ margin-top: 10px;
661
+ color: #616161;
662
+ // font-size: 12px;
663
+ line-height: 24px;
664
+ text-align: left;
665
+
666
+ img {
667
+ max-width: 300px;
668
+ width: 100%;
669
+ max-height: 150px;
670
+ margin: 10px;
671
+ cursor: pointer;
672
+ }
673
+ }
674
+
675
+ .alc-updateTime {
676
+ display: flex;
677
+ align-items: center;
678
+ justify-content: space-between;
679
+ font-size: 13px;
680
+ width: 100%;
681
+ margin-top: 10px;
682
+
683
+ .upload-source {
684
+ flex: none;
685
+ height: 18px;
686
+ line-height: 18px;
687
+ background: #e9f9f8;
688
+ border: 1px solid #aff2cd;
689
+ border-radius: 2px;
690
+ display: flex;
691
+ align-items: center;
692
+ justify-content: center;
693
+ padding: 0 8px;
694
+ color: #00c2bb;
695
+ }
696
+
697
+ .time {
698
+ color: #999999;
699
+ margin-left: 10px;
700
+ }
701
+
702
+ .alc-content-text {
703
+ color: #366aff;
704
+ cursor: pointer;
705
+ }
706
+ }
707
+
708
+ .alc-title-icon {
709
+ margin: 0 2px;
710
+ width: 18px;
711
+ height: 18px;
712
+ flex: none;
713
+ }
714
+
715
+ .alc-title-updateTime {
716
+ text-align: right;
717
+ color: #999999;
718
+ // font-size: 13px;
719
+ }
720
+ }
721
+
722
+ .alc-content {
723
+ .alc-title-updateTime {
724
+ margin-top: 6px;
725
+ display: block;
726
+ text-align: right;
727
+ color: #999999;
728
+ // font-size: 13px;
729
+ }
730
+
731
+ .alc-content-text {
732
+ margin-bottom: 6px;
733
+ width: 55px;
734
+ flex: none;
735
+
736
+ .aci-view {
737
+ display: inline-block;
738
+ margin-left: 30px;
739
+ color: #366aff;
740
+ cursor: pointer;
741
+ }
742
+ }
743
+
744
+ .alc-content-info {
745
+ display: flex;
746
+ flex-wrap: wrap;
747
+ justify-content: space-between;
748
+
749
+ .alcc-box {
750
+ display: flex;
751
+ flex-wrap: wrap;
752
+ color: #999999;
753
+
754
+ .aci-owner {
755
+ margin-right: 20px;
756
+ }
757
+
758
+ .aci-enterprise {
759
+ margin-right: 20px;
760
+ }
761
+ }
762
+ }
763
+ }
764
+ }
765
+
766
+ .ad-list-cell-recognition {
767
+ max-width: 270px;
768
+ margin-right: 12px;
769
+ font-size: 12px;
770
+ .alc-source-name {
771
+ flex: none;
772
+ padding: 3px;
773
+ margin-right: 5px;
774
+ margin-bottom: 5px;
775
+ background: #f2f6ff;
776
+ border-radius: 5px;
777
+ display: flex;
778
+ align-items: center;
779
+ justify-content: space-between;
780
+ cursor: pointer;
781
+
782
+ img {
783
+ vertical-align: middle;
784
+ // width: 16px;
785
+ // height: 16px;
786
+ margin: 0 3px 0 5px;
787
+ }
788
+
789
+ .alc-title-from {
790
+ // margin-right: 5px;
791
+ max-width: 240px;
792
+ overflow: hidden;
793
+ text-overflow: ellipsis;
794
+ white-space: nowrap;
795
+ }
796
+
797
+ .upload-source {
798
+ margin-right: 5px;
799
+ flex: none;
800
+ }
801
+
802
+ i {
803
+ font-size: 12px;
804
+ }
805
+ }
806
+ }
807
+
808
+ .ad-loadmore {
809
+ width: 100%;
810
+ height: 40px;
811
+ display: flex;
812
+ align-items: center;
813
+ justify-content: center;
814
+ // background: #FFFFFF;
815
+ color: #366aff;
816
+ font-size: 14px;
817
+ margin-top: 8px;
818
+ cursor: pointer;
819
+ }
820
+ }
821
+
822
+ .libang_list {
823
+ .libang_list_cell {
824
+ border-top: solid 1px #eeeeee;
825
+ padding: 10px 0 10px;
826
+ font-size: 12px;
827
+ .libang_title {
828
+ display: flex;
829
+ flex-wrap: wrap;
830
+ align-items: center;
831
+ justify-content: space-between;
832
+ line-height: 16px;
833
+
834
+ .libang_box {
835
+ display: flex;
836
+ align-items: center;
837
+ justify-content: space-between;
838
+ // font-size: 12px;
839
+ width: 100%;
840
+
841
+ .libang_source_left {
842
+ display: flex;
843
+ align-items: center;
844
+
845
+ .source-form {
846
+ width: 34px;
847
+ flex: none;
848
+ color: #a9b3c6;
849
+ }
850
+ }
851
+
852
+ .alc-content-text {
853
+ width: 55px;
854
+ flex: none;
855
+
856
+ .aci-view {
857
+ color: #366aff;
858
+ cursor: pointer;
859
+ }
860
+ }
861
+
862
+ .libang_title_from {
863
+ line-height: 22px;
864
+ word-break: break-all !important;
865
+ text-align: left;
866
+ flex: auto;
867
+ display: flex;
868
+ justify-content: flex-start;
869
+ }
870
+ }
871
+
872
+ .libang_box_introduction {
873
+ overflow: hidden;
874
+ text-overflow: ellipsis;
875
+ display: -webkit-box;
876
+ -webkit-line-clamp: 3;
877
+ -webkit-box-orient: vertical;
878
+ margin-top: 10px;
879
+ color: #616161;
880
+ // font-size: 12px;
881
+ line-height: 24px;
882
+ text-align: left;
883
+
884
+ img {
885
+ width: 50px;
886
+ height: 50px;
887
+ margin: 10px;
888
+ cursor: pointer;
889
+ }
890
+ }
891
+
892
+ .libang_box_introduction_previewImage {
893
+ overflow: hidden;
894
+ text-overflow: ellipsis;
895
+ display: -webkit-box;
896
+ -webkit-line-clamp: 3;
897
+ -webkit-box-orient: vertical;
898
+ margin-top: 10px;
899
+ color: #616161;
900
+ // font-size: 12px;
901
+ line-height: 24px;
902
+ text-align: left;
903
+
904
+ img {
905
+ max-width: 300px;
906
+ width: 100%;
907
+ max-height: 150px;
908
+ margin: 10px;
909
+ cursor: pointer;
910
+ }
911
+ }
912
+
913
+ .libang_updateTime {
914
+ display: flex;
915
+ align-items: center;
916
+ justify-content: space-between;
917
+ font-size: 13px;
918
+ width: 100%;
919
+ margin-top: 10px;
920
+ .libang_updataTime_left {
921
+ width: calc(100% - 40px);
922
+ display: flex;
923
+ align-items: center;
924
+ .upload-source {
925
+ flex: none;
926
+ height: 18px;
927
+ line-height: 18px;
928
+ background: #e9f9f8;
929
+ border: 1px solid #aff2cd;
930
+ border-radius: 2px;
931
+ display: flex;
932
+ align-items: center;
933
+ justify-content: center;
934
+ padding: 0 8px;
935
+ color: #00c2bb;
936
+ }
937
+ .libang_floder {
938
+ width:calc(100% - 90px);
939
+ // margin-left: 10px;
940
+ overflow: hidden;
941
+ text-overflow: ellipsis;
942
+ white-space: nowrap;
943
+ color: #366aff;
944
+ cursor: pointer;
945
+ text-align: left;
946
+ i {
947
+ margin-left: 8px;
948
+ }
949
+ }
950
+ }
951
+ .libang_content_text {
952
+ color: #366aff;
953
+ cursor: pointer;
954
+ }
955
+ .time {
956
+ color: #999999;
957
+ margin-left: 10px;
958
+ }
959
+ }
960
+ .alc-title-icon {
961
+ margin: 0 2px;
962
+ width: 18px;
963
+ height: 18px;
964
+ flex: none;
965
+ }
966
+
967
+ .alc-title-updateTime {
968
+ text-align: right;
969
+ color: #999999;
970
+ // font-size: 13px;
971
+ }
972
+ }
973
+
974
+ .alc-content {
975
+ .alc-title-updateTime {
976
+ margin-top: 6px;
977
+ display: block;
978
+ text-align: right;
979
+ color: #999999;
980
+ // font-size: 13px;
981
+ }
982
+
983
+ .alc-content-text {
984
+ margin-bottom: 6px;
985
+ width: 55px;
986
+ flex: none;
987
+
988
+ .aci-view {
989
+ display: inline-block;
990
+ margin-left: 30px;
991
+ color: #366aff;
992
+ cursor: pointer;
993
+ }
994
+ }
995
+
996
+ .alc-content-info {
997
+ display: flex;
998
+ flex-wrap: wrap;
999
+ justify-content: space-between;
1000
+
1001
+ .alcc-box {
1002
+ display: flex;
1003
+ flex-wrap: wrap;
1004
+ color: #999999;
1005
+
1006
+ .aci-owner {
1007
+ margin-right: 20px;
1008
+ }
1009
+
1010
+ .aci-enterprise {
1011
+ margin-right: 20px;
1012
+ }
1013
+ }
1014
+ }
1015
+ }
1016
+ }
1017
+
1018
+ .libang_list_cell_recognition {
1019
+ background: #f2f6ff;
1020
+ display: flex;
1021
+ align-items: center;
1022
+ justify-content: space-between;
1023
+ padding: 3px;
1024
+ margin-right: 5px;
1025
+ margin-bottom: 5px;
1026
+ border-radius: 5px;
1027
+ cursor: pointer;
1028
+ font-size: 12px;
1029
+
1030
+ .libang_list_cell_left {
1031
+ margin-right: 5px;
1032
+ .libang_source_name {
1033
+ display: flex;
1034
+ align-items: center;
1035
+ height: 20px;
1036
+ margin-bottom: 2px;
1037
+ img {
1038
+ vertical-align: middle;
1039
+ // width: 16px;
1040
+ // height: 16px;
1041
+ margin: 0 3px;
1042
+ }
1043
+
1044
+ .libang_title_from {
1045
+ max-width: 226px;
1046
+ overflow: hidden;
1047
+ text-overflow: ellipsis;
1048
+ white-space: nowrap;
1049
+ line-height: 20px;
1050
+ }
1051
+ .upload_source {
1052
+ flex: none;
1053
+ }
1054
+ }
1055
+ .libang_source_floder {
1056
+ max-width: calc(226px - 24px);
1057
+ text-align: left;
1058
+ color: #366aff;
1059
+ overflow: hidden;
1060
+ text-overflow: ellipsis;
1061
+ white-space: nowrap;
1062
+ cursor: pointer;
1063
+ .iconfont {
1064
+ margin: 0 5px;
1065
+ font-size: 14px
1066
+ }
1067
+ }
1068
+ }
1069
+ i {
1070
+ font-size: 12px;
1071
+ }
1072
+ }
1073
+
1074
+ .ad-loadmore {
1075
+ width: 100%;
1076
+ height: 40px;
1077
+ display: flex;
1078
+ align-items: center;
1079
+ justify-content: center;
1080
+ // background: #FFFFFF;
1081
+ color: #366aff;
1082
+ font-size: 14px;
1083
+ margin-top: 8px;
1084
+ cursor: pointer;
1085
+ }
1086
+ }
1087
+ }</style>