Authored by xwx

v32迁移prod 2#

... ... @@ -1100,7 +1100,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
$("#" + targetId).find(".chart-left-box .layui-table-link").unbind("click").on("click", function () {
var id = $(this).data("id");
var flag = $(this).data("flag");
/* var name = $(this).data("name");*/
/* var name = $(this).data("name");*/
var kpiName = $(this).data("kpiname");
var ident = $(this).data("ident");
var unit = $(this).data("unit");
... ... @@ -1389,156 +1389,17 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
linechart.setOption(option);
// 折线图的点击事件
linechart.off("click");
<<<<<<<<< Temporary merge branch 1
linechart.on('click', function (i) {
let array = [];
var arrayList;
if(kpiName=='网卡上行速率'||kpiName=='网卡下行速率'){
if (data){
$.each(data.series, function (i, v) {
if (v.flag!=null && v.flag!=undefined){
array.push(`<span id="selectFlag" class="layui-badge layui-bg-blue" style="margin:2px;z-index:99999">${v.flag}</span>`+"");
}else {
array.push('<div style="position:absolute;top:50%;left:50%;">无指标</div>')
}
});
arrayList= array.join(" ");
if (data.series.length>1){
let flagSelect =layer.open({
=========
//lsq 网卡上行速率/网卡下行速率折线图点击后的title出现null,500-dev迁移过来 2022-06-30
linechart.on('click', function (i) {
let array = [];
var arrayList;
if (kpiName == '网卡上行速率' || kpiName == '网卡下行速率') {
if (data) {
$.each(data.series, function (i, v) {
if (v.flag != null && v.flag != undefined) {
array.push(`<span id="selectFlag" class="layui-badge layui-bg-blue" style="margin:2px;z-index:99999">${v.flag}</span>` + "");
} else {
array.push('<div style="position:absolute;top:50%;left:50%;">无指标</div>')
}
});
arrayList = array.join(" ");
if (data.series.length > 1) {
let flagSelect = layer.open({
>>>>>>>>> Temporary merge branch 2
title: ['指标flag选择'],
type: 1,
area: ['30%', '15%'],
shadeClose: true,//开启遮罩层
id: 'flag_select_div',
// content: laytpl(res.body).render(JSON.stringify(params)),
<<<<<<<<< Temporary merge branch 1
content: '<div style="padding: 15px 18px">'+arrayList+'</div>',
});
$(document).on('click','#selectFlag',function(v) {
layer.close(flagSelect);
var seriesName= data.series[i.componentIndex].name;
if (seriesName == null ||seriesName == undefined) {
seriesName = '';
}
var seriesFlag= data.series[i.componentIndex].flag;
if (seriesFlag == null ||seriesFlag == undefined) {
=========
content: '<div style="padding: 15px 18px">' + arrayList + '</div>',
});
$(document).on('click', '#selectFlag', function (v) {
layer.close(flagSelect);
var seriesName = data.series[i.componentIndex].name;
if (seriesName == null || seriesName == undefined) {
seriesName = '';
}
var seriesFlag = data.series[i.componentIndex].flag;
if (seriesFlag == null || seriesFlag == undefined) {
>>>>>>>>> Temporary merge branch 2
seriesFlag = '';
}
var params = {
resId: resId,
kpiId: kpiId,
flag: seriesFlag,
warning: false,
ident: true,
trend: true,
<<<<<<<<< Temporary merge branch 1
name: (kpiNames&&kpiNames.length>0)?kpiNames[i.componentIndex]:kpiName + ' ' + seriesName //当传入多个kpiName,则将对应kpiId的kpiName获取传入的性能曲线页面
};
common.openLineChart(kpiName + ' ' + seriesName, params);
});
}else {
var seriesName= data.series[i.componentIndex].name;
if (seriesName == null ||seriesName == undefined) {
seriesName = '';
}
var seriesFlag= data.series[i.componentIndex].flag;
if (seriesFlag == null ||seriesFlag == undefined) {
=========
name: (kpiNames && kpiNames.length > 0) ? kpiNames[i.componentIndex] : kpiName + ' ' + seriesName //当传入多个kpiName,则将对应kpiId的kpiName获取传入的性能曲线页面
};
common.openLineChart(kpiName + ' ' + seriesName, params);
});
} else {
var seriesName = data.series[i.componentIndex].name;
if (seriesName == null || seriesName == undefined) {
seriesName = '';
}
var seriesFlag = data.series[i.componentIndex].flag;
if (seriesFlag == null || seriesFlag == undefined) {
>>>>>>>>> Temporary merge branch 2
seriesFlag = '';
}
var params = {
resId: resId,
kpiId: kpiId,
flag: seriesFlag,
warning: false,
ident: true,
trend: true,
<<<<<<<<< Temporary merge branch 1
name: (kpiNames&&kpiNames.length>0)?kpiNames[i.componentIndex]:kpiName + ' ' + seriesName //当传入多个kpiName,则将对应kpiId的kpiName获取传入的性能曲线页面
=========
name: (kpiNames && kpiNames.length > 0) ? kpiNames[i.componentIndex] : kpiName + ' ' + seriesName //当传入多个kpiName,则将对应kpiId的kpiName获取传入的性能曲线页面
>>>>>>>>> Temporary merge branch 2
};
common.openLineChart(kpiName + ' ' + seriesName, params);
}
}
<<<<<<<<< Temporary merge branch 1
}else {
var seriesName= data.series[i.componentIndex].name;
if (seriesName == null ||seriesName == undefined) {
seriesName = '';
}
var seriesFlag= data.series[i.componentIndex].flag;
if (seriesFlag == null ||seriesFlag == undefined) {
=========
} else {
var seriesName = data.series[i.componentIndex].name;
if (seriesName == null || seriesName == undefined) {
seriesName = '';
}
var seriesFlag = data.series[i.componentIndex].flag;
if (seriesFlag == null || seriesFlag == undefined) {
>>>>>>>>> Temporary merge branch 2
seriesFlag = '';
}
var params = {
resId: resId,
kpiId: kpiId,
flag: seriesFlag,
warning: false,
ident: true,
trend: true,
<<<<<<<<< Temporary merge branch 1
name: (kpiNames&&kpiNames.length>0)?kpiNames[i.componentIndex]:kpiName + ' ' + seriesName //当传入多个kpiName,则将对应kpiId的kpiName获取传入的性能曲线页面
=========
name: (kpiNames && kpiNames.length > 0) ? kpiNames[i.componentIndex] : kpiName + ' ' + seriesName //当传入多个kpiName,则将对应kpiId的kpiName获取传入的性能曲线页面
>>>>>>>>> Temporary merge branch 2
};
common.openLineChart(kpiName + ' ' + seriesName, params);
}
linechart.on('click', function (v) {
var params = {
resId: resId,
kpiId: kpiId.split(',').length==0?kpiId:kpiId.split(',')[v.componentIndex], //当kpiId为多个时,点击时获取对应kpiId
flag: data.series[v.componentIndex].flag,
warning: false,
ident: true,
trend: true,
name: (kpiNames&&kpiNames.length>0)?kpiNames[v.componentIndex]:kpiName + ' ' + data.series[v.componentIndex].name //当传入多个kpiName,则将对应kpiId的kpiName获取传入的性能曲线页面
};
common.openLineChart(kpiName + ' ' + data.series[v.componentIndex].name, params);
});
});
},
... ... @@ -2335,36 +2196,36 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
},
},
{
type: 'value',
name: datas.legendData[1],
nameTextStyle: {
fontSize: fontSize
},
color: normalColor,
axisTick: {
"show": false
},
splitLine: {
show: false,
},
min: 0,
max: 100,
interval: 25,
axisLabel: {
formatter: '{value}%',
textStyle: {
color: normalColor,
{
type: 'value',
name: datas.legendData[1],
nameTextStyle: {
fontSize: fontSize
}
},
axisLine: {
lineStyle: {
color: normalColor
}
},
},
color: normalColor,
axisTick: {
"show": false
},
splitLine: {
show: false,
},
min: 0,
max: 100,
interval: 25,
axisLabel: {
formatter: '{value}%',
textStyle: {
color: normalColor,
fontSize: fontSize
}
},
axisLine: {
lineStyle: {
color: normalColor
}
},
}
}
],
series: [{ // 绿色柱子
name: datas.legendData[0],
... ... @@ -2416,56 +2277,56 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
barGap: 0,
legendHoverLink: false,
},
{
// 绿色柱子头部椭圆
name: datas.legendData[0],
tooltip: {
show: false
},
type: 'pictorialBar',
itemStyle: {
normal: {
color: '#5DE6FF',
borderWidth: 1,
borderColor: '#94EFFF'
}
},
symbolRotate: 0,
symbolSize: symbolSize,
symbolOffset: symbolOffsetT,
symbolPosition: 'end',
data: datas.yData1,
z: 3
},
{
name: datas.legendData[1],
type: 'line',
yAxisIndex:1,
z:22,
symbol:"roundRect",
symbolSize:8,
itemStyle:{
normal:{
color:"#D68627"
}
},
label: {
normal: {
show: false,
position: 'top',
formatter: 'C',
textStyle: {
color: '#fff',
fontSize: 16
{
// 绿色柱子头部椭圆
name: datas.legendData[0],
tooltip: {
show: false
},
type: 'pictorialBar',
itemStyle: {
normal: {
color: '#5DE6FF',
borderWidth: 1,
borderColor: '#94EFFF'
}
}
},
lineStyle:{
width:2,
color:"#FFCE59"
},
symbolRotate: 0,
symbolSize: symbolSize,
symbolOffset: symbolOffsetT,
symbolPosition: 'end',
data: datas.yData1,
z: 3
},
data: datas.yData2,
}
{
name: datas.legendData[1],
type: 'line',
yAxisIndex:1,
z:22,
symbol:"roundRect",
symbolSize:8,
itemStyle:{
normal:{
color:"#D68627"
}
},
label: {
normal: {
show: false,
position: 'top',
formatter: 'C',
textStyle: {
color: '#fff',
fontSize: 16
}
}
},
lineStyle:{
width:2,
color:"#FFCE59"
},
data: datas.yData2,
}
]
};
... ... @@ -2479,39 +2340,39 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
},
renderStoreAlarms:function (tableId,resId){
var alarmlist = table.render({
elem: '#' + tableId
, url: common.domainName + '/api-web/busType/getStore'
, where: {
access_token: obj.sessions.getToken().access_token,
ResId: resId
elem: '#' + tableId
, url: common.domainName + '/api-web/busType/getStore'
, where: {
access_token: obj.sessions.getToken().access_token,
ResId: resId
}
, height: 'auto'
, page: {
layout: ['count', 'prev', 'page', 'next', 'limit', 'skip']
,theme: '#1E9FFF'
}
, limit: 5
, even: true
, cols: [[
{
field: 'provider', title: '存储品牌型号', align: 'center', width: 421,
}
, height: 'auto'
, page: {
layout: ['count', 'prev', 'page', 'next', 'limit', 'skip']
,theme: '#1E9FFF'
, {
field: 'model', title: '存储序列号', align: 'center',width: 421, sort: true,
}
, limit: 5
, even: true
, cols: [[
{
field: 'provider', title: '存储品牌型号', align: 'center', width: 421,
}
, {
field: 'model', title: '存储序列号', align: 'center',width: 421, sort: true,
}
, {
field: 'lunName', title: 'lun名称', align: 'center',width: 421
}
, {
field: 'lunSize', title: '大小', align: 'center', width: 421,
}
]],
done: function (res) {
if (res.data && res.data.length > 0) {
document.getElementById("hostminicomputerpartition_storeMessage").style.display="block"
}
, {
field: 'lunName', title: 'lun名称', align: 'center',width: 421
}
})
, {
field: 'lunSize', title: '大小', align: 'center', width: 421,
}
]],
done: function (res) {
if (res.data && res.data.length > 0) {
document.getElementById("hostminicomputerpartition_storeMessage").style.display="block"
}
}
})
},
/**
* 活动告警
... ... @@ -2541,7 +2402,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
{
field: 'LAY_INDEX', title: '序号', align: 'center', width: 100,
templet: function (d) {
return '<span>' + d.LAY_INDEX + '</span>';
return '<span>' + d.LAY_INDEX + '</span>';
}
}
, {
... ... @@ -3068,7 +2929,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
tooltip: {axisPointer: {type: "shadow"}, trigger: "axis"},
legend: {
show: true
},
},
xAxis: [
{
type: 'category',
... ... @@ -3324,9 +3185,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
title += `<a class="layui-icon filterList" data-id=${resId} lay-tips="指标过滤清单" style="margin-left: 10px"><i class="iconfont">&#XE516;</i></a>`;
title += `<a class="layui-icon res-view-relation-topo" data-id=${resId} lay-tips="查看资源关系拓扑" style="margin-left: 10px"><i class="iconfont">&#XE515;</i></a>`;
if (resCategory === 'share' && hardwareFlag.endsWith("Y")) {
/*
title += `<a class="layui-icon res-view-assets-details" data-ip=${ip} data-name=${name} data-restype=${resType} data-id=${resId} lay-tips="资产配置信息"><i class="iconfont">&#XE517;</i></a>`;
*/
}
if (res.state == 'new' && hardwareFlag.endsWith("N")){
layer.alert('资源未监控!',{icon:0});
... ... @@ -3349,9 +3208,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
title += `<a class="layui-icon filterList" data-id=${resId} lay-tips="指标过滤清单" style="margin-left: 10px"><i class="iconfont">&#XE516;</i></a>`;
title += `<a class="layui-icon res-view-relation-topo" data-id=${resId} lay-tips="查看资源关系拓扑" style="margin-left: 10px"><i class="iconfont">&#XE515;</i></a>`;
if (resCategory === 'share' && hardwareFlag.endsWith("Y")) {
/*
title += `<a class="layui-icon res-view-assets-details" data-ip=${ip} data-name=${name} data-restype=${resType} data-id=${resId} lay-tips="资产配置信息"><i class="iconfont">&#XE517;</i></a>`;
*/
}
obj.openNewWin(url,title,params,editFlag,fn,cancelfn,type);
}
... ... @@ -3390,36 +3247,6 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
},
//打开弹框
openNewWin:function (url,name,params,editFlag,fn,cancelfn,type,sign_) {
// Start Wang 2022/3/2 16:25 获取AJ配置页面信息
var type = 1;
var content = '';
admin.req({
url: common.domainName + `/api-web/ajConfig/getConfig?resType=${params.resType}&os=${params.os}&provider=${params.provider}`,
async: false,
data: {},
success(res) {
if(res && res.success && res.object){
var item = res.object;
type = 2;
var arr = [];
arr.push(item.designPage);
var param = item.param;
if(param){
param = param.replace('#resId',params.resId).replace('#access_token',localStorage.getItem("access_token"));
arr.push(param);
}
// 获取
content = sessionStorage.getItem("ajWeb") + '/#/bigscreen/viewer?reportCode=' + arr.join('&');
}
},
error() {
//layer.closeAll('loading');
}
});
// End Wang 2022/3/2 17:23
//新视图设置百分百
var area= sign_?['100%','100%']:['90%','90%'];
if(!name){ name = "信息"; }
... ... @@ -3432,24 +3259,24 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
view('commonViewModel').render(url).then(function (res) {
layer.open({
title: [name, 'font-size:20px;background-color: #d0ddec;'],
type: type,
type: 1,
id: md5(url),
area: area ,
shadeClose: true,//开启遮罩层
content: content == '' ? laytpl(res.body).render(JSON.stringify(params)) : content,
content: laytpl(res.body).render(JSON.stringify(params)),
btn:btns,
move:false,
success:function(layero,index){
if(sign_){
//关闭悬浮框有上角叉号
layero.find(".layui-layer-close1").addClass("hide");
}
if(params.state == 'stop' || params.state == 'alarmIgnore'){
$("a[data-opts='start']").show();
}else if(params.state == 'monitor'){
$("a[data-opts='stop']").show();
}
// 指标过滤清单
if(sign_){
//关闭悬浮框有上角叉号
layero.find(".layui-layer-close1").addClass("hide");
}
if(params.state == 'stop' || params.state == 'alarmIgnore'){
$("a[data-opts='start']").show();
}else if(params.state == 'monitor'){
$("a[data-opts='stop']").show();
}
// 指标过滤清单
$('a.filterList').unbind('click').on('click', function () {
if ($.inArray('back:details:index', checkList) == -1) {
layer.msg('暂无权限!', {icon: 7, time: 3000});
... ... @@ -3528,7 +3355,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
id: 'layer-select-favorites',
content: '<div class="div-select-favorites"><div id="slt-favorites-tree"></div></div>',
offset: '150px',
area: ['20%', '18%'],
area: ['20%', '15%'],
btn: ['选择', '取消'],
resize: false,
success: function () {
... ... @@ -3655,9 +3482,9 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
let boxShadow='0 0 10px';
listData.map((item,index)=>{
carouselStr+=item;
/* carouselStr+=` <div class="layui-row layui-col-space10" style="background: transparent;position: relative;" >
<span style="font-size: 14px;color:#ff0000;padding:0 5px; height:30px;width:100%;position: absolute;top:0;left:0;right:0;">`+item+`</span>
</div>`;*/
/* carouselStr+=` <div class="layui-row layui-col-space10" style="background: transparent;position: relative;" >
<span style="font-size: 14px;color:#ff0000;padding:0 5px; height:30px;width:100%;position: absolute;top:0;left:0;right:0;">`+item+`</span>
</div>`;*/
})
carouselStr+=` </marquee></div>`;
$('.layui-layer-title #title-shutdown').append(carouselStr);
... ... @@ -3711,68 +3538,6 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
});
});
},
validatorPhone: function (phone) {
if (/^(13[0-9]|14[01456879]|15[0-3,5-9]|16[2567]|17[0-8]|18[0-9]|19[0-3,5-9])d{8}$/.test(phone)) {
return {
code: 1,
msg: "验证通过"
}
}else if(/^(\(\d{3,4}\)|\d{3,4}-|\s)?\d{7,14}$/.test(phone)){
return {
code: 1,
msg: "验证通过"
}
}else{
return {
code: -1,
msg: "手机或者座机号码格式错误"
}
}
},
//身份证号码验证
validatorIDCard: function (idcode) {
if (typeof idcode !== 'string') {
return {
code: -1,
msg: "为了避免javascript数值范围误差,idcode 必须是字符串"
}
}
const idcard_patter = /^[1-9][0-9]{5}([1][9][0-9]{2}|[2][0][0|1][0-9])([0][1-9]|[1][0|1|2])([0][1-9]|[1|2][0-9]|[3][0|1])[0-9]{3}([0-9]|[X])$/;
// 判断格式是否正确
const format = idcard_patter.test(idcode);
if (!format) {
return {
code: -1,
msg: "身份证号码格式错误"
}
}
// 加权因子
const weight_factor = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2];
// 校验码
const check_code = ['1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2'];
const last = idcode[17];//最后一位
const seventeen = idcode.substring(0, 17);
// ISO 7064:1983.MOD 11-2
// 判断最后一位校验码是否正确
const arr = seventeen.split("");
const len = arr.length;
let num = 0;
for (let i = 0; i < len; i++) {
num += arr[i] * weight_factor[i];
}
// 获取余数
const resisue = num % 11;
const last_no = check_code[resisue];
// 返回验证结果,校验码和格式同时正确才算是合法的身份证号码
const result = last === last_no ? true : false;
return {
code: result ? 1 : -1,
msg: !result ? "身份证号码格式错误" : ""
}
},
//获取维保信息
renderMaintenanceInfo: function (targetId, resId, resType, fn) {
var flag = false; //默认没有父级
... ... @@ -3822,24 +3587,9 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
var direction = $(this).data('direction');
direction || (direction = 2);
var len = $(`#${targetId}`).find("li").eq(0).find("span").length;
<<<<<<<<< Temporary merge branch 1
var w = "420px";
if(len && len > 2){
w = '740px';
=========
var w = "400px";
//lsq 判断是否两列显示 2022-06-28
var count=$(this).data('count');
if(count>12){
//两列显示
w = '820px';
$(`#${targetId}`).addClass('info-table-two')
}else{
//一列显示
if(len && len > 2){
w = '720px';
}
>>>>>>>>> Temporary merge branch 2
if(len && len > 2){
w = '720px';
}
var $content = $(`#${targetId}`).clone();
$content.find('[lay-tips]').removeAttr('lay-tips');
... ... @@ -3855,28 +3605,15 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
//添加遮罩层 默认透明度为0.3
shade: [0.1, '#00000000'],
//是否点击遮罩关闭
shadeClose: false,
closeBtn:true,
success:function(){
let resId=$(`#${targetId}` + `_detail_row_menu.statusMenu`).data('resid')
$(`#${targetId}` + `_detail_row_menu.statusMenu`).hover(function () {
var $that = $(this);
var $btn = $that.find(".detail_row_menu");
if ($btn.length > 0) {
$(".layui-card-body").find(".detail_row_menu:not(.hide)").addClass("hide")
$btn.removeClass("hide");
}
});
filterSuppressMonitor(resId)
}
shadeClose: true
});
//xwx update 资源视图基本信息弹出框bug修改 2021-10-22 --end
window.detailTips = detailTips;
}
});
// ,function () {
// layer.close(detailTips);
// }
// ,function () {
// layer.close(detailTips);
// }
}
};
... ... @@ -3946,16 +3683,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
<option value="1">=选择告警策略=</option>
</select>
</div>
<div style="display: flex;">
<div class="layui-form-mid layui-word-aux">
<a style="height: 50px;line-height: 50px;" class="layui-btn layui-btn-normal" id="form_detail_add_policy"><i class="layui-icon">&#xe654;</i></a>
</div>
<div class="layui-form-mid layui-word-aux" id="show_corn_info_policy"
style="padding: 0!important;position: relative;line-height: 38px;display: flex;justify-content: center;margin: 0px;margin-left: 5px;">
<i class="layui-icon form-btn-icon">&#xe702;</i>
</div>
</div>
<div class="layui-form-mid layui-word-aux"><a style="height: 50px;line-height: 50px;" class="layui-btn layui-btn-normal" id="form_detail_add_policy"><i class="layui-icon">&#xe654;</i></a></div>
</div>
<div class="layui-form-item icon-label-item">
<label class="layui-form-label" style="text-align: center !important;width: 120px">告警订阅</label>
... ... @@ -3967,7 +3695,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
</div>
</form> `;
common.openWindow('user-add-form-id',$con,"告警设置","50%",'50%',['保存','取消'],function(){
common.openWindow('user-add-form-id',$con,"告警设置","45%",'50%',['保存','取消'],function(){
var kpiPolicy = $("#detil_kpi_policy").val();
var kpiSubscribe = $("#detil_kpi_subscribe").val();
if(!kpiPolicy || !kpiSubscribe){
... ... @@ -4000,25 +3728,6 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
bindAlarmPolicyList(undefined,params.kpiId);
bindAlarmSubscribeList();
$('#show_corn_info_policy').unbind("click").on("click",function (){
layer.open({
type: 1
, title: '告警策略'
, closeBtn: 1
, area: ['20%', '20%']
, shade: 0.8
, id: 'lay_cron_detail_add_policy' //设定一个id,防止重复弹出
, content: '<div id="icon_tips_alarm_Content" style="color:#000000">\n' +
' <p style="margin: 10px auto; padding: 0px;">\n' +
' <strong style="margin: 0px; padding: 0px;"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(255, 0, 0);">重点说明</span></strong>\n' +
' </p>\n' +
' <p style="margin: 10px auto; padding: 0px;">\n' +
' <span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(255, 0, 0);"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 0);">(1)</span></span><strong style="margin: 0px; padding: 0px;"><span style="margin: 0px; padding: 0px; line-height: 18px; color: rgb(0, 0, 255);"></span></strong>&nbsp;&nbsp;</span>&nbsp;策略类型只包含非默认的策略' +
' </p>\n' +
' </div>'
});
});
//自定义告警策略
$("#form_detail_add_policy").unbind("click").on("click",function (){
params.from = 'detail';
... ... @@ -4282,12 +3991,6 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
function filterSuppressMonitor(resId,isStatusMenubox){
//菜单按钮点击事件
$("a.detail_row_menu").off("click").on("click",function (e) {
if (e.preventDefault()) {
e.preventDefault();
}
if (e.stopPropagation()) {
e.stopPropagation();
}
$("#detail_menubox_id").remove();
var $menu = $(this);
var hideM = $menu.data('hidem');
... ... @@ -4367,7 +4070,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
$("#detail_menubox_id ul").append(menuboxStr)
}
setTimeout(function (){
//end lsq 2022-05-23
//end lsq 2022-05-23
//菜单点击事件
$("#detail_menubox_id ul>li").unbind("click").on("click",function (){
var type = $(this).attr("type");
... ... @@ -4427,31 +4130,6 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
},300)
});
//lsq 新增的8个指标中数值点击打开性能曲线图 2022-06-28
$(".isProbeDown").unbind('click').click(function (e) {
if (e.preventDefault()) {
e.preventDefault();
}
if (e.stopPropagation()) {
e.stopPropagation();
}
let kpiId=$(this).data('kpiid');
let flag=$(this).data('flag');
let warning=$(this).data('warning');
let ident=$(this).data('ident');
let trend=$(this).data('trend');
let name=$(this).data('name');
var params = {
resId: resId,
kpiId: kpiId,
flag: flag,
warning: warning,
ident: ident,
trend: trend,
name: name
};
common.openLineChart(name, params);
});
//点击空白处隐藏弹出菜单
$(document).click(function(event){
var _con = $('a.detail_row_menu'); // 设置目标区域
... ...