You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
3.5 KiB

5 years ago
<!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:'yishenggongzuozhenghao', width:100}">医生号</th>
<th lay-data="{field:'xingming', width:100}">姓名</th>
<th lay-data="{field:'xingbie', width:80, sort:true}">性别</th>
<th lay-data="{field:'nianling', width:80, sort:true}">年龄</th>
<th lay-data="{field:'dianhua', width:80, sort:true}">电话</th>
<th lay-data="{field:'shifoudushengzinv', width:80, sort:true}">是否独生子女</th>
<th lay-data="{field:'shifoudangyuan', width:80, sort:true}">是否党员</th>
<th lay-data="{field:'gongzuonianling', width:80, sort:true}">工作年龄</th>
<th lay-data="{field:'yiyuanrenyuandegongzuoleixingdaihao', width:80, sort:true}">工作类型代号</th>
<th lay-data="{fixed: 'right', width: 165, align:'center', toolbar: '#barDemo'}">操作</th>
</tr>
</thead>
<tbody>
{% for item in doctor_list %}
<tr>
<td>{{ item.yishenggongzuozhenghao }}</td>
<td>{{ item.xingming }}</td>
<td>{{ item.xingbie }}</td>
<td>{{ item.nianling }}</td>
<td>{{ item.dianhua }}</td>
<td>{{ item.shifoudushengzinv }}</td>
<td>{{ item.shifoudangyuan }}</td>
<td>{{ item.gongzuonianling }}</td>
<td>{{ item.yiyuanrenyuandegongzuoleixingdaihao }}</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=doctor&id=' + data.yishenggongzuozhenghao;
});
} else if (layEvent === 'edit') {
location.href = '/update_gen?type=doctor&id=' + data.yishenggongzuozhenghao;
} else if (layEvent === 'add') {
location.href = '/insert_device?type=doctor&id=' + data.yishenggongzuozhenghao ;
}
});
});
//监听行工具事件
</script>
</body>
</html>