ZhiYeJianKang/职业健康平台后端/target/dzzyb/static/quxian/pjbglb.html
2025-02-20 15:25:59 +08:00

164 lines
3.6 KiB
HTML
Raw Permalink 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.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>评价报告列表</title>
<link rel="stylesheet" href="js/layui-v2.5.6/layui/css/layui.css" media="all">
<style type="text/css">
.layui-btn-primary {
border: 1px solid #C9C9C9;
background-color: #01b9dd !important;
color: white !important;
}
.inputdata {
height: 30px;
}
</style>
<script>
function ckzy(data) {
layer.open({
type: 2,
area: ['50%', '70%'],
title: "查看",
maxmin: true,
content: 'pjbglbform.html',
btn: ['关闭'],
yes: function(index) {
layer.close(index);
}
})
}
function qjcx() {
layer.open({
type: 2,
area: ['50%', '70%'],
title: "评价报告列表",
maxmin: true,
content: 'pjbglbqjcx.html',
tn: ['关闭'],
yes: function(index) {
layer.close(index);
}
})
}
</script>
</head>
</head>
<body>
<div class="row">
<div class="col-sm-12">
<form class="form-inline">
<div class="form-group">
<span>查询时间:</span>
<input type="text" class="laydate-icon form-control layer-date input-sm inputdata" id="test1">
<label>--</label>
<input type="text" class="laydate-icon form-control layer-date input-sm inputdata" id="test2">
<a class="layui-btn " onclick="qjcx()">区间查询</a>
</div>
</form>
</div>
</div>
<!-- <button type="button" class="layui-btn">添加</button>
<button type="button" class="layui-btn">修改</button>
<button type="button" class="layui-btn">删除</button> -->
<table id="demo" class="layui-hide" lay-filter="xk"></table>
<script type="text/html" id="barDemo">
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
</script>
<script src="js/layui-v2.5.6/layui/layui.all.js"></script>
<script>
layui.use('table', function() {
var table = layui.table;
table.render({
elem: '#demo',
data: [{
"a1": "030005",
"a2": "人事部",
"a3": "2020-03-29",
"a4": "员工设备",
"a5": "合格",
"a6": "现状评价",
"a7": "一般"
},
{
"a1": "030006",
"a2": "售前部",
"a3": "2020-03-22",
"a4": "产品是否达标",
"a5": "合格",
"a6": "预评价",
"a7": "一般"
},
{
"a1": "030007",
"a2": "行政部",
"a3": "2020-03-10",
"a4": "设备",
"a5": "合格",
"a6": "现状评价",
"a7": "一般"
},
{
"a1": "030008",
"a2": "技术部",
"a3": "2020-03-02",
"a4": "设备排污、噪音",
"a5": "不合格",
"a6": "现状评价",
"a7": "严重"
},
],
cellMinWidth: 80 //全局定义常规单元格的最小宽度
,
page: true //开启分页
,
cols: [
[ //表头
{
field: 'a2',
title: '评价部门'
}, {
field: 'a3',
title: '评价日期'
}, {
field: 'a4',
title: '评价项目'
}, {
field: 'a5',
title: '评价结果'
}, {
field: 'a6',
title: '评价类别'
}, {
field: 'a7',
title: '危害程度'
}, {
fixed: 'right',
title: '查看',
width: 165,
align: 'center',
toolbar: '#barDemo'
}
]
]
});
//监听行工具事件
table.on('tool(xk)', function(obj) { //注tool 是工具条事件名test 是 table 原始容器的属性 lay-filter="对应的值"
var data = obj.data //获得当前行数据
,
layEvent = obj.event; //获得 lay-event 对应的值
if (layEvent === 'detail') {
ckzy();
}
});
});
</script>
</body>
</html>