|
|
@ -6,137 +6,159 @@ |
|
|
|
<body class="gray-bg"> |
|
|
|
<body class="gray-bg"> |
|
|
|
<div class="container-div"> |
|
|
|
<div class="container-div"> |
|
|
|
<div class="row"> |
|
|
|
<div class="row"> |
|
|
|
<div class="col-sm-12 search-collapse"> |
|
|
|
<div class="col-sm-12 select-table table-striped"> |
|
|
|
<form id="formId"> |
|
|
|
<table id="bootstrap-table"> |
|
|
|
<div class="select-list"> |
|
|
|
<div class="tab-content"> |
|
|
|
<ul> |
|
|
|
<div class="ibox-content"> |
|
|
|
<li> |
|
|
|
<ul class="nav nav-tabs"> |
|
|
|
<label>打卡人姓名:</label> |
|
|
|
<li class="active"><a href="#individual_check" data-toggle="tab" aria-expanded="true">今日打卡</a></li> |
|
|
|
<input type="text" name="checkName"/> |
|
|
|
|
|
|
|
</li> |
|
|
|
|
|
|
|
<li> |
|
|
|
|
|
|
|
<label>体温:</label> |
|
|
|
|
|
|
|
<input type="text" name="temperature"/> |
|
|
|
|
|
|
|
</li> |
|
|
|
|
|
|
|
<li> |
|
|
|
|
|
|
|
<label>健康状况:</label> |
|
|
|
|
|
|
|
<input type="text" name="state"/> |
|
|
|
|
|
|
|
</li> |
|
|
|
|
|
|
|
<li> |
|
|
|
|
|
|
|
<label>是否去过高风险地区:</label> |
|
|
|
|
|
|
|
<input type="text" name="isHigh"/> |
|
|
|
|
|
|
|
</li> |
|
|
|
|
|
|
|
<li> |
|
|
|
|
|
|
|
<label>是否接触过密接人员:</label> |
|
|
|
|
|
|
|
<input type="text" name="isTouch"/> |
|
|
|
|
|
|
|
</li> |
|
|
|
|
|
|
|
<li> |
|
|
|
|
|
|
|
<label>个人状况描述:</label> |
|
|
|
|
|
|
|
<input type="text" name="description"/> |
|
|
|
|
|
|
|
</li> |
|
|
|
|
|
|
|
<li> |
|
|
|
|
|
|
|
<label>当前时间:</label> |
|
|
|
|
|
|
|
<input type="text" class="time-input" placeholder="请选择当前时间" name="checkDatetime"/> |
|
|
|
|
|
|
|
</li> |
|
|
|
|
|
|
|
<li> |
|
|
|
|
|
|
|
<label>打卡位置:</label> |
|
|
|
|
|
|
|
<input type="text" name="currentPosition"/> |
|
|
|
|
|
|
|
</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> |
|
|
|
</ul> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</form> |
|
|
|
<div class="form-group"> |
|
|
|
|
|
|
|
<div class="row data-type"> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="col-md-2 title">姓名</div> |
|
|
|
|
|
|
|
<div class="col-md-4 data"> |
|
|
|
|
|
|
|
<input type="text" class="form-control" name="name" |
|
|
|
|
|
|
|
placeholder="姓名" value=""> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="col-md-2 title">目前位置</div> |
|
|
|
|
|
|
|
<div class="col-md-4 data" style="display: flex"> |
|
|
|
|
|
|
|
<input type="button" class="btn bg-olive" value="点击获取位置" onclick="clickToGetAddress()"></input> |
|
|
|
|
|
|
|
<input type="text" class="form-control" name="currentPosition" id="currentPosition" |
|
|
|
|
|
|
|
placeholder="目前位置" value=""> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="col-md-2 title">健康状况</div> |
|
|
|
|
|
|
|
<div class="col-md-4 data"> |
|
|
|
|
|
|
|
<input type="text" class="form-control" name="healthState" |
|
|
|
|
|
|
|
placeholder="健康状况" value=""> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="col-md-2 title">体温</div> |
|
|
|
|
|
|
|
<div class="col-md-4 data"> |
|
|
|
|
|
|
|
<input type="text" class="form-control" name="bodyTemperature" |
|
|
|
|
|
|
|
placeholder="体温" value=""> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="col-md-2 title">打卡时间</div> |
|
|
|
|
|
|
|
<div class="col-md-4 data"> |
|
|
|
|
|
|
|
<input type="date" class="form-control" name="checkOutDate" |
|
|
|
|
|
|
|
placeholder="打卡时间" value=""> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="col-md-2 title">是否到过高、中风险地区</div> |
|
|
|
|
|
|
|
<div class="col-md-4 data"> |
|
|
|
|
|
|
|
<input type="text" class="form-control" name="isToHighArea" |
|
|
|
|
|
|
|
placeholder="是否到达" value=""> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="col-md-2 title">是否接触过疑似或者确诊</div> |
|
|
|
|
|
|
|
<div class="col-md-4 data"> |
|
|
|
|
|
|
|
<input type="text" class="form-control" name="isTouch" |
|
|
|
|
|
|
|
placeholder="是否接触" value=""> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="col-md-2 title">备注</div> |
|
|
|
|
|
|
|
<div class="col-md-4 data"> |
|
|
|
|
|
|
|
<input type="text" class="form-control" name="remarks" |
|
|
|
|
|
|
|
placeholder="" value=""> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="btn-group-sm" id="toolbar" role="group"> |
|
|
|
|
|
|
|
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:check:add"> |
|
|
|
|
|
|
|
<i class="fa fa-plus"></i> 添加 |
|
|
|
|
|
|
|
</a> |
|
|
|
|
|
|
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:check:edit"> |
|
|
|
|
|
|
|
<i class="fa fa-edit"></i> 修改 |
|
|
|
|
|
|
|
</a> |
|
|
|
|
|
|
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:check:remove"> |
|
|
|
|
|
|
|
<i class="fa fa-remove"></i> 删除 |
|
|
|
|
|
|
|
</a> |
|
|
|
|
|
|
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:check:export"> |
|
|
|
|
|
|
|
<i class="fa fa-download"></i> 导出 |
|
|
|
|
|
|
|
</a> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="col-sm-12 select-table table-striped"> |
|
|
|
</div> |
|
|
|
<table id="bootstrap-table"></table> |
|
|
|
</div> |
|
|
|
|
|
|
|
</table> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<th:block th:include="include :: footer" /> |
|
|
|
<th:block th:include="include :: footer" /> |
|
|
|
<script th:inline="javascript"> |
|
|
|
<script src="http://api.map.baidu.com/api?v=1.4" type="text/javascript"></script> |
|
|
|
var editFlag = [[${@permission.hasPermi('system:check:edit')}]]; |
|
|
|
<script type="text/javascript"> |
|
|
|
var removeFlag = [[${@permission.hasPermi('system:check:remove')}]]; |
|
|
|
|
|
|
|
var prefix = ctx + "system/check"; |
|
|
|
$(document).ready(function() { |
|
|
|
|
|
|
|
// 选择框 |
|
|
|
|
|
|
|
$(".select2").select2(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// WYSIHTML5编辑器 |
|
|
|
|
|
|
|
$(".textarea").wysihtml5({ |
|
|
|
|
|
|
|
locale : 'zh-CN' |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
$(function() { |
|
|
|
// 设置激活菜单 |
|
|
|
|
|
|
|
function setSidebarActive(tagUri) { |
|
|
|
|
|
|
|
var liObj = $("#" + tagUri); |
|
|
|
|
|
|
|
if (liObj.length > 0) { |
|
|
|
|
|
|
|
liObj.parent().parent().addClass("active"); |
|
|
|
|
|
|
|
liObj.addClass("active"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(document).ready(function() { |
|
|
|
|
|
|
|
$('#datepicker-a3').datetimepicker({ |
|
|
|
|
|
|
|
format : "yyyy-mm-dd hh:ii", |
|
|
|
|
|
|
|
autoclose : true, |
|
|
|
|
|
|
|
todayBtn : true, |
|
|
|
|
|
|
|
language : "zh-CN" |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(document).ready(function() { |
|
|
|
|
|
|
|
// 激活导航位置 |
|
|
|
|
|
|
|
setSidebarActive("order-manage"); |
|
|
|
|
|
|
|
$("#datepicker-a3").datetimepicker({ |
|
|
|
|
|
|
|
format : "yyyy-mm-dd hh:ii", |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
function getLocation() { |
|
|
|
var options = { |
|
|
|
var options = { |
|
|
|
url: prefix + "/list", |
|
|
|
enableHighAccuracy : true, |
|
|
|
createUrl: prefix + "/add", |
|
|
|
maximumAge : 1000 |
|
|
|
updateUrl: prefix + "/edit/{id}", |
|
|
|
} |
|
|
|
removeUrl: prefix + "/remove", |
|
|
|
if (navigator.geolocation) { |
|
|
|
exportUrl: prefix + "/export", |
|
|
|
//浏览器支持geolocation |
|
|
|
modalName: "个人打卡", |
|
|
|
navigator.geolocation.getCurrentPosition(onSuccess, onError, options); |
|
|
|
columns: [{ |
|
|
|
} else { |
|
|
|
checkbox: true |
|
|
|
//浏览器不支持geolocation |
|
|
|
}, |
|
|
|
alert('您的浏览器不支持地理位置定位'); |
|
|
|
{ |
|
|
|
|
|
|
|
field: 'checkId', |
|
|
|
|
|
|
|
title: '打卡id', |
|
|
|
|
|
|
|
visible: false |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
field: 'checkName', |
|
|
|
|
|
|
|
title: '打卡人姓名' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
field: 'temperature', |
|
|
|
|
|
|
|
title: '体温' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
field: 'state', |
|
|
|
|
|
|
|
title: '健康状况' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
field: 'isHigh', |
|
|
|
|
|
|
|
title: '是否去过高风险地区' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
field: 'isTouch', |
|
|
|
|
|
|
|
title: '是否接触过密接人员' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
field: 'description', |
|
|
|
|
|
|
|
title: '个人状况描述' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
field: 'checkDatetime', |
|
|
|
|
|
|
|
title: '当前时间' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
field: 'currentPosition', |
|
|
|
|
|
|
|
title: '打卡位置' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
title: '操作', |
|
|
|
|
|
|
|
align: 'center', |
|
|
|
|
|
|
|
formatter: function(value, row, index) { |
|
|
|
|
|
|
|
var actions = []; |
|
|
|
|
|
|
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.checkId + '\')"><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.checkId + '\')"><i class="fa fa-remove"></i>删除</a>'); |
|
|
|
|
|
|
|
return actions.join(''); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}] |
|
|
|
} |
|
|
|
}; |
|
|
|
//成功时 |
|
|
|
$.table.init(options); |
|
|
|
function onSuccess(position) { |
|
|
|
|
|
|
|
//返回用户位置 |
|
|
|
|
|
|
|
//经度 |
|
|
|
|
|
|
|
var longitude = position.coords.longitude; |
|
|
|
|
|
|
|
//纬度 |
|
|
|
|
|
|
|
var latitude = position.coords.latitude; |
|
|
|
|
|
|
|
document.getElementById("currentPosition").value= `当前经纬度:经度 ${longitude},纬度 ${latitude}` |
|
|
|
|
|
|
|
//根据经纬度获取地理位置,不太准确,获取城市区域还是可以的 |
|
|
|
|
|
|
|
var map = new BMap.Map("allmap"); |
|
|
|
|
|
|
|
var point = new BMap.Point(longitude, latitude); |
|
|
|
|
|
|
|
var gc = new BMap.Geocoder(); |
|
|
|
|
|
|
|
gc.getLocation(point, function(rs) { |
|
|
|
|
|
|
|
var addComp = rs.addressComponents; |
|
|
|
|
|
|
|
document.getElementById("currentPosition").value=`${addComp.province}, ${addComp.city}, ${addComp.district}` |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
// 这里后面可以写你的后续操作了 |
|
|
|
|
|
|
|
postData(longitude, latitude); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//失败时 |
|
|
|
|
|
|
|
function onError(error) { |
|
|
|
|
|
|
|
switch (error.code) { |
|
|
|
|
|
|
|
case 1: |
|
|
|
|
|
|
|
alert("位置服务被拒绝"); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case 2: |
|
|
|
|
|
|
|
alert("暂时获取不到位置信息"); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case 3: |
|
|
|
|
|
|
|
alert("获取信息超时"); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case 4: |
|
|
|
|
|
|
|
alert("未知错误"); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// 这里后面可以写你的后续操作了 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
const clickToGetAddress = () => { |
|
|
|
|
|
|
|
getLocation(); |
|
|
|
|
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
</body> |
|
|
|
</body> |
|
|
|
</html> |
|
|
|
</html> |