activiti modeler在线编辑器关闭跳转路劲自定义

activiti自身的modeler跳转是返回modeler.html页面的上一级地址,然而官方却把modeler放在了WEB-INF下,所以大家点关闭看到的都是直接返回首页。

经过断点研究js这个大坑,终于找到了关闭按钮的指向地址:editor-app——configuration——toolbar-default-actions.js

这个js就是modeler页面,editor-header 部分调用的执行js。

找到这个js中的

closeEditor: function(services) {
        	window.location.href = "./";
        }

假如你的路劲是:http://localhost:8080/workflow/modeler.html?Model=1025,这个方法得到的路径就是http://localhost:8080/workflow,相当于系统首页了。

将方法改为自己的路劲
closeEditor: function(services) {
        	window.location.href = "./bpm/model/index";
        }
得到的路劲就是:http://localhost:8080/workflow/bpm/model/index (这是我自身项目,模型列表页面),如果需要跳转其它页面,自己改路径就行了。


同样的,点击保存并关闭也是在这个js文件,找到

$scope.saveAndClose = function () {
    	$scope.save(function() {
    		window.location.href = "./";
    	});
    };
改为
$scope.saveAndClose = function () {
    	$scope.save(function() {
    		window.location.href = "./bpm/model/index";
    	});
    };
就可以了。


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值