detail.html
3.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('通知公告')" />
<th:block th:include="include :: summernote-css" />
<th:block th:include="include :: bootstrap-fileinput-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-memo-detail" th:object="${notice}">
<input id="noticeId" name="noticeId" th:field="*{noticeId}" type="hidden">
<div class="form-group">
<label class="col-sm-2 control-label">类型:</label>
<div class="col-sm-10">
<div class="form-control-static" th:text="${@dict.getLabel('sys_notice_type',notice.noticeType)}"></div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label is-required">标题:</label>
<div class="col-sm-10">
<div class="form-control-static" th:text="*{noticeTitle}"></div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label is-required">内容:</label>
<div class="col-sm-10">
<input id="noticeContent" name="noticeContent" th:field="*{noticeContent}" type="hidden">
<div id="editor" class="summernote"></div>
</div>
</div>
</form>
<div class="form-group" style="min-height: 20px;"></div>
<div class="row">
<div class="col-sm-10 table-striped col-sm-offset-1">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: summernote-js" />
<th:block th:include="include :: bootstrap-fileinput-js" />
<th:block th:include="include :: file-upload-parse" />
<script th:inline="javascript">
var prefix = ctx + "business/credit/notice";
$(function() {
$('.summernote').summernote({
height : 192,
lang : 'zh-CN',
followingToolbar: false,
dialogsInBody: true,
shortcuts: false,
disableDragAndDrop: true,
tabDisable: false,
toolbar:[]
});
var content = $("#noticeContent").val();
$('#editor').summernote('pasteHTML', content);
$('#editor').summernote('destroy');
});
$("#form-memo-detail").validate({
focusCleanup: true
});
$(function() {
var options = {
data: [[${notice.fileRespList}]],
sidePagination: "client",
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
pagination: false,
pageSize: 10,
columns: [
{
field : 'id',
title : '文件ID',
visible: false
},
{
field : 'fileName',
title : '文件名',
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="downloadCloud(\'' + row.filePath + '\')"><i class="fa fa-edit"></i>下载</a> ');
return actions.join('');
}
}]
};
$.table.init(options);
});
function downloadCloud(fileUrl) {
window.location.href = ctx + "business/common/oss/download?ossKey=" + encodeURI(fileUrl);
}
</script>
</body>
</html>