增加所属应用列排序功能

This commit is contained in:
Argo-Lenovo 2017-03-03 15:28:46 +08:00
parent 8071d7baea
commit 46a633e542
2 changed files with 7 additions and 0 deletions

View File

@ -64,6 +64,9 @@ namespace Bootstrap.Admin.Models
case "IsResource": case "IsResource":
data = Order == "asc" ? data.OrderBy(t => t.IsResource) : data.OrderByDescending(t => t.IsResource); data = Order == "asc" ? data.OrderBy(t => t.IsResource) : data.OrderByDescending(t => t.IsResource);
break; break;
case "ApplicationCode":
data = Order == "asc" ? data.OrderBy(t => t.ApplicationCode) : data.OrderByDescending(t => t.ApplicationCode);
break;
default: default:
break; break;
} }

View File

@ -121,6 +121,10 @@
title: "菜单类型", field: "IsResource", sortable: true, formatter: function (value, row, index) { title: "菜单类型", field: "IsResource", sortable: true, formatter: function (value, row, index) {
return value == 0 ? "菜单" : "资源"; return value == 0 ? "菜单" : "资源";
} }
}, {
title: "所属应用", field: "ApplicationCode", sortable: true, formatter: function (value, row, index) {
return $('#app').next().find('[data-val="' + value + '"]:first').text();
}
} }
] ]
}); });