pdf打开问题

dev2.0.1
anthonywj 1 year ago
parent 1908c57b8a
commit 3e48987f2a

@ -489,6 +489,10 @@ export default {
showImgViewer(row) {
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
this.imgList = [];
if (row.filePath.toLowerCase().slice(-5).includes(".pdf")) {
window.open(this.certFileUrl + row.filePath.replace(",", ""));
return
}
previewImage({imageUrl: row.licenseUrl, certFileUrl: this.certFileUrl}).then(response => {
if (response.code === 20000) {
this.imgList = response.data;

@ -584,6 +584,10 @@ export default {
}
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
this.imgList = [];
if (row.filePath.toLowerCase().slice(-5).includes(".pdf")) {
window.open(this.certFileUrl + row.filePath.replace(",", ""));
return
}
previewImage({imageUrl: row.inspectImage, certFileUrl: this.certFileUrl}).then(response => {
if (response.code === 20000) {
this.imgList = response.data;

@ -691,6 +691,10 @@ export default {
}
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
this.imgList = [];
if (row.filePath.toLowerCase().slice(-5).includes(".pdf")) {
window.open(this.certFileUrl + row.filePath.replace(",", ""));
return
}
previewImage({imageUrl: row.inspectImage, certFileUrl: this.certFileUrl}).then(response => {
if (response.code === 20000) {
this.imgList = response.data;

@ -461,6 +461,10 @@ export default {
}
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
this.imgList = [];
if (row.filePath.toLowerCase().slice(-5).includes(".pdf")) {
window.open(this.certFileUrl + row.filePath.replace(",", ""));
return
}
previewImage({imageUrl: row.inspectImage, certFileUrl: this.certFileUrl}).then(response => {
if (response.code === 20000) {
this.imgList = response.data;

@ -547,6 +547,12 @@ export default {
// let newWindow = window.open();
// newWindow.document.write(row.filePath)
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
if (row.filePath.toLowerCase().slice(-5).includes(".pdf")) {
window.open(this.certFileUrl + row.filePath.replace(",", ""));
return
}
this.imgList = [];
previewImage({imageUrl: row.filePath, certFileUrl: this.certFileUrl}).then(response => {
if (response.code === 20000) {

Loading…
Cancel
Save