306 lines
15 KiB
Plaintext
306 lines
15 KiB
Plaintext
<%--
|
||
Document : detail
|
||
Created on : 2017-7-31, 14:25:00
|
||
Author : Administrator
|
||
--%>
|
||
|
||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||
<%@page contentType="text/html" pageEncoding="UTF-8"%>
|
||
<!DOCTYPE html>
|
||
<h4>用户信息</h4>
|
||
<table class="dataTable cell-border no-footer" role="grid" style="width: 1611px;">
|
||
<thead>
|
||
<tr role="row"><th class="sorting_disabled" rowspan="1" colspan="1" style="width: 62px;">ID</th><th class="sorting_disabled" rowspan="1" colspan="1" style="width: 110px;">用户昵称</th><th class="sorting_disabled" rowspan="1" colspan="1" style="width: 66px;">性别</th><th class="sorting_disabled" rowspan="1" colspan="1" style="width: 88px;">手机号</th><th class="sorting_disabled" rowspan="1" colspan="1" style="width: 156px;">累计登陆次数</th><th class="sorting_disabled" rowspan="1" colspan="1" style="width: 212px;">注册时间</th><th class="sorting_disabled" rowspan="1" colspan="1" style="width: 133px;">技威code1</th><th class="sorting_disabled" rowspan="1" colspan="1" style="width: 133px;">技威code2</th><th class="sorting_disabled" rowspan="1" colspan="1" style="width: 134px;">技威用户ID</th><th class="sorting_disabled" rowspan="1" colspan="1" style="width: 157px;">极光推送别名</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr role="row" class="odd">
|
||
<td>${user.userId}</td>
|
||
<td>${user.nickName}</td>
|
||
<td>${userSex}</td>
|
||
<td>${user.phoneNumber}</td>
|
||
<td>${user.loginCount}</td>
|
||
<td>${createTime}</td>
|
||
<td>${user.p2pverifyCode1}</td>
|
||
<td>${user.p2pverifyCode2}</td>
|
||
<td>${user.gwellUserid}</td>
|
||
<td>${jiguang}</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<h4 style="margin-top: 100px;float: left">拥有设备</h4><div style="margin-top: 100px;float: left;margin-left: 10px;">
|
||
<button class="btn btn-xs btn-primary" data-toggle="modal" data-target="#bindDeviceModal"><i class="fa-edit"></i>新增</button></div>
|
||
<table class="dataTable cell-border no-footer" role="grid" style="width: 1611px;">
|
||
<thead>
|
||
<tr role="row">
|
||
<th class="sorting_disabled" rowspan="1" colspan="1">ID</th>
|
||
<th class="sorting_disabled" rowspan="1" colspan="1">硬件mac</th>
|
||
<th class="sorting_disabled" rowspan="1" colspan="1" >设备方案</th>
|
||
<th class="sorting_disabled" rowspan="1" colspan="1" >厂家名称</th>
|
||
<th class="sorting_disabled" rowspan="1" colspan="1" >连接次数</th>
|
||
<th class="sorting_disabled" rowspan="1" colspan="1" >最后一次登陆时间</th>
|
||
<th class="sorting_disabled" rowspan="1" colspan="1" >显示名称</th>
|
||
<th class="sorting_disabled" rowspan="1" colspan="1" >是否主控</th>
|
||
<th class="sorting_disabled" rowspan="1" colspan="1" >绑定时间</th>
|
||
<th class="sorting_disabled" rowspan="1" colspan="1" >首次激活时间</th>
|
||
<th class="sorting_disabled" rowspan="1" colspan="1" >出厂时间</th>
|
||
<th class="sorting_disabled" rowspan="1" colspan="1" >授权</th>
|
||
<th class="sorting_disabled" rowspan="1" colspan="1" >操作</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<c:forEach items="${listmap}" var="item">
|
||
<tr role="row" class="odd">
|
||
<td>${item.deviceId}</td>
|
||
<td>${item.deviceMac}</td>
|
||
<td>${item.hardwareName}</td>
|
||
<td>${item.brandName}</td>
|
||
<td>${item.logincount}</td>
|
||
<td>${item.lastlogintime}</td>
|
||
<td>${item.deviceName}</td>
|
||
<td>${item.isMaster}</td>
|
||
<td>${item.bindTime}</td>
|
||
<td>${item.firsttime}</td>
|
||
<td>${item.createTime}</td>
|
||
<td>${item.isBlacklist}</td>
|
||
<td>
|
||
<a href="javascript:void(0);" onclick="deleteDevice('${user.userId}', '${item.deviceId}')" class="btn btn-xs btn-danger"><i class="fa-remove">解除绑定</i></a>
|
||
<a href="javascript:void(0);" title="[禁用]" class="btn btn-xs"><i class="fa-remove">取消授权</i></a>
|
||
</td>
|
||
</tr>
|
||
</c:forEach>
|
||
</tbody>
|
||
</table>
|
||
<h4 style="margin-top: 100px;float: left">拥有摄像头</h4><div style="margin-top: 100px;float: left;margin-left: 10px;">
|
||
<button class="btn btn-xs btn-primary" data-toggle="modal" data-target="#bindCameraModal"><i class="fa-edit"></i>新增</button></div>
|
||
<table class="dataTable cell-border no-footer" role="grid" style="width: 1611px;">
|
||
<thead>
|
||
<tr role="row">
|
||
<th class="sorting_disabled" rowspan="1" colspan="1" style="width: 62px;">摄像头ID</th>
|
||
<th class="sorting_disabled" rowspan="1" colspan="1" style="width: 110px;">显示名称</th>
|
||
<th class="sorting_disabled" rowspan="1" colspan="1" style="width: 66px;">是否主控</th>
|
||
<th class="sorting_disabled" rowspan="1" colspan="1" style="width: 88px;">是否直播</th>
|
||
<th class="sorting_disabled" rowspan="1" colspan="1" style="width: 156px;">绑定时间</th>
|
||
<th class="sorting_disabled" rowspan="1" colspan="1" style="width: 212px;">激活时间</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<c:forEach items="${cameraMaps}" var="item1">
|
||
<tr role="row" class="odd">
|
||
<td>${item1.cameraId}</td>
|
||
<td>${item1.cameraName}</td>
|
||
<td>${item1.isMaster}</td>
|
||
<td>${item1.isLive}</td>
|
||
<td>${item1.bindTime}</td>
|
||
<td>${item1.firsttime}</td>
|
||
</tr>
|
||
</c:forEach>
|
||
</tbody>
|
||
</table>
|
||
<div class="modal fade" id="bindCameraModal" tabindex="1" role="dialog" aria-labelledby="exampleModalLabel">
|
||
<div class="modal-dialog" role="document">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||
<h4 class="modal-title" id="exampleModalLabel">绑定摄像头</h4>
|
||
</div>
|
||
<div class="modal-body">
|
||
<form>
|
||
<div class="form-group">
|
||
<label for="recipient-name" class="control-label">用户ID:</label>
|
||
<input type="text" class="form-control" id="userId" name="userId" value="${user.userId}">
|
||
</div>
|
||
<div class="form-group">
|
||
<label for="message-text" class="control-label">摄像头ID:</label>
|
||
<input type="text" class="form-control" id="cameraId" name="cameraId" >
|
||
</div>
|
||
</form>
|
||
</div>
|
||
<div class="modal-footer">
|
||
<input type="hidden" value="device" id="bindtype">
|
||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||
<button type="button" class="btn btn-primary" id="bindCamera" data-toggle="modal" data-target="#surediv">绑定</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="modal fade" id="bindDeviceModal" tabindex="1" role="dialog" aria-labelledby="exampleModalLabel">
|
||
<div class="modal-dialog" role="document">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||
<h4 class="modal-title" id="exampleModalLabel">绑定设备</h4>
|
||
</div>
|
||
<div class="modal-body">
|
||
<form>
|
||
<div class="form-group">
|
||
<label for="recipient-name" class="control-label">用户ID:</label>
|
||
<input type="text" class="form-control" id="userId" name="userId" value="${user.userId}">
|
||
</div>
|
||
<div class="form-group">
|
||
<label for="message-text" class="control-label">设备Mac:</label>
|
||
<input type="text" class="form-control" id="deviceMac" name="deviceMac" >
|
||
</div>
|
||
</form>
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||
<button type="button" class="btn btn-primary" id="bindDevice" data-toggle="modal" data-target="#surediv">绑定</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="modal fade" id="surediv" tabindex="-1" role="dialog">
|
||
<div class="modal-dialog" role="document">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||
<h4 class="modal-title">Modal title</h4>
|
||
</div>
|
||
<div class="modal-body">
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
|
||
<button type="button" class="btn btn-primary" id="btnBind">确认</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="modal fade" id="surediv" tabindex="-1" role="dialog">
|
||
<div class="modal-dialog" role="document">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||
<h4 class="modal-title">Modal title</h4>
|
||
</div>
|
||
<div class="modal-body">
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
|
||
<button type="button" class="btn btn-primary" id="btnBind">确认</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<script>
|
||
//解除绑定设备
|
||
function deleteDevice(userId, deviceId) {
|
||
if (window.confirm('你确定要取消交易吗?')) {
|
||
$(document).ready(function () {
|
||
$.ajax({
|
||
url: 'deleteDeviceUser',
|
||
type: 'post',
|
||
data: {"userId": userId, "deviceId": deviceId},
|
||
success: function (e) {
|
||
alert(e.data);
|
||
window.location.reload();
|
||
},
|
||
error: function (e) {}
|
||
})
|
||
});
|
||
} else {
|
||
return false;
|
||
}
|
||
|
||
}
|
||
|
||
|
||
$(document).ready(function () {
|
||
var a = $('#crumb');
|
||
a.children()[1].remove();
|
||
a.append('<li>用户详情<li>');
|
||
|
||
//绑定摄像头
|
||
$('#bindCameraModal').on('show.bs.modal', function (event) {
|
||
});
|
||
//绑定设备
|
||
$('#bindDeviceModal').on('show.bs.modal', function (event) {
|
||
});
|
||
//绑定摄像头绑定按钮,准备弹出确认框
|
||
$('#bindCamera').click(function () {
|
||
$('#bindCameraModal').modal("hide");
|
||
$('#bindtype').val('camera');
|
||
});
|
||
//绑定设备绑定按钮,准备弹出确认框
|
||
$('#bindDevice').click(function () {
|
||
$('#bindDeviceModal').modal("hide");
|
||
$('#bindtype').val('device');
|
||
});
|
||
//确认框
|
||
$('#surediv').on('show.bs.modal', function (event) {
|
||
var modal = $(this);
|
||
var a = $('#cameraId').val();
|
||
var b = $('#userId').val();
|
||
var c = $('#bindtype').val();
|
||
var d = $('#deviceMac').val();
|
||
if (c === 'device') {
|
||
if (d == null || d === '' || b == null || b === '') {
|
||
modal.find('.modal-title').text('警告');
|
||
modal.find('.modal-body').text('');
|
||
modal.find('.modal-body').append('<p>请填写正确的用户ID或设备Mac</p>');
|
||
} else {
|
||
modal.find('.modal-body').text('');
|
||
modal.find('.modal-title').text('提示');
|
||
modal.find('.modal-body').append('<p>请确认要进行绑定?</p>');
|
||
modal.find('.modal-body').append('<p>用户ID:' + b + '</p>');
|
||
modal.find('.modal-body').append('<p>设备Mac:' + d + '</p>');
|
||
modal.find('.modal-body').append('<input type="hidden" id="sendbind" value="devicetrue" />');
|
||
}
|
||
} else if (c === 'camera') {
|
||
if (a == null || a === '' || b == null || b === '') {
|
||
modal.find('.modal-title').text('警告');
|
||
modal.find('.modal-body').text('');
|
||
modal.find('.modal-body').append('<p>请填写正确的用户ID或摄像头ID</p>');
|
||
} else {
|
||
modal.find('.modal-body').text('');
|
||
modal.find('.modal-title').text('提示');
|
||
modal.find('.modal-body').append('<p>请确认要进行绑定?</p>');
|
||
modal.find('.modal-body').append('<p>用户ID:' + b + '</p>');
|
||
modal.find('.modal-body').append('<p>摄像头ID:' + a + '</p>');
|
||
modal.find('.modal-body').append('<input type="hidden" id="sendbind" value="cameratrue" />');
|
||
}
|
||
}
|
||
|
||
});
|
||
//绑定
|
||
$('#btnBind').click(function () {
|
||
$('#surediv').modal('hide');
|
||
var a = $('#sendbind').val();
|
||
var b = $('#userId').val();
|
||
var c = $('#cameraId').val();
|
||
var d = $('#deviceMac').val();
|
||
if (a === 'devicetrue') {
|
||
$.ajax({
|
||
url: 'bindDevice',
|
||
type: 'post',
|
||
data: {"userId": b, "deviceMac": d},
|
||
success: function (e) {
|
||
alert(e.data);
|
||
window.location.reload();
|
||
},
|
||
error: function (e) {
|
||
alert(e.data);
|
||
}
|
||
});
|
||
} else if (a === 'cameratrue') {
|
||
$.ajax({
|
||
url: '/bindCamera',
|
||
type: 'post',
|
||
data: {"userId": b, "cameraId": c},
|
||
success: function (e) {
|
||
alert(e.data);
|
||
window.location.reload();
|
||
},
|
||
error: function (e) {
|
||
alert(e.data);
|
||
}
|
||
});
|
||
}
|
||
});
|
||
|
||
|
||
});
|
||
</script>
|