askbot-dragon 1.7.14-beta → 1.7.16-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 +116 -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 +438 -470
  22. package/src/components/AnswerDocknowledge.vue +1070 -1070
  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 +107 -107
  30. package/src/components/actionSendToBot.vue +62 -62
  31. package/src/components/answerDissatisfaction.vue +62 -62
  32. package/src/components/answerRadio.vue +204 -203
  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 +378 -378
  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 +3576 -3576
  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 +928 -928
  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 +251 -251
  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 +50 -50
  70. package/src/components/source/BotMessage.vue +24 -24
  71. package/src/components/source/CustomMessage.vue +24 -24
  72. package/src/components/test.vue +260 -260
  73. package/src/components/tree.vue +294 -294
  74. package/src/components/utils/ckeditor.js +174 -174
  75. package/src/components/utils/format_date.js +25 -25
  76. package/src/components/utils/index.js +6 -6
  77. package/src/components/utils/math_utils.js +29 -29
  78. package/src/components/voiceComponent.vue +119 -119
  79. package/src/components/welcomeKnowledgeFile.vue +344 -344
  80. package/src/components/welcomeLlmCard.vue +144 -144
  81. package/src/components/welcomeSuggest.vue +97 -97
  82. package/src/locales/cn.json +71 -71
  83. package/src/locales/en.json +72 -72
  84. package/src/locales/jp.json +72 -72
  85. package/src/main.js +75 -75
  86. package/vue.config.js +54 -54
  87. package/src/components/utils/AliyunIssUtil.js +0 -81
@@ -1,1070 +1,1070 @@
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
- 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 if (fileType === '.png' || fileType === '.jpg' || fileType === '.jpeg') {
435
- return 'IMAGE'
436
- } else {
437
- return 'OTHER'
438
- }
439
- },
440
- srcContentTypeIMG (item) {
441
- let url = item.url || '';
442
- const type = url.substring(url.lastIndexOf('.'));
443
- if (type === '.jpg' || type === '.jpeg' || type === '.png' || type === '.gif') {
444
- this.getSrc(item)
445
- return true
446
- } else {
447
- return false
448
- }
449
- },
450
- getSrc (item) {
451
- // let imgurl = ''
452
- this.$http.post(
453
- '/knowledge-api/temporary-certificate/or-origin?expired=30',
454
- item.url,
455
- {
456
- headers: {
457
- "Content-Type": "application/json",
458
- },
459
- }).then(res => {
460
- console.log(res, '=====');
461
- // imgurl = await res.bodyText
462
- this.$set(item, 'expiredUrl', res.data ? res.data : res.bodyText)
463
- // return res.data
464
- })
465
- // return imgurl
466
- },
467
- lazyLoadKnowledegList () {
468
- if (this.allKnowledgeList.length !== 0) {
469
- let arr = this.allKnowledgeList.splice(0, 5)
470
- if (arr.length < 5) {
471
- this.loadMoreFlag = false
472
- this.msg.content.list = [...this.msg.content.list, ...arr]
473
- return
474
- }
475
- if (this.allKnowledgeList.length == 0) {
476
- this.loadMoreFlag = false
477
- }
478
- this.msg.content.list = [...this.msg.content.list, ...arr]
479
- return
480
- }
481
- },
482
- previewToDialog (flag) {
483
- if (!flag) {
484
- this.$refs.previewPdf.previewKnowledgeId = ""
485
- } else {
486
- this.$refs.previewPdf.previewKnowledgeId = this.previewKnowledgeId
487
- }
488
- this.$emit('previewToDialog', flag, this.previewKnowledgeId, this.previewKnowledge)
489
- },
490
- clearKnowledgeId () {
491
- this.previewKnowledgeId = "";
492
- },
493
- recommendQues (item, knowledgeId) {
494
- this.$emit('recommendQues', item, knowledgeId)
495
- },
496
- clickFloder(item) {
497
- this.$emit('clickFloder', item)
498
- },
499
- previewClickFloder() {
500
- let item = null
501
- this.msg.content.list.forEach(element => {
502
- if(element.knowledgeId == this.previewKnowledgeId) {
503
- item = element
504
- }
505
- });
506
- this.$emit('clickFloder', item)
507
- }
508
- }
509
- }
510
- </script>
511
-
512
- <style scoped lang="less">
513
- .answer-docknowledge {
514
- min-width: 100px;
515
- background: #ffffff;
516
-
517
- .answer-docknowledge-header {
518
- .tips {
519
- width: 154px;
520
- height: 22px;
521
- background: #366aff;
522
- border-radius: 5px;
523
- text-align: center;
524
- line-height: 22px;
525
- color: #fff;
526
- font-size: 12px;
527
- margin-bottom: 7px;
528
- }
529
-
530
- .answer-text {
531
- // font-size: 13px;
532
- text-align: left;
533
- line-height: 25px;
534
- padding: 0px 0px 12px 0px;
535
-
536
- .aci-view {
537
- // font-size: 13px;
538
- display: inline-block;
539
- // margin-left: 5px;
540
- color: #366aff;
541
- cursor: pointer;
542
- }
543
- }
544
-
545
- &.bgc {
546
- padding: 10px;
547
- background: #eef1ff;
548
- border-radius: 10px;
549
- margin-bottom: 16px;
550
-
551
- .answer-text {
552
- padding: 0;
553
- }
554
- }
555
-
556
- .answer-kn-image-box {
557
- margin-bottom: 10px;
558
- }
559
- }
560
-
561
-
562
- .ad-list-recognition {
563
- display: flex;
564
- align-items: center;
565
- flex-wrap: wrap;
566
- }
567
-
568
- .libang_list_recognition {
569
- display: flex;
570
- align-items: center;
571
- flex-wrap: wrap;
572
- }
573
-
574
- .ad-list {
575
- .ad-list-cell {
576
- border-top: solid 1px #eeeeee;
577
- padding: 10px 0 10px;
578
-
579
- .alc-title {
580
- display: flex;
581
- flex-wrap: wrap;
582
- align-items: center;
583
- justify-content: space-between;
584
- line-height: 16px;
585
-
586
- .alc-box {
587
- display: flex;
588
- align-items: center;
589
- justify-content: space-between;
590
- // font-size: 12px;
591
- width: 100%;
592
-
593
- .alc-source-left {
594
- display: flex;
595
- align-items: center;
596
-
597
- .source-form {
598
- width: 34px;
599
- flex: none;
600
- color: #a9b3c6;
601
- }
602
- }
603
-
604
- .alc-content-text {
605
- width: 55px;
606
- flex: none;
607
-
608
- .aci-view {
609
- color: #366aff;
610
- cursor: pointer;
611
- }
612
- }
613
-
614
- .alc-title-from {
615
- line-height: 22px;
616
- word-break: break-all !important;
617
- text-align: left;
618
- flex: auto;
619
- display: flex;
620
- justify-content: flex-start;
621
- }
622
- }
623
-
624
- .alc-box-introduction {
625
- overflow: hidden;
626
- text-overflow: ellipsis;
627
- display: -webkit-box;
628
- -webkit-line-clamp: 3;
629
- -webkit-box-orient: vertical;
630
- margin-top: 10px;
631
- color: #616161;
632
- // font-size: 12px;
633
- line-height: 24px;
634
- text-align: left;
635
-
636
- img {
637
- width: 50px;
638
- height: 50px;
639
- margin: 10px;
640
- cursor: pointer;
641
- }
642
- }
643
-
644
- .alc-box-introduction-previewImage {
645
- width: 100%;
646
- display: block;
647
- overflow: hidden;
648
- text-overflow: ellipsis;
649
- display: -webkit-box;
650
- -webkit-line-clamp:3;
651
- -webkit-box-orient:vertical;
652
- margin-top: 10px;
653
- color: #616161;
654
- // font-size: 12px;
655
- line-height: 24px;
656
- text-align: left;
657
- img {
658
- max-width: 300px;
659
- width: 100%;
660
- max-height: 150px;
661
- margin: 10px;
662
- cursor: pointer;
663
- }
664
- }
665
-
666
- .alc-updateTime {
667
- display: flex;
668
- align-items: center;
669
- justify-content: space-between;
670
- font-size: 13px;
671
- width: 100%;
672
- margin-top: 10px;
673
-
674
- .upload-source {
675
- flex: none;
676
- height: 18px;
677
- line-height: 18px;
678
- background: #e9f9f8;
679
- border: 1px solid #aff2cd;
680
- border-radius: 2px;
681
- display: flex;
682
- align-items: center;
683
- justify-content: center;
684
- padding: 0 8px;
685
- color: #00c2bb;
686
- }
687
-
688
- .time {
689
- color: #999999;
690
- margin-left: 10px;
691
- }
692
-
693
- .alc-content-text {
694
- color: #366aff;
695
- cursor: pointer;
696
- }
697
- }
698
-
699
- .alc-title-icon {
700
- margin: 0 2px;
701
- width: 18px;
702
- height: 18px;
703
- flex: none;
704
- }
705
-
706
- .alc-title-updateTime {
707
- text-align: right;
708
- color: #999999;
709
- // font-size: 13px;
710
- }
711
- }
712
-
713
- .alc-content {
714
- .alc-title-updateTime {
715
- margin-top: 6px;
716
- display: block;
717
- text-align: right;
718
- color: #999999;
719
- // font-size: 13px;
720
- }
721
-
722
- .alc-content-text {
723
- margin-bottom: 6px;
724
- width: 55px;
725
- flex: none;
726
-
727
- .aci-view {
728
- display: inline-block;
729
- margin-left: 30px;
730
- color: #366aff;
731
- cursor: pointer;
732
- }
733
- }
734
-
735
- .alc-content-info {
736
- display: flex;
737
- flex-wrap: wrap;
738
- justify-content: space-between;
739
-
740
- .alcc-box {
741
- display: flex;
742
- flex-wrap: wrap;
743
- color: #999999;
744
-
745
- .aci-owner {
746
- margin-right: 20px;
747
- }
748
-
749
- .aci-enterprise {
750
- margin-right: 20px;
751
- }
752
- }
753
- }
754
- }
755
- }
756
-
757
- .ad-list-cell-recognition {
758
- .alc-source-name {
759
- flex: none;
760
- padding: 3px;
761
- margin-right: 5px;
762
- margin-bottom: 5px;
763
- background: #f2f6ff;
764
- border-radius: 5px;
765
- display: flex;
766
- align-items: center;
767
- justify-content: space-between;
768
- cursor: pointer;
769
-
770
- img {
771
- vertical-align: middle;
772
- // width: 16px;
773
- // height: 16px;
774
- margin: 0 3px 0 5px;
775
- }
776
-
777
- .alc-title-from {
778
- // margin-right: 5px;
779
- max-width: 240px;
780
- overflow: hidden;
781
- text-overflow: ellipsis;
782
- white-space: nowrap;
783
- }
784
-
785
- .upload-source {
786
- margin-right: 5px;
787
- }
788
-
789
- i {
790
- font-size: 12px;
791
- }
792
- }
793
- }
794
-
795
- .ad-loadmore {
796
- width: 100%;
797
- height: 40px;
798
- display: flex;
799
- align-items: center;
800
- justify-content: center;
801
- // background: #FFFFFF;
802
- color: #366aff;
803
- font-size: 14px;
804
- margin-top: 8px;
805
- cursor: pointer;
806
- }
807
- }
808
-
809
- .libang_list {
810
- .libang_list_cell {
811
- border-top: solid 1px #eeeeee;
812
- padding: 10px 0 10px;
813
-
814
- .libang_title {
815
- display: flex;
816
- flex-wrap: wrap;
817
- align-items: center;
818
- justify-content: space-between;
819
- line-height: 16px;
820
-
821
- .libang_box {
822
- display: flex;
823
- align-items: center;
824
- justify-content: space-between;
825
- // font-size: 12px;
826
- width: 100%;
827
-
828
- .libang_source_left {
829
- display: flex;
830
- align-items: center;
831
-
832
- .source-form {
833
- width: 34px;
834
- flex: none;
835
- color: #a9b3c6;
836
- }
837
- }
838
-
839
- .alc-content-text {
840
- width: 55px;
841
- flex: none;
842
-
843
- .aci-view {
844
- color: #366aff;
845
- cursor: pointer;
846
- }
847
- }
848
-
849
- .libang_title_from {
850
- line-height: 22px;
851
- word-break: break-all !important;
852
- text-align: left;
853
- flex: auto;
854
- display: flex;
855
- justify-content: flex-start;
856
- }
857
- }
858
-
859
- .libang_box_introduction {
860
- overflow: hidden;
861
- text-overflow: ellipsis;
862
- display: -webkit-box;
863
- -webkit-line-clamp: 3;
864
- -webkit-box-orient: vertical;
865
- margin-top: 10px;
866
- color: #616161;
867
- // font-size: 12px;
868
- line-height: 24px;
869
- text-align: left;
870
-
871
- img {
872
- width: 50px;
873
- height: 50px;
874
- margin: 10px;
875
- cursor: pointer;
876
- }
877
- }
878
-
879
- .libang_box_introduction_previewImage {
880
- overflow: hidden;
881
- text-overflow: ellipsis;
882
- display: -webkit-box;
883
- -webkit-line-clamp: 3;
884
- -webkit-box-orient: vertical;
885
- margin-top: 10px;
886
- color: #616161;
887
- // font-size: 12px;
888
- line-height: 24px;
889
- text-align: left;
890
-
891
- img {
892
- max-width: 300px;
893
- width: 100%;
894
- max-height: 150px;
895
- margin: 10px;
896
- cursor: pointer;
897
- }
898
- }
899
-
900
- .libang_updateTime {
901
- display: flex;
902
- align-items: center;
903
- justify-content: space-between;
904
- font-size: 13px;
905
- width: 100%;
906
- margin-top: 10px;
907
- .libang_updataTime_left {
908
- width: calc(100% - 40px);
909
- display: flex;
910
- align-items: center;
911
- .upload-source {
912
- flex: none;
913
- height: 18px;
914
- line-height: 18px;
915
- background: #e9f9f8;
916
- border: 1px solid #aff2cd;
917
- border-radius: 2px;
918
- display: flex;
919
- align-items: center;
920
- justify-content: center;
921
- padding: 0 8px;
922
- color: #00c2bb;
923
- }
924
- .libang_floder {
925
- width:calc(100% - 90px);
926
- // margin-left: 10px;
927
- overflow: hidden;
928
- text-overflow: ellipsis;
929
- white-space: nowrap;
930
- color: #366aff;
931
- cursor: pointer;
932
- text-align: left;
933
- i {
934
- margin-left: 8px;
935
- }
936
- }
937
- }
938
- .libang_content_text {
939
- color: #366aff;
940
- cursor: pointer;
941
- }
942
- .time {
943
- color: #999999;
944
- margin-left: 10px;
945
- }
946
- }
947
- .alc-title-icon {
948
- margin: 0 2px;
949
- width: 18px;
950
- height: 18px;
951
- flex: none;
952
- }
953
-
954
- .alc-title-updateTime {
955
- text-align: right;
956
- color: #999999;
957
- // font-size: 13px;
958
- }
959
- }
960
-
961
- .alc-content {
962
- .alc-title-updateTime {
963
- margin-top: 6px;
964
- display: block;
965
- text-align: right;
966
- color: #999999;
967
- // font-size: 13px;
968
- }
969
-
970
- .alc-content-text {
971
- margin-bottom: 6px;
972
- width: 55px;
973
- flex: none;
974
-
975
- .aci-view {
976
- display: inline-block;
977
- margin-left: 30px;
978
- color: #366aff;
979
- cursor: pointer;
980
- }
981
- }
982
-
983
- .alc-content-info {
984
- display: flex;
985
- flex-wrap: wrap;
986
- justify-content: space-between;
987
-
988
- .alcc-box {
989
- display: flex;
990
- flex-wrap: wrap;
991
- color: #999999;
992
-
993
- .aci-owner {
994
- margin-right: 20px;
995
- }
996
-
997
- .aci-enterprise {
998
- margin-right: 20px;
999
- }
1000
- }
1001
- }
1002
- }
1003
- }
1004
-
1005
- .libang_list_cell_recognition {
1006
- background: #f2f6ff;
1007
- display: flex;
1008
- align-items: center;
1009
- justify-content: space-between;
1010
- padding: 3px;
1011
- margin-right: 5px;
1012
- margin-bottom: 5px;
1013
- border-radius: 5px;
1014
- cursor: pointer;
1015
- font-size: 14px;
1016
-
1017
- .libang_list_cell_left {
1018
- margin-right: 5px;
1019
- .libang_source_name {
1020
- display: flex;
1021
- align-items: center;
1022
- height: 20px;
1023
- margin-bottom: 2px;
1024
- img {
1025
- vertical-align: middle;
1026
- // width: 16px;
1027
- // height: 16px;
1028
- margin: 0 3px;
1029
- }
1030
-
1031
- .libang_title_from {
1032
- max-width: 226px;
1033
- overflow: hidden;
1034
- text-overflow: ellipsis;
1035
- white-space: nowrap;
1036
- line-height: 20px;
1037
- }
1038
- }
1039
- .libang_source_floder {
1040
- max-width: calc(226px - 24px);
1041
- text-align: left;
1042
- color: #366aff;
1043
- overflow: hidden;
1044
- text-overflow: ellipsis;
1045
- white-space: nowrap;
1046
- cursor: pointer;
1047
- .iconfont {
1048
- margin: 0 8px;
1049
- }
1050
- }
1051
- }
1052
- i {
1053
- font-size: 12px;
1054
- }
1055
- }
1056
-
1057
- .ad-loadmore {
1058
- width: 100%;
1059
- height: 40px;
1060
- display: flex;
1061
- align-items: center;
1062
- justify-content: center;
1063
- // background: #FFFFFF;
1064
- color: #366aff;
1065
- font-size: 14px;
1066
- margin-top: 8px;
1067
- cursor: pointer;
1068
- }
1069
- }
1070
- }</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
+ 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 if (fileType === '.png' || fileType === '.jpg' || fileType === '.jpeg') {
435
+ return 'IMAGE'
436
+ } else {
437
+ return 'OTHER'
438
+ }
439
+ },
440
+ srcContentTypeIMG (item) {
441
+ let url = item.url || '';
442
+ const type = url.substring(url.lastIndexOf('.'));
443
+ if (type === '.jpg' || type === '.jpeg' || type === '.png' || type === '.gif') {
444
+ this.getSrc(item)
445
+ return true
446
+ } else {
447
+ return false
448
+ }
449
+ },
450
+ getSrc (item) {
451
+ // let imgurl = ''
452
+ this.$http.post(
453
+ '/knowledge-api/temporary-certificate/or-origin?expired=30',
454
+ item.url,
455
+ {
456
+ headers: {
457
+ "Content-Type": "application/json",
458
+ },
459
+ }).then(res => {
460
+ console.log(res, '=====');
461
+ // imgurl = await res.bodyText
462
+ this.$set(item, 'expiredUrl', res.data ? res.data : res.bodyText)
463
+ // return res.data
464
+ })
465
+ // return imgurl
466
+ },
467
+ lazyLoadKnowledegList () {
468
+ if (this.allKnowledgeList.length !== 0) {
469
+ let arr = this.allKnowledgeList.splice(0, 5)
470
+ if (arr.length < 5) {
471
+ this.loadMoreFlag = false
472
+ this.msg.content.list = [...this.msg.content.list, ...arr]
473
+ return
474
+ }
475
+ if (this.allKnowledgeList.length == 0) {
476
+ this.loadMoreFlag = false
477
+ }
478
+ this.msg.content.list = [...this.msg.content.list, ...arr]
479
+ return
480
+ }
481
+ },
482
+ previewToDialog (flag) {
483
+ if (!flag) {
484
+ this.$refs.previewPdf.previewKnowledgeId = ""
485
+ } else {
486
+ this.$refs.previewPdf.previewKnowledgeId = this.previewKnowledgeId
487
+ }
488
+ this.$emit('previewToDialog', flag, this.previewKnowledgeId, this.previewKnowledge)
489
+ },
490
+ clearKnowledgeId () {
491
+ this.previewKnowledgeId = "";
492
+ },
493
+ recommendQues (item, knowledgeId) {
494
+ this.$emit('recommendQues', item, knowledgeId)
495
+ },
496
+ clickFloder(item) {
497
+ this.$emit('clickFloder', item)
498
+ },
499
+ previewClickFloder() {
500
+ let item = null
501
+ this.msg.content.list.forEach(element => {
502
+ if(element.knowledgeId == this.previewKnowledgeId) {
503
+ item = element
504
+ }
505
+ });
506
+ this.$emit('clickFloder', item)
507
+ }
508
+ }
509
+ }
510
+ </script>
511
+
512
+ <style scoped lang="less">
513
+ .answer-docknowledge {
514
+ min-width: 100px;
515
+ background: #ffffff;
516
+
517
+ .answer-docknowledge-header {
518
+ .tips {
519
+ width: 154px;
520
+ height: 22px;
521
+ background: #366aff;
522
+ border-radius: 5px;
523
+ text-align: center;
524
+ line-height: 22px;
525
+ color: #fff;
526
+ font-size: 12px;
527
+ margin-bottom: 7px;
528
+ }
529
+
530
+ .answer-text {
531
+ // font-size: 13px;
532
+ text-align: left;
533
+ line-height: 25px;
534
+ padding: 0px 0px 12px 0px;
535
+
536
+ .aci-view {
537
+ // font-size: 13px;
538
+ display: inline-block;
539
+ // margin-left: 5px;
540
+ color: #366aff;
541
+ cursor: pointer;
542
+ }
543
+ }
544
+
545
+ &.bgc {
546
+ padding: 10px;
547
+ background: #eef1ff;
548
+ border-radius: 10px;
549
+ margin-bottom: 16px;
550
+
551
+ .answer-text {
552
+ padding: 0;
553
+ }
554
+ }
555
+
556
+ .answer-kn-image-box {
557
+ margin-bottom: 10px;
558
+ }
559
+ }
560
+
561
+
562
+ .ad-list-recognition {
563
+ display: flex;
564
+ align-items: center;
565
+ flex-wrap: wrap;
566
+ }
567
+
568
+ .libang_list_recognition {
569
+ display: flex;
570
+ align-items: center;
571
+ flex-wrap: wrap;
572
+ }
573
+
574
+ .ad-list {
575
+ .ad-list-cell {
576
+ border-top: solid 1px #eeeeee;
577
+ padding: 10px 0 10px;
578
+
579
+ .alc-title {
580
+ display: flex;
581
+ flex-wrap: wrap;
582
+ align-items: center;
583
+ justify-content: space-between;
584
+ line-height: 16px;
585
+
586
+ .alc-box {
587
+ display: flex;
588
+ align-items: center;
589
+ justify-content: space-between;
590
+ // font-size: 12px;
591
+ width: 100%;
592
+
593
+ .alc-source-left {
594
+ display: flex;
595
+ align-items: center;
596
+
597
+ .source-form {
598
+ width: 34px;
599
+ flex: none;
600
+ color: #a9b3c6;
601
+ }
602
+ }
603
+
604
+ .alc-content-text {
605
+ width: 55px;
606
+ flex: none;
607
+
608
+ .aci-view {
609
+ color: #366aff;
610
+ cursor: pointer;
611
+ }
612
+ }
613
+
614
+ .alc-title-from {
615
+ line-height: 22px;
616
+ word-break: break-all !important;
617
+ text-align: left;
618
+ flex: auto;
619
+ display: flex;
620
+ justify-content: flex-start;
621
+ }
622
+ }
623
+
624
+ .alc-box-introduction {
625
+ overflow: hidden;
626
+ text-overflow: ellipsis;
627
+ display: -webkit-box;
628
+ -webkit-line-clamp: 3;
629
+ -webkit-box-orient: vertical;
630
+ margin-top: 10px;
631
+ color: #616161;
632
+ // font-size: 12px;
633
+ line-height: 24px;
634
+ text-align: left;
635
+
636
+ img {
637
+ width: 50px;
638
+ height: 50px;
639
+ margin: 10px;
640
+ cursor: pointer;
641
+ }
642
+ }
643
+
644
+ .alc-box-introduction-previewImage {
645
+ width: 100%;
646
+ display: block;
647
+ overflow: hidden;
648
+ text-overflow: ellipsis;
649
+ display: -webkit-box;
650
+ -webkit-line-clamp:3;
651
+ -webkit-box-orient:vertical;
652
+ margin-top: 10px;
653
+ color: #616161;
654
+ // font-size: 12px;
655
+ line-height: 24px;
656
+ text-align: left;
657
+ img {
658
+ max-width: 300px;
659
+ width: 100%;
660
+ max-height: 150px;
661
+ margin: 10px;
662
+ cursor: pointer;
663
+ }
664
+ }
665
+
666
+ .alc-updateTime {
667
+ display: flex;
668
+ align-items: center;
669
+ justify-content: space-between;
670
+ font-size: 13px;
671
+ width: 100%;
672
+ margin-top: 10px;
673
+
674
+ .upload-source {
675
+ flex: none;
676
+ height: 18px;
677
+ line-height: 18px;
678
+ background: #e9f9f8;
679
+ border: 1px solid #aff2cd;
680
+ border-radius: 2px;
681
+ display: flex;
682
+ align-items: center;
683
+ justify-content: center;
684
+ padding: 0 8px;
685
+ color: #00c2bb;
686
+ }
687
+
688
+ .time {
689
+ color: #999999;
690
+ margin-left: 10px;
691
+ }
692
+
693
+ .alc-content-text {
694
+ color: #366aff;
695
+ cursor: pointer;
696
+ }
697
+ }
698
+
699
+ .alc-title-icon {
700
+ margin: 0 2px;
701
+ width: 18px;
702
+ height: 18px;
703
+ flex: none;
704
+ }
705
+
706
+ .alc-title-updateTime {
707
+ text-align: right;
708
+ color: #999999;
709
+ // font-size: 13px;
710
+ }
711
+ }
712
+
713
+ .alc-content {
714
+ .alc-title-updateTime {
715
+ margin-top: 6px;
716
+ display: block;
717
+ text-align: right;
718
+ color: #999999;
719
+ // font-size: 13px;
720
+ }
721
+
722
+ .alc-content-text {
723
+ margin-bottom: 6px;
724
+ width: 55px;
725
+ flex: none;
726
+
727
+ .aci-view {
728
+ display: inline-block;
729
+ margin-left: 30px;
730
+ color: #366aff;
731
+ cursor: pointer;
732
+ }
733
+ }
734
+
735
+ .alc-content-info {
736
+ display: flex;
737
+ flex-wrap: wrap;
738
+ justify-content: space-between;
739
+
740
+ .alcc-box {
741
+ display: flex;
742
+ flex-wrap: wrap;
743
+ color: #999999;
744
+
745
+ .aci-owner {
746
+ margin-right: 20px;
747
+ }
748
+
749
+ .aci-enterprise {
750
+ margin-right: 20px;
751
+ }
752
+ }
753
+ }
754
+ }
755
+ }
756
+
757
+ .ad-list-cell-recognition {
758
+ .alc-source-name {
759
+ flex: none;
760
+ padding: 3px;
761
+ margin-right: 5px;
762
+ margin-bottom: 5px;
763
+ background: #f2f6ff;
764
+ border-radius: 5px;
765
+ display: flex;
766
+ align-items: center;
767
+ justify-content: space-between;
768
+ cursor: pointer;
769
+
770
+ img {
771
+ vertical-align: middle;
772
+ // width: 16px;
773
+ // height: 16px;
774
+ margin: 0 3px 0 5px;
775
+ }
776
+
777
+ .alc-title-from {
778
+ // margin-right: 5px;
779
+ max-width: 240px;
780
+ overflow: hidden;
781
+ text-overflow: ellipsis;
782
+ white-space: nowrap;
783
+ }
784
+
785
+ .upload-source {
786
+ margin-right: 5px;
787
+ }
788
+
789
+ i {
790
+ font-size: 12px;
791
+ }
792
+ }
793
+ }
794
+
795
+ .ad-loadmore {
796
+ width: 100%;
797
+ height: 40px;
798
+ display: flex;
799
+ align-items: center;
800
+ justify-content: center;
801
+ // background: #FFFFFF;
802
+ color: #366aff;
803
+ font-size: 14px;
804
+ margin-top: 8px;
805
+ cursor: pointer;
806
+ }
807
+ }
808
+
809
+ .libang_list {
810
+ .libang_list_cell {
811
+ border-top: solid 1px #eeeeee;
812
+ padding: 10px 0 10px;
813
+
814
+ .libang_title {
815
+ display: flex;
816
+ flex-wrap: wrap;
817
+ align-items: center;
818
+ justify-content: space-between;
819
+ line-height: 16px;
820
+
821
+ .libang_box {
822
+ display: flex;
823
+ align-items: center;
824
+ justify-content: space-between;
825
+ // font-size: 12px;
826
+ width: 100%;
827
+
828
+ .libang_source_left {
829
+ display: flex;
830
+ align-items: center;
831
+
832
+ .source-form {
833
+ width: 34px;
834
+ flex: none;
835
+ color: #a9b3c6;
836
+ }
837
+ }
838
+
839
+ .alc-content-text {
840
+ width: 55px;
841
+ flex: none;
842
+
843
+ .aci-view {
844
+ color: #366aff;
845
+ cursor: pointer;
846
+ }
847
+ }
848
+
849
+ .libang_title_from {
850
+ line-height: 22px;
851
+ word-break: break-all !important;
852
+ text-align: left;
853
+ flex: auto;
854
+ display: flex;
855
+ justify-content: flex-start;
856
+ }
857
+ }
858
+
859
+ .libang_box_introduction {
860
+ overflow: hidden;
861
+ text-overflow: ellipsis;
862
+ display: -webkit-box;
863
+ -webkit-line-clamp: 3;
864
+ -webkit-box-orient: vertical;
865
+ margin-top: 10px;
866
+ color: #616161;
867
+ // font-size: 12px;
868
+ line-height: 24px;
869
+ text-align: left;
870
+
871
+ img {
872
+ width: 50px;
873
+ height: 50px;
874
+ margin: 10px;
875
+ cursor: pointer;
876
+ }
877
+ }
878
+
879
+ .libang_box_introduction_previewImage {
880
+ overflow: hidden;
881
+ text-overflow: ellipsis;
882
+ display: -webkit-box;
883
+ -webkit-line-clamp: 3;
884
+ -webkit-box-orient: vertical;
885
+ margin-top: 10px;
886
+ color: #616161;
887
+ // font-size: 12px;
888
+ line-height: 24px;
889
+ text-align: left;
890
+
891
+ img {
892
+ max-width: 300px;
893
+ width: 100%;
894
+ max-height: 150px;
895
+ margin: 10px;
896
+ cursor: pointer;
897
+ }
898
+ }
899
+
900
+ .libang_updateTime {
901
+ display: flex;
902
+ align-items: center;
903
+ justify-content: space-between;
904
+ font-size: 13px;
905
+ width: 100%;
906
+ margin-top: 10px;
907
+ .libang_updataTime_left {
908
+ width: calc(100% - 40px);
909
+ display: flex;
910
+ align-items: center;
911
+ .upload-source {
912
+ flex: none;
913
+ height: 18px;
914
+ line-height: 18px;
915
+ background: #e9f9f8;
916
+ border: 1px solid #aff2cd;
917
+ border-radius: 2px;
918
+ display: flex;
919
+ align-items: center;
920
+ justify-content: center;
921
+ padding: 0 8px;
922
+ color: #00c2bb;
923
+ }
924
+ .libang_floder {
925
+ width:calc(100% - 90px);
926
+ // margin-left: 10px;
927
+ overflow: hidden;
928
+ text-overflow: ellipsis;
929
+ white-space: nowrap;
930
+ color: #366aff;
931
+ cursor: pointer;
932
+ text-align: left;
933
+ i {
934
+ margin-left: 8px;
935
+ }
936
+ }
937
+ }
938
+ .libang_content_text {
939
+ color: #366aff;
940
+ cursor: pointer;
941
+ }
942
+ .time {
943
+ color: #999999;
944
+ margin-left: 10px;
945
+ }
946
+ }
947
+ .alc-title-icon {
948
+ margin: 0 2px;
949
+ width: 18px;
950
+ height: 18px;
951
+ flex: none;
952
+ }
953
+
954
+ .alc-title-updateTime {
955
+ text-align: right;
956
+ color: #999999;
957
+ // font-size: 13px;
958
+ }
959
+ }
960
+
961
+ .alc-content {
962
+ .alc-title-updateTime {
963
+ margin-top: 6px;
964
+ display: block;
965
+ text-align: right;
966
+ color: #999999;
967
+ // font-size: 13px;
968
+ }
969
+
970
+ .alc-content-text {
971
+ margin-bottom: 6px;
972
+ width: 55px;
973
+ flex: none;
974
+
975
+ .aci-view {
976
+ display: inline-block;
977
+ margin-left: 30px;
978
+ color: #366aff;
979
+ cursor: pointer;
980
+ }
981
+ }
982
+
983
+ .alc-content-info {
984
+ display: flex;
985
+ flex-wrap: wrap;
986
+ justify-content: space-between;
987
+
988
+ .alcc-box {
989
+ display: flex;
990
+ flex-wrap: wrap;
991
+ color: #999999;
992
+
993
+ .aci-owner {
994
+ margin-right: 20px;
995
+ }
996
+
997
+ .aci-enterprise {
998
+ margin-right: 20px;
999
+ }
1000
+ }
1001
+ }
1002
+ }
1003
+ }
1004
+
1005
+ .libang_list_cell_recognition {
1006
+ background: #f2f6ff;
1007
+ display: flex;
1008
+ align-items: center;
1009
+ justify-content: space-between;
1010
+ padding: 3px;
1011
+ margin-right: 5px;
1012
+ margin-bottom: 5px;
1013
+ border-radius: 5px;
1014
+ cursor: pointer;
1015
+ font-size: 14px;
1016
+
1017
+ .libang_list_cell_left {
1018
+ margin-right: 5px;
1019
+ .libang_source_name {
1020
+ display: flex;
1021
+ align-items: center;
1022
+ height: 20px;
1023
+ margin-bottom: 2px;
1024
+ img {
1025
+ vertical-align: middle;
1026
+ // width: 16px;
1027
+ // height: 16px;
1028
+ margin: 0 3px;
1029
+ }
1030
+
1031
+ .libang_title_from {
1032
+ max-width: 226px;
1033
+ overflow: hidden;
1034
+ text-overflow: ellipsis;
1035
+ white-space: nowrap;
1036
+ line-height: 20px;
1037
+ }
1038
+ }
1039
+ .libang_source_floder {
1040
+ max-width: calc(226px - 24px);
1041
+ text-align: left;
1042
+ color: #366aff;
1043
+ overflow: hidden;
1044
+ text-overflow: ellipsis;
1045
+ white-space: nowrap;
1046
+ cursor: pointer;
1047
+ .iconfont {
1048
+ margin: 0 8px;
1049
+ }
1050
+ }
1051
+ }
1052
+ i {
1053
+ font-size: 12px;
1054
+ }
1055
+ }
1056
+
1057
+ .ad-loadmore {
1058
+ width: 100%;
1059
+ height: 40px;
1060
+ display: flex;
1061
+ align-items: center;
1062
+ justify-content: center;
1063
+ // background: #FFFFFF;
1064
+ color: #366aff;
1065
+ font-size: 14px;
1066
+ margin-top: 8px;
1067
+ cursor: pointer;
1068
+ }
1069
+ }
1070
+ }</style>