...
|
...
|
@@ -18,26 +18,27 @@ layui.define(['table', 'admin', 'form', 'laydate', 'common', 'sessions', 'view', |
|
|
var currSelect = 0;
|
|
|
var period = 'today';
|
|
|
var tip_index;
|
|
|
$("#probutton").mouseover(function () {
|
|
|
tips_index = layer.tips('查询昨天8时到今天8时的备份', this, {time: 0});
|
|
|
});
|
|
|
$("#probutton").mouseout(function () {
|
|
|
layer.close(tips_index); //关闭弹出层索引
|
|
|
});
|
|
|
/* $("#probutton").mouseover(function () {
|
|
|
tips_index = layer.tips('查询昨天8时到今天8时的备份', this, {time: 0});
|
|
|
});
|
|
|
$("#probutton").mouseout(function () {
|
|
|
layer.close(tips_index); //关闭弹出层索引
|
|
|
});*/
|
|
|
form.render();
|
|
|
var inspectioncountListTable = '';
|
|
|
searchEvent();//检索条件事件
|
|
|
//searchEvent();//检索条件事件
|
|
|
//加载文档表格数据
|
|
|
renderinspectioncountListTable();
|
|
|
|
|
|
//检索事件
|
|
|
/* //检索事件
|
|
|
function searchEvent() {
|
|
|
//发送状态
|
|
|
form.on('select(inspectioncount_date)', function (data) {
|
|
|
renderinspectioncountListTable();
|
|
|
});
|
|
|
}
|
|
|
$('#inspectioncount_table_id thead tr th').css({'font-weight':'bold'})
|
|
|
}*/
|
|
|
|
|
|
$('#inspectioncount_table_id thead tr th').css({'font-weight': 'bold'})
|
|
|
|
|
|
//日期范围选择
|
|
|
laydate.render({
|
...
|
...
|
@@ -53,47 +54,47 @@ layui.define(['table', 'admin', 'form', 'laydate', 'common', 'sessions', 'view', |
|
|
$dom.removeClass("active")
|
|
|
}
|
|
|
})
|
|
|
refreshPage()
|
|
|
//refreshPage()
|
|
|
}
|
|
|
});
|
|
|
|
|
|
// 日期方式选择
|
|
|
$('#btns-insp-time button').click(function () {
|
|
|
$.each($("button.date"), function (i, e) {
|
|
|
var $dom = $(e);
|
|
|
if ($dom.hasClass("active")) {
|
|
|
$dom.removeClass("active")
|
|
|
}
|
|
|
})
|
|
|
$("#backTime").val('')
|
|
|
backTime = ''
|
|
|
$("#btns-insp-time button").removeClass("active");
|
|
|
$(this).addClass("active");
|
|
|
period = ($(this).data("period"))
|
|
|
// if (period == 'today') {
|
|
|
var today = new Date()
|
|
|
today = today.getFullYear() + "-" + (today.getMonth() >= 9 ? (today.getMonth() + 1) : "0" + (today.getMonth() + 1)) + "-" + (today.getDate() > 9 ? (today.getDate()) : "0" + (today.getDate()));
|
|
|
backTime = today
|
|
|
// } else if (period == 'yestoday') {
|
|
|
// var time = (new Date).getTime() - 24 * 60 * 60 * 1000;
|
|
|
// var yesday = new Date(time); // 获取的是前一天日期
|
|
|
// yesday = yesday.getFullYear() + "-" + (yesday.getMonth() > 9 ? (yesday.getMonth() + 1) : "0" + (yesday.getMonth() + 1)) + "-" + (yesday.getDate() > 9 ? (yesday.getDate()) : "0" + (yesday.getDate()));
|
|
|
// backTime = yesday
|
|
|
// }
|
|
|
refreshPage()
|
|
|
$("#orgSearchBtn").on("click",function () {
|
|
|
renderinspectioncountListTable();
|
|
|
});
|
|
|
// 日期方式选择
|
|
|
/* $('#btns-insp-time button').click(function () {
|
|
|
$.each($("button.date"), function (i, e) {
|
|
|
var $dom = $(e);
|
|
|
if ($dom.hasClass("active")) {
|
|
|
$dom.removeClass("active")
|
|
|
}
|
|
|
})
|
|
|
$("#backTime").val('')
|
|
|
backTime = ''
|
|
|
$("#btns-insp-time button").removeClass("active");
|
|
|
$(this).addClass("active");
|
|
|
period = ($(this).data("period"))
|
|
|
// if (period == 'today') {
|
|
|
var today = new Date()
|
|
|
today = today.getFullYear() + "-" + (today.getMonth() >= 9 ? (today.getMonth() + 1) : "0" + (today.getMonth() + 1)) + "-" + (today.getDate() > 9 ? (today.getDate()) : "0" + (today.getDate()));
|
|
|
backTime = today
|
|
|
// } else if (period == 'yestoday') {
|
|
|
// var time = (new Date).getTime() - 24 * 60 * 60 * 1000;
|
|
|
// var yesday = new Date(time); // 获取的是前一天日期
|
|
|
// yesday = yesday.getFullYear() + "-" + (yesday.getMonth() > 9 ? (yesday.getMonth() + 1) : "0" + (yesday.getMonth() + 1)) + "-" + (yesday.getDate() > 9 ? (yesday.getDate()) : "0" + (yesday.getDate()));
|
|
|
// backTime = yesday
|
|
|
// }
|
|
|
refreshPage()
|
|
|
});*/
|
|
|
|
|
|
//根据tab页刷新页面数据
|
|
|
function refreshPage() {
|
|
|
if (currSelect == 0) {
|
|
|
renderinspectioncountListTable();
|
|
|
} else if (currSelect == 1) {
|
|
|
renderinspectionBusTable();
|
|
|
}
|
|
|
}
|
|
|
/* function refreshPage() {
|
|
|
|
|
|
|
|
|
|
|
|
}*/
|
|
|
|
|
|
// tab页切换事件
|
|
|
element.on('tab(insp-tab)', function (data) {
|
|
|
/* element.on('tab(insp-tab)', function (data) {
|
|
|
if (data.index == 0) {
|
|
|
if (!inspIsLoad) {
|
|
|
renderinspectioncountListTable();
|
...
|
...
|
@@ -106,14 +107,12 @@ layui.define(['table', 'admin', 'form', 'laydate', 'common', 'sessions', 'view', |
|
|
}
|
|
|
}
|
|
|
currSelect = data.index;
|
|
|
});
|
|
|
});*/
|
|
|
|
|
|
$("#btn-inspStatistics-export-excel").on('click', function () {
|
|
|
if (currSelect == 0) {
|
|
|
var href = common.domainName + '/api-web/backupview/export?accessToken=' + accessToken + "&backTime=" + backTime;
|
|
|
} else if (currSelect == 1) {
|
|
|
var href = common.domainName + '/inspection-report/report/record/inspectionBusListExport?accessToken=' + accessToken + "&createTime=" + createTime + '&dateLimit=' + dateLimit + '&limit=-1';
|
|
|
}
|
|
|
|
|
|
var href = common.domainName + '/api-web/backupview/export?accessToken=' + accessToken + "&backTime=" + backTime;
|
|
|
|
|
|
window.open(href)
|
|
|
})
|
|
|
|
...
|
...
|
@@ -129,22 +128,22 @@ layui.define(['table', 'admin', 'form', 'laydate', 'common', 'sessions', 'view', |
|
|
layer.close(loading);
|
|
|
var data = res.data;
|
|
|
var tr = '<div style="line-height: 26px;padding: 15px;text-align:center;color: #999;">暂无数据</div>';
|
|
|
if(data.length==0){
|
|
|
if (data.length == 0) {
|
|
|
/*$(".layui-show").append(tr);
|
|
|
$("#inspectioncount_table_id").find("tbody").empty();
|
|
|
$("#inspectioncount_table_id").append(tr);*/
|
|
|
}else {
|
|
|
} else {
|
|
|
$("#inspectioncount_table_id").find("tbody").empty();
|
|
|
}
|
|
|
$.each(data, function (i, e) {
|
|
|
var evaluationLevel = '';
|
|
|
var tr = '';
|
|
|
var str = '';
|
|
|
if(e.businfo.evaluationLevel == 'one-level'){
|
|
|
if (e.businfo.evaluationLevel == 'one-level') {
|
|
|
evaluationLevel = '一级';
|
|
|
}else if(e.businfo.evaluationLevel == 'two-level'){
|
|
|
} else if (e.businfo.evaluationLevel == 'two-level') {
|
|
|
evaluationLevel = '二级';
|
|
|
}else if(e.businfo.evaluationLevel == 'three-level'){
|
|
|
} else if (e.businfo.evaluationLevel == 'three-level') {
|
|
|
evaluationLevel = '三级';
|
|
|
}
|
|
|
if (e.rowspan == 0) {
|
...
|
...
|
@@ -185,7 +184,7 @@ layui.define(['table', 'admin', 'form', 'laydate', 'common', 'sessions', 'view', |
|
|
backStatushtml = '<div><span data-date="' + f.startTime + '" data-resid="' + f.resId + '" data-ip= "' + f.ip + '" class="layui-table-link view-backstatus-collectValue" style="color: green;font-size: 14px">成功</span></div>';
|
|
|
if (/失败/.test(backStatus)) {
|
|
|
backStatushtml = '<div><span data-date="' + f.startTime + '" data-resid="' + f.resId + '" data-ip= "' + f.ip + '" class="layui-table-link view-backstatus-collectValue" style="color: red;font-size: 14px">失败</span></div>';
|
|
|
}else if(/备份中/.test(backStatus)){
|
|
|
} else if (/备份中/.test(backStatus)) {
|
|
|
backStatushtml = '<div><span data-date="' + f.startTime + '" data-resid="' + f.resId + '" data-ip= "' + f.ip + '" style="color: #ffe40e;font-size: 14px">备份中</span></div>';
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -227,7 +226,7 @@ layui.define(['table', 'admin', 'form', 'laydate', 'common', 'sessions', 'view', |
|
|
id = f.id
|
|
|
}
|
|
|
if (f.backLevel != null) {
|
|
|
tr += '<td style="display: none" class="bizid" data-bizId = "'+e.businfo.busId+'" data-bizName = "'+ e.businfo.busTypeName+'">' + id + '</td>' +
|
|
|
tr += '<td style="display: none" class="bizid" data-bizId = "' + e.businfo.busId + '" data-bizName = "' + e.businfo.busTypeName + '">' + id + '</td>' +
|
|
|
'<td style="display: none">' + f.resId + '</td>' +
|
|
|
'<td>' + f.resName + '</td>' +
|
|
|
'<td>' + f.ip + '</td>' +
|
...
|
...
|
@@ -244,7 +243,7 @@ layui.define(['table', 'admin', 'form', 'laydate', 'common', 'sessions', 'view', |
|
|
'<td><input type="button" value="编辑" class="edit" style="background-color: #1E9FFF;"/></td>' +
|
|
|
'</tr>'
|
|
|
} else {
|
|
|
tr += '<td style="display: none" class="bizid" data-bizId = "'+e.businfo.busId+'" data-bizName = "'+ e.businfo.busTypeName+'">' + id + '</td>' +
|
|
|
tr += '<td style="display: none" class="bizid" data-bizId = "' + e.businfo.busId + '" data-bizName = "' + e.businfo.busTypeName + '">' + id + '</td>' +
|
|
|
'<td style="display: none">' + f.resId + '</td>' +
|
|
|
'<td>' + f.resName + '</td>' +
|
|
|
'<td>' + f.ip + '</td>' +
|
...
|
...
|
@@ -327,12 +326,10 @@ layui.define(['table', 'admin', 'form', 'laydate', 'common', 'sessions', 'view', |
|
|
if (param.resName == '') {
|
|
|
layer.msg('数据库名称不能为空!', {icon: 1});
|
|
|
return;
|
|
|
}
|
|
|
else if (param.startTime == '') {
|
|
|
} else if (param.startTime == '') {
|
|
|
layer.msg('开始时间不能为空!', {icon: 1});
|
|
|
return;
|
|
|
}
|
|
|
else if (param.endTime == '') {
|
|
|
} else if (param.endTime == '') {
|
|
|
layer.msg('结束时间不能为空!', {icon: 1});
|
|
|
return;
|
|
|
} else {
|
...
|
...
|
@@ -428,12 +425,10 @@ layui.define(['table', 'admin', 'form', 'laydate', 'common', 'sessions', 'view', |
|
|
if (param.resName == '') {
|
|
|
layer.msg('数据库名称不能为空!', {icon: 2});
|
|
|
return;
|
|
|
}
|
|
|
else if (param.startTime == '') {
|
|
|
} else if (param.startTime == '') {
|
|
|
layer.msg('开始时间不能为空!', {icon: 2});
|
|
|
return;
|
|
|
}
|
|
|
else if (param.endTime == '') {
|
|
|
} else if (param.endTime == '') {
|
|
|
layer.msg('结束时间不能为空!', {icon: 2});
|
|
|
return;
|
|
|
|
...
|
...
|
@@ -493,10 +488,6 @@ layui.define(['table', 'admin', 'form', 'laydate', 'common', 'sessions', 'view', |
|
|
return this.getFullYear() + "-" + (this.getMonth() >= 9 ? (this.getMonth() + 1) : "0" + (this.getMonth() + 1)) + "-" + (this.getDate() > 9 ? (this.getDate()) : "0" + (this.getDate())) + " " + (this.getHours() > 9 ? this.getHours() : "0" + this.getHours()) + ":" + (this.getMinutes() > 9 ? this.getMinutes() : "0" + this.getMinutes()) + ":" + (this.getSeconds() > 9 ? this.getSeconds() : "0" + this.getSeconds());
|
|
|
};
|
|
|
|
|
|
//业务报表统计数据列表
|
|
|
function renderinspectionBusTable() {
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
...
|
...
|
|