写字楼编辑板块

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())) { || StringUtils.isBlank(model.getName())) {
return ret; return ret;
} }
HttpRequest request = new HttpRequest();
HashMap<String, String> params = new HashMap<String, String>(); Runnable myRunnable = new Runnable(){
params.put("category", "sell"); public void run(){
params.put("city", model.getCityDisplay()); try {
params.put("region", model.getRegion()); District district = districtService.findDistrict(new DistrictKey(model.getCityDisplay(), model.getRegion(), model.getName()),"district");
params.put("name", model.getName()); if(null != district){
params.put("count", "4"); HttpRequest request = new HttpRequest();
params.put("retainHistory", "true"); HashMap<String, String> params = new HashMap<String, String>();
try { params.put("category", "sell");
request.getJsonContent(Constants.MSVC_FANG_JIA_DATA_SERVICE_BASE_PATH + "/districtPriceCalculate", params, "UTF-8"); params.put("city", model.getCityDisplay());
} catch (HttpRequestException e) { params.put("region", model.getRegion());
e.printStackTrace(); 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; return ret;
} }
@@ -242,8 +242,7 @@
</#if> </#if>
板块</td> 板块</td>
<td> <td>
<select id="block" name="district.block"> <input id="block" name="district.block" style="width:300px" value="${district.block!}"/>
</select>
</td> </td>
</tr> </tr>
<tr> <tr>
@@ -283,7 +282,6 @@
<input name="district.loopLineInfo" type="text" style="width:300px" value="${district.loopLineInfo!}" /> <input name="district.loopLineInfo" type="text" style="width:300px" value="${district.loopLineInfo!}" />
</td> </td>
</tr> </tr>
</table> </table>
<table class = "saveTable"> <table class = "saveTable">
<tr> <tr>
@@ -1276,34 +1274,34 @@ $(function(){
return true; return true;
}); });
$("#region").change(function(){ <#--$("#region").change(function(){-->
jQuery.ajax({ <#-- jQuery.ajax({-->
type: 'POST', <#-- type: 'POST', -->
url: '../district/getBlocks', <#-- url: '../district/getBlocks',-->
data: encodeURI("cityDisplay=" + $("#districtCity").val() + "&region=" + $(this).val()), <#-- data: encodeURI("cityDisplay=" + $("#districtCity").val() + "&region=" + $(this).val()),-->
dataType: 'json', <#-- dataType: 'json',-->
timeout: 100000, <#-- timeout: 100000,-->
success: function(model) { <#-- success: function(model) {-->
$("#block option").remove(); <#-- $("#block option").remove();-->
if (model.blockList.length > 0) { <#-- if (model.blockList.length > 0) {-->
$.each(model.blockList, function(i, block){ <#-- $.each(model.blockList, function(i, block){-->
if ('${district.block!}' == block) { <#-- if ('${district.block!}' == block) {-->
$("<option value='" + block + "' selected>" + block + "</option>").appendTo($("#block")); <#-- $("<option value='" + block + "' selected>" + block + "</option>").appendTo($("#block"));-->
} else { <#-- } else {-->
$("<option value='" + block + "'>" + block + "</option>").appendTo($("#block")); <#-- $("<option value='" + block + "'>" + block + "</option>").appendTo($("#block"));-->
} <#-- }-->
}); <#-- });-->
$("#tr_block").show(); <#-- $("#tr_block").show();-->
} else { <#-- } else {-->
$("#block option").remove(); <#-- $("#block option").remove();-->
$("#tr_block").hide(); <#-- $("#tr_block").hide();-->
} <#-- }-->
}, <#-- },-->
error : function() { <#-- error : function() {-->
} <#-- }-->
}); <#-- });-->
}); <#--});-->
$("#region").change(); <#--$("#region").change();-->
$("#goPopMap").click(function(){ $("#goPopMap").click(function(){
var url = "../district/map?cityDisplay=" + encodeURI($("#display").val()); var url = "../district/map?cityDisplay=" + encodeURI($("#display").val());