写字楼编辑板块

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,6 +482,12 @@ public class DistrictController {
|| StringUtils.isBlank(model.getName())) { || StringUtils.isBlank(model.getName())) {
return ret; return ret;
} }
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(); HttpRequest request = new HttpRequest();
HashMap<String, String> params = new HashMap<String, String>(); HashMap<String, String> params = new HashMap<String, String>();
params.put("category", "sell"); params.put("category", "sell");
@@ -495,6 +501,15 @@ public class DistrictController {
} catch (HttpRequestException e) { } catch (HttpRequestException e) {
e.printStackTrace(); 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());