|
|
<!DOCTYPE html>
|
|
|
<html lang="en">
|
|
|
<head>
|
|
|
<meta charset="UTF-8">
|
|
|
<title>设备信息页</title>
|
|
|
<link rel="stylesheet" href="/static/layui/css/layui.css">
|
|
|
</head>
|
|
|
<body>
|
|
|
<!--<body background="/static/layui/医疗设备.jpg" style=" background-repeat:no-repeat ;background-size:100% 100%;
|
|
|
background-attachment: fixed;">-->
|
|
|
<div align="center">
|
|
|
<br>
|
|
|
<a href="start">返回导航页</a>
|
|
|
<p><font size="5" face="arial" color="red">设备相关信息</font></p>
|
|
|
<br>
|
|
|
<br>
|
|
|
<table id='tabledemo' lay-filter="test">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
<th lay-data="{field:'shebeihao', width:100}">设备号</th>
|
|
|
<th lay-data="{field:'shebeileixing', width:100}">设备类型</th>
|
|
|
<th lay-data="{field:'shifoushiyong', width:80, sort:true}">是否使用</th>
|
|
|
<th lay-data="{field:'yongyunagehuanzhe_huanzhehao_ ', width:80, sort:true}">属于哪个患者</th>
|
|
|
<th lay-data="{fixed: 'right', width: 165, align:'center', toolbar: '#barDemo'}">操作</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
{% for item in device_list %}
|
|
|
<tr>
|
|
|
<td>{{ item.shebeihao }}</td>
|
|
|
<td>{{ item.shebeileixing }}</td>
|
|
|
<td>{{ item.shifoushiyong }}</td>
|
|
|
<td>{{ item.yongyunagehuanzhe_huanzhehao_ }}</td>
|
|
|
|
|
|
</tr>
|
|
|
{% endfor %}
|
|
|
</tbody>
|
|
|
</table>
|
|
|
</div>
|
|
|
<script type="text/html" id="barDemo">
|
|
|
<a class="layui-btn layui-btn-xs" lay-event="add">添加</a>
|
|
|
<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
|
|
|
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
|
|
|
</script>
|
|
|
|
|
|
|
|
|
<script src="/static/layui/layui.js"></script>
|
|
|
<script>
|
|
|
|
|
|
layui.use('table', function () {
|
|
|
var table = layui.table;
|
|
|
|
|
|
//转换静态表格
|
|
|
table.init('test', {
|
|
|
height: 1000,
|
|
|
width: 600//设置高度
|
|
|
, limit: 100
|
|
|
});
|
|
|
table.on('tool(test)', function (obj) { //注:tool 是工具条事件名,test 是 table 原始容器的属性 lay-filter="对应的值"
|
|
|
var data = obj.data //获得当前行数据
|
|
|
, layEvent = obj.event; //获得 lay-event 对应的值
|
|
|
if (layEvent === 'detail') {
|
|
|
layer.msg('查看操作');
|
|
|
} else if (layEvent === 'del') {
|
|
|
layer.confirm('真的删除行么', function (index) {
|
|
|
location.href = '/delete_gen?type=device&id=' + data.shebeihao;
|
|
|
});
|
|
|
} else if (layEvent === 'edit') {
|
|
|
location.href = '/update_gen?type=device&id=' + data.shebeihao ;
|
|
|
} else if (layEvent === 'add') {
|
|
|
location.href = '/insert_device?type=device&id=' + data.shebeihao ;
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
//监听行工具事件
|
|
|
|
|
|
|
|
|
</script>
|
|
|
</body>
|
|
|
</html> |