查询条件如区域、公司、配置、机构、岗位、栏目、站点、分类等显示编码使用 like 查询,等其它功能查询细节优化
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
<% layout('/layouts/default.html', {title: '栏目管理', libs: ['layout','zTree']}){ %>
|
||||
<div class="ui-layout-west">
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
<div class="box-header">
|
||||
<div class="box-title">
|
||||
<i class="fa icon-grid"></i> ${text('栏目管理')}
|
||||
</div>
|
||||
<div class="box-tools pull-right">
|
||||
<% if(hasPermi('bpm:bpmCategory:edit')){ %>
|
||||
<button type="button" class="btn btn-box-tool addTabPage" data-href="${ctx}/cms/category/list" title="${text('栏目管理')}"><i class="fa fa-edit"></i></button>
|
||||
<% } %>
|
||||
<button type="button" class="btn btn-box-tool" id="btnExpand" title="${text('展开')}" style="display:none;"><i class="fa fa-chevron-up"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" id="btnCollapse" title="${text('折叠')}"><i class="fa fa-chevron-down"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" id="btnRefresh" title="${text('刷新')}"><i class="fa fa-refresh"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-layout-content">
|
||||
<div id="tree" class="ztree"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-layout-center">
|
||||
<iframe id="mainFrame" name="mainFrame" class="ui-layout-content p0"
|
||||
src="${ctx}/cms/category/list"></iframe>
|
||||
</div>
|
||||
<% } %>
|
||||
<script>
|
||||
//# // 初始化布局
|
||||
$('body').layout({
|
||||
west__initClosed: $(window).width() <= 767, // 是否默认关闭
|
||||
west__size: 190
|
||||
});
|
||||
//# // 主页框架
|
||||
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}/cms/category/treeData"},
|
||||
callback:{onClick:function(event, treeId, treeNode){
|
||||
tree.expandNode(treeNode);
|
||||
//win.$('button[type=reset]').click();
|
||||
win.$('#categoryCode').val(treeNode.id);
|
||||
win.page();
|
||||
}}
|
||||
}, tree, loadTree = function(){
|
||||
js.ajaxSubmit(setting.async.url+"?___t="+new Date().getTime(), {
|
||||
parentCode:'${parameter.parentCode!}'}, function(data){
|
||||
tree = $.fn.zTree.init($("#tree"), setting, data);
|
||||
var level = -1, nodes;
|
||||
while (++level <= 1) {
|
||||
nodes = tree.getNodesByParam("level", level);
|
||||
if (nodes.length > 10) { break; }
|
||||
for(var i=0; i<nodes.length; i++) {
|
||||
tree.expandNode(nodes[i], true, false, false);
|
||||
}
|
||||
}
|
||||
}, null, null, js.text('loading.message'));
|
||||
};loadTree();
|
||||
//# // 工具栏按钮绑定
|
||||
$('#btnExpand').click(function(){
|
||||
tree.expandAll(true);
|
||||
$(this).hide();
|
||||
$('#btnCollapse').show();
|
||||
});
|
||||
$('#btnCollapse').click(function(){
|
||||
tree.expandAll(false);
|
||||
$(this).hide();
|
||||
$('#btnExpand').show();
|
||||
});
|
||||
$('#btnRefresh').click(function(){
|
||||
loadTree();
|
||||
});
|
||||
//调用子页分页函数
|
||||
function page(){
|
||||
win.page();
|
||||
}
|
||||
</script>
|
||||
@@ -32,28 +32,35 @@
|
||||
<#form:form id="searchForm" model="${category}" action="${ctx}/cms/category/listData" method="post" class="form-inline "
|
||||
data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
|
||||
<#form:hidden path="site.siteCode" maxlength="64" class="form-control width-120" />
|
||||
<#form:hidden path="categoryCode" />
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('栏目名称')}:</label>
|
||||
<label class="control-label">${text('编码')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="categoryName" maxlength="100" class="form-control width-120" />
|
||||
<#form:input path="categoryCode_like" maxlength="100" class="form-control width-90" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('模块类型')}:</label>
|
||||
<label class="control-label">${text('名称')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="moduleType" maxlength="50" class="form-control width-120" />
|
||||
<#form:input path="categoryName" maxlength="100" class="form-control width-90" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('模型')}:</label>
|
||||
<div class="control-inline width-90">
|
||||
<#form:select path="moduleType" dictType="cms_module_type" blankOption="true" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('状态')}:</label>
|
||||
<div class="control-inline width-120">
|
||||
<div class="control-inline width-90">
|
||||
<#form:select path="status" dictType="sys_search_status" blankOption="true" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('备注信息')}:</label>
|
||||
<label class="control-label">${text('备注')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="remarks" maxlength="500" class="form-control width-120" />
|
||||
<#form:input path="remarks" maxlength="500" class="form-control width-90" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -74,18 +81,24 @@ $('#dataGrid').dataGrid({
|
||||
{header:'${text("名称")}', name:'categoryName', index:'a.category_name', width:250, align:"left", frozen:true, formatter: function(val, obj, row, act){
|
||||
return '( '+row.categoryCode+' ) '+'<a href="${ctx}/cms/category/form?categoryCode='+row.categoryCode+'" class="btnList" data-title="${text("编辑栏目表")}">'+(val||row.id)+'</a>';
|
||||
}},
|
||||
{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:'moduleType', index:'a.module_type', width:100, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel("#{@DictUtils.getDictListJson('cms_module_type')}", val, '未知', true);
|
||||
}},
|
||||
{header:'${text("排序")}', name:'treeSort', index:'a.tree_sort', width:60, 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);
|
||||
}},
|
||||
{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);
|
||||
}},
|
||||
{header:'${text("展现方式")}', name:'showModes', index:'a.show_modes', width:150, fixed:true, align:"center", formatter: function(val, obj, row, act){
|
||||
{header:'${text("展现方式")}', name:'showModes', index:'a.show_modes', width:90, fixed:true, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel("#{@DictUtils.getDictListJson('cms_show_modes')}", val, '未知', true);
|
||||
}},
|
||||
{header:'${text("操作")}', name:'actions', width:150, formatter: function(val, obj, row, act){
|
||||
{header:'${text("状态")}', name:'status', index:'a.status', width:90, fixed:true, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_status')}", val, '未知', true);
|
||||
}},
|
||||
{header:'${text("备注")}', name:'remarks', index:'a.remarks', width:100, align:"left"},
|
||||
{header:'${text("操作")}', name:'actions', width:180, formatter: function(val, obj, row, act){
|
||||
var actions = [];
|
||||
//# 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> ');
|
||||
@@ -109,10 +122,13 @@ $('#dataGrid').dataGrid({
|
||||
],
|
||||
treeGrid: true, // 启用树结构表格
|
||||
defaultExpandLevel: 0, // 默认展开的层次
|
||||
expandNodeClearPostData: 'categoryName,siteCode,moduleType,image,href,target,keywords,description,inMenu,inList,showModes,isNeedAudit,isCanComment,customListView,customContentView,viewConfig,status,remarks,', // 展开节点清理请求参数数据(一般设置查询条件的字段属性,否则在查询后,不能展开子节点数据)
|
||||
expandNodeClearPostData: 'categoryCode,categoryName,siteCode,moduleType,image,href,target,keywords,description,inMenu,inList,showModes,isNeedAudit,isCanComment,customListView,customContentView,viewConfig,status,remarks,', // 展开节点清理请求参数数据(一般设置查询条件的字段属性,否则在查询后,不能展开子节点数据)
|
||||
//# // 加载成功后执行事件
|
||||
ajaxSuccess: function(data){
|
||||
|
||||
if ($('#categoryCode').val() != ''){
|
||||
$('#categoryCode').val('');
|
||||
$('#btnExpandTreeNode').click();
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user