This commit is contained in:
2018-05-18 17:06:32 +08:00
parent b2b4fd2825
commit 3d59a57d2c
3 changed files with 38 additions and 38 deletions
+2 -2
View File
@@ -1,9 +1,9 @@
/**服务端地址**/ /**服务端地址**/
var BASE_PATH = "http://youfang.fangjia.com"; //var BASE_PATH = "http://youfang.fangjia.com";
//var BASE_PATH = "http://192.168.10.128:8084"; //var BASE_PATH = "http://192.168.10.128:8084";
//var BASE_PATH = "http://192.168.10.164:8084"; //var BASE_PATH = "http://192.168.10.164:8084";
//var BASE_PATH = "http://192.168.10.53:8084"; //var BASE_PATH = "http://192.168.10.53:8084";
//var BASE_PATH = "http://192.168.10.47:8086"; var BASE_PATH = "http://192.168.10.47:8086";
//var BASE_PATH = "http://192.168.10.161:8084"; //var BASE_PATH = "http://192.168.10.161:8084";
//var BASE_PATH = "http://192.168.10.170:8084"; //var BASE_PATH = "http://192.168.10.170:8084";
//var BASE_PATH = "http://192.168.10.171:8084"; //var BASE_PATH = "http://192.168.10.171:8084";
+35 -35
View File
@@ -1,5 +1,8 @@
var colorList = ['#c23531', '#2f4554', '#61a0a8', '#d48265', '#91c7ae', '#749f83', '#ca8622', '#bda29a', '#6e7074', '#546570', '#c4ccd3']; var colorList = ['#c23531', '#2f4554', '#61a0a8', '#d48265', '#91c7ae', '#749f83', '#ca8622', '#bda29a', '#6e7074', '#546570', '#c4ccd3'];
var labelFont = 'bold 12px Sans-serif'; var labelFont = 'bold 12px Sans-serif';
var date = new Date();
var year = date.getFullYear();
var month = date.getMonth()+1;
var dates; var dates;
var data; var data;
@@ -199,7 +202,16 @@ function doLoadKLineData(city, region, name, type){
var counts = []; var counts = [];
var times = [] var times = []
var haveCount = false; var haveCount = false;
var curMonth;
if(month<10){
curMonth = year+"-0"+month;
}else{
curMonth = year+"-"+month;
}
for(var d in datas){ for(var d in datas){
if(d == curMonth){
continue;
}
times.push(d); times.push(d);
var prices = new Array(); var prices = new Array();
@@ -268,7 +280,6 @@ function showTrends(v){
var option01 = { var option01 = {
animation: false,
color: colorList, color: colorList,
title: { title: {
text: null, text: null,
@@ -280,9 +291,6 @@ var option01 = {
data: ['均价'] data: ['均价']
}, },
tooltip: { tooltip: {
triggerOn: 'none',
transitionDuration: 0,
confine: true,
bordeRadius: 4, bordeRadius: 4,
borderWidth: 1, borderWidth: 1,
borderColor: '#333', borderColor: '#333',
@@ -292,19 +300,21 @@ var option01 = {
color: '#333' color: '#333'
}, },
formatter: function (params) { formatter: function (params) {
var res = params[0].seriesName + ' ' + params[0].name; var res = params.seriesName + ' ' + params.name;
res += '<br/> 月初 : ' + params[0].value[1]+ '元/㎡'; var vals = params.value;
res += '<br/> 月末 : ' + params[0].value[2]+ '元/㎡'; if(vals == undefined){
res += '<br/> 最低 : ' + params[0].value[3]+ '元/㎡'; var obj = params[0];
res += '<br/> 最高 : ' + params[0].value[4]+ '元/㎡'; res = obj.seriesName + ' ' + obj.name;
return res; vals = obj.value;
}, }
position: function (pos, params, el, elRect, size) { if(vals){
var obj = { res += '<br/> 月初 : ' + vals[1]+ '元/㎡';
top: 60 res += '<br/> 月末 : ' + vals[2]+ '元/㎡';
}; res += '<br/> 最低 : ' + vals[3]+ '元/㎡';
obj[['left', 'right'][+(pos[0] < size.viewSize[0] / 2)]] = 5; res += '<br/> 最高 : ' + vals[4]+ '元/㎡';
return obj; return res;
}
} }
}, },
axisPointer: { axisPointer: {
@@ -313,20 +323,10 @@ var option01 = {
}] }]
}, },
dataZoom: [{ dataZoom: [{
type: 'slider',
xAxisIndex: [0, 1],
realtime: false,
start: 1,
end: 99,
top: 5,
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', type: 'inside',
xAxisIndex: [0, 1], xAxisIndex: [0, 1],
start: 40, start: 1,
end: 70, end: 99,
top: 30, top: 30,
height: 20 height: 20
}], }],
@@ -369,7 +369,7 @@ var option01 = {
triggerTooltip: true, triggerTooltip: true,
handle: { handle: {
show: true, show: true,
margin: -70, margin: -90,
color: '#F18D00' color: '#F18D00'
} }
} }
@@ -412,7 +412,7 @@ var option01 = {
grid: [{ grid: [{
left: 20, left: 20,
right: 20, right: 20,
top: 60, top: 30,
height: 120 height: 120
}, { }, {
left: 20, left: 20,
@@ -763,7 +763,7 @@ function doLoadLineData(city, region, name, type){
function showLineChart(times, datas){ function showLineChart(times, datas){
var option01b = { var option01b = {
tooltip: { tooltip: {
triggerOn: 'none', //triggerOn: 'none',
transitionDuration: 0, transitionDuration: 0,
confine: true, confine: true,
bordeRadius: 4, bordeRadius: 4,
@@ -791,11 +791,11 @@ function showLineChart(times, datas){
y: 10, y: 10,
x2: 20, x2: 20,
y2: 60, y2: 60,
top: 60, top: 30,
height: 120 height: 120
}, },
color: ['#78CDE6'], color: ['#78CDE6'],
dataZoom: [{ /*dataZoom: [{
realtime: false, realtime: false,
start: 1, start: 1,
end: 99, end: 99,
@@ -803,7 +803,7 @@ function showLineChart(times, datas){
height: 20, 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', 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%' handleSize: '120%'
}], }],*/
xAxis: { xAxis: {
type: 'category', type: 'category',
boundaryGap: false, boundaryGap: false,
+1 -1
View File
@@ -285,7 +285,7 @@ $.config = {router: false}
var address; var address;
var tags; var tags;
var baseInfo; var baseInfo;
var rid;
var shareUrl = BASE_PATH+"/district/districtDetail?"; var shareUrl = BASE_PATH+"/district/districtDetail?";
var sharehrefTitle = "小区名"; var sharehrefTitle = "小区名";
var sharehrefDes = "小区详情介绍!"; var sharehrefDes = "小区详情介绍!";