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";
});
};
就可以了。