diff --git a/fangija-zsyf/js/saleAnalysis/saleAnalysis.js b/fangija-zsyf/js/saleAnalysis/saleAnalysis.js
index b3a6aaa..a5324d4 100644
--- a/fangija-zsyf/js/saleAnalysis/saleAnalysis.js
+++ b/fangija-zsyf/js/saleAnalysis/saleAnalysis.js
@@ -460,8 +460,24 @@ function addItemsGuaPai(resultsMap){
htmlGuaPai += "
"+resultsMap.houses[i].district_name+""+resultsMap.houses[i].area+"㎡
";
var tempTotalPrice = resultsMap.houses[i].total_price == 0?"暂无":(parseFloat(resultsMap.houses[i].total_price)/10000).toFixed(2)+"万";
var tempAvgPrice = resultsMap.houses[i].avg_price == 0?"暂无":resultsMap.houses[i].avg_price+"元/㎡";
+ var roomHallDirectionFitment = "";
+ if(resultsMap.houses[i].room != undefined && resultsMap.houses[i].room != 0 && resultsMap.houses[i].hall != undefined && resultsMap.houses[i].hall != 0){
+ roomHallDirectionFitment += resultsMap.houses[i].room+"室"+resultsMap.houses[i].hall+"厅";
+ if((resultsMap.houses[i].direction != undefined && resultsMap.houses[i].direction != "") || (resultsMap.houses[i].fitment != undefined && resultsMap.houses[i].fitment != "")){
+ roomHallDirectionFitment += "/";
+ }
+ }
+ if(resultsMap.houses[i].direction != undefined && resultsMap.houses[i].direction != ""){
+ roomHallDirectionFitment += resultsMap.houses[i].direction;
+ if(resultsMap.houses[i].fitment != undefined && resultsMap.houses[i].fitment != ""){
+ roomHallDirectionFitment += "/";
+ }
+ }
+ if(resultsMap.houses[i].fitment != undefined && resultsMap.houses[i].fitment != ""){
+ roomHallDirectionFitment += resultsMap.houses[i].fitment;
+ }
htmlGuaPai += ""+tempTotalPrice+"
";
- htmlGuaPai += "
"+resultsMap.houses[i].room+"室"+resultsMap.houses[i].hall+"厅/"+resultsMap.houses[i].direction+"/"+resultsMap.houses[i].fitment+"
";
+ htmlGuaPai += "
"+roomHallDirectionFitment+"
";
htmlGuaPai += "
"+tempAvgPrice+"
";
}
htmlGuaPai += '';
@@ -477,8 +493,24 @@ function addItemsGuaPai(resultsMap){
htmlGuaPai += ""+resultsMap.disHouses[i].districtName+""+resultsMap.disHouses[i].area+"㎡
";
var tempTotalPrice = resultsMap.disHouses[i].totalPrice == 0?"暂无":(parseFloat(resultsMap.disHouses[i].totalPrice)/10000).toFixed(2)+"万";
var tempAvgPrice = resultsMap.disHouses[i].avgPrice == 0?"暂无":resultsMap.disHouses[i].avgPrice+"元/㎡";
+ var roomHallDirectionFitment = "";
+ if(resultsMap.disHouses[i].room != undefined && resultsMap.disHouses[i].room != 0 && resultsMap.disHouses[i].hall != undefined && resultsMap.disHouses[i].hall != 0){
+ roomHallDirectionFitment += resultsMap.disHouses[i].room+"室"+resultsMap.disHouses[i].hall+"厅";
+ if((resultsMap.disHouses[i].direction != undefined && resultsMap.disHouses[i].direction != "") || (resultsMap.disHouses[i].fitment != undefined && resultsMap.disHouses[i].fitment != "")){
+ roomHallDirectionFitment += "/";
+ }
+ }
+ if(resultsMap.disHouses[i].direction != undefined && resultsMap.disHouses[i].direction != ""){
+ roomHallDirectionFitment += resultsMap.disHouses[i].direction;
+ if(resultsMap.disHouses[i].fitment != undefined && resultsMap.disHouses[i].fitment != ""){
+ roomHallDirectionFitment += "/";
+ }
+ }
+ if(resultsMap.disHouses[i].fitment != undefined && resultsMap.disHouses[i].fitment != ""){
+ roomHallDirectionFitment += resultsMap.disHouses[i].fitment;
+ }
htmlGuaPai += ""+tempTotalPrice+"
";
- htmlGuaPai += "
"+resultsMap.disHouses[i].room+"室"+resultsMap.disHouses[i].hall+"厅/"+resultsMap.disHouses[i].direction+"/"+resultsMap.disHouses[i].fitment+"
";
+ htmlGuaPai += "
"+roomHallDirectionFitment+"
";
htmlGuaPai += "
"+tempAvgPrice+"
";
}
htmlGuaPai += '';
@@ -516,9 +548,13 @@ function addItemsChengJiao(resultsMap){
htmlChengJiao += ""+resultsMap.sells[i].district_name+"
";
var tempTotalPrice = resultsMap.sells[i].total_price == 0?"暂无":(parseFloat(resultsMap.sells[i].total_price)/10000).toFixed(2)+"万";
var tempAvgPrice = resultsMap.sells[i].avg_price == 0?"暂无":resultsMap.sells[i].avg_price+"元/㎡";
- var tradeDate = resultsMap.sells[i].trade_date == null?"暂无":formatTime(resultsMap.sells[i].trade_date)+"签约";
+ var tradeDate = (resultsMap.sells[i].trade_date == undefined || resultsMap.sells[i].trade_date == null)?"暂无":formatTime(resultsMap.sells[i].trade_date)+"签约";
var direction_floor = (resultsMap.sells[i].direction == undefined || resultsMap.sells[i].direction == "")?"":resultsMap.sells[i].direction;
- direction_floor += (resultsMap.sells[i].floor == undefined || resultsMap.sells[i].floor == "")?"":resultsMap.sells[i].floor + "层";
+ //如果direction/floor同时存在, 中间加一个"/"
+ if(resultsMap.sells[i].direction != undefined && resultsMap.sells[i].direction != "" && resultsMap.sells[i].floor != undefined && resultsMap.sells[i].floor != 0){
+ direction_floor += "/";
+ }
+ direction_floor += (resultsMap.sells[i].floor == undefined || resultsMap.sells[i].floor == 0)?"":resultsMap.sells[i].floor + "层";
htmlChengJiao += ""+tempTotalPrice+"
";
htmlChengJiao += ""+direction_floor+"
";
htmlChengJiao += "
"+tempAvgPrice+"
";
@@ -537,9 +573,13 @@ function addItemsChengJiao(resultsMap){
htmlChengJiao += ""+resultsMap.disSellHouses[i].districtName+"
";
var tempTotalPrice = resultsMap.disSellHouses[i].totalPrice == 0?"暂无":(parseFloat(resultsMap.disSellHouses[i].totalPrice)/10000).toFixed(2)+"万";
var tempAvgPrice = resultsMap.disSellHouses[i].avgPrice == 0?"暂无":resultsMap.disSellHouses[i].avgPrice+"元/㎡";
- var tradeDate = resultsMap.disSellHouses[i].tradeDate == null?"暂无":formatTime(resultsMap.disSellHouses[i].tradeDate)+"签约";
+ var tradeDate = (resultsMap.disSellHouses[i].tradeDate == undefined || resultsMap.disSellHouses[i].tradeDate == null)?"暂无":formatTime(resultsMap.disSellHouses[i].tradeDate)+"签约";
var direction_floor = (resultsMap.disSellHouses[i].direction == undefined || resultsMap.disSellHouses[i].direction == "")?"":resultsMap.disSellHouses[i].direction;
- direction_floor += (resultsMap.disSellHouses[i].floor == undefined || resultsMap.disSellHouses[i].floor == "")?"":resultsMap.disSellHouses[i].floor + "层";
+ //如果direction/floor同时存在, 中间加一个"/"
+ if(resultsMap.disSellHouses[i].direction != undefined && resultsMap.disSellHouses[i].direction != "" && resultsMap.disSellHouses[i].floor != undefined && resultsMap.disSellHouses[i].floor != 0){
+ direction_floor += "/";
+ }
+ direction_floor += (resultsMap.disSellHouses[i].floor == undefined || resultsMap.disSellHouses[i].floor == 0)?"":resultsMap.disSellHouses[i].floor + "层";
htmlChengJiao += ""+tempTotalPrice+"
";
htmlChengJiao += ""+direction_floor+"
";
htmlChengJiao += "
"+tempAvgPrice+"
";