ComplianceServer/oldcode/Core.Web/Views/InnerUserRole/Index.cshtml

68 lines
2.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@{
ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<div class="x-body">
<table class="layui-hide" id="tabl1" lay-filter="tabl1"></table>
</div>
<script>
var selectRow = {};
layui.use(['table', 'layer'], function () {
var table = layui.table,
layer = layui.layer;
table.render({
id: 'roleTable',//列表别名ID
elem: '#tabl1',//表ID
url: '/Role/Index',
method: 'POST',
cols: [[
{ field: 'ROLEID', title: '角色ID' }
, { field: 'RNAME', title: '角色名称' }
, { field: 'CODE', title: '编码' }
, { field: 'SORTID', title: '排序' }
, { field: 'CREATEUSER', title: '创建人' }
, { field: 'CTIME', title: '创建时间' }
, { field: 'UPDATEUSER', title: '修改人' }
, { field: 'UTIME', title: '修改时间' }
]]
, page: { //支持传入 laypage 组件的所有参数某些参数除外jump/elem - 详见文档
layout: ['limit', 'count', 'prev', 'page', 'next', 'skip', 'refresh'] //自定义分页布局
//,curr: 5 //设定初始在第 5 页
, groups: 5 //只显示 1 个连续页码
}
});
//监听行单击事件
table.on('row(tabl1)', function (obj) {
var data = obj.data;
obj.tr.addClass('layui-table-click').siblings().removeClass('layui-table-click');
selectRow = data;
});
var active = {
audit: function () {
if (selectRow.id === "undefined" || selectRow.id == null) {
layer.alert("请先选中一条记录!", { title: '提示' });
return;
}
layer.open({
type: 2,
content: '/OrderPay/Audit?id=' + selectRow.id,
area: ['650px', '450px']
});
}
};
$('.layui-btn-group .layui-btn').on('click', function () {
var othis = $(this), method = othis.data('method');
active[method] ? active[method].call(this, othis) : '';
});
});
</script>