<!DOCTYPE html>
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
<head>
|
<th:block th:include="include :: header('指纹读头列表')" />
|
</head>
|
<body class="gray-bg">
|
<div class="container-div">
|
<div class="row">
|
<div class="col-sm-12 search-collapse">
|
<form id="formId">
|
<div class="select-list">
|
<ul>
|
<li>
|
门名称:<input type="text" name="doorName"/>
|
</li>
|
<li>
|
区域名称:<input type="text" name="areaName"/>
|
</li>
|
<!--<li>-->
|
<!--<label>品牌:</label>-->
|
<!--<input type="text" name="brand"/>-->
|
<!--</li>-->
|
<!--<li>-->
|
<!--<label>型号:</label>-->
|
<!--<input type="text" name="model"/>-->
|
<!--</li>-->
|
<li>
|
控制读头标识:<input type="text" name="identification"/>
|
</li>
|
<li>
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
</li>
|
</ul>
|
</div>
|
</form>
|
</div>
|
|
<div class="btn-group-sm" id="toolbar" role="group">
|
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="station:head:add">
|
<i class="fa fa-plus"></i> 添加
|
</a>
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="station:head:remove">
|
<i class="fa fa-remove"></i> 删除
|
</a>
|
</div>
|
<div class="col-sm-12 select-table table-striped">
|
<table id="bootstrap-table"></table>
|
</div>
|
</div>
|
</div>
|
<input id="teamId" type="hidden">
|
<th:block th:include="include :: footer" />
|
<script th:inline="javascript">
|
var editFlag = [[${@permission.hasPermi('station:head:edit')}]];
|
var removeFlag = [[${@permission.hasPermi('station:head:remove')}]];
|
var prefix = ctx + "station/head";
|
|
$(function() {
|
var options = {
|
url: prefix + "/list",
|
createUrl: prefix + "/add",
|
updateUrl: prefix + "/edit/{id}",
|
removeUrl: prefix + "/remove",
|
exportUrl: prefix + "/export",
|
modalName: "指纹读头",
|
columns: [{
|
checkbox: true
|
},
|
{
|
field: 'id',
|
title: 'id',
|
visible: false
|
},
|
{
|
field: 'doorId',
|
title: '门id',
|
visible: false
|
},
|
{
|
field: 'doorName',
|
title: '门的名字'
|
},
|
{
|
field: 'areaId',
|
title: '区域父id',
|
visible: false
|
},
|
{
|
field: 'areaName',
|
title: '区域名称'
|
},
|
{
|
field: 'ipOrOther',
|
title: 'IP地址或其他标识'
|
},
|
{
|
field: 'port',
|
title: 'port'
|
},
|
// {
|
// field: 'brand',
|
// title: '品牌'
|
// },
|
// {
|
// field: 'model',
|
// title: '型号'
|
// },
|
{
|
field: 'direction',
|
title: '进门/出门',
|
formatter : function (value, row, index) {
|
if(value == 0) {
|
return "进门"
|
}else if(value == 1) {
|
return "出门";
|
}else {
|
return "未知"
|
}
|
}
|
},
|
{
|
field: 'newOldStatus',
|
title: '新/旧设备',
|
formatter : function (value, row, index) {
|
if(value == 0) {
|
return "Smart 5F"
|
}else if(value == 1) {
|
return "MA300";
|
}else {
|
return "未知"
|
}
|
}
|
},
|
// {
|
// field: 'bindingStatus',
|
// title: '是否绑定',
|
// formatter : function (value, row, index) {
|
// if(value == 0) {
|
// return "未绑定"
|
// }else if(value == 1) {
|
// return "绑定";
|
// }else {
|
// return "未知"
|
// }
|
// }
|
// },
|
// {
|
// field: 'identification',
|
// title: '控制读头标识',
|
// formatter : function (value, row, index) {
|
// if(value == 0) {
|
// return "中控"
|
// }else if(value == 1) {
|
// return "霍尼韦尔";
|
// }else {
|
// return "未知"
|
// }
|
// }
|
// },
|
// {
|
// field: 'status',
|
// title: '是否禁用0/未禁用1/禁用',
|
// formatter : function (value, row, index) {
|
// if(value == 0) {
|
// return "未禁用"
|
// }else if(value == 1) {
|
// return "禁用";
|
// }else {
|
// return "未知"
|
// }
|
// }
|
// },
|
{
|
title: '操作',
|
align: 'center',
|
formatter: function(value, row, index) {
|
var $row = JSON.stringify(row).replace(/\"/g,"'");
|
var actions = [];
|
actions.push('<a class="btn btn-info' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
/*actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="resetUser(' + $row + ')"><i class="fa fa-remove"></i>清除用户指纹信息</a>');*/
|
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="cleanFingerInfo(' + $row + ')"><i class="fa fa-remove"></i>清除用户指纹信息</a>');
|
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="restartHead(' + $row + ')"><i class="fa fa-remove"></i>重启设备</a>');
|
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="getConnectStatus(' + $row + ')"><i class="fa fa-remove"></i>获取连接状态</a>');
|
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="register(' + $row + ')"><i class="fa fa-remove"></i>注册</a>');
|
actions.push('<a class="btn btn-info' + editFlag + '" href="javascript:void(0)" onclick="find(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看授权</a> ');
|
return actions.join('');
|
}
|
}]
|
};
|
$.table.init(options);
|
});
|
|
//清除指纹读头对应用户信息
|
function resetUser(row) {
|
$.modal.confirm("确认要清除选中读头中的用户数据吗?", function() {
|
$.operate.submit("/station/workUser/removeUserTmp", "post", "json", row);
|
});
|
}
|
|
//清除用户指纹信息
|
function cleanFingerInfo(row) {
|
$.modal.confirm("确认要清除选中读头中的用户数据吗?", function() {
|
$.ajax({
|
url: "/station/workUser/cleanFingerInfo",
|
data: row,
|
type: "post",
|
success: function(res) {
|
if(res.code == 0) {
|
$.modal.alertSuccess(res.msg)
|
}else {
|
$.modal.alertError(res.msg);
|
}
|
}
|
})
|
});
|
}
|
|
//重启读头
|
function restartHead(row) {
|
$.modal.confirm("确认要重启读头吗?", function() {
|
$.ajax({
|
url: "/station/workUser/restartHead",
|
data: row,
|
type: "post",
|
success: function(res) {
|
if(res.code == 0) {
|
$.modal.alertSuccess(res.msg)
|
}else {
|
$.modal.alertError(res.msg);
|
}
|
}
|
})
|
});
|
}
|
|
//获取读头连接状态
|
function getConnectStatus(row) {
|
$.ajax({
|
url: "/station/workUser/getConnectStatus",
|
data: row,
|
type: "post",
|
success: function(res) {
|
if(res.code == 0) {
|
$.modal.alertSuccess(res.msg)
|
}else {
|
$.modal.alertError(res.msg);
|
}
|
}
|
})
|
}
|
//注册
|
function register(row) {
|
$.ajax({
|
url: "/station/workUser/register",
|
data: row,
|
type: "post",
|
success: function(res) {
|
if(res.code == 0) {
|
$.modal.alertSuccess(res.msg)
|
}else {
|
$.modal.alertError(res.msg);
|
}
|
}
|
})
|
}
|
|
function find(id){
|
$('#teamId').val(id)
|
$.modal.open("授权状况", "head/find2",'900','600');
|
}
|
</script>
|
</body>
|
</html>
|