* tif图片预览,根据反馈的意见,已经全部修改
This commit is contained in:
parent
d424de5e9a
commit
91f3348a2f
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)){
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue