Ver a proveniência

修正:js代码生成

master
郑根木 há 2 anos
ascendente
cometimento
410c63bc62
3 ficheiros alterados com 6 adições e 7 eliminações
  1. +1
    -1
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/CodeBuildHandler.java
  2. +4
    -4
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormHelper.java
  3. +1
    -2
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormLoadHandler.java

+ 1
- 1
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/CodeBuildHandler.java Ver ficheiro

@@ -67,7 +67,7 @@ public class CodeBuildHandler extends AbstractHandler {
if (StringUtils.isEmpty(moduleName)) throw new BizException("此项目未定义Module!");

final String eventPath = ModelFormHelper.getEventPath(form);
codePath = ModelFormHelper.getCodePath(form) + "/src/main/resources/static/" + moduleName + "/" + eventPath.replaceAll("\\.", "/");
codePath = ModelFormHelper.getCodePath(form) + "/src/main/resources/static/" + eventPath.replaceAll("\\.", "/");
new File(codePath).mkdirs();

SwMap model = new SwMap();


+ 4
- 4
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormHelper.java Ver ficheiro

@@ -383,10 +383,10 @@ public class ModelFormHelper {
public static String getEventPath(ModelForm bean) {
String moduleName = ModelProjectCache.getInstance().getModule(bean.getPrjId());
if (StringUtils.isNotEmpty(moduleName)) {
// String ep = moduleName;
return ModelCatalogCache.getInstance().getFullName(bean.getMcId());
// if (StringUtils.isNotEmpty(cn)) ep = ep + "." + cn;
// return ep;
String ep = moduleName;
String cn = ModelCatalogCache.getInstance().getFullName(bean.getMcId());
if (StringUtils.isNotEmpty(cn)) ep = ep + "." + cn;
return ep;
}
return "";
}


+ 1
- 2
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormLoadHandler.java Ver ficheiro

@@ -85,8 +85,7 @@ public class ModelFormLoadHandler extends DefaultLoadHandler<ModelForm> {
if (StringUtils.isEmpty(codeJavaPath)) {
return r;
}
String moduleName = ModelProjectCache.getInstance().getModule(form.getPrjId());
String path = ModelFormHelper.getCodePath(form) + "/src/main/resources/static/" + moduleName + "/" + ModelFormHelper.getEventPath(form).replaceAll("\\.", "/") + "/" + form.getName() + ".js";
String path = ModelFormHelper.getCodePath(form) + "/src/main/resources/static/" + ModelFormHelper.getEventPath(form).replaceAll("\\.", "/") + "/" + form.getName() + ".js";
String js = FileUtil.readFileStr(path);
if (StringUtils.isEmpty(js)) {
return r;


Carregando…
Cancelar
Guardar