Merge remote-tracking branch 'origin/apps_dev' into apps_dev
This commit is contained in:
commit
20ecadd637
Binary file not shown.
@ -1,10 +1,14 @@
|
||||
package com.actionsoft.apps.coe.pal.pal.repository.job;
|
||||
|
||||
import com.actionsoft.apps.coe.pal.pal.method.model.PALMethodAttributeModel;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.dao.CoeProcessLevelDaoFacotory;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.dao.PALRepository;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.designer.CoeDesignerShapeAPIManager;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.designer.manage.CoeDesignerAPIManager;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.designer.model.BaseModel;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.designer.util.CoeDesignerUtil;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.model.impl.PALRepositoryModelImpl;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.util.CoeProcessLevelUtil;
|
||||
|
||||
@ -15,6 +19,8 @@ import com.actionsoft.bpms.schedule.IJob;
|
||||
import com.actionsoft.bpms.util.DBSql;
|
||||
import com.actionsoft.bpms.util.UUIDGener;
|
||||
|
||||
import com.actionsoft.sdk.local.SDK;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import jodd.util.StringUtil;
|
||||
|
||||
@ -39,22 +45,35 @@ public class SynchronousOrgJob implements IJob {
|
||||
static int orgindex = 0;
|
||||
static String parentModelId = "";
|
||||
|
||||
static String wsId;
|
||||
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
|
||||
|
||||
String wsIdParams = SDK.getJobAPI().getJobParameter(jobExecutionContext);
|
||||
wsId=wsIdParams;
|
||||
|
||||
|
||||
//先执行新建操作产生plid
|
||||
PALRepository coeProcessLevel = CoeProcessLevelDaoFacotory.createCoeProcessLevel();
|
||||
String parentId="process";
|
||||
int orderIndex = getChildrenMaxOrderIndexByPidAndWsId(parentId, wsId) + 1;
|
||||
|
||||
String plRid1 = UUIDGener.getUUID();
|
||||
String id1 = UUIDGener.getUUID();
|
||||
|
||||
Connection open = DBSql.open();
|
||||
orgdepartmentList = DBSql.getMaps(open,"select DEPARTMENTNAME,ID,LAYER,PARENTDEPARTMENTID,ORDERINDEX from ORGDEPARTMENT ");
|
||||
|
||||
Timestamp nowTime = new Timestamp(System.currentTimeMillis());
|
||||
|
||||
PALRepositoryModelImpl model = CoeProcessLevelUtil.createPALRepositoryModel(id1, plRid1, "6f4e292c-1b90-4dd2-8c20-7da159cb20a5", "内蒙古伊利实业集团股份有限公司",
|
||||
"", 1, "org", "org", true, 1,
|
||||
String modeldefaultId=Createfolder(orderIndex);
|
||||
|
||||
|
||||
Connection open = DBSql.open();
|
||||
orgdepartmentList = DBSql.getMaps(open,"select DEPARTMENTNAME,ID,LAYER,PARENTDEPARTMENTID,ORDERINDEX from ORGDEPARTMENT");
|
||||
|
||||
|
||||
PALRepositoryModelImpl model = CoeProcessLevelUtil.createPALRepositoryModel(id1, plRid1, wsId, "内蒙古伊利实业集团股份有限公司",
|
||||
"", 1, modeldefaultId, "org", true, 1,
|
||||
id1, false, "org.normal", "0", 1, null,
|
||||
null, "admin", "admin", nowTime, "0", null,
|
||||
null, null, null, null, null, null, null, 1);
|
||||
@ -68,6 +87,28 @@ public class SynchronousOrgJob implements IJob {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建岗位模型文件夹
|
||||
* @param orderIndex
|
||||
* @return
|
||||
*/
|
||||
public String Createfolder(int orderIndex){
|
||||
PALRepository coeProcessLevel = CoeProcessLevelDaoFacotory.createCoeProcessLevel();
|
||||
String plRid1 = UUIDGener.getUUID();
|
||||
String id1 = UUIDGener.getUUID();
|
||||
|
||||
Timestamp nowTime = new Timestamp(System.currentTimeMillis());
|
||||
|
||||
//新建文件夹
|
||||
PALRepositoryModelImpl modeldefault = CoeProcessLevelUtil.createPALRepositoryModel(id1, plRid1, wsId, "岗位模型",
|
||||
"", orderIndex, "org", "org", true, 1,
|
||||
id1, false, "default", "0", 1, null,
|
||||
null, "admin", "admin", nowTime, null, null,
|
||||
null, null, null, null, null, null, null, 1);
|
||||
coeProcessLevel.insert(modeldefault);
|
||||
return modeldefault.getId();
|
||||
}
|
||||
|
||||
public void createTree() {
|
||||
|
||||
for (RowMap oneData : orgdepartmentList) {
|
||||
@ -90,10 +131,10 @@ public class SynchronousOrgJob implements IJob {
|
||||
|
||||
|
||||
if (org.getString("PARENTDEPARTMENTID").equals("0")) {
|
||||
String sql1 = "SELECT ID FROM APP_ACT_COE_PAL_REPOSITORY WHERE WSID='6f4e292c-1b90-4dd2-8c20-7da159cb20a5' and EXT1='" + org.getString("ID") + "'";
|
||||
String sql1 = "SELECT ID FROM APP_ACT_COE_PAL_REPOSITORY WHERE wsId='"+wsId+"' and EXT1='" + org.getString("ID") + "'";
|
||||
String parentPalOrgId1 = DBSql.getString(sql1);
|
||||
if(StringUtil.isEmpty(parentPalOrgId1)){
|
||||
PALRepositoryModelImpl model1 = CoeProcessLevelUtil.createPALRepositoryModel(id1, plRid1, "6f4e292c-1b90-4dd2-8c20-7da159cb20a5", org.getString("DEPARTMENTNAME"),
|
||||
PALRepositoryModelImpl model1 = CoeProcessLevelUtil.createPALRepositoryModel(id1, plRid1, wsId, org.getString("DEPARTMENTNAME"),
|
||||
"", 1, parentModelId, "org", true, 1,
|
||||
id1, false, "org.normal", "0", Integer.valueOf(org.getString("ORDERINDEX")), null,
|
||||
null, "admin", "admin", nowTime, org.getString("ID"), null,
|
||||
@ -109,7 +150,7 @@ public class SynchronousOrgJob implements IJob {
|
||||
|
||||
if(StringUtil.isNotEmpty(parentPalOrgId)){
|
||||
|
||||
PALRepositoryModelImpl model2 = CoeProcessLevelUtil.createPALRepositoryModel(id1, plRid1, "6f4e292c-1b90-4dd2-8c20-7da159cb20a5", org.getString("DEPARTMENTNAME"),
|
||||
PALRepositoryModelImpl model2 = CoeProcessLevelUtil.createPALRepositoryModel(id1, plRid1, wsId, org.getString("DEPARTMENTNAME"),
|
||||
"", 1, getParentPalOrgId(org), "org", true, 1,
|
||||
id1, false, "org.normal", "0", Integer.valueOf(org.getString("ORDERINDEX")), null,
|
||||
null, "admin", "admin", nowTime, org.getString("ID"), null,
|
||||
@ -131,7 +172,7 @@ public class SynchronousOrgJob implements IJob {
|
||||
|
||||
public String getParentPalOrgId(RowMap org) {
|
||||
|
||||
String sql = "SELECT ID FROM APP_ACT_COE_PAL_REPOSITORY WHERE WSID='6f4e292c-1b90-4dd2-8c20-7da159cb20a5' and EXT1='" + org.getString("PARENTDEPARTMENTID") + "'";
|
||||
String sql = "SELECT ID FROM APP_ACT_COE_PAL_REPOSITORY WHERE wsId='"+wsId+"' and EXT1='" + org.getString("PARENTDEPARTMENTID") + "'";
|
||||
String parentPalOrgId = DBSql.getString(sql);
|
||||
|
||||
if (parentPalOrgId.equals("0") || parentPalOrgId.equals("") || parentPalOrgId == null) {
|
||||
@ -144,7 +185,7 @@ public class SynchronousOrgJob implements IJob {
|
||||
|
||||
|
||||
public String getParentPallevel(RowMap org) {
|
||||
String sql = "SELECT ID FROM APP_ACT_COE_PAL_REPOSITORY WHERE WSID='6f4e292c-1b90-4dd2-8c20-7da159cb20a5' and EXT1='" + org.getString("PARENTDEPARTMENTID") + "'";
|
||||
String sql = "SELECT ID FROM APP_ACT_COE_PAL_REPOSITORY WHERE wsId='"+wsId+"' and EXT1='" + org.getString("PARENTDEPARTMENTID") + "'";
|
||||
String parentPalOrgId = DBSql.getString(sql);
|
||||
|
||||
if (parentPalOrgId.equals("0") || parentPalOrgId.equals("") || parentPalOrgId == null) {
|
||||
@ -188,8 +229,7 @@ public class SynchronousOrgJob implements IJob {
|
||||
|
||||
List<RowMap> orgdepartmentList=DBSql.getMaps("select POSITION_NO,POSITION_NAME from ORGUSER WHERE DEPARTMENTID=?",departmentId);
|
||||
|
||||
int zindex = 1;
|
||||
|
||||
JSONArray shapes = new JSONArray();
|
||||
if(orgdepartmentList.size()>0){
|
||||
|
||||
for(int i=0;i<orgdepartmentList.size();i++){
|
||||
@ -200,27 +240,29 @@ public class SynchronousOrgJob implements IJob {
|
||||
JSONObject shape1 = ShapeUtil.getProcessShapeDefinitionByName("org.normal", "position");
|
||||
String positionName=orgdepartmentList.get(i).getString("POSITION_NAME");
|
||||
|
||||
|
||||
if(StringUtil.isNotEmpty(positionName)){
|
||||
shape1.put("id", shapeId1);
|
||||
|
||||
shape1.put("text",positionName);
|
||||
JSONObject newShape = JSONObject.parseObject(shape1.toString());
|
||||
newShape.put("id", shapeId1);
|
||||
newShape.put("text", positionName);
|
||||
shapes.add(newShape);
|
||||
|
||||
JSONObject props1 = shape1.getJSONObject("props");// 位置大小
|
||||
|
||||
props1.put("x", 130*zindex);
|
||||
props1.put("y", 277);
|
||||
props1.put("w", 110);
|
||||
props1.put("h", 50);
|
||||
|
||||
props1.put("zindex", zindex++);
|
||||
|
||||
elements.put(shapeId1, shape1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
JSONArray newShapes = this.getMethodElementsJSONArray(shapes, 6);
|
||||
JSONObject newElements = new JSONObject();
|
||||
for (int i = 0; i < newShapes.size(); i++) {
|
||||
JSONObject shapeObj = newShapes.getJSONObject(i);
|
||||
newElements.put(shapeObj.getString("id"), shapeObj);
|
||||
}
|
||||
|
||||
definition.put("elements", newElements);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 设置画布大小
|
||||
DiagramsUtil.setDiagramHeightWidth(definition, elements);
|
||||
defineModel.setDefinition(definition.toString());
|
||||
@ -229,8 +271,91 @@ public class SynchronousOrgJob implements IJob {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 创建具有合理位置的节点数据
|
||||
*
|
||||
* @param elements
|
||||
* @param shapeRowCount
|
||||
* @return
|
||||
*/
|
||||
private JSONArray getMethodElementsJSONArray(JSONArray elements, int shapeRowCount) {
|
||||
JSONArray result = new JSONArray();
|
||||
int zindex = 0;
|
||||
int initX = 0;
|
||||
int initY = 0;
|
||||
int pageEdge = 100;
|
||||
int count = 0;
|
||||
initX += pageEdge;
|
||||
initY += pageEdge;
|
||||
for (int i = 0; i < elements.size(); i++) {
|
||||
JSONObject shape = elements.getJSONObject(i);
|
||||
count++;
|
||||
if (count % (shapeRowCount + 1) == 0) {
|
||||
count = 1;
|
||||
initY += 130;
|
||||
// 换行
|
||||
initX = 0;
|
||||
initX = pageEdge + initX;
|
||||
}
|
||||
zindex++;
|
||||
if (shape.containsKey("dataAttributes")) {
|
||||
JSONArray dataAttributes = JSONArray.parseArray(shape.getString("dataAttributes"));
|
||||
for (int index = 0; index < dataAttributes.size(); index++) {
|
||||
dataAttributes.getJSONObject(index).put("id", UUIDGener.getObjectId());
|
||||
}
|
||||
shape.put("dataAttributes", dataAttributes);
|
||||
}
|
||||
int totalWidth = 240;// 每个节点总宽度,空白+节点+空白
|
||||
int totalHeight = 200;// 每个节点总高度,空白+节点+空白
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
int w = validateJson(shape.getJSONObject("props").getInteger("w"));
|
||||
int h = validateJson(shape.getJSONObject("props").getInteger("h"));
|
||||
int leftBlankWidth = (totalWidth - w) / 2;
|
||||
int topBlankHeight = (totalHeight - h) / 2;
|
||||
x = initX + leftBlankWidth;
|
||||
initX = x + w + leftBlankWidth;
|
||||
y = initY + topBlankHeight;
|
||||
|
||||
JSONObject props = shape.getJSONObject("props");
|
||||
props.put("x", x);
|
||||
props.put("y", y);
|
||||
props.put("zindex", zindex);
|
||||
shape.put("props", props);
|
||||
result.add(shape);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private String validateJson(String name) {
|
||||
return name == null ? "" : name;
|
||||
}
|
||||
|
||||
private int validateJson(Integer index) {
|
||||
return index == null ? 0 : index;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取文件的下级文件的最大orderIndex
|
||||
* 在不同的资产库根节点(palId)都相同,增加资产库避免统计时错误
|
||||
* @param palId
|
||||
* @param wsId
|
||||
* @return
|
||||
* @author sunlh
|
||||
*/
|
||||
public int getChildrenMaxOrderIndexByPidAndWsId(String palId, String wsId) {
|
||||
String sql = "SELECT MAX(PLORDERINDEX) AS orderIndex FROM APP_ACT_COE_PAL_REPOSITORY WHERE (PLPARENTID IN " + "(SELECT r1.id FROM APP_ACT_COE_PAL_REPOSITORY r1, APP_ACT_COE_PAL_REPOSITORY r2 WHERE r1.PLVERSIONID = r2.PLVERSIONID AND r2.id='" + palId + "')" + " OR PLPARENTID = '" + palId + "') AND wsid='" + wsId +"'";
|
||||
int maxOrderIndex = DBSql.getInt(sql, "orderIndex");
|
||||
return maxOrderIndex;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@ import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.*;
|
||||
@ -23,6 +24,7 @@ import com.actionsoft.apps.coe.pal.pal.ws.web.VersionUtil;
|
||||
import com.actionsoft.apps.resource.plugin.profile.DCPluginProfile;
|
||||
import com.actionsoft.bpms.bpmn.engine.cache.ProcessDefCache;
|
||||
import com.actionsoft.bpms.bpmn.engine.model.def.ProcessDefinition;
|
||||
import com.actionsoft.bpms.commons.database.RowMapper;
|
||||
import com.actionsoft.bpms.commons.login.constant.LoginConst;
|
||||
import com.actionsoft.bpms.commons.mvc.view.ResponseObject;
|
||||
import com.actionsoft.bpms.org.model.DepartmentModel;
|
||||
@ -2263,7 +2265,17 @@ public class CoeProcessLevelUtil {
|
||||
|
||||
if(JSONObject.parseObject(property.getPropertyValue())!=null){
|
||||
String relationFileId = JSONObject.parseObject(property.getPropertyValue()).get("relationFileId").toString();
|
||||
String url=SDK.getPortalAPI().getPortalUrl()+"/r/w?uuid="+relationFileId+"&teamId=&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid="+sessionId+"";
|
||||
//String url=SDK.getPortalAPI().getPortalUrl()+"/r/w?uuid="+relationFileId+"&teamId=&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid="+sessionId+"";
|
||||
|
||||
PALRepositoryModel model = PALRepositoryCache.getCache().get(uuid);
|
||||
|
||||
String taskId="";
|
||||
if (model != null) {
|
||||
if (model.isPublish() || model.isStop()) {// 停用或已发布状态查询最新流程手册
|
||||
taskId=getLastPublishTaskIdByModelId(model.getId());
|
||||
}
|
||||
}
|
||||
String url=SDK.getPortalAPI().getPortalUrl()+"/r/w?cmd=com.actionsoft.apps.coe.pal.publisher_publish_file_open&uuid="+relationFileId+""+"&sid="+sessionId+"&taskId="+taskId;
|
||||
|
||||
//判断如果关联属性是岗位,多个岗位显示为...
|
||||
if(attributeModel.getKey().equals("post")){
|
||||
@ -2290,6 +2302,24 @@ public class CoeProcessLevelUtil {
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取模型的最后发布时的taskId
|
||||
*
|
||||
* @param repositoryId
|
||||
* @return
|
||||
*/
|
||||
public static String getLastPublishTaskIdByModelId(String repositoryId) {
|
||||
String sql = "SELECT pl.TASKID FROM APP_ACT_COE_PAL_PUBLISH p, APP_ACT_COE_PAL_PUBLISH_LIST pl WHERE pl.pid = p.id AND pl.palrepositoryid = ? ORDER BY publishdate DESC";
|
||||
String taskId = DBSql.getObject(sql, new RowMapper<String>() {
|
||||
@Override
|
||||
public String mapRow(ResultSet rs, int arg1) throws SQLException {
|
||||
return rs.getString(1);
|
||||
}
|
||||
}, new Object[] { repositoryId });
|
||||
return taskId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计个人权限下的模型文件的建模大类和建模方法分类
|
||||
* 不作为个人是否有某建模方法判断依据,仅根据已有数据进行统计
|
||||
|
||||
@ -13,4 +13,4 @@
|
||||
var mainType = "<#mainType>";
|
||||
var uid = "<#uid>";
|
||||
var wHref = "./w";
|
||||
var jdHref = "./jd";</script><link href=../apps/com.actionsoft.apps.coe.pal/main/css/chunk-03c6285a.7d5e2b5a.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/css/chunk-08f4719e.e0cd2ccf.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/css/chunk-0df035f6.e83dbaa2.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/css/chunk-109644f6.6154d467.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/css/chunk-21453108.a3fd01d3.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/css/chunk-23a660f0.0ecc4095.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/css/chunk-79148172.dc3e7967.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/css/chunk-b158b92a.fe2f3f84.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/css/chunk-bb3b9f20.f7f4b256.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-03c6285a.529dedd5.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-08f4719e.4739bcb1.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-0df035f6.52f9d178.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-109644f6.1012fbed.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-21453108.61269ead.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-23a660f0.1efa21de.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-2d0ab156.fd29d082.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-2d0f078a.f290866f.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-2d212b99.1061dc70.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-2d216d3a.9f4d92b1.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-2d224b23.c12b6728.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-2d224ef1.9b69a5bc.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-3178e2bf.97e80de1.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-3a9b7577.1c8372d8.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-79148172.25989b20.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-b158b92a.02ee2c83.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-bb3b9f20.8fc67a6c.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/css/app.b58aa8df.css rel=preload as=style><link href=../apps/com.actionsoft.apps.coe.pal/main/js/app.ce7766b1.js rel=preload as=script><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-vendors.335bcbdd.js rel=preload as=script><link href=../apps/com.actionsoft.apps.coe.pal/main/css/app.b58aa8df.css rel=stylesheet></head><body style=margin:0;><div id=app></div><script src=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-vendors.335bcbdd.js></script><script src=../apps/com.actionsoft.apps.coe.pal/main/js/app.ce7766b1.js></script></body></html>
|
||||
var jdHref = "./jd";</script><link href=../apps/com.actionsoft.apps.coe.pal/main/css/chunk-03c6285a.7d5e2b5a.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/css/chunk-08f4719e.e0cd2ccf.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/css/chunk-0df035f6.e83dbaa2.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/css/chunk-21453108.a3fd01d3.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/css/chunk-23a660f0.0ecc4095.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/css/chunk-33a8fbff.9f161cd2.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/css/chunk-79148172.dc3e7967.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/css/chunk-b158b92a.fe2f3f84.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/css/chunk-bb3b9f20.f7f4b256.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-03c6285a.529dedd5.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-08f4719e.4739bcb1.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-0df035f6.52f9d178.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-21453108.61269ead.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-23a660f0.1efa21de.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-2d0ab156.fd29d082.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-2d0f078a.f290866f.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-2d212b99.1061dc70.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-2d216d3a.9f4d92b1.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-2d224b23.c12b6728.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-2d224ef1.9b69a5bc.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-3178e2bf.97e80de1.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-33a8fbff.e8861a4d.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-3a9b7577.1c8372d8.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-79148172.25989b20.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-b158b92a.02ee2c83.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-bb3b9f20.8fc67a6c.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal/main/css/app.b58aa8df.css rel=preload as=style><link href=../apps/com.actionsoft.apps.coe.pal/main/js/app.66218ed9.js rel=preload as=script><link href=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-vendors.335bcbdd.js rel=preload as=script><link href=../apps/com.actionsoft.apps.coe.pal/main/css/app.b58aa8df.css rel=stylesheet></head><body style=margin:0;><div id=app></div><script src=../apps/com.actionsoft.apps.coe.pal/main/js/chunk-vendors.335bcbdd.js></script><script src=../apps/com.actionsoft.apps.coe.pal/main/js/app.66218ed9.js></script></body></html>
|
||||
@ -1712,6 +1712,7 @@ function sortModelByNumber() {
|
||||
|
||||
//根据活动序号排序
|
||||
if (attr != null && attr.id) {
|
||||
|
||||
if(attr.id=="activity_number"){
|
||||
var number = attr.value;
|
||||
var subNumer=number< 10 ? number.substr(1,1) : number;
|
||||
@ -1738,20 +1739,25 @@ function sortModelByNumber() {
|
||||
}
|
||||
|
||||
// 有序号的元素升序排序
|
||||
var compare = function (obj1, obj2) {
|
||||
var val1 = obj1.orderIndex;
|
||||
var val2 = obj2.orderIndex;
|
||||
if (val1 < val2) {
|
||||
return -1;
|
||||
} else if (val1 > val2) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
var compare = function (prop) {
|
||||
return function (obj1, obj2) {
|
||||
var val1 = obj1[prop];
|
||||
var val2 = obj2[prop];
|
||||
if (!isNaN(Number(val1)) && !isNaN(Number(val2))) {
|
||||
val1 = Number(val1);
|
||||
val2 = Number(val2);
|
||||
}
|
||||
if (val1 < val2) {
|
||||
return -1;
|
||||
} else if (val1 > val2) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
hasNumArr.sort(compare);
|
||||
hasNumArr.sort(compare("orderIndex"));
|
||||
/*for (var shapeId in Model.define.elements) {
|
||||
if($.inArray(shapeId, recordId) == -1) {
|
||||
var obj = {};
|
||||
@ -1829,7 +1835,7 @@ function initShapeAttribute(obj) {
|
||||
}
|
||||
var novalue=no+"."+shape.text;
|
||||
var t = '';
|
||||
t += '<div class="task-box">';
|
||||
t += '<div class="task-box" id="box' + shape.id + '">';
|
||||
t += '<span id="span' + shape.id + '">';
|
||||
t += '</span>';
|
||||
t += '<i class="awsui-iconfont newadd_up" id="searchChange' + shape.id + '" onclick="searchChange(\'' + shape.id + '\',\''+novalue+'\')"></i>';
|
||||
@ -1874,7 +1880,7 @@ function initShapeAttribute(obj) {
|
||||
if(obj==shape.id){
|
||||
continue;
|
||||
}
|
||||
var no = "";
|
||||
/*var no = "";
|
||||
var array=shape.attributesJsonArray;
|
||||
for (var i = 0; i < array.length; i++) {
|
||||
var id = array[i].id;
|
||||
@ -1884,9 +1890,9 @@ function initShapeAttribute(obj) {
|
||||
no = numberValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById("span"+shape.id).innerHTML=no+"."+shape.text;
|
||||
}*/
|
||||
document.getElementById("box"+shape.id).style.display="none";
|
||||
//document.getElementById("span"+shape.id).innerHTML=no+"."+shape.text;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user