html和js语法编写不同的占位符,减少IDE标红提示

This commit is contained in:
thinkgem
2023-08-03 13:20:03 +08:00
parent c47398295b
commit a445e43fbb
54 changed files with 795 additions and 782 deletions

View File

@@ -60,7 +60,7 @@
</div>
<% } %>
<script>
// 初始化DataGrid对象
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
@@ -68,11 +68,11 @@ $('#dataGrid').dataGrid({
return '<a href="${ctx}/app/appComment/form?id='+row.id+'" class="btnList" data-title="${text("编辑意见")}">'+(val||row.id)+'</a>';
}},
{header:'${text("问题分类")}', name:'category', index:'a.category', width:100, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('app_comment_category')}, val, '${text("未知")}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('app_comment_category')}", val, '${text("未知")}', true);
}},
{header:'${text("联系方式")}', name:'contact', index:'a.contact', width:150, align:"center"},
{header:'${text("状态")}', name:'status', index:'a.status', width:100, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('app_comment_status')}, val, '${text("未知")}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('app_comment_status')}", val, '${text("未知")}', true);
}},
{header:'${text("提问时间")}', name:'createDate', index:'a.create_date', width:150, align:"center"},
{header:'${text("提问人员")}', name:'createByName', index:'a.create_by_name', width:150, align:"center"},
@@ -81,7 +81,7 @@ $('#dataGrid').dataGrid({
{header:'${text("回复人员")}', name:'replyUserName', index:'a.reply_user_name', width:150, align:"center"},
{header:'${text("操作")}', name:'actions', width:120, formatter: function(val, obj, row, act){
var actions = [];
//<% if(hasPermi('app:appComment:edit')){ %>
//# if(hasPermi('app:appComment:edit')){
actions.push('<a href="${ctx}/app/appComment/form?id='+row.id+'" class="btnList" title="${text("编辑意见")}"><i class="fa fa-pencil"></i></a>&nbsp;');
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctx}/app/appComment/disable?id='+row.id+'" class="btnList" title="${text("停用意见")}" data-confirm="${text("确认要停用该意见吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
@@ -89,11 +89,11 @@ $('#dataGrid').dataGrid({
actions.push('<a href="${ctx}/app/appComment/enable?id='+row.id+'" class="btnList" title="${text("启用意见")}" data-confirm="${text("确认要启用该意见吗?")}"><i class="glyphicon glyphicon-ok-circle"></i></a>&nbsp;');
}
actions.push('<a href="${ctx}/app/appComment/delete?id='+row.id+'" class="btnList" title="${text("删除意见")}" data-confirm="${text("确认要删除该意见吗?")}"><i class="fa fa-trash-o"></i></a>&nbsp;');
//<% } %>
//# }
return actions.join('');
}}
],
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function(data){
}

View File

@@ -59,7 +59,7 @@
</div>
<% } %>
<script>
// 初始化DataGrid对象
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
@@ -67,21 +67,21 @@ $('#dataGrid').dataGrid({
return '<a href="${ctx}/app/appUpgrade/form?id='+row.id+'" class="btnList" data-title="${text("编辑版本")}">'+(val||row.id)+'</a>';
}},
{header:'${text("应用代号")}', name:'appCode', index:'a.app_code', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('app_code')}, val, val, true);
return js.getDictLabel("#{@DictUtils.getDictListJson('app_code')}", val, val, true);
}},
{header:'${text("版本号码")}', name:'upVersion', index:'a.up_version', width:100, align:"center"},
{header:'${text("升级类型")}', name:'upType', index:'a.up_type', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('app_upgrade_type')}, val, '${text("未知")}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('app_upgrade_type')}", val, '${text("未知")}', true);
}},
{header:'${text("发布时间")}', name:'upDate', index:'a.up_date', width:150, align:"center"},
{header:'${text("升级内容")}', name:'upContent', index:'a.up_content', width:250, align:"left"},
{header:'${text("状态")}', name:'status', index:'a.status', width:100, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '${text("未知")}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_search_status')}", val, '${text("未知")}', true);
}},
{header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:150, align:"center"},
{header:'${text("操作")}', name:'actions', width:120, formatter: function(val, obj, row, act){
var actions = [];
//<% if(hasPermi('app:appUpgrade:edit')){ %>
//# if(hasPermi('app:appUpgrade:edit')){
actions.push('<a href="${ctx}/app/appUpgrade/form?id='+row.id+'" class="btnList" title="${text("编辑版本")}"><i class="fa fa-pencil"></i></a>&nbsp;');
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctx}/app/appUpgrade/disable?id='+row.id+'" class="btnList" title="${text("停用版本")}" data-confirm="${text("确认要停用该版本吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
@@ -89,11 +89,11 @@ $('#dataGrid').dataGrid({
actions.push('<a href="${ctx}/app/appUpgrade/enable?id='+row.id+'" class="btnList" title="${text("启用版本")}" data-confirm="${text("确认要启用该版本吗?")}"><i class="glyphicon glyphicon-ok-circle"></i></a>&nbsp;');
}
actions.push('<a href="${ctx}/app/appUpgrade/delete?id='+row.id+'" class="btnList" title="${text("删除版本")}" data-confirm="${text("确认要删除该版本吗?")}"><i class="fa fa-trash-o"></i></a>&nbsp;');
//<% } %>
//# }
return actions.join('');
}}
],
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function(data){
}

View File

@@ -52,7 +52,7 @@
</div>
<% } %>
<script>
// 初始化DataGrid对象
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
@@ -64,13 +64,13 @@ $('#dataGrid').dataGrid({
{header:'${text("点击数")}', name:'hits', index:'a.hits', width:100, align:"center"},
{header:'${text("字数")}', name:'wordCount', index:'a.word_count', width:100, align:"center"},
{header:'${text("状态")}', name:'status', index:'a.status', width:100, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '${text("未知")}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_search_status')}", val, '${text("未知")}', true);
}},
{header:'${text("创建时间")}', name:'createDate', index:'a.create_date', width:150, align:"center"},
// {header:'${text("备注信息")}', name:'remarks', index:'a.remarks', width:150, align:"left"},
{header:'${text("操作")}', name:'actions', width:150, formatter: function(val, obj, row, act){
var actions = [];
//<% if(hasPermi('cms:article:edit')){ %>
//# if(hasPermi('cms:article:edit')){
actions.push('<a href="${ctx}/cms/article/form?id='+row.id+'" class="btnList" title="${text("编辑文章")}"><i class="fa fa-pencil"></i></a>&nbsp;');
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctx}/cms/article/disable?id='+row.id+'" class="btnList" title="${text("停用文章")}" data-confirm="${text("确认要停用该文章吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
@@ -82,11 +82,11 @@ $('#dataGrid').dataGrid({
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctxFront}/view-'+row.category.categoryCode+'-'+row.id+'" target="_blank" title="${text("预览文章")}"><i class="fa fa-globe"></i></a>&nbsp;');
}
//<% } %>
//# }
return actions.join('');
}}
],
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function(data){
}

View File

@@ -67,7 +67,7 @@
</div>
<% } %>
<script>
// 初始化DataGrid对象
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
@@ -77,17 +77,17 @@ $('#dataGrid').dataGrid({
{header:'${text("模型")}', name:'moduleType', index:'a.module_type', width:100, align:"center"},
{header:'${text("排序")}', name:'treeSort', index:'a.tree_sort', width:50, align:"center"},
{header:'${text("导航栏目")}', name:'inMenu', index:'a.in_menu', width:80, fixed:true, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_show_hide')}, val, '未知', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_show_hide')}", val, '未知', true);
}},
{header:'${text("栏目列表")}', name:'inList', index:'a.in_list', width:80, fixed:true, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_show_hide')}, val, '未知', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_show_hide')}", val, '未知', true);
}},
{header:'${text("展现方式")}', name:'showModes', index:'a.show_modes', width:150, fixed:true, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('cms_show_modes')}, val, '未知', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('cms_show_modes')}", val, '未知', true);
}},
{header:'${text("操作")}', name:'actions', width:150, formatter: function(val, obj, row, act){
var actions = [];
//<% if(hasPermi('cms:category:edit')){ %>
//# if(hasPermi('cms:category:edit')){
actions.push('<a href="${ctx}/cms/category/form?categoryCode='+row.categoryCode+'" class="btnList" title="${text("编辑栏目表")}"><i class="fa fa-pencil"></i></a>&nbsp;');
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctx}/cms/category/disable?categoryCode='+row.categoryCode+'" class="btnList" title="${text("停用栏目表")}" data-confirm="${text("确认要停用该栏目表吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
@@ -97,19 +97,20 @@ $('#dataGrid').dataGrid({
}
actions.push('<a href="${ctx}/cms/category/delete?categoryCode='+row.categoryCode+'" class="btnList" title="${text("删除栏目表")}" data-confirm="${text("确认要删除该栏目表及所有子栏目表吗?")}" data-deltreenode="'+row.id+'"><i class="fa fa-trash-o"></i></a>&nbsp;');
actions.push('<a href="${ctx}/cms/category/form?parentCode='+row.id+'&site.siteCode=${category.site.siteCode}" class="btnList" title="${text("新增下级栏目表")}"><i class="fa fa-plus-square"></i></a>&nbsp;');
//<% if(hasPermi('cms:category:rebuildIndex')){ %>
//# if(hasPermi('cms:category:rebuildIndex')){
actions.push('<a href="${ctx}/cms/category/rebuildIndex?categoryCode='+row.categoryCode+'" class="btnList" title="${text("重建该栏目索引")}" data-confirm="${text("确认重建该栏目下文章索引吗")}"><i class="fa fa-crosshairs"></i></a>&nbsp;');
//<% } %>
//# }
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctxFront}/list-'+row.categoryCode+'" target="_blank" title="${text("访问栏目")}"><i class="fa fa-globe"></i></a>&nbsp;');
}
//<% } %>
//# }
return actions.join('');
}}
],
treeGrid: true, // 启用树结构表格
defaultExpandLevel: 0, // 默认展开的层次
expandNodeClearPostData: 'categoryName,siteCode,moduleType,image,href,target,keywords,description,inMenu,inList,showModes,isNeedAudit,isCanComment,customListView,customContentView,viewConfig,status,remarks,', // 展开节点清理请求参数数据(一般设置查询条件的字段属性,否则在查询后,不能展开子节点数据) // 加载成功后执行事件
expandNodeClearPostData: 'categoryName,siteCode,moduleType,image,href,target,keywords,description,inMenu,inList,showModes,isNeedAudit,isCanComment,customListView,customContentView,viewConfig,status,remarks,', // 展开节点清理请求参数数据(一般设置查询条件的字段属性,否则在查询后,不能展开子节点数据)
//# // 加载成功后执行事件
ajaxSuccess: function(data){
}

View File

@@ -34,13 +34,13 @@
</div>
<% } %>
<script>
// 初始化布局
//# // 初始化布局
$('body').layout({
west__size : 180
});
// 主页框架
//# // 主页框架
var win = $("#mainFrame")[0].contentWindow;
// 树结构初始化加载
//# // 树结构初始化加载
var setting = {
view : {selectedMulti : false},
data : {key : {title : "title"}, simpleData : {enable : true}},
@@ -85,7 +85,7 @@ var setting = {
}, null, null, js.text('loading.message'));
};
loadTree();
// 工具栏按钮绑定
//# // 工具栏按钮绑定
$('#btnExpand').click(function() {
tree.expandAll(true);
$(this).hide();

View File

@@ -105,7 +105,7 @@
</div>
<% } %>
<script>
// 初始化DataGrid对象
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
@@ -125,11 +125,11 @@ $('#dataGrid').dataGrid({
{header:'${text('支持数')}', name:'hitsPlus', index:'a.hits_plus', width:150, align:"center"},
{header:'${text('反对数')}', name:'hitsMinus', index:'a.hits_minus', width:150, align:"center"},
{header:'${text('状态')}', name:'status', index:'a.status', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '${text('未知')}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_search_status')}", val, '${text('未知')}', true);
}},
{header:'${text('操作')}', name:'actions', width:120, formatter: function(val, obj, row, act){
var actions = [];
//<% if(hasPermi('cms:comment:edit')){ %>
//# if(hasPermi('cms:comment:edit')){
actions.push('<a href="${ctx}/cms/comment/form?id='+row.id+'" class="btnList" title="${text('编辑文章评论表')}"><i class="fa fa-pencil"></i></a>&nbsp;');
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctx}/cms/comment/disable?id='+row.id+'" class="btnList" title="${text('停用文章评论表')}" data-confirm="${text('确认要停用该文章评论表吗')}"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
@@ -138,11 +138,11 @@ $('#dataGrid').dataGrid({
actions.push('<a href="${ctx}/cms/comment/enable?id='+row.id+'" class="btnList" title="${text('启用文章评论表')}" data-confirm="${text('确认要启用该文章评论表吗')}"><i class="glyphicon glyphicon-ok-circle"></i></a>&nbsp;');
}
actions.push('<a href="${ctx}/cms/comment/delete?id='+row.id+'" class="btnList" title="${text('删除文章评论表')}" data-confirm="${text('确认要删除该文章评论表吗')}"><i class="fa fa-trash-o"></i></a>&nbsp;');
//<% } %>
//# }
return actions.join('');
}}
],
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function(data){
}

View File

@@ -57,7 +57,7 @@
</div>
<% } %>
<script>
// 初始化DataGrid对象
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
@@ -70,7 +70,7 @@ $('#dataGrid').dataGrid({
{header:'${text('举报原因')}', name:'reportCause', index:'a.report_cause', width:150, align:"left"},
{header:'${text('操作')}', name:'actions', width:120, formatter: function(val, obj, row, act){
var actions = [];
//<% if(hasPermi('cms:report:edit')){ %>
//# if(hasPermi('cms:report:edit')){
actions.push('<a href="${ctx}/cms/report/form?id='+row.id+'" class="btnList" title="${text('编辑内容举报表')}"><i class="fa fa-pencil"></i></a>&nbsp;');
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctx}/cms/report/disable?id='+row.id+'" class="btnList" title="${text('停用内容举报表')}" data-confirm="${text('确认要停用该内容举报表吗')}"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
@@ -79,11 +79,11 @@ $('#dataGrid').dataGrid({
actions.push('<a href="${ctx}/cms/report/enable?id='+row.id+'" class="btnList" title="${text('启用内容举报表')}" data-confirm="${text('确认要启用该内容举报表吗')}"><i class="glyphicon glyphicon-ok-circle"></i></a>&nbsp;');
}
actions.push('<a href="${ctx}/cms/report/delete?id='+row.id+'" class="btnList" title="${text('删除内容举报表')}" data-confirm="${text('确认要删除该内容举报表吗')}"><i class="fa fa-trash-o"></i></a>&nbsp;');
//<% } %>
//# }
return actions.join('');
}}
],
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function(data){
}

View File

@@ -51,7 +51,7 @@
</div>
<% } %>
<script>
// 初始化DataGrid对象
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
@@ -64,12 +64,12 @@ $('#dataGrid').dataGrid({
{header:'${text("描述")}', name:'description', index:'a.description', width:150, align:"left"},
{header:'${text("主题")}', name:'theme', index:'a.theme', width:150, align:"center"},
{header:'${text("状态")}', name:'status', index:'a.status', width:90, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '${text("未知")}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_search_status')}", val, '${text("未知")}', true);
}},
{header:'${text("创建时间")}', name:'createDate', index:'a.create_date', width:150, align:"center"},
{header:'${text("操作")}', name:'actions', width:150, formatter: function(val, obj, row, act){
var actions = [];
//<% if(hasPermi('cms:site:edit')){ %>
//# if(hasPermi('cms:site:edit')){
actions.push('<a href="${ctx}/cms/site/form?siteCode='+row.siteCode+'" class="btnList" title="${text("编辑站点")}"><i class="fa fa-pencil"></i></a>&nbsp;');
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctx}/cms/site/disable?siteCode='+row.siteCode+'" class="btnList" title="${text("停用站点")}" data-confirm="${text("确认要停用该站点吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
@@ -78,17 +78,17 @@ $('#dataGrid').dataGrid({
actions.push('<a href="${ctx}/cms/site/enable?siteCode='+row.siteCode+'" class="btnList" title="${text("启用站点")}" data-confirm="${text("确认要启用该站点吗?")}"><i class="glyphicon glyphicon-ok-circle"></i></a>&nbsp;');
}
actions.push('<a href="${ctx}/cms/site/delete?siteCode='+row.siteCode+'" class="btnList" title="${text("删除站点")}" data-confirm="${text("确认要删除该站点吗?")}"><i class="fa fa-trash-o"></i></a>&nbsp;');
//<% if(hasPermi('cms:site:rebuildIndex')){ %>
//# if(hasPermi('cms:site:rebuildIndex')){
actions.push('<a href="${ctx}/cms/site/rebuildIndex?siteCode='+row.siteCode+'" class="btnList" title="${text("重建该站点索引")}" data-confirm="${text("确认重建该站点文章索引吗")}"><i class="fa fa-crosshairs"></i></a>&nbsp;');
//<% } %>
//# }
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctxFront}/index-'+row.siteCode+'" target="_blank" title="${text("访问站点")}"><i class="fa fa-globe"></i></a>&nbsp;');
}
//<% } %>
//# }
return actions.join('');
}}
],
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function(data){
}

View File

@@ -34,13 +34,13 @@
</div>
<% } %>
<script>
// 初始化布局
//# // 初始化布局
$('body').layout({
west__size : 300
});
// 主页框架
//# // 主页框架
var win = $("#mainFrame")[0].contentWindow;
// 树结构初始化加载
//# // 树结构初始化加载
var setting = {
view : { selectedMulti : false },
data : { key : { title : "title" }, simpleData : { enable : true } },
@@ -67,7 +67,7 @@ var setting = {
}, null, null, js.text('loading.message'));
};
loadTree();
// 工具栏按钮绑定
//# // 工具栏按钮绑定
$('#btnExpand').click(function() {
tree.expandAll(true);
$(this).hide();

View File

@@ -64,7 +64,7 @@
</div>
<% } %>
<script>
// 初始化DataGrid对象
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
@@ -91,7 +91,7 @@ $('#dataGrid').dataGrid({
{header:'${text('操作')}', name:'actions', width:120, formatter: function(val, obj, row, act){
var actions = [];
//<% if(hasPermi('cms:visitLog:edit')){ %>
//# if(hasPermi('cms:visitLog:edit')){
actions.push('<a href="${ctx}/cms/visitLog/form?id='+row.id+'" class="btnList" title="${text('编辑访问日志表')}"><i class="fa fa-pencil"></i></a>&nbsp;');
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctx}/cms/visitLog/disable?id='+row.id+'" class="btnList" title="${text('停用访问日志表')}" data-confirm="${text('确认要停用该访问日志表吗')}"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
@@ -100,11 +100,11 @@ $('#dataGrid').dataGrid({
actions.push('<a href="${ctx}/cms/visitLog/enable?id='+row.id+'" class="btnList" title="${text('启用访问日志表')}" data-confirm="${text('确认要启用该访问日志表吗')}"><i class="glyphicon glyphicon-ok-circle"></i></a>&nbsp;');
}
actions.push('<a href="${ctx}/cms/visitLog/delete?id='+row.id+'" class="btnList" title="${text('删除访问日志表')}" data-confirm="${text('确认要删除该访问日志表吗')}"><i class="fa fa-trash-o"></i></a>&nbsp;');
//<% } %>
//# }
return actions.join('');
}}
],
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function(data){
}

View File

@@ -2,8 +2,12 @@
ENGINE=org.beetl.core.engine.FastRuntimeEngine
DELIMITER_PLACEHOLDER_START=${
DELIMITER_PLACEHOLDER_END=}
DELIMITER_PLACEHOLDER_START2="#{
DELIMITER_PLACEHOLDER_END2=}"
DELIMITER_STATEMENT_START=<%
DELIMITER_STATEMENT_END=%>
DELIMITER_STATEMENT_START2=//#
DELIMITER_STATEMENT_END2=
DIRECT_BYTE_OUTPUT = FALSE
HTML_TAG_SUPPORT = true
HTML_TAG_FLAG = #

View File

@@ -1,5 +1,5 @@
<script>
// 初始化DataGrid对象
\//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
@@ -46,7 +46,7 @@ $('#dataGrid').dataGrid({
}},
<% }else if(c.showType == 'select' || c.showType == 'select_multiple' || c.showType == 'checkbox' || c.showType == 'radio'){ %>
{header:'\${text("${c.columnLabel}")}', name:'${c.attrName}', index:'a.${c.columnName}', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(\${@DictUtils.getDictListJson('${c.optionMap['dictType']}')}, val, '\${text("未知")}', true);
return js.getDictLabel(\"#{@DictUtils.getDictListJson('${c.optionMap['dictType']}')}", val, '\${text("未知")}', true);
}},
<% }else if(c.showType == "userselect" || c.showType == "officeselect" || c.showType == "areaselect"){ %>
{header:'\${text("${c.columnLabel}")}', name:'${c.attrName2}', index:'a.${c.columnName}', width:150, align:"center"},
@@ -72,10 +72,10 @@ $('#dataGrid').dataGrid({
%>
{header:'\${text("操作")}', name:'actions', width:${table.isTreeEntity?150:120}, formatter: function(val, obj, row, act){
var actions = [];
<% if(isQueryTpl){ %>
<% if(isQueryTpl){ %>
actions.push('<a href="\${ctx}/${urlPrefix}/form?${idParam}" class="btnList" title="\${text("查看${functionNameSimple}")}"><i class="fa fa-file-text-o"></i></a>&nbsp;');
<% }else{ %>
//\<% if(hasPermi('${permissionPrefix}:edit')){ %>
<% }else{ %>
\//# if(hasPermi('${permissionPrefix}:edit')){
actions.push('<a href="\${ctx}/${urlPrefix}/form?${idParam}" class="btnList" title="\${text("编辑${functionNameSimple}")}"><i class="fa fa-pencil"></i></a>&nbsp;');
<% if(toBoolean(table.optionMap['isHaveDisableEnable'])){ %>
if (row.status == Global.STATUS_NORMAL){
@@ -90,17 +90,17 @@ $('#dataGrid').dataGrid({
<% if(table.isTreeEntity){ %>
actions.push('<a href="\${ctx}/${urlPrefix}/form?parentCode='+row.id+'" class="btnList" title="\${text("新增下级${functionNameSimple}")}"><i class="fa fa-plus-square"></i></a>&nbsp;');
<% } %>
//\<% } %>
\//# }
<% if(toBoolean(table.optionMap['isBpmForm'])){ %>
if (row.status != Global.STATUS_DRAFT){
actions.push('<a href="\${ctx}/bpm/bpmRuntime/trace?formKey=${table.optionMap['bpmFormKey']}&bizKey='+row.id+'" class="btnList" title="\${text("流程追踪")}" data-layer="true"><i class="fa fa-file-picture-o"></i></a>&nbsp;');
}
<% } %>
<% } %>
<% } %>
return actions.join('');
}}
],
<% if(table.isTreeEntity){ %>
//# if(table.isTreeEntity){
treeGrid: true, // 启用树结构表格
defaultExpandLevel: 0, // 默认展开的层次
expandNodeClearPostData: '<%
@@ -109,8 +109,8 @@ $('#dataGrid').dataGrid({
print(c.attrName + ',');
}
} %>', // 展开节点清理请求参数数据(一般设置查询条件的字段属性,否则在查询后,不能展开子节点数据)
<% } %>
// 加载成功后执行事件
//# }
\//# // 加载成功后执行事件
ajaxSuccess: function(data){
}

View File

@@ -42,7 +42,7 @@ selectNum = 0, dataGrid = $('#dataGrid').dataGrid({
}},
<% }else if(c.showType == 'select' || c.showType == 'select_multiple' || c.showType == 'checkbox' || c.showType == 'radio'){ %>
{header:'\${text("${c.columnLabel}")}', name:'${c.attrName}', index:'a.${c.columnName}', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(\${@DictUtils.getDictListJson('${c.optionMap['dictType']}')}, val, '\${text("未知")}', true);
return js.getDictLabel(\"#{@DictUtils.getDictListJson('${c.optionMap['dictType']}')}", val, '\${text("未知")}', true);
}},
<% }else if(c.showType == "userselect" || c.showType == "officeselect" || c.showType == "areaselect"){ %>
{header:'\${text("${c.columnLabel}")}', name:'${c.attrName2}', index:'a.${c.columnName}', width:150, align:"center"},

View File

@@ -5,14 +5,14 @@ if (table.childList.~size > 0){ %>
var treeselectExists = false;
for(child in table.childList){
%>
//初始化${child.comments}DataGrid对象
\//# // 初始化${child.comments}DataGrid对象
$("#${@StringUtils.uncap(child.className)}DataGrid").dataGrid({
data: \${toJson(${className}.${@StringUtils.uncap(child.className)}List)},
data: \"#{toJson(${className}.${@StringUtils.uncap(child.className)}List)}",
datatype: "local", // 设置本地数据
autoGridHeight: function(){return 'auto'}, // 设置自动高度
// 设置数据表格列
\//# // 设置数据表格列
columnModel: [
{header:'状态', name:'status', editable:true, hidden:true},
{header:'主键', name:'<% for(pk in child.pkList){ %>${pk.attrName}<% break; }%>', editable:true, hidden:true},
@@ -63,7 +63,7 @@ for (c in child.columnList){
%>
{header:'\${text("${c.columnLabel}")}', name:'${c.attrName}', width:100,
editable:true, edittype:'${c.showType == "select_multiple" ? "select" : c.showType}', editoptions:{<%if (c.showType == 'select_multiple' || c.showType == 'checkbox'){ %>multiple:true, <% } %>'class':'form-control${cssClass}<%if (c.showType == "radio" || c.showType == "checkbox"){ %> icheck<% } %>',
items: $.merge([<%if (c.showType == 'select'){ %>{dictLabel:'&nbsp;',dictValue:''}<% } %>], \${@DictUtils.getDictListJson('${c.optionMap['dictType']}')}),
items: $.merge([<%if (c.showType == 'select'){ %>{dictLabel:'&nbsp;',dictValue:''}<% } %>], \"#{@DictUtils.getDictListJson('${c.optionMap['dictType']}')}"),
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
<%if (c.showType == "radio" || c.showType == "checkbox"){ %>
js.iCheck(element).on("ifChanged",function(){$(this).resetValid()});
@@ -157,18 +157,18 @@ if (table.tplCategory != 'query'){
<% } %>
],
// 编辑表格参数
\//# // 编辑表格参数
editGrid: true, // 是否是编辑表格
editGridInitRowNum: 1, // 编辑表格的初始化新增行数
editGridAddRowBtn: $('#${@StringUtils.uncap(child.className)}DataGridAddRowBtn'), // 子表增行按钮
editGridAddRowBtnToHeader: true, // 子表增行按钮是否显示到表头上
editGridAddRowInitData: {<% for(pk in child.pkList){ %>${pk.attrName}<% break; }%>: '', status: Global.STATUS_NORMAL}, // 新增行的时候初始化的数据
// 编辑表格的提交数据参数
\//# // 编辑表格的提交数据参数
editGridInputFormListName: '${@StringUtils.uncap(child.className)}List', // 提交的数据列表名
editGridInputFormListAttrs: 'status,<% for(c in child.columnList){if(c.attrName!="status"){%>${c.attrName},<% }} %>', // 提交数据列表的属性字段
// 加载成功后执行事件
\//# // 加载成功后执行事件
ajaxSuccess: function(data){
}

View File

@@ -27,14 +27,14 @@
</div>
\<% } %>
<script>
// 初始化布局
//# // 初始化布局
$('body').layout({
west__initClosed: $(window).width() <= 767, // 是否默认关闭
west__size: 200
});
// 主页框架
//# // 主页框架
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}${
isNotBlank(table.optionMap['leftTreeRightTableUrl'])
@@ -66,7 +66,7 @@ var setting = {view:{selectedMulti:false},data:{key:{title:"title"},simpleData:{
}
}, null, null, js.text('loading.message'));
};loadTree();
// 工具栏按钮绑定
//# // 工具栏按钮绑定
$('#btnExpand').click(function(){
tree.expandAll(true);
$(this).hide();
@@ -80,7 +80,7 @@ $('#btnCollapse').click(function(){
$('#btnRefresh').click(function(){
loadTree();
});
// 调用子页分页函数
//# // 调用子页分页函数
function page(){
win.page();
}

View File

@@ -62,7 +62,7 @@
</div>
<% } %>
<script>
// 初始化DataGrid对象
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
@@ -76,31 +76,31 @@ $('#dataGrid').dataGrid({
}
}},
{header:'${text("等级")}', name:'contentLevel', index:'a.content_level', width:80, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('msg_inner_content_level')}, val, '${text("未知")}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('msg_inner_content_level')}", val, '${text("未知")}', true);
}},
{header:'${text("类型")}', name:'contentType', index:'a.content_type', width:80, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('msg_inner_content_type')}, val, '${text("未知")}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('msg_inner_content_type')}", val, '${text("未知")}', true);
}},
{header:'${text("发送者")}', name:'sendUserName', index:'a.send_user_name', width:100, align:"center"},
{header:'${text("发送时间")}', name:'sendDate', index:'a.send_date', width:150, align:"center"},
// {header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:150, align:"center"},
{header:'${text("状态")}', name:'status', index:'a.status', width:80, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('msg_inner_msg_status')}, val, '${text("未知")}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('msg_inner_msg_status')}", val, '${text("未知")}', true);
}},
{header:'${text("操作")}', name:'actions', width:120, formatter: function(val, obj, row, act){
var actions = [];
if(row.status == Global.STATUS_DRAFT){
//<% if(hasPermi('msg:msgInner:edit')){ %>
//# if(hasPermi('msg:msgInner:edit')){
actions.push('<a href="${ctx}/msg/msgInner/form?id='+row.id+'" class="btnList" title="${text("编辑消息")}"><i class="fa fa-pencil"></i></a>&nbsp;');
actions.push('<a href="${ctx}/msg/msgInner/delete?id='+row.id+'" class="btnList" title="${text("删除消息")}" data-confirm="${text("确认要删除该消息吗?")}"><i class="fa fa-trash-o"></i></a>&nbsp;');
//<% } %>
//# }
}else{
actions.push('<a href="${ctx}/msg/msgInner/view?id='+row.id+'" class="btnList" title="${text("查看消息")}"><i class="fa fa-book"></i></a>&nbsp;');
}
return actions.join('');
}}
],
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function(data){
}

View File

@@ -24,14 +24,14 @@
</div>
<% } %>
<script>
// 初始化布局
//# // 初始化布局
$('body').layout({
west__initClosed: $(window).width() <= 767, // 是否默认关闭
west__size: 200
});
// 主页框架
//# // 主页框架
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}/sys/area/treeData"},
callback:{onClick:function(event, treeId, treeNode){
@@ -54,7 +54,7 @@ var setting = {view:{selectedMulti:false},data:{key:{title:"title"},simpleData:{
}
}, null, null, js.text('loading.message'));
};loadTree();
// 工具栏按钮绑定
//# // 工具栏按钮绑定
$('#btnExpand').click(function(){
tree.expandAll(true);
$(this).hide();
@@ -68,7 +68,7 @@ $('#btnCollapse').click(function(){
$('#btnRefresh').click(function(){
loadTree();
});
// 调用子页分页函数
//# // 调用子页分页函数
function page(){
win.page();
}

View File

@@ -49,7 +49,7 @@
</div>
<% } %>
<script>
// 初始化DataGrid对象
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
@@ -57,17 +57,17 @@ $('#dataGrid').dataGrid({
return '( '+row.areaCode+' ) '+'<a href="${ctx}/sys/area/form?areaCode='+row.areaCode+'" class="btnList" data-title="${text("编辑区域")}">'+(val||row.id)+'</a>';
}},
{header:'${text("区域类型")}', name:'areaType', index:'a.area_type', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_area_type')}, val, '未知', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_area_type')}", val, '未知', true);
}},
{header:'${text("备注信息")}', name:'remarks', index:'a.remarks', width:200, align:"left"},
{header:'${text("排序号")}', name:'treeSort', index:'a.tree_sort', width:100, align:"center"},
{header:'${text("状态")}', name:'status', index:'a.status', width:80, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_status')}, val, '未知', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_status')}", val, '未知', true);
}},
{header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:150, align:"center"},
{header:'${text("操作")}', name:'actions', width:130, formatter: function(val, obj, row, act){
var actions = [];
//<% if(hasPermi('sys:area:edit')){ %>
//# if(hasPermi('sys:area:edit')){
actions.push('<a href="${ctx}/sys/area/form?areaCode='+row.areaCode+'" class="btnList" title="${text("编辑区域")}"><i class="fa fa-pencil"></i></a>&nbsp;');
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctx}/sys/area/disable?areaCode='+row.areaCode+'" class="btnList" title="${text("停用区域")}" data-confirm="${text("确认要停用该区域吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
@@ -76,13 +76,14 @@ $('#dataGrid').dataGrid({
}
actions.push('<a href="${ctx}/sys/area/delete?areaCode='+row.areaCode+'" class="btnList" title="${text("删除区域")}" data-confirm="${text("确认要删除该区域及所有子区域吗?")}" data-deltreenode="'+row.id+'"><i class="fa fa-trash-o"></i></a>&nbsp;');
actions.push('<a href="${ctx}/sys/area/form?parentCode='+row.id+'" class="btnList" title="${text("新增下级区域")}"><i class="fa fa-plus-square"></i></a>&nbsp;');
//<% } %>
//# }
return actions.join('');
}}
],
treeGrid: true, // 启用树结构表格
defaultExpandLevel: 0, // 默认展开的层次
expandNodeClearPostData: 'areaCode,areaName,', // 展开节点清理请求参数数据(一般设置查询条件的字段属性,否则在查询后,不能展开子节点数据) // 加载成功后执行事件
expandNodeClearPostData: 'areaCode,areaName,', // 展开节点清理请求参数数据(一般设置查询条件的字段属性,否则在查询后,不能展开子节点数据)
//# // 加载成功后执行事件
ajaxSuccess: function(data){
if ($('#areaCode').val() != ''){
$('#areaCode').val('');

View File

@@ -24,14 +24,14 @@
</div>
<% } %>
<script>
// 初始化布局
//# // 初始化布局
$('body').layout({
west__initClosed: $(window).width() <= 767, // 是否默认关闭
west__size: 220
});
// 主页框架
//# // 主页框架
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}/sys/company/treeData"},
callback:{onClick:function(event, treeId, treeNode){
@@ -55,7 +55,7 @@ var setting = {view:{selectedMulti:false},data:{key:{title:"title"},simpleData:{
}
}, null, null, js.text('loading.message'));
};loadTree();
// 工具栏按钮绑定
//# // 工具栏按钮绑定
$('#btnExpand').click(function(){
tree.expandAll(true);
$(this).hide();
@@ -69,7 +69,7 @@ $('#btnCollapse').click(function(){
$('#btnRefresh').click(function(){
loadTree();
});
// 调用子页分页函数
//# // 调用子页分页函数
function page(){
win.page();
}

View File

@@ -56,7 +56,7 @@
</div>
<% } %>
<script>
// 初始化DataGrid对象
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
@@ -69,11 +69,11 @@ $('#dataGrid').dataGrid({
{header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:200, align:"center"},
{header:'${text("备注信息")}', name:'remarks', index:'a.remarks', width:200, align:"left"},
{header:'${text("状态")}', name:'status', index:'a.status', width:80, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_status')}, val, '未知', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_status')}", val, '未知', true);
}},
{header:'${text("操作")}', name:'actions', width:150, formatter: function(val, obj, row, act){
var actions = [];
//<% if(hasPermi('sys:company:edit')){ %>
//# if(hasPermi('sys:company:edit')){
actions.push('<a href="${ctx}/sys/company/form?companyCode='+row.companyCode+'" class="btnList" title="${text("编辑公司")}"><i class="fa fa-pencil"></i></a>&nbsp;');
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctx}/sys/company/disable?companyCode='+row.companyCode+'" class="btnList" title="${text("停用公司")}" data-confirm="${text("确认要停用该公司吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
@@ -82,13 +82,14 @@ $('#dataGrid').dataGrid({
}
actions.push('<a href="${ctx}/sys/company/delete?companyCode='+row.companyCode+'" class="btnList" title="${text("删除公司")}" data-confirm="${text("确认要删除该公司及所有子公司吗?")}" data-deltreenode="'+row.id+'"><i class="fa fa-trash-o"></i></a>&nbsp;');
actions.push('<a href="${ctx}/sys/company/form?parentCode='+row.id+'" class="btnList" title="${text("新增下级公司")}"><i class="fa fa-plus-square"></i></a>&nbsp;');
//<% } %>
//# }
return actions.join('');
}}
],
treeGrid: true, // 启用树结构表格
defaultExpandLevel: 0, // 默认展开的层次
expandNodeClearPostData: 'viewCode,companyName,fullName,', // 展开节点清理请求参数数据(一般设置查询条件的字段属性,否则在查询后,不能展开子节点数据) // 加载成功后执行事件
expandNodeClearPostData: 'viewCode,companyName,fullName,', // 展开节点清理请求参数数据(一般设置查询条件的字段属性,否则在查询后,不能展开子节点数据)
//# // 加载成功后执行事件
ajaxSuccess: function(data){
if ($('#companyCode').val() != ''){
$('#companyCode').val('');

View File

@@ -100,7 +100,7 @@
</div>
<% } %>
<script>
// 初始化DataGrid对象
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
@@ -111,14 +111,14 @@ $('#dataGrid').dataGrid({
return '<span title="['+row.requestMethod+'] '+row.serverAddr+row.requestUri+'">'+row.requestUri+'</span>';
}},
{header:'${text("日志类型")}', name:'logType', index:'a.log_type', width:100, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_log_type')}, val, '未知', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_log_type')}", val, '未知', true);
}},
{header:'${text("操作用户")}', name:'createByName', index:'a.create_by_name', width:100, align:"center", formatter: function(val, obj, row, act){
return '<a href="javascript:" class="search" data-cid="userSelectCode" data-cval="'+row.createBy
+'" data-nid="userSelectName" title="${text("账号")}'+row.createBy+'">'+(val||'')+'</a>';
}},
{header:'${text("异常")}', name:'isException', index:'a.is_exception', width:60, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_yes_no')}, val, '未知', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_yes_no')}", val, '未知', true);
}},
{header:'${text("业务类型")}', name:'bizType', index:'a.biz_type', width:90, align:"center", formatter: function(val, obj, row, act){
return '<a href="javascript:" class="search" data-cid="bizType">'+(val||'')+'</a>';
@@ -137,7 +137,7 @@ $('#dataGrid').dataGrid({
return '<a href="${ctx}/sys/log/form?id='+row.id+'" class="btnList" title="${text('日志详情')}"><i class="fa fa-pencil"></i></a>&nbsp;';
}} */
],
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function(data){
}

View File

@@ -24,14 +24,14 @@
</div>
<% } %>
<script>
// 初始化布局
//# // 初始化布局
$('body').layout({
west__initClosed: $(window).width() <= 767, // 是否默认关闭
west__size: 200
});
// 主页框架
//# // 主页框架
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}/sys/office/treeData"},
callback:{onClick:function(event, treeId, treeNode){
@@ -55,7 +55,7 @@ var setting = {view:{selectedMulti:false},data:{key:{title:"title"},simpleData:{
}
}, null, null, js.text('loading.message'));
};loadTree();
// 工具栏按钮绑定
//# // 工具栏按钮绑定
$('#btnExpand').click(function(){
tree.expandAll(true);
$(this).hide();
@@ -69,7 +69,7 @@ $('#btnCollapse').click(function(){
$('#btnRefresh').click(function(){
loadTree();
});
// 调用子页分页函数
//# // 调用子页分页函数
function page(){
win.page();
}

View File

@@ -64,7 +64,7 @@
</div>
<% } %>
<script>
// 初始化DataGrid对象
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
@@ -74,16 +74,16 @@ $('#dataGrid').dataGrid({
{header:'${text("机构全称")}', name:'fullName', index:'a.full_name', width:200, align:"left"},
{header:'${text("排序号")}', name:'treeSort', index:'a.tree_sort', width:80, align:"center"},
{header:'${text("机构类型")}', name:'officeType', index:'a.office_type', width:100, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_office_type')}, val, '${text("未知")}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_office_type')}", val, '${text("未知")}', true);
}},
{header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:150, align:"center"},
{header:'${text("备注信息")}', name:'remarks', index:'a.remarks', width:100, align:"left"},
{header:'${text("状态")}', name:'status', index:'a.status', width:80, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_status')}, val, '${text("未知")}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_status')}", val, '${text("未知")}', true);
}},
{header:'${text("操作")}', name:'actions', width:150, formatter: function(val, obj, row, act){
var actions = [];
//<% if(hasPermi('sys:office:edit')){ %>
//# if(hasPermi('sys:office:edit')){
actions.push('<a href="${ctx}/sys/office/form?officeCode='+row.officeCode+'" class="btnList" title="${text("编辑机构")}"><i class="fa fa-pencil"></i></a>&nbsp;');
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctx}/sys/office/disable?officeCode='+row.officeCode+'" class="btnList" title="${text("停用机构")}" data-confirm="${text("确认要停用该机构吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
@@ -92,13 +92,14 @@ $('#dataGrid').dataGrid({
}
actions.push('<a href="${ctx}/sys/office/delete?officeCode='+row.officeCode+'" class="btnList" title="${text("删除机构")}" data-confirm="${text("确认要删除该机构及所有子机构吗?")}" data-deltreenode="'+row.id+'"><i class="fa fa-trash-o"></i></a>&nbsp;');
actions.push('<a href="${ctx}/sys/office/form?parentCode='+row.id+'" class="btnList" title="${text("新增下级机构")}"><i class="fa fa-plus-square"></i></a>&nbsp;');
//<% } %>
//# }
return actions.join('');
}}
],
treeGrid: true, // 启用树结构表格
defaultExpandLevel: 0, // 默认展开的层次
expandNodeClearPostData: 'viewCode,officeName,fullName,officeType,', // 展开节点清理请求参数数据(一般设置查询条件的字段属性,否则在查询后,不能展开子节点数据) // 加载成功后执行事件
expandNodeClearPostData: 'viewCode,officeName,fullName,officeType,', // 展开节点清理请求参数数据(一般设置查询条件的字段属性,否则在查询后,不能展开子节点数据)
//# // 加载成功后执行事件
ajaxSuccess: function(data){
if ($('#officeCode').val() != ''){
$('#officeCode').val('');

View File

@@ -44,7 +44,7 @@
</div>
<% } %>
<script>
// 初始化DataGrid对象
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
@@ -56,20 +56,20 @@ $('#dataGrid').dataGrid({
{header:'${text("超时时间")}', name:'timeout', width:100, align:'center'},
{header:'${text("客户主机")}', name:'host', width:70, align:'center'},
{header:'${text("用户类型")}', name:'userType', width:50, align:'center', formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_user_type')}, val, '${text("未设置")}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_user_type')}", val, '${text("未设置")}', true);
}},
{header:'${text("设备类型")}', name:'deviceType', width:50, align:'center', formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_device_type')}, val, '${text("未设置")}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_device_type')}", val, '${text("未设置")}', true);
}}
//<% if(hasPermi('sys:online:edit')){ %>
//# if(hasPermi('sys:online:edit')){
,{header:'${text("操作")}', name:'actions', width:100, sortable:false, formatter: function(val, obj, row, act){
var actions = [];
actions.push('<a href="${ctx}/sys/online/tickOut?sessionId='+row.id+'" class="btnList" title="${text("踢出在线用户")}" data-confirm="${text("确认要踢出该用户在线状态吗?")}"><i class="fa fa-trash-o"></i></a>&nbsp;');
return actions.join('');
}}
//<% } %>
//# }
],
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function(data){
}

View File

@@ -52,7 +52,7 @@
</div>
<% } %>
<script>
// 初始化DataGrid对象
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
@@ -62,16 +62,16 @@ $('#dataGrid').dataGrid({
{header:'${text("岗位代码")}', name:'viewCode', index:'a.view_code', width:200, align:"center"},
{header:'${text("排序号")}', name:'postSort', index:'a.post_sort', width:80, align:"center"},
{header:'${text("岗位分类")}', name:'postType', index:'a.post_type', width:100, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_post_type')}, val, '未知', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_post_type')}", val, '未知', true);
}},
{header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:150, align:"center"},
{header:'${text("备注信息")}', name:'remarks', index:'a.remarks', width:200, align:"left"},
{header:'${text("状态")}', name:'status', index:'a.status', width:80, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_status')}, val, '未知', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_status')}", val, '未知', true);
}},
{header:'${text("操作")}', name:'actions', width:130, formatter: function(val, obj, row, act){
var actions = [];
//<% if(hasPermi('sys:post:edit')){ %>
//# if(hasPermi('sys:post:edit')){
actions.push('<a href="${ctx}/sys/post/form?postCode='+row.postCode+'" class="btnList" title="${text("编辑岗位")}"><i class="fa fa-pencil"></i></a>&nbsp;');
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctx}/sys/post/disable?postCode='+row.postCode+'" class="btnList" title="${text("停用岗位")}" data-confirm="${text("确认要停用该岗位吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
@@ -79,11 +79,11 @@ $('#dataGrid').dataGrid({
actions.push('<a href="${ctx}/sys/post/enable?postCode='+row.postCode+'" class="btnList" title="${text("启用岗位")}" data-confirm="${text("确认要启用该岗位吗?")}"><i class="glyphicon glyphicon-ok-circle"></i></a>&nbsp;');
}
actions.push('<a href="${ctx}/sys/post/delete?postCode='+row.postCode+'" class="btnList" title="${text("删除岗位")}" data-confirm="${text("确认要删除该岗位吗?")}"><i class="fa fa-trash-o"></i></a>&nbsp;');
//<% } %>
//# }
return actions.join('');
}}
],
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function(data){
}

View File

@@ -201,9 +201,9 @@ var roleGrid = $("#roleGrid").dataGrid({
}
},
ajaxSuccess: function(){
//<% for (role in roleList!){ %>
//# for (role in roleList!){
roleGrid.dataGrid('setSelectRow', '${role.roleCode}');
//<% } %>
//# }
}
});
</script>

View File

@@ -62,7 +62,7 @@
</div>
<% } %>
<script>
// 初始化DataGrid对象
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
@@ -70,22 +70,22 @@ $('#dataGrid').dataGrid({
return '<a href="${ctx}/sys/corpAdmin/form?userCode='+row.userCode+'&op=edit" class="btnList" data-title="${text("编辑用户")}">'+(val||row.id)+'</a>';
}},
{header:'${text("用户昵称")}', name:'userName', index:'a.user_name', width:200, align:"center"},
//<% if(useCorpModel){ %>
//# if(useCorpModel){
{header:'${text("租户代码")}', name:'corpCode_', index:'a.corp_code', width:200, align:"center", formatter: function(val, obj, row, act){
return '<a href="javascript:" onclick="$(\'#corpCode_\').val(\''+val+'\');$(\'#searchForm\').submit()">'+val+'</a>';
}},
{header:'${text("租户名称")}', name:'corpName_', index:'a.corp_name', width:200, align:"center"},
//<% } %>
//# }
{header:'${text("电子邮箱")}', name:'email', index:'a.email', width:200, align:"center"},
{header:'${text("手机号码")}', name:'mobile', index:'a.mobile', width:200, align:"center"},
{header:'${text("办公电话")}', name:'phone', index:'a.phone', width:200, align:"center"},
{header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:200, align:"center"},
{header:'${text("状态")}', name:'status', index:'a.status', width:100, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_status')}, val, '未知', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_status')}", val, '未知', true);
}},
{header:'${text("操作")}', name:'actions', width:150, formatter: function(val, obj, row, act){
var actions = [];
//<% if(hasPermi('sys:corpAdmin:edit')){ %>
//# if(hasPermi('sys:corpAdmin:edit')){
actions.push('<a href="${ctx}/sys/corpAdmin/form?userCode='+row.userCode+'&op=edit" class="btnList" title="${text("编辑用户")}"><i class="fa fa-pencil"></i></a>&nbsp;');
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctx}/sys/corpAdmin/disable?userCode='+row.userCode+'" class="btnList" title="${text("停用用户")}" data-confirm="${text("确认要停用该用户吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
@@ -93,18 +93,18 @@ $('#dataGrid').dataGrid({
actions.push('<a href="${ctx}/sys/corpAdmin/enable?userCode='+row.userCode+'" class="btnList" title="${text("启用用户")}" data-confirm="${text("确认要启用该用户吗?")}"><i class="glyphicon glyphicon-ok-circle"></i></a>&nbsp;');
}
actions.push('<a href="${ctx}/sys/corpAdmin/delete?userCode='+row.userCode+'" class="btnList" title="${text("删除用户")}" data-confirm="${text("确认要删除该用户吗?")}"><i class="fa fa-trash-o"></i></a>&nbsp;');
//<% if(useCorpModel){ %>
//# if(useCorpModel){
actions.push('<a href="${ctx}/sys/corpAdmin/form?corpCode_='+row.corpCode_+'&corpName_='+row.corpName_+'&op=addAdmin" class="btnList" title="${text("新增管理员")}"><i class="fa fa-plus-square"></i></a>&nbsp;');
//<% } %>
//# }
actions.push('<a href="javascript:" class="btnMore" title="${text("更多操作")}"><i class="fa fa-chevron-circle-right"></i></a>&nbsp;');
actions.push('<div class="moreItems">');
actions.push('<a href="${ctx}/sys/corpAdmin/resetpwd?userCode='+row.userCode+'" class="btn btn-default btn-xs btnList" title="${text("用户密码重置")}" data-confirm="${text("确认要将该用户密码重置到初始状态吗?")}"><i class="fa fa-reply-all"></i> ${text("重置密码")}</a>&nbsp;');
actions.push('</div>');
//<% } %>
//# }
return actions.join('');
}}
],
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function(data){
}

View File

@@ -231,7 +231,7 @@
</div>//--></script>
<script>
$("#empOfficeGrid").dataGrid({
data: ${toJson(empUser.employee.employeeOfficeList)},
data: "#{toJson(empUser.employee.employeeOfficeList)}",
datatype: "local", // 设置本地数据
columnModel: [
{header:'${text("附属机构")}', name:'officeName', sortable:false, width:100,
@@ -250,7 +250,7 @@ $("#empOfficeGrid").dataGrid({
},
{header:'${text("附属岗位")}', name:'postCode', sortable:false, width:100,
editable:true, edittype:'select', editoptions:{'class':'form-control',
items: $.merge([{postName:'&nbsp;',postCode:''}], ${toJson(postList)}),
items: $.merge([{postName:'&nbsp;',postCode:''}], "#{toJson(postList)}"),
itemLabel: 'postName', itemValue: 'postCode', dataInit: function(element){
js.select2(element).on("change",function(){$(this).resetValid()});
}
@@ -278,8 +278,7 @@ $("#empOfficeGrid").dataGrid({
}
});
//<% if(hasPermi('sys:empUser:authRole') && (op == 'add' || op == 'auth')) { %>
// 加载角色列表
//# if(hasPermi('sys:empUser:authRole') && (op == 'add' || op == 'auth')) {
var roleGrid = $("#roleGrid").dataGrid({
url: '${ctx}/sys/role/treeData',
postData: [
@@ -298,17 +297,17 @@ var roleGrid = $("#roleGrid").dataGrid({
return $('#inputForm .box-body').width()-20;
},
ajaxSuccess: function(){
//<% for (role in roleList!){ %>
//# for (role in roleList!){
roleGrid.dataGrid('setSelectRow', '${role.roleCode}');
//<% } %>
//# }
}
});
//<% } %>
//# }
$("#inputForm").validate({
submitHandler: function(form){
//<% if(hasPermi('sys:empUser:authRole') && (op == 'add' || op == 'auth')) { %>
//# if(hasPermi('sys:empUser:authRole') && (op == 'add' || op == 'auth')) {
$("#userRoleString").val(roleGrid.dataGrid('getSelectRows').join(','));
//<% } %>
//# }
var empNo = $('#employee_empNo').val();
if (empNo == ''){
$('#employee_empNo').val($('#loginCode').val());

View File

@@ -35,7 +35,7 @@
<div class="form-unit">${text('数据权限')}</div>
<div id="dataScopeTrees"></div>
<script id="dataScopeTpl" type="text/template">
<div class="pull-left" style="padding:0 15px;min-width:300px;">
<div id="dataScope_{{d.key}}" class="pull-left" style="padding:0 15px;min-width:300px;">
<div class="box box-solid box-trees">
<div class="box-header">
<div class="box-title icheck">
@@ -74,7 +74,7 @@
<script>
$("#inputForm").validate({
submitHandler: function(form){
// 获取数据权限数据
//# // 获取数据权限数据
var dataScopeData = [];
$.each(dataScopeTrees, function(key, dataScopeTree){
var treeNodes = dataScopeTree.getCheckedNodes(true);
@@ -85,7 +85,7 @@ $("#inputForm").validate({
}
});
$("#userDataScopeListJson").val(JSON.stringify(dataScopeData));
// 提交表单数据
//# // 提交表单数据
js.ajaxSubmitForm($(form), function(data){
js.showMessage(data.message);
if(data.result == Global.TRUE){
@@ -96,7 +96,7 @@ $("#inputForm").validate({
}, "json");
}
});
//加载数据权限树结构
//# // 加载数据权限树结构
var setting = {
check:{enable:true,nocheckInherit:true},
view:{selectedMulti:false,nameIsHTML: true},
@@ -110,21 +110,21 @@ var setting = {
onCheck: function (event, treeId, treeNode){ }
}
},
moduleCodes = '${toJson(moduleCodes)}';
dataScopes = ${toJson(dataScopes)},
dataScopeTrees = {}; // 用sysCode分类存储所有菜单树
moduleCodes = '"#{toJson(moduleCodes)}"';
dataScopes = "#{toJson(dataScopes)}",
dataScopeTrees = {};
for (var i=0; i<dataScopes.length; i++){
var dataScope = dataScopes[i];
// 验证模块是否开启,如果未开启,则跳过
//# // 验证模块是否开启,如果未开启,则跳过
if (moduleCodes.indexOf("\""+dataScope.moduleCode+"\"") == -1){
continue;
}
// 控制权限 ctrlPermi: 0全部 1拥有权限 2管理权限
//# // 控制权限 ctrlPermi: 0全部 1拥有权限 2管理权限
if (!(dataScope.ctrlPermi == '0' || dataScope.ctrlPermi == '1')){
continue;
}
$('#dataScopeTrees').append(js.template('dataScopeTpl', {
key: dataScope.ctrlType, label: dataScope.ctrlName_${lang()} || dataScope.ctrlName}));
key: dataScope.ctrlType, label: dataScope["${'ctrlName_'+lang()}"] || dataScope.ctrlName}));
var ctrlDataUrl = dataScope.ctrlDataUrl || '';
$.ajax({
type: 'POST',
@@ -136,12 +136,12 @@ for (var i=0; i<dataScopes.length; i++){
js.showErrorMessage(data.responseText);
},
success: function(data, status, xhr){
// 初始化树结构
//# // 初始化树结构
var tree = $.fn.zTree.init($("#dataScopeTree_"+dataScope.ctrlType), setting, data);
tree.setting.check.chkboxType = dataScope.chkboxType;
// 默认展开节点(如果级别设置为-1如果有1个根节点则展开一级节点否则不展开
//# // 默认展开节点(如果级别设置为-1如果有1个根节点则展开一级节点否则不展开
$.fn.zTree.expandNodeByLevel(tree, dataScope.expandLevel);
// 树结构:全选、取消全选
//# // 树结构:全选、取消全选
$('#checkall_'+dataScope.ctrlType).iCheck({
checkboxClass:'icheckbox_minimal-grey'
}).on('ifChecked ifUnchecked', function(){
@@ -152,7 +152,7 @@ for (var i=0; i<dataScopes.length; i++){
dataScopeTrees[ctrlType].checkAllNodes(false);
}
}).attr("ctrlType", dataScope.ctrlType);
// 展开和折叠按钮绑定
//# // 展开和折叠按钮绑定
$('#expand_'+dataScope.ctrlType).click(function(){
var ctrlType = $(this).attr('ctrlType');
dataScopeTrees[ctrlType].expandAll(true);
@@ -161,14 +161,18 @@ for (var i=0; i<dataScopes.length; i++){
var ctrlType = $(this).attr('ctrlType');
dataScopeTrees[ctrlType].expandAll(false);
}).attr("ctrlType", dataScope.ctrlType);
// 将树对象存储到全局数组里
//# // 将树对象存储到全局数组里
dataScopeTrees[dataScope.ctrlType] = tree;
//# // 如果没有数据,则隐藏选择框
if (data.length == 0) {
$("#dataScope_"+dataScope.ctrlType).hide();
}
}
});
}
// 默认选择节点
//<% for(dataScope in userDataScopeList){ %>
//# // 默认选择节点
//# for(dataScope in userDataScopeList){
try{dataScopeTrees['${dataScope.ctrlType}'].checkNode(dataScopeTrees['${dataScope.ctrlType}']
.getNodeByParam("id","${dataScope.ctrlData}"), true, false);}catch(e){}
//<% } %>
//# }
</script>

View File

@@ -27,14 +27,14 @@
</div>
<% } %>
<script>
// 初始化布局
//# // 初始化布局
$('body').layout({
west__initClosed: $(window).width() <= 767, // 是否默认关闭
west__size: window.lang == 'en' ? 215 : 200
});
// 主页框架
//# // 主页框架
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}/sys/office/treeData"},
callback:{onClick:function(event, treeId, treeNode){
@@ -59,7 +59,7 @@ var setting = {view:{selectedMulti:false},data:{key:{title:"title"},simpleData:{
}
}, null, null, js.text('loading.message'));
};loadTree();
// 工具栏按钮绑定
//# // 工具栏按钮绑定
$('#btnExpand').click(function(){
tree.expandAll(true);
$(this).hide();
@@ -73,7 +73,7 @@ $('#btnCollapse').click(function(){
$('#btnRefresh').click(function(){
loadTree();
});
// 调用子页分页函数
//# // 调用子页分页函数
function page(){
win.page();
}

View File

@@ -119,7 +119,7 @@
</div>
<% } %>
<script>
// 初始化DataGrid对象
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
@@ -135,42 +135,42 @@ $('#dataGrid').dataGrid({
{header:'${text("办公电话")}', name:'phone', index:'a.phone', width:120, align:"center"},
{header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:125, align:"center", frozen:true},
{header:'${text("状态")}', name:'status', index:'a.status', width:60, align:"center", frozen:true, formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_status')}, val, '未知', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_status')}", val, '未知', true);
}},
{header:'${text("操作")}', name:'actions', width:120, formatter: function(val, obj, row, act){
var actions = [];
//<% if(hasPermi('sys:empUser:edit')){ %>
//# if(hasPermi('sys:empUser:edit')){
actions.push('<a href="${ctx}/sys/empUser/form?userCode='+row.userCode+'&op=edit" class="btnList" title="${text("编辑用户")}"><i class="fa fa-pencil"></i></a>&nbsp;');
//<% } %>
//<% if(hasPermi('sys:empUser:updateStatus')){ %>
//# }
//# if(hasPermi('sys:empUser:updateStatus')){
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctx}/sys/empUser/disable?userCode='+row.userCode+'" class="btnList" title="${text("停用用户")}" data-confirm="${text("确认要停用该用户吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
}else if (row.status == Global.STATUS_DISABLE || row.status == Global.STATUS_FREEZE || row.status == Global.STATUS_AUDIT){
actions.push('<a href="${ctx}/sys/empUser/enable?userCode='+row.userCode+'" class="btnList" title="${text("启用用户")}" data-confirm="${text("确认要启用该用户吗?")}"><i class="glyphicon glyphicon-ok-circle"></i></a>&nbsp;');
}
//<% } %>
//<% if(hasPermi('sys:empUser:edit')){ %>
//# }
//# if(hasPermi('sys:empUser:edit')){
actions.push('<a href="${ctx}/sys/empUser/delete?userCode='+row.userCode+'" class="btnList" title="${text("删除用户")}" data-confirm="${text("确认要删除该用户吗?")}"><i class="fa fa-trash-o"></i></a>&nbsp;');
//<% } %>
//<% if(hasPermi('sys:empUser:authRole,sys:empUser:authDataScope,sys:empUser:resetpwd', 'or')){ %>
//# }
//# if(hasPermi('sys:empUser:authRole,sys:empUser:authDataScope,sys:empUser:resetpwd', 'or')){
actions.push('<a href="javascript:" class="btnMore" title="${text("更多操作")}"><i class="fa fa-chevron-circle-right"></i></a>&nbsp;');
actions.push('<div class="moreItems">');
//<% if(hasPermi('sys:empUser:authRole')){ %>
//# if(hasPermi('sys:empUser:authRole')){
actions.push('<a href="${ctx}/sys/empUser/form?userCode='+row.userCode+'&op=auth" class="btn btn-default btn-xs btnList" title="${text("用户分配角色")}"><i class="fa fa-check-square-o"></i> ${text("分配角色")}</a>&nbsp;');
//<% } %>
//<% if(hasPermi('sys:empUser:authDataScope')){ %>
//# }
//# if(hasPermi('sys:empUser:authDataScope')){
actions.push('<a href="${ctx}/sys/empUser/formAuthDataScope?userCode='+row.userCode+'" class="btn btn-default btn-xs btnList" title="${text("用户分配数据权限")}"><i class="fa fa-check-circle-o"></i> ${text("数据权限")}</a>&nbsp;');
//<% } %>
//<% if(hasPermi('sys:empUser:resetpwd')){ %>
//# }
//# if(hasPermi('sys:empUser:resetpwd')){
actions.push('<a href="${ctx}/sys/empUser/resetpwd?userCode='+row.userCode+'" class="btn btn-default btn-xs btnList" title="${text("用户密码重置")}" data-confirm="${text("确认要将该用户密码重置到初始状态吗?")}"><i class="fa fa-reply-all"></i> ${text("重置密码")}</a>&nbsp;');
//<% } %>
//# }
actions.push('</div>');
//<% } %>
//# }
return actions.join('');
}}
],
frozenCols: true,
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function(data){
}

View File

@@ -93,14 +93,14 @@
</div>
<% } %>
<script>
// 初始化布局
//# // 初始化布局
$('body').layout({
west__size: window.lang == 'en' ? 225 : 200,
onresize_end: function(){
$('#dataGrid').dataGrid('resize');
}
});
//树结构初始化加载
//# // 树结构初始化加载
var setting = {view:{selectedMulti:false},data:{simpleData:{enable:true}},
callback:{onClick:function(event, treeId, treeNode){
tree.expandNode(treeNode);
@@ -130,9 +130,9 @@ var setting = {view:{selectedMulti:false},data:{simpleData:{enable:true}},
if (queryType == 'userType'){
$('#queryTypeName').text('${text("按用户类型")}');
tree = $.fn.zTree.init($("#tree"), setting, [
//<% for(dict in @DictUtils.getDictList('sys_user_type')){ %>
//# for(dict in @DictUtils.getDictList('sys_user_type')){
{id: '${dict.dictValue}', name: '${text(dict.dictLabel + "类型")}'},
//<% } %>
//# }
{id: 'none', name: '${text("系统管理员")}'}
]);
tree.expandAll(true);
@@ -160,7 +160,7 @@ var setting = {view:{selectedMulti:false},data:{simpleData:{enable:true}},
}, null, null, js.text('loading.message'));
}
};loadTree();
// 工具栏按钮绑定
//# // 工具栏按钮绑定
$('#btnExpand').click(function(){
tree.expandAll(true);
$(this).hide();
@@ -174,9 +174,9 @@ $('#btnCollapse').click(function(){
$('#btnRefresh').click(function(){
loadTree();
});
// 加载用户列表
var selectData = ${isNotBlank(selectData!) ? selectData! : "{\}"},
selectNum = 0, dataGrid = $('#dataGrid').dataGrid({
//# // 加载用户列表
var selectData = "#{isNotBlank(selectData!) ? selectData! : '{}'}",
selectNum = 0, dataGrid = $('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
{header:'${text("登录账号")}', name:'loginCode', index:'a.login_code', width:200, align:"center"},
@@ -187,7 +187,7 @@ selectNum = 0, dataGrid = $('#dataGrid').dataGrid({
{header:'${text("手机号码")}', name:'mobile', index:'a.mobile', width:200, align:"center"},
{header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:200, align:"center"},
{header:'${text("状态")}', name:'status', index:'a.status', width:140, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_status')}, val, '未知', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_status')}", val, '未知', true);
}},
{header:'行数据', name:'rowData', hidden:true, formatter: function(val, obj, row, act){
return JSON.stringify(row);

View File

@@ -74,7 +74,7 @@
<script>
$("#inputForm").validate({
submitHandler: function(form){
// 获取数据权限数据
//# // 获取数据权限数据
var dataScopeData = [];
$.each(dataScopeTrees, function(key, dataScopeTree){
var treeNodes = dataScopeTree.getCheckedNodes(true);
@@ -85,7 +85,7 @@ $("#inputForm").validate({
}
});
$("#userDataScopeListJson").val(JSON.stringify(dataScopeData));
// 提交表单数据
//# // 提交表单数据
js.ajaxSubmitForm($(form), function(data){
js.showMessage(data.message);
if(data.result == Global.TRUE){
@@ -96,7 +96,7 @@ $("#inputForm").validate({
}, "json");
}
});
//加载数据权限树结构
//# // 加载数据权限树结构
var setting = {
check:{enable:true,nocheckInherit:true},
view:{selectedMulti:false,nameIsHTML: true},
@@ -110,21 +110,21 @@ var setting = {
onCheck: function (event, treeId, treeNode){ }
}
},
moduleCodes = '${toJson(moduleCodes)}';
dataScopes = ${toJson(dataScopes)},
dataScopeTrees = {}; // 用sysCode分类存储所有菜单树
moduleCodes = '"#{toJson(moduleCodes)}"';
dataScopes = "#{toJson(dataScopes)}",
dataScopeTrees = {};
for (var i=0; i<dataScopes.length; i++){
var dataScope = dataScopes[i];
// 验证模块是否开启,如果未开启,则跳过
//# // 验证模块是否开启,如果未开启,则跳过
if (moduleCodes.indexOf("\""+dataScope.moduleCode+"\"") == -1){
continue;
}
// 控制权限 ctrlPermi: 0全部 1拥有权限 2管理权限
//# // 控制权限 ctrlPermi: 0全部 1拥有权限 2管理权限
if (!(dataScope.ctrlPermi == '0' || dataScope.ctrlPermi == '2')){
continue;
}
$('#dataScopeTrees').append(js.template('dataScopeTpl', {
key: dataScope.ctrlType, label: dataScope.ctrlName_${lang()} || dataScope.ctrlName}));
key: dataScope.ctrlType, label: dataScope["${'ctrlName_'+lang()}"] || dataScope.ctrlName}));
var ctrlDataUrl = dataScope.ctrlDataUrl || '';
$.ajax({
type: 'POST',
@@ -136,12 +136,12 @@ for (var i=0; i<dataScopes.length; i++){
js.showErrorMessage(data.responseText);
},
success: function(data, status, xhr){
// 初始化树结构
//# // 初始化树结构
var tree = $.fn.zTree.init($("#dataScopeTree_"+dataScope.ctrlType), setting, data);
tree.setting.check.chkboxType = dataScope.chkboxType;
// 默认展开节点(如果级别设置为-1如果有1个根节点则展开一级节点否则不展开
//# // 默认展开节点(如果级别设置为-1如果有1个根节点则展开一级节点否则不展开
$.fn.zTree.expandNodeByLevel(tree, dataScope.expandLevel);
// 树结构:全选、取消全选
//# // 树结构:全选、取消全选
$('#checkall_'+dataScope.ctrlType).iCheck({
checkboxClass:'icheckbox_minimal-grey'
}).on('ifChecked ifUnchecked', function(){
@@ -152,7 +152,7 @@ for (var i=0; i<dataScopes.length; i++){
dataScopeTrees[ctrlType].checkAllNodes(false);
}
}).attr("ctrlType", dataScope.ctrlType);
// 展开和折叠按钮绑定
//# // 展开和折叠按钮绑定
$('#expand_'+dataScope.ctrlType).click(function(){
var ctrlType = $(this).attr('ctrlType');
dataScopeTrees[ctrlType].expandAll(true);
@@ -161,14 +161,14 @@ for (var i=0; i<dataScopes.length; i++){
var ctrlType = $(this).attr('ctrlType');
dataScopeTrees[ctrlType].expandAll(false);
}).attr("ctrlType", dataScope.ctrlType);
// 将树对象存储到全局数组里
//# // 将树对象存储到全局数组里
dataScopeTrees[dataScope.ctrlType] = tree;
}
});
}
// 默认选择节点
//<% for(dataScope in userDataScopeList){ %>
//# // 默认选择节点
//# for(dataScope in userDataScopeList){
try{dataScopeTrees['${dataScope.ctrlType}'].checkNode(dataScopeTrees['${dataScope.ctrlType}']
.getNodeByParam("id","${dataScope.ctrlData}"), true, false);}catch(e){}
//<% } %>
//# }
</script>

View File

@@ -74,7 +74,7 @@
checkbox="false" itemCode="userCode" itemName="userName"/></div>
<% } %>
<script>
// 初始化DataGrid对象
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
@@ -87,18 +87,18 @@ $('#dataGrid').dataGrid({
{header:'${text("办公电话")}', name:'phone', index:'a.phone', width:200, align:"center"},
{header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:200, align:"center"},
{header:'${text("状态")}', name:'status', index:'a.status', width:100, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_status')}, val, '未知', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_status')}", val, '未知', true);
}},
{header:'${text("操作")}', name:'actions', width:150, formatter: function(val, obj, row, act){
var actions = [];
//<% if(hasPermi('sys:secAdmin:edit')){ %>
//# if(hasPermi('sys:secAdmin:edit')){
actions.push('<a href="${ctx}/sys/secAdmin/form?userCode='+row.userCode+'" class="btnList" title="${text("管理数据权限")}"><i class="fa fa-pencil"></i></a>&nbsp;');
actions.push('<a href="${ctx}/sys/secAdmin/delete?userCode='+row.userCode+'" class="btnList" title="${text("取消二级管理员身份")}" data-confirm="${text("确认要取消该用户的二级管理员身份吗?")}"><i class="fa fa-trash-o"></i></a>&nbsp;');
//<% } %>
//# }
return actions.join('');
}}
],
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function(data){
}

View File

@@ -69,13 +69,13 @@ selectNum = 0, dataGrid = $('#dataGrid').dataGrid({
{header:'${text("办公电话")}', name:'phone', index:'a.phone', width:200, align:"center"},
{header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:200, align:"center"},
{header:'${text("状态")}', name:'status', index:'a.status', width:100, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_status')}, val, '未知', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_status')}", val, '未知', true);
}},
//<% if(isBlank(user.userType)){ %>
//# if(isBlank(user.userType)){
{header:'${text("类型")}', name:'userType', index:'a.user_type', width:100, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_user_type')}, val, '无', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_user_type')}", val, '无', true);
}},
//<% } %>
//# }
{header:'行数据', name:'rowData', hidden:true, formatter: function(val, obj, row, act){
return JSON.stringify(row);
}}

View File

@@ -120,7 +120,7 @@
</div>
<% } %>
<script>
// 初始化DataGrid对象
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
// 设置数据表格列
@@ -131,7 +131,7 @@ $('#dataGrid').dataGrid({
{header:'多行文本', name:'testTextarea', width:150, editable:true, edittype:'textarea', editoptions:{'maxlength':'200', 'class':'form-control', 'rows':'1'}, unformat: function(val, obj, cell){return $('#'+obj.rowId+'_'+obj.colModel.name, cell).val();}},
{header:'下拉框', name:'testSelect', width:100,
editable:true, edittype:'select', editoptions:{'class':'form-control',
items: $.merge([{dictLabel:'&nbsp;',dictValue:''}], ${@DictUtils.getDictListJson('sys_menu_type')}),
items: $.merge([{dictLabel:'&nbsp;',dictValue:''}], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
js.select2(element).on("change",function(){$(this).resetValid()});
}
@@ -139,7 +139,7 @@ $('#dataGrid').dataGrid({
},
// {header:'下拉多选', name:'testSelectMultiple', width:100,
// editable:true, edittype:'select', editoptions:{multiple:true, 'class':'form-control',
// items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
// items: $.merge([], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
// itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
// js.select2(element).on("change",function(){$(this).resetValid()});
// }
@@ -240,7 +240,7 @@ $('#dataGrid').dataGrid({
editGridInputFormListName: 'testDataChildList', // 提交的数据列表名
editGridInputFormListAttrs: 'status,id,testSort,testData.id,testInput,testTextarea,testSelect,testSelectMultiple,testRadio,testCheckbox,testDate,testDatetime,testUser.userCode,testOffice.officeCode,testAreaCode,testAreaName,', // 提交数据列表的属性字段
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function(data){
}

View File

@@ -120,7 +120,7 @@
</div>
<% } %>
<script>
// 初始化DataGrid对象
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
@@ -138,16 +138,16 @@ $('#dataGrid').dataGrid({
return val;
}, summaryTpl: "<em>{0}</em> ", summaryType: "sum"},
{header:'下拉框', name:'testSelect', index:'a.test_select', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '未知', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '未知', true);
}},
{header:'下拉多选', name:'testSelectMultiple', index:'a.test_select_multiple', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '未知', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '未知', true);
}},
{header:'单选框', name:'testRadio', index:'a.test_radio', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '未知', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '未知', true);
}},
{header:'复选框', name:'testCheckbox', index:'a.test_checkbox', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '未知', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '未知', true);
}},
{header:'日期选择', name:'testDate', index:'a.test_date', width:150, align:"center"},
{header:'日期时间', name:'testDatetime', index:'a.test_datetime', width:150, align:"center"},
@@ -156,13 +156,13 @@ $('#dataGrid').dataGrid({
{header:'区域选择', name:'testAreaName', index:'a.test_area_code', width:150, align:"center"},
{header:'区域名称', name:'testAreaName', index:'a.test_area_name', width:150, align:"left"},
{header:'状态', name:'status', index:'a.status', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '未知', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_search_status')}", val, '未知', true);
}},
{header:'创建时间', name:'createDate', index:'a.create_date', width:150, align:"center"},
{header:'备注信息', name:'remarks', index:'a.remarks', width:150, align:"left"},
{header:'操作', name:'actions', width:120, formatter: function(val, obj, row, act){
var actions = [];
//<% if(hasPermi('test:testData:edit')){ %>
//# if(hasPermi('test:testData:edit')){
actions.push('<a href="${ctx}/test/testData/form?id='+row.id+'" class="btnList" title="编辑数据"><i class="fa fa-pencil"></i></a>&nbsp;');
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctx}/test/testData/disable?id='+row.id+'" class="btnList" title="停用数据" data-confirm="确认要停用该数据吗?"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
@@ -170,7 +170,7 @@ $('#dataGrid').dataGrid({
actions.push('<a href="${ctx}/test/testData/enable?id='+row.id+'" class="btnList" title="启用数据" data-confirm="确认要启用该数据吗?"><i class="glyphicon glyphicon-ok-circle"></i></a>&nbsp;');
}
actions.push('<a href="${ctx}/test/testData/delete?id='+row.id+'" class="btnList" title="删除数据" data-confirm="确认要删除该数据吗?"><i class="fa fa-trash-o"></i></a>&nbsp;');
//<% } %>
//# }
return actions.join('');
}}
],
@@ -204,7 +204,7 @@ $('#dataGrid').dataGrid({
},
// ================ 分组,小计 END ==============
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function(data){
// 分组和冻结列情况下的合并单元格测试

View File

@@ -50,14 +50,14 @@
<% } %>
<script>
// 初始化布局
//# // 初始化布局
$('body').layout({
north__size: 300,
onresize: function(){
$(window).resize();
}
});
// 初始化DataGrid对象
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
dataGridPage: $('#dataGridPage'),
@@ -69,24 +69,24 @@ $('#dataGrid').dataGrid({
{header:'${text("岗位代码")}', name:'postCode', index:'a.post_code', width:200, align:"center"},
{header:'${text("排序号")}', name:'postSort', index:'a.post_sort', width:80, align:"center"},
{header:'${text("岗位分类")}', name:'postType', index:'a.post_type', width:100, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_post_type')}, val, '未知', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_post_type')}", val, '未知', true);
}},
{header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:150, align:"center"},
{header:'${text("备注信息")}', name:'remarks', index:'a.remarks', width:200, align:"left"},
{header:'${text("状态")}', name:'status', index:'a.status', width:80, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_status')}, val, '未知', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_status')}", val, '未知', true);
}}
],
onSelectRow: function(id, isSelect, event){
$('#postCode').val(id);
$('#dataGrid2').dataGrid('refresh');
},
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function(data){
}
});
// 初始化DataGrid对象
//# // 初始化DataGrid对象
$('#dataGrid2').dataGrid({
searchForm: $("#searchForm2"),
dataGridPage: $('#dataGrid2Page'),
@@ -104,10 +104,10 @@ $('#dataGrid2').dataGrid({
{header:'${text("办公电话")}', name:'phone', index:'a.phone', width:200, align:"center"},
{header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:200, align:"center"},
{header:'${text("状态")}', name:'status', index:'a.status', width:140, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_status')}, val, '未知', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_status')}", val, '未知', true);
}}
],
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function(data){
}

View File

@@ -82,7 +82,7 @@ function formatter(val, obj, row, act) {
}
}
// 初始化DataGrid对象
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
data: dataGridData.data,
@@ -133,7 +133,7 @@ $('#dataGrid').dataGrid({
},
showRownum: true, // 是否显示行号默认true
showFooter: true, // 是否显示底部合计行,数据载入详见 ajaxSuccess
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function (data) {
$('#dataGrid').dataGrid('mergeCell', 'parentArea,childArea');
$('#dataGrid').dataGrid("footerData", "set", {

View File

@@ -1,17 +1,17 @@
<% layout('/layouts/default.html', {title: '组件应用实例', libs: ['validate','fileupload','ueditor','dataGrid','inputmask']}){ %>
<div class="main-content">
<div class="box box-main">
<div class="box-header with-border">
<div class="box-title">
<i class="fa icon-notebook"></i> 组件应用实例
</div>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
</div>
</div>
<#form:form id="inputForm" model="${testData}" action="${ctx}/test/testData/save" method="post" class="form-horizontal">
<div class="box-body">
<div class="form-unit">基本信息</div>
<% layout('/layouts/default.html', {title: '组件应用实例', libs: ['validate','fileupload','ueditor','dataGrid','inputmask']}){ %>
<div class="main-content">
<div class="box box-main">
<div class="box-header with-border">
<div class="box-title">
<i class="fa icon-notebook"></i> 组件应用实例
</div>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
</div>
</div>
<#form:form id="inputForm" model="${testData}" action="${ctx}/test/testData/save" method="post" class="form-horizontal">
<div class="box-body">
<div class="form-unit">基本信息</div>
<#form:hidden path="id"/>
<div class="row">
<div class="col-xs-12">
@@ -96,36 +96,36 @@
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 金额格式:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-fw fa-rmb"></i></span>
<#form:input path="testInput_money" maxlength="200" class="form-control inputmask"
data-inputmask-alias="money" data-inputmask="'digits':'2'"/>
<span class="input-group-addon">(千分位右对齐保留2位小数)</span>
</div>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 电子邮箱:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-fw fa-envelope"></i></span>
<#form:input path="testInput_regex" maxlength="200" class="form-control inputmask"
data-inputmask-regex="[a-zA-Z0-9._%-]+@[a-zA-Z0-9-]+\\.[a-zA-Z]{2,4}"/>
<span class="input-group-addon">(正则表达式)</span>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 金额格式:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-fw fa-rmb"></i></span>
<#form:input path="testInput_money" maxlength="200" class="form-control inputmask"
data-inputmask-alias="money" data-inputmask="'digits':'2'"/>
<span class="input-group-addon">(千分位右对齐保留2位小数)</span>
</div>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 电子邮箱:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-fw fa-envelope"></i></span>
<#form:input path="testInput_regex" maxlength="200" class="form-control inputmask"
data-inputmask-regex="[a-zA-Z0-9._%-]+@[a-zA-Z0-9-]+\\.[a-zA-Z]{2,4}"/>
<span class="input-group-addon">(正则表达式)</span>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6">
@@ -139,56 +139,56 @@
class="" allowClear="true"/>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 用户多选:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<#form:treeselect id="testUser2" title="用户选择"
path="testUser.userCode" labelPath="testUser.userName"
url="${ctx}/sys/office/treeData?isLoadUser=true"
class="" allowClear="true" checkbox="true"/>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 用户列表选择:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<#form:listselect id="testUser3" title="用户选择"
url="${ctx}/sys/empUser/empUserSelect" allowClear="false"
checkbox="false" itemCode="userCode" itemName="userName"/>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 用户列表多选:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<#form:listselect id="testUser4" title="用户选择"
url="${ctx}/sys/empUser/empUserSelect" allowClear="false"
checkbox="true" itemCode="userCode" itemName="userName"/>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 城市选择(异步):<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<#form:treeselect id="testAreaCode" title="区域选择"
path="testAreaCode" labelPath="testAreaName"
url="${ctx}/sys/area/treeData?parentCode=0"
class="" allowClear="true" returnFullName="true"/>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 用户多选:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<#form:treeselect id="testUser2" title="用户选择"
path="testUser.userCode" labelPath="testUser.userName"
url="${ctx}/sys/office/treeData?isLoadUser=true"
class="" allowClear="true" checkbox="true"/>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 用户列表选择:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<#form:listselect id="testUser3" title="用户选择"
url="${ctx}/sys/empUser/empUserSelect" allowClear="false"
checkbox="false" itemCode="userCode" itemName="userName"/>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 用户列表多选:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<#form:listselect id="testUser4" title="用户选择"
url="${ctx}/sys/empUser/empUserSelect" allowClear="false"
checkbox="true" itemCode="userCode" itemName="userName"/>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 城市选择(异步):<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<#form:treeselect id="testAreaCode" title="区域选择"
path="testAreaCode" labelPath="testAreaName"
url="${ctx}/sys/area/treeData?parentCode=0"
class="" allowClear="true" returnFullName="true"/>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
@@ -202,39 +202,39 @@
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 城市选择(联动):<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<div class="input-group" id="cascadeSelect"></div>
<script src="${ctxStatic}/jquery-plugins/jquery.cascadeSelect.js?${_version}"></script>
<script type="text/javascript">
$(function(){
js.ajaxSubmit(ctx + '/sys/area/treeData', function(data){
$("#cascadeSelect").cascadeSelect({
data: data, cssStyle: 'width:150px',
change: function(vals, names){
$('#areaSelectValue').val(vals.join(',') + ' | ' + names.join('/'))
}
})
});
});
</script>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 联动选择结果:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<#form:input path="areaSelectValue" maxlength="200" class="form-control"/>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 城市选择(联动):<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<div class="input-group" id="cascadeSelect"></div>
<script src="${ctxStatic}/jquery-plugins/jquery.cascadeSelect.js?${_version}"></script>
<script type="text/javascript">
$(function(){
js.ajaxSubmit(ctx + '/sys/area/treeData', function(data){
$("#cascadeSelect").cascadeSelect({
data: data, cssStyle: 'width:150px',
change: function(vals, names){
$('#areaSelectValue').val(vals.join(',') + ' | ' + names.join('/'))
}
})
});
});
</script>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 联动选择结果:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<#form:input path="areaSelectValue" maxlength="200" class="form-control"/>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
@@ -242,7 +242,7 @@
<label class="control-label col-sm-2" title="">
<span class="required hide">*</span> 备注信息:<i class="fa icon-question hide"></i></label>
<div class="col-sm-10">
<#form:ueditor path="remarks" maxlength="10000" height="200" class=""
<#form:ueditor path="remarks" maxlength="10000" height="200" class=""
simpleToolbars="true" readonly="false" outline="false"/>
</div>
</div>
@@ -258,20 +258,20 @@
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div class="form-group">
<label class="control-label col-sm-2">返回路径:</label>
<div class="col-sm-10">
<#form:fileupload id="uploadImage2" returnPath="true"
filePathInputId="uploadImage2Path" fileNameInputId="uploadImage2Name"
uploadType="image" readonly="false" preview="true" maxUploadNum="3" isMini="false"/>
<#form:input name="uploadImage2Path" value="/js/userfiles/fileupload/201812/1073024549485039616.png|/js/userfiles/fileupload/201812/1073043095867133952.png" class="form-control"/>
<#form:input name="uploadImage2Name" value="0 (1).png|0 (2).png" class="form-control"/>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div class="form-group">
<label class="control-label col-sm-2">返回路径:</label>
<div class="col-sm-10">
<#form:fileupload id="uploadImage2" returnPath="true"
filePathInputId="uploadImage2Path" fileNameInputId="uploadImage2Name"
uploadType="image" readonly="false" preview="true" maxUploadNum="3" isMini="false"/>
<#form:input name="uploadImage2Path" value="/js/userfiles/fileupload/201812/1073024549485039616.png|/js/userfiles/fileupload/201812/1073043095867133952.png" class="form-control"/>
<#form:input name="uploadImage2Name" value="0 (1).png|0 (2).png" class="form-control"/>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
@@ -291,26 +291,26 @@
<a href="#" id="testDataChildDataGridAddRowBtn" class="btn btn-primary btn-sm mt10 mb10"><i class="fa fa-plus"></i> 增行</a>
<% } %>
</div>
</div>
<div class="box-footer">
<div class="row">
<div class="col-sm-offset-2 col-sm-10">
<% if (hasPermi('test:testData:edit')){ %>
<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> 保 存</button>&nbsp;
<% } %>
<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> 关 闭</button>
</div>
</div>
</div>
</#form:form>
</div>
</div>
<% } %>
</div>
<div class="box-footer">
<div class="row">
<div class="col-sm-offset-2 col-sm-10">
<% if (hasPermi('test:testData:edit')){ %>
<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> 保 存</button>&nbsp;
<% } %>
<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> 关 闭</button>
</div>
</div>
</div>
</#form:form>
</div>
</div>
<% } %>
<script>
//初始化测试数据子表DataGrid对象
$("#testDataChildDataGrid").dataGrid({
data: ${toJson(testData.testDataChildList)},
data: "#{toJson(testData.testDataChildList)}",
datatype: "local", // 设置本地数据
autoGridHeight: function(){return 'auto'}, // 设置自动高度
@@ -318,20 +318,20 @@ $("#testDataChildDataGrid").dataGrid({
columnModel: [
{header:'状态', name:'status', editable:true, hidden:true},
{header:'主键', name:'id', editable:true, hidden:true},
{header:'排序号', name:'testSort', width:150, editable:true, edittype:'text', editoptions:{'maxlength':'11', 'class':'form-control digits',
// 'data-inputmask-alias':"money", 'data-inputmask': "'digits':'2'",
dataInit: function(element){
// $(element).addClass('inputmask').attr('data-inputmask-alias', "money").attr('data-inputmask', "'digits':'2'").inputmask()
$(element).addClass('inputmask').attr({'data-inputmask-alias': "money", 'data-inputmask': "'digits':'2'"}).inputmask()
// $(element).inputmask();
}
{header:'排序号', name:'testSort', width:150, editable:true, edittype:'text', editoptions:{'maxlength':'11', 'class':'form-control digits',
// 'data-inputmask-alias':"money", 'data-inputmask': "'digits':'2'",
dataInit: function(element){
// $(element).addClass('inputmask').attr('data-inputmask-alias', "money").attr('data-inputmask', "'digits':'2'").inputmask()
$(element).addClass('inputmask').attr({'data-inputmask-alias': "money", 'data-inputmask': "'digits':'2'"}).inputmask()
// $(element).inputmask();
}
}},
{header:'父表主键', name:'testData.id', editable:true, hidden:true},
{header:'单行文本', name:'testInput', width:150, editable:true, edittype:'text', editoptions:{'maxlength':'200', 'class':'form-control'}},
{header:'多行文本', name:'testTextarea', width:150, editable:true, edittype:'textarea', editoptions:{'maxlength':'200', 'class':'form-control', 'rows':'1'}},
{header:'下拉框', name:'testSelect', width:100,
editable:true, edittype:'select', editoptions:{'class':'form-control',
items: $.merge([{dictLabel:'&nbsp;',dictValue:''}], ${@DictUtils.getDictListJson('sys_menu_type')}),
items: $.merge([{dictLabel:'&nbsp;',dictValue:''}], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
js.select2(element).on("change",function(){$(this).resetValid()});
}
@@ -339,7 +339,7 @@ $("#testDataChildDataGrid").dataGrid({
},
{header:'下拉多选', name:'testSelectMultiple', width:100,
editable:true, edittype:'select', editoptions:{multiple:true, 'class':'form-control',
items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
items: $.merge([], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
js.select2(element).on("change",function(){$(this).resetValid()});
}
@@ -347,7 +347,7 @@ $("#testDataChildDataGrid").dataGrid({
},
{header:'单选框', name:'testRadio', width:100,
editable:true, edittype:'select', editoptions:{'class':'form-control',
items: $.merge([{dictLabel:'&nbsp;',dictValue:''}], ${@DictUtils.getDictListJson('sys_menu_type')}),
items: $.merge([{dictLabel:'&nbsp;',dictValue:''}], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
js.select2(element).on("change",function(){$(this).resetValid()});
}
@@ -355,7 +355,7 @@ $("#testDataChildDataGrid").dataGrid({
},
{header:'复选框', name:'testCheckbox', width:100,
editable:true, edittype:'select', editoptions:{multiple:true, 'class':'form-control',
items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
items: $.merge([], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
js.select2(element).on("change",function(){$(this).resetValid()});
}
@@ -364,17 +364,17 @@ $("#testDataChildDataGrid").dataGrid({
{header:'日期选择', name:'testDate', width:150,
formatter:'date', formatoptions:{srcformat:'Y-m-d H:i:s',newformat:'Y-m-d'},
editable:true, edittype:'text', editoptions:{'class':'form-control laydate ', 'readonly':'true',
dataInit: function(element){
dataInit: function(element){
laydate.render({elem:element, type:'date', format:'yyyy-MM-dd'});
}
}
}
},
{header:'日期时间', name:'testDatetime', width:150,
formatter:'date', formatoptions:{srcformat:'Y-m-d H:i:s',newformat:'Y-m-d H:i:s'},
editable:true, edittype:'text', editoptions:{'class':'form-control laydate ', 'readonly':'true',
dataInit: function(element){
dataInit: function(element){
laydate.render({elem:element, type:'datetime', format:'yyyy-MM-dd HH:mm'});
}
}
}
},
{header:'用户选择', name:'testUser', width:150,
@@ -390,21 +390,21 @@ $("#testDataChildDataGrid").dataGrid({
});
}
}
},
{header:'${text("用户列表选择")}', name:'testUser2', width:150,
formatter: function(val, obj, row, act){
return js.val(row, 'testUser.userCode')+'|'+js.val(row, 'testUser.userName');
}, editable: true, edittype: "custom", editoptions: {
custom_element: function(val, editOptions) {
return js.template('listselectTpl', {
id: 'user_'+editOptions.id, title: '用户选择',
name: 'testUser.userCode', value: val.split('|')[0],
labelName: 'testUser.userName', labelValue: val.split('|')[1],
url: '${ctx}/sys/empUser/empUserSelect', cssClass: '',
itemCode: 'userCode', itemName: 'userName'
});
}
}
},
{header:'${text("用户列表选择")}', name:'testUser2', width:150,
formatter: function(val, obj, row, act){
return js.val(row, 'testUser.userCode')+'|'+js.val(row, 'testUser.userName');
}, editable: true, edittype: "custom", editoptions: {
custom_element: function(val, editOptions) {
return js.template('listselectTpl', {
id: 'user_'+editOptions.id, title: '用户选择',
name: 'testUser.userCode', value: val.split('|')[0],
labelName: 'testUser.userName', labelValue: val.split('|')[1],
url: '${ctx}/sys/empUser/empUserSelect', cssClass: '',
itemCode: 'userCode', itemName: 'userName'
});
}
}
},
{header:'机构选择', name:'testOffice', width:150,
formatter: function(val, obj, row, act){
@@ -455,7 +455,7 @@ $("#testDataChildDataGrid").dataGrid({
editGridInputFormListName: 'testDataChildList', // 提交的数据列表名
editGridInputFormListAttrs: 'status,id,testSort,testData.id,testInput,testTextarea,testSelect,testSelectMultiple,testRadio,testCheckbox,testDate,testDatetime,testUser.userCode,testOffice.officeCode,testAreaCode,testAreaName,', // 提交数据列表的属性字段
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function(data){
}
@@ -465,37 +465,37 @@ $("#testDataChildDataGrid").dataGrid({
<#form:treeselect id="{{d.id}}" title="{{d.title}}" name="{{d.name}}" value="{{d.value}}"
labelName="{{d.labelName}}" labelValue="{{d.labelValue}}" url="{{d.url}}"
class="{{d.cssClass}}" btnClass="btn-sm" allowClear="true"/>
</div>//--></script>
<script id="listselectTpl" type="text/template">//<!--<div>
<#form:listselect id="{{d.id}}" title="{{d.title}}" name="{{d.name}}" value="{{d.value}}"
labelName="{{d.labelName}}" labelValue="{{d.labelValue}}" url="{{d.url}}"
class="{{d.cssClass}}" btnClass="btn-sm" allowClear="true"
itemCode="{{d.itemCode}}" itemName="{{d.itemName}}"/>
</div>//--></script>
<script>
$("#inputForm").validate({
submitHandler: function(form){
// 数据格式化恢复(表单提交之前调用)
$('.inputmask').inputmask('remove');
// js.ajaxSubmitForm($(form), function(data){
// js.showMessage(data.message);
// if(data.result == Global.TRUE){
// js.closeCurrentTabPage(function(contentWindow){
// contentWindow.page();
// });
// }
// }, "json");
log($(form).serializeArray());
js.showMessage('模拟保存成功');
// 数据格式化(初始化完成表单后调用)
$(".inputmask").inputmask();
}
});
//数据格式化(初始化完成表单后调用)
$(".inputmask").inputmask();
<script id="listselectTpl" type="text/template">//<!--<div>
<#form:listselect id="{{d.id}}" title="{{d.title}}" name="{{d.name}}" value="{{d.value}}"
labelName="{{d.labelName}}" labelValue="{{d.labelValue}}" url="{{d.url}}"
class="{{d.cssClass}}" btnClass="btn-sm" allowClear="true"
itemCode="{{d.itemCode}}" itemName="{{d.itemName}}"/>
</div>//--></script>
<script>
$("#inputForm").validate({
submitHandler: function(form){
// 数据格式化恢复(表单提交之前调用)
$('.inputmask').inputmask('remove');
// js.ajaxSubmitForm($(form), function(data){
// js.showMessage(data.message);
// if(data.result == Global.TRUE){
// js.closeCurrentTabPage(function(contentWindow){
// contentWindow.page();
// });
// }
// }, "json");
log($(form).serializeArray());
js.showMessage('模拟保存成功');
// 数据格式化(初始化完成表单后调用)
$(".inputmask").inputmask();
}
});
//数据格式化(初始化完成表单后调用)
$(".inputmask").inputmask();
</script>

View File

@@ -149,7 +149,7 @@
//初始化测试数据子表DataGrid对象
$("#testDataChildDataGrid").dataGrid({
data: ${toJson(testData.testDataChildList)},
data: "#{toJson(testData.testDataChildList)}",
datatype: "local", // 设置本地数据
autoGridHeight: function(){return 'auto'}, // 设置自动高度
@@ -161,7 +161,7 @@ $("#testDataChildDataGrid").dataGrid({
{header:'多行文本', name:'testTextarea', width:100, editable:true, edittype:'textarea', editoptions:{'maxlength':'200', 'class':'form-control', 'rows':'1'}},
{header:'下拉框', name:'testSelect', width:100,
editable:true, edittype:'select', editoptions:{'class':'form-control',
items: $.merge([{dictLabel:'&nbsp;',dictValue:''}], ${@DictUtils.getDictListJson('sys_menu_type')}),
items: $.merge([{dictLabel:'&nbsp;',dictValue:''}], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
js.select2(element).on("change",function(){$(this).resetValid()});
}
@@ -211,7 +211,7 @@ $("#testDataChildDataGrid").dataGrid({
editGridInputFormListName: 'testDataChildList', // 提交的数据列表名
editGridInputFormListAttrs: 'status,id,testSort,testData.id,testInput,testTextarea,testSelect,testSelectMultiple,testRadio,testCheckbox,testDate,testDatetime,testUser.userCode,testOffice.officeCode,testAreaCode,testAreaName,', // 提交数据列表的属性字段
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function(data){
}

View File

@@ -196,7 +196,7 @@
//初始化测试数据子表DataGrid对象
$("#testDataChildDataGrid").dataGrid({
data: ${toJson(testData.testDataChildList)},
data: "#{toJson(testData.testDataChildList)}",
datatype: "local", // 设置本地数据
autoGridHeight: function(){return 'auto'}, // 设置自动高度
@@ -221,7 +221,7 @@ $("#testDataChildDataGrid").dataGrid({
{header:'${text("多行文本")}', name:'testTextarea', width:100, editable:true, edittype:'textarea', editoptions:{'maxlength':'200', 'class':'form-control', 'rows':'1'}},
{header:'${text("下拉框")}', name:'testSelect', width:100,
editable:true, edittype:'select', editoptions:{'class':'form-control',
items: $.merge([{dictLabel:'&nbsp;',dictValue:''}], ${@DictUtils.getDictListJson('sys_menu_type')}),
items: $.merge([{dictLabel:'&nbsp;',dictValue:''}], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
js.select2(element).on("change",function(){$(this).resetValid()});
}
@@ -229,7 +229,7 @@ $("#testDataChildDataGrid").dataGrid({
},
{header:'${text("下拉多选")}', name:'testSelectMultiple', width:90, fixed: true,
editable:true, edittype:'select', editoptions:{multiple:true, 'class':'form-control',
items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
items: $.merge([], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
js.select2(element).on("change",function(){$(this).resetValid()});
}
@@ -237,7 +237,7 @@ $("#testDataChildDataGrid").dataGrid({
},
{header:'${text("单选框")}', name:'testRadio', width:135, fixed: true,
editable:true, edittype:'radio', editoptions:{'class':'form-control icheck',
items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
items: $.merge([], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
js.iCheck(element).on("ifChanged",function(){$(this).resetValid()});
}
@@ -245,7 +245,7 @@ $("#testDataChildDataGrid").dataGrid({
},
{header:'${text("复选框")}', name:'testCheckbox', width:135, fixed: true,
editable:true, edittype:'checkbox', editoptions:{'class':'form-control icheck',
items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
items: $.merge([], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
js.iCheck(element).on("ifChanged",function(){$(this).resetValid()});
}
@@ -364,7 +364,7 @@ $("#testDataChildDataGrid").dataGrid({
+'testRadio,testCheckbox,testDate,testDatetime,testUser.userCode,testOffice.officeCode,'
+'testAreaCode,testAreaName,testDataChild_file,testDataChild_file__del', // 提交数据列表的属性字段
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function(data){
// $('#jqgh_testDataChildDataGrid_rn').append('<a href="javascript:" onclick="'
// + '$(\'#testDataChildDataGridAddRowBtn\').click();">'

View File

@@ -118,7 +118,7 @@
</div>
<% } %>
<script>
// 初始化DataGrid对象
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
@@ -129,16 +129,16 @@ $('#dataGrid').dataGrid({
}}},
{header:'${text("多行文本")}', name:'testTextarea', index:'a.test_textarea', width:150, align:"left"},
{header:'${text("下拉框")}', name:'testSelect', index:'a.test_select', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '${text("未知")}', true);
}},
{header:'${text("下拉多选")}', name:'testSelectMultiple', index:'a.test_select_multiple', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '${text("未知")}', true);
}},
{header:'${text("单选框")}', name:'testRadio', index:'a.test_radio', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '${text("未知")}', true);
}},
{header:'${text("复选框")}', name:'testCheckbox', index:'a.test_checkbox', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '${text("未知")}', true);
}},
{header:'${text("日期选择")}', name:'testDate', index:'a.test_date', width:150, align:"center"},
{header:'${text("日期时间")}', name:'testDatetime', index:'a.test_datetime', width:150, align:"center"},
@@ -147,13 +147,13 @@ $('#dataGrid').dataGrid({
{header:'${text("区域选择")}', name:'testAreaName', index:'a.test_area_code', width:150, align:"center"},
{header:'${text("区域名称")}', name:'testAreaName', index:'a.test_area_name', width:150, align:"left"},
{header:'${text("状态")}', name:'status', index:'a.status', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '${text("未知")}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_search_status')}", val, '${text("未知")}', true);
}},
{header:'${text("创建时间")}', name:'createDate', index:'a.create_date', firstsortorder:'desc', width:150, align:"center"},
{header:'${text("备注")}', name:'remarks', index:'a.remarks', width:150, align:"left"},
{header:'${text("操作")}', name:'actions', width:100, formatter: function(val, obj, row, act){
var actions = [];
//<% if(hasPermi('test:testData:edit')){ %>
//# if(hasPermi('test:testData:edit')){
actions.push('<a href="${ctx}/test/testData/form?id='+row.id+'" class="btnList" title="${text("编辑数据")}"><i class="fa fa-pencil"></i></a>&nbsp;');
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctx}/test/testData/disable?id='+row.id+'" class="btnList" title="${text("停用数据")}" data-confirm="${text("确认要停用该数据吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
@@ -161,7 +161,7 @@ $('#dataGrid').dataGrid({
actions.push('<a href="${ctx}/test/testData/enable?id='+row.id+'" class="btnList" title="${text("启用数据")}" data-confirm="${text("确认要启用该数据吗?")}"><i class="glyphicon glyphicon-ok-circle"></i></a>&nbsp;');
}
actions.push('<a href="${ctx}/test/testData/delete?id='+row.id+'" class="btnList" title="${text("删除数据")}" data-confirm="${text("确认要删除该数据吗?")}"><i class="fa fa-trash-o"></i></a>&nbsp;');
//<% } %>
//# }
return actions.join('');
}}
],
@@ -185,16 +185,16 @@ $('#dataGrid').dataGrid({
{header:'${text("单行文本")}', name:'testInput', width:150},
{header:'${text("多行文本")}', name:'testTextarea', width:150},
{header:'${text("下拉框")}', name:'testSelect', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '${text("未知")}', true);
}},
{header:'${text("下拉多选")}', name:'testSelectMultiple', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '${text("未知")}', true);
}},
{header:'${text("单选框")}', name:'testRadio', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '${text("未知")}', true);
}},
{header:'${text("复选框")}', name:'testCheckbox', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '${text("未知")}', true);
}},
{header:'${text("日期时间")}', name:'testDatetime', width:150, align:"center"},
{header:'${text("用户名称")}', name:'testUser.userName', sortable:false, width:150, align:"center"},
@@ -202,7 +202,7 @@ $('#dataGrid').dataGrid({
{header:'${text("区域名称")}', name:'testAreaName', width:150, align:"center"}
],
emptyDataHint: true, // 表格内没有数据的时候提示 “无数据显示” v4.1.7
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function(data){
$(window).resize();
}
@@ -212,7 +212,7 @@ $('#dataGrid').dataGrid({
multiSort: true, // 是否支持多列排序,给列指定 firstsortorder 可设定初次排序方式
emptyDataHint: true, // 表格内没有数据的时候提示 “无数据显示” v4.1.7
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function(data){
// // 无数据显示v4.1.7 之前版本
// if (data.count == 0){

View File

@@ -48,7 +48,7 @@
</div>
<% } %>
<script>
// 初始化DataGrid对象
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
@@ -58,13 +58,13 @@ $('#dataGrid').dataGrid({
{header:'${text("排序号")}', name:'treeSort', index:'a.tree_sort', width:150, align:"center"},
{header:'${text("节点名称")}', name:'treeName', index:'a.tree_name', width:150, align:"left"},
{header:'${text("状态")}', name:'status', index:'a.status', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '${text("未知")}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_search_status')}", val, '${text("未知")}', true);
}},
{header:'${text("创建时间")}', name:'createDate', index:'a.create_date', width:150, align:"center"},
{header:'${text("备注信息")}', name:'remarks', index:'a.remarks', width:150, align:"left"},
{header:'${text("操作")}', name:'actions', width:120, formatter: function(val, obj, row, act){
var actions = [];
//<% if(hasPermi('test:testTree:edit')){ %>
//# if(hasPermi('test:testTree:edit')){
actions.push('<a href="${ctx}/test/testTree/form?treeCode='+row.treeCode+'" class="btnList" title="${text("编辑数据")}"><i class="fa fa-pencil"></i></a>&nbsp;');
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctx}/test/testTree/disable?treeCode='+row.treeCode+'" class="btnList" title="${text("停用数据")}" data-confirm="${text("确认要停用该数据吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
@@ -73,19 +73,20 @@ $('#dataGrid').dataGrid({
}
actions.push('<a href="${ctx}/test/testTree/delete?treeCode='+row.treeCode+'" class="btnList" title="${text("删除数据")}" data-confirm="${text("确认要删除该数据及所有子数据吗?")}" data-deltreenode="'+row.id+'"><i class="fa fa-trash-o"></i></a>&nbsp;');
actions.push('<a href="${ctx}/test/testTree/form?parentCode='+row.id+'" class="btnList" title="${text("新增下级数据")}"><i class="fa fa-plus-square"></i></a>&nbsp;');
//<% } %>
//# }
return actions.join('');
}}
],
treeGrid: true, // 启用树结构表格
defaultExpandLevel: 0, // 默认展开的层次
expandNodeClearPostData: 'treeName,remarks,', // 展开节点清理请求参数数据(一般设置查询条件的字段属性,否则在查询后,不能展开子节点数据) // 加载成功后执行事件
expandNodeClearPostData: 'treeName,remarks,', // 展开节点清理请求参数数据(一般设置查询条件的字段属性,否则在查询后,不能展开子节点数据)
//# // 加载成功后执行事件
ajaxSuccess: function(data){
}
});
// 修复树表数据包含字段parentCodes、treeLeaf、treeLevel、treeSorts、treeNames
//# // 修复树表数据包含字段parentCodes、treeLeaf、treeLevel、treeSorts、treeNames
$("#btnFixTreeData").click(function(){
js.ajaxSubmit("${ctx}/test/testTree/fixTreeData", function(data){
js.showMessage(data.message);

View File

@@ -120,7 +120,7 @@
</div>
<% } %>
<script>
// 初始化DataGrid对象
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
// 设置数据表格列
@@ -131,7 +131,7 @@ $('#dataGrid').dataGrid({
{header:'多行文本', name:'testTextarea', width:150, editable:true, edittype:'textarea', editoptions:{'maxlength':'200', 'class':'form-control', 'rows':'1'}, unformat: function(val, obj, cell){return $('#'+obj.rowId+'_'+obj.colModel.name, cell).val();}},
{header:'下拉框', name:'testSelect', width:100,
editable:true, edittype:'select', editoptions:{'class':'form-control',
items: $.merge([{dictLabel:'&nbsp;',dictValue:''}], ${@DictUtils.getDictListJson('sys_menu_type')}),
items: $.merge([{dictLabel:'&nbsp;',dictValue:''}], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
js.select2(element).on("change",function(){$(this).resetValid()});
}
@@ -139,7 +139,7 @@ $('#dataGrid').dataGrid({
},
// {header:'下拉多选', name:'testSelectMultiple', width:100,
// editable:true, edittype:'select', editoptions:{multiple:true, 'class':'form-control',
// items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
// items: $.merge([], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
// itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
// js.select2(element).on("change",function(){$(this).resetValid()});
// }
@@ -240,7 +240,7 @@ $('#dataGrid').dataGrid({
editGridInputFormListName: 'testDataChildList', // 提交的数据列表名
editGridInputFormListAttrs: 'status,id,testSort,testData.id,testInput,testTextarea,testSelect,testSelectMultiple,testRadio,testCheckbox,testDate,testDatetime,testUser.userCode,testOffice.officeCode,testAreaCode,testAreaName,', // 提交数据列表的属性字段
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function(data){
}

View File

@@ -120,7 +120,7 @@
</div>
<% } %>
<script>
// 初始化DataGrid对象
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
@@ -138,16 +138,16 @@ $('#dataGrid').dataGrid({
return val;
}, summaryTpl: "<em>{0}</em> ", summaryType: "sum"},
{header:'下拉框', name:'testSelect', index:'a.test_select', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '未知', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '未知', true);
}},
{header:'下拉多选', name:'testSelectMultiple', index:'a.test_select_multiple', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '未知', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '未知', true);
}},
{header:'单选框', name:'testRadio', index:'a.test_radio', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '未知', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '未知', true);
}},
{header:'复选框', name:'testCheckbox', index:'a.test_checkbox', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '未知', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '未知', true);
}},
{header:'日期选择', name:'testDate', index:'a.test_date', width:150, align:"center"},
{header:'日期时间', name:'testDatetime', index:'a.test_datetime', width:150, align:"center"},
@@ -156,13 +156,13 @@ $('#dataGrid').dataGrid({
{header:'区域选择', name:'testAreaName', index:'a.test_area_code', width:150, align:"center"},
{header:'区域名称', name:'testAreaName', index:'a.test_area_name', width:150, align:"left"},
{header:'状态', name:'status', index:'a.status', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '未知', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_search_status')}", val, '未知', true);
}},
{header:'创建时间', name:'createDate', index:'a.create_date', width:150, align:"center"},
{header:'备注信息', name:'remarks', index:'a.remarks', width:150, align:"left"},
{header:'操作', name:'actions', width:120, formatter: function(val, obj, row, act){
var actions = [];
//<% if(hasPermi('test:testData:edit')){ %>
//# if(hasPermi('test:testData:edit')){
actions.push('<a href="${ctx}/test/testData/form?id='+row.id+'" class="btnList" title="编辑数据"><i class="fa fa-pencil"></i></a>&nbsp;');
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctx}/test/testData/disable?id='+row.id+'" class="btnList" title="停用数据" data-confirm="确认要停用该数据吗?"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
@@ -170,7 +170,7 @@ $('#dataGrid').dataGrid({
actions.push('<a href="${ctx}/test/testData/enable?id='+row.id+'" class="btnList" title="启用数据" data-confirm="确认要启用该数据吗?"><i class="glyphicon glyphicon-ok-circle"></i></a>&nbsp;');
}
actions.push('<a href="${ctx}/test/testData/delete?id='+row.id+'" class="btnList" title="删除数据" data-confirm="确认要删除该数据吗?"><i class="fa fa-trash-o"></i></a>&nbsp;');
//<% } %>
//# }
return actions.join('');
}}
],
@@ -204,7 +204,7 @@ $('#dataGrid').dataGrid({
},
// ================ 分组,小计 END ==============
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function(data){
// 分组和冻结列情况下的合并单元格测试

View File

@@ -50,14 +50,14 @@
<% } %>
<script>
// 初始化布局
//# // 初始化布局
$('body').layout({
north__size: 300,
onresize: function(){
$(window).resize();
}
});
// 初始化DataGrid对象
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
dataGridPage: $('#dataGridPage'),
@@ -69,24 +69,24 @@ $('#dataGrid').dataGrid({
{header:'${text("岗位代码")}', name:'postCode', index:'a.post_code', width:200, align:"center"},
{header:'${text("排序号")}', name:'postSort', index:'a.post_sort', width:80, align:"center"},
{header:'${text("岗位分类")}', name:'postType', index:'a.post_type', width:100, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_post_type')}, val, '未知', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_post_type')}", val, '未知', true);
}},
{header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:150, align:"center"},
{header:'${text("备注信息")}', name:'remarks', index:'a.remarks', width:200, align:"left"},
{header:'${text("状态")}', name:'status', index:'a.status', width:80, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_status')}, val, '未知', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_status')}", val, '未知', true);
}}
],
onSelectRow: function(id, isSelect, event){
$('#postCode').val(id);
$('#dataGrid2').dataGrid('refresh');
},
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function(data){
}
});
// 初始化DataGrid对象
//# // 初始化DataGrid对象
$('#dataGrid2').dataGrid({
searchForm: $("#searchForm2"),
dataGridPage: $('#dataGrid2Page'),
@@ -104,10 +104,10 @@ $('#dataGrid2').dataGrid({
{header:'${text("办公电话")}', name:'phone', index:'a.phone', width:200, align:"center"},
{header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:200, align:"center"},
{header:'${text("状态")}', name:'status', index:'a.status', width:140, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_status')}, val, '未知', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_status')}", val, '未知', true);
}}
],
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function(data){
}

View File

@@ -82,7 +82,7 @@ function formatter(val, obj, row, act) {
}
}
// 初始化DataGrid对象
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
data: dataGridData.data,
@@ -133,7 +133,7 @@ $('#dataGrid').dataGrid({
},
showRownum: true, // 是否显示行号默认true
showFooter: true, // 是否显示底部合计行,数据载入详见 ajaxSuccess
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function (data) {
$('#dataGrid').dataGrid('mergeCell', 'parentArea,childArea');
$('#dataGrid').dataGrid("footerData", "set", {

View File

@@ -1,17 +1,17 @@
<% layout('/layouts/default.html', {title: '组件应用实例', libs: ['validate','fileupload','ueditor','dataGrid','inputmask']}){ %>
<div class="main-content">
<div class="box box-main">
<div class="box-header with-border">
<div class="box-title">
<i class="fa icon-notebook"></i> 组件应用实例
</div>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
</div>
</div>
<#form:form id="inputForm" model="${testData}" action="${ctx}/test/testData/save" method="post" class="form-horizontal">
<div class="box-body">
<div class="form-unit">基本信息</div>
<% layout('/layouts/default.html', {title: '组件应用实例', libs: ['validate','fileupload','ueditor','dataGrid','inputmask']}){ %>
<div class="main-content">
<div class="box box-main">
<div class="box-header with-border">
<div class="box-title">
<i class="fa icon-notebook"></i> 组件应用实例
</div>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
</div>
</div>
<#form:form id="inputForm" model="${testData}" action="${ctx}/test/testData/save" method="post" class="form-horizontal">
<div class="box-body">
<div class="form-unit">基本信息</div>
<#form:hidden path="id"/>
<div class="row">
<div class="col-xs-12">
@@ -96,36 +96,36 @@
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 金额格式:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-fw fa-rmb"></i></span>
<#form:input path="testInput_money" maxlength="200" class="form-control inputmask"
data-inputmask-alias="money" data-inputmask="'digits':'2'"/>
<span class="input-group-addon">(千分位右对齐保留2位小数)</span>
</div>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 电子邮箱:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-fw fa-envelope"></i></span>
<#form:input path="testInput_regex" maxlength="200" class="form-control inputmask"
data-inputmask-regex="[a-zA-Z0-9._%-]+@[a-zA-Z0-9-]+\\.[a-zA-Z]{2,4}"/>
<span class="input-group-addon">(正则表达式)</span>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 金额格式:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-fw fa-rmb"></i></span>
<#form:input path="testInput_money" maxlength="200" class="form-control inputmask"
data-inputmask-alias="money" data-inputmask="'digits':'2'"/>
<span class="input-group-addon">(千分位右对齐保留2位小数)</span>
</div>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 电子邮箱:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-fw fa-envelope"></i></span>
<#form:input path="testInput_regex" maxlength="200" class="form-control inputmask"
data-inputmask-regex="[a-zA-Z0-9._%-]+@[a-zA-Z0-9-]+\\.[a-zA-Z]{2,4}"/>
<span class="input-group-addon">(正则表达式)</span>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6">
@@ -139,56 +139,56 @@
class="" allowClear="true"/>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 用户多选:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<#form:treeselect id="testUser2" title="用户选择"
path="testUser.userCode" labelPath="testUser.userName"
url="${ctx}/sys/office/treeData?isLoadUser=true"
class="" allowClear="true" checkbox="true"/>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 用户列表选择:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<#form:listselect id="testUser3" title="用户选择"
url="${ctx}/sys/empUser/empUserSelect" allowClear="false"
checkbox="false" itemCode="userCode" itemName="userName"/>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 用户列表多选:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<#form:listselect id="testUser4" title="用户选择"
url="${ctx}/sys/empUser/empUserSelect" allowClear="false"
checkbox="true" itemCode="userCode" itemName="userName"/>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 城市选择(异步):<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<#form:treeselect id="testAreaCode" title="区域选择"
path="testAreaCode" labelPath="testAreaName"
url="${ctx}/sys/area/treeData?parentCode=0"
class="" allowClear="true" returnFullName="true"/>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 用户多选:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<#form:treeselect id="testUser2" title="用户选择"
path="testUser.userCode" labelPath="testUser.userName"
url="${ctx}/sys/office/treeData?isLoadUser=true"
class="" allowClear="true" checkbox="true"/>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 用户列表选择:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<#form:listselect id="testUser3" title="用户选择"
url="${ctx}/sys/empUser/empUserSelect" allowClear="false"
checkbox="false" itemCode="userCode" itemName="userName"/>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 用户列表多选:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<#form:listselect id="testUser4" title="用户选择"
url="${ctx}/sys/empUser/empUserSelect" allowClear="false"
checkbox="true" itemCode="userCode" itemName="userName"/>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 城市选择(异步):<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<#form:treeselect id="testAreaCode" title="区域选择"
path="testAreaCode" labelPath="testAreaName"
url="${ctx}/sys/area/treeData?parentCode=0"
class="" allowClear="true" returnFullName="true"/>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
@@ -202,39 +202,39 @@
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 城市选择(联动):<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<div class="input-group" id="cascadeSelect"></div>
<script src="${ctxStatic}/jquery-plugins/jquery.cascadeSelect.js?${_version}"></script>
<script type="text/javascript">
$(function(){
js.ajaxSubmit(ctx + '/sys/area/treeData', function(data){
$("#cascadeSelect").cascadeSelect({
data: data, cssStyle: 'width:150px',
change: function(vals, names){
$('#areaSelectValue').val(vals.join(',') + ' | ' + names.join('/'))
}
})
});
});
</script>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 联动选择结果:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<#form:input path="areaSelectValue" maxlength="200" class="form-control"/>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 城市选择(联动):<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<div class="input-group" id="cascadeSelect"></div>
<script src="${ctxStatic}/jquery-plugins/jquery.cascadeSelect.js?${_version}"></script>
<script type="text/javascript">
$(function(){
js.ajaxSubmit(ctx + '/sys/area/treeData', function(data){
$("#cascadeSelect").cascadeSelect({
data: data, cssStyle: 'width:150px',
change: function(vals, names){
$('#areaSelectValue').val(vals.join(',') + ' | ' + names.join('/'))
}
})
});
});
</script>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 联动选择结果:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<#form:input path="areaSelectValue" maxlength="200" class="form-control"/>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
@@ -242,7 +242,7 @@
<label class="control-label col-sm-2" title="">
<span class="required hide">*</span> 备注信息:<i class="fa icon-question hide"></i></label>
<div class="col-sm-10">
<#form:ueditor path="remarks" maxlength="10000" height="200" class=""
<#form:ueditor path="remarks" maxlength="10000" height="200" class=""
simpleToolbars="true" readonly="false" outline="false"/>
</div>
</div>
@@ -258,20 +258,20 @@
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div class="form-group">
<label class="control-label col-sm-2">返回路径:</label>
<div class="col-sm-10">
<#form:fileupload id="uploadImage2" returnPath="true"
filePathInputId="uploadImage2Path" fileNameInputId="uploadImage2Name"
uploadType="image" readonly="false" preview="true" maxUploadNum="3" isMini="false"/>
<#form:input name="uploadImage2Path" value="/js/userfiles/fileupload/201812/1073024549485039616.png|/js/userfiles/fileupload/201812/1073043095867133952.png" class="form-control"/>
<#form:input name="uploadImage2Name" value="0 (1).png|0 (2).png" class="form-control"/>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div class="form-group">
<label class="control-label col-sm-2">返回路径:</label>
<div class="col-sm-10">
<#form:fileupload id="uploadImage2" returnPath="true"
filePathInputId="uploadImage2Path" fileNameInputId="uploadImage2Name"
uploadType="image" readonly="false" preview="true" maxUploadNum="3" isMini="false"/>
<#form:input name="uploadImage2Path" value="/js/userfiles/fileupload/201812/1073024549485039616.png|/js/userfiles/fileupload/201812/1073043095867133952.png" class="form-control"/>
<#form:input name="uploadImage2Name" value="0 (1).png|0 (2).png" class="form-control"/>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
@@ -291,26 +291,26 @@
<a href="#" id="testDataChildDataGridAddRowBtn" class="btn btn-primary btn-sm mt10 mb10"><i class="fa fa-plus"></i> 增行</a>
<% } %>
</div>
</div>
<div class="box-footer">
<div class="row">
<div class="col-sm-offset-2 col-sm-10">
<% if (hasPermi('test:testData:edit')){ %>
<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> 保 存</button>&nbsp;
<% } %>
<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> 关 闭</button>
</div>
</div>
</div>
</#form:form>
</div>
</div>
<% } %>
</div>
<div class="box-footer">
<div class="row">
<div class="col-sm-offset-2 col-sm-10">
<% if (hasPermi('test:testData:edit')){ %>
<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> 保 存</button>&nbsp;
<% } %>
<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> 关 闭</button>
</div>
</div>
</div>
</#form:form>
</div>
</div>
<% } %>
<script>
//初始化测试数据子表DataGrid对象
$("#testDataChildDataGrid").dataGrid({
data: ${toJson(testData.testDataChildList)},
data: "#{toJson(testData.testDataChildList)}",
datatype: "local", // 设置本地数据
autoGridHeight: function(){return 'auto'}, // 设置自动高度
@@ -318,20 +318,20 @@ $("#testDataChildDataGrid").dataGrid({
columnModel: [
{header:'状态', name:'status', editable:true, hidden:true},
{header:'主键', name:'id', editable:true, hidden:true},
{header:'排序号', name:'testSort', width:150, editable:true, edittype:'text', editoptions:{'maxlength':'11', 'class':'form-control digits',
// 'data-inputmask-alias':"money", 'data-inputmask': "'digits':'2'",
dataInit: function(element){
// $(element).addClass('inputmask').attr('data-inputmask-alias', "money").attr('data-inputmask', "'digits':'2'").inputmask()
$(element).addClass('inputmask').attr({'data-inputmask-alias': "money", 'data-inputmask': "'digits':'2'"}).inputmask()
// $(element).inputmask();
}
{header:'排序号', name:'testSort', width:150, editable:true, edittype:'text', editoptions:{'maxlength':'11', 'class':'form-control digits',
// 'data-inputmask-alias':"money", 'data-inputmask': "'digits':'2'",
dataInit: function(element){
// $(element).addClass('inputmask').attr('data-inputmask-alias', "money").attr('data-inputmask', "'digits':'2'").inputmask()
$(element).addClass('inputmask').attr({'data-inputmask-alias': "money", 'data-inputmask': "'digits':'2'"}).inputmask()
// $(element).inputmask();
}
}},
{header:'父表主键', name:'testData.id', editable:true, hidden:true},
{header:'单行文本', name:'testInput', width:150, editable:true, edittype:'text', editoptions:{'maxlength':'200', 'class':'form-control'}},
{header:'多行文本', name:'testTextarea', width:150, editable:true, edittype:'textarea', editoptions:{'maxlength':'200', 'class':'form-control', 'rows':'1'}},
{header:'下拉框', name:'testSelect', width:100,
editable:true, edittype:'select', editoptions:{'class':'form-control',
items: $.merge([{dictLabel:'&nbsp;',dictValue:''}], ${@DictUtils.getDictListJson('sys_menu_type')}),
items: $.merge([{dictLabel:'&nbsp;',dictValue:''}], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
js.select2(element).on("change",function(){$(this).resetValid()});
}
@@ -339,7 +339,7 @@ $("#testDataChildDataGrid").dataGrid({
},
{header:'下拉多选', name:'testSelectMultiple', width:100,
editable:true, edittype:'select', editoptions:{multiple:true, 'class':'form-control',
items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
items: $.merge([], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
js.select2(element).on("change",function(){$(this).resetValid()});
}
@@ -347,7 +347,7 @@ $("#testDataChildDataGrid").dataGrid({
},
{header:'单选框', name:'testRadio', width:100,
editable:true, edittype:'select', editoptions:{'class':'form-control',
items: $.merge([{dictLabel:'&nbsp;',dictValue:''}], ${@DictUtils.getDictListJson('sys_menu_type')}),
items: $.merge([{dictLabel:'&nbsp;',dictValue:''}], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
js.select2(element).on("change",function(){$(this).resetValid()});
}
@@ -355,7 +355,7 @@ $("#testDataChildDataGrid").dataGrid({
},
{header:'复选框', name:'testCheckbox', width:100,
editable:true, edittype:'select', editoptions:{multiple:true, 'class':'form-control',
items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
items: $.merge([], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
js.select2(element).on("change",function(){$(this).resetValid()});
}
@@ -364,17 +364,17 @@ $("#testDataChildDataGrid").dataGrid({
{header:'日期选择', name:'testDate', width:150,
formatter:'date', formatoptions:{srcformat:'Y-m-d H:i:s',newformat:'Y-m-d'},
editable:true, edittype:'text', editoptions:{'class':'form-control laydate ', 'readonly':'true',
dataInit: function(element){
dataInit: function(element){
laydate.render({elem:element, type:'date', format:'yyyy-MM-dd'});
}
}
}
},
{header:'日期时间', name:'testDatetime', width:150,
formatter:'date', formatoptions:{srcformat:'Y-m-d H:i:s',newformat:'Y-m-d H:i:s'},
editable:true, edittype:'text', editoptions:{'class':'form-control laydate ', 'readonly':'true',
dataInit: function(element){
dataInit: function(element){
laydate.render({elem:element, type:'datetime', format:'yyyy-MM-dd HH:mm'});
}
}
}
},
{header:'用户选择', name:'testUser', width:150,
@@ -390,21 +390,21 @@ $("#testDataChildDataGrid").dataGrid({
});
}
}
},
{header:'${text("用户列表选择")}', name:'testUser2', width:150,
formatter: function(val, obj, row, act){
return js.val(row, 'testUser.userCode')+'|'+js.val(row, 'testUser.userName');
}, editable: true, edittype: "custom", editoptions: {
custom_element: function(val, editOptions) {
return js.template('listselectTpl', {
id: 'user_'+editOptions.id, title: '用户选择',
name: 'testUser.userCode', value: val.split('|')[0],
labelName: 'testUser.userName', labelValue: val.split('|')[1],
url: '${ctx}/sys/empUser/empUserSelect', cssClass: '',
itemCode: 'userCode', itemName: 'userName'
});
}
}
},
{header:'${text("用户列表选择")}', name:'testUser2', width:150,
formatter: function(val, obj, row, act){
return js.val(row, 'testUser.userCode')+'|'+js.val(row, 'testUser.userName');
}, editable: true, edittype: "custom", editoptions: {
custom_element: function(val, editOptions) {
return js.template('listselectTpl', {
id: 'user_'+editOptions.id, title: '用户选择',
name: 'testUser.userCode', value: val.split('|')[0],
labelName: 'testUser.userName', labelValue: val.split('|')[1],
url: '${ctx}/sys/empUser/empUserSelect', cssClass: '',
itemCode: 'userCode', itemName: 'userName'
});
}
}
},
{header:'机构选择', name:'testOffice', width:150,
formatter: function(val, obj, row, act){
@@ -455,7 +455,7 @@ $("#testDataChildDataGrid").dataGrid({
editGridInputFormListName: 'testDataChildList', // 提交的数据列表名
editGridInputFormListAttrs: 'status,id,testSort,testData.id,testInput,testTextarea,testSelect,testSelectMultiple,testRadio,testCheckbox,testDate,testDatetime,testUser.userCode,testOffice.officeCode,testAreaCode,testAreaName,', // 提交数据列表的属性字段
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function(data){
}
@@ -465,37 +465,37 @@ $("#testDataChildDataGrid").dataGrid({
<#form:treeselect id="{{d.id}}" title="{{d.title}}" name="{{d.name}}" value="{{d.value}}"
labelName="{{d.labelName}}" labelValue="{{d.labelValue}}" url="{{d.url}}"
class="{{d.cssClass}}" btnClass="btn-sm" allowClear="true"/>
</div>//--></script>
<script id="listselectTpl" type="text/template">//<!--<div>
<#form:listselect id="{{d.id}}" title="{{d.title}}" name="{{d.name}}" value="{{d.value}}"
labelName="{{d.labelName}}" labelValue="{{d.labelValue}}" url="{{d.url}}"
class="{{d.cssClass}}" btnClass="btn-sm" allowClear="true"
itemCode="{{d.itemCode}}" itemName="{{d.itemName}}"/>
</div>//--></script>
<script>
$("#inputForm").validate({
submitHandler: function(form){
// 数据格式化恢复(表单提交之前调用)
$('.inputmask').inputmask('remove');
// js.ajaxSubmitForm($(form), function(data){
// js.showMessage(data.message);
// if(data.result == Global.TRUE){
// js.closeCurrentTabPage(function(contentWindow){
// contentWindow.page();
// });
// }
// }, "json");
log($(form).serializeArray());
js.showMessage('模拟保存成功');
// 数据格式化(初始化完成表单后调用)
$(".inputmask").inputmask();
}
});
//数据格式化(初始化完成表单后调用)
$(".inputmask").inputmask();
<script id="listselectTpl" type="text/template">//<!--<div>
<#form:listselect id="{{d.id}}" title="{{d.title}}" name="{{d.name}}" value="{{d.value}}"
labelName="{{d.labelName}}" labelValue="{{d.labelValue}}" url="{{d.url}}"
class="{{d.cssClass}}" btnClass="btn-sm" allowClear="true"
itemCode="{{d.itemCode}}" itemName="{{d.itemName}}"/>
</div>//--></script>
<script>
$("#inputForm").validate({
submitHandler: function(form){
// 数据格式化恢复(表单提交之前调用)
$('.inputmask').inputmask('remove');
// js.ajaxSubmitForm($(form), function(data){
// js.showMessage(data.message);
// if(data.result == Global.TRUE){
// js.closeCurrentTabPage(function(contentWindow){
// contentWindow.page();
// });
// }
// }, "json");
log($(form).serializeArray());
js.showMessage('模拟保存成功');
// 数据格式化(初始化完成表单后调用)
$(".inputmask").inputmask();
}
});
//数据格式化(初始化完成表单后调用)
$(".inputmask").inputmask();
</script>

View File

@@ -149,7 +149,7 @@
//初始化测试数据子表DataGrid对象
$("#testDataChildDataGrid").dataGrid({
data: ${toJson(testData.testDataChildList)},
data: "#{toJson(testData.testDataChildList)}",
datatype: "local", // 设置本地数据
autoGridHeight: function(){return 'auto'}, // 设置自动高度
@@ -161,7 +161,7 @@ $("#testDataChildDataGrid").dataGrid({
{header:'多行文本', name:'testTextarea', width:100, editable:true, edittype:'textarea', editoptions:{'maxlength':'200', 'class':'form-control', 'rows':'1'}},
{header:'下拉框', name:'testSelect', width:100,
editable:true, edittype:'select', editoptions:{'class':'form-control',
items: $.merge([{dictLabel:'&nbsp;',dictValue:''}], ${@DictUtils.getDictListJson('sys_menu_type')}),
items: $.merge([{dictLabel:'&nbsp;',dictValue:''}], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
js.select2(element).on("change",function(){$(this).resetValid()});
}
@@ -211,7 +211,7 @@ $("#testDataChildDataGrid").dataGrid({
editGridInputFormListName: 'testDataChildList', // 提交的数据列表名
editGridInputFormListAttrs: 'status,id,testSort,testData.id,testInput,testTextarea,testSelect,testSelectMultiple,testRadio,testCheckbox,testDate,testDatetime,testUser.userCode,testOffice.officeCode,testAreaCode,testAreaName,', // 提交数据列表的属性字段
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function(data){
}

View File

@@ -196,7 +196,7 @@
//初始化测试数据子表DataGrid对象
$("#testDataChildDataGrid").dataGrid({
data: ${toJson(testData.testDataChildList)},
data: "#{toJson(testData.testDataChildList)}",
datatype: "local", // 设置本地数据
autoGridHeight: function(){return 'auto'}, // 设置自动高度
@@ -221,7 +221,7 @@ $("#testDataChildDataGrid").dataGrid({
{header:'${text("多行文本")}', name:'testTextarea', width:100, editable:true, edittype:'textarea', editoptions:{'maxlength':'200', 'class':'form-control', 'rows':'1'}},
{header:'${text("下拉框")}', name:'testSelect', width:100,
editable:true, edittype:'select', editoptions:{'class':'form-control',
items: $.merge([{dictLabel:'&nbsp;',dictValue:''}], ${@DictUtils.getDictListJson('sys_menu_type')}),
items: $.merge([{dictLabel:'&nbsp;',dictValue:''}], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
js.select2(element).on("change",function(){$(this).resetValid()});
}
@@ -229,7 +229,7 @@ $("#testDataChildDataGrid").dataGrid({
},
{header:'${text("下拉多选")}', name:'testSelectMultiple', width:90, fixed: true,
editable:true, edittype:'select', editoptions:{multiple:true, 'class':'form-control',
items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
items: $.merge([], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
js.select2(element).on("change",function(){$(this).resetValid()});
}
@@ -237,7 +237,7 @@ $("#testDataChildDataGrid").dataGrid({
},
{header:'${text("单选框")}', name:'testRadio', width:135, fixed: true,
editable:true, edittype:'radio', editoptions:{'class':'form-control icheck',
items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
items: $.merge([], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
js.iCheck(element).on("ifChanged",function(){$(this).resetValid()});
}
@@ -245,7 +245,7 @@ $("#testDataChildDataGrid").dataGrid({
},
{header:'${text("复选框")}', name:'testCheckbox', width:135, fixed: true,
editable:true, edittype:'checkbox', editoptions:{'class':'form-control icheck',
items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
items: $.merge([], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
js.iCheck(element).on("ifChanged",function(){$(this).resetValid()});
}
@@ -364,7 +364,7 @@ $("#testDataChildDataGrid").dataGrid({
+'testRadio,testCheckbox,testDate,testDatetime,testUser.userCode,testOffice.officeCode,'
+'testAreaCode,testAreaName,testDataChild_file,testDataChild_file__del', // 提交数据列表的属性字段
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function(data){
// $('#jqgh_testDataChildDataGrid_rn').append('<a href="javascript:" onclick="'
// + '$(\'#testDataChildDataGridAddRowBtn\').click();">'

View File

@@ -211,7 +211,7 @@
//初始化测试数据子表DataGrid对象
$("#testDataChildDataGrid").dataGrid({
data: ${toJson(testData.testDataChildList)},
data: "#{toJson(testData.testDataChildList)}",
datatype: "local", // 设置本地数据
autoGridHeight: function(){return 'auto'}, // 设置自动高度
@@ -243,7 +243,7 @@ $("#testDataChildDataGrid").dataGrid({
return val;
},
editable:true, edittype:'select', editoptions:{'class':'form-control',
items: $.merge([{dictLabel:'&nbsp;',dictValue:''}], ${@DictUtils.getDictListJson('sys_menu_type')}),
items: $.merge([{dictLabel:'&nbsp;',dictValue:''}], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
js.select2(element).on("change",function(){$(this).resetValid()});
}
@@ -257,7 +257,7 @@ $("#testDataChildDataGrid").dataGrid({
return val;
},
editable:true, edittype:'select', editoptions:{multiple:true, 'class':'form-control',
items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
items: $.merge([], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
js.select2(element).on("change",function(){$(this).resetValid()});
}
@@ -271,7 +271,7 @@ $("#testDataChildDataGrid").dataGrid({
return val;
},
editable:true, edittype:'radio', editoptions:{'class':'form-control icheck',
items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
items: $.merge([], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
js.iCheck(element).on("ifChanged",function(){$(this).resetValid()});
}
@@ -279,13 +279,13 @@ $("#testDataChildDataGrid").dataGrid({
},
{header:'${text("复选框")}', name:'testCheckbox', width:135, fixed: true,
formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '${text("未知")}', true);
},
unformat: function(val, obj, cell){
return val;
},
editable:true, edittype:'checkbox', editoptions:{'class':'form-control icheck',
items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
items: $.merge([], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
js.iCheck(element).on("ifChanged",function(){$(this).resetValid()});
}
@@ -449,7 +449,7 @@ $("#testDataChildDataGrid").dataGrid({
+'testRadio,testCheckbox,testDate,testDatetime,testUser.userCode,testUser.userName,testOffice.officeCode,'
+'testOffice.officeName,testAreaCode,testAreaName,testDataChild_file,testDataChild_file__del', // 提交数据列表的属性字段
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function(data){
// $('#jqgh_testDataChildDataGrid_rn').append('<a href="javascript:" onclick="'
// + '$(\'#testDataChildDataGridAddRowBtn\').click();">'

View File

@@ -118,7 +118,7 @@
</div>
<% } %>
<script>
// 初始化DataGrid对象
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
@@ -129,16 +129,16 @@ $('#dataGrid').dataGrid({
}}},
{header:'${text("多行文本")}', name:'testTextarea', index:'a.test_textarea', width:150, align:"left"},
{header:'${text("下拉框")}', name:'testSelect', index:'a.test_select', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '${text("未知")}', true);
}},
{header:'${text("下拉多选")}', name:'testSelectMultiple', index:'a.test_select_multiple', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '${text("未知")}', true);
}},
{header:'${text("单选框")}', name:'testRadio', index:'a.test_radio', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '${text("未知")}', true);
}},
{header:'${text("复选框")}', name:'testCheckbox', index:'a.test_checkbox', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '${text("未知")}', true);
}},
{header:'${text("日期选择")}', name:'testDate', index:'a.test_date', width:150, align:"center"},
{header:'${text("日期时间")}', name:'testDatetime', index:'a.test_datetime', width:150, align:"center"},
@@ -147,13 +147,13 @@ $('#dataGrid').dataGrid({
{header:'${text("区域选择")}', name:'testAreaName', index:'a.test_area_code', width:150, align:"center"},
{header:'${text("区域名称")}', name:'testAreaName', index:'a.test_area_name', width:150, align:"left"},
{header:'${text("状态")}', name:'status', index:'a.status', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '${text("未知")}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_search_status')}", val, '${text("未知")}', true);
}},
{header:'${text("创建时间")}', name:'createDate', index:'a.create_date', firstsortorder:'desc', width:150, align:"center"},
{header:'${text("备注")}', name:'remarks', index:'a.remarks', width:150, align:"left"},
{header:'${text("操作")}', name:'actions', width:100, formatter: function(val, obj, row, act){
var actions = [];
//<% if(hasPermi('test:testData:edit')){ %>
//# if(hasPermi('test:testData:edit')){
actions.push('<a href="${ctx}/test/testData/form?id='+row.id+'" class="btnList" title="${text("编辑数据")}"><i class="fa fa-pencil"></i></a>&nbsp;');
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctx}/test/testData/disable?id='+row.id+'" class="btnList" title="${text("停用数据")}" data-confirm="${text("确认要停用该数据吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
@@ -161,7 +161,7 @@ $('#dataGrid').dataGrid({
actions.push('<a href="${ctx}/test/testData/enable?id='+row.id+'" class="btnList" title="${text("启用数据")}" data-confirm="${text("确认要启用该数据吗?")}"><i class="glyphicon glyphicon-ok-circle"></i></a>&nbsp;');
}
actions.push('<a href="${ctx}/test/testData/delete?id='+row.id+'" class="btnList" title="${text("删除数据")}" data-confirm="${text("确认要删除该数据吗?")}"><i class="fa fa-trash-o"></i></a>&nbsp;');
//<% } %>
//# }
return actions.join('');
}}
],
@@ -185,16 +185,16 @@ $('#dataGrid').dataGrid({
{header:'${text("单行文本")}', name:'testInput', width:150},
{header:'${text("多行文本")}', name:'testTextarea', width:150},
{header:'${text("下拉框")}', name:'testSelect', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '${text("未知")}', true);
}},
{header:'${text("下拉多选")}', name:'testSelectMultiple', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '${text("未知")}', true);
}},
{header:'${text("单选框")}', name:'testRadio', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '${text("未知")}', true);
}},
{header:'${text("复选框")}', name:'testCheckbox', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '${text("未知")}', true);
}},
{header:'${text("日期时间")}', name:'testDatetime', width:150, align:"center"},
{header:'${text("用户名称")}', name:'testUser.userName', sortable:false, width:150, align:"center"},
@@ -202,7 +202,7 @@ $('#dataGrid').dataGrid({
{header:'${text("区域名称")}', name:'testAreaName', width:150, align:"center"}
],
emptyDataHint: true, // 表格内没有数据的时候提示 “无数据显示” v4.1.7
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function(data){
$(window).resize();
}
@@ -212,7 +212,7 @@ $('#dataGrid').dataGrid({
multiSort: true, // 是否支持多列排序,给列指定 firstsortorder 可设定初次排序方式
emptyDataHint: true, // 表格内没有数据的时候提示 “无数据显示” v4.1.7
// 加载成功后执行事件
//# // 加载成功后执行事件
ajaxSuccess: function(data){
// // 无数据显示v4.1.7 之前版本
// if (data.count == 0){

View File

@@ -48,7 +48,7 @@
</div>
<% } %>
<script>
// 初始化DataGrid对象
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
@@ -58,13 +58,13 @@ $('#dataGrid').dataGrid({
{header:'${text("排序号")}', name:'treeSort', index:'a.tree_sort', width:150, align:"center"},
{header:'${text("节点名称")}', name:'treeName', index:'a.tree_name', width:150, align:"left"},
{header:'${text("状态")}', name:'status', index:'a.status', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '${text("未知")}', true);
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_search_status')}", val, '${text("未知")}', true);
}},
{header:'${text("创建时间")}', name:'createDate', index:'a.create_date', width:150, align:"center"},
{header:'${text("备注信息")}', name:'remarks', index:'a.remarks', width:150, align:"left"},
{header:'${text("操作")}', name:'actions', width:120, formatter: function(val, obj, row, act){
var actions = [];
//<% if(hasPermi('test:testTree:edit')){ %>
//# if(hasPermi('test:testTree:edit')){
actions.push('<a href="${ctx}/test/testTree/form?treeCode='+row.treeCode+'" class="btnList" title="${text("编辑数据")}"><i class="fa fa-pencil"></i></a>&nbsp;');
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctx}/test/testTree/disable?treeCode='+row.treeCode+'" class="btnList" title="${text("停用数据")}" data-confirm="${text("确认要停用该数据吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
@@ -73,19 +73,20 @@ $('#dataGrid').dataGrid({
}
actions.push('<a href="${ctx}/test/testTree/delete?treeCode='+row.treeCode+'" class="btnList" title="${text("删除数据")}" data-confirm="${text("确认要删除该数据及所有子数据吗?")}" data-deltreenode="'+row.id+'"><i class="fa fa-trash-o"></i></a>&nbsp;');
actions.push('<a href="${ctx}/test/testTree/form?parentCode='+row.id+'" class="btnList" title="${text("新增下级数据")}"><i class="fa fa-plus-square"></i></a>&nbsp;');
//<% } %>
//# }
return actions.join('');
}}
],
treeGrid: true, // 启用树结构表格
defaultExpandLevel: 0, // 默认展开的层次
expandNodeClearPostData: 'treeName,remarks,', // 展开节点清理请求参数数据(一般设置查询条件的字段属性,否则在查询后,不能展开子节点数据) // 加载成功后执行事件
expandNodeClearPostData: 'treeName,remarks,', // 展开节点清理请求参数数据(一般设置查询条件的字段属性,否则在查询后,不能展开子节点数据)
//# // 加载成功后执行事件
ajaxSuccess: function(data){
}
});
// 修复树表数据包含字段parentCodes、treeLeaf、treeLevel、treeSorts、treeNames
//# // 修复树表数据包含字段parentCodes、treeLeaf、treeLevel、treeSorts、treeNames
$("#btnFixTreeData").click(function(){
js.ajaxSubmit("${ctx}/test/testTree/fixTreeData", function(data){
js.showMessage(data.message);