Merge remote-tracking branch 'origin/apps_dev' into apps_dev

This commit is contained in:
3120626891@qq.com 2022-07-20 09:57:52 +08:00
commit 80cdf5e29c
13 changed files with 466 additions and 110 deletions

View File

@ -320,10 +320,10 @@ public class Report1Gener {
int dangerIndex = 1;// 风险序号 int dangerIndex = 1;// 风险序号
int regulateIndex = 1;// 控制序号 int regulateIndex = 1;// 控制序号
for (Map<String, Object> shape : repositoryFileElements) { for (Map<String, Object> shape : repositoryFileElements) {
//如果图形元素不是流程步骤不导出该元素 //过滤导出的图形类型
// if (PrReportComment.PROCESS_STEP.indexOf((String)shape.get("type")) == -1 && "method_approval_node,method_service_node,method_manual_node".indexOf((String)shape.get("type")) == -1) { if ("method_approval_node,method_service_node,method_approval_node3,method_service_node4".indexOf((String)shape.get("type")) == -1) {
// continue; continue;
// } }
JSONObject _tr = new JSONObject(); JSONObject _tr = new JSONObject();
OutputWordUtil.setShapeDefaultValue2(repositoryId, _tr); //设置默认值 OutputWordUtil.setShapeDefaultValue2(repositoryId, _tr); //设置默认值
_tr.put(OutputWordUtil.SERIAL_NUMBER, index); //序号 _tr.put(OutputWordUtil.SERIAL_NUMBER, index); //序号

View File

@ -299,10 +299,10 @@ public class Report2Gener {
int dangerIndex = 1;// 风险序号 int dangerIndex = 1;// 风险序号
int regulateIndex = 1;// 控制序号 int regulateIndex = 1;// 控制序号
for (Map<String, Object> shape : repositoryFileElements) { for (Map<String, Object> shape : repositoryFileElements) {
//如果图形元素不是流程步骤不导出该元素 //过滤导出的图形类型
// if (PrReportComment.PROCESS_STEP.indexOf((String)shape.get("type")) == -1 && "method_approval_node,method_service_node,method_manual_node".indexOf((String)shape.get("type")) == -1) { if ("method_approval_node,method_service_node,method_approval_node3,method_service_node4".indexOf((String)shape.get("type")) == -1) {
// continue; continue;
// } }
JSONObject _tr = new JSONObject(); JSONObject _tr = new JSONObject();
OutputWordUtil.setShapeDefaultValue2(repositoryId, _tr); //设置默认值 OutputWordUtil.setShapeDefaultValue2(repositoryId, _tr); //设置默认值
_tr.put(OutputWordUtil.SERIAL_NUMBER, index); //序号 _tr.put(OutputWordUtil.SERIAL_NUMBER, index); //序号

View File

@ -116,8 +116,8 @@ public class PALMethodCache {
} else { } else {
List<String> result = new ArrayList<>(); List<String> result = new ArrayList<>();
//String[] methodArray = new String[] { "process", "org", "data", "itsystem", "control" }; //String[] methodArray = new String[] { "process", "org", "data", "itsystem", "control" };
String[] methodArray = new String[] { "process","data","control","org","itsystem"}; String[] methodArrays = new String[] { "process","data","control","org","itsystem"};
for (String method : methodArray) { for (String method : methodArrays) {
if (list.contains(method)) { if (list.contains(method)) {
result.add(method); result.add(method);
} }

View File

@ -320,10 +320,10 @@ public class OutPutReportWeb extends ActionWeb {
json.put("icon", "../apps/" + profile.getAppContext().getId() + "/img/parent16.png"); json.put("icon", "../apps/" + profile.getAppContext().getId() + "/img/parent16.png");
jsonArray.add(json); jsonArray.add(json);
} }
// 排序 pr or raci risk // 排序 pr or raci risk,加入制度手册与表单手册排序
if (jsonArray != null && !jsonArray.isEmpty()) { if (jsonArray != null && !jsonArray.isEmpty()) {
JSONArray temp = new JSONArray(); JSONArray temp = new JSONArray();
String [] arr = {"output_pr", "output_or", "output_raci", "output_risk"}; String [] arr = {"output_pr", "output_or", "output_raci","output_bd","output_zd","output_risk"};
for (int i = 0; i < arr.length; i++) { for (int i = 0; i < arr.length; i++) {
for (int j = 0; j < jsonArray.size(); j++) { for (int j = 0; j < jsonArray.size(); j++) {
if (arr[i].equals(jsonArray.getJSONObject(j).getString("id"))) { if (arr[i].equals(jsonArray.getJSONObject(j).getString("id"))) {

View File

@ -38,6 +38,8 @@ import com.actionsoft.bpms.commons.mvc.view.ResponseObject;
import com.actionsoft.bpms.commons.security.high.HighSecurity; import com.actionsoft.bpms.commons.security.high.HighSecurity;
import com.actionsoft.bpms.org.cache.DepartmentCache; import com.actionsoft.bpms.org.cache.DepartmentCache;
import com.actionsoft.bpms.org.model.DepartmentModel; import com.actionsoft.bpms.org.model.DepartmentModel;
import com.actionsoft.bpms.org.model.RoleModel;
import com.actionsoft.bpms.org.model.UserModel;
import com.actionsoft.bpms.server.DispatcherRequest; import com.actionsoft.bpms.server.DispatcherRequest;
import com.actionsoft.bpms.server.SSOUtil; import com.actionsoft.bpms.server.SSOUtil;
import com.actionsoft.bpms.server.UserContext; import com.actionsoft.bpms.server.UserContext;
@ -100,6 +102,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import org.apache.commons.collections4.IteratorUtils; import org.apache.commons.collections4.IteratorUtils;
import org.apache.commons.lang.StringUtils;
/** /**
* 资产库文件查询接口API封装 * 资产库文件查询接口API封装
@ -509,10 +512,7 @@ public class PALRepositoryQueryAPIManager {
while (it.hasNext()) { while (it.hasNext()) {
PALRepositoryModel model = it.next(); PALRepositoryModel model = it.next();
if (model.getWsId().equals(wsId) && category.contains(model.getMethodId())) { if (model.getWsId().equals(wsId) && category.contains(model.getMethodId())) {
boolean flag = true; boolean flag = !isUse || model.isUse();
if (isUse && !model.isUse()) {
flag = false;
}
if (isPublish && !model.isPublish()) { if (isPublish && !model.isPublish()) {
flag = false; flag = false;
} }
@ -2354,7 +2354,7 @@ public class PALRepositoryQueryAPIManager {
for (int i = 0; i < list.size(); i++) { for (int i = 0; i < list.size(); i++) {
PALRepositoryModel model = list.get(i); PALRepositoryModel model = list.get(i);
JSONObject obj = JSONObject.parseObject(model.toJson()); JSONObject obj = JSONObject.parseObject(model.toJson());
String openUrl = "./w?sid=" + _uc.getSessionId() + "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer_viewer" + "&uuid=" + model.getId() + "&openType=0&processDefId=" + model.getVersionId() + "&collaboration=1&teamId=&perms=v" + "&filePerms=" + filePerms.toString(); String openUrl = "./w?sid=" + _uc.getSessionId() + "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer_viewer" + "&uuid=" + model.getId() + "&openType=0&processDefId=" + model.getVersionId() + "&collaboration=1&teamId=&perms=v" + "&filePerms=" + filePerms;
obj.put("openUrl", openUrl); obj.put("openUrl", openUrl);
array.add(obj); array.add(obj);
} }
@ -2633,10 +2633,7 @@ public class PALRepositoryQueryAPIManager {
* @return 返回高频表中数据按照访问量降序若高频表数据不足返回符合条件的无序数据 * @return 返回高频表中数据按照访问量降序若高频表数据不足返回符合条件的无序数据
*/ */
public List<PALRepositoryModel> getFrequenceProcess(String wsId, String category, String methodId, int count) { public List<PALRepositoryModel> getFrequenceProcess(String wsId, String category, String methodId, int count) {
boolean hasCategory = false; boolean hasCategory = !UtilString.isEmpty(category);
if (!UtilString.isEmpty(category)) {
hasCategory = true;
}
boolean hasMehtod = false; boolean hasMehtod = false;
if (!UtilString.isEmpty(hasMehtod)) { if (!UtilString.isEmpty(hasMehtod)) {
hasMehtod = true; hasMehtod = true;
@ -4202,4 +4199,345 @@ public class PALRepositoryQueryAPIManager {
return dirPath; return dirPath;
} }
/**
* 根据模型ID查询所有文件扩展属性
*
* @param uuid
* @return
*/
public Map<String, JSONObject> queryRepositoryAttributeById(String uuid) {
Map<String, JSONObject> result = new HashMap<>();
PALRepositoryModel plModel = PALRepositoryCache.getCache().get(uuid);
// 获取所有文件属性
List<PALMethodAttributeModel> methodAttrModels = PALRepositoryAPIManager.getInstance().getValidAndUseAttributeModels(plModel.getWsId(), plModel.getMethodId());
if (methodAttrModels != null && methodAttrModels.size() > 0) {
Map<String, PALMethodAttributeModel> attributeModelMap = new HashMap<>();
Map<String, Integer> sortAttrMap = new HashMap<>();
if (methodAttrModels != null) {
int sort = 0;
for (PALMethodAttributeModel attr : methodAttrModels) {
attributeModelMap.put(attr.getKey(), attr);
sortAttrMap.put(attr.getKey(), ++sort);
}
}
List<PALRepositoryPropertyModel> propertys = PALRepositoryPropertyCache.getPropertyByPlId(plModel.getId());
// 排序
// propertys.sort((p1, p2) -> (sortAttrMap.containsKey(p1.getPropertyId()) ? sortAttrMap.get(p1.getPropertyId()) : 0) - (sortAttrMap.containsKey(p2.getPropertyId()) ? sortAttrMap.get(p2.getPropertyId()) : 0));
for (PALRepositoryPropertyModel property : propertys) {
String id = property.getPropertyId();
if (!attributeModelMap.containsKey(id) || !attributeModelMap.get(id).getUse()) {
continue;
}
PALMethodAttributeModel attributeModel = attributeModelMap.get(id);
// 记录结果集
JSONObject attrObj = new JSONObject();
attrObj.put("ref", attributeModel.getRef());// ref
attrObj.put("type", attributeModel.getType());// 类型 relation string ...
attrObj.put("attrId", attributeModel.getKey());// 属性key
attrObj.put("attrTitle", attributeModel.getNewTitle());// 属性标题
attrObj.put("text", "");// 属性内容单行文本
attrObj.put("value", new JSONArray());// 属性内容集relation或awsorg类型时存储对应的json数据
String inputValue = property.getPropertyValue();
if ("relation".equals(attributeModel.getType())) {
List<String> inputValueList = new ArrayList<>();
List<DesignerShapeRelationModel> list = DesignerShapeRelationCache.getListByAttrId(plModel.getId(), "", attributeModel.getKey());
if (list != null && list.size() > 0) {
// 判断是否有重复数据进行重复过滤
Set<String> tempStrs = new HashSet<>();
List<DesignerShapeRelationModel> tempList = new ArrayList<>();
for (int i = 0; i < list.size(); i++) {
DesignerShapeRelationModel model = list.get(i);
String str = model.getFileId() + model.getShapeId() + model.getAttrId() + model.getRelationFileId() + model.getRelationShapeId();
if (!tempStrs.contains(str)) {
tempList.add(model);
tempStrs.add(str);
}
}
list = tempList;
for (int i = 0; i < list.size(); i++) {
DesignerShapeRelationModel model = list.get(i);
JSONObject refObj = JSONObject.parseObject(attributeModel.getRef());
String relationTyp = refObj.containsKey("type") ? refObj.getString("type") : "shape";
if ("file".equals(relationTyp)) {// 关联的模型文件
if (model.getRelationFileId().length() < 36) {
continue;
}
List<PALRepositoryModel> list2 = PALRepositoryCache.getByVersionId(plModel.getWsId(), model.getRelationFileId());
for (PALRepositoryModel model2 : list2) {
if (model2.isUse()) {
inputValueList.add(model2.getName());
JSONObject tmp = new JSONObject();
tmp.put("fileId", model2.getId());
tmp.put("name", model2.getName());
tmp.put("isFile", true);
attrObj.getJSONArray("value").add(tmp);
break;
}
}
} else {
inputValueList.add(model.getRelationShapeText());
JSONObject tmp = new JSONObject();
tmp.put("fileId", model.getRelationFileId());
tmp.put("shapeId", model.getRelationShapeId());
tmp.put("name", model.getRelationShapeText());
tmp.put("isFile", false);
attrObj.getJSONArray("value").add(tmp);
}
}
}
inputValue = StringUtils.join(inputValueList, ",");
}
// 关联bpm组织架构
if ("awsorg".equals(attributeModel.getType())) {
List<DesignerShapeRelationModel> list = DesignerShapeRelationCache.getListByAttrId(plModel.getId(), "", attributeModel.getKey());
List<String> deptValList = new ArrayList<>();
List<String> positionValList = new ArrayList<>();
List<String> roleValList = new ArrayList<>();
List<String> userValList = new ArrayList<>();
if (list != null && list.size() > 0) {
Set<String> filter = new HashSet<String>();// 去重记录
list.sort((m1, m2) -> {
return m1.getId().compareTo(m2.getId());
});
for (DesignerShapeRelationModel model : list) {
if ("00000000-0000-0000-0000-000000000000".equals(model.getRelationFileId()) && "00000000-0000-0000-0000-000000000000".equals(model.getRelationShapeId())) {
JSONObject object = JSONObject.parseObject(model.getRelationShapeText());
boolean flag = false;
// 查询最新名称
if ("department".equals(object.getString("type"))) {
DepartmentModel dept = SDK.getORGAPI().getDepartmentById(object.getString("id"));
if (dept != null && !filter.contains(dept.getId())) {
deptValList.add(dept.getName());
filter.add(dept.getId());
flag = true;
}
}
if ("position".equals(object.getString("type"))) {// 岗位先用角色代替
RoleModel role = SDK.getORGAPI().getRoleById(object.getString("id"));
if (role != null && !filter.contains(role.getId())) {
positionValList.add(role.getName());
filter.add(role.getId());
flag = true;
}
}
if ("user".equals(object.getString("type"))) {
UserModel user = SDK.getORGAPI().getUser(object.getString("id"));
if (user != null && !filter.contains(user.getUID())) {
userValList.add(user.getUserName());
filter.add(user.getUID());
flag = true;
}
}
if ("role".equals(object.getString("type"))) {
RoleModel role = SDK.getORGAPI().getRoleById(object.getString("id"));
if (role != null && !filter.contains(role.getId())) {
roleValList.add(role.getName());
filter.add(role.getId());
flag = true;
}
}
if (flag) {
attrObj.getJSONArray("value").add(object);
}
}
}
}
// 数据组合
deptValList.addAll(positionValList);
deptValList.addAll(roleValList);
deptValList.addAll(userValList);
inputValue = StringUtils.join(deptValList, ",");
}
inputValue = inputValue.replaceAll("'", "&apos;");
inputValue = inputValue.replaceAll("\"", "&quot;");
attrObj.put("text", inputValue);
result.put(attributeModel.getKey(), attrObj);
}
}
return result;
}
/**
* 根据模型和形状查询所有形状扩展属性
*
* @param uuid
* @param shapeId
* @param shapeObject 当前节点的定义json可以通过PALRepositoryQueryAPIManager.getInstance().getProcessDefinition获取string--转换JSONObject--获取elements--elements.getJSONObject(shapeId)得到
* @param separator 分隔符不清楚作用请给null或""
* @return
*/
public Map<String, JSONObject> queryRepositoryShapeAttributeById(String uuid, String shapeId, JSONObject shapeObject, String separator) {
separator = UtilString.isEmpty(separator) ? "," : separator;
Map<String, JSONObject> result = new HashMap<>();
PALRepositoryModel model = PALRepositoryCache.getCache().get(uuid);
String methodId = model.getMethodId();
String wsId = model.getWsId();
JSONObject dataAttributes = ShapeUtil.getCustom(shapeObject.getJSONArray("dataAttributes"));
JSONArray attributesJsonArray = dataAttributes.containsKey("attributesJsonArray") ? dataAttributes.getJSONArray("attributesJsonArray") : new JSONArray(); //扩展属性
// 查询属性数据集合
Map<String, JSONObject> attrDataMap = new HashMap<>();
for (Object obj : attributesJsonArray) {
if (obj == null) {
continue; //删除的节点不存在
}
JSONObject jsonObj = (JSONObject) obj;
if (!jsonObj.containsKey("groupPath") || UtilString.isEmpty(jsonObj.getString("groupPath"))) {
continue; //排除组
}
if (!jsonObj.containsKey("type") || UtilString.isEmpty(jsonObj.getString("type"))) {
continue; //排除无type的
}
attrDataMap.put(jsonObj.getString("key"), jsonObj);
}
// 获取形状的属性配置有效且使用中
List<PALMethodAttributeModel> methodAttrModels = CoeDesignerShapeAPIManager.getInstance().getValidAndUseAttributeModels(wsId, methodId, shapeObject.getString("name"), methodId);
for (PALMethodAttributeModel attributeModel : methodAttrModels) {
// 记录结果集
JSONObject attrObj = new JSONObject();
attrObj.put("ref", attributeModel.getRef());// ref
attrObj.put("type", attributeModel.getType());// 类型 relation string ...
attrObj.put("attrId", attributeModel.getKey());// 属性key
attrObj.put("attrTitle", attributeModel.getNewTitle());// 属性标题
attrObj.put("text", "");// 属性内容单行文本
attrObj.put("value", new JSONArray());// 属性内容集relation或awsorg类型时存储对应的json数据
String key = attributeModel.getKey();
String attrValue = "";
if (attrDataMap.containsKey(key)) {
JSONObject jsonObj = attrDataMap.get(key);
String type = attributeModel.getType();
if ("string".equals(type)) {
attrValue = jsonObj.containsKey("value") ? jsonObj.getString("value") : "";
} else if ("number".equals(type)) {
attrValue = jsonObj.containsKey("value") ? jsonObj.getString("value") : "";
} else if ("textarea".equals(type)) {
attrValue = jsonObj.containsKey("value") ? jsonObj.getString("value") : "";
} else if ("boolean".equals(type)) {
attrValue = jsonObj.containsKey("value") ? jsonObj.getString("value") : "";
} else if ("select".equals(type)) {
attrValue = jsonObj.containsKey("value") ? jsonObj.getString("value") : "";
} else if ("select_m".equals(type)) {
attrValue = jsonObj.containsKey("value") ? jsonObj.getString("value") : "";
String[] values = attrValue.split(",");
List<String> valueList = new ArrayList<>();
for (int i = 0; i < values.length; i++) {
if (!UtilString.isEmpty(values[i])) {
valueList.add(values[i]);
}
}
attrValue = StringUtils.join(valueList, separator);
} else if ("relation".equals(type)) {
List<String> inputValues = new ArrayList<>();
JSONObject refObj = JSONObject.parseObject(attributeModel.getRef());
String relationType = refObj.containsKey("type") ? refObj.getString("type") : "shape";
List<DesignerShapeRelationModel> list = DesignerShapeRelationCache.getListByAttrId(uuid, shapeId, key);
if (list != null && list.size() > 0) {
// 判断是否有重复数据进行重复过滤
Set<String> tempStrs = new HashSet<>();
List<DesignerShapeRelationModel> tempList = new ArrayList<>();
for (int i = 0; i < list.size(); i++) {
DesignerShapeRelationModel relationModel = list.get(i);
String str = relationModel.getFileId() + relationModel.getShapeId() + relationModel.getAttrId() + relationModel.getRelationFileId() + relationModel.getRelationShapeId();
if (!tempStrs.contains(str)) {
tempList.add(relationModel);
tempStrs.add(str);
}
}
list = tempList;
for (int i = 0; i < list.size(); i++) {
DesignerShapeRelationModel relationModel = list.get(i);
if ("file".equals(relationType)) {// 文件属性
String versionId = UtilString.isEmpty(relationModel.getRelationShapeId()) ? relationModel.getRelationFileId() : relationModel.getRelationShapeId();
if (!UtilString.isEmpty(versionId)) {
List<PALRepositoryModel> list2 = PALRepositoryCache.getByVersionId(wsId, versionId);
for (PALRepositoryModel model2 : list2) {
if (model2.isUse()) {
inputValues.add(model2.getName());
JSONObject tmp = new JSONObject();
tmp.put("fileId", model2.getId());
tmp.put("name", model2.getName());
tmp.put("isFile", true);
attrObj.getJSONArray("value").add(tmp);
break;
}
}
}
} else {// 形状属性
inputValues.add(relationModel.getRelationShapeText());
JSONObject tmp = new JSONObject();
tmp.put("fileId", relationModel.getRelationFileId());
tmp.put("shapeId", relationModel.getRelationShapeId());
tmp.put("name", relationModel.getRelationShapeText());
tmp.put("isFile", false);
attrObj.getJSONArray("value").add(tmp);
}
}
}
attrValue = StringUtils.join(inputValues, separator);
} else if ("awsorg".equals(type)) {// 关联bpm组织架构
List<DesignerShapeRelationModel> list = DesignerShapeRelationCache.getListByAttrId(uuid, shapeId, key);
List<String> awsOrgResultList = new ArrayList<>();
List<String> deptValueList = new ArrayList<>();
List<String> positionValueList = new ArrayList<>();
List<String> userValueList = new ArrayList<>();
List<String> roleValueList = new ArrayList<>();
if (list != null && list.size() > 0) {
for (DesignerShapeRelationModel relationModel : list) {
JSONObject object = JSONObject.parseObject(relationModel.getRelationShapeText());
String orgType = object.getString("type");
String keyId = object.getString("id");
boolean flag = false;
if ("department".equals(orgType)) {// 部门
DepartmentModel deptModel = SDK.getORGAPI().getDepartmentById(keyId);
if (deptModel != null) {
deptValueList.add(deptModel.getName());
flag = true;
}
}
if ("position".equals(orgType)) {// 岗位
RoleModel roleModel = SDK.getORGAPI().getRoleById(keyId);
if (roleModel != null) {
positionValueList.add(roleModel.getName());
flag = true;
}
}
if ("user".equals(orgType)) {// 人员
UserModel userModel = SDK.getORGAPI().getUser(keyId);
if (userModel != null) {
userValueList.add(userModel.getUserName());
flag = true;
}
}
if ("role".equals(orgType)) {// 角色
RoleModel roleModel = SDK.getORGAPI().getRoleById(keyId);
if (roleModel != null) {
roleValueList.add(roleModel.getName());
flag = true;
}
}
if (flag) {
attrObj.getJSONArray("value").add(object);
}
}
}
awsOrgResultList.addAll(deptValueList);
awsOrgResultList.addAll(positionValueList);
awsOrgResultList.addAll(roleValueList);
awsOrgResultList.addAll(userValueList);
attrValue = StringUtils.join(awsOrgResultList, separator);
} else {
attrValue = jsonObj.containsKey("value") ? jsonObj.getString("value") : "";
}
}
attrValue = attrValue.replaceAll("'", "&apos;");
attrValue = attrValue.replaceAll("\"", "&quot;");
attrObj.put("text", attrValue);
result.put(attributeModel.getKey(), attrObj);
}
return result;
}
} }

View File

@ -754,7 +754,8 @@ public class DesignerRelationShapeWeb extends ActionWeb {
// macroLibraries.put("treeData", getTreeJson(wsId, "", category, type, method)); // macroLibraries.put("treeData", getTreeJson(wsId, "", category, type, method));
// by bzp // by bzp
String treeJson=getTreeJson(wsId, "", category, type, method,ruuid); String treeJson=getTreeJson(wsId, "", category, type, method,ruuid,attrId);
//JSONObject jsonObject = JSONObject.parseObject(json); //JSONObject jsonObject = JSONObject.parseObject(json);
JSONArray jsonArr_new= new JSONArray(); JSONArray jsonArr_new= new JSONArray();
@ -842,10 +843,10 @@ public class DesignerRelationShapeWeb extends ActionWeb {
return HtmlPageTemplate.merge(CoEConstant.APP_ID, "pal.pl.repository.designer.shapes.htm", macroLibraries); return HtmlPageTemplate.merge(CoEConstant.APP_ID, "pal.pl.repository.designer.shapes.htm", macroLibraries);
} }
public String getTreeJson(String wsId, String pid, String category, String type, String method, String ruuid) { public String getTreeJson(String wsId, String pid, String category, String type, String method, String ruuid,String attrId) {
StringBuffer treeJson = new StringBuffer(); StringBuffer treeJson = new StringBuffer();
if (pid.equals("")) { if (pid.equals("")) {
return getRootJson(wsId, category, type, method,ruuid); // 加载根 return getRootJson(wsId, category, type, method,ruuid,attrId); // 加载根
} }
// 加载二级 // 加载二级
// treeJson.append(getTwoNodeJson(pid, wsId)); // treeJson.append(getTwoNodeJson(pid, wsId));
@ -855,6 +856,9 @@ public class DesignerRelationShapeWeb extends ActionWeb {
return treeJson.toString(); return treeJson.toString();
} }
/** /**
* 获取第二级及其以下目录 * 获取第二级及其以下目录
* by bzp 增加method方法 判断 * by bzp 增加method方法 判断
@ -875,7 +879,7 @@ public class DesignerRelationShapeWeb extends ActionWeb {
return jsonArray.toString(); return jsonArray.toString();
} }
protected String getRootJson(String wsuuid, String category, String type, String methodScope,String ruuid) { protected String getRootJson(String wsuuid, String category, String type, String methodScope,String ruuid,String attrId) {
JSONArray jsonArray = new JSONArray(); JSONArray jsonArray = new JSONArray();
if ("file".equals(type)) {// 关联的文件模型 if ("file".equals(type)) {// 关联的文件模型
PALMethodJsonModel processpmjm = new PALMethodJsonModel(); PALMethodJsonModel processpmjm = new PALMethodJsonModel();
@ -912,7 +916,8 @@ public class DesignerRelationShapeWeb extends ActionWeb {
} }
jsonArray.add(node); jsonArray.add(node);
} }
} else {// 关联的形状节点 } else {
// 关联的形状节点
PALMethodJsonModel controlpmjm = new PALMethodJsonModel(); PALMethodJsonModel controlpmjm = new PALMethodJsonModel();
controlpmjm.setId(category); controlpmjm.setId(category);
controlpmjm.setName(I18nRes.findValue(CoEConstant.APP_ID, category)); controlpmjm.setName(I18nRes.findValue(CoEConstant.APP_ID, category));
@ -921,6 +926,29 @@ public class DesignerRelationShapeWeb extends ActionWeb {
controlpmjm.setMenu(false); controlpmjm.setMenu(false);
controlpmjm.setOpen(true); controlpmjm.setOpen(true);
jsonArray.add(controlpmjm); jsonArray.add(controlpmjm);
if(attrId.equals("R_relevant_flies")||attrId.equals("support_files")){
PALMethodJsonModel controlpmjm1 = new PALMethodJsonModel();
controlpmjm1.setId("process");
controlpmjm1.setName(I18nRes.findValue(CoEConstant.APP_ID, "process"));
controlpmjm1.setUrl("");
controlpmjm1.setIcon("../apps/" + CoEConstant.APP_ID + "/img/method/" + "process" + ".png");
controlpmjm1.setMenu(false);
controlpmjm1.setOpen(true);
jsonArray.add(controlpmjm1);
PALMethodJsonModel controlpmjm2 = new PALMethodJsonModel();
controlpmjm2.setId("control");
controlpmjm2.setName(I18nRes.findValue(CoEConstant.APP_ID, "control"));
controlpmjm2.setUrl("");
controlpmjm2.setIcon("../apps/" + CoEConstant.APP_ID + "/img/method/" + "control" + ".png");
controlpmjm2.setMenu(false);
controlpmjm2.setOpen(true);
jsonArray.add(controlpmjm2);
}
JSONArray nodes = PALRepositoryQueryAPIManager.getInstance().getUsedPalRepositoryTreeDataByPid(_uc, wsuuid, controlpmjm.getId()); JSONArray nodes = PALRepositoryQueryAPIManager.getInstance().getUsedPalRepositoryTreeDataByPid(_uc, wsuuid, controlpmjm.getId());
for (int i = 0; i < nodes.size(); i++) { for (int i = 0; i < nodes.size(); i++) {
JSONObject node = nodes.getJSONObject(i); JSONObject node = nodes.getJSONObject(i);
@ -946,6 +974,9 @@ public class DesignerRelationShapeWeb extends ActionWeb {
return jsonArray.toString(); return jsonArray.toString();
} }
/** /**
* 关联属性快速搜索 * 关联属性快速搜索
* @param wsId * @param wsId

View File

@ -8,17 +8,8 @@ import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.*;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
import java.util.Set;
import javax.imageio.ImageIO; import javax.imageio.ImageIO;
@ -163,7 +154,7 @@ import com.google.common.collect.Maps;
public class CoeDesignerWeb extends ActionWeb { public class CoeDesignerWeb extends ActionWeb {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private UserContext _uc; private final UserContext _uc;
private CoeProcessLevelWeb coeProcessLevelWeb; private CoeProcessLevelWeb coeProcessLevelWeb;
public CoeDesignerWeb(UserContext uc) { public CoeDesignerWeb(UserContext uc) {
@ -499,14 +490,9 @@ public class CoeDesignerWeb extends ActionWeb {
DesignerRelationShapeCacheManager relationShapeCache = DesignerRelationShapeCacheManager.getInstance(); DesignerRelationShapeCacheManager relationShapeCache = DesignerRelationShapeCacheManager.getInstance();
Map<String, Map<String, Object>> shapeMap = relationShapeCache.getShapemap(); Map<String, Map<String, Object>> shapeMap = relationShapeCache.getShapemap();
boolean isExistCopy = false; boolean isExistCopy = shapeMap.get(_uc.getUID()) != null;
if (shapeMap.get(_uc.getUID()) != null) { boolean isAppearCopy = shapeMap.get(_uc.getUID()) == null || shapeMap.get(_uc.getUID()).get("shapeCopyContent") == null;
isExistCopy = true; // 默认为定义复制
}
boolean isAppearCopy = true;
if (shapeMap.get(_uc.getUID()) != null && shapeMap.get(_uc.getUID()).get("shapeCopyContent") != null) {
isAppearCopy = false;// 默认为定义复制
}
macroLibraries.put("isExistCopy", isExistCopy); macroLibraries.put("isExistCopy", isExistCopy);
macroLibraries.put("isAppearCopy", isAppearCopy); macroLibraries.put("isAppearCopy", isAppearCopy);
// 如果流程只读获取流程图片信息 // 如果流程只读获取流程图片信息
@ -565,25 +551,38 @@ public class CoeDesignerWeb extends ActionWeb {
macroLibraries.put("processOnIsActive", processOnIsActive); macroLibraries.put("processOnIsActive", processOnIsActive);
JSONObject relationShapeIds = new JSONObject(); JSONObject relationShapeIds = new JSONObject();
JSONObject relationShapeModels = new JSONObject(); JSONObject relationShapeModels = new JSONObject();
List<Map<String, Object>> elements = CoeDesignerUtil.getShapeMessageJson(plModel.getId());
if (elements != null && elements.size() > 0) {
for (Map<String, Object> element : elements) {
String elementId = element.containsKey("id") ? element.get("id").toString() : ""; String define = PALRepositoryQueryAPIManager.getInstance().getProcessDefinition(_uc, plModel.getId());
if (!UtilString.isEmpty(elementId)) { JSONObject definition = JSONObject.parseObject(define);
Iterator<DesignerShapeRelationModel> modelIterator = DesignerShapeRelationCache.getByShapeId(plModel.getId(), elementId); JSONObject elements = definition.getJSONObject("elements");
if (modelIterator != null) { for (String id: elements.keySet()) {
while (modelIterator.hasNext()) { JSONObject shapeObj = elements.getJSONObject(id);
DesignerShapeRelationModel shapeRelationModel = modelIterator.next(); String name = shapeObj.getString("name");
PALRepositoryModel relationPalModel = PALRepositoryCache.getCache().get(shapeRelationModel.getRelationFileId()); if ("linker".equals(name)) {
if (relationPalModel != null) { continue;
relationShapeIds.put(shapeRelationModel.getRelationShapeId(), shapeRelationModel); }
relationShapeModels.put(shapeRelationModel.getShapeId() + "_" + shapeRelationModel.getAttrId(), shapeRelationModel.getRelationShapeText()); Iterator<DesignerShapeRelationModel> modelIterator = DesignerShapeRelationCache.getByShapeId(plModel.getId(), id);
} if (modelIterator != null) {
} while (modelIterator.hasNext()) {
DesignerShapeRelationModel shapeRelationModel = modelIterator.next();
PALRepositoryModel relationPalModel = PALRepositoryCache.getCache().get(shapeRelationModel.getRelationFileId());
if (relationPalModel != null) {
relationShapeIds.put(shapeRelationModel.getRelationShapeId(), shapeRelationModel);
} }
} }
} }
Map<String, JSONObject> map = PALRepositoryQueryAPIManager.getInstance().queryRepositoryShapeAttributeById(plModel.getId(), id, shapeObj, "|");
for (Entry<String, JSONObject> entry : map.entrySet()) {
JSONObject object = entry.getValue();
if (object == null || object.isEmpty()) {
continue;
}
relationShapeModels.put(id + "_" + entry.getKey(), Arrays.asList(object.getString("text").split("\\|")));
}
} }
macroLibraries.put("relationShapes", relationShapeIds); macroLibraries.put("relationShapes", relationShapeIds);
macroLibraries.put("relationShapeModels", relationShapeModels); macroLibraries.put("relationShapeModels", relationShapeModels);
@ -2197,10 +2196,7 @@ public class CoeDesignerWeb extends ActionWeb {
StringBuffer shapes = new StringBuffer(); StringBuffer shapes = new StringBuffer();
List<String> cateList = PALMethodUtil.distinct(categories); List<String> cateList = PALMethodUtil.distinct(categories);
CoeUserModel userModel = (CoeUserModel) CoeUserDaoFactory.createUser().getInstanceByUserId(_uc.getUID()); CoeUserModel userModel = (CoeUserModel) CoeUserDaoFactory.createUser().getInstanceByUserId(_uc.getUID());
boolean isAdmin = false; boolean isAdmin = userModel != null && userModel.getIsAdmin() == 1;
if (userModel != null && userModel.getIsAdmin() == 1) {
isAdmin = true;
}
PALMethodModel mModel = PALMethodCache.getPALMethodModelById(methodId); PALMethodModel mModel = PALMethodCache.getPALMethodModelById(methodId);
// 是否允许用户自定义模板0不允许1允许 // 是否允许用户自定义模板0不允许1允许
@ -2996,14 +2992,9 @@ public class CoeDesignerWeb extends ActionWeb {
macroLibraries.put("userNum", ""); macroLibraries.put("userNum", "");
DesignerRelationShapeCacheManager relationShapeCache = DesignerRelationShapeCacheManager.getInstance(); DesignerRelationShapeCacheManager relationShapeCache = DesignerRelationShapeCacheManager.getInstance();
Map<String, Map<String, Object>> shapeMap = relationShapeCache.getShapemap(); Map<String, Map<String, Object>> shapeMap = relationShapeCache.getShapemap();
boolean isExistCopy = false; boolean isExistCopy = shapeMap.get(_uc.getUID()) != null;
if (shapeMap.get(_uc.getUID()) != null) { boolean isAppearCopy = shapeMap.get(_uc.getUID()) == null || shapeMap.get(_uc.getUID()).get("shapeCopyContent") == null;
isExistCopy = true; // 默认为定义复制
}
boolean isAppearCopy = true;
if (shapeMap.get(_uc.getUID()) != null && shapeMap.get(_uc.getUID()).get("shapeCopyContent") != null) {
isAppearCopy = false;// 默认为定义复制
}
macroLibraries.put("isExistCopy", isExistCopy); macroLibraries.put("isExistCopy", isExistCopy);
macroLibraries.put("isAppearCopy", isAppearCopy); macroLibraries.put("isAppearCopy", isAppearCopy);

View File

@ -7842,7 +7842,7 @@ public class CoeProcessLevelWeb extends ActionWeb {
folderArr.add(defaultObj); folderArr.add(defaultObj);
} }
// 内置/扩展建模方法 修改 // 内置/扩展建模方法
List<String> palMethodCategoryList = PALMethodCache.getPALMethodList(true); List<String> palMethodCategoryList = PALMethodCache.getPALMethodList(true);
for (String c : palMethodCategoryList) { for (String c : palMethodCategoryList) {
List<PALMethodModel> list = PALMethodCache.getPALMethodModelListByMethod(c); List<PALMethodModel> list = PALMethodCache.getPALMethodModelListByMethod(c);
@ -8146,7 +8146,7 @@ public class CoeProcessLevelWeb extends ActionWeb {
// } // }
} }
// 保存文件属性 // 保存文件属性
//PALRepositoryAPIManager.getInstance().updateRepositoryProperty(model.getId()); PALRepositoryAPIManager.getInstance().updateRepositoryProperty(model.getId());
JSONArray repositoryPathData = CoeProcessLevelUtil.getRepositoryPath(parentId); JSONArray repositoryPathData = CoeProcessLevelUtil.getRepositoryPath(parentId);

View File

@ -443,7 +443,7 @@ function handleMovePool(lanes, selectedShape, allShape, isForce) {
} }
} }
if (isCurLane) { if (isCurLane) {
return;
} else { } else {
//对在泳池中泳道内形状的处理 //对在泳池中泳道内形状的处理
for (var k = 0; tmpLanes.length > k; k++) { for (var k = 0; tmpLanes.length > k; k++) {
@ -535,7 +535,7 @@ function handleShapeAttrValue(lane, shapes, timerCount, isForce) {
if (shapeAttrsJsonArray[k].id == attr.id) { if (shapeAttrsJsonArray[k].id == attr.id) {
flag = true; flag = true;
tmpShapeAttrJson = shapeAttrsJsonArray[k]; tmpShapeAttrJson = shapeAttrsJsonArray[k];
continue;
} }
} }
//shapes中已经存在了lane中的属性 //shapes中已经存在了lane中的属性
@ -624,7 +624,7 @@ function handleLaneTextValue(lane) {
for (var i = 0; i < attributesJsonArray.length; i++) { for (var i = 0; i < attributesJsonArray.length; i++) {
var attr = attributesJsonArray[i] var attr = attributesJsonArray[i]
if (attr.value == undefined || attr.value == "" || attr.value == null) { if (attr.value == undefined || attr.value == "" || attr.value == null) {
continue;
} else { } else {
if (attr.type == "relation") { if (attr.type == "relation") {
//flag是用于防止多次查询同样的值导致数据重复 //flag是用于防止多次查询同样的值导致数据重复
@ -808,12 +808,14 @@ function operateAwsorgDB(shapesObj, shapeId, shapeText, attrId, shapeAttrJson) {
getPrivateAttributeHtml(tmpAttributesJsonArray, "tagContentTable0", tmpShape); getPrivateAttributeHtml(tmpAttributesJsonArray, "tagContentTable0", tmpShape);
} }
function operateDB(shapesObj, shapeId, attrId, shapeAttrJson) { function operateDB(shapesObj, shapeId, attrId, shapeAttrJson) {
debugger;
//添加关联属性时更新relationShapeModelObject的值 //添加关联属性时更新relationShapeModelObject的值
var tmp = shapeId + '_' + attrId;
relationShapeModelObject[tmp] = [];
if (shapesObj.length > 0) { if (shapesObj.length > 0) {
for (var i = 0; i < shapesObj.length; i++) { for (var i = 0; i < shapesObj.length; i++) {
var temp = shapesObj[i]; var temp = shapesObj[i];
var shapeIdAttrId = temp.shapeId + "_" + temp.attrId; relationShapeModelObject[tmp].push(temp.relationShapeText);
relationShapeModelObject[shapeIdAttrId] = temp.relationShapeText;
} }
} }
var shapeGroupId = ""; var shapeGroupId = "";
@ -1405,7 +1407,7 @@ var DesignerCopyPaste = {
if (typeof(a[v]) == 'undefined') { if (typeof(a[v]) == 'undefined') {
a[v] = 1; a[v] = 1;
} }
}; }
data.length = 0; data.length = 0;
for (var i in a) { for (var i in a) {
data[data.length] = i; data[data.length] = i;

View File

@ -216,10 +216,10 @@ UI.showInsertLink = function() {
} }
} }
if (!addr) { if (!addr) {
addr = new Array(); addr = [];
} }
var links_file = new Array(); var links_file = [];
var links_custom = new Array(); var links_custom = [];
for (var i = 0; i < addr.length; i++) { for (var i = 0; i < addr.length; i++) {
var link = addr[i]; var link = addr[i];
if (link.type == "file") { if (link.type == "file") {
@ -669,7 +669,7 @@ UI.setLink = function() {
for (var i = 0; i < shape.dataAttributes.length; i++) { for (var i = 0; i < shape.dataAttributes.length; i++) {
var attr = shape.dataAttributes[i]; var attr = shape.dataAttributes[i];
if (attr.linksArray) { if (attr.linksArray) {
linkArr = new Array(); linkArr = [];
break; break;
} }
} }
@ -1670,7 +1670,7 @@ function removeTrRelevanceShapes(obj) {
onConfirm : function() { onConfirm : function() {
// 确定删除 // 确定删除
var shape = Utils.getSelected()[0]; var shape = Utils.getSelected()[0];
var tempArray = new Array(); var tempArray = [];
var count = 0; var count = 0;
if (shape) { if (shape) {
var relevanceShapes = []; var relevanceShapes = [];
@ -1788,7 +1788,7 @@ function updateModelElementsAttribute(selectedShape, nodes) {
} }
if (arrJsontemp.length != 0) { if (arrJsontemp.length != 0) {
var tempArr = removeShepeAttributeAndReturnDifferent(arrJsontemp, filterNotCheckedAttribute(nodes, arrJsontemp)); var tempArr = removeShepeAttributeAndReturnDifferent(arrJsontemp, filterNotCheckedAttribute(nodes, arrJsontemp));
var tempArray = new Array(); var tempArray = [];
for (var e = 0; e < tempArr.length; e++) { for (var e = 0; e < tempArr.length; e++) {
if (tempArr[e] != 0 && tempArr[e] != "0") { if (tempArr[e] != 0 && tempArr[e] != "0") {
removeNotCheckedAttribute(shape, tempArr[e]); removeNotCheckedAttribute(shape, tempArr[e]);
@ -1877,7 +1877,7 @@ function removeShepeAttributeAndReturnDifferent(exitObj, newObj1) {
// 删除没有选中的元素 // 删除没有选中的元素
function removeNotCheckedAttribute(shape, obj1) { function removeNotCheckedAttribute(shape, obj1) {
var tempArray = new Array(); var tempArray = [];
var attributesJsonArray1 = []; var attributesJsonArray1 = [];
for (var i = 0; i < shape.dataAttributes.length; i++) { for (var i = 0; i < shape.dataAttributes.length; i++) {
var attr = shape.dataAttributes[i]; var attr = shape.dataAttributes[i];
@ -2163,7 +2163,7 @@ function updateAttributeById(objId, va, shapeId) {
shape = Utils.getSelected()[0]; shape = Utils.getSelected()[0];
selectShape = shape; selectShape = shape;
} }
var tempArray = new Array(); var tempArray = [];
var count = 0; var count = 0;
if (shape) { if (shape) {
/* /*
@ -2220,7 +2220,7 @@ function removeTrAttribute(obj) {
onConfirm : function() { onConfirm : function() {
// 确定删除 // 确定删除
var shape = Utils.getSelected()[0]; var shape = Utils.getSelected()[0];
var tempArray = new Array(); var tempArray = [];
var count = 0; var count = 0;
if (shape) { if (shape) {
// shape.attributesContent = $("#tagContentTable0").html(); // shape.attributesContent = $("#tagContentTable0").html();
@ -2847,7 +2847,7 @@ function changeArributeByShape() {
var newAttrArray = []; var newAttrArray = [];
newAttrArray = tempAttrArray.concat(attributesJsonArrayT).filter(function(v, i, arr) { newAttrArray = tempAttrArray.concat(attributesJsonArrayT).filter(function(v, i, arr) {
return arr.indexOf(v) === arr.lastIndexOf(v); return arr.indexOf(v) === arr.lastIndexOf(v);
});; });
attributesJsonArrayT = tempAttrArray.concat(newAttrArray); attributesJsonArrayT = tempAttrArray.concat(newAttrArray);
} }
} }
@ -3328,7 +3328,7 @@ function saveRelevanceAwsOrgShapesTODB1(shapesObj, shapeId, shapeName, fileName,
relationShapeIds = relationShapeIds.split(","); relationShapeIds = relationShapeIds.split(",");
} }
//修改文件中保存的属性值 //修改文件中保存的属性值
var tempArray = new Array(); var tempArray = [];
var count = 0; var count = 0;
var attributesJsonArray = []; var attributesJsonArray = [];
for (var i = 0; i < shape.dataAttributes.length; i++) { for (var i = 0; i < shape.dataAttributes.length; i++) {
@ -3355,6 +3355,7 @@ function saveRelevanceAwsOrgShapesTODB1(shapesObj, shapeId, shapeName, fileName,
break; break;
} }
} }
relationShapeModelObject[shapeId + "_" + objId] = name;
} }
Model.update(shape); Model.update(shape);
} }
@ -3715,11 +3716,12 @@ function saveRelevanceShapesTODB(shapesObj, shapeId, shapeName, fileName,
$("input[objid='" + objId + "']").addClass("required_input_css"); $("input[objid='" + objId + "']").addClass("required_input_css");
return; return;
} }
var tmp = shapeId + '_' + objId;
relationShapeModelObject[tmp] = [];
if (shapesObj.length > 0) { if (shapesObj.length > 0) {
for (var i = 0; i < shapesObj.length; i++) { for (var i = 0; i < shapesObj.length; i++) {
var temp = shapesObj[i]; var temp = shapesObj[i];
var shapeIdAttrId = temp.shapeId + "_" + temp.attrId; relationShapeModelObject[tmp].push(temp.relationShapeText);
relationShapeModelObject[shapeIdAttrId] = temp.relationShapeText;
} }
} }
//by bzp 校验角色和岗位不能同时选择 //by bzp 校验角色和岗位不能同时选择
@ -3790,7 +3792,7 @@ function saveRelevanceShapesTODB(shapesObj, shapeId, shapeName, fileName,
// $("input[objid='" + objId + "']").val(shapeNames.join(",")); // $("input[objid='" + objId + "']").val(shapeNames.join(","));
// } // }
//修改文件中保存的属性值 //修改文件中保存的属性值
var tempArray = new Array(); var tempArray = [];
var count = 0; var count = 0;
var attributesJsonArray = []; var attributesJsonArray = [];
for (var i = 0; i < shape.dataAttributes.length; i++) { for (var i = 0; i < shape.dataAttributes.length; i++) {

View File

@ -3985,28 +3985,20 @@ var Designer = {
if (temp.isShowAttrName && attrTypeArray.indexOf(attrType) >= 0 && (cfgContent + '').trim().length > 0) { if (temp.isShowAttrName && attrTypeArray.indexOf(attrType) >= 0 && (cfgContent + '').trim().length > 0) {
cfgContent = "(" + temp.attrName + ")" +cfgContent; cfgContent = "(" + temp.attrName + ")" +cfgContent;
} }
if (attrType == "relation" && cfgContent.length == 0) { if (attrType == 'relation' || attrType == 'awsorg') {
cfgContent = "";
} else if (attrType == "relation" && cfgContent.length > 0) {
var shapeIdAttrId = q.id + "_" + attrId; var shapeIdAttrId = q.id + "_" + attrId;
var relationData = relationShapeModelObject; var relationData = relationShapeModelObject;
var relationValue = ""; var relationValue = "";
for (var j = 0; j < cfgContent.length; j++) { if (relationData[shapeIdAttrId]) {
if (j == cfgContent.length - 1) { cfgContent = relationData[shapeIdAttrId].join(",");
if (relationData.hasOwnProperty(shapeIdAttrId)) { } else {
var tempRelationValue = relationData[shapeIdAttrId]; cfgContent = "";
relationValue = relationValue + tempRelationValue;
}
} else if (relationData.hasOwnProperty(shapeIdAttrId)) {
var tempRelationValue = relationData[shapeIdAttrId] + "|";
relationValue = relationValue + tempRelationValue;
}
} }
cfgContent = relationValue;
if (temp.isShowAttrName) { if (temp.isShowAttrName) {
cfgContent = "(" + temp.attrName + ")" + cfgContent; cfgContent = "(" + temp.attrName + ")" + cfgContent;
} }
} }
params.showType = "attr"; params.showType = "attr";
params.value = cfgContent; params.value = cfgContent;
} }
@ -4691,10 +4683,10 @@ var Designer = {
var tempL = (v + 1) * tempShapeWidth; var tempL = (v + 1) * tempShapeWidth;
var tempX = 0; var tempX = 0;
if (c.showType == "text") { if (c.showType == "text") {
b.fillStyle = "#A1A1A1"; b.fillStyle = "#696969";
} }
if (c.showType == "attr") { if (c.showType == "attr") {
b.fillStyle = "#6666FF"; b.fillStyle = "#191970";
} }
var tempY = a / 2 + v * 12; var tempY = a / 2 + v * 12;
if (tempL < D) { if (tempL < D) {