Selaa lähdekoodia

修正:js代码生成

master
郑根木 2 vuotta sitten
vanhempi
commit
410c63bc62
3 muutettua tiedostoa jossa 6 lisäystä ja 7 poistoa
  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 Näytä tiedosto

@@ -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 Näytä tiedosto

@@ -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 Näytä tiedosto

@@ -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;


Ladataan…
Peruuta
Tallenna