提交 3b96745f 编写于 作者: 小柒2012

修复点击目录的错误

上级 5b7b40a2
......@@ -8,4 +8,5 @@ public class SysFile {
private String name;
private Integer parentId;
private String parentPath;
private boolean directory;
}
......@@ -59,6 +59,7 @@ public class FileController {
sysFile.setFileId(num);
sysFile.setParentId(level);
if (file.isDirectory()) {
sysFile.setDirectory(true);
if(level==0){
if(file.getName().equals("templates")||
file.getName().equals("static")){
......@@ -75,6 +76,7 @@ public class FileController {
}
} else {
if(level!=0){
sysFile.setDirectory(false);
sysFile.setParentPath(parentPath+SystemConstant.SF_FILE_SEPARATOR+file.getName());
filePathList.add(sysFile);
num++;
......
......@@ -58,7 +58,9 @@ var setting = {
callback : {
onClick : function(event, treeId, treeNode) {
vm.filePath = treeNode.parentPath;
vm.getContent();
if(!treeNode.directory){
vm.getContent();
}
},
onExpand:function(event, treeId, treeNode){
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册