diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java index 584a38db..83af52cd 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java @@ -8881,6 +8881,7 @@ public class CoeProcessLevelWeb extends ActionWeb { */ public String relationFindSameRole(String uuid,String methodId){ ResponseObject ro = ResponseObject.newOkResponse(); + List data=new ArrayList(); data.add(0,methodId); data.add(1,uuid); diff --git a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/js/coe.pal.processlevel.create.js b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/js/coe.pal.processlevel.create.js index 608f7b79..0fd9e04b 100755 --- a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/js/coe.pal.processlevel.create.js +++ b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/js/coe.pal.processlevel.create.js @@ -981,12 +981,11 @@ function openRelationDialog(obj, callback) { var methodName=""; if(title=="支持文件"){ methodName="新建表单模型"; - //data.form method="data.form"; }else if(method=="control.kpi"){ methodName="新建绩效模型"; } - if(title=="支持文件" || method=="control.kpi"){ + if(method=="control.kpi") { //根据角色 $.ajax({ type: "POST", @@ -1001,10 +1000,10 @@ function openRelationDialog(obj, callback) { if (msg.data.result == "ok") { var relationDlg = parent.FrmDialog.open({ title: title, - width:710, + width: 710, height: 400, - url:"./w", - data:{ + url: "./w", + data: { sid: $("#sid").val(), cmd: "com.actionsoft.apps.coe.pal_pl_repository_designer_shapes_tree", wsId: $("#wsid").val(), @@ -1016,10 +1015,11 @@ function openRelationDialog(obj, callback) { modelId: $("#id").val(), ruuid: uuid }, - id:"relationDialog", + id: "relationDialog", buttons: [ - {text:'确定',cls:"blue",handler:function(){ + { + text: '确定', cls: "blue", handler: function () { var attrId = obj.attr("id"); var relationFileId = ""; var relationShapeId = ""; @@ -1028,15 +1028,15 @@ function openRelationDialog(obj, callback) { var isRequired = obj.attr('isRequired') if (isRequired == 'true' && relations.length == 0) { obj.val(''); - obj.attr('placeholder',title +'不能为空') + obj.attr('placeholder', title + '不能为空') obj.addClass("required_input_css"); parent.FrmDialog.close("relationDialog"); return; } if (relations != undefined && relations.length > 0) { - for(var i = 0; i < relations.length; i++) { + for (var i = 0; i < relations.length; i++) { var relationShape = relations[i]; - if(i == relations.length -1) { + if (i == relations.length - 1) { relationFileId += relationShape.relationFileId; relationShapeId += relationShape.relationShapeId; relationShapeText += relationShape.relationShapeText; @@ -1055,19 +1055,22 @@ function openRelationDialog(obj, callback) { saveContent(obj); } parent.FrmDialog.close("relationDialog"); - }}, - {text:'取消',handler:function(){ + } + }, + { + text: '取消', handler: function () { parent.FrmDialog.close("relationDialog"); - }} + } + } ] }); - }else{ + } else { var relationDlg = parent.FrmDialog.open({ title: title, - width:710, + width: 710, height: 400, - url:"./w", - data:{ + url: "./w", + data: { sid: $("#sid").val(), cmd: "com.actionsoft.apps.coe.pal_pl_repository_designer_shapes_tree", wsId: $("#wsid").val(), @@ -1079,57 +1082,56 @@ function openRelationDialog(obj, callback) { modelId: $("#id").val(), ruuid: uuid }, - id:"relationDialog", + id: "relationDialog", buttons: [ { - text : '刷新', - cls : "yellow", - handler : function() { + text: '刷新', + cls: "yellow", + handler: function () { // 刷新页面 parent.document.getElementById("id-awsui-win-frm-2013-frmrelationDialog").contentWindow.location.reload(true); } - },{ - text : methodName, - cls : "green", - handler : function() { - + }, { + text: methodName, + cls: "green", + handler: function () { //根据角色 $.ajax({ - type : "POST", - url : "./jd?sid=" + type: "POST", + url: "./jd?sid=" + $("#sid").val() + "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer_relation_find_same_role", - data : { - uuid:uuid, - methodId:method + data: { + uuid: uuid, + methodId: method }, - success : function(msg) { - if (msg.data.result== "ok") { - window.top.$.simpleAlert("请勿重复"+methodName+"!!!"); - }else{ + success: function (msg) { + if (msg.data.result == "ok") { + window.top.$.simpleAlert("请勿重复" + methodName + "!!!"); + } else { //跳转表单/绩效模型 $.ajax({ - type : "POST", - url : "./jd?sid=" + type: "POST", + url: "./jd?sid=" + $("#sid").val() + "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer_relation_shape_createDialogModel", - data : { - uuid:uuid, - methodId:method, - wsId:$("#wsid").val(), - teamId : $('#teamId').val() + data: { + uuid: uuid, + methodId: method, + wsId: $("#wsid").val(), + teamId: $('#teamId').val() }, - success : function(msg) { + success: function (msg) { if (msg.result == "ok") { //关闭新建按钮 - var dlgButton=parent.$(".dlg-button button"); - for(var i=0;i 0) { - for(var i = 0; i < relations.length; i++) { + for (var i = 0; i < relations.length; i++) { var relationShape = relations[i]; - if(i == relations.length -1) { + if (i == relations.length - 1) { relationFileId += relationShape.relationFileId; relationShapeId += relationShape.relationShapeId; relationShapeText += relationShape.relationShapeText; @@ -1177,19 +1180,120 @@ function openRelationDialog(obj, callback) { saveContent(obj); } parent.FrmDialog.close("relationDialog"); - }}, - {text:'取消',handler:function(){ + } + }, + { + text: '取消', handler: function () { parent.FrmDialog.close("relationDialog"); - }} + } + } ] }); } } - }); + }); + }else if(title=="支持文件"){ + var relationDlg = parent.FrmDialog.open({ + title: title, + width: 710, + height: 400, + url: "./w", + data: { + sid: $("#sid").val(), + cmd: "com.actionsoft.apps.coe.pal_pl_repository_designer_shapes_tree", + wsId: $("#wsid").val(), + ref: ref, + shapeId: "", + attrId: obj.attr("id"), + relationShapeIds: obj.attr("relationShapeId"), + relationFileIds: obj.attr("relationFileId"), + modelId: $("#id").val(), + ruuid: uuid + }, + id: "relationDialog", + buttons: [ + { + text: '刷新', + cls: "yellow", + handler: function () { + // 刷新页面 + parent.document.getElementById("id-awsui-win-frm-2013-frmrelationDialog").contentWindow.location.reload(true); + } + }, { + text: methodName, + cls: "green", + handler: function () { + //跳转表单/绩效模型 + $.ajax({ + type: "POST", + url: "./jd?sid=" + + $("#sid").val() + + "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer_relation_shape_createDialogModel", + data: { + uuid: uuid, + methodId: method, + wsId: $("#wsid").val(), + teamId: $('#teamId').val() + }, + success: function (msg) { + if (msg.result == "ok") { + window.open("./w?uuid=" + msg.data.uuid + "&teamId" + + "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid=" + encodeURIComponent($('#sid').val())); + } + } + }); + } + }, + { + text: '确定', cls: "blue", handler: function () { + var attrId = obj.attr("id"); + var relationFileId = ""; + var relationShapeId = ""; + var relationShapeText = ""; + var relations = relationDlg.win().getRelationShapeInfos(); + var isRequired = obj.attr('isRequired') + if (isRequired == 'true' && relations.length == 0) { + obj.val(''); + obj.attr('placeholder', title + '不能为空') + obj.addClass("required_input_css"); + parent.FrmDialog.close("relationDialog"); + return; + } + if (relations != undefined && relations.length > 0) { + for (var i = 0; i < relations.length; i++) { + var relationShape = relations[i]; + if (i == relations.length - 1) { + relationFileId += relationShape.relationFileId; + relationShapeId += relationShape.relationShapeId; + relationShapeText += relationShape.relationShapeText; + } else { + relationFileId += relationShape.relationFileId + ","; + relationShapeId += relationShape.relationShapeId + ","; + relationShapeText += relationShape.relationShapeText + ","; + } + } + } + obj.attr("attrId", attrId); + obj.attr("relationFileId", relationFileId); + obj.attr("relationShapeId", relationShapeId); + obj.val(relationShapeText); + if (callback && callback == "saveContent") { + saveContent(obj); + } + parent.FrmDialog.close("relationDialog"); + } + }, + { + text: '取消', handler: function () { + parent.FrmDialog.close("relationDialog"); + } + } + ] + }); }else{ var relationDlg = parent.FrmDialog.open({ title: title,