index.html
8.8 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
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>坝体渗水预警</title>
<script src="/run/jquery.js"></script>
<link rel="stylesheet" type="text/css" href="/run/css/bootstrap-reset.css"/>
<link rel="stylesheet" type="text/css" href="/run/css/bootstrap.css"/>
<link rel="stylesheet" type="text/css" href="/run/css/default-theme.css"/>
<link rel="stylesheet" type="text/css" href="/run/css/font-awesome.css"/>
<link rel="stylesheet" type="text/css" href="/run/css/style.css"/>
<link rel="stylesheet" type="text/css" href="/run/css/style-responsive.css"/>
<!-- 新增table样式 -->
<link rel="stylesheet" type="text/css" href="/run/css/add_public.css"/>
<link rel="stylesheet" type="text/css" href="/run/css/other.css"/>
</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="home.html">主页</a></li>
<li class="active">坝体渗水预警</li>
</ol>
<div class="pull-right breadcrumbtn"> </div>
</div>
<!-- 当前位置 -->
<div class="wrapper" id="task">
<section class="panel">
<header class="panel-heading head-border topbox">
<div class="getint">
<!--<a href="jyl.html" class="btn btn-success ad_fix" data-toggle="modal" data-target="#mymodal-data">新增</a>-->
</div>
<div class="searchs" >
<form action="/run/water/search" method="" form_wid>
<input type="search" name="id" required="" placeholder="请输入预警id" lang="zh-CN">
<button class="btn btn-success ad_fix" >查询</button>
</form>
</div>
</header>
<div class="panel-body">
<div class="listall yjgl sblx tree totrees ad_wid" style="">
<ul>
<li class="header" style="display:flex">
<span>id</span>
<span>预警值</span>
<span>超出值</span>
<span>水库</span>
<span>创建时间</span>
<span>操作</span>
</li>
{foreach $res as $vo}
<li class="ad_lb" style="display:flex">
<span>{$vo.id}</span>
<span>{$vo.warning}</span>
<span>{$vo.beyond}</span>
<span>{$vo.name}</span>
<span>{:date('Y-m-d',$vo['createtime'])}</span>
<span class="editor edit">
<a href="" data-target="#mymodal-data" data-toggle="modal" onclick="taskf({$vo.reservoir_id})">派送</a>
<a href="" ><b class="del del_1" onclick="del({$vo.id})">删除</b></a>
</span>
</li>
{/foreach}
</ul>
</div>
<div class="page clearfix font" id="pagination">
<div class="pull-left num">共 {$paging} 页</div>
<!-- <div class="pull-right"> -->
<nav aria-label="..." class="pull-left">
<ul class="pagination" >
<li class="disabled"><a href="#" aria-label="Previous"><span
aria-hidden="true">«</span></a></li>
{for start="1" end="$paging+1"}
<li class="on"><a href="?page={$i}" onclick="add()">{$i}</a></li>
{/for}
<li>
<a href="#" aria-label="Next"><span aria-hidden="true">»</span></a></li>
</ul>
</nav>
<!-- </div> -->
</div>
</div>
<!-- 推送 -->
<div div class="modal right fade" id="mymodal-data" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
<div class="wrapper box">
<section class="panel">
<div class="wrapper">
<section class="panel add">
<header class="panel-heading head-border ">派送</header>
<div class="panel-body box_add">
<ul class="row row2">
<li class="col-xs-12">
<div class="form1">
<ul class="row">
<li class="col-xs-12"><span><b style="color: #F05C9E;">*</b>员工:</span>
<select name="" id="user" class="form-control">
</select>
<!--<input type="text" class="form-control" placeholder="请输入员工id">-->
</li>
<li class="col-xs-12"><span><b style="color: #F05C9E;">*</b>任务标题:</span>
<input type="text" class="form-control" placeholder="" value="坝体渗水预警" id="tle">
</li>
<li class="col-xs-12"><span><b style="color: #F05C9E;">*</b>开始时间:</span>
<input type="date" class="form-control" placeholder="" id="statime">
</li>
<li class="col-xs-12"><span><b style="color: #F05C9E;">*</b>结束时间:</span>
<input type="date" class="form-control" placeholder="" id="endtime">
</li>
</ul>
<ul class="row">
</ul>
</div>
</li>
<li class="col-xs-12">
<div class="form1">
<ul class="row">
<li class="col-xs-12"> <span>任务描述:</span>
<textarea class="form-control" style="min-height: 200px;" id="desc"></textarea>
</li>
</ul>
</div>
</li>
</ul>
</div>
</section>
</div>
<div class="btn" style="width: 100%;">
<a href="" class="btn ad_del">取消</a>
<a href="javascript:;" class="btn ad_save" onclick="save()">保存</a>
</div>
</section>
</div>
</div>
</section>
</div>
</div>
</section>
<style type="text/css">
.box{
background-color: #fff;
height: 100%;
width: 600px;
position: absolute;
right: 0;
border-radius: 8px;
}
</style>
<script type="text/javascript">
$(function(){
$(".btn").click(function(){
$("#mymodal").modal("toggle");
});
});
</script>
<script>
function del(ids){
res=confirm("确定删除该条记录吗?");
if(res==true){
$.get('/run/Water/del?id='+ids,{},
function(status){
alert(status);
});
}
}
</script>
<script>
$(document).ready(function(){
$(".pagination li").each(function(){
$(this).click(function(){
$(".pagination .on").removeClass("on");
$(this).addClass("on");
});
});
// $(function () {
// $('.pagination a').each(function () {
// if ($($(this))[0].href == String(window.location))
// $(this).addClass('on').attr('href', 'javascript:void(0);');
// });
// });
</script>
<script>
$(function () {
$('#pagination a').each(function () {
if ($($(this))[0].href == String(window.location))
$(this).addClass('on').attr('href', 'javascript:void(0);');
});
});
</script>
<style type="text/css" media="all">
.pagination .on{
background: #00559E ;
color: #fff;
}
input[type=date]::-webkit-calendar-picker-indicator{
position: absolute;
right: 20px;
padding-left: calc(100% - 20px);
}
.form1>ul>li>span{
width: 78px;
}
</style>
<script src="/run/js/bootstrap.js"></script>
<script src="/run/js/echarts.min.js"></script>
<script src="/run/js/scripts.js"></script>
<script src="/run/laydate/laydate.js"></script>
// 任务发布
<script>
function taskf(ids){
// 获取员工数据
$.get('/api/inspection/task/add/ids/'+ids,function(data){
staff = data.data
//console.log(staff)
$(staff).each(function(){
options = '<option value="' + this.user_id + '" >' + this.staff_name + '</option>';
$('#user').append(options)
// console.log(options)
})
});
}
function save(){
$.post('/api/inspection/task/add',
{user_id:$("#user option:selected").val(),
title:$("#tle").val(),
statime:$("#statime").val(),
endtime:$("#endtime").val(),
desc:$("#desc").val()
},
function(res){
console.log(res)
alert(res.msg)
},"json");
}
</script>
</body>
</html>