500 lines
24 KiB
HTML
500 lines
24 KiB
HTML
<!doctype html>
|
|
<html xmlns:th="http://www.thymeleaf.org">
|
|
<head>
|
|
<base th:href="${#request.getContextPath() + '/'}">
|
|
<meta charset="utf-8">
|
|
<meta name="renderer" content="webkit">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
|
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
|
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
|
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
|
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
|
|
<link rel="stylesheet" href="assets/js/vendor/zTree3/css/metroStyle/metroStyle.css"/>
|
|
<style>
|
|
.layui-form-pane .layui-input-block {
|
|
margin-left: 160px;
|
|
left: -1px;
|
|
}
|
|
.layui-form-pane .layui-form-label {
|
|
width: 160px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="layui-fluid layui-anim layui-anim-fadein">
|
|
<div class="layui-card">
|
|
<div class="layui-card-header">
|
|
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
|
<a class="close" href="javascript:void(0);">上级列表</a><span lay-separator="">/</span>
|
|
<a href="javascript:void(0);"><cite>新增内容</cite></a>
|
|
</span>
|
|
</div>
|
|
<div class="layui-card-body" style="padding: 15px;">
|
|
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">罪行</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" id="charge" name="charge" class="layui-input" value="" placeholder="请输入罪行" maxlength="50">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">时间</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" id="time" name="time" class="layui-input" value="" placeholder="请选择时间" readonly style="cursor: pointer;" lay-verify="required">
|
|
</div>
|
|
</div>
|
|
<div class="layui-row">
|
|
<div class="layui-col-md4 layui-col-lg4" >
|
|
<label class="layui-form-label">发生地点<span style="color: red">*</span></label>
|
|
<div class="layui-input-block">
|
|
<input type="hidden" id="securityAreaCode" name="securityAreaCode" class="layui-input" value="" maxlength="500">
|
|
<input type="text" id="securityAreaName" readonly style="cursor: pointer" name="securityAreaName" class="layui-input" value="" placeholder="请选择发生地点" maxlength="500">
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-md4 layui-col-lg4" >
|
|
<label class="layui-form-label">发生详细地点</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" id="caseAddress" name="caseAddress" class="layui-input" value="" placeholder="请输入需要补充的详细地址" maxlength="500">
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-md4 layui-col-lg4" >
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">地图地址</label>
|
|
<div class="layui-input-block">
|
|
<input type="hidden" id="lng" name="lng" class="layui-input" value="" placeholder="请输入经度" maxlength="50">
|
|
<input type="hidden" id="lat" name="lat" class="layui-input" value="" placeholder="请输入纬度" maxlength="50">
|
|
<input type="text" readonly="" id="mapAddress" name="mapAddress" style="width:75%;float:left;" class="layui-input" value="" placeholder="请输入地图地址" maxlength="500">
|
|
<div type="button" onclick="javascript:void(0);" class="layui-btn layui-btn-sm" id="selectMap" style="height:36px;width:25%;">
|
|
<i class="fa fa-sm fa-map-marker" style="margin-top: 10px;"></i> 地图选点
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">处罚程度</label>
|
|
<div class="layui-input-block layui-form" id="degreeSelectTemplateBox" lay-filter="degreeSelectTemplateBox"></div>
|
|
<script id="degreeSelectTemplate" type="text/html">
|
|
<select id="degree" name="degree">
|
|
<option value="">请选择处罚程度</option>
|
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
|
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
|
|
{{# } }}
|
|
</select>
|
|
</script>
|
|
</div>
|
|
<div class="layui-form-item" style="background-color:#2aabd2;color:#FFF;text-align: center;width:100% !important;font-size: 17px">
|
|
<h3>受理人员</h3>
|
|
</div>
|
|
<div class="layui-row">
|
|
<div class="layui-col-md4 layui-col-lg4" >
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">姓名</label>
|
|
<div class="layui-input-block">
|
|
<input type="hidden" id="acceptancePopulationInfoId" name="acceptancePopulationInfoId" class="layui-input" value="" placeholder="请输入化解责任人人员信息ID" maxlength="36">
|
|
<input type="text" id="acceptanceName" name="acceptanceName" class="layui-input" value="" placeholder="请输入姓名" maxlength="50">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-md4 layui-col-lg4" >
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">证件号码</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" id="acceptanceIdcard" name="acceptanceIdcard" class="layui-input" value="" placeholder="请输入证件号码" maxlength="50">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-md3 layui-col-lg3" >
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">联系电话</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" id="acceptancePhone" name="acceptancePhone" class="layui-input" value="" placeholder="请输入联系电话" maxlength="50">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-md1 layui-col-lg1" style="text-align: center;">
|
|
<div class="layui-form-item" style="height: 33px;padding-top: 3px;" pane="">
|
|
<button type="button" class="layui-btn layui-btn-sm query-acceptancepopulation" data-population="father">搜索</button>
|
|
<button type="button" class="layui-btn layui-btn-sm layui-btn-danger clear-acceptancepopulation" data-population="father">清空</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item" style="background-color:#2aabd2;color:#FFF;text-align: center;width:100% !important;font-size: 17px">
|
|
<h3>处理人员</h3>
|
|
</div>
|
|
<div class="layui-row">
|
|
<div class="layui-col-md4 layui-col-lg4" >
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">姓名</label>
|
|
<div class="layui-input-block">
|
|
<input type="hidden" id="handlePopulationInfoId" name="handlePopulationInfoId" class="layui-input" value="" placeholder="请输入化解责任人人员信息ID" maxlength="36">
|
|
<input type="text" id="handleName" name="handleName" class="layui-input" value="" placeholder="请输入姓名" maxlength="50">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-md4 layui-col-lg4" >
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">证件号码</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" id="handleIdcard" name="handleIdcard" class="layui-input" value="" placeholder="请输入证件号码" maxlength="50">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-md3 layui-col-lg3" >
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">联系电话</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" id="handlePhone" name="handlePhone" class="layui-input" value="" placeholder="请输入联系电话" maxlength="50">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-md1 layui-col-lg1" style="text-align: center;">
|
|
<div class="layui-form-item" style="height: 33px;padding-top: 3px;" pane="">
|
|
<button type="button" class="layui-btn layui-btn-sm query-handlepopulation" data-population="father">搜索</button>
|
|
<button type="button" class="layui-btn layui-btn-sm layui-btn-danger clear-handlepopulation" data-population="father">清空</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item layui-layout-admin">
|
|
<div class="layui-input-block">
|
|
<div class="layui-footer" style="left: 0;">
|
|
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交新增</button>
|
|
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="content" id="mapSelectTemplateBox" style="width:99.8%;height:99.8%;display:none;">
|
|
<!-- 地图 -->
|
|
<div class="form-item">
|
|
<div style="width:100%;height:100%">
|
|
<div id="myMap" class="layui-form-item" style="width:100%;height:500px;"></div>
|
|
</div>
|
|
</div>
|
|
<input type="hidden" class="store_Lng" />
|
|
<input type="hidden" class="store_Lat" />
|
|
<input type="hidden" class="store_Address" />
|
|
</div>
|
|
<div id="companiesTree" class="companiesTree" style="display: none;background: #f9f9f9; position: absolute;z-index: 10;height: 250px;overflow: auto;overflow-x: hidden;">
|
|
<ul id="treeDemo" class="ztree" style="width:400px;">
|
|
</ul>
|
|
</div>
|
|
<script src="assets/js/jquery-3.5.1.min.js"></script>
|
|
<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.3&key=G0k574UiHH2TTg6iiAyHZk7FEXcnpIhS"></script>
|
|
<script src="https://www.wlcbsyzl.cn/bdata/assets/js/vendor/map/baidumap-select.js"></script>
|
|
<script src="assets/js/vendor/wangEditor/wangEditor.min.js"></script>
|
|
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
|
|
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
|
<script src="assets/layuiadmin/layui/layui.js"></script>
|
|
<script>
|
|
layui.config({
|
|
base: 'assets/layuiadmin/' //静态资源所在路径
|
|
}).extend({
|
|
index: 'lib/index' //主入口模块
|
|
}).use(['index', 'form', 'laydate', 'ztree', 'laytpl'], function(){
|
|
var $ = layui.$;
|
|
var form = layui.form;
|
|
var laytpl = layui.laytpl;
|
|
var laydate = layui.laydate;
|
|
var wangEditor = window.wangEditor;
|
|
var wangEditorObj = {};
|
|
var viewerObj = {};
|
|
var populationInfoId = top.restAjax.params(window.location.href).populationInfoId;
|
|
|
|
$('#securityAreaName').on("click", function () {
|
|
initAreaTree("security");
|
|
var cityObj = $(this);
|
|
var cityOffset = cityObj.offset();
|
|
var width = Number(cityObj.width()) + 13;
|
|
$("#companiesTree").css({width: width + "px", left: cityOffset.left + "px", top: cityOffset.top + cityObj.outerHeight() + "px" }).slideDown("fast");
|
|
$("body").bind("mousedown", onBodyDown);
|
|
});
|
|
|
|
function hideMenu() {
|
|
$("#companiesTree").fadeOut("fast");
|
|
$("body").unbind("mousedown", onBodyDown);
|
|
}
|
|
|
|
function onBodyDown(event) {
|
|
if (!(event.target.id == "menuBtn" || event.target.id == "companiesTree" || $(event.target).parents("#companiesTree").length > 0)) {
|
|
hideMenu();
|
|
}
|
|
}
|
|
|
|
function initAreaTree(name) {
|
|
var setting = {
|
|
view: {
|
|
nameIsHTML: true
|
|
},
|
|
data : {
|
|
simpleData : {
|
|
enable : true
|
|
}
|
|
},
|
|
async: {
|
|
enable: true,
|
|
url:"api/areatree/tree",
|
|
autoParam:["id", "name", "pId", "level"]
|
|
},
|
|
callback : {
|
|
onClick : function (e, treeId, treeNode) {
|
|
var count = treeNode.title.split('/').length -1;
|
|
if (count > 0) {
|
|
$('#' + name + "AreaName").val(treeNode.title);
|
|
$('#' + name + "AreaCode").val(treeNode.areaCode);
|
|
hideMenu();
|
|
}else{
|
|
layer.msg("区域选择错误");
|
|
}
|
|
}
|
|
}
|
|
};
|
|
$.fn.zTree.init($("#treeDemo"), setting, null);
|
|
}
|
|
|
|
// 初始化地图选点
|
|
$(document).on('click', '#selectMap', function(obj) {
|
|
var lng = $('#lng').val();
|
|
var lat = $('#lat').val();
|
|
var mapAddress = $('#mapAddress').val();
|
|
if(lng != '' && lat != '') {
|
|
loadDefulatMap({lng: lng + 0.00, lat: lat + 0.00});
|
|
}else {
|
|
loadDefulatMap({lng: 109.90433661720277, lat: 40.62926901338118});
|
|
}
|
|
var currentWindowHeight = $(window).height();
|
|
$("#myMap").height(currentWindowHeight/100*80-15+"px");
|
|
layer.open({
|
|
type: 1,
|
|
title: false,
|
|
closeBtn: 1,
|
|
area: ['80%', currentWindowHeight/100*80+"px"],
|
|
shadeClose: true,
|
|
anim: 2,
|
|
content: $("#mapSelectTemplateBox"),
|
|
end: function() {
|
|
var address = $(".store_Address").val();
|
|
var lng = $(".store_Lng").val();
|
|
var lat = $(".store_Lat").val();
|
|
if(address != "" && address != undefined) {
|
|
$('#mapAddress').val(address);
|
|
$('#lng').val(lng);
|
|
$('#lat').val(lat);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
function closeBox() {
|
|
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
|
}
|
|
|
|
function refreshDownloadTemplet(fileName, file) {
|
|
var dataRander = {};
|
|
dataRander[fileName] = file;
|
|
|
|
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
|
|
document.getElementById(fileName +'FileBox').innerHTML = html;
|
|
});
|
|
}
|
|
|
|
// 初始化文件列表
|
|
function initFileList(fileName, ids, callback) {
|
|
var dataForm = {};
|
|
dataForm[fileName] = ids;
|
|
form.val('dataForm', dataForm);
|
|
|
|
if(!ids) {
|
|
refreshDownloadTemplet(fileName, []);
|
|
if(callback) {
|
|
callback(fileName, []);
|
|
}
|
|
return;
|
|
}
|
|
|
|
top.restAjax.get(top.restAjax.path('api/file/list', []), {
|
|
ids: ids
|
|
}, null, function(code, data) {
|
|
refreshDownloadTemplet(fileName, data);
|
|
if(callback) {
|
|
callback(fileName, data);
|
|
}
|
|
}, function(code, data) {
|
|
top.dialog.msg(data.msg);
|
|
});
|
|
}
|
|
|
|
// 初始化视频
|
|
function initVideo(fileName, data) {
|
|
for(var i = 0, item; item = data[i++];) {
|
|
var player = new ckplayer({
|
|
container: '#'+ fileName + i,
|
|
variable: 'player',
|
|
flashplayer: false,
|
|
video: {
|
|
file: 'route/file/download/true/'+ item.fileId,
|
|
type: 'video/mp4'
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
// 初始化时间日期
|
|
function initTimeDate() {
|
|
laydate.render({
|
|
elem: '#time',
|
|
type: 'date',
|
|
value: new Date(),
|
|
trigger: 'click'
|
|
});
|
|
}
|
|
|
|
// 初始化处罚程度下拉选择
|
|
function initDegreeSelect() {
|
|
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/7011fcc5-ad62-4d62-93db-d4ab0118cb9d', []), {}, null, function(code, data, args) {
|
|
laytpl(document.getElementById('degreeSelectTemplate').innerHTML).render(data, function(html) {
|
|
document.getElementById('degreeSelectTemplateBox').innerHTML = html;
|
|
});
|
|
form.render('select', 'degreeSelectTemplateBox');
|
|
}, function(code, data) {
|
|
top.dialog.msg(data.msg);
|
|
});
|
|
}
|
|
|
|
$('.clear-acceptancepopulation').on("click", function () {
|
|
$("#acceptancePopulationInfoId").val("");
|
|
$("#acceptanceIdcard").val("");
|
|
$("#acceptanceName").val("");
|
|
$("#acceptancePhone").val("");
|
|
});
|
|
|
|
$('.clear-handlepopulation').on("click", function () {
|
|
$("#handlePopulationInfoId").val("");
|
|
$("#handleIdcard").val("");
|
|
$("#handleName").val("");
|
|
$("#handlePhone").val("");
|
|
});
|
|
|
|
$('.query-acceptancepopulation').on("click", function () {
|
|
window.sessionStorage.setItem("tempQueryPopulationInfo", null);
|
|
top.layer.open({
|
|
type: 2,
|
|
title: "查找基础人口信息",
|
|
closeBtn: 1,
|
|
area: ['90%', '90%'],
|
|
shadeClose: true,
|
|
anim: 2,
|
|
content: top.restAjax.path('route/populationinfo/query', []),
|
|
end: function() {
|
|
try{
|
|
var data = window.sessionStorage.getItem("tempQueryPopulationInfo");
|
|
if(data != null && data != undefined && data != 'null') {
|
|
var dataObj = eval("(" + data + ")");
|
|
if(populationInfoId == dataObj.populationInfoId) {
|
|
top.layer.msg("不能这么个填哇!");
|
|
return;
|
|
}
|
|
var dataFormData = {
|
|
"acceptancePopulationInfoId": dataObj.populationInfoId,
|
|
"acceptanceIdcard": dataObj.idcard,
|
|
"acceptanceName": dataObj.name,
|
|
"acceptancePhone": dataObj.phone,
|
|
}
|
|
form.val('dataForm', dataFormData);
|
|
form.render();
|
|
}
|
|
}catch(err){
|
|
top.layer.msg('查询失败');
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
$('.query-handlepopulation').on("click", function () {
|
|
window.sessionStorage.setItem("tempQueryPopulationInfo", null);
|
|
top.layer.open({
|
|
type: 2,
|
|
title: "查找基础人口信息",
|
|
closeBtn: 1,
|
|
area: ['90%', '90%'],
|
|
shadeClose: true,
|
|
anim: 2,
|
|
content: top.restAjax.path('route/populationinfo/query', []),
|
|
end: function() {
|
|
try{
|
|
var data = window.sessionStorage.getItem("tempQueryPopulationInfo");
|
|
if(data != null && data != undefined && data != 'null') {
|
|
var dataObj = eval("(" + data + ")");
|
|
if(populationInfoId == dataObj.populationInfoId) {
|
|
top.layer.msg("不能这么个填哇!");
|
|
return;
|
|
}
|
|
var dataFormData = {
|
|
"handlePopulationInfoId": dataObj.populationInfoId,
|
|
"handleIdcard": dataObj.idcard,
|
|
"handleName": dataObj.name,
|
|
"handlePhone": dataObj.phone,
|
|
}
|
|
form.val('dataForm', dataFormData);
|
|
form.render();
|
|
}
|
|
}catch(err){
|
|
top.layer.msg('查询失败');
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
// 初始化内容
|
|
function initData() {
|
|
initTimeDate();
|
|
initDegreeSelect();
|
|
}
|
|
initData();
|
|
|
|
// 提交表单
|
|
form.on('submit(submitForm)', function(formData) {
|
|
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
|
top.dialog.close(index);
|
|
var loadLayerIndex;
|
|
formData.field['populationInfoId'] = populationInfoId;
|
|
top.restAjax.post(top.restAjax.path('api/security/save', []), formData.field, null, function(code, data) {
|
|
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
|
time: 0,
|
|
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
|
shade: 0.3,
|
|
yes: function(index) {
|
|
top.dialog.close(index);
|
|
window.location.reload();
|
|
},
|
|
btn2: function() {
|
|
closeBox();
|
|
}
|
|
});
|
|
}, function(code, data) {
|
|
top.dialog.msg(data.msg);
|
|
}, function() {
|
|
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
|
|
}, function() {
|
|
top.dialog.close(loadLayerIndex);
|
|
});
|
|
});
|
|
return false;
|
|
});
|
|
|
|
$('.close').on('click', function() {
|
|
closeBox();
|
|
});
|
|
|
|
// 校验
|
|
form.verify({
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |