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