Merge branch 'master-mj' of http://113.200.75.45:82/monitor_v3/hg-monitor-web into master-mj-joke
Showing
1 changed file
with
31 additions
and
11 deletions
@@ -131,7 +131,7 @@ layui.define(['common', 'sessions', 'commonDetail', 'mxClient', 'cascader'], fun | @@ -131,7 +131,7 @@ layui.define(['common', 'sessions', 'commonDetail', 'mxClient', 'cascader'], fun | ||
131 | // 旧版拓扑 | 131 | // 旧版拓扑 |
132 | $('#newViewGraphContainer').addClass('hide'); | 132 | $('#newViewGraphContainer').addClass('hide'); |
133 | $('#viewGraphContainer').removeClass('hide'); | 133 | $('#viewGraphContainer').removeClass('hide'); |
134 | - var xml = res.object.xmlInfo; | 134 | + var xml = res.object.xmlInfo.replace(/image=/g,"image=/monitor-web"); |
135 | nodeInfo = res.map; | 135 | nodeInfo = res.map; |
136 | 136 | ||
137 | if (res.object.topoName) { | 137 | if (res.object.topoName) { |
@@ -141,7 +141,7 @@ layui.define(['common', 'sessions', 'commonDetail', 'mxClient', 'cascader'], fun | @@ -141,7 +141,7 @@ layui.define(['common', 'sessions', 'commonDetail', 'mxClient', 'cascader'], fun | ||
141 | // 拓扑背景及样式 | 141 | // 拓扑背景及样式 |
142 | viewGraphcontainer.style.position = 'absolute'; | 142 | viewGraphcontainer.style.position = 'absolute'; |
143 | viewGraphcontainer.style.overflow = 'hidden'; | 143 | viewGraphcontainer.style.overflow = 'hidden'; |
144 | - viewGraphcontainer.style.background = 'url("/src/lib/mxgraph/editors/images/grid.gif")'; | 144 | + viewGraphcontainer.style.background = 'url("/grapheditor-web/jgraph/grapheditor/images/grid.gif")'; |
145 | 145 | ||
146 | // 开启方块上的文字编辑功能,解决分组块不能收缩问题 | 146 | // 开启方块上的文字编辑功能,解决分组块不能收缩问题 |
147 | viewGraph.setCellsEditable(false); | 147 | viewGraph.setCellsEditable(false); |
@@ -220,8 +220,13 @@ layui.define(['common', 'sessions', 'commonDetail', 'mxClient', 'cascader'], fun | @@ -220,8 +220,13 @@ layui.define(['common', 'sessions', 'commonDetail', 'mxClient', 'cascader'], fun | ||
220 | if (evt.properties.event.button == 0) {//左键菜单 | 220 | if (evt.properties.event.button == 0) {//左键菜单 |
221 | var cell = evt.getProperty('cell'); | 221 | var cell = evt.getProperty('cell'); |
222 | if (cell && cell != null && cell.edge != 1 && cell.childTopoId) { | 222 | if (cell && cell != null && cell.edge != 1 && cell.childTopoId) { |
223 | - $("#topo_view_childtop").attr("lay-href", "/mxgraph/view/from=v/id=" + cell.childTopoId); | ||
224 | - $("#topo_view_childtop").trigger("click"); | 223 | + // $("#topo_view_childtop").attr("lay-href", "/mxgraph/view/from=v/id=" + cell.childTopoId); |
224 | + // $("#topo_view_childtop").trigger("click"); | ||
225 | + var url = "/grapheditor-web/jgraph/grapheditor/index.html?access_token=" + accessToken + '&id=' + cell.childTopoId; | ||
226 | + window.top.postMessage({ | ||
227 | + type: 'dialog', | ||
228 | + message: {'params':{},'title':'子拓扑','url':url} | ||
229 | + }, '*') | ||
225 | } | 230 | } |
226 | } | 231 | } |
227 | //渲染线条 | 232 | //渲染线条 |
@@ -248,8 +253,19 @@ layui.define(['common', 'sessions', 'commonDetail', 'mxClient', 'cascader'], fun | @@ -248,8 +253,19 @@ layui.define(['common', 'sessions', 'commonDetail', 'mxClient', 'cascader'], fun | ||
248 | menu.addSeparator();//分割线 | 253 | menu.addSeparator();//分割线 |
249 | menu.addItem('查看告警信息', null, function () { | 254 | menu.addItem('查看告警信息', null, function () { |
250 | if (topoNodesAlarmFlag[cell.cellId]) { | 255 | if (topoNodesAlarmFlag[cell.cellId]) { |
251 | - $("#topo_view_alarm_info").attr("lay-href", "/alarm/activewarning/resId=" + resIds.toString()); | ||
252 | - $("#topo_view_alarm_info").trigger('click'); | 256 | + // $("#topo_view_alarm_info").attr("lay-href", "/alarm/activewarning/resId=" + resIds.toString()); |
257 | + // $("#topo_view_alarm_info").trigger('click'); | ||
258 | + // 跳转告警管理 | ||
259 | + window.parent.postMessage({ | ||
260 | + type: 'custom-jump-menu-event', | ||
261 | + message: { | ||
262 | + 'path':'', | ||
263 | + 'type':"JumpToAlarmManagement", | ||
264 | + params:{ | ||
265 | + resId:resIds.toString() | ||
266 | + } | ||
267 | + } | ||
268 | + }, '*') | ||
253 | } else { | 269 | } else { |
254 | layer.msg('非常健康,暂无告警信息!', {offset: '15px', icon: 1, time: 3000}); | 270 | layer.msg('非常健康,暂无告警信息!', {offset: '15px', icon: 1, time: 3000}); |
255 | } | 271 | } |
@@ -300,7 +316,12 @@ layui.define(['common', 'sessions', 'commonDetail', 'mxClient', 'cascader'], fun | @@ -300,7 +316,12 @@ layui.define(['common', 'sessions', 'commonDetail', 'mxClient', 'cascader'], fun | ||
300 | if (topoId) { | 316 | if (topoId) { |
301 | //编辑拓扑 | 317 | //编辑拓扑 |
302 | $("#gotoedittopo").unbind('click').on("click", function () { | 318 | $("#gotoedittopo").unbind('click').on("click", function () { |
303 | - $(this).attr("lay-href", "/grapheditor-web/mxgraph/setting/id=" + topoId) | 319 | + // $(this).attr("lay-href", "/grapheditor-web/mxgraph/setting/id=" + topoId) |
320 | + var url = "/grapheditor-web/jgraph/grapheditor/index.html?access_token=" + accessToken + '&id=' + topoId; | ||
321 | + window.top.postMessage({ | ||
322 | + type: 'dialog', | ||
323 | + message: {'params':{},'title':'编辑拓扑','url':url} | ||
324 | + }, '*') | ||
304 | }); | 325 | }); |
305 | } | 326 | } |
306 | } else if (res.object && res.object.xmlInfo && (new Date(res.object.createTime) > new Date('2021-03-23 17:28'))) { | 327 | } 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 | @@ -319,7 +340,7 @@ layui.define(['common', 'sessions', 'commonDetail', 'mxClient', 'cascader'], fun | ||
319 | var url = "/grapheditor-web/jgraph/grapheditor/index.html?access_token=" + accessToken + '&id=' + topoId; | 340 | var url = "/grapheditor-web/jgraph/grapheditor/index.html?access_token=" + accessToken + '&id=' + topoId; |
320 | // window.open(url); | 341 | // window.open(url); |
321 | 342 | ||
322 | - window.parent.postMessage({ | 343 | + window.top.postMessage({ |
323 | type: 'dialog', | 344 | type: 'dialog', |
324 | message: {'params':{},'title':'编辑拓扑','url':url} | 345 | message: {'params':{},'title':'编辑拓扑','url':url} |
325 | }, '*') | 346 | }, '*') |
@@ -343,9 +364,8 @@ layui.define(['common', 'sessions', 'commonDetail', 'mxClient', 'cascader'], fun | @@ -343,9 +364,8 @@ layui.define(['common', 'sessions', 'commonDetail', 'mxClient', 'cascader'], fun | ||
343 | // $(this).attr("lay-href","/mxgraph/setting/id="+topoId); | 364 | // $(this).attr("lay-href","/mxgraph/setting/id="+topoId); |
344 | //新版本 | 365 | //新版本 |
345 | var url = "/grapheditor-web/jgraph/grapheditor/index.html?access_token=" + accessToken + '&id=' + topoId; | 366 | var url = "/grapheditor-web/jgraph/grapheditor/index.html?access_token=" + accessToken + '&id=' + topoId; |
346 | - //window.open(url); | ||
347 | -debugger | ||
348 | - window.parent.postMessage({ | 367 | + |
368 | + window.top.postMessage({ | ||
349 | type: 'dialog', | 369 | type: 'dialog', |
350 | message: {'params':{},'title':'编辑拓扑','url':url} | 370 | message: {'params':{},'title':'编辑拓扑','url':url} |
351 | }, '*') | 371 | }, '*') |
-
Please register or login to post a comment