pdf 预览问题

master
张同海 11 months ago
parent abdb6ca33a
commit d620e737ed

@ -309,7 +309,8 @@ export function DownloadFile(parameter) {
return axios({ return axios({
url: '/TaskManageBC/DownloadFile', url: '/TaskManageBC/DownloadFile',
method: 'get', method: 'get',
params: parameter params: parameter,
responseType: 'arraybuffer'
}) })
} }
export function TransferTask(parameter) { export function TransferTask(parameter) {

@ -592,8 +592,8 @@ export default {
UserId: '', UserId: '',
value: '', value: '',
formItemLayout: { formItemLayout: {
labelCol1: { span: 5 }, labelCol1: { span: 6 },
wrapperCol1: { span: 19 }, wrapperCol1: { span: 18 },
labelCol2: { span: 8 }, labelCol2: { span: 8 },
wrapperCol2: { span: 16 }, wrapperCol2: { span: 16 },
labelCol3: { span: 4 }, labelCol3: { span: 4 },
@ -721,6 +721,8 @@ export default {
}) })
DownloadFile(ApiData).then(res => { DownloadFile(ApiData).then(res => {
this.pdfUrl = window.URL.createObjectURL(new Blob([res], { type: 'application/pdf;charset=utf-8' })) this.pdfUrl = window.URL.createObjectURL(new Blob([res], { type: 'application/pdf;charset=utf-8' }))
// this.pdfUrl = window.URL.createObjectURL(new Blob([res], { type: 'text/plain;charset=utf-8' }))
console.log(this.pdfUrl)
}) })
GetSysUserPage().then(res => { GetSysUserPage().then(res => {
this.UserList = res.data this.UserList = res.data

Loading…
Cancel
Save