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