61,112
社区成员
发帖
与我相关
我的任务
分享
@{
ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<script type="text/javascript" src="~/Content/js/jquery-easyui-1.3.2/jquery.easyui.min.js"></script>
<script type="text/javascript" src="~/Content/js/custom/riskview.js"></script>
<link rel="stylesheet" href="~/Content/js/jquery-easyui-1.3.2/themes/icon.css" type="text/css" />
<link rel="stylesheet" href="~/Content/js/jquery-easyui-1.3.2/themes/default/easyui.css" type="text/css" />
<style type="text/css">
.datagrid-row
{
height:35px;
}
html, body
{
overflow:scroll;
}
</style>
</head>
<body>
<div class="z-toolbar">
<a id="a_query" href="#" plain="true" class="easyui-linkbutton" icon="icon-search" title="查询">查询</a>
</div>
<div id="condition" style="margin:10px 0 200px 0">
<div class="grid_1 lbl">整改内容</div>
<div class="grid_2 val"><input type="text" style="width:300px" class="z-txt easyui-autocomplete autocomplete validatebox-text" /></div>
</div>
<table id="dg"></table>
</body>
</html>
$(function () {
getRiskData();
})
function getRiskData() {
$('#dg').datagrid({
url: "/mms/RiskView/GetRiskData",
rownumbers: true,
singleSelect: true,
fit: true,
striped: true,
nowrap: false,
onSelect: function (rowIndex) {
$(this).datagrid("unselectRow", rowIndex);
},
columns: [[{
title: '内容',
field: 'RiskContent',
width: fixWidth(0.3)
}, {
title: '隐患级别',
field: 'RiskLevel',
align: "center",
width: fixWidth(0.1)
}, {
title: '整改日期',
field: 'CorrectiveDate',
align: "center",
width: fixWidth(0.1)
}, {
title: '责任单位',
field: 'ResponsibleDept',
align: "center",
width: fixWidth(0.1)
}, {
title: '整改责任人',
field: 'ResponsiblePerson',
align: "center",
width: fixWidth(0.1)
}, {
title: '督查落实人',
field: 'ImplementPerson',
align: "center",
width: fixWidth(0.1)
}, {
title: '整改落实情况',
field: 'ImplementDetail',
width: fixWidth(0.1)
}]],
onLoadSuccess: function (data) {
// alert(data);
}
})
}
function fixWidth(percent) {
return document.documentElement.clientWidth * percent; //这里你可以自己做调整
}