Merge branch 'master-mj' of http://113.200.75.45:82/monitor_v3/hg-monitor-web into master-mj
Showing
10 changed files
with
125 additions
and
76 deletions
@@ -42,23 +42,34 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions'], function | @@ -42,23 +42,34 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions'], function | ||
42 | cols: [[ | 42 | cols: [[ |
43 | {type: 'numbers', title: '序号'}, | 43 | {type: 'numbers', title: '序号'}, |
44 | { | 44 | { |
45 | - field: 'busName', title: '系统名称', align: 'center', minWith: 240, | 45 | + field: 'busName', title: '系统名称', align: 'center' |
46 | }, { | 46 | }, { |
47 | - field: 'evaluationLevel', title: '等保等级', align: 'center', minWith: 130, | 47 | + field: 'evaluationLevel', title: '等保等级', align: 'center', |
48 | + templet:function (d) { | ||
49 | + var evaluationLevel = ''; | ||
50 | + if(d.evaluationLevel == 'one-level'){ | ||
51 | + evaluationLevel = '一级'; | ||
52 | + }else if(d.evaluationLevel == 'two-level'){ | ||
53 | + evaluationLevel = '二级'; | ||
54 | + }else if(d.evaluationLevel == 'three-level'){ | ||
55 | + evaluationLevel = '三级'; | ||
56 | + } | ||
57 | + return evaluationLevel; | ||
58 | + } | ||
48 | }, { | 59 | }, { |
49 | - field: 'resName', title: '数据库名称', align: 'center', minWith: 240, | 60 | + field: 'resName', title: '数据库名称', align: 'center' |
50 | }, | 61 | }, |
51 | { | 62 | { |
52 | - field: 'ip', title: 'IP地址', align: 'center', minWith: 150, | 63 | + field: 'ip', title: 'IP地址', align: 'center' |
53 | }, | 64 | }, |
54 | { | 65 | { |
55 | - field: 'platform', title: '备份平台', align: 'center', minWith: 130, | 66 | + field: 'platform', title: '备份平台', align: 'center' |
56 | }, | 67 | }, |
57 | { | 68 | { |
58 | - field: 'backLevel', title: '备份级别', align: 'center', minWith: 180, | 69 | + field: 'backLevel', title: '备份级别', align: 'center' |
59 | }, | 70 | }, |
60 | { | 71 | { |
61 | - field: 'backStatus', title: '备份状态', align: 'center', minWith: 120, | 72 | + field: 'backStatus', title: '备份状态', align: 'center', |
62 | templet:function (d) { | 73 | templet:function (d) { |
63 | var backStatus = d.backStatus | 74 | var backStatus = d.backStatus |
64 | var backStatushtml = '成功'; | 75 | var backStatushtml = '成功'; |
@@ -45,11 +45,11 @@ layui.define(['common', 'admin', 'echarts', 'common', 'table', 'sessions', 'layd | @@ -45,11 +45,11 @@ layui.define(['common', 'admin', 'echarts', 'common', 'table', 'sessions', 'layd | ||
45 | field: 'shouldBack', title: '应备份数量', align: 'center', drag: false, | 45 | field: 'shouldBack', title: '应备份数量', align: 'center', drag: false, |
46 | }, { | 46 | }, { |
47 | field: 'success', title: '备份成功数量', align: 'center', drag: false, | 47 | field: 'success', title: '备份成功数量', align: 'center', drag: false, |
48 | - 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>' | 48 | + templet: '<div><span data-date="{{d.createDate}}" data-status="成功" class="layui-table-link view-failCount-collectValue" style="color: green!important;">{{d.success}}</span></div>' |
49 | 49 | ||
50 | }, { | 50 | }, { |
51 | field: 'fail', title: '备份失败数量', align: 'center', drag: false, | 51 | field: 'fail', title: '备份失败数量', align: 'center', drag: false, |
52 | - 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>' | 52 | + templet: '<div><span data-date="{{d.createDate}}" data-status="失败" class="layui-table-link view-failCount-collectValue" style="color: red!important;">{{d.fail}}</span></div>' |
53 | 53 | ||
54 | }, { | 54 | }, { |
55 | field: 'inback', title: '备份中数量', align: 'center', drag: false, | 55 | field: 'inback', title: '备份中数量', align: 'center', drag: false, |
@@ -63,8 +63,8 @@ layui.define(['common', 'admin', 'echarts', 'common', 'table', 'sessions', 'layd | @@ -63,8 +63,8 @@ layui.define(['common', 'admin', 'echarts', 'common', 'table', 'sessions', 'layd | ||
63 | $('.view-failCount-collectValue').on('click', function () { | 63 | $('.view-failCount-collectValue').on('click', function () { |
64 | var createDate = $(this).data("date"); | 64 | var createDate = $(this).data("date"); |
65 | var status = $(this).data("status"); | 65 | var status = $(this).data("status"); |
66 | - var title = '备份失败列表' | ||
67 | - common.openWin('backup/failList', title, {createDate: createDate, status: status}, ['确定', '取消']) | 66 | + var title = status=="失败"?'备份失败列表':'备份成功列表'; |
67 | + common.openWin('backup/failList', title, {createDate: createDate, status: status}, ['确定', '取消'],null,null,['95%', '90%']) | ||
68 | }); | 68 | }); |
69 | } | 69 | } |
70 | }); | 70 | }); |
@@ -72,7 +72,6 @@ layui.define(['common', 'admin', 'echarts', 'common', 'table', 'sessions', 'layd | @@ -72,7 +72,6 @@ layui.define(['common', 'admin', 'echarts', 'common', 'table', 'sessions', 'layd | ||
72 | 72 | ||
73 | function initStatusTable() { | 73 | function initStatusTable() { |
74 | var loading = layer.load(2) | 74 | var loading = layer.load(2) |
75 | - var mycars = new Array(); | ||
76 | var url = common.domainName + '/api-web/backupview/countLastHalfMonthBackStatus' | 75 | var url = common.domainName + '/api-web/backupview/countLastHalfMonthBackStatus' |
77 | $.ajax({ | 76 | $.ajax({ |
78 | url: url, | 77 | url: url, |
@@ -81,23 +80,16 @@ layui.define(['common', 'admin', 'echarts', 'common', 'table', 'sessions', 'layd | @@ -81,23 +80,16 @@ layui.define(['common', 'admin', 'echarts', 'common', 'table', 'sessions', 'layd | ||
81 | success: function (res) { | 80 | success: function (res) { |
82 | layer.close(loading); | 81 | layer.close(loading); |
83 | var data = res.data; | 82 | var data = res.data; |
84 | - var tr = '<div style="line-height: 26px;padding: 15px;text-align:center;color: #999;">暂无数据</div>'; | 83 | + var htr = "<tr><th style='color: #151b26;font-weight: bold!important;'>序号</th><th style='color: #151b26;font-weight: bold!important;'>系统名称</th><th style='color: #151b26;font-weight: bold!important;'>等保等级</th><th style='color: #151b26;font-weight: bold!important;'>数据库名称</th><th style='color: #151b26;font-weight: bold!important;'>IP地址</th>" |
84 | + $.each(res.object, function (j, f) { | ||
85 | + htr += "<th style='color: #151b26;font-weight: bold!important;'>" + f.substring(5,f.length) + "</th>" | ||
86 | + }); | ||
87 | + htr += "</tr>"; | ||
88 | + $("#status_table").find("thead").append(htr); | ||
89 | + $("#status_table").find("tbody").empty(); | ||
85 | if(data.length==0){ | 90 | if(data.length==0){ |
86 | -/* | ||
87 | - $(".backupCountStatus-table").append(tr); | ||
88 | -*/ | ||
89 | - }else { | ||
90 | - $("#status_table").find("thead").empty(); | ||
91 | - $("#status_table").find("tbody").empty(); | ||
92 | 91 | ||
93 | - var htr = "<tr><th style='color: #151b26;font-weight: bold!important;'>序号</th><th width='200' style='color: #151b26;font-weight: bold!important;'>系统名称</th><th style='color: #151b26;font-weight: bold!important;'>等保等级</th><th width='200' style='color: #151b26;font-weight: bold!important;'>数据库名称</th><th style='color: #151b26;font-weight: bold!important;'>IP地址</th>" | ||
94 | - $.each(data[0].backlist[0], function (j, f) { | ||
95 | - if (j != "resId" && j != "resName" && j != "ip") { | ||
96 | - htr += "<th style='color: #151b26;font-weight: bold!important;'>" + j + "</th>" | ||
97 | - } | ||
98 | - }); | ||
99 | - htr += "</tr>" | ||
100 | - $("#status_table").find("thead").append(htr); | 92 | + }else { |
101 | $.each(data, function (i, e) { | 93 | $.each(data, function (i, e) { |
102 | var evaluationLevel = ''; | 94 | var evaluationLevel = ''; |
103 | var tr = ''; | 95 | var tr = ''; |
@@ -140,19 +132,19 @@ layui.define(['common', 'admin', 'echarts', 'common', 'table', 'sessions', 'layd | @@ -140,19 +132,19 @@ layui.define(['common', 'admin', 'echarts', 'common', 'table', 'sessions', 'layd | ||
140 | $.each(e.backlist[j], function (h, n) { | 132 | $.each(e.backlist[j], function (h, n) { |
141 | if (h != "resId") { | 133 | if (h != "resId") { |
142 | if (/失败/.test(n)) { | 134 | if (/失败/.test(n)) { |
143 | - tr += '<td style="text-align: center"><i class="layui-icon layui-icon-close" style="font-size: 20px; color: #ff252c;"></i></td>' | 135 | + tr += '<td style="text-align: center"><i class="layui-icon layui-icon-close" style="font-size: 20px!important; color: #ff252c!important;"></i></td>' |
144 | } else if (/成功/.test(n)) { | 136 | } else if (/成功/.test(n)) { |
145 | - tr += '<td><p style="text-align: center"><i class="layui-icon layui-icon-ok" style="font-size: 20px; color: #1dff1c;"></i></p><p style="margin-top: 8px;text-align: center">主楼+综改</p></td>' | 137 | + tr += '<td><p style="text-align: center"><i class="layui-icon layui-icon-ok" style="font-size: 20px!important; color: #1dff1c!important;"></i></p><p style="margin-top: 8px;text-align: center">主楼+综改</p></td>' |
146 | } else if (/备份中/.test(n)) { | 138 | } else if (/备份中/.test(n)) { |
147 | - tr += '<td style="text-align: center"><span style="color:#ffe40e">' + n + '</span></td>' | 139 | + tr += '<td style="text-align: center"><span style="color:#ffe40e!important;">' + n + '</span></td>' |
148 | } else if (/未备份/.test(n)) { | 140 | } else if (/未备份/.test(n)) { |
149 | - tr += '<td style="text-align: center"><span style="color:magenta">' + n + '</span></td>' | 141 | + tr += '<td style="text-align: center"><span style="color:magenta!important;">' + n + '</span></td>' |
150 | } else if (/历史存放/.test(n)) { | 142 | } else if (/历史存放/.test(n)) { |
151 | - tr += '<td><p style="text-align: center"><i class="layui-icon layui-icon-log" style="font-size: 20px; color: #1e9fff;"></i></p><p style="margin-top: 8px;text-align: center">综改</p></td>' | 143 | + tr += '<td><p style="text-align: center"><i class="layui-icon layui-icon-log" style="font-size: 20px!important; color: #1e9fff!important;"></i></p><p style="margin-top: 8px;text-align: center">综改</p></td>' |
152 | } else if (/全备/.test(n)) { | 144 | } else if (/全备/.test(n)) { |
153 | - tr += '<td style="text-align: center"><span style="color:#1DFF1C">' + n + '</span></td>' | 145 | + tr += '<td style="text-align: center"><span style="color:#1DFF1C!important;">' + n + '</span></td>' |
154 | } else if (/已失效/.test(n)){ | 146 | } else if (/已失效/.test(n)){ |
155 | - tr += '<td style="text-align: center"><span style="color:#FF252C">' + n + '</span></td>' | 147 | + tr += '<td style="text-align: center"><span style="color:#FF252C!important;">' + n + '</span></td>' |
156 | }else { | 148 | }else { |
157 | tr += '<td style="text-align: center">' + n + '</td>' | 149 | tr += '<td style="text-align: center">' + n + '</td>' |
158 | 150 |
@@ -115,7 +115,7 @@ layui.define(['table', 'admin', 'form', 'laydate', 'common', 'sessions', 'view', | @@ -115,7 +115,7 @@ layui.define(['table', 'admin', 'form', 'laydate', 'common', 'sessions', 'view', | ||
115 | common.openWin('backup/backDingjiaList', title, { | 115 | common.openWin('backup/backDingjiaList', title, { |
116 | busId: busId, | 116 | busId: busId, |
117 | flag: flag | 117 | flag: flag |
118 | - }, ['确定', '取消'],null,null,['90%', '90%']) | 118 | + }, ['确定', '取消'],null,null,['95%', '90%']) |
119 | }); | 119 | }); |
120 | 120 | ||
121 | } | 121 | } |
@@ -181,11 +181,11 @@ layui.define(['table', 'admin', 'form', 'laydate', 'common', 'sessions', 'view', | @@ -181,11 +181,11 @@ layui.define(['table', 'admin', 'form', 'laydate', 'common', 'sessions', 'view', | ||
181 | var backStatushtml = ''; | 181 | var backStatushtml = ''; |
182 | if (f.backStatus != null) { | 182 | if (f.backStatus != null) { |
183 | backStatus = f.backStatus | 183 | backStatus = f.backStatus |
184 | - 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>'; | 184 | + 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!important;">成功</span></div>'; |
185 | if (/失败/.test(backStatus)) { | 185 | if (/失败/.test(backStatus)) { |
186 | - 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>'; | 186 | + 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!important;">失败</span></div>'; |
187 | } else if (/备份中/.test(backStatus)) { | 187 | } else if (/备份中/.test(backStatus)) { |
188 | - backStatushtml = '<div><span data-date="' + f.startTime + '" data-resid="' + f.resId + '" data-ip= "' + f.ip + '" style="color: #ffe40e;font-size: 14px">备份中</span></div>'; | 188 | + backStatushtml = '<div><span data-date="' + f.startTime + '" data-resid="' + f.resId + '" data-ip= "' + f.ip + '" style="color: #ffe40e!important;">备份中</span></div>'; |
189 | } | 189 | } |
190 | } | 190 | } |
191 | var backBytes = ''; | 191 | var backBytes = ''; |
@@ -216,7 +216,7 @@ layui.define(['table', 'admin', 'form', 'laydate', 'common', 'sessions', 'view', | @@ -216,7 +216,7 @@ layui.define(['table', 'admin', 'form', 'laydate', 'common', 'sessions', 'view', | ||
216 | 216 | ||
217 | if (f.lastTime != null) { | 217 | if (f.lastTime != null) { |
218 | if (f.startTime == null || f.lastTime != f.startTime) { | 218 | if (f.startTime == null || f.lastTime != f.startTime) { |
219 | - lastTime = '<span style="font-size: 14px;color: red">' + dateForm(f.lastTime) + '</span>' | 219 | + lastTime = '<span style="color: red!important;">' + dateForm(f.lastTime) + '</span>' |
220 | } else { | 220 | } else { |
221 | lastTime = dateForm(f.lastTime) | 221 | lastTime = dateForm(f.lastTime) |
222 | } | 222 | } |
@@ -274,7 +274,7 @@ layui.define(['table', 'admin', 'form', 'laydate', 'common', 'sessions', 'view', | @@ -274,7 +274,7 @@ layui.define(['table', 'admin', 'form', 'laydate', 'common', 'sessions', 'view', | ||
274 | startTime: startTime, | 274 | startTime: startTime, |
275 | resId: resId, | 275 | resId: resId, |
276 | resIp: ip | 276 | resIp: ip |
277 | - }, ['确定', '取消'],null,null,['90%', '90%']) | 277 | + }, ['确定', '取消'],null,null,['95%', '90%']) |
278 | }); | 278 | }); |
279 | $('#inspectioncount_table_id :button.edit').click(function () { | 279 | $('#inspectioncount_table_id :button.edit').click(function () { |
280 | var toEdit = this.value == '编辑'; | 280 | var toEdit = this.value == '编辑'; |
1 | /** 应急演练 */ | 1 | /** 应急演练 */ |
2 | -layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydate', 'element'], function (exports) { | 2 | +layui.define(['table', 'form','laytpl', 'sessions', 'admin', 'common', 'echarts', 'laydate', 'element'], function (exports) { |
3 | var $ = layui.$; | 3 | var $ = layui.$; |
4 | var form = layui.form; | 4 | var form = layui.form; |
5 | var common = layui.common; | 5 | var common = layui.common; |
6 | + var laytpl = layui.laytpl; | ||
6 | exports('recoverycount', function () { | 7 | exports('recoverycount', function () { |
7 | var sessions = layui.sessions; | 8 | var sessions = layui.sessions; |
8 | var accessToken = localStorage.getItem("accessToken"); | 9 | var accessToken = localStorage.getItem("accessToken"); |
@@ -42,20 +43,38 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat | @@ -42,20 +43,38 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat | ||
42 | 43 | ||
43 | // 下拉框改变搜索 | 44 | // 下拉框改变搜索 |
44 | //form.on('select(slt-recoverycount-biz)', reloadAllChange); | 45 | //form.on('select(slt-recoverycount-biz)', reloadAllChange); |
45 | - | ||
46 | - function renderStyle(number){ | 46 | + function renderStyle(number,resId){ |
47 | if(number>0){ | 47 | if(number>0){ |
48 | - return '<div><span style="color: #0BAC33" >'+number+'</span></div>'; | 48 | + return '<a class="view-recoveryverify-record" style="color: #1dff1c;cursor: pointer;text-decoration:underline;" data-resid="'+resId+'"><span >'+number+'</span></a>'; |
49 | }else { | 49 | }else { |
50 | - return '<div><span style="color: #aa2222">'+number+'</span></div>'; | 50 | + return '<div><span style="color: #aa2222">'+'-'+'</span></div>'; |
51 | } | 51 | } |
52 | } | 52 | } |
53 | 53 | ||
54 | + function openrecoveryverifyForm(id) { | ||
55 | + var title = '数据库恢复验证记录'; | ||
56 | + layer.open({ | ||
57 | + title:title, | ||
58 | + id:'recoveryverifyDetail', | ||
59 | + type:1, | ||
60 | + area: ['95%', '90%'], | ||
61 | + btn:['确定','取消'], | ||
62 | + scrollbar:true, | ||
63 | + success: function(){ | ||
64 | + view(this.id).render('recoveryverify/index',{resId: id,period:createTime}); | ||
65 | + }, | ||
66 | + yes:function (index,layero) { | ||
67 | + return true | ||
68 | + } | ||
69 | + }) | ||
70 | + | ||
71 | + } | ||
72 | + | ||
54 | function renderIsDiscovery(isRecovery) { | 73 | function renderIsDiscovery(isRecovery) { |
55 | if(isRecovery=="1"){ | 74 | if(isRecovery=="1"){ |
56 | - return '<i class="layui-icon layui-icon-ok" style="font-size: 30px; color: #1dff1c;"></i>'; | 75 | + return '<i class="layui-icon layui-icon-ok" style="font-size: 20px!important; color: #1dff1c!important;"></i>'; |
57 | }else { | 76 | }else { |
58 | - return '<i class="layui-icon layui-icon-close" style="font-size: 30px; color: #ff252c;"></i>'; | 77 | + return '<i class="layui-icon layui-icon-close" style="font-size: 20px!important; color: #ff252c!important;"></i>'; |
59 | } | 78 | } |
60 | } | 79 | } |
61 | $("#orgSearchBtn").on("click",function () { | 80 | $("#orgSearchBtn").on("click",function () { |
@@ -77,7 +96,7 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat | @@ -77,7 +96,7 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat | ||
77 | data: conditions, | 96 | data: conditions, |
78 | success: function (res) { | 97 | success: function (res) { |
79 | layer.close(loading); | 98 | layer.close(loading); |
80 | - var data = res.data; | 99 | + var data = res.object.recoveryCountViews; |
81 | $("#recoverycount-table").find("tbody").empty(); | 100 | $("#recoverycount-table").find("tbody").empty(); |
82 | $.each(data, function (i, e) { | 101 | $.each(data, function (i, e) { |
83 | var evaluationLevel = ''; | 102 | var evaluationLevel = ''; |
@@ -96,19 +115,19 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat | @@ -96,19 +115,19 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat | ||
96 | $.each(e.children, function (j, f) { | 115 | $.each(e.children, function (j, f) { |
97 | tr += '<td >' + f.resName + '</td>' + | 116 | tr += '<td >' + f.resName + '</td>' + |
98 | '<td>' + f.ip + '</td>' + | 117 | '<td>' + f.ip + '</td>' + |
99 | - '<td>' + renderIsDiscovery(f.isRecovery)+ '</td>' + | ||
100 | - '<td>' + renderStyle(f.dece)+ '</td>' + | ||
101 | - '<td>' + renderStyle(f.nov) + '</td>' + | ||
102 | - '<td>' + renderStyle(f.oct) + '</td>' + | ||
103 | - '<td>' + renderStyle(f.sep) + '</td>' + | ||
104 | - '<td>' + renderStyle(f.aug) + '</td>' + | ||
105 | - '<td>' + renderStyle(f.jul) + '</td>' + | ||
106 | - '<td>' + renderStyle(f.jun) + '</td>' + | ||
107 | - '<td>' + renderStyle(f.may) + '</td>' + | ||
108 | - '<td>' + renderStyle(f.apr) + '</td>' + | ||
109 | - '<td>' + renderStyle(f.mar) + '</td>' + | ||
110 | - '<td>' + renderStyle(f.feb) + '</td>' + | ||
111 | - '<td>' + renderStyle(f.jan) + '</td>' + | 118 | + '<td data-resid="'+f.resId+'" >' + renderIsDiscovery(f.isRecovery,f.resId)+ '</td>' + |
119 | + '<td data-resid="'+f.resId+'" >' + renderStyle(f.dece,f.resId)+ '</td>' + | ||
120 | + '<td data-resid="'+f.resId+'" >' + renderStyle(f.nov,f.resId) + '</td>' + | ||
121 | + '<td data-resid="'+f.resId+'" >' + renderStyle(f.oct,f.resId) + '</td>' + | ||
122 | + '<td data-resid="'+f.resId+'" >' + renderStyle(f.sep,f.resId) + '</td>' + | ||
123 | + '<td data-resid="'+f.resId+'" >' + renderStyle(f.aug,f.resId) + '</td>' + | ||
124 | + '<td data-resid="'+f.resId+'" >' + renderStyle(f.jul,f.resId) + '</td>' + | ||
125 | + '<td data-resid="'+f.resId+'" >' + renderStyle(f.jun,f.resId) + '</td>' + | ||
126 | + '<td data-resid="'+f.resId+'" >' + renderStyle(f.may,f.resId) + '</td>' + | ||
127 | + '<td data-resid="'+f.resId+'" >' + renderStyle(f.apr,f.resId) + '</td>' + | ||
128 | + '<td data-resid="'+f.resId+'" >' + renderStyle(f.mar,f.resId) + '</td>' + | ||
129 | + '<td data-resid="'+f.resId+'" >' + renderStyle(f.feb,f.resId) + '</td>' + | ||
130 | + '<td data-resid="'+f.resId+'" >' + renderStyle(f.jan,f.resId) + '</td>' + | ||
112 | '</tr>' | 131 | '</tr>' |
113 | }); | 132 | }); |
114 | }else{ | 133 | }else{ |
@@ -129,9 +148,11 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat | @@ -129,9 +148,11 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat | ||
129 | '</tr>' | 148 | '</tr>' |
130 | } | 149 | } |
131 | $("#recoverycount-table").find("tbody").append(tr); | 150 | $("#recoverycount-table").find("tbody").append(tr); |
132 | - }) | ||
133 | - | ||
134 | - | 151 | + }); |
152 | + $('.view-recoveryverify-record').on('click', function () { | ||
153 | + openrecoveryverifyForm($(this).data('resid')); | ||
154 | + }); | ||
155 | + $('#recoverycount-top-head-info').html(laytpl($('#tpl-recoverycount-top-head-info').html()).render(res.object)); | ||
135 | } | 156 | } |
136 | }) | 157 | }) |
137 | } | 158 | } |
@@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
8 | <div style="display: block;height: 35px"> | 8 | <div style="display: block;height: 35px"> |
9 | <button class="layui-btn layui-btn-sm layui-btn-normal active" | 9 | <button class="layui-btn layui-btn-sm layui-btn-normal active" |
10 | id="dingjia-detail-export-excel" style="float: right"> | 10 | id="dingjia-detail-export-excel" style="float: right"> |
11 | - <i class="layui-icon"></i>导出到Excel | 11 | + <i class="layui-icon"></i>导出 |
12 | </button> | 12 | </button> |
13 | </div> | 13 | </div> |
14 | <table id="backDingjiaListTable" class="layui-table" lay-filter="backDingjiaListTable"> | 14 | <table id="backDingjiaListTable" class="layui-table" lay-filter="backDingjiaListTable"> |
@@ -37,14 +37,14 @@ | @@ -37,14 +37,14 @@ | ||
37 | <input checked lay-skin="switch" lay-text="启用|禁用" name="enable" type="checkbox" value="true"/> | 37 | <input checked lay-skin="switch" lay-text="启用|禁用" name="enable" type="checkbox" value="true"/> |
38 | </div> | 38 | </div> |
39 | </div> | 39 | </div> |
40 | - <div class="layui-form-item layui-form-text"> | ||
41 | - <label class="layui-form-label">循环sql</label> | 40 | + <div class="layui-form-item"> |
41 | + <label class="layui-form-label" style="height: 150px">循环sql</label> | ||
42 | <div class="layui-input-block"> | 42 | <div class="layui-input-block"> |
43 | <textarea class="layui-textarea" name="loopSql" placeholder="循环sql"></textarea> | 43 | <textarea class="layui-textarea" name="loopSql" placeholder="循环sql"></textarea> |
44 | </div> | 44 | </div> |
45 | </div> | 45 | </div> |
46 | - <div class="layui-form-item layui-form-text"> | ||
47 | - <label class="layui-form-label">扩展参数</label> | 46 | + <div class="layui-form-item"> |
47 | + <label class="layui-form-label" style="height: 150px">扩展参数</label> | ||
48 | <div class="layui-input-block"> | 48 | <div class="layui-input-block"> |
49 | <textarea class="layui-textarea" lay-verify="json" name="extendParams" placeholder="扩展参数"></textarea> | 49 | <textarea class="layui-textarea" lay-verify="json" name="extendParams" placeholder="扩展参数"></textarea> |
50 | </div> | 50 | </div> |
@@ -24,19 +24,19 @@ | @@ -24,19 +24,19 @@ | ||
24 | </select> | 24 | </select> |
25 | </div> | 25 | </div> |
26 | </div> | 26 | </div> |
27 | - <div class="layui-form-item layui-form-text"> | ||
28 | - <label class="layui-form-label">mysql查询sql<span style="color: red">*</span></label> | 27 | + <div class="layui-form-item"> |
28 | + <label class="layui-form-label" style="height: 150px">mysql查询sql<span style="color: red">*</span></label> | ||
29 | <div class="layui-input-block"> | 29 | <div class="layui-input-block"> |
30 | <textarea class="layui-textarea" lay-verify="required" name="mysqlSql" placeholder="mysql查询sql"></textarea> | 30 | <textarea class="layui-textarea" lay-verify="required" name="mysqlSql" placeholder="mysql查询sql"></textarea> |
31 | </div> | 31 | </div> |
32 | </div> | 32 | </div> |
33 | - <div class="layui-form-item layui-form-text"> | ||
34 | - <label class="layui-form-label">时序查询sql</label> | 33 | + <div class="layui-form-item"> |
34 | + <label class="layui-form-label" style="height: 150px">时序查询sql</label> | ||
35 | <div class="layui-input-block"> | 35 | <div class="layui-input-block"> |
36 | <textarea class="layui-textarea" name="influxSql" placeholder="时序sql"></textarea> | 36 | <textarea class="layui-textarea" name="influxSql" placeholder="时序sql"></textarea> |
37 | </div> | 37 | </div> |
38 | </div> | 38 | </div> |
39 | - <div class="layui-form-item layui-form-text"> | 39 | + <div class="layui-form-item"> |
40 | <label class="layui-form-label">扩展参数</label> | 40 | <label class="layui-form-label">扩展参数</label> |
41 | <div class="layui-input-block"> | 41 | <div class="layui-input-block"> |
42 | <textarea class="layui-textarea" lay-verify="json" name="extendParams" placeholder="扩展参数"></textarea> | 42 | <textarea class="layui-textarea" lay-verify="json" name="extendParams" placeholder="扩展参数"></textarea> |
@@ -156,7 +156,7 @@ | @@ -156,7 +156,7 @@ | ||
156 | </div> | 156 | </div> |
157 | </div> | 157 | </div> |
158 | <div class="layui-form-item"> | 158 | <div class="layui-form-item"> |
159 | - <label class="layui-form-label">执行脚本<span style="color: red">*</span>:</label> | 159 | + <label class="layui-form-label" style="height: 220px">执行脚本<span style="color: red">*</span>:</label> |
160 | <div class="layui-input-block"> | 160 | <div class="layui-input-block"> |
161 | <textarea class="layui-input" style="min-height: 220px" placeholder="执行脚本" type="text" | 161 | <textarea class="layui-input" style="min-height: 220px" placeholder="执行脚本" type="text" |
162 | name="content" id="content" | 162 | name="content" id="content" |
@@ -31,6 +31,8 @@ | @@ -31,6 +31,8 @@ | ||
31 | 31 | ||
32 | </form> | 32 | </form> |
33 | </div> | 33 | </div> |
34 | + <div class="layui-tab-item" style="display: block"> | ||
35 | + <div id="recoverycount-top-head-info" class="statistics-top-head"></div> | ||
34 | <table id="recoverycount-table" class="layui-table" lay-filter="recoverycount-table"> | 36 | <table id="recoverycount-table" class="layui-table" lay-filter="recoverycount-table"> |
35 | <thead> | 37 | <thead> |
36 | <tr> | 38 | <tr> |
@@ -57,11 +59,34 @@ | @@ -57,11 +59,34 @@ | ||
57 | <tbody> | 59 | <tbody> |
58 | </tbody> | 60 | </tbody> |
59 | </table> | 61 | </table> |
60 | - </div> | 62 | + </div></div> |
61 | </div> | 63 | </div> |
62 | </div> | 64 | </div> |
63 | </div> | 65 | </div> |
64 | </article> | 66 | </article> |
67 | +<script type="text/html" id="tpl-recoverycount-top-head-info"> | ||
68 | + <div class="info-box-count"> | ||
69 | + <i></i> | ||
70 | + <label>应恢复数</label> | ||
71 | + <div class="num"> | ||
72 | + <span lay-tips="数据库恢复总数">{{d.totalSum}}</span> | ||
73 | + </div> | ||
74 | + </div> | ||
75 | + <div class="info-box-count"> | ||
76 | + <i></i> | ||
77 | + <label>已恢复数量</label> | ||
78 | + <div class="num"> | ||
79 | + <span style="color: #1dff1c;" lay-tips="已恢复数量">{{d.recoveriedSum}}</span> | ||
80 | + </div> | ||
81 | + </div> | ||
82 | + <div class="info-box-count"> | ||
83 | + <i></i> | ||
84 | + <label>未恢复数量</label> | ||
85 | + <div class="num"> | ||
86 | + <span style="color: #aa2222" lay-tips="未恢复数量">{{d.noRecoverySum}}</span> | ||
87 | + </div> | ||
88 | + </div> | ||
89 | +</script> | ||
65 | <script> | 90 | <script> |
66 | layui.use('recoverycount', function (fn) { | 91 | layui.use('recoverycount', function (fn) { |
67 | fn(); | 92 | fn(); |
-
Please register or login to post a comment