@@ -36,12 +36,19 @@ $('body').layout({
var win = $("#mainFrame")[0].contentWindow;
// 树结构初始化加载
var setting = {view:{selectedMulti:false},data:{key:{title:"title"},simpleData:{enable:true}},
- async:{enable:true,autoParam:["id=parentCode"],url:"\${ctx}/${urlPrefix}/treeData"},
+ async:{enable:true,autoParam:["id=parentCode"],url:"\${ctx}${
+ isNotBlank(table.optionMap['leftTreeRightTableUrl'])
+ ?table.optionMap['leftTreeRightTableUrl']
+ :'/'+urlPrefix+'/treeData'}"},
callback:{onClick:function(event, treeId, treeNode){
tree.expandNode(treeNode);
//win.$('button[type=reset]').click();
- <% for(pk in table.pkList){ %>
+ <% if (isNotBlank(table.optionMap['leftTreeRightTableFk'])) { %>
+ win.$('#searchForm [name="${table.optionMap['leftTreeRightTableFk']}"]').val(treeNode.id);
+ <% }else{ %>
+ <% for(pk in table.pkList){ %>
win.$('#${pk.attrName}').val(treeNode.id);
+ <% } %>
<% } %>
win.page();
}}
diff --git a/modules/core/src/main/resources/templates/modules/gen/include/viewList.html b/modules/core/src/main/resources/templates/modules/gen/include/viewList.html
index c85ac116..7e1a1abf 100644
--- a/modules/core/src/main/resources/templates/modules/gen/include/viewList.html
+++ b/modules/core/src/main/resources/templates/modules/gen/include/viewList.html
@@ -14,7 +14,13 @@
\${text('展开')}
\${text('折叠')}
<% } %>
+ <% if(toBoolean(table.optionMap['isImportExport'])){ %>
+
${text('导出')}
+ <% } %>
\<% if(hasPermi('${permissionPrefix}:edit')){ %>
+ <% if(toBoolean(table.optionMap['isImportExport'])){ %>
+
${text('导入')}
+ <% } %>
\${text('新增')}
\<% } %>
@@ -30,4 +36,59 @@