写字楼编辑板块

This commit is contained in:
2023-07-14 14:28:35 +08:00
parent ea53ac6766
commit 30364c7b05
2 changed files with 57 additions and 44 deletions
@@ -482,19 +482,34 @@ public class DistrictController {
|| StringUtils.isBlank(model.getName())) {
return ret;
}
HttpRequest request = new HttpRequest();
HashMap<String, String> params = new HashMap<String, String>();
params.put("category", "sell");
params.put("city", model.getCityDisplay());
params.put("region", model.getRegion());
params.put("name", model.getName());
params.put("count", "4");
params.put("retainHistory", "true");
try {
request.getJsonContent(Constants.MSVC_FANG_JIA_DATA_SERVICE_BASE_PATH + "/districtPriceCalculate", params, "UTF-8");
} catch (HttpRequestException e) {
e.printStackTrace();
}
Runnable myRunnable = new Runnable(){
public void run(){
try {
District district = districtService.findDistrict(new DistrictKey(model.getCityDisplay(), model.getRegion(), model.getName()),"district");
if(null != district){
HttpRequest request = new HttpRequest();
HashMap<String, String> params = new HashMap<String, String>();
params.put("category", "sell");
params.put("city", model.getCityDisplay());
params.put("region", model.getRegion());
params.put("name", model.getName());
params.put("count", "4");
params.put("retainHistory", "true");
try {
request.getJsonContent(Constants.MSVC_FANG_JIA_DATA_SERVICE_BASE_PATH + "/districtPriceCalculate", params, "UTF-8");
} catch (HttpRequestException e) {
e.printStackTrace();
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
};
Thread thread = new Thread(myRunnable);
thread.start();
return ret;
}
@@ -242,8 +242,7 @@
</#if>
板块</td>
<td>
<select id="block" name="district.block">
</select>
<input id="block" name="district.block" style="width:300px" value="${district.block!}"/>
</td>
</tr>
<tr>
@@ -283,7 +282,6 @@
<input name="district.loopLineInfo" type="text" style="width:300px" value="${district.loopLineInfo!}" />
</td>
</tr>
</table>
<table class = "saveTable">
<tr>
@@ -1276,34 +1274,34 @@ $(function(){
return true;
});
$("#region").change(function(){
jQuery.ajax({
type: 'POST',
url: '../district/getBlocks',
data: encodeURI("cityDisplay=" + $("#districtCity").val() + "&region=" + $(this).val()),
dataType: 'json',
timeout: 100000,
success: function(model) {
$("#block option").remove();
if (model.blockList.length > 0) {
$.each(model.blockList, function(i, block){
if ('${district.block!}' == block) {
$("<option value='" + block + "' selected>" + block + "</option>").appendTo($("#block"));
} else {
$("<option value='" + block + "'>" + block + "</option>").appendTo($("#block"));
}
});
$("#tr_block").show();
} else {
$("#block option").remove();
$("#tr_block").hide();
}
},
error : function() {
}
});
});
$("#region").change();
<#--$("#region").change(function(){-->
<#-- jQuery.ajax({-->
<#-- type: 'POST', -->
<#-- url: '../district/getBlocks',-->
<#-- data: encodeURI("cityDisplay=" + $("#districtCity").val() + "&region=" + $(this).val()),-->
<#-- dataType: 'json',-->
<#-- timeout: 100000,-->
<#-- success: function(model) {-->
<#-- $("#block option").remove();-->
<#-- if (model.blockList.length > 0) {-->
<#-- $.each(model.blockList, function(i, block){-->
<#-- if ('${district.block!}' == block) {-->
<#-- $("<option value='" + block + "' selected>" + block + "</option>").appendTo($("#block"));-->
<#-- } else {-->
<#-- $("<option value='" + block + "'>" + block + "</option>").appendTo($("#block"));-->
<#-- }-->
<#-- });-->
<#-- $("#tr_block").show();-->
<#-- } else {-->
<#-- $("#block option").remove();-->
<#-- $("#tr_block").hide();-->
<#-- }-->
<#-- },-->
<#-- error : function() {-->
<#-- }-->
<#-- });-->
<#--});-->
<#--$("#region").change();-->
$("#goPopMap").click(function(){
var url = "../district/map?cityDisplay=" + encodeURI($("#display").val());