Merge remote-tracking branch 'origin/group7-file'

# Conflicts:
#	src/main/java/cn/stylefeng/guns/modular/file/FileViewController.java
pull/65/head
fengshuonan 4 years ago
commit b3006272bc

@ -1,4 +1,4 @@
package cn.stylefeng.guns.modular.file;
package cn.stylefeng.guns.modular.file.controller;
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
@ -7,15 +7,16 @@ import org.springframework.stereotype.Controller;
/**
*
*
* @author lgq
* @date 2021/1/9
* @author : lgq
* @date : 2021/1/9
*/
@Controller
@Slf4j
@ApiResource(name = "文件管理界面")
public class FileViewController {
/**
*
*
@ -27,4 +28,18 @@ public class FileViewController {
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
});
};
@ -106,31 +106,10 @@ layui.use(['table', 'form', 'func', 'HttpRequest', 'util', 'upload'], function (
FileInfo.openPreview = function (data) {
var imgUrl = Feng.ctxPath + '/sysFileInfo/previewByObjectName?fileBucket=' + data.fileBucket + '&fileObjectName=' + data.fileObjectName;
// layer.open({
// type: 1,
// title: false,
// closeBtn: 0,
// skin: 'layui-layer-nobg', //没有背景色
// shadeClose: true,
// content: '<div >' +
// '<img src="' +
// Feng.ctxPath + '/sysFileInfo/previewByObjectName?fileBucket=' + data.fileBucket + '&fileObjectName=' + data.fileObjectName+
// '" style="max-width: 100%;">' +
// '</div> '
// // content: Feng.ctxPath + '/sysFileInfo/previewByObjectName?fileBucket=' + data.fileBucket + '&fileObjectName=' + data.fileObjectName,
// });
//
var imgUrl = Feng.ctxPath + '/sysFileInfo/previewByObjectName?fileBucket=' + data.fileBucket + '&fileObjectName=' + data.fileObjectName;
layer.open({
type: 2,
title: false,
closeBtn: 0,
area: ['500px', '300px'],
shadeClose: true,
content: imgUrl
})
layer.photos({
photos: { "data": [{"src": imgUrl}] }
,anim: 0
});
@ -161,8 +140,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