|
|
@@ -7,12 +7,16 @@ import cc.smtweb.framework.core.common.SwMap; |
|
|
|
import cc.smtweb.framework.core.mvc.service.DefaultLoadHandler; |
|
|
|
import cc.smtweb.framework.core.util.FileUtil; |
|
|
|
import cc.smtweb.framework.core.util.JsonUtil; |
|
|
|
import cc.smtweb.framework.core.util.SpringUtil; |
|
|
|
import cc.smtweb.system.bpm.spring.BpmConfigBean; |
|
|
|
import cc.smtweb.system.bpm.util.IdeaUtil; |
|
|
|
import cc.smtweb.system.bpm.web.design.db.ModelProjectCache; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Collections; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
/** |
|
|
|
* Created by Akmm at 2022/5/9 16:17 |
|
|
@@ -73,13 +77,16 @@ public class ModelFormLoadHandler extends DefaultLoadHandler<ModelForm> { |
|
|
|
long pageId = params.readLong("pageId"); |
|
|
|
ModelForm form = ModelFormCache.getInstance().get(pageId); |
|
|
|
if (form == null) throw new BizException("未找到指定的页面定义(" + pageId + ")!"); |
|
|
|
String moduleName = ModelProjectCache.getInstance().getModule(form.getPrjId()); |
|
|
|
|
|
|
|
List<String> listRet = new ArrayList<>(); |
|
|
|
R r = R.success(listRet); |
|
|
|
if (StringUtils.isEmpty(moduleName)) { |
|
|
|
|
|
|
|
String codeJavaPath = ModelFormHelper.getCodePath(form); |
|
|
|
if (StringUtils.isEmpty(codeJavaPath)) { |
|
|
|
return r; |
|
|
|
} |
|
|
|
String path = ModelFormHelper.getEventPath(form) + "/" + form.getName() + ".js"; |
|
|
|
|
|
|
|
String path = codeJavaPath + "/" + ModelFormHelper.getEventPath(form).replaceAll("\\.", "/") + "/" + form.getName() + ".js"; |
|
|
|
String js = FileUtil.readFileStr(path); |
|
|
|
if (StringUtils.isEmpty(js)) { |
|
|
|
return r; |
|
|
|