askbot-dragon 1.7.58-beta → 1.7.62-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 +57 -57
  5. package/public/index.html +73 -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 +141 -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 +100 -100
  14. package/src/assets/js/script.js +36 -36
  15. package/src/assets/less/common.css +6773 -6773
  16. package/src/assets/less/converSationContainer/common.less +199 -199
  17. package/src/assets/less/converSationContainer/converSatonContainer.less +493 -493
  18. package/src/assets/less/iconfont.css +37 -37
  19. package/src/assets/less/ticketMessage.less +294 -294
  20. package/src/components/ActionAlertIframe.vue +178 -178
  21. package/src/components/AiGuide.vue +434 -434
  22. package/src/components/AnswerDocknowledge.vue +1137 -1098
  23. package/src/components/AnswerVoice.vue +285 -285
  24. package/src/components/AskIFrame.vue +15 -15
  25. package/src/components/ConversationContainer.vue +10764 -10764
  26. package/src/components/FileType.vue +86 -86
  27. package/src/components/Message.vue +27 -27
  28. package/src/components/MyEditor.vue +342 -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 +259 -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 -162
  38. package/src/components/assetDetails.vue +378 -378
  39. package/src/components/assetMessage.vue +229 -229
  40. package/src/components/associationIntention.vue +378 -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 +3502 -3502
  48. package/src/components/imgView.vue +31 -31
  49. package/src/components/intelligentSummary.vue +234 -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 +928 -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/newPdfPosition.vue +877 -877
  63. package/src/components/pagination.vue +128 -128
  64. package/src/components/pdfPosition.vue +1523 -1523
  65. package/src/components/popup.vue +228 -228
  66. package/src/components/preview/docView.vue +113 -113
  67. package/src/components/preview/excelView.vue +190 -186
  68. package/src/components/preview/newPositionPreview.vue +369 -369
  69. package/src/components/preview/pdfView.vue +824 -824
  70. package/src/components/previewDoc.vue +252 -252
  71. package/src/components/previewPdf.vue +1087 -1085
  72. package/src/components/receiverMessagePlatform.vue +69 -69
  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 +58 -58
  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 +347 -347
  89. package/src/components/welcomeLlmCard.vue +144 -144
  90. package/src/components/welcomeSuggest.vue +97 -97
  91. package/src/locales/cn.json +61 -61
  92. package/src/locales/en.json +61 -61
  93. package/src/locales/jp.json +72 -72
  94. package/src/main.js +76 -76
  95. package/vue.config.js +54 -54
@@ -1,1098 +1,1137 @@
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
- if (item.tagIds && item.tagIds.length != 0 && this.$refs.previewPdf.newFileType !== 'PPT') {
424
- this.$refs.previewPdf.loading = false
425
- return
426
- }
427
- this.$nextTick(() => {
428
- if (item.source == 'CREATED_BY_ONESELF' || type === 'HTML') {
429
- this.$refs.previewPdf.getBolb(item)
430
- }
431
- this.$refs.previewPdf.loadIframe(item)
432
- this.$refs.previewPdf.showSummary = false;
433
- })
434
- }
435
- })
436
- }
437
- },
438
- open () {
439
- this.$emit('openPreviewDialog')
440
- },
441
- close () {
442
- this.$emit('closePreviewDialog')
443
- },
444
- fileType (url) {
445
- const fileType = url.substring(url.lastIndexOf('.'));
446
- if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.MOVC' || fileType === '.mov' || fileType === '.movc' || fileType === '.mav' || fileType === '.MAV' || fileType == '.mp3' || fileType == '.MP3' || fileType === '.wav') {
447
- return 'VIDEO'
448
- } else if (fileType === '.html') {
449
- return 'HTML'
450
- } else if (fileType === '.png' || fileType === '.jpg' || fileType === '.jpeg') {
451
- return 'IMAGE'
452
- } else {
453
- return 'OTHER'
454
- }
455
- },
456
- srcContentTypeIMG (item) {
457
- let url = item.url || '';
458
- const type = url.substring(url.lastIndexOf('.'));
459
- if (type === '.jpg' || type === '.jpeg' || type === '.png' || type === '.gif') {
460
- this.getSrc(item)
461
- return true
462
- } else {
463
- return false
464
- }
465
- },
466
- getSrc (item) {
467
- // let imgurl = ''
468
- this.$http.post(
469
- '/knowledge-api/temporary-certificate/or-origin?expired=30',
470
- item.url,
471
- {
472
- headers: {
473
- "Content-Type": "application/json",
474
- },
475
- }).then(res => {
476
- console.log(res, '=====');
477
- // imgurl = await res.bodyText
478
- this.$set(item, 'expiredUrl', res.data ? res.data : res.bodyText)
479
- // return res.data
480
- })
481
- // return imgurl
482
- },
483
- lazyLoadKnowledegList () {
484
- if (this.allKnowledgeList.length !== 0) {
485
- let arr = this.allKnowledgeList.splice(0, 5)
486
- if (arr.length < 5) {
487
- this.loadMoreFlag = false
488
- this.msg.content.list = [...this.msg.content.list, ...arr]
489
- return
490
- }
491
- if (this.allKnowledgeList.length == 0) {
492
- this.loadMoreFlag = false
493
- }
494
- this.msg.content.list = [...this.msg.content.list, ...arr]
495
- return
496
- }
497
- },
498
- previewToDialog (flag) {
499
- if (!flag) {
500
- this.$refs.previewPdf.previewKnowledgeId = ""
501
- } else {
502
- this.$refs.previewPdf.previewKnowledgeId = this.previewKnowledgeId
503
- }
504
- this.$emit('previewToDialog', flag, this.previewKnowledgeId, this.previewKnowledge)
505
- },
506
- clearKnowledgeId () {
507
- this.previewKnowledgeId = "";
508
- },
509
- recommendQues (item, knowledgeId) {
510
- this.$emit('recommendQues', item, knowledgeId)
511
- },
512
- clickFloder (item) {
513
- this.$emit('clickFloder', item)
514
- },
515
- previewClickFloder () {
516
- let item = null
517
- this.msg.content.list.forEach(element => {
518
- if (element.knowledgeId == this.previewKnowledgeId) {
519
- item = element
520
- }
521
- });
522
- this.$emit('clickFloder', item)
523
- }
524
- }
525
- }
526
- </script>
527
-
528
- <style scoped lang="less">
529
- .answer-docknowledge {
530
- min-width: 100px;
531
- background: #ffffff;
532
-
533
- .answer-docknowledge-header {
534
- .tips {
535
- width: 154px;
536
- height: 22px;
537
- background: #366aff;
538
- border-radius: 5px;
539
- text-align: center;
540
- line-height: 22px;
541
- color: #fff;
542
- font-size: 12px;
543
- margin-bottom: 7px;
544
- }
545
-
546
- .answer-text {
547
- // font-size: 13px;
548
- text-align: left;
549
- line-height: 25px;
550
- padding: 0px 0px 12px 0px;
551
-
552
- .aci-view {
553
- // font-size: 13px;
554
- display: inline-block;
555
- // margin-left: 5px;
556
- color: #366aff;
557
- cursor: pointer;
558
- }
559
- }
560
-
561
- &.bgc {
562
- padding: 10px;
563
- background: #eef1ff;
564
- border-radius: 10px;
565
- margin-bottom: 16px;
566
-
567
- .answer-text {
568
- padding: 0;
569
- }
570
- }
571
-
572
- .answer-kn-image-box {
573
- margin-bottom: 10px;
574
- }
575
- }
576
-
577
-
578
- .ad-list-recognition {
579
- display: flex;
580
- align-items: center;
581
- flex-wrap: wrap;
582
- }
583
-
584
- .libang_list_recognition {
585
- display: flex;
586
- align-items: center;
587
- flex-wrap: wrap;
588
- }
589
-
590
- .ad-list {
591
- .ad-list-cell {
592
- border-top: solid 1px #eeeeee;
593
- padding: 10px 0 10px;
594
-
595
- .alc-title {
596
- display: flex;
597
- flex-wrap: wrap;
598
- align-items: center;
599
- justify-content: space-between;
600
- line-height: 16px;
601
-
602
- .alc-box {
603
- display: flex;
604
- align-items: center;
605
- justify-content: space-between;
606
- // font-size: 12px;
607
- width: 100%;
608
-
609
- .alc-source-left {
610
- display: flex;
611
- align-items: center;
612
-
613
- .source-form {
614
- width: 34px;
615
- flex: none;
616
- color: #a9b3c6;
617
- }
618
- }
619
-
620
- .alc-content-text {
621
- width: 55px;
622
- flex: none;
623
-
624
- .aci-view {
625
- color: #366aff;
626
- cursor: pointer;
627
- }
628
- }
629
-
630
- .alc-title-from {
631
- line-height: 22px;
632
- word-break: break-all !important;
633
- text-align: left;
634
- flex: auto;
635
- display: flex;
636
- justify-content: flex-start;
637
- }
638
- .upload-source {
639
- // flex: none;
640
- }
641
- }
642
-
643
- .alc-box-introduction {
644
- overflow: hidden;
645
- text-overflow: ellipsis;
646
- display: -webkit-box;
647
- -webkit-line-clamp: 3;
648
- -webkit-box-orient: vertical;
649
- margin-top: 10px;
650
- color: #616161;
651
- // font-size: 12px;
652
- line-height: 24px;
653
- text-align: left;
654
-
655
- img {
656
- width: 50px;
657
- height: 50px;
658
- margin: 10px;
659
- cursor: pointer;
660
- }
661
- }
662
-
663
- .alc-box-introduction-previewImage {
664
- width: 100%;
665
- display: block;
666
- overflow: hidden;
667
- text-overflow: ellipsis;
668
- display: -webkit-box;
669
- -webkit-line-clamp: 3;
670
- -webkit-box-orient: vertical;
671
- margin-top: 10px;
672
- color: #616161;
673
- // font-size: 12px;
674
- line-height: 24px;
675
- text-align: left;
676
-
677
- img {
678
- max-width: 300px;
679
- width: 100%;
680
- max-height: 150px;
681
- margin: 10px;
682
- cursor: pointer;
683
- }
684
- }
685
-
686
- .alc-updateTime {
687
- display: flex;
688
- align-items: center;
689
- justify-content: space-between;
690
- font-size: 13px;
691
- width: 100%;
692
- margin-top: 10px;
693
-
694
- .upload-source {
695
- flex: none;
696
- height: 18px;
697
- line-height: 18px;
698
- background: #e9f9f8;
699
- border: 1px solid #aff2cd;
700
- border-radius: 2px;
701
- display: flex;
702
- align-items: center;
703
- justify-content: center;
704
- padding: 0 8px;
705
- color: #00c2bb;
706
- }
707
-
708
- .time {
709
- color: #999999;
710
- margin-left: 10px;
711
- }
712
-
713
- .alc-content-text {
714
- color: #366aff;
715
- cursor: pointer;
716
- }
717
- }
718
-
719
- .alc-title-icon {
720
- margin: 0 2px;
721
- width: 18px;
722
- height: 18px;
723
- flex: none;
724
- }
725
-
726
- .alc-title-updateTime {
727
- text-align: right;
728
- color: #999999;
729
- // font-size: 13px;
730
- }
731
- }
732
-
733
- .alc-content {
734
- .alc-title-updateTime {
735
- margin-top: 6px;
736
- display: block;
737
- text-align: right;
738
- color: #999999;
739
- // font-size: 13px;
740
- }
741
-
742
- .alc-content-text {
743
- margin-bottom: 6px;
744
- width: 55px;
745
- flex: none;
746
-
747
- .aci-view {
748
- display: inline-block;
749
- margin-left: 30px;
750
- color: #366aff;
751
- cursor: pointer;
752
- }
753
- }
754
-
755
- .alc-content-info {
756
- display: flex;
757
- flex-wrap: wrap;
758
- justify-content: space-between;
759
-
760
- .alcc-box {
761
- display: flex;
762
- flex-wrap: wrap;
763
- color: #999999;
764
-
765
- .aci-owner {
766
- margin-right: 20px;
767
- }
768
-
769
- .aci-enterprise {
770
- margin-right: 20px;
771
- }
772
- }
773
- }
774
- }
775
- }
776
-
777
- .ad-list-cell-recognition {
778
- max-width: 270px;
779
- margin-right: 12px;
780
- font-size: 12px;
781
- .alc-source-name {
782
- flex: none;
783
- padding: 3px;
784
- margin-right: 5px;
785
- margin-bottom: 5px;
786
- background: #f2f6ff;
787
- border-radius: 5px;
788
- display: flex;
789
- align-items: center;
790
- justify-content: space-between;
791
- cursor: pointer;
792
-
793
- img {
794
- vertical-align: middle;
795
- // width: 16px;
796
- // height: 16px;
797
- margin: 0 3px 0 5px;
798
- }
799
-
800
- .alc-title-from {
801
- // margin-right: 5px;
802
- max-width: 240px;
803
- overflow: hidden;
804
- text-overflow: ellipsis;
805
- white-space: nowrap;
806
- }
807
-
808
- .upload-source {
809
- margin-right: 5px;
810
- flex: none;
811
- }
812
-
813
- i {
814
- font-size: 12px;
815
- }
816
- }
817
- }
818
-
819
- .ad-loadmore {
820
- width: 100%;
821
- height: 40px;
822
- display: flex;
823
- align-items: center;
824
- justify-content: center;
825
- // background: #FFFFFF;
826
- color: #366aff;
827
- font-size: 14px;
828
- margin-top: 8px;
829
- cursor: pointer;
830
- }
831
- }
832
-
833
- .libang_list {
834
- .libang_list_cell {
835
- border-top: solid 1px #eeeeee;
836
- padding: 10px 0 10px;
837
- font-size: 12px;
838
- .libang_title {
839
- display: flex;
840
- flex-wrap: wrap;
841
- align-items: center;
842
- justify-content: space-between;
843
- line-height: 16px;
844
-
845
- .libang_box {
846
- display: flex;
847
- align-items: center;
848
- justify-content: space-between;
849
- // font-size: 12px;
850
- width: 100%;
851
-
852
- .libang_source_left {
853
- display: flex;
854
- align-items: center;
855
-
856
- .source-form {
857
- width: 34px;
858
- flex: none;
859
- color: #a9b3c6;
860
- }
861
- }
862
-
863
- .alc-content-text {
864
- width: 55px;
865
- flex: none;
866
-
867
- .aci-view {
868
- color: #366aff;
869
- cursor: pointer;
870
- }
871
- }
872
-
873
- .libang_title_from {
874
- line-height: 22px;
875
- word-break: break-all !important;
876
- text-align: left;
877
- flex: auto;
878
- display: flex;
879
- justify-content: flex-start;
880
- }
881
- }
882
-
883
- .libang_box_introduction {
884
- overflow: hidden;
885
- text-overflow: ellipsis;
886
- display: -webkit-box;
887
- -webkit-line-clamp: 3;
888
- -webkit-box-orient: vertical;
889
- margin-top: 10px;
890
- color: #616161;
891
- // font-size: 12px;
892
- line-height: 24px;
893
- text-align: left;
894
-
895
- img {
896
- width: 50px;
897
- height: 50px;
898
- margin: 10px;
899
- cursor: pointer;
900
- }
901
- }
902
-
903
- .libang_box_introduction_previewImage {
904
- overflow: hidden;
905
- text-overflow: ellipsis;
906
- display: -webkit-box;
907
- -webkit-line-clamp: 3;
908
- -webkit-box-orient: vertical;
909
- margin-top: 10px;
910
- color: #616161;
911
- // font-size: 12px;
912
- line-height: 24px;
913
- text-align: left;
914
-
915
- img {
916
- max-width: 300px;
917
- width: 100%;
918
- max-height: 150px;
919
- margin: 10px;
920
- cursor: pointer;
921
- }
922
- }
923
-
924
- .libang_updateTime {
925
- display: flex;
926
- align-items: center;
927
- justify-content: space-between;
928
- font-size: 13px;
929
- width: 100%;
930
- margin-top: 10px;
931
- .libang_updataTime_left {
932
- width: calc(100% - 40px);
933
- display: flex;
934
- align-items: center;
935
- .upload-source {
936
- flex: none;
937
- height: 18px;
938
- line-height: 18px;
939
- background: #e9f9f8;
940
- border: 1px solid #aff2cd;
941
- border-radius: 2px;
942
- display: flex;
943
- align-items: center;
944
- justify-content: center;
945
- padding: 0 8px;
946
- color: #00c2bb;
947
- }
948
- .libang_floder {
949
- width:calc(100% - 90px);
950
- // margin-left: 10px;
951
- overflow: hidden;
952
- text-overflow: ellipsis;
953
- white-space: nowrap;
954
- color: #366aff;
955
- cursor: pointer;
956
- text-align: left;
957
- i {
958
- margin-left: 8px;
959
- }
960
- }
961
- }
962
- .libang_content_text {
963
- color: #366aff;
964
- cursor: pointer;
965
- }
966
- .time {
967
- color: #999999;
968
- margin-left: 10px;
969
- }
970
- }
971
- .alc-title-icon {
972
- margin: 0 2px;
973
- width: 18px;
974
- height: 18px;
975
- flex: none;
976
- }
977
-
978
- .alc-title-updateTime {
979
- text-align: right;
980
- color: #999999;
981
- // font-size: 13px;
982
- }
983
- }
984
-
985
- .alc-content {
986
- .alc-title-updateTime {
987
- margin-top: 6px;
988
- display: block;
989
- text-align: right;
990
- color: #999999;
991
- // font-size: 13px;
992
- }
993
-
994
- .alc-content-text {
995
- margin-bottom: 6px;
996
- width: 55px;
997
- flex: none;
998
-
999
- .aci-view {
1000
- display: inline-block;
1001
- margin-left: 30px;
1002
- color: #366aff;
1003
- cursor: pointer;
1004
- }
1005
- }
1006
-
1007
- .alc-content-info {
1008
- display: flex;
1009
- flex-wrap: wrap;
1010
- justify-content: space-between;
1011
-
1012
- .alcc-box {
1013
- display: flex;
1014
- flex-wrap: wrap;
1015
- color: #999999;
1016
-
1017
- .aci-owner {
1018
- margin-right: 20px;
1019
- }
1020
-
1021
- .aci-enterprise {
1022
- margin-right: 20px;
1023
- }
1024
- }
1025
- }
1026
- }
1027
- }
1028
-
1029
- .libang_list_cell_recognition {
1030
- background: #f2f6ff;
1031
- display: flex;
1032
- align-items: center;
1033
- justify-content: space-between;
1034
- padding: 3px;
1035
- margin-right: 5px;
1036
- margin-bottom: 5px;
1037
- border-radius: 5px;
1038
- cursor: pointer;
1039
- font-size: 12px;
1040
-
1041
- .libang_list_cell_left {
1042
- margin-right: 5px;
1043
- .libang_source_name {
1044
- display: flex;
1045
- align-items: center;
1046
- height: 20px;
1047
- margin-bottom: 2px;
1048
- img {
1049
- vertical-align: middle;
1050
- // width: 16px;
1051
- // height: 16px;
1052
- margin: 0 3px;
1053
- }
1054
-
1055
- .libang_title_from {
1056
- max-width: 226px;
1057
- overflow: hidden;
1058
- text-overflow: ellipsis;
1059
- white-space: nowrap;
1060
- line-height: 20px;
1061
- }
1062
- .upload_source {
1063
- flex: none;
1064
- }
1065
- }
1066
- .libang_source_floder {
1067
- max-width: calc(226px - 24px);
1068
- text-align: left;
1069
- color: #366aff;
1070
- overflow: hidden;
1071
- text-overflow: ellipsis;
1072
- white-space: nowrap;
1073
- cursor: pointer;
1074
- .iconfont {
1075
- margin: 0 5px;
1076
- font-size: 14px
1077
- }
1078
- }
1079
- }
1080
- i {
1081
- font-size: 12px;
1082
- }
1083
- }
1084
-
1085
- .ad-loadmore {
1086
- width: 100%;
1087
- height: 40px;
1088
- display: flex;
1089
- align-items: center;
1090
- justify-content: center;
1091
- // background: #FFFFFF;
1092
- color: #366aff;
1093
- font-size: 14px;
1094
- margin-top: 8px;
1095
- cursor: pointer;
1096
- }
1097
- }
1098
- }</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 || msg.content.type == 2 ? '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" :id="item.knowledgeId + knowledgeIndex">
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>&nbsp;-&nbsp;
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)" :id="item.knowledgeId + knowledgeIndex">
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>&nbsp;-&nbsp;
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","language","isHistory","knowledgeIndex"],
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
+ //该事件是为了打开新的弹框时关闭上一个弹框
398
+ window.parent.postMessage({
399
+ type: "close_drawer",
400
+ data:this.knowledgeIndex
401
+ }, "*");
402
+ this.title = item.from || item.name
403
+ this.folderName = item.folderName
404
+ this.folderUrl = item.folderUrl
405
+ this.previewKnowledge = item;
406
+ this.previewKnowledgeId = item.knowledgeId
407
+ this.$refs.previewPdf.previewShowPopup = false;
408
+ this.$refs.previewPdf.drawer = false;
409
+ this.previewOssPath = url;
410
+ let index = url.lastIndexOf('?')
411
+ let type = ''
412
+ let httpUrl = '/knowledge-api/knowledge/getTemporaryCertificate'
413
+ if (index !== -1) {
414
+ url = url.substring(0, index)
415
+ type = this.fileType(url)
416
+ } else {
417
+ type = this.fileType(url)
418
+ }
419
+ if (type === '' || type === 'OTHER' || type == 'IMAGE') {
420
+ httpUrl = httpUrl += '?needEncrypt=true'
421
+ } else {
422
+ httpUrl = httpUrl += '?needEncrypt=false'
423
+ }
424
+ this.$refs.previewPdf.getOssPath(url);
425
+ this.$http.post(httpUrl, {
426
+ "fileInOssPath": url
427
+ }).then(res => {
428
+ if (res.data.code == '0') {
429
+ this.previewHref = res.data.data;
430
+ this.sourceFileType = url.substring(url.lastIndexOf('.'))
431
+ let isOhmPc = sessionStorage.getItem('isOhmPc')
432
+ if (isMobile() || isOhmPc == 'true') {
433
+ this.$refs.previewPdf.drawer = true;
434
+ this.$refs.previewPdf.previewShowPopup = true;
435
+ } else {
436
+ this.$refs.previewPdf.previewShowPopup = false;
437
+ this.$refs.previewPdf.drawer = true;
438
+ }
439
+ //聊一聊按钮的选中状态
440
+ if (this.activeKnowledgeId == item.knowledgeId) {
441
+ this.$refs.previewPdf.previewKnowledgeId = this.activeKnowledgeId
442
+ } else {
443
+ this.$refs.previewPdf.previewKnowledgeId = ""
444
+ }
445
+ this.$refs.previewPdf.fileType = type
446
+ this.$refs.previewPdf.tagIds = item.tagIds;
447
+ if (item.tagIds && item.tagIds.length > 0){
448
+ this.$refs.previewPdf.getLocationInfo();
449
+ }
450
+ this.$refs.previewPdf.isMessageRecord = this.isMessageRecord ? true : false;
451
+ let index = url.indexOf("?");
452
+ let newFileInOssPath = url;
453
+ if (index !== -1) {
454
+ newFileInOssPath = url.substring(0, url.indexOf("?"))
455
+ }
456
+ let fileName = newFileInOssPath.substring(newFileInOssPath.lastIndexOf('.'))
457
+ if (fileName === '.doc' || fileName === '.docx' || fileName === '.txt' || fileName === '.html') {
458
+ this.$refs.previewPdf.fileName = fileName;
459
+ } else {
460
+ this.$refs.previewPdf.fileName = '';
461
+ }
462
+ if (item.tagIds && item.tagIds.length != 0 && this.$refs.previewPdf.newFileType !== 'PPT') {
463
+ this.$refs.previewPdf.loading = false
464
+ return
465
+ }
466
+ this.$nextTick(() => {
467
+ if (item.source == 'CREATED_BY_ONESELF' || type === 'HTML') {
468
+ this.$refs.previewPdf.getBolb(item)
469
+ }
470
+ this.$refs.previewPdf.loadIframe(item)
471
+ this.$refs.previewPdf.showSummary = false;
472
+ })
473
+ }
474
+ })
475
+ }
476
+ },
477
+ open () {
478
+ this.$emit('openPreviewDialog')
479
+ },
480
+ close () {
481
+ this.$emit('closePreviewDialog')
482
+ },
483
+ fileType (url) {
484
+ const fileType = url.substring(url.lastIndexOf('.'));
485
+ if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.MOVC' || fileType === '.mov' || fileType === '.movc' || fileType === '.mav' || fileType === '.MAV' || fileType == '.mp3' || fileType == '.MP3' || fileType === '.wav') {
486
+ return 'VIDEO'
487
+ } else if (fileType === '.html') {
488
+ return 'HTML'
489
+ } else if (fileType === '.png' || fileType === '.jpg' || fileType === '.jpeg') {
490
+ return 'IMAGE'
491
+ } else {
492
+ return 'OTHER'
493
+ }
494
+ },
495
+ srcContentTypeIMG (item) {
496
+ let url = item.url || '';
497
+ const type = url.substring(url.lastIndexOf('.'));
498
+ if (type === '.jpg' || type === '.jpeg' || type === '.png' || type === '.gif') {
499
+ this.getSrc(item)
500
+ return true
501
+ } else {
502
+ return false
503
+ }
504
+ },
505
+ getSrc (item) {
506
+ // let imgurl = ''
507
+ this.$http.post(
508
+ '/knowledge-api/temporary-certificate/or-origin?expired=30',
509
+ item.url,
510
+ {
511
+ headers: {
512
+ "Content-Type": "application/json",
513
+ },
514
+ }).then(res => {
515
+ console.log(res, '=====');
516
+ // imgurl = await res.bodyText
517
+ this.$set(item, 'expiredUrl', res.data ? res.data : res.bodyText)
518
+ // return res.data
519
+ })
520
+ // return imgurl
521
+ },
522
+ lazyLoadKnowledegList () {
523
+ if (this.allKnowledgeList.length !== 0) {
524
+ let arr = this.allKnowledgeList.splice(0, 5)
525
+ if (arr.length < 5) {
526
+ this.loadMoreFlag = false
527
+ this.msg.content.list = [...this.msg.content.list, ...arr]
528
+ return
529
+ }
530
+ if (this.allKnowledgeList.length == 0) {
531
+ this.loadMoreFlag = false
532
+ }
533
+ this.msg.content.list = [...this.msg.content.list, ...arr]
534
+ return
535
+ }
536
+ },
537
+ previewToDialog (flag) {
538
+ if (!flag) {
539
+ this.$refs.previewPdf.previewKnowledgeId = ""
540
+ } else {
541
+ this.$refs.previewPdf.previewKnowledgeId = this.previewKnowledgeId
542
+ }
543
+ this.$emit('previewToDialog', flag, this.previewKnowledgeId, this.previewKnowledge)
544
+ },
545
+ clearKnowledgeId () {
546
+ this.previewKnowledgeId = "";
547
+ },
548
+ recommendQues (item, knowledgeId) {
549
+ this.$emit('recommendQues', item, knowledgeId)
550
+ },
551
+ clickFloder (item) {
552
+ this.$emit('clickFloder', item)
553
+ },
554
+ previewClickFloder () {
555
+ let item = null
556
+ this.msg.content.list.forEach(element => {
557
+ if (element.knowledgeId == this.previewKnowledgeId) {
558
+ item = element
559
+ }
560
+ });
561
+ this.$emit('clickFloder', item)
562
+ }
563
+ }
564
+ }
565
+ </script>
566
+
567
+ <style scoped lang="less">
568
+ .answer-docknowledge {
569
+ min-width: 100px;
570
+ background: #ffffff;
571
+
572
+ .answer-docknowledge-header {
573
+ .tips {
574
+ width: 154px;
575
+ height: 22px;
576
+ background: #366aff;
577
+ border-radius: 5px;
578
+ text-align: center;
579
+ line-height: 22px;
580
+ color: #fff;
581
+ font-size: 12px;
582
+ margin-bottom: 7px;
583
+ }
584
+
585
+ .answer-text {
586
+ // font-size: 13px;
587
+ text-align: left;
588
+ line-height: 25px;
589
+ padding: 0px 0px 12px 0px;
590
+
591
+ .aci-view {
592
+ // font-size: 13px;
593
+ display: inline-block;
594
+ // margin-left: 5px;
595
+ color: #366aff;
596
+ cursor: pointer;
597
+ }
598
+ }
599
+
600
+ &.bgc {
601
+ padding: 10px;
602
+ background: #eef1ff;
603
+ border-radius: 10px;
604
+ margin-bottom: 16px;
605
+
606
+ .answer-text {
607
+ padding: 0;
608
+ }
609
+ }
610
+
611
+ .answer-kn-image-box {
612
+ margin-bottom: 10px;
613
+ }
614
+ }
615
+
616
+
617
+ .ad-list-recognition {
618
+ display: flex;
619
+ align-items: center;
620
+ flex-wrap: wrap;
621
+ }
622
+
623
+ .libang_list_recognition {
624
+ display: flex;
625
+ align-items: center;
626
+ flex-wrap: wrap;
627
+ }
628
+
629
+ .ad-list {
630
+ .ad-list-cell {
631
+ border-top: solid 1px #eeeeee;
632
+ padding: 10px 0 10px;
633
+
634
+ .alc-title {
635
+ display: flex;
636
+ flex-wrap: wrap;
637
+ align-items: center;
638
+ justify-content: space-between;
639
+ line-height: 16px;
640
+
641
+ .alc-box {
642
+ display: flex;
643
+ align-items: center;
644
+ justify-content: space-between;
645
+ // font-size: 12px;
646
+ width: 100%;
647
+
648
+ .alc-source-left {
649
+ display: flex;
650
+ align-items: center;
651
+
652
+ .source-form {
653
+ width: 34px;
654
+ flex: none;
655
+ color: #a9b3c6;
656
+ }
657
+ }
658
+
659
+ .alc-content-text {
660
+ width: 55px;
661
+ flex: none;
662
+
663
+ .aci-view {
664
+ color: #366aff;
665
+ cursor: pointer;
666
+ }
667
+ }
668
+
669
+ .alc-title-from {
670
+ line-height: 22px;
671
+ word-break: break-all !important;
672
+ text-align: left;
673
+ flex: auto;
674
+ display: flex;
675
+ justify-content: flex-start;
676
+ }
677
+ .upload-source {
678
+ // flex: none;
679
+ }
680
+ }
681
+
682
+ .alc-box-introduction {
683
+ overflow: hidden;
684
+ text-overflow: ellipsis;
685
+ display: -webkit-box;
686
+ -webkit-line-clamp: 3;
687
+ -webkit-box-orient: vertical;
688
+ margin-top: 10px;
689
+ color: #616161;
690
+ // font-size: 12px;
691
+ line-height: 24px;
692
+ text-align: left;
693
+
694
+ img {
695
+ width: 50px;
696
+ height: 50px;
697
+ margin: 10px;
698
+ cursor: pointer;
699
+ }
700
+ }
701
+
702
+ .alc-box-introduction-previewImage {
703
+ width: 100%;
704
+ display: block;
705
+ overflow: hidden;
706
+ text-overflow: ellipsis;
707
+ display: -webkit-box;
708
+ -webkit-line-clamp: 3;
709
+ -webkit-box-orient: vertical;
710
+ margin-top: 10px;
711
+ color: #616161;
712
+ // font-size: 12px;
713
+ line-height: 24px;
714
+ text-align: left;
715
+
716
+ img {
717
+ max-width: 300px;
718
+ width: 100%;
719
+ max-height: 150px;
720
+ margin: 10px;
721
+ cursor: pointer;
722
+ }
723
+ }
724
+
725
+ .alc-updateTime {
726
+ display: flex;
727
+ align-items: center;
728
+ justify-content: space-between;
729
+ font-size: 13px;
730
+ width: 100%;
731
+ margin-top: 10px;
732
+
733
+ .upload-source {
734
+ flex: none;
735
+ height: 18px;
736
+ line-height: 18px;
737
+ background: #e9f9f8;
738
+ border: 1px solid #aff2cd;
739
+ border-radius: 2px;
740
+ display: flex;
741
+ align-items: center;
742
+ justify-content: center;
743
+ padding: 0 8px;
744
+ color: #00c2bb;
745
+ }
746
+
747
+ .time {
748
+ color: #999999;
749
+ margin-left: 10px;
750
+ }
751
+
752
+ .alc-content-text {
753
+ color: #366aff;
754
+ cursor: pointer;
755
+ }
756
+ }
757
+
758
+ .alc-title-icon {
759
+ margin: 0 2px;
760
+ width: 18px;
761
+ height: 18px;
762
+ flex: none;
763
+ }
764
+
765
+ .alc-title-updateTime {
766
+ text-align: right;
767
+ color: #999999;
768
+ // font-size: 13px;
769
+ }
770
+ }
771
+
772
+ .alc-content {
773
+ .alc-title-updateTime {
774
+ margin-top: 6px;
775
+ display: block;
776
+ text-align: right;
777
+ color: #999999;
778
+ // font-size: 13px;
779
+ }
780
+
781
+ .alc-content-text {
782
+ margin-bottom: 6px;
783
+ width: 55px;
784
+ flex: none;
785
+
786
+ .aci-view {
787
+ display: inline-block;
788
+ margin-left: 30px;
789
+ color: #366aff;
790
+ cursor: pointer;
791
+ }
792
+ }
793
+
794
+ .alc-content-info {
795
+ display: flex;
796
+ flex-wrap: wrap;
797
+ justify-content: space-between;
798
+
799
+ .alcc-box {
800
+ display: flex;
801
+ flex-wrap: wrap;
802
+ color: #999999;
803
+
804
+ .aci-owner {
805
+ margin-right: 20px;
806
+ }
807
+
808
+ .aci-enterprise {
809
+ margin-right: 20px;
810
+ }
811
+ }
812
+ }
813
+ }
814
+ }
815
+
816
+ .ad-list-cell-recognition {
817
+ max-width: 270px;
818
+ margin-right: 12px;
819
+ font-size: 12px;
820
+ .alc-source-name {
821
+ flex: none;
822
+ padding: 3px;
823
+ margin-right: 5px;
824
+ margin-bottom: 5px;
825
+ background: #f2f6ff;
826
+ border-radius: 5px;
827
+ display: flex;
828
+ align-items: center;
829
+ justify-content: space-between;
830
+ cursor: pointer;
831
+
832
+ img {
833
+ vertical-align: middle;
834
+ // width: 16px;
835
+ // height: 16px;
836
+ margin: 0 3px 0 5px;
837
+ }
838
+
839
+ .alc-title-from {
840
+ // margin-right: 5px;
841
+ max-width: 240px;
842
+ overflow: hidden;
843
+ text-overflow: ellipsis;
844
+ white-space: nowrap;
845
+ }
846
+
847
+ .upload-source {
848
+ margin-right: 5px;
849
+ flex: none;
850
+ }
851
+
852
+ i {
853
+ font-size: 12px;
854
+ }
855
+ }
856
+ }
857
+
858
+ .ad-loadmore {
859
+ width: 100%;
860
+ height: 40px;
861
+ display: flex;
862
+ align-items: center;
863
+ justify-content: center;
864
+ // background: #FFFFFF;
865
+ color: #366aff;
866
+ font-size: 14px;
867
+ margin-top: 8px;
868
+ cursor: pointer;
869
+ }
870
+ }
871
+
872
+ .libang_list {
873
+ .libang_list_cell {
874
+ border-top: solid 1px #eeeeee;
875
+ padding: 10px 0 10px;
876
+ font-size: 12px;
877
+ .libang_title {
878
+ display: flex;
879
+ flex-wrap: wrap;
880
+ align-items: center;
881
+ justify-content: space-between;
882
+ line-height: 16px;
883
+
884
+ .libang_box {
885
+ display: flex;
886
+ align-items: center;
887
+ justify-content: space-between;
888
+ // font-size: 12px;
889
+ width: 100%;
890
+
891
+ .libang_source_left {
892
+ display: flex;
893
+ align-items: center;
894
+
895
+ .source-form {
896
+ width: 34px;
897
+ flex: none;
898
+ color: #a9b3c6;
899
+ }
900
+ }
901
+
902
+ .alc-content-text {
903
+ width: 55px;
904
+ flex: none;
905
+
906
+ .aci-view {
907
+ color: #366aff;
908
+ cursor: pointer;
909
+ }
910
+ }
911
+
912
+ .libang_title_from {
913
+ line-height: 22px;
914
+ word-break: break-all !important;
915
+ text-align: left;
916
+ flex: auto;
917
+ display: flex;
918
+ justify-content: flex-start;
919
+ }
920
+ }
921
+
922
+ .libang_box_introduction {
923
+ overflow: hidden;
924
+ text-overflow: ellipsis;
925
+ display: -webkit-box;
926
+ -webkit-line-clamp: 3;
927
+ -webkit-box-orient: vertical;
928
+ margin-top: 10px;
929
+ color: #616161;
930
+ // font-size: 12px;
931
+ line-height: 24px;
932
+ text-align: left;
933
+
934
+ img {
935
+ width: 50px;
936
+ height: 50px;
937
+ margin: 10px;
938
+ cursor: pointer;
939
+ }
940
+ }
941
+
942
+ .libang_box_introduction_previewImage {
943
+ overflow: hidden;
944
+ text-overflow: ellipsis;
945
+ display: -webkit-box;
946
+ -webkit-line-clamp: 3;
947
+ -webkit-box-orient: vertical;
948
+ margin-top: 10px;
949
+ color: #616161;
950
+ // font-size: 12px;
951
+ line-height: 24px;
952
+ text-align: left;
953
+
954
+ img {
955
+ max-width: 300px;
956
+ width: 100%;
957
+ max-height: 150px;
958
+ margin: 10px;
959
+ cursor: pointer;
960
+ }
961
+ }
962
+
963
+ .libang_updateTime {
964
+ display: flex;
965
+ align-items: center;
966
+ justify-content: space-between;
967
+ font-size: 13px;
968
+ width: 100%;
969
+ margin-top: 10px;
970
+ .libang_updataTime_left {
971
+ width: calc(100% - 40px);
972
+ display: flex;
973
+ align-items: center;
974
+ .upload-source {
975
+ flex: none;
976
+ height: 18px;
977
+ line-height: 18px;
978
+ background: #e9f9f8;
979
+ border: 1px solid #aff2cd;
980
+ border-radius: 2px;
981
+ display: flex;
982
+ align-items: center;
983
+ justify-content: center;
984
+ padding: 0 8px;
985
+ color: #00c2bb;
986
+ }
987
+ .libang_floder {
988
+ width:calc(100% - 90px);
989
+ // margin-left: 10px;
990
+ overflow: hidden;
991
+ text-overflow: ellipsis;
992
+ white-space: nowrap;
993
+ color: #366aff;
994
+ cursor: pointer;
995
+ text-align: left;
996
+ i {
997
+ margin-left: 8px;
998
+ }
999
+ }
1000
+ }
1001
+ .libang_content_text {
1002
+ color: #366aff;
1003
+ cursor: pointer;
1004
+ }
1005
+ .time {
1006
+ color: #999999;
1007
+ margin-left: 10px;
1008
+ }
1009
+ }
1010
+ .alc-title-icon {
1011
+ margin: 0 2px;
1012
+ width: 18px;
1013
+ height: 18px;
1014
+ flex: none;
1015
+ }
1016
+
1017
+ .alc-title-updateTime {
1018
+ text-align: right;
1019
+ color: #999999;
1020
+ // font-size: 13px;
1021
+ }
1022
+ }
1023
+
1024
+ .alc-content {
1025
+ .alc-title-updateTime {
1026
+ margin-top: 6px;
1027
+ display: block;
1028
+ text-align: right;
1029
+ color: #999999;
1030
+ // font-size: 13px;
1031
+ }
1032
+
1033
+ .alc-content-text {
1034
+ margin-bottom: 6px;
1035
+ width: 55px;
1036
+ flex: none;
1037
+
1038
+ .aci-view {
1039
+ display: inline-block;
1040
+ margin-left: 30px;
1041
+ color: #366aff;
1042
+ cursor: pointer;
1043
+ }
1044
+ }
1045
+
1046
+ .alc-content-info {
1047
+ display: flex;
1048
+ flex-wrap: wrap;
1049
+ justify-content: space-between;
1050
+
1051
+ .alcc-box {
1052
+ display: flex;
1053
+ flex-wrap: wrap;
1054
+ color: #999999;
1055
+
1056
+ .aci-owner {
1057
+ margin-right: 20px;
1058
+ }
1059
+
1060
+ .aci-enterprise {
1061
+ margin-right: 20px;
1062
+ }
1063
+ }
1064
+ }
1065
+ }
1066
+ }
1067
+
1068
+ .libang_list_cell_recognition {
1069
+ background: #f2f6ff;
1070
+ display: flex;
1071
+ align-items: center;
1072
+ justify-content: space-between;
1073
+ padding: 3px;
1074
+ margin-right: 5px;
1075
+ margin-bottom: 5px;
1076
+ border-radius: 5px;
1077
+ cursor: pointer;
1078
+ font-size: 12px;
1079
+
1080
+ .libang_list_cell_left {
1081
+ margin-right: 5px;
1082
+ .libang_source_name {
1083
+ display: flex;
1084
+ align-items: center;
1085
+ height: 20px;
1086
+ margin-bottom: 2px;
1087
+ img {
1088
+ vertical-align: middle;
1089
+ // width: 16px;
1090
+ // height: 16px;
1091
+ margin: 0 3px;
1092
+ }
1093
+
1094
+ .libang_title_from {
1095
+ max-width: 226px;
1096
+ overflow: hidden;
1097
+ text-overflow: ellipsis;
1098
+ white-space: nowrap;
1099
+ line-height: 20px;
1100
+ }
1101
+ .upload_source {
1102
+ flex: none;
1103
+ }
1104
+ }
1105
+ .libang_source_floder {
1106
+ max-width: calc(226px - 24px);
1107
+ text-align: left;
1108
+ color: #366aff;
1109
+ overflow: hidden;
1110
+ text-overflow: ellipsis;
1111
+ white-space: nowrap;
1112
+ cursor: pointer;
1113
+ .iconfont {
1114
+ margin: 0 5px;
1115
+ font-size: 14px
1116
+ }
1117
+ }
1118
+ }
1119
+ i {
1120
+ font-size: 12px;
1121
+ }
1122
+ }
1123
+
1124
+ .ad-loadmore {
1125
+ width: 100%;
1126
+ height: 40px;
1127
+ display: flex;
1128
+ align-items: center;
1129
+ justify-content: center;
1130
+ // background: #FFFFFF;
1131
+ color: #366aff;
1132
+ font-size: 14px;
1133
+ margin-top: 8px;
1134
+ cursor: pointer;
1135
+ }
1136
+ }
1137
+ }</style>