Authored by wangtao

chore: 增加默认版本;拓扑跳转

... ... @@ -51,7 +51,7 @@
layui.config({
base: '../src/' //指定 layuiAdmin 项目路径,本地开发用 src,线上用 dist
// ,version: '1.2.1'//运行环境用个固定版本号
, version: new Date().getTime()//本地开发环境,避免改动后的文件未及时生效,所以用时间戳作为版本
, version: 'V6.0.0'//本地开发环境,避免改动后的文件未及时生效,所以用时间戳作为版本
}).use('index');
</script>
</body>
... ...
... ... @@ -1483,30 +1483,6 @@ layui.define(['xmSelect', 'md5'], function (exports) {
}
});
},
viewResTopo: function (resId) {
layer.load(2);
admin.req({
url: obj.domainName + '/api-web/mxgraph/generateByResId',
data: {resId},
success(response) {
layer.closeAll('loading');
if (response && response.success) {
layer.open({
type: 2,
content: obj.graphEditorOrigin + "/jgraph/grapheditor/viewer.html?access_token=" + localStorage.getItem('access_token') + '&id=' + response.str + "&layout=organic",
area: ['98%', '98%'],
title: ''
});
} else {
layer.msg('生成资源拓扑失败!', {icon: 2});
}
},
error() {
layer.closeAll('loading');
layer.msg('生成资源拓扑失败...', {icon: 2});
}
});
},
viewAjView: function (reportCode, height, width) {
layer.load(2);
admin.req({
... ... @@ -1533,29 +1509,70 @@ layui.define(['xmSelect', 'md5'], function (exports) {
}
});
},
viewResTopo: function (resId) {
// layer.load(2);
// admin.req({
// url: obj.domainName + '/api-web/mxgraph/generateByResId',
// data: {resId},
// success(response) {
// layer.closeAll('loading');
// if (response && response.success) {
// layer.open({
// type: 2,
// content: obj.graphEditorOrigin + "/jgraph/grapheditor/viewer.html?access_token=" + localStorage.getItem('access_token') + '&id=' + response.str + "&layout=organic",
// area: ['98%', '98%'],
// title: ''
// });
// } else {
// layer.msg('生成资源拓扑失败!', {icon: 2});
// }
// },
// error() {
// layer.closeAll('loading');
// layer.msg('生成资源拓扑失败...', {icon: 2});
// }
// });
let win = window.parent;
if (win) {
window.parent.postMessage({
type: 'dialog',
message: {'params':{},'type':'openResTopo','title':'业务拓扑','params':{'resId':resId}}
}, '*')
}
},
viewBizTopo: function (busId) {
layer.load(2);
admin.req({
url: obj.domainName + '/api-web/mxgraph/generateByBusId',
data: {busId},
success(response) {
layer.closeAll('loading');
if (response && response.success) {
layer.open({
type: 2,
content: obj.graphEditorOrigin + "/jgraph/grapheditor/viewer.html?access_token=" + localStorage.getItem('access_token') + '&id=' + response.str + "&layout=organic",
area: ['98%', '98%'],
title: ''
});
} else {
layer.msg('生成业务拓扑失败!', {icon: 2});
}
},
error() {
layer.closeAll('loading');
layer.msg('生成业务拓扑失败...', {icon: 2});
}
});
// layer.load(2);
// admin.req({
// url: obj.domainName + '/api-web/mxgraph/generateByBusId',
// data: {busId},
// success(response) {
// layer.closeAll('loading');
// if (response && response.success) {
// layer.open({
// type: 2,
// content: obj.graphEditorOrigin + "/jgraph/grapheditor/viewer.html?access_token=" + localStorage.getItem('access_token') + '&id=' + response.str + "&layout=organic",
// area: ['98%', '98%'],
// title: ''
// });
// } else {
// layer.msg('生成业务拓扑失败!', {icon: 2});
// }
// },
// error() {
// layer.closeAll('loading');
// layer.msg('生成业务拓扑失败...', {icon: 2});
// }
// });
let win = window.parent;
if (win) {
window.parent.postMessage({
type: 'dialog',
message: {'params':{},'type':'openBizTopo','title':'业务拓扑','params':{'busId':busId}}
}, '*')
}
},
/**
... ...
... ... @@ -36,10 +36,8 @@
});
layui.config({
// base: '../src/' //指定 layuiAdmin 项目路径,本地开发用 src,线上用 dist
// ,version: '1.2.1'//运行环境用个固定版本号
base: window.BASE_ROUTER_ID + '/src/',
version: new Date().getTime()//本地开发环境,避免改动后的文件未及时生效,所以用时间戳作为版本
version: 'V6.0.0'//本地开发环境,避免改动后的文件未及时生效,所以用时间戳作为版本
}).use('index');
</script>
</body>
... ...