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

167 lines
4.5 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.

<%@ 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;
}
.layui-input,
.layui-textarea {
display: block;
width: 10% !important;
padding-left: 10px;
}
.form-inline .form-group {
display: inline-block !important;
margin-bottom: 0 !important;
vertical-align: middle !important;
}
.inputdata {
height: 30px;
}
.gray-bg {
background-color: #f3f3f4 !important;
}
</style>
<script type="text/javascript">
function ckksjl() {
layer.open({
type: 2,
area: ['100%', '100%'],
title: "查看详情",
maxmin: true,
content: '${ctx}/zyb/logon/yjtjszform',
tn: ['关闭'],
yes: function(index) {
layer.close(index);
}
})
}
function qjcx() {
layer.open({
type: 2,
area: ['100%', '100%'],
title: "区间查询",
maxmin: true,
content: '${ctx}/zyb/logon/yjtjszqjcx',
tn: ['关闭'],
yes: function(index) {
layer.close(index);
}
})
}
</script>
</head>
<body class="gray-bg">
<div class="row">
<div class="col-sm-12">
<form class="form-inline">
<div style="margin-left: 20px;" 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>
<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="${ctxStatic}/jquery/jquery-2.1.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
layui.use('table', function() {
<%--$.get('${ctx}/zyb/logon/getWhCdList', function(data) {--%>
<%--console.log(data)--%>
<%--})--%>
var table = layui.table;
table.render({
elem: '#demo',
url: '${ctx}/zyb/logon/getWhCdList',//数据接口[123, 265, 372, 274][84, 182, 213, 56]
// ,
// "data":[{"id": "090001","yrdw": "德州第一中学","xzq": "德州市","zywsfzr": "刘俊义","fzrdh": "0534-2621594","yjxm":"体检预警","yjs": "0"},
// {"id": "090003","yrdw": "山东福田药业有限公司","xzq": "德州市->禹城市","zywsfzr": "刘勇","fzrdh": "0534-7266172","yjxm":"监测预警","yjs": "0"},
// {"id": "090004","yrdw": "德州市鑫荣气化有限公司","xzq": "德州市->宁津县","zywsfzr": "李书赞","fzrdh": "18853483850","yjxm":"评价预警","yjs": "3"},
// {"id": "090002","yrdw": "山东凯力德机械","xzq": "德州市->宁津县","zywsfzr": "刘霞","fzrdh": "0534-5221355","yjxm":"申报预警","yjs": "1"}],
cellMinWidth: 80 //全局定义常规单元格的最小宽度
,
page: false //开启分页
,
cols:[
[ //表头
{
field: 'yrdwName',
title: '用人单位名称'
}, {
field: 'areaName',
title: '行政区'
}, {
field: 'zywsfzr',
title: '职业卫生负责人'
}, {
field: 'fzrdh',
title: '负责人电话'
}
, {
field: 'yjxm',
title: '预警项目',
width: 80,
}, {
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') {
ckksjl();
}
});
});
layui.use('laydate', function() {
var laydate = layui.laydate;
//执行一个laydate实例
laydate.render({
elem: '#test1' //指定元素
});
laydate.render({
elem: '#test2' //指定元素
});
});
</script>
</body>
</html>