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.
738 lines
30 KiB
738 lines
30 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" %>
|
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
|
|
<%--<%@ taglib prefix="cjy" uri="../../WEB-INF/cjyregion.tld"%>--%>
|
|
<%@ 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-1.11.0.min.js"></script>
|
|
<script type="text/javascript" src="${ctx}/js/jquery.form.js"></script>
|
|
|
|
<!-- 公共js -->
|
|
<script type="text/javascript" src="${ctx}/js/common/cjy_common.js"></script>
|
|
|
|
|
|
<!--插件 -->
|
|
<script src="${ctx}/js/layer/layer.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" />
|
|
<link href="${ctx}/hbcyjc/resourceNew/css/cjy_zlmxg.css" rel="stylesheet" />
|
|
|
|
<!-- checkbox 单选多选美化 -->
|
|
<script src="${ctx}/hbcyjc/resourceNew/js/checkbox.js"></script>
|
|
<%@include file="/common/theme_css.jsp"%>
|
|
<script type="text/javascript">
|
|
//表单验证
|
|
$(function() {
|
|
$.validator.setDefaults({
|
|
submitHandler: function(mainForm) {mainForm.submit();}
|
|
|
|
});
|
|
$("#mainForm").validate({
|
|
rules:{
|
|
"videoName": {required: true},
|
|
"videoRegion": {required: true},
|
|
"videoType": {required: true},
|
|
"videoScenicId": {required: true},
|
|
"videoLat": {required: true},
|
|
"videoLon": {required: true},
|
|
"videoBrand": {required: true},
|
|
"videoIp": {required: true},
|
|
"videoPortNum": {required: true},
|
|
"videoChannelNum": {required: true}
|
|
},
|
|
messages:{
|
|
"videoName":{required: "请输入视频名称"},
|
|
"videoRegion":{required: "请输入行政区划编码"},
|
|
"videoType":{required: "请输入视频类型"},
|
|
"videoScenicId":{ required: "请选择所属景区"},
|
|
"videoLat":{required: "请输入经纬度"},
|
|
"videoLon":{required: "请输入经纬度"},
|
|
"videoBrand":{required: "请输入监控品牌"},
|
|
"videoIp":{required: "请输入ip地址 "},
|
|
"videoPortNum":{required: "请输入端口号"},
|
|
"videoChannelNum":{required: "请输入通道号"}
|
|
}
|
|
});
|
|
});
|
|
|
|
//返回
|
|
function reback(){
|
|
location.href="${ctx}/zhspjkvideomanage/searchZhspjkVideoManageList.do";
|
|
}
|
|
//显示地图
|
|
function openMap(){
|
|
var url="${ctx}/back/map_zb.jsp?temp="+ new Date().getTime();
|
|
window.parent.popWin(url);
|
|
}
|
|
//选择地区
|
|
function openregion(){
|
|
var url="${ctx}/sysregion/regionList.do";
|
|
window.parent.popWin(url);
|
|
}
|
|
|
|
//选择视频状态,判断是否显示错误信息
|
|
function oncvideoState(){
|
|
var videoState = $("#videoState").val();
|
|
if(videoState == "0"){
|
|
document.getElementById("abnormal_div").style.display="none";//隐藏
|
|
}else if(videoState == "1"){
|
|
document.getElementById("abnormal_div").style.display="";//显示
|
|
}
|
|
}
|
|
|
|
|
|
|
|
$(function(){
|
|
var videoState = "${lis.videoState}";
|
|
if(videoState == "1"){//判断是否是显示错误信息
|
|
document.getElementById("abnormal_div").style.display="";//显示
|
|
}
|
|
|
|
var uploadfilehttppath = "${uploadfilehttppath}";//显示图片
|
|
var logopath = "${lis.logo}";
|
|
if(logopath != "" && logopath != null ){
|
|
logopath = logopath.substring(0,logopath.length-1);
|
|
var _html = '<div class="img-pic" style="background-image:url(\''+uploadfilehttppath+logopath+'\')">'+
|
|
'<a class="pic_delete" href="javascript:deleteimg(\'otherfiles\',\''+logopath+'\',\''+uploadfilehttppath+'\')"><i class="fa ion-close"></i></a></div>';
|
|
|
|
$("#otherfiles_img").append(_html);
|
|
}
|
|
|
|
// setTimeout(function() {
|
|
// sysregion();
|
|
// }, 300)
|
|
|
|
Selectionxzqht();//默认选中行政区划
|
|
})
|
|
|
|
|
|
|
|
var earecode = "01"; //模拟当前登录人所属行政地域编码
|
|
|
|
//显示行政区划
|
|
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].did+"\">"+data[i].dname+"</option>";
|
|
}
|
|
$("#"+videoType).html(SysRegionhtml);
|
|
if(videoType != "videoRegionS" && videoType != "videoRegionShi" && videoType !="videoRegion"){
|
|
// getSelectScenic();
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
//获得所属景区--先选择行政区划
|
|
function getSelectScenicJQ(){
|
|
var videoRegion = $("#videoRegion").val();
|
|
var URL = "${ctx}/zhspjkvideomanage/getSelectScenic.do";
|
|
$.ajax({
|
|
type: "POST",
|
|
dataType: "json",
|
|
url: URL,
|
|
data:{region:videoRegion},
|
|
success: function(data) {
|
|
var SysRegionhtml = "";
|
|
if(data.length>0){
|
|
var scenicid = "${lis.videoScenicId}";
|
|
for(var i = 0;i<data.length;i++){
|
|
if(scenicid == data[i].id){
|
|
SysRegionhtml += "<option value = \""+data[i].id+"\" selected>"+data[i].scenicChineseName+"</option>";
|
|
}else{
|
|
SysRegionhtml += "<option value = \""+data[i].id+"\">"+data[i].scenicChineseName+"</option>";
|
|
}
|
|
}
|
|
}else{
|
|
SysRegionhtml += "<option value = \"\">请先选择行政区划和视频类型</option>";
|
|
}
|
|
$("#videoScenicId").html(SysRegionhtml);
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
//视频类型选择酒店,获得该地区的酒店--先选择行政区划和视频类型
|
|
function getSelectScenicJD(){
|
|
var videoRegion = $("#videoRegion").val();
|
|
var URL = "${ctx}/zhspjkvideomanage/getHotel.do";
|
|
$.ajax({
|
|
type: "POST",
|
|
dataType: "json",
|
|
url: URL,
|
|
data:{region:videoRegion},
|
|
success: function(data) {
|
|
var SysRegionhtml = "";
|
|
if(data.length>0){
|
|
var scenicid = "${lis.videoScenicId}";
|
|
for(var i = 0;i<data.length;i++){
|
|
if(scenicid == data[i].id){
|
|
SysRegionhtml += "<option value = \""+data[i].id+"\" selected>"+data[i].cname+"</option>";
|
|
}else{
|
|
SysRegionhtml += "<option value = \""+data[i].id+"\">"+data[i].cname+"</option>";
|
|
}
|
|
}
|
|
}else{
|
|
SysRegionhtml += "<option value = \"\">请先选择行政区划和视频类型</option>";
|
|
}
|
|
$("#videoScenicId").html(SysRegionhtml);
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//默认选中行政区划
|
|
function Selectionxzqht(){
|
|
var URL = "${ctx}/zhspjkvideomanage/chooseXXZH.do";
|
|
var scenicidt = "${lis.videoScenicId}";
|
|
var videotype = "${lis.videoType}";
|
|
$.ajax({
|
|
type: "POST",
|
|
dataType: "json",
|
|
url: URL,
|
|
data:{scenicidt:scenicidt,videotype:videotype,earecode:earecode},
|
|
success: function(data) {
|
|
var isSSX = data.isSSX;
|
|
var seleShtml = ""; //省
|
|
var seleShihtml = ""; //市
|
|
var seleQxhtml = ""; //区县
|
|
|
|
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].did+"\" selected>"+seleSdata[i].dname+"</option>";
|
|
}
|
|
}
|
|
|
|
for(var i = 0;i<seleShidata.length;i++){
|
|
if(data.Shidid == seleShidata[i].did){
|
|
seleShihtml += "<option value = \""+seleShidata[i].did+"\" selected>"+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].did+"\" selected>"+seleQxdata[i].dname+"</option>";
|
|
}
|
|
}
|
|
$("#videoRegion").html(seleQxhtml);
|
|
}
|
|
|
|
$("#videoRegionS").html(seleShtml);
|
|
$("#videoRegionShi").html(seleShihtml);
|
|
var videotype = "${lis.videoType}";
|
|
if(videotype == "0"){
|
|
getSelectScenicJQ();
|
|
}else{
|
|
getSelectScenicJD();
|
|
}
|
|
}
|
|
})
|
|
}
|
|
|
|
|
|
//设置单选选择显示文字及设置选中内容
|
|
$(function(){
|
|
$(":radio").click(function(){
|
|
//alert("$(this).val());
|
|
var videoType= $("input[name='videoType']:checked").val();
|
|
if(videoType == "1"){
|
|
$("#ssjq").html("所属酒店<span class=\"text-danger\">*</span>");
|
|
getSelectScenicJD();
|
|
}else if(videoType == "0"){
|
|
$("#ssjq").html("所属景区<span class=\"text-danger\">*</span>");
|
|
getSelectScenicJQ();
|
|
}
|
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div class="xingk_nr"></div>
|
|
|
|
|
|
<!-- Begin page -->
|
|
<!-- Start content -->
|
|
<div class="content">
|
|
<div class="container">
|
|
<!-- Form-validation -->
|
|
<ul class="bdmall-tab">
|
|
<li class="active" onclick="showitem(this,'div_1')">
|
|
<p>基本信息</p>
|
|
<span class="jb-lefts"></span>
|
|
<span class="jb-leftx"></span>
|
|
<span class="jb-rights"></span>
|
|
<span class="jb-rightx"></span>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="bdmall-tab-list" id="div_1">
|
|
<form class="form_meren" id="mainForm" name="mainForm" method="post" action="${ctx}/zhspjkvideomanage/updateZhspjkVideoManage.do">
|
|
<input type="hidden" id = "id" name = "id" value = "${lis.id}"/>
|
|
<div class="form_hang ">
|
|
<label for="logname" class="form_label">视频名称 <span class="text-danger">*</span>
|
|
</label>
|
|
<div class="form_input" style="height: 30px;line-height:30px;">
|
|
${lis.videoName}
|
|
</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 disabled="disabled" 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 disabled="disabled" 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 disabled="disabled" class="form-control " style="width: 100%;height: 30px" id = "videoRegion" name = "videoRegion" >
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<%-- <div class="form_hang ">--%>
|
|
<%-- <label for="logname" class="form_label">行政区划 <span class="text-danger">*</span>--%>
|
|
<%-- </label>--%>
|
|
<%-- <div class="form_input" id = "videoRegionS" style="height: 30px;line-height:30px;">--%>
|
|
<%-- 河北省--%>
|
|
<%-- </div>--%>
|
|
<%-- </div>--%>
|
|
<%-- --%>
|
|
<%-- <div class="form_hang ">--%>
|
|
<%-- <label for="logname" class="form_label">行政区划 2<span class="text-danger">*</span>--%>
|
|
<%-- </label>--%>
|
|
<%-- <div class="form_input" id = "videoRegionShi" style="height: 30px;line-height:30px;">--%>
|
|
<%-- ${lis.videoName} -----%>
|
|
<%-- </div>--%>
|
|
<%-- </div>--%>
|
|
<%-- --%>
|
|
<%-- <div class="form_hang ">--%>
|
|
<%-- <label for="logname" class="form_label">行政区划 3<span class="text-danger">*</span>--%>
|
|
<%-- </label>--%>
|
|
<%-- <div class="form_input" id = "videoRegion" style="height: 30px;line-height:30px;">--%>
|
|
<%-- ${lis.videoName} ------%>
|
|
<%-- </div>--%>
|
|
<%-- </div>--%>
|
|
|
|
|
|
|
|
<div class="form_hang ">
|
|
<label for="logname" class="form_label">视频类型<span class="text-danger">*</span></label>
|
|
<div class="form_input" style="height: 30px;line-height:30px;">
|
|
<c:if test="${lis.videoType =='0'}">景区</c:if>
|
|
<c:if test="${lis.videoType =='1'}">酒店</c:if>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form_hang">
|
|
<label for="logname" class="form_label">所属${lis.videoType=='0'?'景区':'酒店'} <span class="text-danger">*</span>
|
|
</label>
|
|
<div class="form_input" style="height: 30px;line-height:30px;">
|
|
${scenicname}
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- <div class="form_hang "> -->
|
|
<!-- <label for="logname" class="form_label">维度 <span class="text-danger">*</span> -->
|
|
<!-- </label> -->
|
|
<!-- <div class="form_input"> -->
|
|
<%-- <input class="form-control " id="videoLat" value = "${lis.videoLat}" name="videoLat" type="text"> --%>
|
|
<!-- </div> -->
|
|
<!-- </div> -->
|
|
|
|
|
|
<!-- <div class="form_hang "> -->
|
|
<!-- <label for="logname" class="form_label">经度 <span class="text-danger">*</span> -->
|
|
<!-- </label> -->
|
|
<!-- <div class="form_input"> -->
|
|
<%-- <input class="form-control " id="videoLon" name="videoLon" value = "${lis.videoLon}" type="text"> --%>
|
|
<!-- </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" name="lon" type="text" placeholder="经度" value = "${lis.lat}" readonly="readonly">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="pf-2">
|
|
<div class="wd">
|
|
<div class="form-dwsrk"><input id="weidu" name="lat" type="text" placeholder="纬度" value = "${lis.lon}" readonly="readonly"></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 for="logname" class="form_label">监控品牌 <span class="text-danger">*</span>
|
|
</label>
|
|
<div class="form_input" style="height: 30px;line-height:30px;">
|
|
${lis.videoBrand}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form_hang ">
|
|
<label for="logname" class="form_label">ip地址 <span class="text-danger">*</span>
|
|
</label>
|
|
<div class="form_input" style="height: 30px;line-height:30px;">
|
|
${lis.videoIp}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form_hang ">
|
|
<label for="logname" class="form_label">端口号 <span class="text-danger">*</span>
|
|
</label>
|
|
<div class="form_input" style="height: 30px;line-height:30px;">
|
|
${lis.videoPortNum}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form_hang ">
|
|
<label for="logname" class="form_label">通道号 <span class="text-danger">*</span>
|
|
</label>
|
|
<div class="form_input" style="height: 30px;line-height:30px;">
|
|
${lis.videoChannelNum}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form_hang ">
|
|
<label for="logname" class="form_label">用户名 <span class="text-danger"></span>
|
|
</label>
|
|
<div class="form_input" style="height: 30px;line-height:30px;">
|
|
${lis.videoUsername}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form_hang ">
|
|
<label for="logname" class="form_label">密码 <span class="text-danger"></span>
|
|
</label>
|
|
<div class="form_input" style="height: 30px;line-height:30px;">
|
|
${lis.videoPassword}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form_hang ">
|
|
<label for="logname" class="form_label">设备id <span class="text-danger"></span>
|
|
</label>
|
|
<div class="form_input" style="height: 30px;line-height:30px;">
|
|
${lis.videoDeviceId}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form_hang ">
|
|
<label for="logname" class="form_label">视频状态 <span class="text-danger"></span>
|
|
</label>
|
|
<div class="form_input" style="height: 30px;line-height:30px;">
|
|
<c:if test="${lis.videoState =='0'}">正常</c:if>
|
|
<c:if test="${lis.videoState =='1'}">异常</c:if>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form_hang " id = "abnormal_div" style="display:none;">
|
|
<label for="logname" class="form_label">异常信息<span class="text-danger"></span>
|
|
</label>
|
|
<div class="form_input" style="height: 30px;line-height:30px;">
|
|
${lis.abnormal}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form_hang ">
|
|
<label for="logname" class="form_label">线路类型<span class="text-danger"></span>
|
|
</label>
|
|
<div class="form_input" style="height: 30px;line-height:30px;">
|
|
<c:if test="${lis.videoLineType =='0'}">公网</c:if>
|
|
<c:if test="${lis.videoLineType =='1'}">专线</c:if>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form_hang ">
|
|
<label for="logname" class="form_label">审核状态 <span class="text-danger"></span>
|
|
</label>
|
|
<div class="form_input" style="height: 30px;line-height:30px;">
|
|
<c:if test="${lis.videoExamineState =='0'}">已通过</c:if>
|
|
<c:if test="${lis.videoExamineState =='1'}">未通过</c:if>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form_hang ">
|
|
<label for="logname" class="form_label">备注 <span class="text-danger"></span>
|
|
</label>
|
|
<div class="form_input" style="height: 30px;line-height:30px;">
|
|
${lis.videoRemark}
|
|
</div>
|
|
</div>
|
|
|
|
<input type="hidden" name="logo" id="logo" value = "${lis.logo}"/>
|
|
<div class="form_hang form_hang_tongh">
|
|
<label class="form_label">图片上传</label>
|
|
<div class="form_scy">
|
|
<div class="fileInput">
|
|
</div>
|
|
<div class="scpic" id="otherfiles_img">
|
|
<c:forEach items="${lyTravelAgencyImgList}" var="imglist" varStatus="vst">
|
|
<div class="img-pic" style=" background-image:url('${file_http_path}${imglist.path }')">
|
|
</div>
|
|
</c:forEach>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="clear"></div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<!--form validation-->
|
|
<script type="text/javascript" src="${ctx}/assets/jquery.validate/jquery.validate.min.js"></script>
|
|
<!--选项卡-->
|
|
<script>
|
|
function showitem(e,id){
|
|
$(e).parent().find('li').removeClass('active');
|
|
$(e).addClass('active');
|
|
$('.bdmall-tab-list').css("display",'none');
|
|
$('#'+id).css("display",'');
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<!-- 图片上传实现方法 -->
|
|
<script type="text/javascript">
|
|
//文件上传
|
|
function fileupload(){
|
|
var options = {
|
|
type: "post",
|
|
dataType:"json",
|
|
url: "${ctx}/zhspjkvideomanage/uploadfile.do",
|
|
success:function(json){
|
|
if(json.success){
|
|
showimg(json);
|
|
}
|
|
}
|
|
};
|
|
$('#mainForm').ajaxSubmit(options);
|
|
}
|
|
|
|
function showimg(json){
|
|
//上传一次后, 先把file清除
|
|
$("#file_logo").val("");
|
|
$("#file_wechat_qr").val("");
|
|
$("#file_microblog_qr").val("");
|
|
//给隐藏域赋值, 为了保存图片路径
|
|
var http_path = json.uploadfilehttppath;
|
|
var filepath = json.filepath;
|
|
var filesData = filepath.split(";");
|
|
for(var i=0;i<filesData.length;i++){
|
|
var fileType = filesData[i].split(",")[0];
|
|
var fileName = filesData[i].split(",")[1];
|
|
var _html = '<div class="img-pic" style=" background-image:url(\''+http_path+fileName+'\')"></div>';
|
|
if(fileType=="file_logo"){
|
|
$("#show_logo").html(_html);
|
|
$("#logoImg").val(fileName);
|
|
}else if(fileType=="file_wechat_qr"){
|
|
$("#show_wechat_qr").html(_html);
|
|
$("#weixinImg").val(fileName);
|
|
}else if(fileType=="file_microblog_qr"){
|
|
$("#show_microblog_qr").html(_html);
|
|
$("#weiboImg").val(fileName);
|
|
}
|
|
}
|
|
}
|
|
|
|
//上传图片信息
|
|
function fileupload_many(){
|
|
var options = {
|
|
type: "post",
|
|
dataType:"json",
|
|
url: "${ctx}/zhspjkvideomanage/uploadfile.do",
|
|
success:function(json){
|
|
if(json.success){
|
|
//上传一次后, 先把file清除
|
|
$("#otherfiles").val("");
|
|
//给隐藏域赋值, 为了保存图片路径
|
|
var http_path = json.uploadfilehttppath;//文件显示路径
|
|
var filepath = json.filepath;
|
|
var filesData = filepath.split(";");
|
|
for(var i=0;i<filesData.length;i++){
|
|
var fileType = filesData[i].split(",")[0];//文件类型
|
|
var fileName = filesData[i].split(",")[1];//文件名
|
|
|
|
var _html = '<div class="img-pic" style="background-image:url(\''+http_path+fileName+'\')"></div>';
|
|
if(fileType=="otherfiles"){
|
|
$("#otherfiles_img").append(_html);
|
|
var files_path = $("#logo").val();
|
|
if(!isEmpty(files_path)){
|
|
fileName = files_path + fileName;
|
|
}
|
|
$("#logo").val(fileName+",");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
$('#mainForm').ajaxSubmit(options);
|
|
}
|
|
|
|
|
|
//删除图片
|
|
function deleteimg(fileType, fileName, http_path){
|
|
// window.parent.customAlertQueryClose("", "确认要删除吗?", "warning", "确定", "取消",
|
|
// "delConfirm('"+fileType+"','"+fileName+"','"+http_path+"')", "delCancel()");
|
|
delConfirm(fileType, fileName, http_path)
|
|
}
|
|
|
|
function delConfirm(fileType, fileName, http_path) {
|
|
if(fileType=="otherfiles"){
|
|
var files_path = $("#logo").val();
|
|
files_path = files_path.replace(fileName+",", "");
|
|
$("#logo").val(files_path);
|
|
showfile(fileType, files_path, http_path);
|
|
}else if(fileType=="file_logo"){
|
|
$("#show_logo").html("");
|
|
$("#logo").val("");
|
|
}else if(fileType=="file_wechat_qr"){
|
|
$("#show_wechat_qr").html("");
|
|
$("#wechatQr").val("");
|
|
}else if(fileType=="file_microblog_qr"){
|
|
$("#show_microblog_qr").html("");
|
|
$("#microblogQr").val("");
|
|
}
|
|
return;
|
|
}
|
|
|
|
function delCancel() {
|
|
return;
|
|
}
|
|
|
|
//删除图片后, 展示图片
|
|
function showfile(fileType, files_path, http_path){
|
|
$("#otherfiles_img").html("");
|
|
if(!isEmpty(files_path)){
|
|
files_path = files_path.substring(0, files_path.length-1);
|
|
var filearr = files_path.split(",");
|
|
for(var i=0;i<filearr.length;i++){
|
|
var _html = '<div class="img-pic" style="background-image:url(\''+http_path+filearr[i]+'\')"></div>';
|
|
$("#otherfiles_img").append(_html);
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
//定位方法
|
|
function weizhi() {
|
|
var lon = $("#jingdu").val();
|
|
var lat = $("#weidu").val();
|
|
var url = "${ctx}/hbcyjc/GDmap.jsp?temp=" + new Date().getTime() + "&lon=" + lon + "&lat=" + lat;
|
|
layer.open({
|
|
type: 2,
|
|
title: '',
|
|
area: ['70%', '70%'],
|
|
shade: 0.8,
|
|
content: url
|
|
});
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
</body>
|
|
</html> |