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