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.
571 lines
22 KiB
571 lines
22 KiB
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<%@ page language="java" pageEncoding="UTF-8" %>
|
|
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
|
<%@ include file="/common/ctx.jsp" %>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
|
<title>设备管理</title>
|
|
<!-- jQuery -->
|
|
<script src="${ctx}/js/jquery-3.7.0.min.js"></script>
|
|
<script src="${ctx}/js/jquery.form.js"></script>
|
|
<!-- checkbox 单选多选美化 -->
|
|
<script src="${ctx}/hbcyjc/resourceNew/js/checkbox.js"></script>
|
|
<script type="text/javascript"> <!-- checkbox 单选多选美化 -->
|
|
$(function () {
|
|
$('input').customInput();
|
|
$('.toggle').each(function () {
|
|
$('div:first', this).addClass('first');
|
|
$('div:last', this).addClass('last');
|
|
});
|
|
});
|
|
</script>
|
|
<%--弹框--%>
|
|
<script src="${ctx}/js/layer/layer.js"></script>
|
|
<%--表单工具--%>
|
|
<script src="${ctx}/js/common/cjy_form.js"></script>
|
|
<script src="${ctx}/js/common/cjy_common.js"></script>
|
|
<%--json工具--%>
|
|
<script type="text/javascript" src="${ctx}/js/common/json_form.js"></script>
|
|
<!-- 字体图标 -->
|
|
<link href="${ctx}/assets/font-awesome/css/font-awesome.min.css" rel="stylesheet"/>
|
|
<link href="${ctx}/assets/ionicon/css/ionicons.min.css" rel="stylesheet"/>
|
|
<link href="${ctx}/css/material-design-iconic-font.min.css" rel="stylesheet">
|
|
<!-- 自定义样式 -->
|
|
<link href="${ctx}/hbcyjc/resourceNew/css/cjy_style.css" rel="stylesheet"/>
|
|
<link href="${ctx}/hbcyjc/resourceNew/css/cjy_style2.css" rel="stylesheet"/>
|
|
|
|
<%@ include file="/common/theme_css.jsp" %>
|
|
</head>
|
|
<body>
|
|
|
|
<div class="container">
|
|
<form class="form_meren" action="${ctx}/lyscenicbasic/insertLyScenicBasic.do" id="scenicBaseFrom" name="scenicBaseFrom" method="post">
|
|
<input type="hidden" name="id" id="sceid" value="${lis.id}"/>
|
|
<div class="form_hang">
|
|
<label class="form_label"><span class="text-danger">*</span>设备名称</label>
|
|
<div class="form_input">
|
|
<input class="form-control" type="text" id="videoName" name="videoName"
|
|
value="${lis.videoName}">
|
|
</div>
|
|
</div>
|
|
<div class="form_hang">
|
|
<label class="form_label"><span class="text-danger"></span>监控编号</label>
|
|
<div class="form_input">
|
|
<input class="form-control" type="text" id="videoCode" name="videoCode"
|
|
value="${lis.videoCode}">
|
|
</div>
|
|
</div>
|
|
<div class="form_hang">
|
|
<label class="form_label"><span class="text-danger">*</span>视频通道号</label>
|
|
<div class="form_input">
|
|
<input class="form-control" type="text" id="videoChannelNum" name="videoChannelNum"
|
|
value="${lis.videoChannelNum}">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form_hang">
|
|
<label class="form_label"><span class="text-danger">*</span>视频ip</label>
|
|
<div class="form_input">
|
|
<input class="form-control" type="text" id="videoIp" name="videoIp"
|
|
value="${lis.videoIp}">
|
|
</div>
|
|
</div>
|
|
<div class="form_hang">
|
|
<label class="form_label"><span class="text-danger">*</span>监控端口号</label>
|
|
<div class="form_input">
|
|
<input class="form-control" type="text" id="videoPortNum" name="videoPortNum"
|
|
value="${lis.videoPortNum}">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form_hang ">
|
|
<label class="form_label"><span class="text-danger"></span>上下行类型</label>
|
|
<input type="hidden" id="hscenicson" name="roadType" value="${lis.roadType}">
|
|
<div class="form_dynr">
|
|
<div class="radio">
|
|
<input type='radio' id="shi" name="choose" value="1"/> <label for="shi">有</label>
|
|
</div>
|
|
<div class="radio">
|
|
<input type='radio' id="fou" name="choose" value="0"> <label for="fou">无</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form_hang ">
|
|
<label class="form_label">行政区划<span class="text-danger">*</span></label>
|
|
<div class="dbtn">
|
|
<div class="zdsy" style="margin-right: -7px">
|
|
<div class="pf-2" style="width: 33%;">
|
|
<div class="jd">
|
|
<select class="form-control " style="width: 100%;height: 30px" id = "videoRegionS" name = "videoRegionS" onchange="getSelectSysRegion()" >
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="pf-2" style="width: 33%">
|
|
<div class="wd">
|
|
<select class="form-control " style=" width: 100%;height: 30px" id = "videoRegionShi" name = "videoRegionShi" onchange="getSelectSysRegion('videoRegion')" >
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="pf-2" style="width: 33%;">
|
|
<div class="wd">
|
|
<select class="form-control " style="width: 100%;height: 30px" id = "videoRegion" name = "region" >
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form_hang ">
|
|
<label class="form_label"><span class="text-danger">*</span>经纬度 </label>
|
|
<div class="dbtn">
|
|
<div class="zdsy">
|
|
<div class="pf-2">
|
|
<div class="jd">
|
|
<div class="form-dwsrk"><input id="jingdu" value = "${lis.lon}" name="lon" type="text" placeholder="经度">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="pf-2">
|
|
<div class="wd">
|
|
<div class="form-dwsrk"><input id="weidu" name="lat" value = "${lis.lat}" type="text" placeholder="纬度"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<span class="dtdd"><button type="button" onclick="weizhi()" class="bttn bttn_dw">定位</button></span>
|
|
</div>
|
|
</div>
|
|
<div class="form_hang">
|
|
<label class="form_label"><span class="text-danger">*</span>所属组织</label>
|
|
<div class="form_input">
|
|
<input class="form-control" type="text" id="videoOrganization" name="videoOrganization"
|
|
value="${lis.videoOrganization}">
|
|
</div>
|
|
</div>
|
|
<div class="form_hang">
|
|
<label class="form_label"><span class="text-danger">*</span>所属设备</label>
|
|
<div class="form_input">
|
|
<input class="form-control" type="text" id="videoEquipment" name="videoEquipment"
|
|
value="${lis.videoEquipment}">
|
|
</div>
|
|
</div>
|
|
<div class="form_hang">
|
|
<label class="form_label"><span class="text-danger">*</span>摄像机类型</label>
|
|
<div class="form_input">
|
|
<input class="form-control" type="text" id="videoCamType" name="videoCamType"
|
|
value="${lis.videoCamType}">
|
|
</div>
|
|
</div>
|
|
<div class="form_hang">
|
|
<label class="form_label"><span class="text-danger">*</span>安装地址</label>
|
|
<div class="form_input">
|
|
<input class="form-control" type="text" id="videoInstalladr" name="videoInstalladr"
|
|
value="${lis.videoInstalladr}">
|
|
</div>
|
|
</div>
|
|
<div class="form_hang">
|
|
<label class="form_label"><span class="text-danger">*</span>安装时间</label>
|
|
<div class="form_input">
|
|
<input class="form-control" type="date" id="videoInstalltime" name="videoInstalltime"
|
|
value="${lis.videoInstalltime}">
|
|
</div>
|
|
</div>
|
|
<div class="form_hang">
|
|
<label class="form_label"><span class="text-danger">*</span>管理单位</label>
|
|
<div class="form_input">
|
|
<input class="form-control" type="text" id="videoCompany" name="videoCompany"
|
|
value="${lis.videoCompany}">
|
|
</div>
|
|
</div>
|
|
<div class="clear"></div>
|
|
<div class="form-btncz">
|
|
<button class="bttn bttn_bc" type="button" onclick="saveappraise();"><i class="fa fa-save"></i>保存</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<script type="text/javascript" src="${ctx}/js/laydate5.09/laydate.js"></script>
|
|
<script type="text/javascript">
|
|
laydate.render({
|
|
elem: '#openTime',
|
|
theme: 'datecolor',
|
|
type: 'time'
|
|
});
|
|
laydate.render({
|
|
elem: '#closeTime',
|
|
theme: 'datecolor',
|
|
type: 'time'
|
|
});
|
|
</script>
|
|
<script type="text/javascript" src="${ctx}/assets/jquery.validate/jquery.validate.min.js"></script>
|
|
<!--选项卡-->
|
|
<script>
|
|
initFrom();
|
|
//初始化表单select/checkbox/radio
|
|
function initFrom() {
|
|
|
|
//单选类型选择
|
|
var types = '${lis.roadType}';
|
|
if(types=="1"){
|
|
$("#shi").attr("checked","checked");
|
|
}if(types=="0"){
|
|
$("#fou").attr("checked","checked");
|
|
}
|
|
}
|
|
$("input[type='radio']").on("click",function(){
|
|
$("#hscenicson").val($(this).val());
|
|
})
|
|
|
|
function showitem(e, id) {
|
|
$(e).parent().find('li').removeClass('active');
|
|
$(e).addClass('active');
|
|
|
|
$('.mall-tab-list').css("display", 'none');
|
|
$('#' + id).css("display", '');
|
|
|
|
}
|
|
//保存
|
|
function saveappraise() {
|
|
var kkl = $("#scenicBaseFrom").valid();
|
|
if ($("#scenicBaseFrom").valid()) {
|
|
var url = "";
|
|
var sceid = document.getElementById("sceid").value;
|
|
if (sceid == "") {
|
|
url = "${ctx}/equipmentguanli/insertshebei.do";
|
|
} else {
|
|
url = "${ctx}/equipmentguanli/updateshebei.do";
|
|
}
|
|
var options = {
|
|
type: "post",
|
|
dataType: "json",
|
|
url: url,
|
|
success: function (json) {
|
|
//关闭等待框
|
|
if (json.success) {
|
|
layer.msg("保存成功")
|
|
} else {
|
|
layer.msg("保存失败")
|
|
}
|
|
}
|
|
};
|
|
$('#scenicBaseFrom').ajaxSubmit(options);
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<script type="text/javascript">
|
|
function weizhi() {
|
|
var lon = $("#jingdu").val();
|
|
var lat = $("#weidu").val();
|
|
var url = "${ctx}/hbcyjc/GDmap.jsp?frame_id=add_basic&temp=" + new Date().getTime() + "&lon=" + lon + "&lat=" + lat;
|
|
parent.layer.open({
|
|
type: 2,
|
|
title: '',
|
|
area: ['70%', '80%'],
|
|
shade: 0.8,
|
|
content: url
|
|
});
|
|
}
|
|
|
|
|
|
$(function () {
|
|
|
|
$.validator.setDefaults({
|
|
submitHandler: function (scenicBaseFrom) {
|
|
scenicBaseFrom.submit();
|
|
}
|
|
});
|
|
/** $("#scenicBaseFrom").validate({
|
|
rules: {
|
|
"scenicChineseName": {
|
|
required: true
|
|
},
|
|
"distcode": {
|
|
required: true
|
|
},
|
|
"scenicYkzxdz": {
|
|
required: true
|
|
},
|
|
"lon": {
|
|
required: true
|
|
},
|
|
"lat": {
|
|
required: true
|
|
},
|
|
"jslon": {
|
|
required: true
|
|
},
|
|
"jslat": {
|
|
required: true
|
|
},
|
|
"competentunit": {
|
|
required: true
|
|
},
|
|
"scenicPerc": {
|
|
required: true
|
|
},
|
|
"scenicPercPhone": {
|
|
required: true
|
|
},
|
|
"scenicEntryaddress": {
|
|
required: true
|
|
},
|
|
"scenicJj": {
|
|
required: true
|
|
},
|
|
"logo": {
|
|
required: true
|
|
}
|
|
},
|
|
messages: {
|
|
"scenicChineseName": {
|
|
required: "请输入设备名称"
|
|
},
|
|
"distcode": {
|
|
required: "请选择行政区划"
|
|
},
|
|
"scenicYkzxdz": {
|
|
required: "请输入设备游客中心地址"
|
|
},
|
|
"lon": {
|
|
required: "请输入设备游客中心地址经度"
|
|
},
|
|
"lat": {
|
|
required: "请输入设备游客中心地址纬度"
|
|
},
|
|
"jslon": {
|
|
required: "请输入设备集散中心地址经度"
|
|
},
|
|
"jslat": {
|
|
required: "请输入设备集散中心地址纬度"
|
|
},
|
|
"competentunit": {
|
|
required: "请输入主管单位"
|
|
},
|
|
"scenicPerc": {
|
|
required: "请输入设备负责人"
|
|
},
|
|
"scenicPercPhone": {
|
|
required: "请输入设备负责人手机"
|
|
},
|
|
"scenicEntryaddress": {
|
|
required: "请输入设备入口地址"
|
|
},
|
|
"scenicJj": {
|
|
required: "请输入设备介绍"
|
|
},
|
|
"logo": {
|
|
required: "请上传logo图片"
|
|
}
|
|
}
|
|
});**/
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
var earecode = "${ctx_sysDept.dcode}"
|
|
//显示行政区划
|
|
function getSelectSysRegion(videoType){
|
|
|
|
if(earecode.length==6){ //如果是区县账号不能执行点击
|
|
return;
|
|
}
|
|
|
|
if(earecode.length==4){ //如果是省市账号不可点击省级菜单,
|
|
if(videoType== "videoRegion" ||videoType == "" || videoType == null){ //如果是市级账号,不能选择省市
|
|
return;
|
|
}
|
|
}
|
|
|
|
var shengdata = $("#videoRegionS").val();
|
|
if(shengdata == ""){
|
|
var SysRegionhtml = "";
|
|
$("#videoRegionShi").html(SysRegionhtml);
|
|
$("#videoRegion").html(SysRegionhtml);
|
|
return;
|
|
}
|
|
|
|
var shengdata = $("#videoRegionShi").val();
|
|
if(shengdata == ""){
|
|
var SysRegionhtml = "";
|
|
$("#videoRegion").html(SysRegionhtml);
|
|
return;
|
|
}
|
|
|
|
var URL = "${ctx}/zhspjkvideomanage/getSelectSysDept.do";
|
|
var SysRegion = $("#videoRegionS").val(); //是否选择省
|
|
var videoRegionShi = $("#videoRegionShi").val();
|
|
|
|
if(videoRegionShi != "" && videoRegionShi != null && videoRegionShi != "0"){//如果选择市级被选择,则赋值市级的region
|
|
SysRegion = videoRegionShi;
|
|
}
|
|
if(SysRegion == "" || SysRegion == null){ //用于初始化
|
|
SysRegion = "0";
|
|
}
|
|
if(videoType == "" || videoType == null){ //赋值省id-用于显示html
|
|
videoType = "videoRegionShi";
|
|
}
|
|
$.ajax({
|
|
type: "POST",
|
|
dataType: "json",
|
|
url: URL,
|
|
data:{SysRegion:SysRegion},
|
|
success: function(data) {
|
|
var SysRegionhtml = "<option value = \"\">请选择</option>";
|
|
for(var i = 0;i<data.length;i++){
|
|
SysRegionhtml += "<option value = \""+data[i].dremark+"\">"+data[i].dname+"</option>";
|
|
}
|
|
$("#"+videoType).html(SysRegionhtml);
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
|
|
$(function(){
|
|
var id = "${lis.id}";
|
|
if(id != "" && id != null){
|
|
Selectionxzqht();
|
|
}else{
|
|
Selectionxzqhtdou();
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
//默认选中行政区划
|
|
function Selectionxzqhtdou(){
|
|
var URL = "${ctx}/zhspjkvideomanage/getselectiondata.do";
|
|
$.ajax({
|
|
type: "POST",
|
|
dataType: "json",
|
|
url: URL,
|
|
data:{earecode:earecode},
|
|
success: function(data) {
|
|
var isSSX = data.isSSX;
|
|
var seleShtml = "<option value = \"\">请选择</option>"; //省
|
|
var seleShihtml = "<option value = \"\">请选择</option>"; //市
|
|
var seleQxhtml = "<option value = \"\">请选择</option>"; //区县
|
|
|
|
var seleSdata = data.sysdeptlistS; //省的下拉数据
|
|
var seleShidata = data.sysdeptlistShi; //市的下拉数据
|
|
var seleQxdata = data.sysdeptlistQx; //区县的下拉数据
|
|
|
|
for(var i = 0;i<seleSdata.length;i++){
|
|
if(data.Sdid == seleSdata[i].did){
|
|
seleShtml += "<option value = \""+seleSdata[i].dremark+"\" selected>"+seleSdata[i].dname+"</option>";
|
|
}else{
|
|
seleShtml += "<option value = \""+seleSdata[i].dremark+"\">"+seleSdata[i].dname+"</option>";
|
|
}
|
|
}
|
|
for(var i = 0;i<seleShidata.length;i++){
|
|
if(data.Shidid == seleShidata[i].did){
|
|
seleShihtml += "<option value = \""+seleShidata[i].dremark+"\" selected>"+seleShidata[i].dname+"</option>";
|
|
}else{
|
|
seleShihtml += "<option value = \""+seleShidata[i].dremark+"\">"+seleShidata[i].dname+"</option>";
|
|
}
|
|
}
|
|
|
|
if(isSSX != "1"){
|
|
for(var i = 0;i<seleQxdata.length;i++){
|
|
if(data.Qxdid == seleQxdata[i].did){
|
|
seleQxhtml += "<option value = \""+seleQxdata[i].dremark+"\" selected>"+seleQxdata[i].dname+"</option>";
|
|
}else{
|
|
seleQxhtml += "<option value = \""+seleQxdata[i].dremark+"\">"+seleQxdata[i].dname+"</option>";
|
|
}
|
|
}
|
|
$("#videoRegion").html(seleQxhtml);
|
|
}
|
|
|
|
$("#videoRegionS").html(seleShtml);
|
|
$("#videoRegionShi").html(seleShihtml);
|
|
|
|
}
|
|
})
|
|
}
|
|
|
|
|
|
|
|
//默认选中行政区划
|
|
function Selectionxzqht(){
|
|
var URL = "${ctx}/sysdept/getregioncount.do";
|
|
var region = "${lis.region}";
|
|
$.ajax({
|
|
type: "POST",
|
|
dataType: "json",
|
|
url: URL,
|
|
data:{region:region},
|
|
success: function(data) {
|
|
//得到应该默认选中的省市县
|
|
var sysDeptS = data.sysDeptS;
|
|
var sysDeptShi = data.sysDeptShi;
|
|
var sysDeptQX = data.sysDeptQX;
|
|
//得到当前登录人应该显示的省市县
|
|
var Sheng = data.Sheng;
|
|
var Shi = data.Shi;
|
|
var Qx = data.Qx;
|
|
//显示默认选中的省市县及三级联动
|
|
xsmrxzssx(Sheng,Shi,Qx,sysDeptS,sysDeptShi,sysDeptQX);
|
|
|
|
}
|
|
})
|
|
}
|
|
|
|
|
|
//显示默认选中的省市县及三级联动
|
|
function xsmrxzssx(Sheng,Shi,Qx,sysDeptS,sysDeptShi,sysDeptQX){
|
|
//区县三级联动开始
|
|
var qxhtml = "";
|
|
var shihtml = "";
|
|
var shenghtml = "";
|
|
for(var i =0;i<Qx.length;i++){
|
|
if(Qx[i].did == sysDeptQX[0].did){
|
|
qxhtml += "<option value = \""+Qx[i].dremark+"\" selected>"+Qx[i].dname+"</option>";
|
|
}else{
|
|
qxhtml += "<option value = \""+Qx[i].dremark+"\">"+Qx[i].dname+"</option>";
|
|
}
|
|
}
|
|
|
|
for(var i =0;i<Shi.length;i++){
|
|
if(Shi[i].did == sysDeptShi[0].did){
|
|
shihtml += "<option value = \""+Shi[i].dremark+"\" selected>"+Shi[i].dname+"</option>";
|
|
}else{
|
|
shihtml += "<option value = \""+Shi[i].dremark+"\">"+Shi[i].dname+"</option>";
|
|
}
|
|
}
|
|
|
|
for(var i =0;i<Sheng.length;i++){
|
|
if(Sheng[i].did == sysDeptS.did){
|
|
shenghtml += "<option value = \""+Sheng[i].dremark+"\" selected>"+Sheng[i].dname+"</option>";
|
|
}else{
|
|
shenghtml += "<option value = \""+Sheng[i].dremark+"\">"+Sheng[i].dname+"</option>";
|
|
}
|
|
}
|
|
|
|
$("#videoRegion").html(qxhtml);
|
|
$("#videoRegionShi").html(shihtml);
|
|
$("#videoRegionS").html(shenghtml);
|
|
|
|
}
|
|
|
|
//是否显示设备类型
|
|
function scenicLx() {
|
|
var checkBoxAll = document.getElementsByName("scenicLxBox");
|
|
var b = checkBoxAll[0].checked;
|
|
if (b) {
|
|
$("#scenic_lx").show();
|
|
} else {
|
|
$("#scenic_lx").hide();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
</body>
|
|
</html> |