1127 lines
30 KiB
HTML
1127 lines
30 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<title>{{districtName}}</title>
|
|
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
|
|
<link rel="shortcut icon" href="/favicon.ico">
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
|
|
<link rel="stylesheet" href="http://g.alicdn.com/msui/sm/0.6.2/css/sm.css">
|
|
<link rel="stylesheet" href="../../css/main.css">
|
|
<link rel="stylesheet" href="../../css/theme-orange.css">
|
|
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=0a7eM0lkIvpKGPiq1bMCfeH7"></script>
|
|
|
|
|
|
<style>
|
|
.list-block ul:before{height:0;}
|
|
.list-block ul:after{height:0;}
|
|
.list-block.media-list ul:after{height:1px;}
|
|
.list-block .item-inner:after{height:0;}
|
|
.list-block .item-title{font-size:0.85rem;}
|
|
.list-block.media-list .item-title{font-size:0.75rem;}
|
|
.topicContent .list-block ul:after{height:0;}
|
|
.districtMap + .list-block.media-list span{line-height:1.2rem;}
|
|
.collection02{border:solid 1px #C3C0BC;color:#C3C0BC;}
|
|
.cardPrice01 .card-footer span{width:33%;}
|
|
.cardPrice01 .card-footer span:nth-child(2){text-align:center;}
|
|
.cardNearbyBox01 .cardNearby .card-header{padding-top:0;}
|
|
.topic .topicTitle > span.star{float:none;}
|
|
.topic .topicTitle > span.star .icon{vertical-align:middle;}
|
|
.tabs{width:100%;height:350px;}
|
|
.tabChart1{z-index:1;}
|
|
.tabChart2{z-index:-1;}
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="page-group">
|
|
<div class="page page-current" id="districtBaseInfo">
|
|
<header class="bar bar-nav barBorder">
|
|
<button class="button button-link button-nav pull-left" onclick="history.go(-1)">
|
|
<span class="icon icon-left"></span>
|
|
</button>
|
|
<h1 class="title">{{districtName}}</h1>
|
|
</header>
|
|
<div class="content">
|
|
<div class="list-block media-list topList">
|
|
<ul>
|
|
<li>
|
|
<div class="item-content">
|
|
<div class="item-inner">
|
|
<div class="item-title-row" style="max-width:80%;">
|
|
<div class="item-title"><i class="icon icon-address02"></i>{{city}}{{region}}{{address}}</div>
|
|
<div class="item-after">
|
|
<a class="button theme collection collection01">关注</a>
|
|
<a class="button collection collection02 dn">已关注</a>
|
|
</div>
|
|
</div>
|
|
<div class="item-subtitle">
|
|
<span class="tag" style="margin-top:0.5rem;">
|
|
<small v-for="tag in tags">{{tag}}</small>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="card cardPrice cardPrice01">
|
|
<div class="card-header">
|
|
<span>当前参考均价</span>
|
|
</div>
|
|
<div class="card-content">
|
|
<div class="card-content-inner">{{avgPrice}}<span>元/㎡</span></div>
|
|
</div>
|
|
<div class="card-footer">
|
|
<span>
|
|
<em v-if="oneMonthUpDownRange < 0"><strong>{{oneMonthUpDownRange*(-1)}}</strong>%<i class="icon icon-arrow-green"></i></em>
|
|
<em v-else><strong>{{oneMonthUpDownRange}}</strong>%<i class="icon icon-arrow-red"></i></em>
|
|
<label>近30天涨跌幅</label>
|
|
</span>
|
|
<span>
|
|
<em><strong>{{priceRate}}</strong></em>
|
|
<label>小区均价排名</label>
|
|
</span>
|
|
<span>
|
|
<em>低 <strong>{{cityPrice}}</strong> 元</em>
|
|
<label>相比{{city}}均价</label>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div class="topic">
|
|
<div class="topicTitle">小区走势分析</div>
|
|
<div class="topicContent" style="padding:0;">
|
|
<div class="content-block content-block01 content-block01a">
|
|
<div class="buttons-row theme">
|
|
<a href="#tabChart1" class="tab-link button active" id="tabAvgDiv">均价</a>
|
|
<a href="#tabChart2" class="tab-link button" id="tabRentDiv">租金</a>
|
|
</div>
|
|
</div>
|
|
<div class="tabs">
|
|
<div id="tabChart1" class="tab tabChart1 active">
|
|
<div class="content-block content-block01a" style="margin:0;padding-left:0;padding-right:0;">
|
|
<div class="buttons-row theme" style="padding:0 0.75rem;">
|
|
<a href="#tabChartAvg1" class="tab-link button active">半年</a>
|
|
<a href="#tabChartAvg2" class="tab-link button">一年</a>
|
|
<a href="#tabChartAvg3" class="tab-link button">三年</a>
|
|
</div>
|
|
<div class="chart" id="chart01" style="height:360px;"></div>
|
|
</div>
|
|
</div>
|
|
<div id="tabChart2" class="tab tabChart2" style="display: block;">
|
|
<div class="content-block content-block01a" style="margin:0;padding-left:0;padding-right:0;">
|
|
<div class="buttons-row theme" style="padding:0 0.75rem;">
|
|
<a href="#tabChartRent1" class="tab-link button active">半年</a>
|
|
<a href="#tabChartRent2" class="tab-link button">一年</a>
|
|
</div>
|
|
<div class="chart" id="chart02" style="margin-top:0.75rem;"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card cardPrice cardPrice02" style="border-bottom:solid 0.5rem #f3f3f3;">
|
|
<div class="card-footer">
|
|
<span>
|
|
<em><strong>有房说</strong></em>
|
|
</span>
|
|
<span>
|
|
<label style="color:#666;">本小区2月活跃度为20;价格近3个月处于下跌趋势,小区物业一般,交通不便利,所属板块为不活跃。</label>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div class="topic">
|
|
<div class="topicTitle" style="font-size:0.7rem;">小区评级结果:<span class="star"><i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star"></i></span></div>
|
|
<div class="topicContent" style="padding:0;">
|
|
<div class="chart" id="chart03"></div>
|
|
</div>
|
|
</div>
|
|
<div class="list-block" style="border-bottom:solid 0.5rem #f3f3f3;">
|
|
<ul>
|
|
<li>
|
|
<a class="item-content">
|
|
<div class="item-inner" style="padding-top:0.75rem;padding-bottom:0.25rem;">
|
|
<div class="item-title-row">
|
|
<div class="item-title">基本信息</div>
|
|
</div>
|
|
</div>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a class="item-content">
|
|
<div class="item-inner" style="padding-top:0;">
|
|
<div class="item-title-row">
|
|
<div class="item-title row">
|
|
<div class="col-50">
|
|
<p>
|
|
<label>竣工年代:</label>
|
|
<span>{{finishBuildingDate}}</span>
|
|
</p>
|
|
|
|
<p>
|
|
<label>容<small class="spacing01a"> </small>积<small class="spacing01a"> </small>率:</label>
|
|
<span>{{cubagePercent}}</span>
|
|
</p>
|
|
|
|
<p>
|
|
<label>绿<small class="spacing01a"> </small>化<small class="spacing01a"> </small>率:</label>
|
|
<span>{{virescencePercent}}</span>
|
|
</p>
|
|
|
|
<p>
|
|
<label>主力面积:</label>
|
|
<span>{{moreArea}}</span>
|
|
</p>
|
|
|
|
<p>
|
|
<label>开<small class="spacing01a"> </small>发<small class="spacing01a"> </small>商:</label>
|
|
<span class="span01">{{developer}}</span>
|
|
</p>
|
|
|
|
<p>
|
|
<label>物业公司:</label>
|
|
<span class="span01">{{estateCompany}}</span>
|
|
</p>
|
|
</div>
|
|
<div class="col-50">
|
|
<p>
|
|
<label>总<small class="spacing01a"> </small>户<small class="spacing01a"> </small>数:</label>
|
|
<span>{{householdCount}}</span>
|
|
</p>
|
|
|
|
<p>
|
|
<label>停<small class="spacing01a"> </small>车<small class="spacing01a"> </small>位:</label>
|
|
<span>{{carSiteCount}}</span>
|
|
</p>
|
|
|
|
<p>
|
|
<label>物<small class="spacing01a"> </small>业<small class="spacing01a"> </small>费:</label>
|
|
<span>{{estateCharge}}元/㎡/月</span>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="topic">
|
|
<div class="topicTitle">位置及周边</div>
|
|
<div class="topicContent" style="padding:0;">
|
|
<div class="content-block content-block01 content-block01a" id="aroundLink">
|
|
<div class="buttons-row theme">
|
|
<a href="#tabAround1" class="tab-link button active">公交</a>
|
|
<a href="#tabAround2" class="tab-link button">地铁</a>
|
|
<a href="#tabAround3" class="tab-link button">学校</a>
|
|
<a href="#tabAround4" class="tab-link button">医院</a>
|
|
<a href="#tabAround5" class="tab-link button">银行</a>
|
|
<a href="#tabAround6" class="tab-link button">购物</a>
|
|
</div>
|
|
</div>
|
|
<div class="districtMap" id="districtMap"></div>
|
|
<div class="list-block media-list">
|
|
<ul>
|
|
<li>
|
|
<a href="01_index05_around.html" class="item-link item-content">
|
|
<div class="item-inner">
|
|
<div class="item-title-row">
|
|
<div class="item-title"><i class="icon icon-address03" style="margin-right:0.3rem;"></i><span>地址:沪太路1329弄</span></div>
|
|
<div class="item-after"><span>详情</span></div>
|
|
</div>
|
|
</div>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="topic" id="nearDistDiv">
|
|
<div class="topicTitle">附近小区</div>
|
|
<div class="topicContent" style="padding:0;">
|
|
<div class="cardNearbyBox cardNearbyBox01">
|
|
<div class="cardNearbyWin">
|
|
|
|
<div class="card cardNearby" v-for="dist in nearDists">
|
|
<div class="card-header">{{dist.name}}</div>
|
|
<div class="card-content">
|
|
<div class="card-content-inner">{{dist.avgPrice}}元/㎡</div>
|
|
</div>
|
|
<div class="card-footer">距您{{dist.distance}}m</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="text/javascript" src="http://g.alicdn.com/sj/lib/zepto/zepto.js" charset="utf-8"></script>
|
|
|
|
<script>
|
|
|
|
/* 关闭路由,以实现不同页面之间的相互跳转(仅开发环境需要) */
|
|
Zepto = $
|
|
$.config = {router: false}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/javascript" src="../../js/vue.js"></script>
|
|
<script type="text/javascript" src="../../js/light7.js" charset="utf-8"></script>
|
|
<script type="text/javascript" src="../../js/cn.js" charset="utf-8"></script>
|
|
<script type="text/javascript" src="../../js/mui.min.js" charset="utf-8"></script>
|
|
<script type="text/javascript" src="../../config.js"></script>
|
|
<script type="text/javascript" src="../../js/axios.min.js"></script>
|
|
<script type="text/javascript" src="../../js/axiosPlugin.js"></script>
|
|
<script type="text/javascript" src="../../js/echarts.js"></script>
|
|
|
|
<script>
|
|
|
|
/* 获取title字数,截取title前12字,并添加... */
|
|
$(document).ready(function () {
|
|
var text = $("header .title").text();
|
|
var length = $("header .title").text().length;
|
|
var textStr = "";
|
|
if(length > 12){
|
|
textStr = text.substr(0,12);
|
|
$("header .title").text(textStr + "...");
|
|
}
|
|
});
|
|
|
|
var city = "上海"
|
|
var region = "长宁"
|
|
var name = "新泾三村"
|
|
|
|
|
|
var baseInfo = new Vue({
|
|
el: '#districtBaseInfo',
|
|
data: {
|
|
districtName : "",
|
|
city:"",
|
|
region: "",
|
|
address: "",
|
|
avgPrice:"",
|
|
oneMonthUpDownRange:"",
|
|
priceRate:"",
|
|
cityPrice:"",
|
|
finishBuildingDate:"",
|
|
householdCount:"",
|
|
cubagePercent:"",
|
|
carSiteCount:"",
|
|
virescencePercent:"",
|
|
estateCharge:"",
|
|
moreArea:"",
|
|
developer:"",
|
|
estateCompany:"",
|
|
tags:[],
|
|
nearDists:[]
|
|
}
|
|
})
|
|
|
|
loadDistrictInfo();
|
|
function loadDistrictInfo(){
|
|
axios.get("/rest/districts/detail", {
|
|
params: {
|
|
city: city,
|
|
region:region,
|
|
name: name
|
|
}
|
|
}).then(function (response) {
|
|
var vo = response.data.data
|
|
if(vo){
|
|
baseInfo.city = vo.city
|
|
baseInfo.region = vo.region
|
|
baseInfo.address = vo.address;
|
|
baseInfo.districtName = vo.name
|
|
baseInfo.avgPrice = vo.avgPrice;
|
|
baseInfo.oneMonthUpDownRange = vo.oneMonthUpDownRange;
|
|
baseInfo.priceRate = vo.priceRate;
|
|
baseInfo.cityPrice = vo.cityPrice;
|
|
|
|
var finishDate = ""
|
|
if(vo.finishBuildingDate.indexOf("~")!=-1){
|
|
finishDate = vo.finishBuildingDate.replace("年","");
|
|
}else{
|
|
finishDate = vo.finishBuildingDate.substring(0,4)+"年"
|
|
}
|
|
|
|
baseInfo.finishBuildingDate = finishDate;
|
|
baseInfo.householdCount = vo.householdCount;
|
|
baseInfo.cubagePercent = vo.cubagePercent;
|
|
baseInfo.carSiteCount = vo.carSiteCount;
|
|
baseInfo.virescencePercent = vo.virescencePercent;
|
|
baseInfo.estateCharge = vo.estateCharge;
|
|
baseInfo.moreArea = vo.moreArea;
|
|
baseInfo.developer = vo.developer;
|
|
baseInfo.estateCompany = vo.estateCompany;
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
}).catch(function (error) {
|
|
alert(error)
|
|
console.log(error);
|
|
});
|
|
}
|
|
|
|
function loadNearDistrict(lat, lng){
|
|
axios.get("/rest/districts/nearDistrict", {
|
|
params: {
|
|
lat: lat,
|
|
lng:lng
|
|
}
|
|
}).then(function (response) {
|
|
var datas = response.data.data
|
|
if(datas){
|
|
var ret = []
|
|
for(var v in datas){
|
|
var o = datas[v]
|
|
if(o.city == city && o.district == region && o.name == name){
|
|
continue;
|
|
}else{
|
|
if(ret.length <= 5){
|
|
ret.push(o);
|
|
}
|
|
}
|
|
}
|
|
baseInfo.nearDists = ret;
|
|
}else{
|
|
$("#nearDistDiv").hide()
|
|
}
|
|
|
|
}).catch(function (error) {
|
|
alert(error)
|
|
console.log(error);
|
|
});
|
|
}
|
|
|
|
|
|
/* 关注&已关注切换 */
|
|
$(".collection01").on("click", function () {
|
|
$(".collection01").hide();
|
|
$(".collection02").show();
|
|
$.toast("随时掌握小区动态");
|
|
});
|
|
$(".collection02").on("click", function () {
|
|
$(".collection02").hide();
|
|
$(".collection01").show();
|
|
$.toast("取消关注");
|
|
});
|
|
|
|
/* button状态切换 */
|
|
$(".content-block .button").on("click", function () {
|
|
$(this).parent().children().removeClass("active");
|
|
$(this).addClass("active");
|
|
});
|
|
|
|
$("#tabAvgDiv").click(function(){
|
|
$("#tabChart1").show();
|
|
$("#tabChart2").hide();
|
|
$("#tabChart1").addClass("tabChart1");
|
|
$("#tabChart1").removeClass("tabChart2");
|
|
$("#tabChart2").removeClass("tabChart1");
|
|
$("#tabChart2").addClass("tabChart2");
|
|
});
|
|
$("#tabRentDiv").click(function(){
|
|
$("#tabChart1").hide();
|
|
$("#tabChart2").show();
|
|
$("#tabChart1").addClass("tabChart2");
|
|
$("#tabChart1").removeClass("tabChart1");
|
|
$("#tabChart2").removeClass("tabChart2");
|
|
$("#tabChart2").addClass("tabChart1");
|
|
});
|
|
|
|
/* 点击位置及周边跳转到位置及周边页 */
|
|
$("#aroundLink .button").on("click", function () {
|
|
window.location.href = "01_index05_around.html";
|
|
});
|
|
|
|
/* 点击附近小区跳转到小区详情页 */
|
|
$(".cardNearby").on("click", function(){
|
|
window.location.href = "01_index04_districtDetail.html";
|
|
});
|
|
|
|
/* 地图 */
|
|
$(document).ready(function(){
|
|
// 百度地图API功能
|
|
var map0 = new BMap.Map("districtMap");
|
|
var point0 = new BMap.Point(121.430836, 31.288597);
|
|
map0.centerAndZoom(point0, 17);
|
|
map0.enableScrollWheelZoom(true); // 开启鼠标滚轮缩放
|
|
// 编写自定义函数,创建标注
|
|
var marker0 = new BMap.Marker(point0)
|
|
map0.addOverlay(marker0);
|
|
// marker0.addEventListener("click", function(){
|
|
// this.openInfoWindow(new BMap.InfoWindow('龙盛佳苑<br>沪太路1329弄<br>均价:65241元/㎡'));
|
|
// });
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
<script>
|
|
|
|
|
|
/* 小区均价分析 */
|
|
/* 小区均价分析 */
|
|
var colorList = ['#c23531', '#2f4554', '#61a0a8', '#d48265', '#91c7ae', '#749f83', '#ca8622', '#bda29a', '#6e7074', '#546570', '#c4ccd3'];
|
|
var labelFont = 'bold 12px Sans-serif';
|
|
|
|
var dates;
|
|
var data;
|
|
var volumes;
|
|
|
|
var myChart01 = echarts.init(document.getElementById('chart01'));
|
|
var curOption;
|
|
|
|
loadKLineData(city, region, name);
|
|
|
|
function loadKLineData(city, region, name){
|
|
axios.get("/rest/trend/kData", {
|
|
params: {
|
|
city: city,
|
|
region:region,
|
|
name:name
|
|
}
|
|
}).then(function (response) {
|
|
var datas = response.data.data
|
|
if(datas){
|
|
var trends = [];
|
|
var counts = [];
|
|
var times = []
|
|
var haveCount = false;
|
|
for(var d in datas){
|
|
times.push(d);
|
|
|
|
var prices = new Array();
|
|
for(var m in datas[d]){
|
|
prices.push(datas[d][m]);
|
|
}
|
|
trends.push(prices);
|
|
if(haveCount==false && datas[d][4]){
|
|
haveCount = true;
|
|
}
|
|
counts.push(datas[d][4]);
|
|
}
|
|
|
|
if(haveCount){
|
|
option01.xAxis[0].data = times
|
|
option01.xAxis[1].data = times
|
|
option01.series[0].data = counts
|
|
option01.series[1].data = trends
|
|
curOption = option01;
|
|
myChart01.setOption(option01,true);
|
|
}else{
|
|
option02.xAxis[0].data = times
|
|
option02.xAxis[1].data = times
|
|
option02.series[0].data = trends
|
|
curOption = option02;
|
|
myChart01.setOption(option02,true);
|
|
}
|
|
}
|
|
}).catch(function (error) {
|
|
alert(error)
|
|
console.log(error);
|
|
});
|
|
}
|
|
|
|
$("#trendDiv1 a").click(function(){
|
|
$("#trendDiv1 a").removeClass("active")
|
|
$(this).addClass("active")
|
|
var v = $(this).attr("t-v");
|
|
if(v == "1"){
|
|
curOption.dataZoom[0].start = 95
|
|
}else if(v == "3"){
|
|
curOption.dataZoom[0].start = 90
|
|
}else if(v == "6"){
|
|
curOption.dataZoom[0].start = 80
|
|
}else if(v == "12"){
|
|
curOption.dataZoom[0].start = 50
|
|
}else if(v == "24"){
|
|
curOption.dataZoom[0].start = 0
|
|
}
|
|
myChart01.setOption(curOption,true);
|
|
});
|
|
|
|
var option01 = {
|
|
animation: false,
|
|
color: colorList,
|
|
title: {
|
|
text: null,
|
|
left: 'center'
|
|
},
|
|
legend: {
|
|
show: false,
|
|
top: 30,
|
|
data: ['均价', '成交量']
|
|
},
|
|
tooltip: {
|
|
triggerOn: 'none',
|
|
transitionDuration: 0,
|
|
confine: true,
|
|
bordeRadius: 4,
|
|
borderWidth: 1,
|
|
borderColor: '#333',
|
|
backgroundColor: 'rgba(255,255,255,0.9)',
|
|
textStyle: {
|
|
fontSize: 12,
|
|
color: '#333'
|
|
},
|
|
formatter: function (params) {
|
|
var res = params[1].seriesName + ' ' + params[1].name;
|
|
res += '<br/> 月初 : ' + params[1].value[1];
|
|
res += '<br/> 月末 : ' + params[1].value[2];
|
|
res += '<br/> 最低 : ' + params[1].value[3];
|
|
res += '<br/> 最高 : ' + params[1].value[4];
|
|
res += '<br/> '+params[0].seriesName + ' : ' +params[0].value;
|
|
return res;
|
|
},
|
|
position: function (pos, params, el, elRect, size) {
|
|
var obj = {
|
|
top: 60
|
|
};
|
|
obj[['left', 'right'][+(pos[0] < size.viewSize[0] / 2)]] = 5;
|
|
return obj;
|
|
}
|
|
},
|
|
axisPointer: {
|
|
link: [{
|
|
xAxisIndex: [0, 1]
|
|
}]
|
|
},
|
|
dataZoom: [{
|
|
type: 'slider',
|
|
xAxisIndex: [0, 1],
|
|
realtime: false,
|
|
start: 50,
|
|
end: 100,
|
|
top: 65,
|
|
height: 20,
|
|
handleIcon: 'M10.7,11.9H9.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
|
|
handleSize: '120%'
|
|
}, {
|
|
type: 'inside',
|
|
xAxisIndex: [0, 1],
|
|
start: 40,
|
|
end: 70,
|
|
top: 30,
|
|
height: 20
|
|
}],
|
|
xAxis: [{
|
|
type: 'category',
|
|
data: dates,
|
|
boundaryGap : false,
|
|
axisLine: { lineStyle: { color: '#999' } },
|
|
axisLabel: {
|
|
formatter: function (value) {
|
|
//return echarts.format.formatTime('yy-MM', value);
|
|
}
|
|
},
|
|
min: 'dataMin',
|
|
max: 'dataMax',
|
|
axisPointer: {
|
|
show: true
|
|
}
|
|
}, {
|
|
type: 'category',
|
|
gridIndex: 1,
|
|
data: dates,
|
|
scale: true,
|
|
boundaryGap : false,
|
|
splitLine: {show: false},
|
|
axisLabel: {show: false},
|
|
axisTick: {show: false},
|
|
axisLine: { lineStyle: { color: '#999' } },
|
|
splitNumber: 20,
|
|
min: 'dataMin',
|
|
max: 'dataMax',
|
|
axisPointer: {
|
|
type: 'shadow',
|
|
label: {show: false},
|
|
triggerTooltip: true,
|
|
handle: {
|
|
show: true,
|
|
margin: 30,
|
|
color: '#B80C00'
|
|
}
|
|
}
|
|
}],
|
|
yAxis: [{
|
|
name: '均价(元/㎡)',
|
|
nameRotate: 90,
|
|
nameLocation: 'center',
|
|
nameGap: 5,
|
|
position: 'right',
|
|
nameTextStyle: {
|
|
color: '#999'
|
|
},
|
|
scale: true,
|
|
splitNumber: 2,
|
|
axisLine: { lineStyle: { color: '#999' } },
|
|
splitLine: { show: true },
|
|
axisTick: { show: false },
|
|
axisLabel: {
|
|
inside: true,
|
|
formatter: '{value}\n'
|
|
}
|
|
}, {
|
|
name: '成交量(套)',
|
|
nameRotate: 90,
|
|
nameLocation: 'center',
|
|
nameGap: 5,
|
|
position: 'right',
|
|
nameTextStyle: {
|
|
color: '#999'
|
|
},
|
|
scale: true,
|
|
gridIndex: 1,
|
|
splitNumber: 2,
|
|
axisLabel: {show: false},
|
|
axisLine: {show: false},
|
|
axisTick: {show: false},
|
|
splitLine: {show: false}
|
|
}],
|
|
grid: [{
|
|
left: 20,
|
|
right: 20,
|
|
top: 110,
|
|
height: 120
|
|
}, {
|
|
left: 20,
|
|
right: 20,
|
|
height: 40,
|
|
top: 260
|
|
}],
|
|
graphic: [{
|
|
type: 'group',
|
|
left: 'center',
|
|
top: 70,
|
|
width: 300,
|
|
bounding: 'raw'
|
|
}],
|
|
series: [{
|
|
name: '成交量',
|
|
type: 'bar',
|
|
xAxisIndex: 1,
|
|
yAxisIndex: 1,
|
|
itemStyle: {
|
|
normal: {
|
|
color: '#87cefa'
|
|
},
|
|
emphasis: {
|
|
color: 'black'
|
|
}
|
|
},
|
|
data: volumes
|
|
}, {
|
|
type: 'candlestick',
|
|
name: '均价',
|
|
data: data,
|
|
itemStyle: {
|
|
normal: {
|
|
color: '#ff4500',
|
|
color0: '#22ac38',
|
|
borderColor: '#ff4500',
|
|
borderColor0: '#22ac38'
|
|
},
|
|
emphasis: {
|
|
color: 'black',
|
|
color0: '#444',
|
|
borderColor: 'black',
|
|
borderColor0: '#444'
|
|
}
|
|
}
|
|
}]
|
|
};
|
|
|
|
var option02 = {
|
|
animation: false,
|
|
color: colorList,
|
|
title: {
|
|
text: null,
|
|
left: 'center'
|
|
},
|
|
legend: {
|
|
show: false,
|
|
top: 30,
|
|
data: ['均价']
|
|
},
|
|
tooltip: {
|
|
triggerOn: 'none',
|
|
transitionDuration: 0,
|
|
confine: true,
|
|
bordeRadius: 4,
|
|
borderWidth: 1,
|
|
borderColor: '#333',
|
|
backgroundColor: 'rgba(255,255,255,0.9)',
|
|
textStyle: {
|
|
fontSize: 12,
|
|
color: '#333'
|
|
},
|
|
formatter: function (params) {
|
|
var res = params[0].seriesName + ' ' + params[0].name;
|
|
res += '<br/> 月初 : ' + params[0].value[1]
|
|
res += '<br/> 月末 : ' + params[0].value[2];
|
|
res += '<br/> 最低 : ' + params[0].value[3];
|
|
res += '<br/> 最高 : ' + params[0].value[4];
|
|
return res;
|
|
},
|
|
position: function (pos, params, el, elRect, size) {
|
|
var obj = {
|
|
top: 60
|
|
};
|
|
obj[['left', 'right'][+(pos[0] < size.viewSize[0] / 2)]] = 5;
|
|
return obj;
|
|
}
|
|
},
|
|
axisPointer: {
|
|
link: [{
|
|
xAxisIndex: [0, 1]
|
|
}]
|
|
},
|
|
dataZoom: [{
|
|
type: 'slider',
|
|
xAxisIndex: [0, 1],
|
|
realtime: false,
|
|
start: 50,
|
|
end: 100,
|
|
top: 65,
|
|
height: 20,
|
|
handleIcon: 'M10.7,11.9H9.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
|
|
handleSize: '120%'
|
|
}, {
|
|
type: 'inside',
|
|
xAxisIndex: [0, 1],
|
|
start: 40,
|
|
end: 70,
|
|
top: 30,
|
|
height: 20
|
|
}],
|
|
xAxis: [{
|
|
type: 'category',
|
|
data: dates,
|
|
boundaryGap : false,
|
|
axisLine: { lineStyle: { color: '#999' } },
|
|
axisLabel: {
|
|
formatter: function (value) {
|
|
return echarts.format.formatTime('yy-MM', value);
|
|
}
|
|
},
|
|
min: 'dataMin',
|
|
max: 'dataMax',
|
|
axisPointer: {
|
|
show: true
|
|
}
|
|
}, {
|
|
type: 'category',
|
|
gridIndex: 1,
|
|
data: dates,
|
|
scale: true,
|
|
boundaryGap : false,
|
|
splitLine: {show: false},
|
|
axisLabel: {show: false},
|
|
axisTick: {show: false},
|
|
axisLine: { lineStyle: { color: '#fff' } },
|
|
splitNumber: 20,
|
|
min: 'dataMin',
|
|
max: 'dataMax',
|
|
axisPointer: {
|
|
type: 'shadow',
|
|
label: {show: false},
|
|
triggerTooltip: true,
|
|
handle: {
|
|
show: true,
|
|
margin: 30,
|
|
color: '#B80C00'
|
|
}
|
|
}
|
|
}],
|
|
yAxis: [{
|
|
name: '均价(元/㎡)',
|
|
nameRotate: 90,
|
|
nameLocation: 'center',
|
|
nameGap: 5,
|
|
position: 'right',
|
|
nameTextStyle: {
|
|
color: '#999'
|
|
},
|
|
scale: true,
|
|
splitNumber: 2,
|
|
axisLine: { lineStyle: { color: '#999' } },
|
|
splitLine: { show: true },
|
|
axisTick: { show: false },
|
|
axisLabel: {
|
|
inside: true,
|
|
formatter: '{value}\n'
|
|
}
|
|
}, {
|
|
name: '成交量(套)',
|
|
nameRotate: 90,
|
|
nameLocation: 'center',
|
|
nameGap: 5,
|
|
position: 'right',
|
|
nameTextStyle: {
|
|
color: '#999'
|
|
},
|
|
scale: true,
|
|
gridIndex: 1,
|
|
splitNumber: 2,
|
|
axisLabel: {show: false},
|
|
axisLine: {show: false},
|
|
axisTick: {show: false},
|
|
splitLine: {show: false}
|
|
}],
|
|
grid: [{
|
|
left: 20,
|
|
right: 20,
|
|
top: 110,
|
|
height: 120
|
|
}, {
|
|
left: 20,
|
|
right: 20,
|
|
height: 40,
|
|
top: 260
|
|
}],
|
|
graphic: [{
|
|
type: 'group',
|
|
left: 'center',
|
|
top: 70,
|
|
width: 300,
|
|
bounding: 'raw'
|
|
}],
|
|
series: [ {
|
|
type: 'candlestick',
|
|
name: '均价',
|
|
data: data,
|
|
itemStyle: {
|
|
normal: {
|
|
color: '#ff4500',
|
|
color0: '#22ac38',
|
|
borderColor: '#ff4500',
|
|
borderColor0: '#22ac38'
|
|
},
|
|
emphasis: {
|
|
color: 'black',
|
|
color0: '#444',
|
|
borderColor: 'black',
|
|
borderColor0: '#444'
|
|
}
|
|
}
|
|
}]
|
|
};
|
|
|
|
|
|
|
|
/* 小区租金走势 */
|
|
loadRentTrends(city, region, name);
|
|
function loadRentTrends(city, region, name){
|
|
axios.get("/rest/trend/distRentTrends", {
|
|
params: {
|
|
city: city,
|
|
region:region,
|
|
name:name
|
|
}
|
|
}).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 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: categories,
|
|
},
|
|
yAxis: {
|
|
type: 'value',
|
|
axisLine: {
|
|
lineStyle: {
|
|
color: '#ccc'
|
|
}
|
|
},
|
|
axisLabel: {
|
|
textStyle: {
|
|
fontFamily: 'arial',
|
|
color: '#666'
|
|
}
|
|
}
|
|
},
|
|
series:series
|
|
};
|
|
|
|
var myChart01 = echarts.init(document.getElementById('chart02'));
|
|
myChart01.setOption(option02,true);
|
|
}
|
|
|
|
/* 小区评级 */
|
|
var option03 = {
|
|
tooltip: {
|
|
trigger: 'axis',
|
|
formatter: '{d} : {c}'
|
|
},
|
|
calculable: true,
|
|
radar: [
|
|
{
|
|
indicator: [
|
|
{text: '活跃度评级', max: 100},
|
|
{text: '板块评级', max: 100},
|
|
{text: '教育评级', max: 100},
|
|
{text: '物业评级', max: 100},
|
|
],
|
|
radius: 70,
|
|
name: {
|
|
textStyle: {
|
|
color: '#333'
|
|
}
|
|
},
|
|
splitArea: {
|
|
areaStyle: {
|
|
color: ['rgba(136,208,83,0.20)',
|
|
'rgba(255,255,255,1)', 'rgba(136,208,83,0.20)',
|
|
'rgba(255,255,255,1)', 'rgba(136,208,83,0.20)'],
|
|
shadowColor: 'rgba(136,208,83,0.20)',
|
|
shadowBlur: 10
|
|
}
|
|
},
|
|
axisLine: {
|
|
lineStyle: {
|
|
color: 'rgba(136,208,83,0.50)'
|
|
}
|
|
},
|
|
splitLine: {
|
|
lineStyle: {
|
|
color: 'rgba(136,208,83,0.25)'
|
|
}
|
|
}
|
|
}
|
|
],
|
|
series: [
|
|
{
|
|
name: '',
|
|
type: 'radar',
|
|
itemStyle: {
|
|
normal: {
|
|
areaStyle: {
|
|
type: 'default'
|
|
},
|
|
color: 'rgba(136,208,83,0.9)'
|
|
}
|
|
},
|
|
data: [
|
|
{
|
|
name: '',
|
|
value: [25.29, 85.13, 36.42, 57.23]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
};
|
|
var myChart03 = echarts.init(document.getElementById('chart03'));
|
|
myChart03.setOption(option03,true);
|
|
</script>
|
|
|
|
</body>
|
|
</html> |