图表修改
This commit is contained in:
@@ -77,20 +77,21 @@ function removeCollect(){
|
||||
}
|
||||
|
||||
|
||||
//图表 初始化
|
||||
function inintChart(){
|
||||
var type = $("#trendDiv1 a.active").attr("t-v");
|
||||
/* 小区均价分析 */
|
||||
loadLineData(city, region, name, 6)
|
||||
loadLineData(city, region, name, type)
|
||||
/* 小区租金走势 */
|
||||
loadRentTrends(city, region, name,2);
|
||||
}
|
||||
|
||||
function clickLineChart(e){
|
||||
$("#trendDiv1 a").removeClass("active")
|
||||
$(e).addClass("active")
|
||||
function clickLineChart(type){
|
||||
|
||||
if(mode == "kLine"){
|
||||
loadKLineData(city, region, name);
|
||||
loadKLineData(city, region, name, type)
|
||||
}else if(mode == "line"){
|
||||
loadLineData(city, region, name);
|
||||
loadLineData(city, region, name, type);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -102,7 +103,8 @@ function lineChart() {
|
||||
$(".icon-chart01").show();
|
||||
$("#chart01a").css("z-index","-1");
|
||||
$("#chart01").css("z-index","1");
|
||||
loadKLineData(city, region, name);
|
||||
var type = $("#trendDiv1 a.active").attr("t-v");
|
||||
loadKLineData(city, region, name, type);
|
||||
}
|
||||
function kLineChart() {
|
||||
mode = "line"
|
||||
@@ -110,7 +112,8 @@ function kLineChart() {
|
||||
$(".icon-chart01a").show();
|
||||
$("#chart01").css("z-index","-1");
|
||||
$("#chart01a").css("z-index","1");
|
||||
|
||||
var type = $("#trendDiv1 a.active").attr("t-v");
|
||||
loadLineData(city, region, name, type);
|
||||
};
|
||||
|
||||
|
||||
@@ -127,9 +130,41 @@ function showLoadRentTrends(type) {
|
||||
}
|
||||
|
||||
|
||||
function loadKLineData(city, region, name){
|
||||
var type = $("#trendDiv1 a.active").attr("t-v");
|
||||
axios.get("/rest/trend/kData", {
|
||||
function loadKLineData(city, region, name, type){
|
||||
if(type == "36"){
|
||||
if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") {
|
||||
clicked('../user/codeSms.html',true,false,{},{},function(){
|
||||
|
||||
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
|
||||
|
||||
}else{
|
||||
$("#trendDiv1 a").removeClass("active")
|
||||
$("a[t-v='36']").addClass("active")
|
||||
doLoadKLineData(city, region, name, type)
|
||||
plus.webview.getWebviewById('views/user/userInfo.html').reload();
|
||||
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
|
||||
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
|
||||
}
|
||||
})
|
||||
return;
|
||||
} else {
|
||||
$("#trendDiv1 a").removeClass("active")
|
||||
$("a[t-v='36']").addClass("active")
|
||||
doLoadKLineData(city, region, name, type)
|
||||
}
|
||||
}else{
|
||||
$("#trendDiv1 a").removeClass("active")
|
||||
if(type == 12){
|
||||
$("a[t-v='12']").addClass("active")
|
||||
}else{
|
||||
$("a[t-v='6']").addClass("active")
|
||||
}
|
||||
doLoadKLineData(city, region, name, type)
|
||||
}
|
||||
}
|
||||
|
||||
function doLoadKLineData(city, region, name, type){
|
||||
axios.get("/rest/trend/kData", {
|
||||
params: {
|
||||
city: city,
|
||||
region:region,
|
||||
@@ -522,6 +557,7 @@ function showRentChart2(categories, series, roomDatas){
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
scale: true,
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: '#ccc'
|
||||
@@ -611,8 +647,42 @@ myChart03.setOption(option03,true);
|
||||
|
||||
|
||||
//曲线图
|
||||
function loadLineData(city, region, name){
|
||||
var type = $("#trendDiv1 a.active").attr("t-v");
|
||||
function loadLineData(city, region, name, type){
|
||||
//var type = $("#trendDiv1 a.active").attr("t-v");
|
||||
if(type == "36"){
|
||||
if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") {
|
||||
clicked('../user/codeSms.html',true,false,{},{},function(){
|
||||
|
||||
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
|
||||
|
||||
}else{
|
||||
$("#trendDiv1 a").removeClass("active")
|
||||
$("a[t-v='36']").addClass("active")
|
||||
doLoadLineData(city, region, name, type)
|
||||
plus.webview.getWebviewById('views/user/userInfo.html').reload();
|
||||
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
|
||||
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
|
||||
}
|
||||
})
|
||||
return;
|
||||
} else {
|
||||
$("#trendDiv1 a").removeClass("active")
|
||||
$("a[t-v='36']").addClass("active")
|
||||
doLoadLineData(city, region, name, type)
|
||||
}
|
||||
}else{
|
||||
$("#trendDiv1 a").removeClass("active")
|
||||
if(type == 12){
|
||||
$("a[t-v='12']").addClass("active")
|
||||
}else{
|
||||
$("a[t-v='6']").addClass("active")
|
||||
}
|
||||
doLoadLineData(city, region, name, type)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function doLoadLineData(city, region, name, type){
|
||||
axios.get("/rest/trend/distTrends", {
|
||||
params: {
|
||||
city: city,
|
||||
@@ -639,11 +709,7 @@ function loadLineData(city, region, name){
|
||||
|
||||
//option01b.xAxis.data = times
|
||||
//option01b.series.data = districtTrends
|
||||
|
||||
showLineChart(times, districtTrends);
|
||||
|
||||
|
||||
|
||||
}
|
||||
}).catch(function (error) {
|
||||
console.log(error);
|
||||
|
||||
Reference in New Issue
Block a user