mailbox.html
4.81 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head th:include="include :: header">
<meta charset="UTF-8">
</head>
<body class="gray-bg">
<div class="col-sm-3" style="height: 100%;">
<div class="select-info" style="height: 100%;">
<img class="img-circle" th:src="@{/favicon.ico}"/>
<hr style="border-top:1px solid #C2C2C2;">
<div class="col-sm-8">
<h3><strong>[[${user.loginName}]]</strong></h3>
<!-- <p><i class="fa fa-user"></i> [[${user.userName}]] / [[${#strings.defaultString(roleGroup,'无角色')}]]-->
<!-- <p><i class="fa fa-phone"></i> [[${user.phoneNumber}]]</p>-->
<!-- <p><i class="fa fa-group"></i> [[${user.dept.deptName}]] / [[${#strings.defaultString(postGroup,'无岗位')}]]</p>-->
<!-- <p><i class="fa fa-transgender"></i> 性别:[[${user.sex}]]</p>-->
<!-- <p><i class="fa fa-envelope-o"></i> [[${user.email}]]</p>-->
<!-- <p><i class="fa fa-calendar"></i> [[${#dates.format(user.createTime, 'yyyy-MM-dd HH:mm:ss')}]]</p>-->
</div>
</div>
</div>
<div class="col-sm-9" style="height: 100%">
<div class="select-info">
<ul id="myTab" class="nav nav-tabs">
<li class="active"><a href="#tabAll" data-toggle="tab">全部</a></li>
<li ><a href="#tabNotRead" data-toggle="tab">未读</a></li>
<li ><a href="#tabHavenRead" data-toggle="tab">已读</a></li>
</ul>
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade in active" id="tabAll">
<table class="table-bordered" id="bootstrap-table" data-mobile-responsive="true"></table>
</div>
<div class="tab-pane fade" id="tabNotRead">
<table class="table-bordered" id="bootstrap-table1" data-mobile-responsive="true"></table>
</div>
<div class="tab-pane fade" id="tabHavenRead">
<table class="table-bordered" id="bootstrap-table2" data-mobile-responsive="true"></table>
</div>
</div>
</div>
</div>
<div th:include="include :: footer"></div>
</body>
<script th:inline="javascript">
var prefix = ctx + "system/notice"
$(function() {
var options = {
url: prefix + "/list",
method:"get",
modalName: "消息表-全部",
sidePagination:"server",
search: false,
pageSize: 10,
columns: [
{
field : 'content',
title : '消息',
width:80
},
{
field : 'created',
title : '时间',
width:20
}
]
};
$.table.init(options);
});
$("#bootstrap-table1").bootstrapTable({
url: prefix + "/list",
method:"get",
iconSize: "outline",
queryParams:{status:0},
showRefresh: true, //刷新
showToggle: true, //视图切换
showColumns: true, //列选择
modalName: "消息表-未读",
sidePagination:"server",
responseHandler:responseHandler,
search: false,
pageList: [10, 25, 50, 100],
pageNumber: 1,
pageSize: 10,
columns: [
{
field : 'content',
title : '消息',
width:80
},
{
field : 'created',
title : '时间',
width:20
}
]
})
$("#bootstrap-table2").bootstrapTable({
url: prefix + "/list",
method:"get",
iconSize: "outline",
showRefresh: true, //刷新
showToggle: true, //视图切换
showColumns: true, //列选择
queryParams: function (params) {
console.log(params)
return {
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
status:1
};
},
modalName: "消息表-已读",
pagination: true,
sidePagination:"server",
responseHandler:responseHandler,
search: false,
pageList: [10, 25, 50, 100],
pageNumber: 1,
pageSize: 10,
columns: [
{
field : 'content',
title : '消息',
width:80
},
{
field : 'created',
title : '时间',
width:20
}
]
})
function responseHandler(res) {
if (res.code == 200) {
return {rows: res.data, total: res.total, code: 0};
} else {
$.modal.alertWarning(res.msg);
return {rows: [], total: 0};
}
}
</script>
</html>