|
|
@@ -31,22 +31,25 @@ $(function() {
|
|
31
|
31
|
|
|
32
|
32
|
// 过滤时间
|
|
33
|
33
|
$('#filterTime').daterangepicker({
|
|
34
|
|
- timePicker: true, //是否显示小时和分钟
|
|
35
|
|
- timePickerIncrement: 10, //时间的增量,单位为分钟
|
|
36
|
|
- timePicker12Hour : false, //是否使用12小时制来显示时间
|
|
37
|
|
- format: 'YYYY-MM-DD HH:mm:ss',
|
|
38
|
|
- separator : ' - ',
|
|
|
34
|
+ autoApply:false,
|
|
|
35
|
+ singleDatePicker:false,
|
|
|
36
|
+ showDropdowns:false, // 是否显示年月选择条件
|
|
|
37
|
+ timePicker: true, // 是否显示小时和分钟选择条件
|
|
|
38
|
+ timePickerIncrement: 10, // 时间的增量,单位为分钟
|
|
|
39
|
+ timePicker24Hour : true,
|
|
|
40
|
+ opens : 'left', //日期选择框的弹出位置
|
|
39
|
41
|
ranges: {
|
|
40
|
42
|
'最近1小时': [moment().subtract(1, 'hours'), moment()],
|
|
41
|
|
- '今日': [moment(), moment()],
|
|
42
|
|
- '昨日': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
|
|
|
43
|
+ '今日': [moment().startOf('day'), moment().endOf('day')],
|
|
|
44
|
+ '昨日': [moment().subtract(1, 'days').startOf('day'), moment().subtract(1, 'days').endOf('day')],
|
|
43
|
45
|
'最近7日': [moment().subtract(6, 'days'), moment()],
|
|
44
|
46
|
'最近30日': [moment().subtract(29, 'days'), moment()],
|
|
45
|
47
|
'本月': [moment().startOf('month'), moment().endOf('month')],
|
|
46
|
48
|
'上个月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
|
|
47
|
49
|
},
|
|
48
|
|
- opens : 'left', //日期选择框的弹出位置
|
|
49
|
50
|
locale : {
|
|
|
51
|
+ format: 'YYYY-MM-DD HH:mm:ss',
|
|
|
52
|
+ separator : ' - ',
|
|
50
|
53
|
customRangeLabel : '自定义',
|
|
51
|
54
|
applyLabel : '确定',
|
|
52
|
55
|
cancelLabel : '取消',
|
|
|
@@ -54,11 +57,12 @@ $(function() {
|
|
54
|
57
|
toLabel : '结束时间',
|
|
55
|
58
|
daysOfWeek : [ '日', '一', '二', '三', '四', '五', '六' ],
|
|
56
|
59
|
monthNames : [ '一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月' ],
|
|
57
|
|
- firstDay : 1
|
|
|
60
|
+ firstDay : 1,
|
|
|
61
|
+ startDate: moment().startOf('day'),
|
|
|
62
|
+ endDate: moment().endOf('day')
|
|
58
|
63
|
}
|
|
59
|
64
|
});
|
|
60
|
|
- $('#filterTime').val( moment(new Date()).format("YYYY-MM-DD 00:00:00") + ' - ' + moment(new Date()).add(1, 'days').format("YYYY-MM-DD 00:00:00") ); // YYYY-MM-DD HH:mm:ss
|
|
61
|
|
-
|
|
|
65
|
+
|
|
62
|
66
|
// init date tables
|
|
63
|
67
|
var logTable = $("#joblog_list").dataTable({
|
|
64
|
68
|
"deferRender": true,
|