...
|
...
|
@@ -18,7 +18,7 @@ layui.define(['common', 'sessions', 'commonDetail', 'mxClient', 'cascader'], fun |
|
|
//对外暴露的接口
|
|
|
exports('mxgraphView', function () {
|
|
|
var sessions = layui.sessions;
|
|
|
var accessToken = sessions.getToken().access_token;
|
|
|
var accessToken = common.getMjToken();
|
|
|
var router = layui.router();
|
|
|
var topoId = router.search.id;
|
|
|
var from = router.search.from;
|
...
|
...
|
@@ -300,7 +300,7 @@ layui.define(['common', 'sessions', 'commonDetail', 'mxClient', 'cascader'], fun |
|
|
if (topoId) {
|
|
|
//编辑拓扑
|
|
|
$("#gotoedittopo").unbind('click').on("click", function () {
|
|
|
$(this).attr("lay-href", "/mxgraph/setting/id=" + topoId)
|
|
|
$(this).attr("lay-href", "/grapheditor-web/mxgraph/setting/id=" + topoId)
|
|
|
});
|
|
|
}
|
|
|
} else if (res.object && res.object.xmlInfo && (new Date(res.object.createTime) > new Date('2021-03-23 17:28'))) {
|
...
|
...
|
@@ -312,11 +312,11 @@ layui.define(['common', 'sessions', 'commonDetail', 'mxClient', 'cascader'], fun |
|
|
//xwx 2021-10-29 拓扑视图下拉选择框默认回填 --end
|
|
|
// $("#mxgraph-topoTitle").text(" - " + res.object.topoName);
|
|
|
}
|
|
|
$('#newViewGraphContainer iframe').attr('src', `${common.graphEditorOrigin}/jgraph/grapheditor/viewer.html?access_token=${accessToken}&id=${topoId}`);
|
|
|
$('#newViewGraphContainer iframe').attr('src', `/grapheditor-web/jgraph/grapheditor/viewer.html?access_token=${accessToken}&id=${topoId}`);
|
|
|
if (topoId) {
|
|
|
//编辑拓扑
|
|
|
$("#gotoedittopo").unbind('click').on("click", function () {
|
|
|
var url = common.graphEditorOrigin + "/jgraph/grapheditor/index.html?access_token=" + accessToken + '&id=' + topoId;
|
|
|
var url = "/grapheditor-web/jgraph/grapheditor/index.html?access_token=" + accessToken + '&id=' + topoId;
|
|
|
window.open(url);
|
|
|
});
|
|
|
}
|
...
|
...
|
@@ -715,11 +715,11 @@ layui.define(['common', 'sessions', 'commonDetail', 'mxClient', 'cascader'], fun |
|
|
}
|
|
|
}
|
|
|
|
|
|
//拓扑树组件渲染
|
|
|
$.ajax({
|
|
|
admin.req({
|
|
|
url: common.domainName + '/api-web/mxgraph/getPageByTree?isDefault=1&access_token=' + accessToken,
|
|
|
type: 'get',
|
|
|
success: function (res) {
|
|
|
data: {
|
|
|
}
|
|
|
}).done(function (res) {
|
|
|
if (res && res.data) {
|
|
|
var data = res.data
|
|
|
var JtopoIds = res.str.split(',');
|
...
|
...
|
@@ -737,8 +737,6 @@ layui.define(['common', 'sessions', 'commonDetail', 'mxClient', 'cascader'], fun |
|
|
}
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
|
|
|
});
|
|
|
});
|
|
|
}); |
...
|
...
|
|