Authored by wangtao

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

@@ -51,7 +51,7 @@ @@ -51,7 +51,7 @@
51 layui.config({ 51 layui.config({
52 base: '../src/' //指定 layuiAdmin 项目路径,本地开发用 src,线上用 dist 52 base: '../src/' //指定 layuiAdmin 项目路径,本地开发用 src,线上用 dist
53 // ,version: '1.2.1'//运行环境用个固定版本号 53 // ,version: '1.2.1'//运行环境用个固定版本号
54 - , version: new Date().getTime()//本地开发环境,避免改动后的文件未及时生效,所以用时间戳作为版本 54 + , version: 'V6.0.0'//本地开发环境,避免改动后的文件未及时生效,所以用时间戳作为版本
55 }).use('index'); 55 }).use('index');
56 </script> 56 </script>
57 </body> 57 </body>
@@ -1483,30 +1483,6 @@ layui.define(['xmSelect', 'md5'], function (exports) { @@ -1483,30 +1483,6 @@ layui.define(['xmSelect', 'md5'], function (exports) {
1483 } 1483 }
1484 }); 1484 });
1485 }, 1485 },
1486 - viewResTopo: function (resId) {  
1487 - layer.load(2);  
1488 - admin.req({  
1489 - url: obj.domainName + '/api-web/mxgraph/generateByResId',  
1490 - data: {resId},  
1491 - success(response) {  
1492 - layer.closeAll('loading');  
1493 - if (response && response.success) {  
1494 - layer.open({  
1495 - type: 2,  
1496 - content: obj.graphEditorOrigin + "/jgraph/grapheditor/viewer.html?access_token=" + localStorage.getItem('access_token') + '&id=' + response.str + "&layout=organic",  
1497 - area: ['98%', '98%'],  
1498 - title: ''  
1499 - });  
1500 - } else {  
1501 - layer.msg('生成资源拓扑失败!', {icon: 2});  
1502 - }  
1503 - },  
1504 - error() {  
1505 - layer.closeAll('loading');  
1506 - layer.msg('生成资源拓扑失败...', {icon: 2});  
1507 - }  
1508 - });  
1509 - },  
1510 viewAjView: function (reportCode, height, width) { 1486 viewAjView: function (reportCode, height, width) {
1511 layer.load(2); 1487 layer.load(2);
1512 admin.req({ 1488 admin.req({
@@ -1533,29 +1509,70 @@ layui.define(['xmSelect', 'md5'], function (exports) { @@ -1533,29 +1509,70 @@ layui.define(['xmSelect', 'md5'], function (exports) {
1533 } 1509 }
1534 }); 1510 });
1535 }, 1511 },
  1512 + viewResTopo: function (resId) {
  1513 + // layer.load(2);
  1514 + // admin.req({
  1515 + // url: obj.domainName + '/api-web/mxgraph/generateByResId',
  1516 + // data: {resId},
  1517 + // success(response) {
  1518 + // layer.closeAll('loading');
  1519 + // if (response && response.success) {
  1520 + // layer.open({
  1521 + // type: 2,
  1522 + // content: obj.graphEditorOrigin + "/jgraph/grapheditor/viewer.html?access_token=" + localStorage.getItem('access_token') + '&id=' + response.str + "&layout=organic",
  1523 + // area: ['98%', '98%'],
  1524 + // title: ''
  1525 + // });
  1526 + // } else {
  1527 + // layer.msg('生成资源拓扑失败!', {icon: 2});
  1528 + // }
  1529 + // },
  1530 + // error() {
  1531 + // layer.closeAll('loading');
  1532 + // layer.msg('生成资源拓扑失败...', {icon: 2});
  1533 + // }
  1534 + // });
  1535 +
  1536 + let win = window.parent;
  1537 + if (win) {
  1538 + window.parent.postMessage({
  1539 + type: 'dialog',
  1540 + message: {'params':{},'type':'openResTopo','title':'业务拓扑','params':{'resId':resId}}
  1541 + }, '*')
  1542 + }
  1543 + },
  1544 +
1536 viewBizTopo: function (busId) { 1545 viewBizTopo: function (busId) {
1537 - layer.load(2);  
1538 - admin.req({  
1539 - url: obj.domainName + '/api-web/mxgraph/generateByBusId',  
1540 - data: {busId},  
1541 - success(response) {  
1542 - layer.closeAll('loading');  
1543 - if (response && response.success) {  
1544 - layer.open({  
1545 - type: 2,  
1546 - content: obj.graphEditorOrigin + "/jgraph/grapheditor/viewer.html?access_token=" + localStorage.getItem('access_token') + '&id=' + response.str + "&layout=organic",  
1547 - area: ['98%', '98%'],  
1548 - title: ''  
1549 - });  
1550 - } else {  
1551 - layer.msg('生成业务拓扑失败!', {icon: 2});  
1552 - }  
1553 - },  
1554 - error() {  
1555 - layer.closeAll('loading');  
1556 - layer.msg('生成业务拓扑失败...', {icon: 2});  
1557 - }  
1558 - }); 1546 + // layer.load(2);
  1547 + // admin.req({
  1548 + // url: obj.domainName + '/api-web/mxgraph/generateByBusId',
  1549 + // data: {busId},
  1550 + // success(response) {
  1551 + // layer.closeAll('loading');
  1552 + // if (response && response.success) {
  1553 + // layer.open({
  1554 + // type: 2,
  1555 + // content: obj.graphEditorOrigin + "/jgraph/grapheditor/viewer.html?access_token=" + localStorage.getItem('access_token') + '&id=' + response.str + "&layout=organic",
  1556 + // area: ['98%', '98%'],
  1557 + // title: ''
  1558 + // });
  1559 + // } else {
  1560 + // layer.msg('生成业务拓扑失败!', {icon: 2});
  1561 + // }
  1562 + // },
  1563 + // error() {
  1564 + // layer.closeAll('loading');
  1565 + // layer.msg('生成业务拓扑失败...', {icon: 2});
  1566 + // }
  1567 + // });
  1568 +
  1569 + let win = window.parent;
  1570 + if (win) {
  1571 + window.parent.postMessage({
  1572 + type: 'dialog',
  1573 + message: {'params':{},'type':'openBizTopo','title':'业务拓扑','params':{'busId':busId}}
  1574 + }, '*')
  1575 + }
1559 }, 1576 },
1560 1577
1561 /** 1578 /**
@@ -36,10 +36,8 @@ @@ -36,10 +36,8 @@
36 36
37 }); 37 });
38 layui.config({ 38 layui.config({
39 - // base: '../src/' //指定 layuiAdmin 项目路径,本地开发用 src,线上用 dist  
40 -// ,version: '1.2.1'//运行环境用个固定版本号  
41 base: window.BASE_ROUTER_ID + '/src/', 39 base: window.BASE_ROUTER_ID + '/src/',
42 - version: new Date().getTime()//本地开发环境,避免改动后的文件未及时生效,所以用时间戳作为版本 40 + version: 'V6.0.0'//本地开发环境,避免改动后的文件未及时生效,所以用时间戳作为版本
43 }).use('index'); 41 }).use('index');
44 </script> 42 </script>
45 </body> 43 </body>