askbot-dragon 1.3.55 → 1.3.57

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 (84) 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 +58 -58
  5. package/public/index.html +58 -58
  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 +92 -92
  11. package/src/assets/js/Base64Util.js +22 -22
  12. package/src/assets/js/common.js +11 -11
  13. package/src/assets/js/script.js +36 -36
  14. package/src/assets/less/common.css +6773 -6773
  15. package/src/assets/less/converSationContainer/common.less +191 -191
  16. package/src/assets/less/converSationContainer/converSatonContainer.less +493 -493
  17. package/src/assets/less/iconfont.css +37 -37
  18. package/src/assets/less/ticketMessage.less +211 -211
  19. package/src/components/ActionAlertIframe.vue +112 -112
  20. package/src/components/AiGuide.vue +467 -467
  21. package/src/components/AnswerDocknowledge.vue +417 -367
  22. package/src/components/AnswerVoice.vue +280 -280
  23. package/src/components/AskIFrame.vue +15 -15
  24. package/src/components/ConversationContainer.vue +4075 -4061
  25. package/src/components/FileType.vue +86 -86
  26. package/src/components/Message.vue +27 -27
  27. package/src/components/actionSatisfaction.vue +107 -107
  28. package/src/components/actionSendToBot.vue +62 -62
  29. package/src/components/answerDissatisfaction.vue +62 -62
  30. package/src/components/answerRadio.vue +76 -76
  31. package/src/components/ask-components/DissatisfactionOptions.vue +57 -57
  32. package/src/components/ask-components/Msgloading.vue +37 -37
  33. package/src/components/ask-components/SatisfactionV2.vue +15 -15
  34. package/src/components/askVideo.vue +138 -138
  35. package/src/components/assetDetails.vue +370 -370
  36. package/src/components/assetMessage.vue +228 -228
  37. package/src/components/associationIntention.vue +331 -331
  38. package/src/components/attachmentPreview.vue +90 -90
  39. package/src/components/botActionSatisfactor.vue +68 -68
  40. package/src/components/chatContent.vue +513 -513
  41. package/src/components/feedBack.vue +136 -136
  42. package/src/components/fielListView.vue +349 -349
  43. package/src/components/file/AliyunOssComponents.vue +108 -108
  44. package/src/components/formTemplate.vue +3363 -3363
  45. package/src/components/loadingProcess.vue +164 -164
  46. package/src/components/message/ActionAlertIframe.vue +112 -112
  47. package/src/components/message/ShopMessage.vue +164 -164
  48. package/src/components/message/TextMessage.vue +924 -924
  49. package/src/components/message/TicketMessage.vue +177 -177
  50. package/src/components/message/swiper/index.js +4 -4
  51. package/src/components/message/swiper/ticketSwiper.vue +503 -503
  52. package/src/components/message/swiper/ticketSwiperItem.vue +61 -61
  53. package/src/components/msgLoading.vue +231 -231
  54. package/src/components/myPopup.vue +70 -70
  55. package/src/components/pdfPosition.vue +1009 -378
  56. package/src/components/popup.vue +227 -227
  57. package/src/components/previewDoc.vue +226 -226
  58. package/src/components/previewPdf.vue +221 -220
  59. package/src/components/receiverMessagePlatform.vue +65 -65
  60. package/src/components/recommend.vue +89 -89
  61. package/src/components/selector/hOption.vue +20 -20
  62. package/src/components/selector/hSelector.vue +199 -199
  63. package/src/components/selector/hWrapper.vue +216 -216
  64. package/src/components/senderMessagePlatform.vue +50 -50
  65. package/src/components/source/BotMessage.vue +24 -24
  66. package/src/components/source/CustomMessage.vue +24 -24
  67. package/src/components/test.vue +260 -260
  68. package/src/components/tree.vue +294 -294
  69. package/src/components/utils/AliyunIssUtil.js +72 -72
  70. package/src/components/utils/ckeditor.js +155 -155
  71. package/src/components/utils/ckeditorImageUpload/command.js +109 -109
  72. package/src/components/utils/ckeditorImageUpload/editing.js +11 -11
  73. package/src/components/utils/ckeditorImageUpload/plugin-image.js +11 -11
  74. package/src/components/utils/ckeditorImageUpload/toolbar-ui.js +40 -40
  75. package/src/components/utils/ckeditorfileUpload/common.js +111 -111
  76. package/src/components/utils/ckeditorfileUpload/editing.js +11 -11
  77. package/src/components/utils/ckeditorfileUpload/plugin_file.js +11 -11
  78. package/src/components/utils/ckeditorfileUpload/toolbar_ui.js +34 -34
  79. package/src/components/utils/format_date.js +25 -25
  80. package/src/components/utils/index.js +6 -6
  81. package/src/components/utils/math_utils.js +29 -29
  82. package/src/components/voiceComponent.vue +119 -119
  83. package/src/main.js +60 -60
  84. package/vue.config.js +55 -55
@@ -1,368 +1,418 @@
1
- <template>
2
- <div class="answer-docknowledge">
3
- <div v-if="msg.content.type == 0" class="answer-text">{{ msg.content.text }}</div>
4
- <div v-if="msg.content.type == 1" class="answer-text">{{ msg.content.text }}</div>
5
- <div class="ad-list">
6
- <div v-for="(item, itemIndex) in msg.content.list" :style="{paddingBottom: itemIndex === msg.content.list.length - 1?0:'10px'}" :key="itemIndex" class="ad-list-cell">
7
- <div class="alc-title">
8
- <div class="alc-box">
9
- <div class="alc-source-left">
10
- <span class="source-form">出自</span>
11
- <img class="alc-title-icon" height="24px" width="24px" :src="item.src" alt="" srcset="">
12
- <span class="alc-title-from">{{ item.from }}</span>
13
- </div>
14
-
15
- </div>
16
- <div v-html="item.introduction" class="alc-box-introduction">
17
- </div>
18
- <div class="alc-updateTime">
19
- <div v-show="docSource[item.source]" class="upload-source">
20
- {{docSource[item.source]}}
21
- </div>
22
- <div v-show="item.url" class="alc-content-text">
23
- <span @click="lookAttach(item.url, item, $event)" class="aci-view">查看 ></span>
24
- </div>
25
- <!-- <div class="time">
26
- <span>更新时间:</span>
27
- {{ new Date(item.updateTime).Format('MM-dd hh:mm') }}
28
- </div> -->
29
- </div>
30
- <!-- <span v-if="isPC" class="alc-title-updateTime">最后更新时间: {{ item.updateTime }}</span>-->
31
- </div>
32
- <div class="alc-content" v-if="false">
33
- <div v-if="msg.content.type == 1" class="alc-content-text">{{ item.introduction }} <span
34
- @click="lookAttach(item.url, item, $event)" class="aci-view">查看原文 ></span>
35
- </div>
36
- <span v-if="!isPC" class="alc-title-updateTime">最后更新时间: {{ item.updateTime }}</span>
37
- <div v-if="false" class="alc-content-info">
38
- <div class="alcc-box">
39
- <span class="aci-owner">所有者: {{ item.owner }}</span>
40
- <span class="aci-enterprise">所属企业: {{ item.enterprise }}</span>
41
- <span class="aci-source">文件来源: {{ item.source }}</span>
42
- </div>
43
- </div>
44
- </div>
45
- </div>
46
- </div>
47
- <previewPdf ref="previewPdf" :url="previewHref" officePreviewType="pdf"></previewPdf>
48
- </div>
49
- </template>
50
-
51
- <script>
52
- import previewPdf from "./previewPdf";
53
- import { isMobile } from "../assets/js/common";
54
- export default {
55
- name: "answerDocknowledge",
56
- components: { previewPdf },
57
- data() {
58
- return {
59
- isPC: true,
60
- previewHref: "",
61
- docSource: {
62
- LOCAL_FILE: "来源于本地文件",
63
- CREATED_BY_ONESELF: "来源于自建知识",
64
- WECHAT: "来源于微信",
65
- AUTO_SYN_FROM_LOCAL_FILE: "自动同步于本地",
66
- YUQUE: "来源于语雀",
67
- CORP_LOCAL_FILE:'来源于企业知识库'
68
- },
69
- imageObj: {
70
- PDF: 'pdf1',
71
- pdf: 'pdf1',
72
- TXT: 'txt1',
73
- txt: 'txt1',
74
- selfadd: 'selfadd1',
75
- md: "md2",
76
- html: 'selfadd1',
77
- mode: "mode",
78
- general: 'general',
79
- word: "word1",
80
- Word: "word1",
81
- docx: "word1",
82
- doc: "word1",
83
- WORD: "word1",
84
- Excel: 'excel1',
85
- EXCEL: 'excel1',
86
- excel: 'excel1',
87
- PPT: 'ppt1',
88
- ppt: 'ppt1',
89
- pptx: 'ppt1',
90
- img: "image1",
91
- image: "image1",
92
- video: "video",
93
- audio: 'audio',
94
- link: "link",
95
- wechat: "wechat",
96
- mp4: "video",
97
- MP4: "video",
98
- xlsx: "excel1",
99
- xls: "excel1",
100
- jpg: "image1",
101
- jpeg: "image1",
102
- png: "image1",
103
- webp: "image1",
104
- gif: "image1",
105
- svg: "image1",
106
- bmp: "image1",
107
- avi: "video",
108
- mov: "video",
109
- rmvb: "video",
110
- wav: "audio",
111
- mp3: "audio",
112
- yqhtml: "yqhtml",
113
- }
114
- }
115
- },
116
- props: ['msg','isAskLightning'],
117
- beforeMounted() {
118
-
119
- },
120
- created() {
121
- var system = {};
122
- system.pingtai = /(Win32|Win16|WinCE|Mac68K|MacIntel|MacIntel|MacPPC|Linux mips64)/i.test(navigator.platform);
123
- if (system.pingtai) {
124
- //电脑
125
- this.isPC = true;
126
- } else {
127
- //手机
128
- this.isPC = false;
129
- }
130
- this.msg.content.list.forEach(element => {
131
- element.src = 'https://static.guoranbot.com/cdn-office-website/askbot_doc/' + this.imageObj[element.format] + '.png';
132
- if ((element.format === "txt" || element.format === "html") && element.source === "WECHAT") {
133
- element.src = 'https://static.guoranbot.com/cdn-office-website/askbot_doc/wechat.png';
134
- }
135
- });
136
- },
137
- mounted() {
138
-
139
- },
140
- methods: {
141
- //预览图片
142
- lookAttach(url, item, event) {
143
- event.preventDefault();
144
- if (this.isAskLightning == 1){
145
- window.parent.postMessage({
146
- data: "bot_preview",
147
- item: JSON.stringify(item),
148
- url: url
149
- },"*");
150
- } else {
151
- let index = url.lastIndexOf('?')
152
- let type = ''
153
- let httpUrl = '/knowledge-api/knowledge/getTemporaryCertificate'
154
- if (index !== -1) {
155
- url = url.substring(0, index)
156
- type = this.fileType(url)
157
- } else {
158
- type = this.fileType(url)
159
- }
160
- if (type === '' || type === 'OTHER') {
161
- httpUrl = httpUrl += '?needEncrypt=true'
162
- } else {
163
- httpUrl = httpUrl += '?needEncrypt=false'
164
- }
165
- this.$http.post(httpUrl, {
166
- "fileInOssPath":url
167
- }).then(res =>{
168
- if(res.data.code == '0') {
169
- this.previewHref = res.data.data;
170
- if (isMobile()){
171
- this.$refs.previewPdf.previewShowPopup = true;
172
- } else {
173
- this.$refs.previewPdf.drawer = true;
174
- }
175
- this.$refs.previewPdf.fileType = type
176
- this.$refs.previewPdf.tagIds = item.tagIds
177
- if(item.tagIds) {
178
- return
179
- }
180
- this.$nextTick(() =>{
181
- if(item.source == 'CREATED_BY_ONESELF' || type === 'HTML') {
182
- this.$refs.previewPdf.getBolb(item)
183
- } else {
184
- this.$refs.previewPdf.loadIframe(item)
185
- }
186
- })
187
- }
188
- })
189
- }
190
-
191
- },
192
- fileType (url) {
193
- const fileType = url.substring(url.lastIndexOf('.'));
194
- if (fileType === '.mp4' || fileType === '.MP4') {
195
- return 'VIDEO'
196
- } else if (fileType === '.html') {
197
- return 'HTML'
198
- } else {
199
- return 'OTHER'
200
- }
201
- },
202
- }
203
- }
204
- </script>
205
-
206
- <style scoped lang="less">
207
- .answer-docknowledge {
208
- min-width: 100px;
209
-
210
- .answer-text {
211
- // font-size: 13px;
212
- text-align: left;
213
- line-height: 25px;
214
- padding: 0px 0px 12px 0px;
215
-
216
- .aci-view {
217
- // font-size: 13px;
218
- display: inline-block;
219
- // margin-left: 5px;
220
- color: #366aff;
221
- cursor: pointer;
222
- }
223
- }
224
-
225
- .ad-list {
226
- .ad-list-cell {
227
- border-top: solid 1px #E0E6F7;
228
- padding: 10px 0 10px;
229
-
230
- .alc-title {
231
- display: flex;
232
- flex-wrap: wrap;
233
- align-items: center;
234
- justify-content: space-between;
235
- line-height: 16px;
236
-
237
- .alc-box {
238
- display: flex;
239
- align-items: center;
240
- justify-content: space-between;
241
- // font-size: 12px;
242
- width: 100%;
243
- .alc-source-left{
244
- display: flex;
245
- align-items: center;
246
- .source-form{
247
- width: 34px;
248
- flex: none;
249
- color: #A9B3C6;
250
- }
251
- }
252
- .alc-content-text{
253
- width: 55px;
254
- flex: none;
255
- .aci-view{
256
- color: #366aff;
257
- cursor: pointer;
258
- }
259
- }
260
- .alc-title-from {
261
- line-height: 22px;
262
- word-break: break-all !important;
263
- text-align: left;
264
- flex: auto;
265
- display: flex;
266
- justify-content: flex-start;
267
- }
268
- }
269
- .alc-box-introduction{
270
- overflow: hidden;
271
- text-overflow: ellipsis;
272
- display: -webkit-box;
273
- -webkit-line-clamp:3;
274
- -webkit-box-orient:vertical;
275
- margin-top: 10px;
276
- color: #616161;
277
- // font-size: 12px;
278
- line-height: 24px;
279
- text-align: left;
280
- }
281
- .alc-updateTime{
282
- display: flex;
283
- align-items: center;
284
- justify-content: space-between;
285
- font-size: 13px;
286
- width: 100%;
287
- margin-top: 10px;
288
- .upload-source{
289
- flex: none;
290
- height: 18px;
291
- line-height: 18px;
292
- background: #E9F9F8;
293
- border: 1px solid #AFF2CD;
294
- border-radius: 2px;
295
- display: flex;
296
- align-items: center;
297
- justify-content: center;
298
- padding: 0 8px;
299
- color: #00C2BB;
300
- }
301
- .time{
302
- color: #999999;
303
- margin-left: 10px;
304
- }
305
- .alc-content-text {
306
- color: #366aff;
307
- cursor: pointer;
308
- }
309
- }
310
- .alc-title-icon {
311
- margin: 0 2px;
312
- width: 18px;
313
- height: 18px;
314
- flex: none;
315
- }
316
-
317
- .alc-title-updateTime {
318
- text-align: right;
319
- color: #999999;
320
- // font-size: 13px;
321
- }
322
- }
323
-
324
- .alc-content {
325
- .alc-title-updateTime {
326
- margin-top: 6px;
327
- display: block;
328
- text-align: right;
329
- color: #999999;
330
- // font-size: 13px;
331
- }
332
-
333
- .alc-content-text {
334
- margin-bottom: 6px;
335
- width: 55px;
336
- flex: none;
337
- .aci-view {
338
- display: inline-block;
339
- margin-left: 30px;
340
- color: #366aff;
341
- cursor: pointer;
342
- }
343
- }
344
-
345
- .alc-content-info {
346
- display: flex;
347
- flex-wrap: wrap;
348
- justify-content: space-between;
349
-
350
- .alcc-box {
351
- display: flex;
352
- flex-wrap: wrap;
353
- color: #999999;
354
-
355
- .aci-owner {
356
- margin-right: 20px;
357
- }
358
-
359
- .aci-enterprise {
360
- margin-right: 20px;
361
- }
362
- }
363
- }
364
- }
365
- }
366
- }
367
- }
1
+ <template>
2
+ <div class="answer-docknowledge">
3
+ <div v-if="msg.content.type == 0" class="answer-text">
4
+ <template v-if="msg.content.renderType == 1">
5
+ <p v-html="msg.content.text"></p>
6
+ </template>
7
+ <template v-else>
8
+ {{ msg.content.text }}
9
+ </template>
10
+ </div>
11
+ <div v-if="msg.content.type == 1" class="answer-text">
12
+ <template v-if="msg.content.renderType == 1">
13
+ <p v-html="msg.content.text"></p>
14
+ </template>
15
+ <template v-else>
16
+ {{ msg.content.text }}
17
+ </template>
18
+ </div>
19
+ <div class="ad-list">
20
+ <div v-for="(item, itemIndex) in msg.content.list" :style="{paddingBottom: itemIndex === msg.content.list.length - 1?0:'10px'}" :key="itemIndex" class="ad-list-cell">
21
+ <div class="alc-title">
22
+ <div class="alc-box">
23
+ <div class="alc-source-left">
24
+ <span class="source-form">出自</span>
25
+ <img class="alc-title-icon" height="24px" width="24px" :src="item.src" alt="" srcset="">
26
+ <span class="alc-title-from">{{ item.from }}</span>
27
+ </div>
28
+
29
+ </div>
30
+ <div v-html="item.introduction" v-if="!srcContentTypeIMG(item)" class="alc-box-introduction">
31
+ </div>
32
+ <div v-else class="alc-box-introduction">
33
+ <img :src="item.expiredUrl" alt="" @click="lookAttach(item.url, item, $event)">
34
+ </div>
35
+ <div class="alc-updateTime">
36
+ <div v-show="docSource[item.source]" class="upload-source">
37
+ {{docSource[item.source]}}
38
+ </div>
39
+ <div v-show="item.url" class="alc-content-text">
40
+ <span @click="lookAttach(item.url, item, $event)" class="aci-view">查看 ></span>
41
+ </div>
42
+ <!-- <div class="time">
43
+ <span>更新时间:</span>
44
+ {{ new Date(item.updateTime).Format('MM-dd hh:mm') }}
45
+ </div> -->
46
+ </div>
47
+ <!-- <span v-if="isPC" class="alc-title-updateTime">最后更新时间: {{ item.updateTime }}</span>-->
48
+ </div>
49
+ <div class="alc-content" v-if="false">
50
+ <div v-if="msg.content.type == 1" class="alc-content-text">{{ item.introduction }} <span
51
+ @click="lookAttach(item.url, item, $event)" class="aci-view">查看原文 ></span>
52
+ </div>
53
+ <span v-if="!isPC" class="alc-title-updateTime">最后更新时间: {{ item.updateTime }}</span>
54
+ <div v-if="false" class="alc-content-info">
55
+ <div class="alcc-box">
56
+ <span class="aci-owner">所有者: {{ item.owner }}</span>
57
+ <span class="aci-enterprise">所属企业: {{ item.enterprise }}</span>
58
+ <span class="aci-source">文件来源: {{ item.source }}</span>
59
+ </div>
60
+ </div>
61
+ </div>
62
+ </div>
63
+ </div>
64
+ <previewPdf ref="previewPdf" :url="previewHref" officePreviewType="pdf"></previewPdf>
65
+ </div>
66
+ </template>
67
+
68
+ <script>
69
+ import previewPdf from "./previewPdf";
70
+ import { isMobile } from "../assets/js/common";
71
+ export default {
72
+ name: "answerDocknowledge",
73
+ components: { previewPdf },
74
+ data() {
75
+ return {
76
+ isPC: true,
77
+ previewHref: "",
78
+ docSource: {
79
+ LOCAL_FILE: "来源于本地文件",
80
+ CREATED_BY_ONESELF: "来源于自建知识",
81
+ WECHAT: "来源于微信",
82
+ AUTO_SYN_FROM_LOCAL_FILE: "自动同步于本地",
83
+ YUQUE: "来源于语雀",
84
+ CORP_LOCAL_FILE:'来源于企业知识库'
85
+ },
86
+ imageObj: {
87
+ PDF: 'pdf1',
88
+ pdf: 'pdf1',
89
+ TXT: 'txt1',
90
+ txt: 'txt1',
91
+ selfadd: 'selfadd1',
92
+ md: "md2",
93
+ html: 'selfadd1',
94
+ mode: "mode",
95
+ general: 'general',
96
+ word: "word1",
97
+ Word: "word1",
98
+ docx: "word1",
99
+ doc: "word1",
100
+ WORD: "word1",
101
+ Excel: 'excel1',
102
+ EXCEL: 'excel1',
103
+ excel: 'excel1',
104
+ PPT: 'ppt1',
105
+ ppt: 'ppt1',
106
+ pptx: 'ppt1',
107
+ img: "image1",
108
+ image: "image1",
109
+ video: "video",
110
+ audio: 'audio',
111
+ link: "link",
112
+ wechat: "wechat",
113
+ mp4: "video",
114
+ MP4: "video",
115
+ xlsx: "excel1",
116
+ xls: "excel1",
117
+ jpg: "image1",
118
+ jpeg: "image1",
119
+ png: "image1",
120
+ webp: "image1",
121
+ gif: "image1",
122
+ svg: "image1",
123
+ bmp: "image1",
124
+ avi: "video",
125
+ mov: "video",
126
+ rmvb: "video",
127
+ wav: "audio",
128
+ mp3: "audio",
129
+ yqhtml: "yqhtml",
130
+ }
131
+ }
132
+ },
133
+ props: ['msg','isAskLightning'],
134
+ beforeMounted() {
135
+
136
+ },
137
+ created() {
138
+ var system = {};
139
+ system.pingtai = /(Win32|Win16|WinCE|Mac68K|MacIntel|MacIntel|MacPPC|Linux mips64)/i.test(navigator.platform);
140
+ if (system.pingtai) {
141
+ //电脑
142
+ this.isPC = true;
143
+ } else {
144
+ //手机
145
+ this.isPC = false;
146
+ }
147
+ this.msg.content.list.forEach(element => {
148
+ element.src = 'https://static.guoranbot.com/cdn-office-website/askbot_doc/' + this.imageObj[element.format] + '.png';
149
+ if ((element.format === "txt" || element.format === "html") && element.source === "WECHAT") {
150
+ element.src = 'https://static.guoranbot.com/cdn-office-website/askbot_doc/wechat.png';
151
+ }
152
+ });
153
+ },
154
+ mounted() {
155
+
156
+ },
157
+ methods: {
158
+ //预览图片
159
+ lookAttach(url, item, event) {
160
+ event.preventDefault();
161
+ if (this.isAskLightning == 1){
162
+ window.parent.postMessage({
163
+ data: "bot_preview",
164
+ item: JSON.stringify(item),
165
+ url: url
166
+ },"*");
167
+ } else {
168
+ let index = url.lastIndexOf('?')
169
+ let type = ''
170
+ let httpUrl = '/knowledge-api/knowledge/getTemporaryCertificate'
171
+ if (index !== -1) {
172
+ url = url.substring(0, index)
173
+ type = this.fileType(url)
174
+ } else {
175
+ type = this.fileType(url)
176
+ }
177
+ if (type === '' || type === 'OTHER') {
178
+ httpUrl = httpUrl += '?needEncrypt=true'
179
+ } else {
180
+ httpUrl = httpUrl += '?needEncrypt=false'
181
+ }
182
+ this.$http.post(httpUrl, {
183
+ "fileInOssPath":url
184
+ }).then(res =>{
185
+ if(res.data.code == '0') {
186
+ this.previewHref = res.data.data;
187
+ if (isMobile()){
188
+ this.$refs.previewPdf.previewShowPopup = true;
189
+ } else {
190
+ this.$refs.previewPdf.drawer = true;
191
+ }
192
+ this.$refs.previewPdf.fileType = type
193
+ this.$refs.previewPdf.tagIds = item.tagIds
194
+ if(item.tagIds) {
195
+ return
196
+ }
197
+ this.$nextTick(() =>{
198
+ if(item.source == 'CREATED_BY_ONESELF' || type === 'HTML') {
199
+ this.$refs.previewPdf.getBolb(item)
200
+ } else {
201
+ this.$refs.previewPdf.loadIframe(item)
202
+ }
203
+ })
204
+ }
205
+ })
206
+ }
207
+
208
+ },
209
+ fileType (url) {
210
+ const fileType = url.substring(url.lastIndexOf('.'));
211
+ if (fileType === '.mp4' || fileType === '.MP4') {
212
+ return 'VIDEO'
213
+ } else if (fileType === '.html') {
214
+ return 'HTML'
215
+ } else {
216
+ return 'OTHER'
217
+ }
218
+ },
219
+ srcContentTypeIMG(item) {
220
+ let url = item.url
221
+ const type = url.substring(url.lastIndexOf('.'));
222
+ if(type === '.jpg' || type === '.jpeg' || type === '.png' || type === '.gif') {
223
+ this.getSrc(item)
224
+ return true
225
+ } else {
226
+ return false
227
+ }
228
+ },
229
+ getSrc (item) {
230
+ // let imgurl = ''
231
+ this.$http.post(
232
+ '/knowledge-api/temporary-certificate/or-origin?expired=30',
233
+ item.url,
234
+ {
235
+ headers: {
236
+ "Content-Type": "application/json",
237
+ },
238
+ }).then(async res => {
239
+ // console.log(res,'=====');
240
+ // imgurl = await res.bodyText
241
+ this.$set(item,'expiredUrl',res.bodyText)
242
+ // return res.data
243
+ })
244
+ // return imgurl
245
+ }
246
+ }
247
+ }
248
+ </script>
249
+
250
+ <style scoped lang="less">
251
+ .answer-docknowledge {
252
+ min-width: 100px;
253
+
254
+ .answer-text {
255
+ // font-size: 13px;
256
+ text-align: left;
257
+ line-height: 25px;
258
+ padding: 0px 0px 12px 0px;
259
+
260
+ .aci-view {
261
+ // font-size: 13px;
262
+ display: inline-block;
263
+ // margin-left: 5px;
264
+ color: #366aff;
265
+ cursor: pointer;
266
+ }
267
+ }
268
+
269
+ .ad-list {
270
+ .ad-list-cell {
271
+ border-top: solid 1px #E0E6F7;
272
+ padding: 10px 0 10px;
273
+
274
+ .alc-title {
275
+ display: flex;
276
+ flex-wrap: wrap;
277
+ align-items: center;
278
+ justify-content: space-between;
279
+ line-height: 16px;
280
+
281
+ .alc-box {
282
+ display: flex;
283
+ align-items: center;
284
+ justify-content: space-between;
285
+ // font-size: 12px;
286
+ width: 100%;
287
+ .alc-source-left{
288
+ display: flex;
289
+ align-items: center;
290
+ .source-form{
291
+ width: 34px;
292
+ flex: none;
293
+ color: #A9B3C6;
294
+ }
295
+ }
296
+ .alc-content-text{
297
+ width: 55px;
298
+ flex: none;
299
+ .aci-view{
300
+ color: #366aff;
301
+ cursor: pointer;
302
+ }
303
+ }
304
+ .alc-title-from {
305
+ line-height: 22px;
306
+ word-break: break-all !important;
307
+ text-align: left;
308
+ flex: auto;
309
+ display: flex;
310
+ justify-content: flex-start;
311
+ }
312
+ }
313
+ .alc-box-introduction{
314
+ overflow: hidden;
315
+ text-overflow: ellipsis;
316
+ display: -webkit-box;
317
+ -webkit-line-clamp:3;
318
+ -webkit-box-orient:vertical;
319
+ margin-top: 10px;
320
+ color: #616161;
321
+ // font-size: 12px;
322
+ line-height: 24px;
323
+ text-align: left;
324
+ img {
325
+ width: 50px;
326
+ height: 50px;
327
+ margin: 10px;
328
+ cursor: pointer;
329
+ }
330
+ }
331
+ .alc-updateTime{
332
+ display: flex;
333
+ align-items: center;
334
+ justify-content: space-between;
335
+ font-size: 13px;
336
+ width: 100%;
337
+ margin-top: 10px;
338
+ .upload-source{
339
+ flex: none;
340
+ height: 18px;
341
+ line-height: 18px;
342
+ background: #E9F9F8;
343
+ border: 1px solid #AFF2CD;
344
+ border-radius: 2px;
345
+ display: flex;
346
+ align-items: center;
347
+ justify-content: center;
348
+ padding: 0 8px;
349
+ color: #00C2BB;
350
+ }
351
+ .time{
352
+ color: #999999;
353
+ margin-left: 10px;
354
+ }
355
+ .alc-content-text {
356
+ color: #366aff;
357
+ cursor: pointer;
358
+ }
359
+ }
360
+ .alc-title-icon {
361
+ margin: 0 2px;
362
+ width: 18px;
363
+ height: 18px;
364
+ flex: none;
365
+ }
366
+
367
+ .alc-title-updateTime {
368
+ text-align: right;
369
+ color: #999999;
370
+ // font-size: 13px;
371
+ }
372
+ }
373
+
374
+ .alc-content {
375
+ .alc-title-updateTime {
376
+ margin-top: 6px;
377
+ display: block;
378
+ text-align: right;
379
+ color: #999999;
380
+ // font-size: 13px;
381
+ }
382
+
383
+ .alc-content-text {
384
+ margin-bottom: 6px;
385
+ width: 55px;
386
+ flex: none;
387
+ .aci-view {
388
+ display: inline-block;
389
+ margin-left: 30px;
390
+ color: #366aff;
391
+ cursor: pointer;
392
+ }
393
+ }
394
+
395
+ .alc-content-info {
396
+ display: flex;
397
+ flex-wrap: wrap;
398
+ justify-content: space-between;
399
+
400
+ .alcc-box {
401
+ display: flex;
402
+ flex-wrap: wrap;
403
+ color: #999999;
404
+
405
+ .aci-owner {
406
+ margin-right: 20px;
407
+ }
408
+
409
+ .aci-enterprise {
410
+ margin-right: 20px;
411
+ }
412
+ }
413
+ }
414
+ }
415
+ }
416
+ }
417
+ }
368
418
  </style>