myapp_evenfuture 0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/Dockerfile +7 -0
- package/app.js +58 -0
- package/bin/www +91 -0
- package/package.json +20 -0
- package/public/css/layui.css +1 -0
- package/public/css/lizhi.webp +0 -0
- package/public/css/modules/code.css +1 -0
- package/public/css/modules/laydate/default/laydate.css +1 -0
- package/public/css/modules/layer/default/icon-ext.png +0 -0
- package/public/css/modules/layer/default/icon.png +0 -0
- package/public/css/modules/layer/default/layer.css +1 -0
- package/public/css/modules/layer/default/loading-0.gif +0 -0
- package/public/css/modules/layer/default/loading-1.gif +0 -0
- package/public/css/modules/layer/default/loading-2.gif +0 -0
- package/public/font/iconfont.eot +0 -0
- package/public/font/iconfont.svg +554 -0
- package/public/font/iconfont.ttf +0 -0
- package/public/font/iconfont.woff +0 -0
- package/public/font/iconfont.woff2 +0 -0
- package/public/layui.js +5 -0
- package/public/stylesheets/style.css +8 -0
- package/routes/api.js +505 -0
- package/routes/datatime.js +17 -0
- package/routes/db.js +158 -0
- package/routes/index.js +28 -0
- package/routes/nppBackup/sql.js.2024-07-08_082213.bak +25 -0
- package/routes/nppBackup/sql.js.2024-07-08_082214.bak +25 -0
- package/routes/sql.js +25 -0
- package/routes/switch.js +28 -0
- package/routes/switch1.js +12 -0
- package/views/addstu.ejs +276 -0
- package/views/error.ejs +4 -0
- package/views/hisinfo.ejs +301 -0
- package/views/hisinfo1.ejs +301 -0
- package/views/login.ejs +203 -0
- package/views/modroom.ejs +405 -0
- package/views/modstu.ejs +327 -0
- package/views/rtinfo.ejs +234 -0
- package/views/rtinfo1.ejs +234 -0
@@ -0,0 +1,234 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
|
4
|
+
<head>
|
5
|
+
<meta charset="utf-8">
|
6
|
+
<title>签到管理系统</title>
|
7
|
+
<meta name="renderer" content="webkit">
|
8
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
9
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
10
|
+
<link href="/css/layui.css" rel="stylesheet">
|
11
|
+
</head>
|
12
|
+
|
13
|
+
<body>
|
14
|
+
<div class="layui-layout layui-layout-admin">
|
15
|
+
<div class="layui-header">
|
16
|
+
<div class="layui-logo layui-hide-xs " style="background-color:rgb(146, 151, 209);color:black ">签到管理系统</div>
|
17
|
+
|
18
|
+
<ul class="layui-nav layui-layout-right">
|
19
|
+
<li class="layui-nav-item layui-hide layui-show-sm-inline-block">
|
20
|
+
<a href="javascript:;">
|
21
|
+
<img src="/css/lizhi.webp" class="layui-nav-img">
|
22
|
+
<!-- tester -->
|
23
|
+
</a>
|
24
|
+
<dl class="layui-nav-child">
|
25
|
+
<dd><a href="/">退出登录</a></dd>
|
26
|
+
</dl>
|
27
|
+
</li>
|
28
|
+
<li class="layui-nav-item" lay-header-event="menuRight" lay-unselect>
|
29
|
+
<a href="javascript:;">
|
30
|
+
<i class="layui-icon layui-icon-more-vertical"></i>
|
31
|
+
</a>
|
32
|
+
</li>
|
33
|
+
</ul>
|
34
|
+
</div>
|
35
|
+
|
36
|
+
<div class="layui-side " style="background-color:rgb(146, 151, 209) ">
|
37
|
+
<div class="layui-side-scroll">
|
38
|
+
<!-- 左侧导航区域(可配合layui已有的垂直导航) -->
|
39
|
+
|
40
|
+
<ul class="layui-nav layui-nav-tree" lay-filter="test" style="background-color:rgb(146, 151, 209) ">
|
41
|
+
<!-- Swipe -->
|
42
|
+
<li class="layui-nav-item "><a href="/switch1" style="color:rgb(0, 0, 0)">实时签到信息</a></li>
|
43
|
+
<!-- 实时签到信息只统计当天的 -->
|
44
|
+
<li class="layui-nav-item"><a href="switch1/hisinfo1" style="color:rgb(0, 0, 0)">历史签到信息</a></li>
|
45
|
+
|
46
|
+
<!-- <li class="layui-nav-item "><a href="switch/modstu" style="color:rgb(0, 0, 0)">用户管理</a></li>
|
47
|
+
<li class="layui-nav-item " ><a href="switch/modroom" style = "color: black;">房间管理</a></li> -->
|
48
|
+
</ul>
|
49
|
+
|
50
|
+
</div>
|
51
|
+
</div>
|
52
|
+
|
53
|
+
<div class="layui-body" style="height: 100%">
|
54
|
+
<form class="layui-form" action="" id="timesearch_form" name="timesearch_form">
|
55
|
+
<div class="layui-form-item">
|
56
|
+
<div class="layui-inline" style="margin-top: 25px;">
|
57
|
+
<label class="layui-form-label" style="white-space: nowrap">签到截止时间</label>
|
58
|
+
<div class="layui-input-inline" style="width: 300px;">
|
59
|
+
<input type="text" class="layui-input" id="qdtime">
|
60
|
+
</div>
|
61
|
+
</div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<table class="layui-table" id="record" lay-filter="demot1">
|
65
|
+
</table>
|
66
|
+
</form>
|
67
|
+
</div>
|
68
|
+
|
69
|
+
<div class="layui-footer">
|
70
|
+
学习是一种信仰。
|
71
|
+
</div>
|
72
|
+
</div>
|
73
|
+
|
74
|
+
<script src="/layui.js"></script>
|
75
|
+
<script src="https://cdn.bootcss.com/blueimp-md5/2.10.0/js/md5.js"></script>
|
76
|
+
|
77
|
+
<script>
|
78
|
+
//JS
|
79
|
+
layui.use(['element', 'layer', 'util', 'table', 'laydate'], function () {
|
80
|
+
var element = layui.element;
|
81
|
+
var layer = layui.layer;
|
82
|
+
var util = layui.util;
|
83
|
+
var table = layui.table;
|
84
|
+
var laydate = layui.laydate;
|
85
|
+
var $ = layui.$;
|
86
|
+
|
87
|
+
$(function () {
|
88
|
+
if ((sessionStorage.getItem("qdtime") == null)){
|
89
|
+
$("#record").hide();
|
90
|
+
}
|
91
|
+
else{
|
92
|
+
$("#record").show();
|
93
|
+
}
|
94
|
+
$('#qdtime').val(sessionStorage.getItem("qdtime"));
|
95
|
+
});
|
96
|
+
|
97
|
+
laydate.render({
|
98
|
+
elem: '#qdtime'
|
99
|
+
, type: 'time'
|
100
|
+
, done: function (value, date) {
|
101
|
+
sessionStorage.setItem("qdtime", value);
|
102
|
+
$.ajaxSetup({
|
103
|
+
data: {
|
104
|
+
sign: 0
|
105
|
+
}
|
106
|
+
});
|
107
|
+
$.ajax({
|
108
|
+
type: 'post',
|
109
|
+
url: '/api/timesearchrt',
|
110
|
+
data: {
|
111
|
+
time_h: ("0" + date.hours).slice(-2),
|
112
|
+
time_m: ("0" + date.minutes).slice(-2),
|
113
|
+
time_s: ("0" + date.seconds).slice(-2),
|
114
|
+
et: ("0" + date.hours).slice(-2) + ':' + ("0" + date.minutes).slice(-2) + ':' + ("0" + date.seconds).slice(-2),
|
115
|
+
sign: 2
|
116
|
+
},
|
117
|
+
success: function (data) {
|
118
|
+
layer.msg('签到截止时间 ' + sessionStorage.getItem("qdtime") + ' 设置成功!');
|
119
|
+
top.location.href = '/';
|
120
|
+
top.location.reload();
|
121
|
+
}
|
122
|
+
});
|
123
|
+
}
|
124
|
+
});
|
125
|
+
|
126
|
+
//头部事件
|
127
|
+
util.event('lay-header-event', {
|
128
|
+
menuLeft: function (othis) { // 左侧菜单事件
|
129
|
+
layer.msg('展开左侧菜单的操作', { icon: 0 });
|
130
|
+
},
|
131
|
+
menuRight: function () { // 右侧菜单事件
|
132
|
+
layer.open({
|
133
|
+
type: 1,
|
134
|
+
title: '作者',
|
135
|
+
content: '<div style="padding: 15px;">信息工程学院<br/>祝乙文,姜莱</div>',
|
136
|
+
area: ['150px', '100%'],
|
137
|
+
offset: 'rt', // 右上角
|
138
|
+
anim: 'slideLeft', // 从右侧抽屉滑出
|
139
|
+
shadeClose: true,
|
140
|
+
scrollbar: false
|
141
|
+
});
|
142
|
+
}
|
143
|
+
});
|
144
|
+
|
145
|
+
table.render({
|
146
|
+
elem: '#record',
|
147
|
+
url: '/api/recordlistrt',
|
148
|
+
toolbar: true,
|
149
|
+
title: '签到记录',
|
150
|
+
totalRow: true,
|
151
|
+
page: true,
|
152
|
+
id: 'abc',
|
153
|
+
limit: 10,
|
154
|
+
limits: [5, 10, 20, 30],
|
155
|
+
initSort: {
|
156
|
+
field: 'time',
|
157
|
+
type: 'desc'
|
158
|
+
},
|
159
|
+
parseData: function (res) { //res 即为原始返回的数据
|
160
|
+
var current_pages;
|
161
|
+
if (this.page === true) current_pages = 1;
|
162
|
+
else current_pages = this.page.curr;
|
163
|
+
var data = res.data.slice(this.limit * (current_pages - 1), this.limit * current_pages);
|
164
|
+
return {
|
165
|
+
"code": res.code,
|
166
|
+
"msg": res.msg,
|
167
|
+
"count": res.data.length,
|
168
|
+
"data": data
|
169
|
+
}
|
170
|
+
},
|
171
|
+
sort: true,
|
172
|
+
cols: [
|
173
|
+
[{
|
174
|
+
field: 'stuid',
|
175
|
+
title: '学号',
|
176
|
+
width: 200,
|
177
|
+
sort: true
|
178
|
+
}, {
|
179
|
+
field: 'name',
|
180
|
+
title: '姓名',
|
181
|
+
width: 200
|
182
|
+
}, {
|
183
|
+
field: 'type',
|
184
|
+
title: '类型',
|
185
|
+
width: 200,
|
186
|
+
sort: true
|
187
|
+
}, {
|
188
|
+
field: 'room',
|
189
|
+
title: '教室',
|
190
|
+
width: 200
|
191
|
+
}, {
|
192
|
+
field: 'time',
|
193
|
+
title: '签到时间',
|
194
|
+
sort: true,
|
195
|
+
}]
|
196
|
+
]
|
197
|
+
});
|
198
|
+
|
199
|
+
setInterval(function myrefresh() {
|
200
|
+
$.ajax({
|
201
|
+
url: '/api/check',
|
202
|
+
method: 'get',
|
203
|
+
data: {},
|
204
|
+
success: function (data) {
|
205
|
+
if (data.flag1 == 0) {
|
206
|
+
sessionStorage.setItem("qdtime", "");
|
207
|
+
sessionStorage.setItem("timerange", "");
|
208
|
+
sessionStorage.setItem("username", "");
|
209
|
+
}
|
210
|
+
if (data.flag == 1) {
|
211
|
+
// table.reload('/');
|
212
|
+
top.location.href = '/';
|
213
|
+
top.location.reload();
|
214
|
+
layer.msg(data.id + ' 签到成功!');
|
215
|
+
}
|
216
|
+
else if (data.flag == 2) {
|
217
|
+
// table.reload('/');
|
218
|
+
top.location.href = '/';
|
219
|
+
top.location.reload();
|
220
|
+
layer.msg(data.id + ' 重复刷卡!');
|
221
|
+
}
|
222
|
+
},
|
223
|
+
error: function (data) {
|
224
|
+
alert("调用失败!");
|
225
|
+
}
|
226
|
+
});
|
227
|
+
}, 1000);
|
228
|
+
|
229
|
+
});
|
230
|
+
</script>
|
231
|
+
|
232
|
+
</body>
|
233
|
+
|
234
|
+
</html>
|