角色图代码提交

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;'>
@ -169,6 +173,8 @@
</div>
</div>
<input type=hidden name=cmd>
<input type=hidden name=groupstyle value=0>
<input type="hidden" name="plOrderIndex" id="plOrderIndex" value="<#plOrderIndex>">
@ -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>

View File

@ -738,7 +738,6 @@ 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>';

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") {