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