diff --git a/src/main/java/cn/stylefeng/guns/modular/file/controller/FileViewController.java b/src/main/java/cn/stylefeng/guns/modular/file/controller/FileViewController.java index ae47c352..3c6f0507 100644 --- a/src/main/java/cn/stylefeng/guns/modular/file/controller/FileViewController.java +++ b/src/main/java/cn/stylefeng/guns/modular/file/controller/FileViewController.java @@ -15,10 +15,31 @@ import org.springframework.stereotype.Controller; @ApiResource(name = "文件管理界面") public class FileViewController { - @GetResource(name = "菜单管理首页", path = "/view/file") + + + /** + * 文件管理首页 + * + * @author lgq + * @date 2021/1/9 + */ + @GetResource(name = "文件管理首页", path = "/view/file") public String fileIndex() { return "/modular/system/fileInfo/file_info.html"; } + + /** + * 文件详情页面 + * + * @author lgq + * @date 2021/1/12 下午11:11 + */ + @GetResource(name = "文件详情页面", path = "/view/fileInfoDetails") + public String details(){ + + return "/modular/system/fileInfo/file_info_details.html"; + } + } diff --git a/src/main/webapp/assets/modular/system/fileInfo/file_info.js b/src/main/webapp/assets/modular/system/fileInfo/file_info.js index 664c359b..27373843 100644 --- a/src/main/webapp/assets/modular/system/fileInfo/file_info.js +++ b/src/main/webapp/assets/modular/system/fileInfo/file_info.js @@ -66,12 +66,12 @@ layui.use(['table', 'form', 'func', 'HttpRequest', 'util', 'upload'], function ( - // 点击编辑 - FileInfo.openEditDlg = function (data) { + // 点击详情 + FileInfo.openDetails = function (data) { func.open({ height: 800, - title: '修改职位', - content: Feng.ctxPath + '/position/editView?positionId=' + data.positionId, + title: '详情', + content: Feng.ctxPath + '/view/fileInfoDetails?fileId=' + data.fileId, tableId: FileInfo.tableId }); }; @@ -121,8 +121,6 @@ layui.use(['table', 'form', 'func', 'HttpRequest', 'util', 'upload'], function ( // }); // - var imgUrl = Feng.ctxPath + '/sysFileInfo/previewByObjectName?fileBucket=' + data.fileBucket + '&fileObjectName=' + data.fileObjectName; - layer.open({ type: 2, title: false, @@ -161,8 +159,8 @@ layui.use(['table', 'form', 'func', 'HttpRequest', 'util', 'upload'], function ( table.on('tool(' + FileInfo.tableId + ')', function (obj) { var data = obj.data; var event = obj.event; - if (event === 'edit') { - FileInfo.openEditDlg(data); + if (event === 'details') { + FileInfo.openDetails(data); } else if (event === 'delete') { FileInfo.onDeleteFile(data); }else if (event === 'download'){ diff --git a/src/main/webapp/assets/modular/system/fileInfo/file_info_details.js b/src/main/webapp/assets/modular/system/fileInfo/file_info_details.js new file mode 100644 index 00000000..e79493b4 --- /dev/null +++ b/src/main/webapp/assets/modular/system/fileInfo/file_info_details.js @@ -0,0 +1,14 @@ +layui.use(['layer', 'form', 'admin', 'HttpRequest'], function () { + var $ = layui.$; + var form = layui.form; + var HttpRequest = layui.HttpRequest; + + + + //获取详情信息,填充表单 + var httpRequest = new HttpRequest(Feng.ctxPath + "/sysFileInfo/detail?fileId=" + Feng.getUrlParam("fileId"),'get'); + var result = httpRequest.start(); + form.val("fileInfoForm", result.data); + + +}); diff --git a/src/main/webapp/pages/modular/system/fileInfo/file_info_details.html b/src/main/webapp/pages/modular/system/fileInfo/file_info_details.html new file mode 100644 index 00000000..f723476a --- /dev/null +++ b/src/main/webapp/pages/modular/system/fileInfo/file_info_details.html @@ -0,0 +1,83 @@ +@layout("/layout/_form.html",{js:["/assets/modular/system/fileInfo/file_info_details.js"]}){ + +
+
+
+
基本信息
+
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ + +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+
+
+ + +
+
+ +@}