askbot-dragon 1.7.49-beta → 1.7.52-beta

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