...
|
...
|
@@ -1305,21 +1305,45 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele |
|
|
linechart.setOption(option);
|
|
|
// 折线图的点击事件
|
|
|
linechart.off("click");
|
|
|
linechart.on('click', function (v) {
|
|
|
var params = {
|
|
|
resId: resId,
|
|
|
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获取传入的性能曲线页面
|
|
|
};
|
|
|
var seriesName= data.series[v.componentIndex].name;
|
|
|
if (data.series[v.componentIndex].name == null ||data.series[v.componentIndex].name == undefined){
|
|
|
seriesName = '';
|
|
|
linechart.on('click', function (i) {
|
|
|
let array = [];
|
|
|
var arrayList;
|
|
|
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(" ");
|
|
|
}
|
|
|
common.openLineChart(kpiName + ' ' + seriesName, params);
|
|
|
let flagSelect =layer.open({
|
|
|
title: ['指标选择'],
|
|
|
type: 1,
|
|
|
area: ['30%', '30%'],
|
|
|
shadeClose: true,//开启遮罩层
|
|
|
id: 'flag_select_div',
|
|
|
// content: laytpl(res.body).render(JSON.stringify(params)),
|
|
|
content: '<div style="padding: 6px;">'+arrayList+'</div>',
|
|
|
});
|
|
|
$(document).on('click','#selectFlag',function(v) {
|
|
|
layer.close(flagSelect);
|
|
|
var seriesName= data.series[i.componentIndex].name;
|
|
|
if (data.series[i.componentIndex].name == null ||data.series[i.componentIndex].name == undefined){
|
|
|
seriesName = '';
|
|
|
}
|
|
|
var params = {
|
|
|
resId: resId,
|
|
|
kpiId: kpiId,
|
|
|
flag: v.currentTarget.innerHTML,
|
|
|
warning: false,
|
|
|
ident: true,
|
|
|
trend: true,
|
|
|
name: (kpiNames&&kpiNames.length>0)?kpiNames[i.componentIndex]:kpiName + ' ' + seriesName //当传入多个kpiName,则将对应kpiId的kpiName获取传入的性能曲线页面
|
|
|
};
|
|
|
common.openLineChart(kpiName + ' ' + seriesName, params);
|
|
|
});
|
|
|
});
|
|
|
});
|
|
|
},
|
...
|
...
|
|