模块管理增加生成模块的基础路径和模板存储字段,生成模块代码时给于确认提示;微服务下isLoader为true;
This commit is contained in:
@@ -104,7 +104,11 @@ public class ModuleController extends BaseController {
|
||||
model.addAttribute("config", config);
|
||||
List<String> genBaseDirList = GenModuleUtils.getGenBaseDirList();
|
||||
model.addAttribute("genBaseDirList", genBaseDirList);
|
||||
model.addAttribute("genBaseDir", genBaseDirList.get(0));
|
||||
if (StringUtils.isNotBlank(module.getGenBaseDir())) {
|
||||
model.addAttribute("genBaseDir", module.getGenBaseDir());
|
||||
} else {
|
||||
model.addAttribute("genBaseDir", genBaseDirList.get(0));
|
||||
}
|
||||
model.addAttribute("module", module);
|
||||
return "modules/sys/moduleForm";
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ Class.forName(“com.jeesite.modules.sys.web.LoginController”);在微服务
|
||||
<% if (hasPermi('sys:module:edit')){ %>
|
||||
<#form:hidden path="genFlag"/>
|
||||
<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"
|
||||
onclick="$('#genFlag').val('1');"><i class="fa fa-check"></i> ${text('保 存')}</button>
|
||||
onclick="$('#genFlag').val('0');"><i class="fa fa-check"></i> ${text('保 存')}</button>
|
||||
<% } %>
|
||||
<% if (hasPermi('sys:module:edit') && isCustomModule){ %>
|
||||
<button type="submit" class="btn btn-sm btn-danger" id="btnSubmitAndGen"
|
||||
@@ -148,14 +148,23 @@ jQuery.validator.addMethod("abc2",function(value, element) {
|
||||
}, "${text('请输入2个以上字符,字母开头、允许字母数字下划线或减号、字母数字结尾')}");
|
||||
$('#inputForm').validate({
|
||||
submitHandler: function(form){
|
||||
js.ajaxSubmitForm($(form), function(data){
|
||||
js.showMessage(data.message);
|
||||
if(data.result == Global.TRUE){
|
||||
js.closeCurrentTabPage(function(contentWindow){
|
||||
contentWindow.page();
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
var submitFormFn = function() {
|
||||
js.ajaxSubmitForm($(form), function(data){
|
||||
js.showMessage(data.message);
|
||||
if(data.result == Global.TRUE){
|
||||
js.closeCurrentTabPage(function(contentWindow){
|
||||
contentWindow.page();
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
if ($('#genFlag').val() != '0'){
|
||||
js.confirm('是否要生成模块源码到 ‘' + $('#genBaseDir').val() + '’ 目录下?', function() {
|
||||
submitFormFn();
|
||||
});
|
||||
} else {
|
||||
submitFormFn();
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user