list.html
7.6 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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>{$str}推送记录</title>
<script src="/notify/js/jquery.js"></script>
<link href="/notify/css/font-awesome.css" rel="stylesheet">
<link href="/notify/css/bootstrap.css" rel="stylesheet">
<link href="/notify/css/style-responsive.css" rel="stylesheet">
<link href="/notify/css/default-theme.css" rel="stylesheet">
<link href="/notify/css/style.css" rel="stylesheet">
<link href="/notify/css/bootstrap-reset.css" rel="stylesheet">
<!-- 自增样式表 -->
<link rel="stylesheet" type="text/css" href="/notify/css/my-public.css" />
<!-- <link rel="stylesheet" href="css/mu-ban.css" type="text/css"> -->
<link rel="stylesheet" href="/layui/css/layui.css" media="all">
<script src="/layui/layui.js" charset="utf-8"></script>
</head>
<body class="sticky-header">
<!-- 头部 -->
<div id="head">{include file="common/_header"}</div>
<!-- 头部 -->
<section>
<!-- 导航 -->
<div class="sidebar-left">{include file="common/_leftnav"}</div>
<!-- 导航 -->
<div class="body-content">
<!-- 当前位置 -->
<div class="page-head clearfix">
<ol class="breadcrumb pull-left">
<li><a href="/notify/index"><i class="fa fa-home"></i>首页</a></li>
<!-- <li><a href="#">设备管理</a></li> -->
<li>{$str}推送记录</li>
</ol>
<div class="pull-right breadcrumbtn"> </div>
</div>
<!-- 当前位置 -->
<div class="wrapper " style="padding-top: 0; padding-left: 0;">
<ul class="row wrap_bg" style="background-color: #fff;">
<li class="col-xs-3 sblbs" style="border-right: 1px solid #eee;">
<!-- style="border-right: 1px solid #eee;" -->
<div class="zkdleft" style="display:none;">
<div class="search sblb">
<input class="form-control" placeholder="请输入类型名称">
<a href="#"><i class="fa fa-search"></i></a>
</div>
</div>
<h4 class="addtitle lxbot"> <i class="fa fa-ellipsis-v"></i>红河州</h4>
<div class="tree totrees">
<ul>
<li>
<span onclick="list();"><i class="fa fa-caret-down"></i>蒙自市</span>
<ul>
{volist name='list' id='item'}
<li onclick="list({$item.id},'');">
<span >{$item.name}</span><i class="fa fa-arrow-circle-right add_i"></i>
</li>
{/volist}
</ul>
</li>
<!-- <li>-->
<!-- <span><i class="fa fa-caret-down"></i>蒙自市</span>-->
<!-- <ul>-->
<!-- <li>-->
<!-- <span>五里冲水库</span> <a href=""></a>-->
<!-- </li>-->
<!-- <li>-->
<!-- <span>马鞍山水库</span> <a href=""></a>-->
<!-- </li>-->
<!-- <li>-->
<!-- <span>小新寨水库</span> <a href=""></a>-->
<!-- </li> -->
<!-- </ul>-->
<!-- </li> -->
<!--</ul>-->
</div>
</li>
<li class="col-xs-9 zkdright right_box">
<ul class="row zkdhead zk_border">
<li class="col-xs-12">
<div class="wrapper ">
<section class="panel panel_shadow">
<header class="panel-heading head-border topbox">
<div class="getint" style="display:none;">
<!-- <a href="" class="btn btn-success" data-toggle="modal" data-target="#mymodal-data" >新增</a> -->
<a href="#" class="btn btn-danger">批量删除</a>
<span class="tips">已选0项</span>
</div>
<div class="searchs">
<form action="" method="">
<!-- <input type="search" name="" required="" placeholder="选择区域" lang="zh-CN"> -->
<!-- <input type="search" name="" required="" placeholder="选择水库" lang="zh-CN"> -->
<select name="" id="" style="display:none;">
<option value="">选择模板类型</option>
<option value="">11</option>
<option value="">11</option>
</select>
<input type="search" id="content" placeholder="请输入内容"
lang="zh-CN">
<a href="javascript:;" id="search" class="btn btn-success">查询</a>
</form>
</div>
</header>
<div class="panel-body">
<div class="listall yjgl sblx tree totrees record">
<ul>
<li class="header">
<span>id</span>
<span>水库名称</span>
<span>内容</span>
<span>发送时间</span>
<span>接收人</span>
</li>
<div id='box'>
</div>
</ul>
</div>
</div>
</section>
</div>
</li>
</ul>
<div id='page'></div>
</li>
<li>
</li>
</ul>
<!-- 底部 -->
<div class="name">
<span>版权所有:云南腾亿融媒互联网有限公司</span>
</div>
</div>
</div>
</section>
<!-- 模态框 -->
<style type="text/css">
.codebox {
width: 50%;
margin: 10% auto;
background-color: #fff;
border-radius: 8px;
}
.codebox .panel-body {
width: 100%;
text-align: center;
}
</style>
<!-- 模态框 -->
<script src="/notify/js/bootstrap.js"></script>
<script src="/notify/js/echarts.min.js"></script>
<script src="/notify/js/scripts.js"></script>
<script src="/notify/laydate/laydate.js"></script>
<script>
list();
function list(r,sea, page = 1) {
var data = {
page: page,
type: '{$Think.get.type}',
sea:sea,
r:r,
};
$.ajax({
url: '/notify/index/list',
data: data,
type: 'POST',
async: false,
success: function(res) {
layui.use('laypage', function() {
var laypage = layui.laypage;
laypage.render({
elem: 'page',
count: res.total,
limit: 10,
curr:page,
jump: function(obj, first) {
if (!first) {
list(r,sea, obj.curr);
}
}
});
});
let html = '';
$.each(res.data, function(index, item) {
html += '<li class="lb"><span>'+item.id+'</span>';
html += '<span>'+item.name+'</span>';
html += '<span>'+item.content+'</span>';
html += '<span>'+totime(item.createtime)+'</span>';
html += '<span>'+item.user_name+'</span></li>';
});
$('#box').empty();
$('#box').html(html);
}
});
}
$('#search').click(function(){
let val = $('#content').val();
if(!val){
list();
}
list('',val);
});
function totime(nS) {
return new Date(parseInt(nS) * 1000).toLocaleString().replace(/:\d{1,2}$/, ' ');
}
</script>
<script>
lay('#version').html('-v' + laydate.v);
laydate.render({
elem: '#test1',
range: true,
theme: '#1890ff'
});
</script>
<script type="text/javascript">
$(function() {
$('.tree li:has(ul)').addClass('parent_li').find(' > span').attr('title', 'Collapse this branch');
$('.tree li.parent_li > span').on('click', function(e) {
var children = $(this).parent('li.parent_li').find(' > ul > li');
if (children.is(":visible")) {
children.hide('fast');
$(this).attr('title', 'Expand this branch').find(' > i').addClass('fa-caret-down')
.removeClass('fa-caret-up');
} else {
children.show('fast');
$(this).attr('title', 'Collapse this branch').find(' > i').addClass('fa-caret-down')
.removeClass('fa-caret-up');
}
e.stopPropagation();
});
});
</script>
</body>
</html>