askbot-dragon 1.1.23 → 1.1.25
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.
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
</div>
|
|
16
16
|
<div v-html="item.introduction" class="alc-box-introduction">
|
|
17
17
|
</div>
|
|
18
|
-
<div class="alc-updateTime"
|
|
18
|
+
<div class="alc-updateTime">
|
|
19
19
|
<div v-show="docSource[item.source]" class="upload-source">
|
|
20
20
|
{{docSource[item.source]}}
|
|
21
21
|
</div>
|
|
@@ -137,42 +137,46 @@ export default {
|
|
|
137
137
|
//预览图片
|
|
138
138
|
lookAttach(url, item, event) {
|
|
139
139
|
event.preventDefault();
|
|
140
|
-
console.log('111111111');
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
140
|
+
console.log('111111111',url,item,this.isAskLightning);
|
|
141
|
+
if (this.isAskLightning == 1){
|
|
142
|
+
window.parent.postMessage({
|
|
143
|
+
data: "bot_preview",
|
|
144
|
+
item: JSON.stringify(item),
|
|
145
|
+
url: url
|
|
146
|
+
},"*");
|
|
147
|
+
} else {
|
|
148
|
+
let index = url.lastIndexOf('?')
|
|
149
|
+
let type = ''
|
|
150
|
+
let httpUrl = '/knowledge-api/knowledge/getTemporaryCertificate'
|
|
151
|
+
if (index !== -1) {
|
|
152
|
+
url = url.substring(0, index)
|
|
153
|
+
type = this.fileType(url)
|
|
154
|
+
} else {
|
|
155
|
+
type = this.fileType(url)
|
|
156
|
+
}
|
|
157
|
+
if (type === '' || type === 'OTHER') {
|
|
158
|
+
httpUrl = httpUrl += '?needEncrypt=true'
|
|
159
|
+
} else {
|
|
160
|
+
httpUrl = httpUrl += '?needEncrypt=false'
|
|
161
|
+
}
|
|
162
|
+
this.$http.post(httpUrl, {
|
|
163
|
+
"fileInOssPath":url
|
|
164
|
+
}).then(res =>{
|
|
165
|
+
if(res.data.code == '0') {
|
|
166
|
+
this.previewHref = res.data.data
|
|
167
|
+
this.$refs.previewPdf.previewShowPopup = true;
|
|
168
|
+
this.$refs.previewPdf.fileType = type
|
|
169
|
+
this.$nextTick(() =>{
|
|
170
|
+
if(item.source == 'CREATED_BY_ONESELF') {
|
|
171
|
+
this.$refs.previewPdf.getBolb(item)
|
|
172
|
+
} else {
|
|
173
|
+
this.$refs.previewPdf.loadIframe(item)
|
|
174
|
+
}
|
|
175
|
+
})
|
|
176
|
+
}
|
|
177
|
+
})
|
|
178
|
+
}
|
|
179
|
+
|
|
176
180
|
},
|
|
177
181
|
fileType (url) {
|
|
178
182
|
const fileType = url.substring(url.lastIndexOf('.'));
|
|
@@ -228,23 +228,24 @@
|
|
|
228
228
|
|
|
229
229
|
},
|
|
230
230
|
//预览图片
|
|
231
|
-
lookAttach(
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
231
|
+
lookAttach(){
|
|
232
|
+
return
|
|
233
|
+
// if (e.target.localName == 'a'){
|
|
234
|
+
// console.debug('lookImage',e.target.href)
|
|
235
|
+
// this.previewHref = e.target.href
|
|
236
|
+
// this.$refs.previewDoc.previewShowPopup = true
|
|
237
|
+
// // let url = ''
|
|
238
|
+
// // try {
|
|
239
|
+
// // url = btoa(e.target.href)
|
|
240
|
+
// // }
|
|
241
|
+
// // catch {
|
|
242
|
+
// // url = encodeURIComponent(btoa(e.target.href))
|
|
243
|
+
// // }
|
|
244
|
+
// // window.open('https://test.open.askbot.cn/kkfileview/onlinePreview?url=' + url)
|
|
245
|
+
// // e.stopPropagation()
|
|
246
|
+
// // e.preventDefault()
|
|
247
|
+
// e.returnValue = false
|
|
248
|
+
// }
|
|
248
249
|
},
|
|
249
250
|
},
|
|
250
251
|
watch:{
|
|
@@ -291,10 +292,10 @@
|
|
|
291
292
|
/*padding-bottom: 10px;
|
|
292
293
|
border-bottom: 1px solid #EEEEEE;*/
|
|
293
294
|
}
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
}
|
|
295
|
+
///deep/a{
|
|
296
|
+
// disabled:true
|
|
297
|
+
// //pointer-events: none;
|
|
298
|
+
//}
|
|
298
299
|
}
|
|
299
300
|
|
|
300
301
|
</style>
|
|
@@ -32,7 +32,8 @@ export default {
|
|
|
32
32
|
data () {
|
|
33
33
|
return {
|
|
34
34
|
previewShowPopup: false,
|
|
35
|
-
fileText:''
|
|
35
|
+
fileText:'',
|
|
36
|
+
fileType:""
|
|
36
37
|
}
|
|
37
38
|
},
|
|
38
39
|
props:{
|
|
@@ -43,10 +44,6 @@ export default {
|
|
|
43
44
|
officePreviewType:{
|
|
44
45
|
type: String,
|
|
45
46
|
default: ''
|
|
46
|
-
},
|
|
47
|
-
fileType :{
|
|
48
|
-
type: String,
|
|
49
|
-
default: ''
|
|
50
47
|
}
|
|
51
48
|
},
|
|
52
49
|
computed:{
|
|
@@ -73,7 +70,7 @@ export default {
|
|
|
73
70
|
// } else {
|
|
74
71
|
// return 'OTHER'
|
|
75
72
|
// }
|
|
76
|
-
|
|
73
|
+
|
|
77
74
|
// }
|
|
78
75
|
},
|
|
79
76
|
methods :{
|