Merge remote-tracking branch 'origin/apps_dev' into apps_dev
This commit is contained in:
commit
08c0c92a9d
Binary file not shown.
@ -169,4 +169,17 @@ public class SubProcessController {
|
|||||||
return processWeb.shapeOneClick(action, repositoryId, define);
|
return processWeb.shapeOneClick(action, repositoryId, define);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断一键展开与闭合的快捷操作按钮是否显示
|
||||||
|
* @param uc
|
||||||
|
* @param repositoryId
|
||||||
|
* @param elements
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.coe.method.process.subprocess.shape_expand_and_close_icon_show")
|
||||||
|
public String shapeExpandAndCloseIconShow(UserContext uc, String repositoryId, String elements){
|
||||||
|
SubProcessWeb processWeb = new SubProcessWeb(uc);
|
||||||
|
return processWeb.shapeExpandAndCloseIconShow(repositoryId, elements);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -347,6 +347,13 @@ public class SubProcessWeb extends ActionWeb {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点一键展开或者关闭
|
||||||
|
* @param action
|
||||||
|
* @param repositoryId
|
||||||
|
* @param define
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public String shapeOneClick(String action, String repositoryId, String define){
|
public String shapeOneClick(String action, String repositoryId, String define){
|
||||||
|
|
||||||
// 1、收集子流程节点
|
// 1、收集子流程节点
|
||||||
@ -380,4 +387,39 @@ public class SubProcessWeb extends ActionWeb {
|
|||||||
return ro.toString();
|
return ro.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 判断一键展开与闭合的快捷操作按钮是否显示
|
||||||
|
public String shapeExpandAndCloseIconShow(String repositoryId, String elements){
|
||||||
|
|
||||||
|
boolean showExpandFlag = false;
|
||||||
|
boolean showCloseFlag = false;
|
||||||
|
if (UtilString.isNotEmpty(elements)){
|
||||||
|
JSONObject elementsObj = JSONObject.parseObject(elements);
|
||||||
|
// 将连线以及内部没有元素的子流程节点过滤掉
|
||||||
|
Set<String> filterKeySet = elementsObj.keySet().stream()
|
||||||
|
.filter(key -> {
|
||||||
|
JSONObject ele = elementsObj.getJSONObject(key);
|
||||||
|
if ("linker".equals(ele.getString("name"))) return false;
|
||||||
|
try {
|
||||||
|
SubProcessNodeDefineUtil.readSubProcessNodeDefine(repositoryId, key);
|
||||||
|
} catch (AWSException e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}).collect(Collectors.toSet());
|
||||||
|
|
||||||
|
for (String key : filterKeySet) {
|
||||||
|
JSONObject shape = elementsObj.getJSONObject(key);
|
||||||
|
if ("subProcess".equals(shape.getString("name"))){
|
||||||
|
showExpandFlag = true;
|
||||||
|
}else if ("scopeLimitation".equals(shape.getString("name"))){
|
||||||
|
showCloseFlag = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ResponseObject ro = ResponseObject.newOkResponse();
|
||||||
|
ro.put("showExpandFlag", showExpandFlag);
|
||||||
|
ro.put("showCloseFlag", showCloseFlag);
|
||||||
|
return ro.toString();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,4 +42,8 @@
|
|||||||
<param name="repositoryId"/>
|
<param name="repositoryId"/>
|
||||||
<param name="define"/>
|
<param name="define"/>
|
||||||
</cmd-bean>
|
</cmd-bean>
|
||||||
|
<cmd-bean name="com.actionsoft.apps.coe.method.process.subprocess.shape_expand_and_close_icon_show">
|
||||||
|
<param name="repositoryId"/>
|
||||||
|
<param name="elements"/>
|
||||||
|
</cmd-bean>
|
||||||
</aws-actions>
|
</aws-actions>
|
||||||
@ -15,13 +15,7 @@ Designer.contextMenu.show = function(x, y) {
|
|||||||
menu.children("li[ac=processAttribute]").show();
|
menu.children("li[ac=processAttribute]").show();
|
||||||
var clipLen = Designer.clipboard.elements.length;
|
var clipLen = Designer.clipboard.elements.length;
|
||||||
if (methodId == 'process.subprocess') { // 当前建模为端到端
|
if (methodId == 'process.subprocess') { // 当前建模为端到端
|
||||||
let iconShow = window.subProcess.oneClickExpandAndCloseIconShow();
|
window.subProcess.oneClickExpandAndCloseIconShow();
|
||||||
if (iconShow.showExpandIcon){
|
|
||||||
menu.children("li[ac=oneClickExpand]").show();
|
|
||||||
}
|
|
||||||
if (iconShow.showCloseIcon){
|
|
||||||
menu.children("li[ac=oneClickClose]").show();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (currentFocus == null) {
|
if (currentFocus == null) {
|
||||||
// 画布
|
// 画布
|
||||||
@ -189,10 +183,8 @@ Designer.contextMenu.execAction = function(item) {
|
|||||||
} else if (action == 'addRearProcess') {// 关联至后置流程
|
} else if (action == 'addRearProcess') {// 关联至后置流程
|
||||||
showLeadAndRearProcessDlg('rear');
|
showLeadAndRearProcessDlg('rear');
|
||||||
}else if (action == 'oneClickExpand'){ // 子流程节点一键展开
|
}else if (action == 'oneClickExpand'){ // 子流程节点一键展开
|
||||||
$.simpleAlert('一键展开了');
|
|
||||||
window.subProcess.oneClickOperate('expand');
|
window.subProcess.oneClickOperate('expand');
|
||||||
}else if (action == 'oneClickClose'){ // 子流程节点一键闭合
|
}else if (action == 'oneClickClose'){ // 子流程节点一键闭合
|
||||||
$.simpleAlert('一键闭合了');
|
|
||||||
window.subProcess.oneClickOperate('close');
|
window.subProcess.oneClickOperate('close');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -179,7 +179,7 @@ class SubProcess {
|
|||||||
|
|
||||||
// 节点关闭事件
|
// 节点关闭事件
|
||||||
shapeClose(event){
|
shapeClose(event){
|
||||||
console.log('sss');
|
// console.log('sss');
|
||||||
let param = event.data;
|
let param = event.data;
|
||||||
awsui.ajax.request({
|
awsui.ajax.request({
|
||||||
url: './jd',
|
url: './jd',
|
||||||
@ -210,7 +210,7 @@ class SubProcess {
|
|||||||
|
|
||||||
// 一键展开或闭合
|
// 一键展开或闭合
|
||||||
oneClickOperate(action){
|
oneClickOperate(action){
|
||||||
console.log('oneClickExpand',this);
|
// console.log('oneClickExpand',this);
|
||||||
awsui.ajax.request({
|
awsui.ajax.request({
|
||||||
url: './jd',
|
url: './jd',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
@ -243,17 +243,29 @@ class SubProcess {
|
|||||||
let showExpandFlag = false;
|
let showExpandFlag = false;
|
||||||
let showCloseFlag = false;
|
let showCloseFlag = false;
|
||||||
let elements = this.Model.define.elements;
|
let elements = this.Model.define.elements;
|
||||||
for (let key in elements) {
|
awsui.ajax.request({
|
||||||
let shape = elements[key];
|
url: './jd',
|
||||||
if (shape.name == 'linker') continue;
|
method: 'POST',
|
||||||
if (shape.name == 'subProcess'){
|
async: false,
|
||||||
showExpandFlag = true;
|
data: {
|
||||||
}else if (shape.name == 'scopeLimitation'){
|
cmd: 'com.actionsoft.apps.coe.method.process.subprocess.shape_expand_and_close_icon_show',
|
||||||
showCloseFlag = true;
|
sid: this.sid,
|
||||||
|
repositoryId: this.repositoryId,
|
||||||
|
elements: JSON.stringify(elements)
|
||||||
|
},
|
||||||
|
ok: function (r) {
|
||||||
|
let menu = $("#designer_contextmenu");
|
||||||
|
if (r.data.showExpandFlag){
|
||||||
|
menu.children("li[ac=oneClickExpand]").show();
|
||||||
|
}
|
||||||
|
if (r.data.showCloseFlag){
|
||||||
|
menu.children("li[ac=oneClickClose]").show();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
err: function (r) {
|
||||||
|
$.simpleAlert(r.msg);
|
||||||
}
|
}
|
||||||
if (showExpandFlag && showCloseFlag) break;
|
});
|
||||||
}
|
|
||||||
return {showExpandIcon: showExpandFlag, showCloseIcon: showCloseFlag};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 文件修改提示
|
// 文件修改提示
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user