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.
gzf/WebRoot/admin/communityadd.jsp

173 lines
5.9 KiB

5 years ago
<%--
Created by IntelliJ IDEA.
User: pan
Date: 2020/6/7 0007
Time: 12:33
To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<c:import url="../head.jsp"/>
<script src="<%=basePath%>static/window.js"></script>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=09f8b1d5821c8eeafb03b9bca378efd6 "></script>
<script src="<%=basePath %>static/kindeditor-4.1.10/kindeditor-min.js"></script>
<link href="<%=basePath %>static/toastr-master/toastr.min.css" rel="stylesheet" type="text/css" />
<script src="<%=basePath %>static/toastr-master/toastr.min.js"></script>
<script>
$(function () {
$(".uploadImg").click(function(){
openWindow("http://localhost:8080/upload.jsp");
});
// 百度地图API功能
let map = new BMap.Map("allmap");
map.centerAndZoom("重庆",12);
//单击获取点击的经纬度
map.addEventListener("click",function(e){
//alert(e.point.lng + "," + e.point.lat);
$("#lat").val(e.point.lat);
$("#lng").val(e.point.lng);
});
KindEditor.ready(function (K) {
editor = K.create('textarea[name="community.description"]', {
uploadJson: '<%=basePath %>resource/js/kindeditor-4.1.10/php/upload_json.php',
fileManagerJson: '<%=basePath %>resource/js/kindeditor-4.1.10/php/file_manager_json.php',
allowFileManager: true,
items : ['source',
'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
'insertunorderedlist', '|', 'emoticons', 'link','fullscreen'],
afterBlur: function () {
this.sync();
}
});
});
})
</script>
<body>
<div class="box round first" style="margin:15px;">
<h2>录入数据</h2>
<div class="block">
<form method="POST" action="<%=basePath%>admin/community/add.do" enctype="multipart/form-data">
<input type="hidden" name="type" value="${param.type}">
<table class="form">
<tbody>
<tr>
<td class="col1">
<label>社区名称</label>
</td>
<td class="col3">
<input name="community.name" required value="" type="text" class="medium">
</td>
</tr>
<tr>
<td class="col1">
<label>
图片</label>
</td>
<td class="col2">
<input name="community.image" required value="" type="text" id="attachfile">
<a href="javascript:;" class="uploadImg btn btn-default">点击上传</a>
</td>
</td>
</tr>
<tr>
<td class="col1">
<label>
详细地址</label>
</td>
<td class="col3">
<input name="community.address" required value="" type="text" class="medium">
</td>
</tr>
<tr>
<td class="col1">
<label>
地址经纬度</label>
</td>
<td class="col3">
<input style="display:inline-block;width:45%;" name="community.latitude" required value="" type="text" class="medium" id="lat">
<input style="display:inline-block;width:45%;" name="community.longitude" required value="" type="text" class="medium" id="lng">
<div style="position:absolute;right:0px;top:0px; width:44%;height:450px;" id="allmap"></div>
</td>
</tr>
<tr>
<td class="col1">
<label>
主要户型</label>
</td>
<td class="col3">
<input name="community.houseType" required value="" type="text" class="medium">
</td>
</tr>
<tr>
<td>
<label>
详细描述</label>
</td>
<td>
<textarea name="community.description" required style="width:550px;height:80px;">
</textarea>
</td>
</tr>
<tr>
<td></td>
<td colspan="">
<button type="submit" class="btn btn-blue">提交数据</button>
</td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
</body>
</html>