From 99561cb630fa718ea0154d232890dde6d43d1e9f Mon Sep 17 00:00:00 2001
From: wuwei <wuquan-1230@q63.com>
Date: 星期六, 19 七月 2025 10:59:04 +0800
Subject: [PATCH] 1.修改导出snmp oid表的脚本,增加网络设备 要提交的变更: 修改: local/bin/export.sh
---
local/www/js/page/warn-list.js | 195 ++++++++++++++----------------------------------
1 files changed, 57 insertions(+), 138 deletions(-)
diff --git a/local/www/js/page/warn-list.js b/local/www/js/page/warn-list.js
index 957476a..e766fbe 100644
--- a/local/www/js/page/warn-list.js
+++ b/local/www/js/page/warn-list.js
@@ -29,7 +29,7 @@
, trigger: 'click'
, theme: 'custom'
});
-
+ renderPageInfo(2,50);
//娓叉煋鎸夐挳浣嶇疆
renderParamBtn();
@@ -119,7 +119,7 @@
$.each(data, function (index, item) {
// if(item.flag == 0){
- html += '<tr><td><input class="ckeck" name="ckeck" type="checkbox" id="'+item.sn+'"/></td>';
+ html += '<tr>';
// html += '<td>' + (index + 1) + '</td>';
html += '<td>' + item.sn + '</td>';
html += '<td>' + item.name + '</td>';
@@ -172,7 +172,7 @@
"processTime": timeStr1(data.processTime),
"id": data.id
};
- console.log(comData);
+ // console.log(comData);
$.post("./cgi-bin/warn-list/update", JSON.stringify(comData), function (data, status) {
if ("success" == status) {
@@ -205,40 +205,19 @@
"processTime": new Date().Format("yyyy-MM-dd hh:mm:ss")
});
- if(screen.width==1920 && screen.height==1080){
- layer.open({
- skin: 'mypop',
- type: 1,
- title: false,
- area: ['50%', '62%'],
- closeBtn: 0,
- shade: 0,
- scrollbar: false,
- content: $('#editWarnDom')
- });
- }else if(screen.width==1280 && screen.height==1024){
- layer.open({
- skin: 'mypop',
- type: 1,
- title: false,
- area: ['80%', '64%'],
- closeBtn: 0,
- shade: 0,
- scrollbar: false,
- content: $('#editWarnDom')
- });
- }else{
- layer.open({
- skin: 'mypop',
- type: 1,
- title: false,
- area: ['50%', '62%'],
- closeBtn: 0,
- shade: 0,
- scrollbar: false,
- content: $('#editWarnDom')
- });
- }
+ var paramWH = getWH("detail");
+ layer.open({
+ skin: 'mypop',
+ type: 1,
+ title: false,
+ // area: ['50%', '62%'],
+ area: [paramWH.w, paramWH.h],
+ closeBtn: 0,
+ shade: 0,
+ scrollbar: false,
+ content: $('#editWarnDom')
+ });
+
};
@@ -260,11 +239,13 @@
"processTime": new Date().Format("yyyy-MM-dd hh:mm:ss")
});
+ var paramWH = getWH("detail");
layer.open({
skin: 'mypop',
type: 1,
title: false,
- area: ['50%', '62%'],
+ // area: ['50%', '62%'],
+ area: [paramWH.w, paramWH.h],
closeBtn: 0,
shade: 0,
scrollbar: false,
@@ -409,41 +390,18 @@
//鎵瑰鐞�
function batchHandle() {
- console.log("=============鎵瑰鐞�============");
- checkbox_warn = [];
- var b;
- var id= "";
- $('[name=ckeck]:checked').each(function() {
- id= "";
- b = false;
- b = $(this).prop('checked');
- if(b){
- id = $(this).attr('id');
- checkbox_warn.push(warnMap[id]);
- }
- });
- if(checkbox_warn.length <= 0){
- layer.msg("閫夋嫨涓嶈兘涓虹┖锛�");
- return;
- }
- console.log(checkbox_warn);
- for(var i=0;i<checkbox_warn.length;i++){
- if(checkbox_warn[i].flag !=0 ){
- console.log(checkbox_warn[i]);
- console.log("閫変腑鐨勬暟鎹腑瀛樺湪宸茬粡澶勭悊杩囩殑鏁版嵁锛�");
- layer.msg("閫変腑鐨勬暟鎹腑瀛樺湪宸茬粡澶勭悊杩囩殑鏁版嵁锛�");
- return;
- }
- }
+
$("#batch_processTime").attr("readOnly","readOnly");
$("#batch_processTime").val(new Date().Format("yyyy-MM-dd hh:mm:ss"));
+ var paramWH = getWH("batchHandle");
layer.open({
skin: 'mypop',
type: 1,
// title: '璀︽姤淇℃伅',
title: false,
- area: ['50%', '35%'],
+ // area: ['50%', '35%'],
+ area: [paramWH.w, paramWH.h],
closeBtn: 0,
shade: 0,
scrollbar: false,
@@ -458,46 +416,6 @@
//鎵归噺淇敼璀︽姤鐘舵��
function warnUpdateBatch() {
- // //鍚屾杩涜
- // $.ajaxSettings.async = false;
- // var param = {};
- // var note = $("#batch_note").val();
- // var processTime = $("#batch_processTime").val();
- // if(note){
- // if(checkbox_warn && checkbox_warn.length > 0){
- // for(var i=0;i<checkbox_warn.length;i++){
- // param = {};
- // param = {
- // "sn": checkbox_warn[i].sn,
- // "flag": 1,
- // "note": note,
- // "processTime": timeStr1(processTime),
- // "id": checkbox_warn[i].id
- // };
- // $.post("./cgi-bin/warn-list/update-batch", JSON.stringify(param), function (data, status) {
- // if ("success" == status) {
- // //鍏抽棴寮圭獥
- // // closepopBtn();
- // //閲嶆柊鍒锋柊姝ら〉闈㈡暟鎹�
- // // queryWarn();
- // } else {
- // window.parent.notify("澶勭悊澶辫触锛岃閲嶆柊鎿嶄綔锛�");
- // }
- // }, "json");
- // }
- // //鍏抽棴寮圭獥
- // closepopBtn();
- // //閲嶆柊鍒锋柊姝ら〉闈㈡暟鎹�
- // queryWarn();
- // }else{
- // layer.msg("娌℃湁閫変腑鏁版嵁锛岃鍏堥�変腑鏁版嵁锛�");
- // console.log("娌℃湁閫変腑鏁版嵁锛岃鍏堥�変腑鏁版嵁锛�");
- // }
- // }else{
- // layer.msg("澶勭悊璇存槑涓嶈兘涓虹┖锛�");
- // console.log("澶勭悊璇存槑涓嶈兘涓虹┖锛�");
- // }
-
//鍚屾杩涜
$.ajaxSettings.async = false;
@@ -509,7 +427,7 @@
if(note){
param = {
- "sn": sns,
+ // "sn": sns,
"note": note,
"processTime": timeStr1(processTime)
};
@@ -524,38 +442,6 @@
}
}, "json");
- // if(checkbox_warn && checkbox_warn.length > 0){
- // for(var i=0;i<checkbox_warn.length;i++){
- // sns += checkbox_warn[i].sn;
- // ids += checkbox_warn[i].id;
- // if(i < checkbox_warn.length -1){
- // sns += ",";
- // ids += ",";
- // }
- // }
- // param = {
- // "sn": sns,
- // "note": note,
- // "processTime": timeStr1(processTime)
- // };
- // $.post("./cgi-bin/warn-list/update-batch", JSON.stringify(param), function (data, status) {
- // if ("success" == status) {
- // //鍏抽棴寮圭獥
- // closepopBtn();
- // //閲嶆柊鍒锋柊姝ら〉闈㈡暟鎹�
- // queryWarn();
- // } else {
- // window.parent.notify("澶勭悊澶辫触锛岃閲嶆柊鎿嶄綔锛�");
- // }
- // }, "json");
- // // //鍏抽棴寮圭獥
- // // closepopBtn();
- // // //閲嶆柊鍒锋柊姝ら〉闈㈡暟鎹�
- // // queryWarn();
- // }else{
- // layer.msg("娌℃湁閫変腑鏁版嵁锛岃鍏堥�変腑鏁版嵁锛�");
- // console.log("娌℃湁閫変腑鏁版嵁锛岃鍏堥�変腑鏁版嵁锛�");
- // }
}else{
layer.msg("澶勭悊璇存槑涓嶈兘涓虹┖锛�");
console.log("澶勭悊璇存槑涓嶈兘涓虹┖锛�");
@@ -570,6 +456,9 @@
}else if(screen.width==1280 && screen.height==1024){
// $("#param-btn").addClass("layui-col-md4");
$("#param-btn").removeClass("layui-col-md4");
+ }else if(screen.width==1280 && screen.height==800){
+ // $("#param-btn").addClass("layui-col-md4");
+ $("#param-btn").removeClass("layui-col-md4");
}else{
// $("#param-btn").addClass("layui-col-md6");
$("#param-btn").removeClass("layui-col-md6");
@@ -578,4 +467,34 @@
}
+function getWH(tag) {
+ var res = {
+ w:"50%",
+ h:"64%"
+ };
+ if(screen.width==1920 && screen.height==1080){
+ res = {w:"80%",h:"64%"};
+ if(tag == "batchHandle"){
+ res = {w:"80%",h:"64%"};
+ }
+ }else if(screen.width==1280 && screen.height==1024){
+ res = {w:"80%",h:"64%"};
+ if(tag == "detail"){
+ res = {w:"80%",h:"95%"};
+ }
+ if(tag == "batchHandle"){
+ res = {w:"80%",h:"64%"};
+ }
+ }else if(screen.width==1280 && screen.height==800){
+ res = {w:"80%",h:"64%"};
+ if(tag == "detail"){
+ res = {w:"80%",h:"95%"};
+ }
+ if(tag == "batchHandle"){
+ res = {w:"80%",h:"64%"};
+ }
+ }
+ return res;
+}
+
--
Gitblit v1.9.3