* tif图片预览,根据反馈的意见,已经全部修改

This commit is contained in:
zhangzhen1979 2021-12-10 15:36:25 +08:00 committed by kl
parent d424de5e9a
commit 91f3348a2f
4 changed files with 14 additions and 14 deletions

View File

@ -14,7 +14,7 @@ public class FileAttribute {
private String url;
private String fileKey;
private String officePreviewType = ConfigConstants.getOfficePreviewType();
private String previewType;
private String tifPreviewType;
public FileAttribute() {
}
@ -34,13 +34,13 @@ public class FileAttribute {
this.officePreviewType = officePreviewType;
}
public FileAttribute(FileType type, String suffix, String name, String url, String officePreviewType, String previewType) {
public FileAttribute(FileType type, String suffix, String name, String url, String officePreviewType, String tifPreviewType) {
this.type = type;
this.suffix = suffix;
this.name = name;
this.url = url;
this.officePreviewType = officePreviewType;
this.previewType = previewType;
this.tifPreviewType = tifPreviewType;
}
public String getFileKey() {
@ -91,12 +91,12 @@ public class FileAttribute {
this.url = url;
}
public String getPreviewType() {
return previewType;
public String getTifPreviewType() {
return tifPreviewType;
}
public void setPreviewType(String previewType) {
this.previewType = previewType;
public void setTifPreviewType(String previewType) {
this.tifPreviewType = previewType;
}
}

View File

@ -285,9 +285,9 @@ public class FileHandlerService {
attribute.setFileKey(fileKey);
}
String previewType = req.getParameter("previewType");
if (StringUtils.hasText(previewType)) {
attribute.setPreviewType(previewType);
String tifPreviewType = req.getParameter("tifPreviewType");
if (StringUtils.hasText(tifPreviewType)) {
attribute.setTifPreviewType(tifPreviewType);
}
}
return attribute;

View File

@ -40,9 +40,9 @@ public class TiffFilePreviewImpl implements FilePreview {
@Override
public String filePreviewHandle(String url, Model model, FileAttribute fileAttribute) {
String tifPreviewType = ConfigConstants.getTifPreviewType();
String previewType = fileAttribute.getPreviewType();
if (StringUtils.hasText(previewType)) {
tifPreviewType = previewType;
String tifOnLinePreviewType = fileAttribute.getTifPreviewType();
if (StringUtils.hasText(tifOnLinePreviewType)) {
tifPreviewType = tifOnLinePreviewType;
}
if("tif".equalsIgnoreCase(tifPreviewType)){

View File

@ -37,7 +37,7 @@
}
function goForImage() {
var url = window.location.href + "&previewType=jpg"
var url = window.location.href + "&tifPreviewType=jpg"
if (url.indexOf("officePreviewType=pdf") != -1) {
url = url.replace("officePreviewType=pdf", "officePreviewType=image");
} else {