角色图代码提交

This commit is contained in:
zhal 2022-06-30 19:59:35 +08:00
parent f37f7ea9dc
commit 27a638908c
8 changed files with 328 additions and 317 deletions

View File

@ -2924,15 +2924,15 @@ public class CoEPALController {
* @param
* @return
*/
@Mapping("com.actionsoft.apps.coe.pal_pl_repository_designer_relation_shape_createRole")
public String RelationShapeCreateRole(UserContext me,String uuid,String methodId) {
@Mapping("com.actionsoft.apps.coe.pal_pl_repository_designer_relation_shape_createDialogModel")
public String createDialogModel(UserContext me,String uuid,String methodId,String category) {
CoeProcessLevelWeb web = new CoeProcessLevelWeb(me);
return web.RelationShapeCreateRole(uuid,methodId);
return web.createDialogModel(uuid,methodId,category);
}
/**
* 查询是否有相同角色图数据
* 查询是否有相同角色/绩效图数据
* @param me
* @param
* @return

View File

@ -754,13 +754,13 @@ public class DesignerRelationShapeWeb extends ActionWeb {
// macroLibraries.put("treeData", getTreeJson(wsId, "", category, type, method));
// by bzp
//根据传入uuid,进行过滤保留当前流程的数据
String treeJson=getTreeJson(wsId, "", category, type, method,ruuid);
//JSONObject jsonObject = JSONObject.parseObject(json);
JSONArray jsonArr_new= new JSONArray();
JSONArray objects=JSONArray.parseArray(treeJson);
if (attrId.equals("role")) {//需要在pal写死相关文件上传的属性代码为related_files
//角色图属性代码是role/绩效图属性代码是
if (attrId.equals("role") || attrId.equals("performance")) {
if (objects != null) {
for (int i = 0; i < objects.size(); i++) {
JSONObject jsonObject = objects.getJSONObject(i);

View File

@ -21,6 +21,7 @@ import com.alibaba.fastjson.JSONObject;
import jodd.util.StringUtil;
import org.apache.commons.lang.StringUtils;
import org.apache.poi.ss.usermodel.Row;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
@ -166,7 +167,6 @@ public class SynchronousOrgJob implements IJob {
public void createPostData(String uuid,String departmentId,PALRepositoryModelImpl model){
Map<String, String> idRelationMap = new HashMap<>();
BaseModel defineModel = CoeDesignerAPIManager.getInstance().getDefinition(model.getId(), 0);
if(defineModel ==null ){
defineModel = CoeDesignerUtil.createModel(model.getId(),0);
@ -198,11 +198,14 @@ public class SynchronousOrgJob implements IJob {
String shapeId1 = UUIDGener.getObjectId();
//拿到基础结构
JSONObject shape1 = ShapeUtil.getProcessShapeDefinitionByName("org.normal", "position");
String postionname=orgdepartmentList.get(i).getString("POSITION_NAME");
if(StringUtil.isNotEmpty(postionname)){
String roleid=orgdepartmentList.get(i).getString("ROLEID");
String rolename=DBSql.getString("SELECT ROLENAME FROM ORGROLE WHERE ID=? AND ROLETYPE='1' ",roleid);
if(StringUtil.isNotEmpty(rolename)){
shape1.put("id", shapeId1);
shape1.put("text",orgdepartmentList.get(i).getString("POSITION_NAME"));
shape1.put("text",rolename);
JSONObject props1 = shape1.getJSONObject("props");// 位置大小

View File

@ -8125,7 +8125,7 @@ public class CoeProcessLevelWeb extends ActionWeb {
* @return
* by zhaolei
*/
public String RelationShapeCreateRole(String uuid,String methodId){
public String createDialogModel(String uuid,String methodId,String category){
ResponseObject ro = ResponseObject.newOkResponse();
try {
@ -8140,12 +8140,22 @@ public class CoeProcessLevelWeb extends ActionWeb {
String plRid = UUIDGener.getUUID();
String id = UUIDGener.getUUID();
String parentId = "org";
String titleName=null;
String shapName=null;
if(methodId.equals("control.kpi")){
titleName="绩效图";
shapName="kpi";
}else if(methodId.equals("org.role")){
titleName="角色图";
shapName="role";
}else if(methodId.equals("data.form")){
titleName="表单图";
shapName="form";
}
Timestamp nowTime = new Timestamp(System.currentTimeMillis());
PALRepositoryModelImpl model = CoeProcessLevelUtil.createPALRepositoryModel(id, plRid, "6f4e292c-1b90-4dd2-8c20-7da159cb20a5", plname + "-角色图",
"", 1, "org", "org", true, 1,
id, false, "org.role", "0", 1, null,
PALRepositoryModelImpl model = CoeProcessLevelUtil.createPALRepositoryModel(id, plRid, "6f4e292c-1b90-4dd2-8c20-7da159cb20a5", plname + titleName,
"", 1, shapName, category, true, 1,
id, false, methodId, "0", 1, null,
null, "admin", "admin", nowTime, null, uuid,
null, null, null, null, null, null, null, 1);
@ -8168,9 +8178,9 @@ public class CoeProcessLevelWeb extends ActionWeb {
//拿到基础结构
JSONObject shape = ShapeUtils.getProcessShapeDefinitionByName("org.role", "role");
JSONObject shape = ShapeUtils.getProcessShapeDefinitionByName(methodId, shapName);
shape.put("id", shapeId);
shape.put("text", "角色");
shape.put("text", titleName);
JSONObject props = shape.getJSONObject("props");// 位置大小
props.put("zindex", 0);
@ -8201,7 +8211,7 @@ public class CoeProcessLevelWeb extends ActionWeb {
/**
* 查找关联角色
* 查找关联角色/绩效数据
* @param uuid
* @return
*/

View File

@ -6,6 +6,7 @@
<script type="text/javascript" src="../commons/js/jquery/scripts/jquery.js"></script>
<script type="text/javascript" src="../commons/js/awsui.js"></script>
<script type="text/javascript" src="../commons/js/public.js"></script>
<!--designer css -->
<link type='text/css' rel='stylesheet' href='../apps/com.actionsoft.apps.coe.pal/lib/designer/themes/default/diagraming/designer.css'/>
<link type='text/css' rel='stylesheet' href='../apps/com.actionsoft.apps.coe.pal/lib/designer/themes/default/diagraming/ui.css'/>
@ -13,6 +14,8 @@
<!--coe css -->
<link rel="stylesheet" type="text/css" href="../<I18N#COEPATH>/css/<#coePortal>/coe.team.create.css">
<link rel="stylesheet" type="text/css" href="../<I18N#COEPATH>/css/public.css">
<link rel="stylesheet" href="../commons/css/awsui.css">
<!--process Level js-->
<script type="text/javascript" src="../<I18N#COEPATH>/js/coe.pal.processlevel.create.js"></script>
@ -157,6 +160,7 @@
<ul id="buttons" style="margin-top:10px;" class="clearfix">
<li class="attr_more" ></li>
<li><span title="点击打开附件管理" id="upfile" class="button">附件</span></li>
<li><span title="弹出在线编辑弹窗" id="onlineEdit" class="button">在线编辑</span></li>
</ul>
<div title="" style="width:250px;display:none;" id="attr_dialog-normal">
<div id='attr_content' style='margin:10px;height:280px;'>
@ -168,6 +172,8 @@
<iframe width="100%" id="upfile-content-iframe" name="upfile-content-iframe" frameBorder="0" style="width: 100%; height:100%;"></iframe>
</div>
</div>
<input type=hidden name=cmd>
<input type=hidden name=groupstyle value=0>
@ -186,6 +192,9 @@
<input type=hidden name=groupstylevalue>
<input type=hidden name=mail_target>
<input type=hidden name=mail_user>
</form>
<div id="textarea-dialog" title="" style="display:none; width:500px; height:300px;">
<textarea style="width:100%; height:215px; border:1px solid rgb(178, 178, 178);" class="awsui-input awsui-textarea"></textarea>
@ -193,12 +202,14 @@
<script>
$(document).ready(function(){
$('#dateTimePicker').datepicker({dateFmt:"yyyy-MM-dd HH:mm:ss"});
//更多特性权限
if($('#moreAttrRight').val() == "false") {
$("#showMoreAttrUL").remove();
}
$("#upfile").on('click',openUpFile);//附件上传页面
initCombobox(moreAttrRefs, $("#moreAttr"));
if (editable == "0") {
$("#frmMain table input, #frmMain table textarea, #frmMain table select").prop("disabled", true);

View File

@ -80,6 +80,8 @@
<script type='text/javascript' charset='UTF-8' src='../apps/com.actionsoft.apps.coe.pal/lib/designer/scripts/util.js'></script>
<!--扩展设计器的样式-->
<link type='text/css' rel='stylesheet' href='../apps/com.actionsoft.apps.coe.pal/lib/designer/extend/css/designer.extend.css' />
<!--针对设计器进行颜色扩展,以及文字扩充-->
<script type='text/javascript' charset='UTF-8' src='../apps/com.actionsoft.apps.coe.pal/lib/designer/extend/js/designer.extend.userdefined.js'></script>
<!-- <script type='text/javascript' charset='UTF-8' src='../apps/_bpm.platform/js/designer/extend/js/designer.extend.userdefined.js'></script>-->
@ -88,6 +90,7 @@
<script type="text/javascript" charset='UTF-8' src="../apps/com.actionsoft.apps.coe.pal/lib/designer/extend/js/util/json.js"></script>
<script type="text/javascript" src="../commons/js/jquery/scripts/ui/aws.util.js"></script>
<script type='text/javascript' src='../commons/js/public.js'></script>
<script type="text/javascript">
//公共信息
var appId = "<#appId>";
@ -290,6 +293,7 @@
if (navigator.userAgent.toLowerCase().match(/chrome/) != null) {
$(function() {
$(".footer_chrome").show();
});
}
</script>
@ -2825,8 +2829,8 @@
<iframe width="100%" id="upfile-content-iframe" name="upfile-content-iframe" frameBorder="0" style="width: 100%; height:100%;"></iframe>
</div>
</div>
<div id="visio_import_dlg" title="Visio导入" style="display: none;">
<div id="visio_import_dlg" title="Visio导入" style="display: none;">
<table class="awsui-ux" cellspacing="3" cellpadding="0" style="width: 100%; margin: 25px auto;">
<tr>
<td style="width: 250px;"><input id="visio_import_input" type="text" placeholder="请上传visio文件..." class="awsui-input" readonly=true style="width: 240px;" /></td>

View File

@ -14,62 +14,62 @@ jQuery(function() {
var ua = navigator.userAgent.toLowerCase();
var s;
(s = ua.match(/msie ([\d.]+)/)) ? Sys.ie = s[1] : (s = ua
.match(/firefox\/([\d.]+)/)) ? Sys.firefox = s[1] : (s = ua
.match(/chrome\/([\d.]+)/)) ? Sys.chrome = s[1] : (s = ua
.match(/opera.([\d.]+)/)) ? Sys.opera = s[1] : (s = ua
.match(/version\/([\d.]+).*safari/)) ? Sys.safari = s[1] : 0;
.match(/firefox\/([\d.]+)/)) ? Sys.firefox = s[1] : (s = ua
.match(/chrome\/([\d.]+)/)) ? Sys.chrome = s[1] : (s = ua
.match(/opera.([\d.]+)/)) ? Sys.opera = s[1] : (s = ua
.match(/version\/([\d.]+).*safari/)) ? Sys.safari = s[1] : 0;
/** ***********************调整buttonedit在不同页面下的样式********************************** */
if (parent.location.href.indexOf("com.actionsoft.apps.coe.pal_pl_repository_designer") != -1) {
if (Sys.firefox || Sys.safari) {
$("input[type=text].txt").css({
width : "233px",
height : "17px"
});
width : "233px",
height : "17px"
});
} else {
$("input[type=text].txt").css({
width : "235px",
height : "17px"
});
width : "235px",
height : "17px"
});
}
} else {
if (Sys.firefox || Sys.safari) {
$("input[type=text].txt").css({
width : "450px",
height : "17px"
});
width : "450px",
height : "17px"
});
} else {
$("input[type=text].txt").css({
width : "452px",
height : "17px"
});
width : "452px",
height : "17px"
});
}
}
initButtonEdit();
if (parent.location.href.indexOf("com.actionsoft.apps.coe.pal_pl_repository_designer") != -1) {
if (Sys.firefox) {
$(".awsui-buttonedit-right").css({
left : "208px",
top : "1px",
height : "25px"
});
left : "208px",
top : "1px",
height : "25px"
});
} else {
$(".awsui-buttonedit-right").css({
left : "210px",
top : "1px"
});
left : "210px",
top : "1px"
});
}
} else {
if (Sys.firefox) {
$(".awsui-buttonedit-right").css({
left : "424px",
top : "1px"
});
left : "424px",
top : "1px"
});
} else {
$(".awsui-buttonedit-right").css({
left : "426px",
top : "1px"
});
left : "426px",
top : "1px"
});
}
}
// 调整样式兼容性============================================END
@ -104,16 +104,16 @@ jQuery(function() {
jQuery("#plDescTD").attr("width", "20%");
if (Sys.firefox) {
$(".awsui-select").css({
width : "225px",
height : "21px"
});
width : "225px",
height : "21px"
});
$(".awsui-select-span").css("width", "220px");
$(".awsui-select-span span").css("width", "218px");
} else {
$(".awsui-select").css({
width : "230px",
height : "21px"
});
width : "230px",
height : "21px"
});
$(".awsui-select-span").css("width", "225px");
$(".awsui-select-span span").css("width", "223px");
}
@ -135,7 +135,7 @@ jQuery(function() {
$(".awsui-select").css("width", "448px");
}
*/
$(".awsui-select").css("width", "448px");
$(".awsui-select").css("width", "448px");
}
$(".awsui-select").customSelect();
// 为最顶级窗口添加一个弹窗
@ -167,15 +167,15 @@ function initButtonEdit() {
// }
// });
$("#plSecurityWName").buttonedit({
onClick : function() {
openManagerTree('m');
}
});
onClick : function() {
openManagerTree('m');
}
});
$("#plSecurityRName").buttonedit({
onClick : function() {
openManagerTree('r');
}
});
onClick : function() {
openManagerTree('r');
}
});
}
/**
@ -196,20 +196,20 @@ function getIsHasChildren(id, wsId) {
pid : id
};
jQuery.ajax({
type : "POST",
url : "./w?sid=" + encodeURIComponent(jQuery('#sid').val())
+ "&cmd=com.actionsoft.apps.coe.pal_processlevel_istreechildren",
data : params,
success : function(msg) {
result = msg;
if (result == 1 || editable == "0") {
jQuery("#plIsBottomLevel").attr("disabled", true);
result = "";
} else {
jQuery("#plIsBottomLevel").attr("disabled", false);
}
}
});
type : "POST",
url : "./w?sid=" + encodeURIComponent(jQuery('#sid').val())
+ "&cmd=com.actionsoft.apps.coe.pal_processlevel_istreechildren",
data : params,
success : function(msg) {
result = msg;
if (result == 1 || editable == "0") {
jQuery("#plIsBottomLevel").attr("disabled", true);
result = "";
} else {
jQuery("#plIsBottomLevel").attr("disabled", false);
}
}
});
}
function mouseUp(treeNode) {
@ -293,7 +293,7 @@ function saveAssociationProcess() {
function managerTreamTree(m) {
var sid = $("#sid").val();
var wsId = parent.$("#coeContent").get(0).contentWindow.document
.getElementById("coeContentiframe").contentWindow.$("#wsId").val();
.getElementById("coeContentiframe").contentWindow.$("#wsId").val();
var ids = "";
if (m == 'm') {
ids = jQuery("#plSecurityW").val();
@ -303,15 +303,15 @@ function managerTreamTree(m) {
jQuery('#teamIds').tree({
checkbox : true,
url : encodeURI('./w?sid=' + sid
+ '&cmd=COE_PAL_PROCESSLEVEL_TREAM_TREEJSON&wsid=' + wsId
+ "&ids=" + ids),
+ '&cmd=COE_PAL_PROCESSLEVEL_TREAM_TREEJSON&wsid=' + wsId
+ "&ids=" + ids),
onClick : function(node) {
},
onBeforeExpand : function(node, param) {
if (!node.checked) {
jQuery(this).tree('options').url = encodeURI('./w?sid=' + sid
+ '&cmd=COE_PAL_PROCESSLEVEL_TREAM_TREEJSON&wsid='
+ wsId + '&pid=' + node.pid + "&ids=" + ids);
+ '&cmd=COE_PAL_PROCESSLEVEL_TREAM_TREEJSON&wsid='
+ wsId + '&pid=' + node.pid + "&ids=" + ids);
}
},
onLoadSuccess : function(node, data) {
@ -391,13 +391,13 @@ function openmailtree(form, mail_target) {
var left = (width - 660) / 2;
var top = (height - 380) / 2;
window.open(
'../commons/wait.htm',
'openmailtree',
'left='
+ left
+ ',top='
+ top
+ ',width=660,height=380,location=no,menubar=no,toolbar=no,status=no,directories=no,scrollbars=no,resizable=no');
'../commons/wait.htm',
'openmailtree',
'left='
+ left
+ ',top='
+ top
+ ',width=660,height=380,location=no,menubar=no,toolbar=no,status=no,directories=no,scrollbars=no,resizable=no');
form.target = "openmailtree";
form.submit();
return false;
@ -464,7 +464,7 @@ function initCombobox(refs, parentObj) {
function replaceNotExitsId(str, tempArr) {
for (var index = 0; index < tempArr.length; index++) {
if (tempArr[index] != 0 && tempArr[index] != "0"
&& tempArr[index] != "") {
&& tempArr[index] != "") {
str = str.replace(tempArr[index] + "|", "");
}
}
@ -520,7 +520,7 @@ function getNotCheckedAttr(tempArr) {
var str = "";
for (var index = 0; index < tempArr.length; index++) {
if (tempArr[index] != 0 && tempArr[index] != "0"
&& tempArr[index] != "") {
&& tempArr[index] != "") {
str += "," + tempArr[index];
}
}
@ -532,7 +532,7 @@ function removeNotCheckedAttribute(tempArr, url1, data1) {
var str = "";
for (var index = 0; index < tempArr.length; index++) {
if (tempArr[index] != 0 && tempArr[index] != "0"
&& tempArr[index] != "") {
&& tempArr[index] != "") {
str += tempArr[index] + "|";
}
}
@ -540,34 +540,34 @@ function removeNotCheckedAttribute(tempArr, url1, data1) {
str = str.substring(0, str.lastIndexOf("|"));
data1 = data1 + "&attrJsonIds=" + str;
jQuery.ajax({
type : "POST",
url : url1,
data : data1,
success : function(msg) {
for (var index = 0; index < tempArr.length; index++) {
if (tempArr[index] != 0
&& tempArr[index] != "0"
&& tempArr[index] != "") {
$("#tr_" + tempArr[index] + "").remove();
}
}
/***************************************************
* 发送"删除属性"监听事件 begin
**************************************************/
var changeItems = {
action : "removeAttribute",
content : {
iframe : "file_attribute",
id : "moreAttr",
value : tempArr,
existIds : existIds
}
};
var messagesStr = JSON.stringify(changeItems);
sendListenEvent("[" + messagesStr + "]");
/** ***************发送"删除属性"监听事件 end****************** */
type : "POST",
url : url1,
data : data1,
success : function(msg) {
for (var index = 0; index < tempArr.length; index++) {
if (tempArr[index] != 0
&& tempArr[index] != "0"
&& tempArr[index] != "") {
$("#tr_" + tempArr[index] + "").remove();
}
});
}
/***************************************************
* 发送"删除属性"监听事件 begin
**************************************************/
var changeItems = {
action : "removeAttribute",
content : {
iframe : "file_attribute",
id : "moreAttr",
value : tempArr,
existIds : existIds
}
};
var messagesStr = JSON.stringify(changeItems);
sendListenEvent("[" + messagesStr + "]");
/** ***************发送"删除属性"监听事件 end****************** */
}
});
}
}
@ -622,9 +622,9 @@ function saveContent(obj) {
obj.addClass("required_input_css");
}
if (jsonContent.indexOf("</script>") > -1) {
$(obj).val("");
$.simpleAlert("禁止输入js脚本", "warning");
return;
$(obj).val("");
$.simpleAlert("禁止输入js脚本", "warning");
return;
}
//原先值与离焦时的值比较,相同则不触发事件
var originvalue = $(obj).attr("data-originvalue");
@ -647,36 +647,36 @@ function saveContent(obj) {
jsonContent = JSON.stringify(jsonContent);
}
jQuery.ajax({
type : "POST",
url : "./w?sid=" + encodeURIComponent(sid)
+ "&cmd=com.actionsoft.apps.coe.pal_processlevel_more_attr_content_save",
data : "uuid=" + uuid + "&josnKey=" + encodeURIComponent(id)
+ "&josnContent=" + jsonContent,
success : function(msg) {
if(awsui.decode(msg).result == "error") {
$.simpleAlert(awsui.decode(msg).msg, "error");
}
if(awsui.decode(msg).result == "ok") {
//修改成功将data-originvalue更新为最新值
if(originvalue != jsonContent){
$(obj).attr("data-originvalue",jsonContent);
}
}
if (msg == "true") {
// 发送"修改属性"监听事件
var changeItems = {
action : "updateAttribute",
content : {
iframe : "file_attribute",
id : id,
value : jsonContent
}
};
var messagesStr = JSON.stringify(changeItems);
sendListenEvent("[" + messagesStr + "]");
}
type : "POST",
url : "./w?sid=" + encodeURIComponent(sid)
+ "&cmd=com.actionsoft.apps.coe.pal_processlevel_more_attr_content_save",
data : "uuid=" + uuid + "&josnKey=" + encodeURIComponent(id)
+ "&josnContent=" + jsonContent,
success : function(msg) {
if(awsui.decode(msg).result == "error") {
$.simpleAlert(awsui.decode(msg).msg, "error");
}
if(awsui.decode(msg).result == "ok") {
//修改成功将data-originvalue更新为最新值
if(originvalue != jsonContent){
$(obj).attr("data-originvalue",jsonContent);
}
});
}
if (msg == "true") {
// 发送"修改属性"监听事件
var changeItems = {
action : "updateAttribute",
content : {
iframe : "file_attribute",
id : id,
value : jsonContent
}
};
var messagesStr = JSON.stringify(changeItems);
sendListenEvent("[" + messagesStr + "]");
}
}
});
}
var maskStackCount = 0;
@ -688,18 +688,18 @@ function mask(method) {
if (method == "open") {
if (maskStackCount <= 0) {
var mask = $("<div id='window-mask' class='window-mask' style='display:none'></div>")
.appendTo("body");
.appendTo("body");
mask.css({
width : winObj.width() + "px",
height : winObj.height() + "px",
filter : "alpha(opacity=60)"
}).show();
width : winObj.width() + "px",
height : winObj.height() + "px",
filter : "alpha(opacity=60)"
}).show();
winObj.on("resize.mask", function() {
mask.css({
width : winObj.width() + "px",
height : winObj.height() + "px"
});
});
mask.css({
width : winObj.width() + "px",
height : winObj.height() + "px"
});
});
}
maskStackCount++;
} else if (method == "close") {
@ -738,43 +738,42 @@ function filterRepeatAttribute(arr1, arr2) {
// }
function openUpFile() {
if (parent.isParentShow) {
var conObj = parent.$("#upfile-content").empty();
var str = '<iframe width="100%" id="upfile-content-iframe" name="upfile-content-iframe" frameBorder="0" style="width: 100%; height:100%;"></iframe>';
conObj.append(str);
parent.$("#upfile-dialog").attr("title", "附件");
parent.$('#upfile-content-iframe').attr(
'src',
"./w?sid=" + $("#sid").val()
+ "&cmd=com.actionsoft.apps.coe.pal_processlevel_upfile_portal_page&pl_uuid="
+ $("#id").val() + "&shape_uuid=" + "&type=file");
'src',
"./w?sid=" + $("#sid").val()
+ "&cmd=com.actionsoft.apps.coe.pal_processlevel_upfile_portal_page&pl_uuid="
+ $("#id").val() + "&shape_uuid=" + "&type=file");
parent.$("#upfile-dialog").dialog({
buttons : [{
text : '关闭',
handler : function() {
parent.$("#upfile-dialog").dialog("close");
}
}]
});
buttons : [{
text : '关闭',
handler : function() {
parent.$("#upfile-dialog").dialog("close");
}
}]
});
} else {
var conObj = $("#upfile-content").empty();
var str = '<iframe width="100%" id="upfile-content-iframe" name="upfile-content-iframe" frameBorder="0" style="width: 100%; height:100%;"></iframe>';
conObj.append(str);
$("#upfile-dialog").attr("title", "附件");
$('#upfile-content-iframe').attr(
'src',
"./w?sid=" + $("#sid").val()
+ "&cmd=com.actionsoft.apps.coe.pal_processlevel_upfile_portal_page&pl_uuid="
+ $("#id").val() + "&shape_uuid=" + "&type=file");
'src',
"./w?sid=" + $("#sid").val()
+ "&cmd=com.actionsoft.apps.coe.pal_processlevel_upfile_portal_page&pl_uuid="
+ $("#id").val() + "&shape_uuid=" + "&type=file");
$("#upfile-dialog").dialog({
buttons : [{
text : '关闭',
handler : function() {
$("#upfile-dialog").dialog("close");
}
}]
});
buttons : [{
text : '关闭',
handler : function() {
$("#upfile-dialog").dialog("close");
}
}]
});
}
}
@ -790,9 +789,9 @@ function sendListenEvent(messagesStr) {
ignore : "messages"
};
parent.CLB.cmdList = [{
"type" : "message",
"cmd" : "com.actionsoft.apps.coe.pal_pl_repository_designer_add_realtimeevents"
}];
"type" : "message",
"cmd" : "com.actionsoft.apps.coe.pal_pl_repository_designer_add_realtimeevents"
}];
parent.CLB.send(a);
}
}
@ -814,26 +813,26 @@ function openTextareaDialog(obj, title,id) {
parent.$("#textarea-dialog").dialog({
draggable: true,
buttons : [{
text : '确定',
cls : "blue",
handler : function() {
if (isRequired == 'true' && parent.$("#textarea-dialog textarea").val() == '') {
obj.val(parent.$("#textarea-dialog textarea").val());
obj.attr('placeholder',title+'不能为空')
obj.addClass("required_input_css");
parent.$("#textarea-dialog").dialog("close");
return
}
obj.val(parent.$("#textarea-dialog textarea").val());
saveContent($(obj));
parent.$("#textarea-dialog").dialog("close");
}
}, {
text : '取消',
handler : function() {
parent.$("#textarea-dialog").dialog("close");
}
}]
text : '确定',
cls : "blue",
handler : function() {
if (isRequired == 'true' && parent.$("#textarea-dialog textarea").val() == '') {
obj.val(parent.$("#textarea-dialog textarea").val());
obj.attr('placeholder',title+'不能为空')
obj.addClass("required_input_css");
parent.$("#textarea-dialog").dialog("close");
return
}
obj.val(parent.$("#textarea-dialog textarea").val());
saveContent($(obj));
parent.$("#textarea-dialog").dialog("close");
}
}, {
text : '取消',
handler : function() {
parent.$("#textarea-dialog").dialog("close");
}
}]
});
parent.$("#textarea-dialog textarea").focus();
} else {
@ -841,28 +840,28 @@ function openTextareaDialog(obj, title,id) {
$("#textarea-dialog").attr("title", title);
// $("#textarea-dialog textarea").blur();
$("#textarea-dialog").dialog({
buttons : [{
text : '确定',
cls : "blue",
handler : function() {
if (isRequired == 'true' && $("#textarea-dialog textarea").val() == '') {
obj.val($("#textarea-dialog textarea").val());
obj.attr('placeholder',title+'不能为空')
obj.addClass("required_input_css");
$("#textarea-dialog").dialog("close");
return
}
obj.val($("#textarea-dialog textarea").val());
saveContent($(obj));
$("#textarea-dialog").dialog("close");
}
}, {
text : '取消',
handler : function() {
$("#textarea-dialog").dialog("close");
}
}]
});
buttons : [{
text : '确定',
cls : "blue",
handler : function() {
if (isRequired == 'true' && $("#textarea-dialog textarea").val() == '') {
obj.val($("#textarea-dialog textarea").val());
obj.attr('placeholder',title+'不能为空')
obj.addClass("required_input_css");
$("#textarea-dialog").dialog("close");
return
}
obj.val($("#textarea-dialog textarea").val());
saveContent($(obj));
$("#textarea-dialog").dialog("close");
}
}, {
text : '取消',
handler : function() {
$("#textarea-dialog").dialog("close");
}
}]
});
$("#textarea-dialog textarea").focus();
}
@ -973,30 +972,30 @@ function openRelationDialog(obj, callback) {
var ref = obj.attr('ref');// 存储关联范围配置
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"),
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(),
modelId: $("#id").val(),
ruuid: uuid
},
id:"relationDialog",
buttons: [
{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')
},
id:"relationDialog",
buttons: [
{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 +'不能为空')
@ -1004,33 +1003,33 @@ function openRelationDialog(obj, callback) {
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");
}}
]
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");
}}
]
});
}

View File

@ -3417,6 +3417,8 @@ function getRelevanceAwsOrgNameByShapeId(objIds, shapeId) {
});
}
// 形状关联弹窗
function openRelationDig(obj,value) {
var shapeRelationValue = $("input[objid_shapeId='" + $(obj).attr("objid") + "']").val();
@ -3428,6 +3430,7 @@ function openRelationDig(obj,value) {
} else {
relationShapeIds = shapeRelationValue;
}
var methodId=JSON.parse(ref).method;
var id = sid;
var wsId = $("#wsId").val();
var shape = Utils.getSelected()[0];
@ -3449,48 +3452,29 @@ function openRelationDig(obj,value) {
+ "&relationShapeIds=" + relationShapeIds
+ "&relationFileIds=" + relationFileIds
+ "&ruuid=" + ruuid);
/*$("#attr_dialog_normal_relevance_shapes_div").dialog({
buttons : [{
text : '确定',
cls : "blue",
handler : function() {
var tmpObjId = $(obj).attr("objid");
getRelevanceShapes(tmpObjId,value);
var tmpShape = Utils.getSelected()[0];
var tmpTitle = tmpShape.title;
if (tmpShape.name == "linker") {
return;
}
if (tmpTitle.indexOf("泳道") > -1 || tmpTitle.indexOf("泳池") > -1 || tmpTitle.indexOf("分隔") > -1) {
return;
}
if (isForceShowError && tmpAttrIdValue.indexOf(tmpObjId) > -1) {
$.simpleAlert("已设置不允许修改,请在应用参数中设置", 'error');
isForceShowError = false;
}
tmpAttrIdValue = [];
}
}, {
text : '关闭',
handler : function() {
$("#attr_dialog_normal_relevance_shapes_div").dialog('close');
}
}]
});*/
//跳转角色图形,并新增角色图形
//根据角色/绩效图形,并新增对应图形
$.ajax({
type : "POST",
url : "./jd?sid="
+ CLB.sid
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer_relation_find_same_role",
data : {
uuid:ruuid
uuid:ruuid,
method:JSON.parse(ref).method
},
success : function(msg) {
debugger;
if (msg.data.result == "ok") {
var modelname="";
if(methodId=="control.kpi"){
modelname="新建绩效模型";
} else if(methodId=="org.role"){
modelname="新建角色模型";
} else if(methodId=="data.form"){
modelname="新建表单模型";
}
if (msg.data.result == "ok" ) {
$("#attr_dialog_normal_relevance_shapes_div").dialog({
buttons : [
{
@ -3520,7 +3504,7 @@ function openRelationDig(obj,value) {
}
}]
});
}else{
}else if(msg.data.result == "error" && (methodId=="control.kpi" || methodId=="org.role")){
$("#attr_dialog_normal_relevance_shapes_div").dialog({
buttons : [
@ -3532,18 +3516,18 @@ function openRelationDig(obj,value) {
document.getElementById("attr_content_iframe_relevance_shapes").contentWindow.location.reload(true);
}
},{
text : '新建角色模型',
text : modelname,
cls : "green",
handler : function() {
//跳转角色图形,并新增角色图形
//跳转角色/绩效图形,并新增角色/绩效图形
$.ajax({
type : "POST",
url : "./jd?sid="
+ CLB.sid
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer_relation_shape_createRole",
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer_relation_shape_createDialogModel",
data : {
uuid:ruuid,
methodId:JSON.parse(ref).method
methodId:methodId
},
success : function(msg) {
if (msg.result == "ok") {