ZhiYeJianKang/职业健康平台后端/target/dzzyb/webpage/modules/zyb/qylb.jsp
2025-02-20 15:25:59 +08:00

91 lines
2.5 KiB
Plaintext
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.

<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<!DOCTYPE html>
<html>
<head>
<title>企业数</title>
<!-- 引入 echarts.js -->
<link rel="stylesheet" href="/dzzyb/static/js/layui-v2.5.6/layui/css/layui.css" media="all">
<script src="/dzzyb/static/echarts/echarts.min.js" charset="utf-8"></script>
<script src="/dzzyb/static/js/layui-v2.5.6/layui/layui.all.js"></script>
<style type="text/css">
.layui-btn-primary {
border: 1px solid #C9C9C9;
background-color: #01b9dd !important;
color: white !important;
}
.gray-bg {
background-color: #f3f3f4 !important;
}
</style>
</head>
<body class="gray-bg">
<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 type="text/javascript">
layui.use('table', function() {
var table = layui.table;
table.render({
elem: '#demo',
// url: 'files/jclb.json' //数据接口[123, 265, 372, 274][84, 182, 213, 56]
// ,
"data":${enterpriseJson},
cellMinWidth: 80 //全局定义常规单元格的最小宽度
,
page: true //开启分页
,
cols: [
[ //表头
{
field: 'companyName',
title: '企业名称'
},{
field: 'areaName',
title: '企业地址'
}, {
field: 'cfqkCount',
title: '尘肺情况'
}, {
field: 'pxqkCount',
title: '培训人数'
}, {
field: 'tiqkCount',
title: '体检人数'
}, {
field: 'pjqkCount',
title: '评价情况'
}, {
field: 'jcqkCount',
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') {
layer.msg('查看详情');
}
});
});
</script>
</body>
</html>