Commit de7623d4 authored by scwang18's avatar scwang18
Browse files

增加附件中文名支持

增加一个直接到top层弹出窗口的函数。
parent b6ad5cb4
......@@ -3,6 +3,7 @@ package com.ibeetl.admin.core.web;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URLEncoder;
import javax.servlet.http.HttpServletResponse;
......@@ -59,7 +60,7 @@ public class FileSystemContorller {
@GetMapping(MODEL + "/download/{fileId}/{batchFileUUID}/{name}")
public ModelAndView download(HttpServletResponse response,@PathVariable Long fileId,@PathVariable String batchFileUUID ) throws IOException {
FileItem item = fileService.getFileItemById(fileId,batchFileUUID);
response.setHeader("Content-Disposition", "attachment; filename="+item.getName());
response.setHeader("Content-Disposition", "attachment; filename="+URLEncoder.encode(item.getName(),"UTF-8"));
item.copy(response.getOutputStream());
return null;
}
......
......@@ -78,6 +78,16 @@ var Common = {
});
layer.full(index);
},
topOpenDlg:function(url,title){
var index = top.layer.open({
type: 2,
content: Common.ctxPath+url,
title: title,
area:['100%', '100%'],
maxmin: false
});
layer.full(index);
},
openConfirm:function(content,callback,callBackNo){
var index = layer.confirm(content, {
btn: ['确认','取消'] //按钮
......
Supports Markdown
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