Merge branch 'YOUFANGAPP1.1' of 192.168.0.27:dev0/youfang-app into YOUFANGAPP1.1
Conflicts: fangija-zsyf/config.js
This commit is contained in:
@@ -1,15 +1,17 @@
|
||||
|
||||
var dataParam = {
|
||||
finishBuildingDate:"",
|
||||
householdCount:"",
|
||||
cubagePercent:"",
|
||||
carSiteCount:"",
|
||||
virescencePercent:"",
|
||||
estateCharge:"",
|
||||
moreArea:"",
|
||||
developer:"",
|
||||
estateCompany:""
|
||||
};
|
||||
|
||||
finishBuildingDate:"",
|
||||
householdCount:"",
|
||||
cubagePercent:"",
|
||||
carSiteCount:"",
|
||||
virescencePercent:"",
|
||||
estateCharge:"",
|
||||
moreArea:"",
|
||||
developer:"",
|
||||
lat:"",
|
||||
lng:"",
|
||||
estateCompany:""
|
||||
};
|
||||
Vue.component('base-info-component', {
|
||||
template: `
|
||||
<ul>
|
||||
@@ -96,35 +98,45 @@ Vue.component('base-info-component', {
|
||||
var vo = response.data.data.detail
|
||||
var cityPrice = response.data.data.cityPrice
|
||||
var collected = response.data.data.collected
|
||||
// if(cityPrice){
|
||||
// baseInfo.cityPrice = cityPrice
|
||||
// }
|
||||
// if(collected){
|
||||
// baseInfo.collect = true;
|
||||
// }else{
|
||||
// baseInfo.collect = false;
|
||||
// }
|
||||
if(cityPrice){
|
||||
baseInfo.cityPrice = cityPrice
|
||||
}
|
||||
if(collected){
|
||||
$(".collection02").show();
|
||||
$(".collection01").hide();
|
||||
}else{
|
||||
$(".collection02").hide();
|
||||
$(".collection01").show();
|
||||
}
|
||||
if(vo){
|
||||
if(vo.avgPrice){
|
||||
lat = vo.lat2;
|
||||
lng = vo.lng2;
|
||||
alert("lng-1:"+lng);
|
||||
address = vo.address;
|
||||
|
||||
// loadMapPoi();
|
||||
//
|
||||
// baseInfo.city = vo.city
|
||||
// baseInfo.region = vo.region
|
||||
// baseInfo.address = vo.address;
|
||||
// baseInfo.districtName = vo.name
|
||||
// baseInfo.avgPrice = vo.avgPrice;
|
||||
// baseInfo.oneMonthUpDownRange = vo.oneMonthUpDownRange;
|
||||
|
||||
// if(vo.rank){
|
||||
// baseInfo.priceRate = vo.rank.substring(0, vo.rank.indexOf("/"));
|
||||
// }
|
||||
baseInfo.city = vo.city
|
||||
baseInfo.region = vo.region
|
||||
baseInfo.address = vo.address;
|
||||
baseInfo.name = vo.name
|
||||
|
||||
//baseInfo.cityPrice = vo.cityPrice;
|
||||
tags = vo.poiTags;
|
||||
|
||||
if(vo.poiTags){
|
||||
if(vo.poiTags.length>=3){
|
||||
baseInfo.tags = vo.poiTags.slice(0,3);
|
||||
}else{
|
||||
baseInfo.tags = vo.poiTags;
|
||||
}
|
||||
}
|
||||
|
||||
baseInfo.avgPrice = vo.avgPrice;
|
||||
baseInfo.oneMonthUpDownRange = vo.oneMonthUpDownRange;
|
||||
if(vo.rank){
|
||||
baseInfo.priceRate = vo.rank.substring(0, vo.rank.indexOf("/"));
|
||||
}
|
||||
|
||||
baseInfo.cityPrice = cityPrice;
|
||||
var finishDate = ""
|
||||
if(vo.finishBuildingDate){
|
||||
if(vo.finishBuildingDate.indexOf("~")!=-1){
|
||||
@@ -134,7 +146,6 @@ Vue.component('base-info-component', {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
dataParam.finishBuildingDate = finishDate;
|
||||
dataParam.householdCount = vo.householdCount;
|
||||
dataParam.cubagePercent = vo.cubagePercent;
|
||||
@@ -145,17 +156,6 @@ Vue.component('base-info-component', {
|
||||
dataParam.developer = vo.developer;
|
||||
dataParam.estateCompany = vo.estateCompany;
|
||||
|
||||
// address = vo.address;
|
||||
// tags = vo.poiTags;
|
||||
|
||||
// if(vo.poiTags){
|
||||
// if(vo.poiTags.length>=3){
|
||||
// baseInfo.tags = vo.poiTags.slice(0,3);
|
||||
// }else{
|
||||
// baseInfo.tags = vo.poiTags;
|
||||
// }
|
||||
// }
|
||||
|
||||
// loadNearDistrict(vo.lat2, vo.lng2);
|
||||
}else{
|
||||
$("#noDataDiv").show()
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
Vue.component('my-component', {
|
||||
props: ['title'],
|
||||
template: `
|
||||
<div class="head">
|
||||
<h1 @click="show">ddd{{message}}</h1>
|
||||
<h1 @click="show">{{title}}ddd{{message}}</h1>
|
||||
</div>
|
||||
`,
|
||||
data: function(){
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id="example">
|
||||
<my-component></my-component>
|
||||
<my-component v-bind:title="title"></my-component>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="../../js/vue.js" ></script>
|
||||
@@ -14,7 +14,12 @@
|
||||
<script>
|
||||
// 创建根实例
|
||||
new Vue({
|
||||
el: '#example'
|
||||
el: '#example',
|
||||
data:{
|
||||
title:""
|
||||
},mounted:function(){
|
||||
this.title = 'WWW'
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
var distDatas = {nearDists: []}
|
||||
Vue.component('map-component', {
|
||||
template: `
|
||||
|
||||
`,
|
||||
data: function(){
|
||||
return distDatas;
|
||||
},
|
||||
methods: {
|
||||
loadMap:function(){
|
||||
alert("map:"+lat+"address:"+address);
|
||||
baseInfo.address = address;
|
||||
if(lat && lng && address){
|
||||
|
||||
loadMapPoi();
|
||||
}else{
|
||||
axios.get("/rest/districts/detail", {
|
||||
params: {
|
||||
city: city,
|
||||
region:region,
|
||||
name: name
|
||||
}
|
||||
}).then(function (response) {
|
||||
console.log("map finish.....")
|
||||
var vo = response.data.data.detail
|
||||
if(vo.avgPrice){
|
||||
lat = vo.lat2;
|
||||
lng = vo.lng2;
|
||||
loadMapPoi();
|
||||
}
|
||||
}).catch(function (error) {
|
||||
alert(error)
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
mounted:function(){
|
||||
alert("map start.....")
|
||||
this.loadMap();
|
||||
}
|
||||
})
|
||||
@@ -24,11 +24,12 @@ Vue.component('near-dist-component', {
|
||||
return distDatas;
|
||||
},
|
||||
methods: {
|
||||
loadNearDistrict:function(lat, lng){
|
||||
loadNearDistrict:function(){
|
||||
axios.get("/rest/districts/nearDistrict", {
|
||||
params: {
|
||||
lat: lat,
|
||||
lng:lng
|
||||
city: city,
|
||||
region:region,
|
||||
name: name
|
||||
}
|
||||
}).then(function (response) {
|
||||
var datas = response.data.data
|
||||
@@ -58,7 +59,6 @@ Vue.component('near-dist-component', {
|
||||
}
|
||||
},
|
||||
mounted:function(){
|
||||
alert("lng-2:"+lng);
|
||||
this.loadNearDistrict(lat, lng);
|
||||
this.loadNearDistrict();
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,47 @@
|
||||
var rentPricesData = {rentPrices: []}
|
||||
Vue.component('room-rent-component', {
|
||||
template: `
|
||||
<div class="cardRentWin">
|
||||
<div class="card cardRent" v-for="dist in rentPrices">
|
||||
<div class="card-content">
|
||||
<div class="card-content-inner"><em>{{dist.avgPrice}}</em> 元/月<br><small>{{dist.houseType}}室</small></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
data: function(){
|
||||
return rentPricesData;
|
||||
},
|
||||
methods: {
|
||||
loadRoomRent:function(){
|
||||
axios.get("/rest/trend/roomRent", {
|
||||
params: {
|
||||
city: city,
|
||||
region:region,
|
||||
name: name
|
||||
}
|
||||
}).then(function (response) {
|
||||
var datas = response.data.data
|
||||
if(datas){
|
||||
var ret = []
|
||||
for(var v in datas){
|
||||
var o = datas[v]
|
||||
ret.push(o);
|
||||
}
|
||||
rentPricesData.rentPrices = ret;
|
||||
|
||||
$("#roomDiv .cardRentWin").css("width",(6*ret.length)+"rem");
|
||||
}else{
|
||||
$("#roomDiv").hide()
|
||||
}
|
||||
|
||||
}).catch(function (error) {
|
||||
alert(error)
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted:function(){
|
||||
this.loadRoomRent();
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,241 @@
|
||||
var rentPricesData = {rentPrices: []}
|
||||
Vue.component('room-rent-component', {
|
||||
template: `
|
||||
|
||||
|
||||
`,
|
||||
data: function(){
|
||||
return rentPricesData;
|
||||
},
|
||||
methods: {
|
||||
loadTrend:function(){
|
||||
var myChart02 = echarts.init(document.getElementById('chart02'));
|
||||
myChart02.setOption(option02,true);
|
||||
}
|
||||
},
|
||||
mounted:function(){
|
||||
this.loadTrend();
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
/* 小区租金走势 */
|
||||
var option02 = {
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
textStyle: {
|
||||
fontFamily: 'arial,华文细黑',
|
||||
fontSize: 12
|
||||
},
|
||||
formatter: '{a0}: {c0}元/月<br>{a1}: {c1}元/月<br>{a2}: {c2}元/月<br>{a3}: {c3}元/月<br>{a4}: {c4}元/月'
|
||||
},
|
||||
grid:{
|
||||
x: 54,
|
||||
y: 10,
|
||||
x2: 16,
|
||||
y2: 60,
|
||||
borderWidth: 1
|
||||
},
|
||||
color: ['#F88C9F', '#FFBF5C', '#AAD672', '#78CDE6', '#AE94E9'],
|
||||
legend: {
|
||||
data: ['一室', '二室', '三室', '四室', '五室'],
|
||||
y: 'bottom',
|
||||
textStyle: {
|
||||
fontFamily: '华文细黑',
|
||||
fontWeight: 'bold'
|
||||
},
|
||||
itemWidth: 16,
|
||||
itemHeight: 8
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: '#ccc'
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
textStyle: {
|
||||
fontFamily: 'arial',
|
||||
color: '#666'
|
||||
}
|
||||
},
|
||||
data: ['2017-02', '2017-03', '2017-04', '2017-05', '2017-06', '2017-07',
|
||||
'2017-08', '2017-09', '2017-10', '2017-11', '2017-12', '2018-01'],
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: '#ccc'
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
textStyle: {
|
||||
fontFamily: 'arial',
|
||||
color: '#666'
|
||||
}
|
||||
}
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '一室',
|
||||
type: 'line',
|
||||
symbol: 'circle',
|
||||
symbolSize: 6,
|
||||
data: [2200, 2040, 2790, 2940, 2360, 2440, 2220, 2490, 2740, 2480, 2500, 2860]
|
||||
},
|
||||
{
|
||||
name: '二室',
|
||||
type: 'line',
|
||||
symbol: 'circle',
|
||||
symbolSize: 6,
|
||||
data: [3200, 3040, 3790, 3940, 3360, 3440, 3220, 3490, 3740, 3480, 3500, 3860]
|
||||
},
|
||||
{
|
||||
name: '三室',
|
||||
type: 'line',
|
||||
symbol: 'circle',
|
||||
symbolSize: 6,
|
||||
data: [4200, 4040, 4790, 4940, 4360, 4440, 4220, 4490, 4740, 4480, 4500, 4860]
|
||||
},
|
||||
{
|
||||
name: '四室',
|
||||
type: 'line',
|
||||
symbol: 'circle',
|
||||
symbolSize: 6,
|
||||
data: [5200, 5040, 5790, 5940, 5360, 5440, 5220, 5490, 5740, 5480, 5500, 5860]
|
||||
},
|
||||
{
|
||||
name: '五室',
|
||||
type: 'line',
|
||||
symbol: 'circle',
|
||||
symbolSize: 6,
|
||||
data: [6200, 6040, 6790, 6940, 6360, 6440, 6220, 6490, 6740, 6480, 6500, 6860]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
function loadRentTrends(city, region, name){
|
||||
var type = $("#trendDiv2 a.active").attr("t-v")
|
||||
axios.get("/rest/trend/distRentTrends", {
|
||||
params: {
|
||||
city: city,
|
||||
region:region,
|
||||
name:name,
|
||||
type:type
|
||||
}
|
||||
}).then(function (response) {
|
||||
var re = response.data.data
|
||||
|
||||
|
||||
var categories = new Array();
|
||||
var series = new Array();
|
||||
|
||||
var m = re.times;
|
||||
var pm = re.distMap
|
||||
var rooms = re.rooms;
|
||||
|
||||
if(m && rooms.length>0){
|
||||
|
||||
for(var i=0;i<m.length;i++){
|
||||
categories.push(m[i]);
|
||||
}
|
||||
|
||||
for(var k in rooms){
|
||||
var room = rooms[k]
|
||||
var distM = pm[room];
|
||||
var distObj = new Object();
|
||||
var distDatas = new Array();
|
||||
|
||||
for(var i=0;i<m.length;i++){
|
||||
if(distM[m[i]] == undefined){
|
||||
distDatas.push(null);
|
||||
} else {
|
||||
distDatas.push(distM[m[i]]);
|
||||
}
|
||||
}
|
||||
distObj.name = room+"室"
|
||||
distObj.data = distDatas;
|
||||
distObj.type = 'line';
|
||||
distObj.symbolSize = 0;
|
||||
series.push(distObj);
|
||||
}
|
||||
|
||||
//showRentChart(categories, series);
|
||||
showRentChart2(categories, series);
|
||||
}else{
|
||||
//没数据
|
||||
$("#tabRentDiv").addClass("dn");
|
||||
}
|
||||
}).catch(function (error) {
|
||||
alert(error)
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function showRentChart2(categories, series){
|
||||
var option03 = {
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
textStyle: {
|
||||
fontFamily: 'arial,华文细黑',
|
||||
fontSize: 12
|
||||
}
|
||||
},
|
||||
grid:{
|
||||
x: 54,
|
||||
y: 10,
|
||||
x2: 16,
|
||||
y2: 60,
|
||||
borderWidth: 1
|
||||
},
|
||||
color: ['#F88C9F', '#FFBF5C', '#AAD672', '#78CDE6', '#AE94E9'],
|
||||
legend: {
|
||||
y: 'bottom',
|
||||
textStyle: {
|
||||
fontFamily: '华文细黑',
|
||||
fontWeight: 'bold'
|
||||
},
|
||||
itemWidth: 16,
|
||||
itemHeight: 8
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: '#ccc'
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
textStyle: {
|
||||
fontFamily: 'arial',
|
||||
color: '#666'
|
||||
}
|
||||
},
|
||||
data: categories,
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: '#ccc'
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
textStyle: {
|
||||
fontFamily: 'arial',
|
||||
color: '#666'
|
||||
}
|
||||
}
|
||||
},
|
||||
series:series
|
||||
};
|
||||
|
||||
var myChart02 = echarts.init(document.getElementById('chart02'));
|
||||
myChart02.setOption(option03,true);
|
||||
}
|
||||
Reference in New Issue
Block a user