Commit 1078fd23 authored by xioln's avatar xioln

浏览附件接口修改

parent c0933e0c
...@@ -84,6 +84,7 @@ export default { ...@@ -84,6 +84,7 @@ export default {
// // lazy: true // // lazy: true
// }) // })
this.getFormInfo() this.getFormInfo()
this.getPdf(this.filesList[0])
}, },
methods: { methods: {
getFormInfo () { getFormInfo () {
...@@ -95,7 +96,7 @@ export default { ...@@ -95,7 +96,7 @@ export default {
if (item.data[0]?.contentType) { if (item.data[0]?.contentType) {
this.contentType = item.data[0].contentType this.contentType = item.data[0].contentType
this.getFileId() this.getFileId()
this.getPdf(this.filesList[0]) // this.getPdf(this.filesList[0])
} }
} }
}) })
...@@ -103,7 +104,15 @@ export default { ...@@ -103,7 +104,15 @@ export default {
}) })
}, },
getPdf (file) { getPdf (file) {
get('/dfs/fileManager/preview', { objName: file.sourceIdType, objId: file.sourceId, linkId: file.id }).then(res => { // get('/dfs/fileManager/preview', { objName: file.sourceIdType, objId: file.sourceId, linkId: file.id }).then(res => {
// if (res.items.fileBase64) {
// this.pdfh5 = new Pdfh5(this.$refs.pdfComponent, {
// data: atob(res.items.fileBase64)
// })
// }
// })
get('/ExtAutoTask/previewMakerFile', { fileId: file.fileId }).then(res => {
this.convertSuccess = true
if (res.items.fileBase64) { if (res.items.fileBase64) {
this.pdfh5 = new Pdfh5(this.$refs.pdfComponent, { this.pdfh5 = new Pdfh5(this.$refs.pdfComponent, {
data: atob(res.items.fileBase64) data: atob(res.items.fileBase64)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment