Authored by 张凯

Merge branch 'master-mj' of http://113.200.75.45:82/monitor_v3/hg-monitor-web into master-mj-joke

Showing 19 changed files with 140 additions and 101 deletions
... ... @@ -296,16 +296,20 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions'], function
}
}
, {
field: 'userTotal', title: '订阅人数', align: 'right', sort: true, width: 120,
field: 'userTotal', title: '订阅', align: 'right', sort: true, width: 120,
templet: function (d) {
if (d.userTotal != '0') {
/*if (d.userTotal != '0') {
return `<div><span data-id="${d.subId}" class="layui-table-link view-alarmsubscribe-users-total">${d.userTotal}</span></div>`;
} else {
return d.userTotal;
}*/
return `<div>
<span data-id="${d.subId}" class="layui-table-link view-alarmsubscribe-users-total" lay-tips="用户">${d.userTotal}</span> /
<span data-id="${d.subId}" class="layui-table-link view-alarmsubscribe-org-total" lay-tips="部门">${d.orgTotal}</span> /
<span data-id="${d.subId}" class="layui-table-link view-alarmsubscribe-user-group-total" lay-tips="用户组">${d.userGroupTotal}</span>
</div>`;
}
}
}
, {field: 'times', title: '允许通知时间段', align: 'center', sort: true, width: 180}
, {
field: 'syncFlag', title: '同步状态', align: 'center', sort: true, width: 120,
templet: function (d) {
... ... @@ -315,7 +319,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions'], function
return ' <button type="button" class="layui-btn layui-bg-green layui-btn-radius layui-btn-xs p-0-15">已同步</button>';
}
}
}
}, {field: 'times', title: '允许通知时间段', align: 'center', sort: true, width: 180}
, {
title: '操作', align: 'center', minWidth: 460, fixed: 'right', toolbar:
'<div>' +
... ... @@ -389,8 +393,13 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions'], function
});
});
//订阅人
// 订阅人
$(".view-alarmsubscribe-users-total").on("click", function () {
if ($(this).text() == '0') {
layer.msg('暂无订阅人,请先订阅!', {icon: 7, time: 3000});
return false;
}
var id = $(this).data("id");
admin.req({
url: domainName + '/api-web/alarmsubscribe/users'
... ... @@ -399,8 +408,8 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions'], function
if (res.data && res.data.length > 0) {
var trs = '';
$.each(res.data, function (i, v) {
trs += `<tr style="text-align: center"><td>${i + 1}</td><td>${v.username}</td><td>${v.nickname}</td><td>${v.email != 'undefined'?v.email:''}</td>
<td>${v.phone != 'undefined'?v.phone:''}</td><td>${v.operator != 'undefined'?v.operator:''}</td><td>${v.resTotal}</td><td>${v.bizTotal}</td></tr>`;
trs += `<tr style="text-align: center"><td>${i + 1}</td><td>${v.username}</td><td>${v.nickname}</td><td>${v.email != 'undefined' && v.email != null?v.email:''}</td>
<td>${v.phone != 'undefined' && v.phone != null?v.phone:''}</td><td>${v.operator != 'undefined' && v.operator != null?v.operator:''}</td><td>${v.resTotal}</td><td>${v.bizTotal}</td></tr>`;
});
var tb = `<div class="layui-form" style="padding: 0 10px;">
<table class="layui-table">
... ... @@ -424,6 +433,84 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions'], function
});
});
// 订阅部门
$(".view-alarmsubscribe-org-total").on("click", function () {
if ($(this).text() == '0') {
layer.msg('暂无订阅部门,请先订阅!', {icon: 7, time: 3000});
return false;
}
var id = $(this).data("id");
admin.req({
url: domainName + '/api-web/alarmsubscribe/userOrg'
, data: {subId: id}
, done: function (res) {
if (res.data && res.data.length > 0) {
var trs = '';
$.each(res.data, function (i, v) {
trs += `<tr style="text-align: center"><td>${i + 1}</td><td>${v.username}</td><td>${v.nickname}</td><td>${v.orgName}</td><td>${v.email != 'undefined' && v.email != null?v.email:''}</td>
<td>${v.phone != 'undefined' && v.phone != null?v.phone:''}</td><td>${v.operator != 'undefined' && v.operator != null?v.operator:''}</td><td>${v.resTotal}</td><td>${v.bizTotal}</td></tr>`;
});
var tb = `<div class="layui-form" style="padding: 0 10px;">
<table class="layui-table">
<thead>
<tr> <th>序号</th><th>用户名</th><th>昵称</th><th>部门</th><th>邮箱</th><th>手机号</th>
<th>运营商</th><th>负责资源数</th><th>负责业务</th> </tr>
</thead>
<tbody> ${trs} </tbody>
</table>
</div>`;
layer.open({
type: 1
, title: "部门用户列表"
, shade: 0.8
, area: ['80%', '90%']
, id: 'alarm_subscribe_users' //设定一个id,防止重复弹出
, content: tb
})
}
}
});
});
// 订阅组
$(".view-alarmsubscribe-user-group-total").on("click", function () {
if ($(this).text() == '0') {
layer.msg('暂无订阅组,请先订阅!', {icon: 7, time: 3000});
return false;
}
var id = $(this).data("id");
admin.req({
url: domainName + '/api-web/alarmsubscribe/userGroup'
, data: {subId: id}
, done: function (res) {
if (res.data && res.data.length > 0) {
var trs = '';
$.each(res.data, function (i, v) {
trs += `<tr style="text-align: center"><td>${i + 1}</td><td>${v.username}</td><td>${v.nickname}</td><td>${v.userGroupName}</td><td>${v.email != 'undefined' && v.email != null?v.email:''}</td>
<td>${v.phone != 'undefined' && v.phone != null?v.phone:''}</td><td>${v.operator != 'undefined' && v.operator != null?v.operator:''}</td><td>${v.resTotal}</td><td>${v.bizTotal}</td></tr>`;
});
var tb = `<div class="layui-form" style="padding: 0 10px;">
<table class="layui-table">
<thead>
<tr> <th>序号</th><th>用户名</th><th>昵称</th><th>用户组</th><th>邮箱</th><th>手机号</th>
<th>运营商</th><th>负责资源数</th><th>负责业务</th> </tr>
</thead>
<tbody> ${trs} </tbody>
</table>
</div>`;
layer.open({
type: 1
, title: "用户组用户列表"
, shade: 0.8
, area: ['80%', '90%']
, id: 'alarm_subscribe_users' //设定一个id,防止重复弹出
, content: tb
})
}
}
});
});
//设置同步
form.on('switch(switchSyncalarmsubscribe)', function (obj) {
... ...
... ... @@ -40,21 +40,21 @@ layui.define(['common', 'admin', 'echarts', 'common', 'table', 'sessions', 'layd
cellMinWidth: 80,
autoSort: false,
cols: [[{
field: 'createDate', title: '备份时间', align: 'center', sort: true, drag: false, width: 220
field: 'createDate', title: '备份时间', align: 'center', sort: true, drag: false,
}, {
field: 'shouldBack', title: '应备份数量', align: 'center', drag: false, width: 220,
field: 'shouldBack', title: '应备份数量', align: 'center', drag: false,
}, {
field: 'success', title: '备份成功数量', align: 'center', drag: false, width: 220,
field: 'success', title: '备份成功数量', align: 'center', drag: false,
templet: '<div><span data-date="{{d.createDate}}" data-status="成功" class="layui-table-link view-failCount-collectValue" style="color: green;font-size: 14px">{{d.success}}</span></div>'
}, {
field: 'fail', title: '备份失败数量', align: 'center', drag: false, width: 220,
field: 'fail', title: '备份失败数量', align: 'center', drag: false,
templet: '<div><span data-date="{{d.createDate}}" data-status="失败" class="layui-table-link view-failCount-collectValue" style="color: red;font-size: 14px">{{d.fail}}</span></div>'
}, {
field: 'inback', title: '备份中数量', align: 'center', drag: false, width: 220,
field: 'inback', title: '备份中数量', align: 'center', drag: false,
}, {
field: 'noback', title: '未备份数量', align: 'center', drag: false, width: 220,
field: 'noback', title: '未备份数量', align: 'center', drag: false,
}, {
field: 'sucRate', title: '备份成功率', align: 'center', drag: false,
}]],
... ...
... ... @@ -111,11 +111,11 @@ layui.define(['table', 'admin', 'form', 'laydate', 'common', 'sessions', 'view',
$('.view-backed-collectValue').on('click', function () {
var busId = $(this).data("busid");
var flag = $(this).data("flag");
var title = '备份服务器列表'
var title = '备份服务器列表(数据来源于鼎甲备份作业列表)'
common.openWin('backup/backDingjiaList', title, {
busId: busId,
flag: flag
}, ['确定', '取消'])
}, ['确定', '取消'],null,null,['1512px', '90%'])
});
}
... ...
... ... @@ -240,7 +240,7 @@ layui.define(['table', 'admin', 'form', 'laydate', 'common', 'sessions', 'view',
'<td>' + endTime + '</td>' +
'<td>' + remark + '</td>' +
'<td>' + lastTime + '</td>' +
'<td><input type="button" value="编辑" class="edit" style="background-color: #1E9FFF;"/></td>' +
'<td><input type="button" value="编辑" class="edit layui-button layui-btn-sm layui-btn-normal" style="color: #ffffff;border-radius:4px"/></td>' +
'</tr>'
} else {
tr += '<td style="display: none" class="bizid" data-bizId = "' + e.businfo.busId + '" data-bizName = "' + e.businfo.busTypeName + '">' + id + '</td>' +
... ... @@ -257,7 +257,7 @@ layui.define(['table', 'admin', 'form', 'laydate', 'common', 'sessions', 'view',
'<td>' + endTime + '</td>' +
'<td>' + remark + '</td>' +
'<td>' + lastTime + '</td>' +
'<td style="display:grid"><input type="button" value="编辑" class="edit" style="background-color: #1E9FFF;"/><input type="button" class="import" value="引用上次" style="background-color: #c0c4cc;margin-top: 5px"/></td>' +
'<td style="display:grid"><input type="button" value="编辑" class="edit layui-button layui-btn-sm layui-btn-normal" style="color: #ffffff;border-radius:4px"/><input type="button" class="import layui-button layui-btn-sm layui-btn-normal" value="引用上次" style="background-color: #c0c4cc;margin-top: 5px;border-radius:4px"/></td>' +
'</tr>'
}
});
... ... @@ -274,7 +274,7 @@ layui.define(['table', 'admin', 'form', 'laydate', 'common', 'sessions', 'view',
startTime: startTime,
resId: resId,
resIp: ip
}, ['确定', '取消'])
}, ['确定', '取消'],null,null,['1512px', '90%'])
});
$('#inspectioncount_table_id :button.edit').click(function () {
var toEdit = this.value == '编辑';
... ...
... ... @@ -298,7 +298,7 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat
common.openWin('machineroom/bizupgradeAdd', title, {id: id}, ['保存', '取消'], function f() {
$("#bizupgrade-form-save-id").trigger("click");
reloadAllChange();
},null,null,null,{end: function () {
},null,['1512px', '90%'],null,{end: function () {
reloadAllChange();
}})
}
... ...
... ... @@ -207,7 +207,7 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat
common.openWin('machineroom/devicehitchAdd', title, {id: id}, ['保存', '取消'], function f(){
$("#devicehitch-form-save-id").trigger("click");
reloadAllChange();
},null,null,null,{end: function () {
},null,['1512px', '90%'],null,{end: function () {
reloadAllChange();
}})
}
... ...
... ... @@ -334,7 +334,7 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat
common.openWin('emergency/add', title, {id: id}, ['保存', '取消'], function f() {
$("#emergency-form-save-id").trigger("click");
reloadAllChange();
},null,null,null,{end: function () {
},null,['1512px', '90%'],null,{end: function () {
reloadAllChange();
}})
}
... ...
... ... @@ -375,7 +375,7 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat
common.openWin('machineroom/deviceAdd', title, {id: id}, ['保存', '取消'], function f() {
$("#device-form-save-id").trigger("click");
reloadAllChange();
}, null, null, null, {end: function () {
}, null, ['1512px', '90%'], null, {end: function () {
reloadAllChange();
}})
}
... ...
... ... @@ -227,7 +227,7 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat
var title = id ? '编辑' : '新增'
common.openWin('machineroom/staffAdd', title, {id: id}, ['保存', '取消'], function f() {
$("#staff-form-save-id").trigger("click");
},null,['90%', '90%'],null,{end: function () {
},null,['1512px', '90%'],null,{end: function () {
reloadAllChange();
}})
}
... ...
... ... @@ -195,7 +195,7 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat
common.openWin('machineroom/extraAdd', title, {id: id}, ['保存', '取消'], function f(){
$("#extra-form-save-id").trigger("click");
reloadAllChange();
},null,null,null,{end: function () {
},null,['1512px', '90%'],null,{end: function () {
reloadAllChange();
}})
}
... ...
... ... @@ -161,7 +161,7 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat
common.openWin('machineroom/meetingApplyAdd', title, {id: id}, ['保存', '取消'], function f(){
$("#meetingApply-form-save-id").trigger("click");
form.render();
},null,null,null,{end: function () {
},null,['1512px', '90%'],null,{end: function () {
reloadAllChange();
}})
}
... ...
... ... @@ -139,7 +139,9 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat
function openmeetingsummaryForm(id) {
var title = id ? '编辑' : '新增'
common.openWin('machineroom/meetingsummaryAdd', title, {id: id}, ['确定', '取消'], function f(index,layero){
},null,null,null,{end: reloadAllChange()})
},null,['1512px', '90%'],null,{end: function () {
reloadAllChange();
}})
}
... ...
... ... @@ -211,7 +211,7 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat
common.openWin('recoveryverify/add', title, {id: id}, ['保存', '取消'], function f() {
$("#recoveryverify-form-save-id").trigger("click");
reloadAllChange();
},null,null,null,{end: function () {
},null,['1512px', '90%'],null,{end: function () {
reloadAllChange();
}})
}
... ...
... ... @@ -166,7 +166,7 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat
common.openWin('machineroom/routeAdjustAdd', title, {id: id}, ['保存', '取消'], function f() {
$("#routeAdjust-form-save-id").trigger("click");
reloadAllChange();
},null,null,null,{end: function () {
},null,['1512px', '90%'],null,{end: function () {
reloadAllChange();
}})
}
... ...
... ... @@ -239,7 +239,9 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions'], function
var title = id ? '编辑' : '新增'
common.openWin('workreport/add', title, {id: id, repType: repType}, ['保存', '取消'], function f() {
$("#workReport-form-save-id").trigger("click");
})
},null,['1100px', '90%'],null,{end: function () {
reloadWorkReportTable();
}})
}
//查看附件/接收人列表
... ...
... ... @@ -300,7 +300,9 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat
common.openWin('workreport/add', '查看', {id: id, repType: repType, viewType: 'view',datas:datas}, ['下一条','关闭'], function f() {
$("#workReport-form-next-id").trigger("click");
reloadAllChange();
});
},null,['1100px', '90%'],null,{end: function () {
reloadAllChange();
}});
}
});
... ...
<title>数据库备份统计</title>
<style type="text/css">
table th {
background-color: cornflowerblue;
}
</style>
<article class="page-container template">
<div class="page-panel">
<div class="main" style="background-color: #fff">
... ...
<style type="text/css">
td input {
width: 70px;
border: 1px;
}
element.style {
}
.layui-table td, .layui-table th {
position: relative;
padding: 9px 15px;
min-height: 20px;
line-height: 20px;
font-size: 14px;
}
.layui-table td, .layui-table th, .layui-table-col-set, .layui-table-fixed-r, .layui-table-grid-down, .layui-table-header, .layui-table-page, .layui-table-tips-main, .layui-table-tool, .layui-table-total, .layui-table-view, .layui-table[lay-skin=line], .layui-table[lay-skin=row] {
border-width: 1px;
border-style: solid;
border-color: #e6e6e6;
}
.layui-table th {
min-width: 35px;
text-align: center;
background-color: cornflowerblue;
}
</style>
<title>服务器备份概况</title>
<article class="page-container template">
<div class="page-panel">
... ...
<style type="text/css">
td input {
width: 70px;
border: 1px;
}
element.style {
}
.layui-table td, .layui-table th {
position: relative;
padding: 9px 15px;
min-height: 20px;
line-height: 20px;
font-size: 14px;
}
.layui-table td, .layui-table th, .layui-table-col-set, .layui-table-fixed-r, .layui-table-grid-down, .layui-table-header, .layui-table-page, .layui-table-tips-main, .layui-table-tool, .layui-table-total, .layui-table-view, .layui-table[lay-skin=line], .layui-table[lay-skin=row] {
border-width: 1px;
border-style: solid;
border-color: #e6e6e6;
}
.layui-table th {
min-width: 35px;
text-align: center;
background-color: cornflowerblue;
}
</style>
<title>数据库备份概况</title>
<article class="page-container template">
<div class="page-panel">
<div class="main" style="background-color: #fff">
<div class="main">
<div class="layui-card-body" style="margin-top: 10px;">
<div style="display: flex;justify-content: space-between;align-items: center;">
<form class="layui-form layui-card-header" onsubmit="return false"
... ... @@ -64,16 +35,16 @@
<thead>
<tr>
<th>序号</th>
<th>系统名称</th>
<th>等保等级</th>
<th>数据库名称</th>
<th width="150">系统名称</th>
<th width="100">等保等级</th>
<th width="200">数据库名称</th>
<th>IP地址</th>
<th>备份平台</th>
<th>备份级别</th>
<th>备份状态</th>
<th>数据量(GB)</th>
<th>速率(MB/s)</th>
<th>运行时间(分)</th>
<th width="100">备份状态</th>
<th width="100">数据量(GB)</th>
<th width="100">速率(MB/s)</th>
<th width="100">运行时间(分)</th>
<th>开始时间</th>
<th>结束时间</th>
<th>备注</th>
... ... @@ -94,3 +65,11 @@
fn();
});
</script>
<style type="text/css">
.layui-table td, .layui-table th {
padding: 0 5px!important;
}
td input:not([type=button]) {
width: 80px;
}
</style>
\ No newline at end of file
... ...