增加功能:菜单管理页面增加应用程序过滤条件 closed #IT3AK
This commit is contained in:
parent
58daf5ad89
commit
6cf072d4c3
|
@ -1,5 +1,6 @@
|
|||
using Bootstrap.DataAccess;
|
||||
using Longbow.Web.Mvc;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bootstrap.Admin.Query
|
||||
|
@ -13,18 +14,27 @@ namespace Bootstrap.Admin.Query
|
|||
///
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string ParentName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Category { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string IsResource { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string AppCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
@ -49,6 +59,10 @@ namespace Bootstrap.Admin.Query
|
|||
{
|
||||
data = data.Where(t => t.IsResource.ToString() == IsResource);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(AppCode))
|
||||
{
|
||||
data = data.Where(t => t.Application.Equals(AppCode, StringComparison.OrdinalIgnoreCase));
|
||||
}
|
||||
var ret = new QueryData<object>();
|
||||
ret.total = data.Count();
|
||||
switch (Sort)
|
||||
|
|
|
@ -56,6 +56,18 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-group-dropdown col-sm-6 col-lg-auto">
|
||||
<label class="control-label" for="app">所属应用</label>
|
||||
<div class="dropdown">
|
||||
<button id="sel_app" class="btn btn-info dropdown-select dropdown-toggle" data-toggle="dropdown" data-default-val="0">未设置</button>
|
||||
<div class="dropdown-menu">
|
||||
@foreach (var kv in Model.Applications)
|
||||
{
|
||||
<a href="#" data-val="@kv.Key">@kv.Value</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-lg-auto flex-lg-fill justify-content-lg-end">
|
||||
<button type="button" id="btn_query" class="btn btn-primary btn-fill"><i class="fa fa-search" aria-hidden="true"></i><span>查询</span></button>
|
||||
</div>
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
},
|
||||
smartTable: {
|
||||
sortName: 'Order',
|
||||
queryParams: function (params) { return $.extend(params, { parentName: $('#txt_parent_menus_name').val(), name: $("#txt_menus_name").val(), category: $('#sel_menus_category').val(), isresource: $('#sel_menus_res').val() }); }, //传递参数(*)
|
||||
queryParams: function (params) { return $.extend(params, { parentName: $('#txt_parent_menus_name').val(), name: $("#txt_menus_name").val(), category: $('#sel_menus_category').val(), isresource: $('#sel_menus_res').val(), appCode: $('#sel_app').val() }); }, //传递参数(*)
|
||||
exportOptions: {
|
||||
fileName: "菜单数据",
|
||||
ignoreColumn: [0, 1]
|
||||
|
|
Loading…
Reference in New Issue