优化流程图片生成逻辑,提升速度
This commit is contained in:
parent
898056f454
commit
c5bfec25b1
Binary file not shown.
@ -719,9 +719,9 @@ public class CoEPALController {
|
||||
// 预览图片
|
||||
// @Mapping("COE_PAL_PL_RESPOSITORY_DF")
|
||||
@Mapping("com.actionsoft.apps.coe.pal_pl_repository_df")
|
||||
public String COEPALPLRESPOSITORYDF(UserContext me, String uuid) {
|
||||
public String COEPALPLRESPOSITORYDF(UserContext me, String uuid, boolean createImg) {
|
||||
CoeDesignerWeb designerWeb = new CoeDesignerWeb(me);
|
||||
return designerWeb.getPNGUrl(uuid);
|
||||
return designerWeb.getPNGUrl(uuid, createImg);
|
||||
}
|
||||
|
||||
// @Mapping("COE_PAL_PL_RESPOSITORY_DOWNLOAD_PNG")
|
||||
|
||||
@ -5062,82 +5062,6 @@ public class PALRepositoryQueryAPIManager {
|
||||
model = CoeDesignerAPIManager.getInstance().getDefinition(uuid, 0);
|
||||
}
|
||||
if (model != null) {
|
||||
// 形状锚点更新
|
||||
String define = CoeDesignerShapeAPIManager.getInstance().updateShapeConfig(uuid, model.getDefinition());
|
||||
|
||||
//特殊处理shape外属性显示内容被切割问题
|
||||
boolean addEmptyFlag = false;
|
||||
String str = "";
|
||||
int rightBoundary = 0; // 记录图最右侧边界值
|
||||
int bottomBoundary = 0; // 记录图最下侧边界值
|
||||
boolean isRight = false;
|
||||
JSONObject defineObj = JSON.parseObject(define);
|
||||
if (defineObj.containsKey("elements")) {
|
||||
JSONObject elements = defineObj.getJSONObject("elements");
|
||||
for (String key : elements.keySet()) {
|
||||
JSONObject shapeObj = elements.getJSONObject(key);
|
||||
if (shapeObj == null || "linker".equals(shapeObj.getString("name"))) {
|
||||
continue;
|
||||
}
|
||||
if (shapeObj.containsKey("dataAttributes")) {
|
||||
JSONArray dataAttributes = shapeObj.getJSONArray("dataAttributes");
|
||||
for (int i = 0; i < dataAttributes.size(); i++) {
|
||||
JSONObject dataAttribute = dataAttributes.getJSONObject(i);
|
||||
if (null != dataAttribute && null != dataAttribute.getJSONObject("dataShowConfig") && null != dataAttribute.getJSONObject("dataShowConfig").getJSONArray("value") && dataAttribute.getJSONObject("dataShowConfig").getJSONArray("value").size() > 0) {
|
||||
addEmptyFlag = true;
|
||||
JSONArray configs = dataAttribute.getJSONObject("dataShowConfig").getJSONArray("value");
|
||||
for (int i1 = 0; i1 < configs.size(); i1++) {
|
||||
JSONObject config = configs.getJSONObject(i1);
|
||||
if (null == config) {
|
||||
continue;
|
||||
}
|
||||
String value = config.getString("value");
|
||||
if (value.length() > str.length()) {
|
||||
str = value;
|
||||
String horizontal = config.getString("horizontal");
|
||||
isRight = horizontal.contains("right");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (shapeObj.containsKey("props")) {
|
||||
JSONObject props = shapeObj.getJSONObject("props");
|
||||
if (null == props) {
|
||||
continue;
|
||||
}
|
||||
int x = props.getIntValue("x");
|
||||
int y = props.getIntValue("y");
|
||||
int w = props.getIntValue("w");
|
||||
int h = props.getIntValue("h");
|
||||
rightBoundary = Math.max(x + w, rightBoundary);
|
||||
bottomBoundary = Math.max(y + h, bottomBoundary);
|
||||
}
|
||||
}
|
||||
|
||||
if (addEmptyFlag) {
|
||||
JSONObject textShape = JSON.parseObject(
|
||||
"{\"parent\":\"\",\"textBlockFinal\":{\"w\":91,\"x\":0,\"h\":50,\"y\":0},\"link\":\"\",\"shapeStyle\":{\"alpha\":1},\"anchors\":[],\"textBlock\":{\"w\":\"w\",\"x\":0,\"h\":\"h\",\"y\":0},\"title\":\"\",\"fontStyle\":{\"orientation\":\"vertical\",\"fontFamily\":\"Arial\",\"size\":14,\"color\":\"50,50,50\",\"underline\":false,\"textAlign\":\"center\",\"bold\":false,\"italic\":false,\"vAlign\":\"middle\"},\"dataAttributes\":[{\"relevanceShapes\":[],\"attributesContent\":\"\",\"type\":\"string\",\"attributesJsonArray\":[],\"linksArray\":[],\"shapeDesc\":\"\",\"privateAttributeContent\":[],\"name\":\"AWSProperties\",\"privateShapesName\":[],\"id\":\"obj_c9e885014030000150f7ed506b48d010\",\"category\":\"default\",\"value\":\"\",\"upFilesArray\":[],\"privateAttribute\":[],\"isCopy\":\"\",\"shapeGroupId\":\"\"}],\"props\":{\"zindex\":51,\"w\":91,\"x\":629,\"h\":50,\"y\":250,\"angle\":0},\"path\":[{\"lineStyle\":{\"lineWidth\":0},\"fillStyle\":{\"type\":\"none\"},\"actions\":[{\"x\":\"0\",\"action\":\"move\",\"y\":\"0\"},{\"x\":\"w\",\"action\":\"line\",\"y\":\"0\"},{\"x\":\"w\",\"action\":\"line\",\"y\":\"h\"},{\"x\":\"0\",\"action\":\"line\",\"y\":\"h\"},{\"action\":\"close\"}]}],\"lineStyle\":{\"lineStyle\":\"solid\",\"lineColor\":\"50,50,50\",\"lineWidth\":1},\"children\":[],\"resizeDir\":[\"tl\",\"tr\",\"br\",\"bl\"],\"name\":\"standardText\",\"orderIndex\":0,\"fillStyle\":{\"color\":\"255,255,255\",\"type\":\"solid\"},\"id\":\"obj_c9e885014020000183f8bc75be204580\",\"text\":\"\",\"attribute\":{\"container\":false,\"rotatable\":false,\"visible\":true,\"editable\":true,\"linkable\":false,\"markerOffset\":5},\"resizeable\":\"1\",\"locked\":false,\"category\":\"standard\",\"group\":\"\"}");
|
||||
|
||||
if (textShape != null && textShape.containsKey("props")) {
|
||||
JSONObject props = textShape.getJSONObject("props");
|
||||
props.put("w", 100);
|
||||
props.put("y", bottomBoundary);
|
||||
props.put("h", 50);
|
||||
if (isRight) {
|
||||
props.put("x", rightBoundary + (str.length() * 2));
|
||||
} else {
|
||||
props.put("x", rightBoundary - (str.length() * 2));
|
||||
}
|
||||
|
||||
elements.put(textShape.getString("id"), textShape);
|
||||
ConsolePrinter.info("add empty text shape: shapeX: " + props.getIntValue("x") + " shapeY: " + props.getIntValue("y"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
model.setDefinition(defineObj.toString());
|
||||
// 生成图片
|
||||
CoeDesignerImage.saveImage(model, bigImage, smallImage);
|
||||
}
|
||||
|
||||
@ -11,6 +11,7 @@ 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.UserContext;
|
||||
import com.actionsoft.bpms.util.ConsolePrinter;
|
||||
import com.actionsoft.bpms.util.UUIDGener;
|
||||
import com.actionsoft.bpms.util.UtilString;
|
||||
import com.actionsoft.apps.coe.pal.constant.CoEConstant;
|
||||
@ -991,6 +992,86 @@ public class CoeDesignerShapeAPIManager {
|
||||
return object;
|
||||
}
|
||||
|
||||
/**
|
||||
* 特殊处理shape外属性显示内容被切割问题
|
||||
* @param define
|
||||
* @return
|
||||
*/
|
||||
public String updateDisplayEdges(String define) {
|
||||
//特殊处理shape外属性显示内容被切割问题
|
||||
boolean addEmptyFlag = false;
|
||||
String str = "";
|
||||
int rightBoundary = 0; // 记录图最右侧边界值
|
||||
int bottomBoundary = 0; // 记录图最下侧边界值
|
||||
boolean isRight = false;
|
||||
JSONObject defineObj = JSON.parseObject(define);
|
||||
if (defineObj.containsKey("elements")) {
|
||||
JSONObject elements = defineObj.getJSONObject("elements");
|
||||
for (String key : elements.keySet()) {
|
||||
JSONObject shapeObj = elements.getJSONObject(key);
|
||||
if (shapeObj == null || "linker".equals(shapeObj.getString("name"))) {
|
||||
continue;
|
||||
}
|
||||
if (shapeObj.containsKey("dataAttributes")) {
|
||||
JSONArray dataAttributes = shapeObj.getJSONArray("dataAttributes");
|
||||
for (int i = 0; i < dataAttributes.size(); i++) {
|
||||
JSONObject dataAttribute = dataAttributes.getJSONObject(i);
|
||||
if (null != dataAttribute && null != dataAttribute.getJSONObject("dataShowConfig") && null != dataAttribute.getJSONObject("dataShowConfig").getJSONArray("value") && dataAttribute.getJSONObject("dataShowConfig").getJSONArray("value").size() > 0) {
|
||||
addEmptyFlag = true;
|
||||
JSONArray configs = dataAttribute.getJSONObject("dataShowConfig").getJSONArray("value");
|
||||
for (int i1 = 0; i1 < configs.size(); i1++) {
|
||||
JSONObject config = configs.getJSONObject(i1);
|
||||
if (null == config) {
|
||||
continue;
|
||||
}
|
||||
String value = config.getString("value");
|
||||
if (value.length() > str.length()) {
|
||||
str = value;
|
||||
String horizontal = config.getString("horizontal");
|
||||
isRight = horizontal.contains("right");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (shapeObj.containsKey("props")) {
|
||||
JSONObject props = shapeObj.getJSONObject("props");
|
||||
if (null == props) {
|
||||
continue;
|
||||
}
|
||||
int x = props.getIntValue("x");
|
||||
int y = props.getIntValue("y");
|
||||
int w = props.getIntValue("w");
|
||||
int h = props.getIntValue("h");
|
||||
rightBoundary = Math.max(x + w, rightBoundary);
|
||||
bottomBoundary = Math.max(y + h, bottomBoundary);
|
||||
}
|
||||
}
|
||||
|
||||
if (addEmptyFlag) {
|
||||
JSONObject textShape = JSON.parseObject(
|
||||
"{\"parent\":\"\",\"textBlockFinal\":{\"w\":91,\"x\":0,\"h\":50,\"y\":0},\"link\":\"\",\"shapeStyle\":{\"alpha\":1},\"anchors\":[],\"textBlock\":{\"w\":\"w\",\"x\":0,\"h\":\"h\",\"y\":0},\"title\":\"\",\"fontStyle\":{\"orientation\":\"vertical\",\"fontFamily\":\"Arial\",\"size\":14,\"color\":\"50,50,50\",\"underline\":false,\"textAlign\":\"center\",\"bold\":false,\"italic\":false,\"vAlign\":\"middle\"},\"dataAttributes\":[{\"relevanceShapes\":[],\"attributesContent\":\"\",\"type\":\"string\",\"attributesJsonArray\":[],\"linksArray\":[],\"shapeDesc\":\"\",\"privateAttributeContent\":[],\"name\":\"AWSProperties\",\"privateShapesName\":[],\"id\":\"obj_c9e885014030000150f7ed506b48d010\",\"category\":\"default\",\"value\":\"\",\"upFilesArray\":[],\"privateAttribute\":[],\"isCopy\":\"\",\"shapeGroupId\":\"\"}],\"props\":{\"zindex\":51,\"w\":91,\"x\":629,\"h\":50,\"y\":250,\"angle\":0},\"path\":[{\"lineStyle\":{\"lineWidth\":0},\"fillStyle\":{\"type\":\"none\"},\"actions\":[{\"x\":\"0\",\"action\":\"move\",\"y\":\"0\"},{\"x\":\"w\",\"action\":\"line\",\"y\":\"0\"},{\"x\":\"w\",\"action\":\"line\",\"y\":\"h\"},{\"x\":\"0\",\"action\":\"line\",\"y\":\"h\"},{\"action\":\"close\"}]}],\"lineStyle\":{\"lineStyle\":\"solid\",\"lineColor\":\"50,50,50\",\"lineWidth\":1},\"children\":[],\"resizeDir\":[\"tl\",\"tr\",\"br\",\"bl\"],\"name\":\"standardText\",\"orderIndex\":0,\"fillStyle\":{\"color\":\"255,255,255\",\"type\":\"solid\"},\"id\":\"obj_c9e885014020000183f8bc75be204580\",\"text\":\"\",\"attribute\":{\"container\":false,\"rotatable\":false,\"visible\":true,\"editable\":true,\"linkable\":false,\"markerOffset\":5},\"resizeable\":\"1\",\"locked\":false,\"category\":\"standard\",\"group\":\"\"}");
|
||||
|
||||
if (textShape != null && textShape.containsKey("props")) {
|
||||
JSONObject props = textShape.getJSONObject("props");
|
||||
props.put("w", 100);
|
||||
props.put("y", bottomBoundary);
|
||||
props.put("h", 50);
|
||||
if (isRight) {
|
||||
props.put("x", rightBoundary + (str.length() * 2));
|
||||
} else {
|
||||
props.put("x", rightBoundary - (str.length() * 2));
|
||||
}
|
||||
|
||||
elements.put(textShape.getString("id"), textShape);
|
||||
ConsolePrinter.info("add empty text shape: shapeX: " + props.getIntValue("x") + " shapeY: " + props.getIntValue("y"));
|
||||
}
|
||||
}
|
||||
}
|
||||
return defineObj.toString();
|
||||
}
|
||||
|
||||
// 更新节点最新锚点配置和内容
|
||||
public String updateShapeConfig(String uuid, String define) {
|
||||
PALRepositoryModel plModel = PALRepositoryCache.getCache().get(uuid);
|
||||
@ -1202,6 +1283,36 @@ public class CoeDesignerShapeAPIManager {
|
||||
return definition.toString();
|
||||
}
|
||||
|
||||
// 删除节点锚点配置和内容(生成缩略图时不需要有锚点)
|
||||
public String removeShapeConfig(String uuid, String define) {
|
||||
PALRepositoryModel plModel = PALRepositoryCache.getCache().get(uuid);
|
||||
JSONObject definition = JSONObject.parseObject(define);
|
||||
JSONObject elements = definition.getJSONObject("elements");
|
||||
Map<String, Map<String, PALMethodAttributeModel>> shapeAttrMap = new HashMap<>();
|
||||
Iterator<String> it = elements.keySet().iterator();
|
||||
|
||||
while (it.hasNext()) {
|
||||
String shapeId = it.next();
|
||||
JSONObject shape = elements.getJSONObject(shapeId);
|
||||
String shapeName = shape.getString("name");
|
||||
if (!"linker".equals(shapeName)) {
|
||||
JSONArray configValueArr = new JSONArray();// 计算出的最新配置和内容
|
||||
// 获取该形状的属性配置
|
||||
if (shape.get("dataAttributes") != null) {
|
||||
JSONArray dataAttributes = shape.getJSONArray("dataAttributes");
|
||||
for (int i = 0; i < dataAttributes.size(); i++) {
|
||||
JSONObject attr1 = dataAttributes.getJSONObject(i);
|
||||
if (attr1.containsKey("dataShowConfig")) {
|
||||
attr1.remove("dataShowConfig");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return definition.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理连线箭头问题
|
||||
* @param define
|
||||
|
||||
@ -2,7 +2,9 @@ package com.actionsoft.apps.coe.pal.pal.repository.designer.io.image;
|
||||
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.designer.CoeDesignerShapeAPIManager;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.designer.manage.CoeDesignerAPIManager;
|
||||
import com.actionsoft.bpms.bpmn.modeler.util.draw.ChartGraphics;
|
||||
import com.actionsoft.apps.coe.pal.util.ChartGraphics;
|
||||
import com.actionsoft.bpms.util.ConsolePrinter;
|
||||
import com.actionsoft.bpms.util.UUIDGener;
|
||||
import com.actionsoft.bpms.util.UtilFile;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.designer.model.BaseModel;
|
||||
import com.actionsoft.exception.AWSException;
|
||||
@ -24,7 +26,8 @@ public class CoeDesignerImage {
|
||||
uf.write(image);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 生成图片和缩略图
|
||||
* @param model 模型源文件
|
||||
@ -32,32 +35,60 @@ public class CoeDesignerImage {
|
||||
* @param smallImage 是否生成缩略图
|
||||
*/
|
||||
public static void saveImage(BaseModel model, boolean bigImage, boolean smallImage) {
|
||||
String traceId = UUIDGener.getUUID();
|
||||
ConsolePrinter.info("*********[开始][生成图片]traceId:" + traceId);
|
||||
ConsolePrinter.info("*********uuid: " + model.getUUID() + " bigImage:" + bigImage + " smallImage:" + smallImage);
|
||||
//保存图片
|
||||
ChartGraphics brush = new ChartGraphics();
|
||||
if (bigImage) {
|
||||
// ConsolePrinter.info("*********[进行][生成图片][开始][处理锚点][大图]traceId:" + traceId);
|
||||
// 形状锚点更新
|
||||
String define = CoeDesignerShapeAPIManager.getInstance().updateShapeConfig(model.getUUID(), model.getDefinition());
|
||||
// ConsolePrinter.info("*********[进行][生成图片][完成][处理锚点][大图]traceId:" + traceId);
|
||||
// ConsolePrinter.info("*********[进行][生成图片][开始][处理节点显示切割][大图]traceId:" + traceId);
|
||||
define = CoeDesignerShapeAPIManager.getInstance().updateDisplayEdges(define);
|
||||
// ConsolePrinter.info("*********[进行][生成图片][完成][处理节点显示切割][大图]traceId:" + traceId);
|
||||
model.setDefinition(define);
|
||||
// 处理连线箭头问题
|
||||
String define = CoeDesignerShapeAPIManager.getInstance().updateLinkArrow(model.getDefinition());
|
||||
// ConsolePrinter.info("*********[进行][生成图片][开始][处理连线箭头][大图]traceId:" + traceId);
|
||||
define = CoeDesignerShapeAPIManager.getInstance().updateLinkArrow(model.getDefinition());
|
||||
// ConsolePrinter.info("*********[进行][生成图片][完成][处理连线箭头][大图]traceId:" + traceId);
|
||||
// ConsolePrinter.info("*********[进行][生成图片][开始][处理文本区域相对位置和大小][大图]traceId:" + traceId);
|
||||
define = CoeDesignerShapeAPIManager.getInstance().updateTextBlock(define);
|
||||
// ConsolePrinter.info("*********[进行][生成图片][完成][处理文本区域相对位置和大小][大图]traceId:" + traceId);
|
||||
String pathname =model.getPath()+model.getUUID()+".png";
|
||||
byte[] desginerImg = null;
|
||||
try {
|
||||
// ConsolePrinter.info("*********[进行][生成图片][开始][画图][大图]traceId:" + traceId);
|
||||
desginerImg = brush.draw(define, null, null); // 获得原图
|
||||
// ConsolePrinter.info("*********[进行][生成图片][完成][画图][大图]traceId:" + traceId);
|
||||
// ConsolePrinter.info("*********[进行][生成图片][开始][图片保存][大图]traceId:" + traceId);
|
||||
create(pathname, desginerImg);
|
||||
// ConsolePrinter.info("*********[进行][生成图片][完成][图片保存][大图]traceId:" + traceId);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new AWSException("创建图片失败");
|
||||
}
|
||||
}
|
||||
if (smallImage) {
|
||||
// ConsolePrinter.info("*********[进行][生成图片][开始][删除锚点][小图]traceId:" + traceId);
|
||||
// 形状锚点更新
|
||||
String define = CoeDesignerShapeAPIManager.getInstance().updateShapeConfig(model.getUUID(), model.getDefinition());
|
||||
// ConsolePrinter.info("*********[进行][生成图片][完成][删除锚点][小图]traceId:" + traceId);
|
||||
String smallpathname =model.getPath()+model.getUUID()+".small.png";
|
||||
byte[] desginerSmailImg = null;
|
||||
try {
|
||||
// ConsolePrinter.info("*********[进行][生成图片][开始][画图][小图]traceId:" + traceId);
|
||||
desginerSmailImg = brush.draw(model.getDefinition(), 200, 200);
|
||||
create(smallpathname, desginerSmailImg);
|
||||
// ConsolePrinter.info("*********[进行][生成图片][完成][画图][小图]traceId:" + traceId);
|
||||
// ConsolePrinter.info("*********[进行][生成图片][开始][图片保存][小图]traceId:" + traceId);
|
||||
create(smallpathname, desginerSmailImg);
|
||||
// ConsolePrinter.info("*********[进行][生成图片][完成][图片保存][小图]traceId:" + traceId);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new AWSException("创建缩略图失败");
|
||||
}
|
||||
}
|
||||
ConsolePrinter.info("*********[完成][生成图片]traceId:" + traceId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1743,20 +1743,23 @@ public class CoeDesignerWeb extends ActionWeb {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据chartId 获得相应图片(预览)
|
||||
*
|
||||
* @param uuid chartId
|
||||
* @return
|
||||
*/
|
||||
public String getPNGUrl(String uuid) {
|
||||
public String getPNGUrl(String uuid, boolean createImg) {
|
||||
String photo = "../apps/" + CoEConstant.APP_ID + "/img/method/default.png";
|
||||
if (uuid.indexOf("obj_") == 0) {
|
||||
photo = "data:image/png;base64," + BPMNIO.getBPMNImage(ProcessDefCache.getInstance().getModel(uuid).getAppId(), uuid);
|
||||
} else {
|
||||
PALRepositoryModel cplm = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(uuid);
|
||||
if (cplm != null) {
|
||||
PALRepositoryQueryAPIManager.getInstance().checkImage(cplm.getId(), true, false);// 生成图片
|
||||
if (createImg) {
|
||||
PALRepositoryQueryAPIManager.getInstance().checkImage(cplm.getId(), true, false);// 生成图片
|
||||
}
|
||||
String path = cplm.getFilePath();
|
||||
if (!UtilString.isEmpty(path)) {
|
||||
UtilFile utilFile = new UtilFile(path + "/" + cplm.getId() + ".png");
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -382,6 +382,7 @@
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.coe.pal_pl_repository_df">
|
||||
<param name="uuid"/>
|
||||
<param name="createImg"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.coe.pal_processlevel_list_portal_page">
|
||||
<param name="wsId"/>
|
||||
|
||||
@ -1432,7 +1432,7 @@ var UI = {
|
||||
/**
|
||||
* 加载预览数据
|
||||
*/
|
||||
doPreview: function () {
|
||||
doPreview: function (createImg) {
|
||||
if ($("#saving_tip").text() != "已保存成功" && $("#saving_tip").text() != "保存成功" && $("#saving_tip").text() != "您的文件已经成功保存" && $("#saving_tip").text() != "") {
|
||||
if (editable) {
|
||||
$.simpleAlert('页面中有未保存的内容,请先保存');
|
||||
@ -1443,7 +1443,8 @@ var UI = {
|
||||
$.post("./jd", {
|
||||
cmd: "com.actionsoft.apps.coe.pal_pl_repository_df",
|
||||
sid: sid,
|
||||
"uuid": chartId
|
||||
"uuid": chartId,
|
||||
"createImg": createImg == undefined ? "true" : createImg
|
||||
}, function t(msg) {
|
||||
$("#previewContent .procImg").remove();
|
||||
if (typeof(msg) == "string") {
|
||||
@ -1493,7 +1494,7 @@ var UI = {
|
||||
content:"是否打开图片预览",
|
||||
onConfirm: function(){
|
||||
$.simpleAlert("close");
|
||||
UI.doPreview();// 预览
|
||||
UI.doPreview(false);// 预览
|
||||
},
|
||||
onCancel : function(){
|
||||
}
|
||||
|
||||
@ -1493,7 +1493,8 @@ var UI = {
|
||||
/**
|
||||
* 加载预览数据
|
||||
*/
|
||||
doPreview: function () {
|
||||
doPreview: function (createImg) {
|
||||
console.log(createImg);
|
||||
if ($("#saving_tip").text() != "已保存成功" && $("#saving_tip").text() != "保存成功" && $("#saving_tip").text() != "您的文件已经成功保存" && $("#saving_tip").text() != "") {
|
||||
if (editable) {
|
||||
$.simpleAlert('页面中有未保存的内容,请先保存');
|
||||
@ -1504,7 +1505,8 @@ var UI = {
|
||||
$.post("./jd", {
|
||||
cmd: "com.actionsoft.apps.coe.pal_pl_repository_df",
|
||||
sid: sid,
|
||||
"uuid": chartId
|
||||
"uuid": chartId,
|
||||
"createImg": createImg == undefined ? "true" : createImg
|
||||
}, function t(msg) {
|
||||
$("#previewContent .procImg").remove();
|
||||
if (typeof(msg) == "string") {
|
||||
@ -1554,7 +1556,7 @@ var UI = {
|
||||
content:"是否打开图片预览",
|
||||
onConfirm: function(){
|
||||
$.simpleAlert("close");
|
||||
UI.doPreview();// 预览
|
||||
UI.doPreview(false);// 预览
|
||||
},
|
||||
onCancel : function(){
|
||||
}
|
||||
|
||||
@ -1363,7 +1363,7 @@ var UI = {
|
||||
/**
|
||||
* 加载预览数据
|
||||
*/
|
||||
doPreview: function () {
|
||||
doPreview: function (createImg) {
|
||||
if ($("#saving_tip").text() != "已保存成功" && $("#saving_tip").text() != "保存成功" && $("#saving_tip").text() != "您的文件已经成功保存" && $("#saving_tip").text() != "") {
|
||||
if (editable) {
|
||||
$.simpleAlert('页面中有未保存的内容,请先保存');
|
||||
@ -1374,7 +1374,8 @@ var UI = {
|
||||
$.post("./jd", {
|
||||
cmd: "com.actionsoft.apps.coe.pal_pl_repository_df",
|
||||
sid: sid,
|
||||
"uuid": chartId
|
||||
"uuid": chartId,
|
||||
"createImg": createImg == undefined ? "true" : createImg
|
||||
}, function t(msg) {
|
||||
$("#previewContent .procImg").remove();
|
||||
if (typeof(msg) == "string") {
|
||||
@ -1424,7 +1425,7 @@ var UI = {
|
||||
content:"是否打开图片预览",
|
||||
onConfirm: function(){
|
||||
$.simpleAlert("close");
|
||||
UI.doPreview();// 预览
|
||||
UI.doPreview(false);// 预览
|
||||
},
|
||||
onCancel : function(){
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user