|
|
|
|
<%--
|
|
|
|
|
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"/>
|
|
|
|
|
<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 () {
|
|
|
|
|
$("form").removeAttr("style");
|
|
|
|
|
loadRegion("province",1);
|
|
|
|
|
loadRegion("city",${sessionScope.users.pid});
|
|
|
|
|
loadRegion("area",${sessionScope.users.cid});
|
|
|
|
|
|
|
|
|
|
<c:if test="${!empty state }">
|
|
|
|
|
toastr.${state}('${message}', '提示');
|
|
|
|
|
<%--setTimeout(function(){--%>
|
|
|
|
|
<%-- window.location.href = "<%=basePath%>${url}";--%>
|
|
|
|
|
<%--},1500)--%>
|
|
|
|
|
</c:if>
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
function loadRegion(sel,parentId)
|
|
|
|
|
{
|
|
|
|
|
//sel=="city"?$("#area").html(""):false
|
|
|
|
|
$("#"+sel).html("");
|
|
|
|
|
$.get("<%=basePath%>rg.sl?flag=1&id="+parentId,function(e){
|
|
|
|
|
$("#"+sel).html(e);
|
|
|
|
|
sel==="city"?reload():false;
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
function reload()
|
|
|
|
|
{
|
|
|
|
|
sel = "area";
|
|
|
|
|
loadRegion(sel,$("#city").val());
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<body>
|
|
|
|
|
<form class="col-8" role="form"
|
|
|
|
|
action="<%=basePath%>admin/community/list.do" method="post"
|
|
|
|
|
autocomplete="off">
|
|
|
|
|
|
|
|
|
|
<div class="input-group mt-3 mb-3">
|
|
|
|
|
<div class="input-group-prepend">
|
|
|
|
|
<label class="input-group-text">社区名称:</label>
|
|
|
|
|
</div>
|
|
|
|
|
<input class="form-control"
|
|
|
|
|
name="community.name" type="text" placeholder="请输入社区名称">
|
|
|
|
|
<div class="input-group-prepend">
|
|
|
|
|
<label class="input-group-text">地区:</label>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="input-group-prepend">
|
|
|
|
|
<label class="input-group-text">省:</label>
|
|
|
|
|
</div>
|
|
|
|
|
<select id="province" class="custom-select" name="community.pid" onchange="loadRegion('city',province.value)"></select>
|
|
|
|
|
<div class="input-group-prepend">
|
|
|
|
|
<label class="input-group-text">市:</label>
|
|
|
|
|
</div>
|
|
|
|
|
<select id="city" class="custom-select" name="community.cid" onchange="loadRegion('area',city.value)"></select>
|
|
|
|
|
<div class="input-group-prepend">
|
|
|
|
|
<label class="input-group-text">区:</label>
|
|
|
|
|
</div>
|
|
|
|
|
<select id="area" class="custom-select" name="community.aid"></select>
|
|
|
|
|
|
|
|
|
|
<div class="input-group-append">
|
|
|
|
|
<button type="submit" class="btn btn-primary">查询</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
<div class="box round first" style="margin:15px;">
|
|
|
|
|
<div class="block">
|
|
|
|
|
<h2>数据列表</h2>
|
|
|
|
|
<div>
|
|
|
|
|
<a class="btn btn-primary" href="<%=basePath%>admin/community/toAdd.do?type=${param.type}">新增社区</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<table id="example" class="data display datatable">
|
|
|
|
|
<thead>
|
|
|
|
|
<th>社区名称</th>
|
|
|
|
|
<th>图片</th>
|
|
|
|
|
<th>所属区域</th>
|
|
|
|
|
<th>发布人</th>
|
|
|
|
|
<th>详细地址</th>
|
|
|
|
|
<th>主要户型</th>
|
|
|
|
|
<th>余量/总量</th>
|
|
|
|
|
<th>操作</th>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
<c:forEach items="${list}" var="item">
|
|
|
|
|
<tr class="even gradeA">
|
|
|
|
|
<td class="align-middle"><a href="/admin/house/list.do?communityId=${item.id}">${item.name}</a></td>
|
|
|
|
|
<td>
|
|
|
|
|
<img style="width: 100px;height: 100px" src="<%=basePath%>${item.image}"/>
|
|
|
|
|
</td>
|
|
|
|
|
<td class="align-middle">${item.pid}-${item.cid}-${item.aid}</td>
|
|
|
|
|
<td class="align-middle">${item.userId}</td>
|
|
|
|
|
<td class="align-middle">${item.address}</td>
|
|
|
|
|
<td class="align-middle">${item.houseType}</td>
|
|
|
|
|
<td class="align-middle">${item.remain}/${item.total}</td>
|
|
|
|
|
<td class="align-middle">
|
|
|
|
|
<a href="<%=basePath%>admin/community/toUpdate.do?community.id=${item.id}&type=${param.type}">
|
|
|
|
|
<i class="icon-pencil"></i>
|
|
|
|
|
编辑
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a class="deletemodal" href="<%=basePath%>admin/community/delete.do?community.id=${item.id}&type=${param.type}"><i class="icon-remove"></i>
|
|
|
|
|
移除
|
|
|
|
|
</a>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</c:forEach>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|