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);
}}