【file】文件管理 文件详情

pull/65/head
小庆 4 years ago
parent aa943e3657
commit 0fb4a9e24c

@ -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";
}
}

@ -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'){

@ -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);
});

@ -0,0 +1,83 @@
@layout("/layout/_form.html",{js:["/assets/modular/system/fileInfo/file_info_details.js"]}){
<form class="layui-form" id="fileInfoForm" lay-filter="fileInfoForm">
<div class="layui-fluid" style="padding-bottom: 75px;">
<div class="layui-card">
<div class="layui-card-header">基本信息</div>
<div class="layui-card-body" style="padding: 10px 20%">
<div class="layui-form-item layui-row">
<div class="layui-inline layui-col-md12">
<label class="layui-form-label">文件存储位置</label>
<div class="layui-input-block">
<select name="fileLocation" disabled="disabled">
<option value="">存储位置</option>
<option value="4">本地</option>
<option value="1">阿里云</option>
<option value="2">腾讯云</option>
<option value="3">minio</option>
</select>
</div>
</div>
<div class="layui-inline layui-col-md12">
<label class="layui-form-label">文件仓库</label>
<div class="layui-input-block">
<input name="fileBucket" type="text" class="layui-input layui-disabled" autocomplete="off" />
</div>
</div>
<div class="layui-inline layui-col-md12">
<label class="layui-form-label">文件名称</label>
<div class="layui-input-block">
<input name="fileOriginName" type="text" class="layui-input layui-disabled" autocomplete="off" />
</div>
</div>
<div class="layui-inline layui-col-md12">
<label class="layui-form-label">是否为机密文件</label>
<div class="layui-input-block">
<input name="secretFlag" type="text" class="layui-input layui-disabled" autocomplete="off" />
</div>
</div>
<div class="layui-inline layui-col-md12">
<label class="layui-form-label">文件后缀</label>
<div class="layui-input-block">
<input name="fileSuffix" type="text" class="layui-input layui-disabled" autocomplete="off" />
</div>
</div>
<div class="layui-inline layui-col-md12">
<label class="layui-form-label">文件大小</label>
<div class="layui-input-block">
<input name="fileSizeKb" type="text" class="layui-input layui-disabled" autocomplete="off" />
</div>
</div>
<div class="layui-inline layui-col-md12">
<label class="layui-form-label">唯一标识</label>
<div class="layui-input-block">
<input name="fileObjectName" type="text" class="layui-input layui-disabled" autocomplete="off" />
</div>
</div>
<div class="layui-inline layui-col-md12">
<label class="layui-form-label">存储路径</label>
<div class="layui-input-block">
<input name="filePath" type="text" class="layui-input layui-disabled" autocomplete="off" />
</div>
</div>
</div>
</div>
</div>
</div>
<div class="form-group-bottom text-center">
<!-- <button class="layui-btn" lay-filter="btnSubmit" lay-submit>&emsp;提交&emsp;</button>-->
<button id="cancel" type="button" class="layui-btn layui-btn-primary" ew-event="closeDialog">&emsp;取消&emsp;</button>
</div>
</form>
@}
Loading…
Cancel
Save