itcast.crm.ui/Areas/admin/Views/menus/Index.cshtml
(完整代码) 1KB@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Index</title>
<script type="text/javascript">
$(function () {
GetList();
})
function GetList() {
$("#tt").treegrid({
url: '/admin/menus/GetList',
method: 'get',
rownumbers: true,
showFooter: true,
idField: 'mID',
treeField: 'mName',
animate: true,
onBeforeExpand: function (row) {
var chid = $('#tt').treegrid('getChildren', row.mID);
if (chid.length > 0) return;
$.ajax({
url: "/admin/menus/GetList",
async: false,
data: { pamar: row.mID },
success: function (_data) {
$('#tt').treegrid('append', {
parent: row.mID, // 节点有一个'id'值,定义是通过'idField'属性
data: _data
});
}
});
},
columns: [[
{ field: 'mName', title: '菜单名称', width: 180 },
{ field: 'url', title: 'mUrl', width: 180 },
{ field: 'mArea', title: '区域', width: 180 },
{ field: 'mController', title: '控制器', width: 180 },
{ field: 'mAction', title: '方法', width: 180 },
{ field: 'mPicname', title: '图标', width: 180 },
{ field: 'mStatus', title: '状态', width: 180 }
]]
});
}
</script>
</head>
<body>
<table id="tt" style="width:100%;height:100%"></table>
</body>
</html>
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
