Authored by wangtao

fix:#1528 【拓扑视图】拓扑视图中,中卫市网络拓扑没有图标

... ... @@ -131,7 +131,7 @@ layui.define(['common', 'sessions', 'commonDetail', 'mxClient', 'cascader'], fun
// 旧版拓扑
$('#newViewGraphContainer').addClass('hide');
$('#viewGraphContainer').removeClass('hide');
var xml = res.object.xmlInfo;
var xml = res.object.xmlInfo.replace(/image=/g,"image=/monitor-web");
nodeInfo = res.map;
if (res.object.topoName) {
... ... @@ -141,7 +141,7 @@ layui.define(['common', 'sessions', 'commonDetail', 'mxClient', 'cascader'], fun
// 拓扑背景及样式
viewGraphcontainer.style.position = 'absolute';
viewGraphcontainer.style.overflow = 'hidden';
viewGraphcontainer.style.background = 'url("/src/lib/mxgraph/editors/images/grid.gif")';
viewGraphcontainer.style.background = 'url("/grapheditor-web/jgraph/grapheditor/images/grid.gif")';
// 开启方块上的文字编辑功能,解决分组块不能收缩问题
viewGraph.setCellsEditable(false);
... ... @@ -220,8 +220,13 @@ layui.define(['common', 'sessions', 'commonDetail', 'mxClient', 'cascader'], fun
if (evt.properties.event.button == 0) {//左键菜单
var cell = evt.getProperty('cell');
if (cell && cell != null && cell.edge != 1 && cell.childTopoId) {
$("#topo_view_childtop").attr("lay-href", "/mxgraph/view/from=v/id=" + cell.childTopoId);
$("#topo_view_childtop").trigger("click");
// $("#topo_view_childtop").attr("lay-href", "/mxgraph/view/from=v/id=" + cell.childTopoId);
// $("#topo_view_childtop").trigger("click");
var url = "/grapheditor-web/jgraph/grapheditor/index.html?access_token=" + accessToken + '&id=' + cell.childTopoId;
window.top.postMessage({
type: 'dialog',
message: {'params':{},'title':'子拓扑','url':url}
}, '*')
}
}
//渲染线条
... ... @@ -248,8 +253,19 @@ layui.define(['common', 'sessions', 'commonDetail', 'mxClient', 'cascader'], fun
menu.addSeparator();//分割线
menu.addItem('查看告警信息', null, function () {
if (topoNodesAlarmFlag[cell.cellId]) {
$("#topo_view_alarm_info").attr("lay-href", "/alarm/activewarning/resId=" + resIds.toString());
$("#topo_view_alarm_info").trigger('click');
// $("#topo_view_alarm_info").attr("lay-href", "/alarm/activewarning/resId=" + resIds.toString());
// $("#topo_view_alarm_info").trigger('click');
// 跳转告警管理
window.parent.postMessage({
type: 'custom-jump-menu-event',
message: {
'path':'',
'type':"JumpToAlarmManagement",
params:{
resId:resIds.toString()
}
}
}, '*')
} else {
layer.msg('非常健康,暂无告警信息!', {offset: '15px', icon: 1, time: 3000});
}
... ... @@ -300,7 +316,12 @@ layui.define(['common', 'sessions', 'commonDetail', 'mxClient', 'cascader'], fun
if (topoId) {
//编辑拓扑
$("#gotoedittopo").unbind('click').on("click", function () {
$(this).attr("lay-href", "/grapheditor-web/mxgraph/setting/id=" + topoId)
// $(this).attr("lay-href", "/grapheditor-web/mxgraph/setting/id=" + topoId)
var url = "/grapheditor-web/jgraph/grapheditor/index.html?access_token=" + accessToken + '&id=' + topoId;
window.top.postMessage({
type: 'dialog',
message: {'params':{},'title':'编辑拓扑','url':url}
}, '*')
});
}
} else if (res.object && res.object.xmlInfo && (new Date(res.object.createTime) > new Date('2021-03-23 17:28'))) {
... ... @@ -319,7 +340,7 @@ layui.define(['common', 'sessions', 'commonDetail', 'mxClient', 'cascader'], fun
var url = "/grapheditor-web/jgraph/grapheditor/index.html?access_token=" + accessToken + '&id=' + topoId;
// window.open(url);
window.parent.postMessage({
window.top.postMessage({
type: 'dialog',
message: {'params':{},'title':'编辑拓扑','url':url}
}, '*')
... ... @@ -343,9 +364,8 @@ layui.define(['common', 'sessions', 'commonDetail', 'mxClient', 'cascader'], fun
// $(this).attr("lay-href","/mxgraph/setting/id="+topoId);
//新版本
var url = "/grapheditor-web/jgraph/grapheditor/index.html?access_token=" + accessToken + '&id=' + topoId;
//window.open(url);
debugger
window.parent.postMessage({
window.top.postMessage({
type: 'dialog',
message: {'params':{},'title':'编辑拓扑','url':url}
}, '*')
... ...