|
@ -210,8 +210,44 @@ export default { |
|
|
mounted() { |
|
|
mounted() { |
|
|
this.nowTimes(); |
|
|
this.nowTimes(); |
|
|
this.getEchart(); |
|
|
this.getEchart(); |
|
|
|
|
|
this.ajax2(); |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
|
|
|
|
|
|
ajax2() { |
|
|
|
|
|
//jquery方式 get请求 |
|
|
|
|
|
$.ajax({ |
|
|
|
|
|
type:"GET", |
|
|
|
|
|
url:"http://192.168.31.128:8866/pk/openup/OpenStatisticsController/parkingRanking", |
|
|
|
|
|
data:{"authCode":"712110694681677824"}, |
|
|
|
|
|
async:true, |
|
|
|
|
|
cache:true, |
|
|
|
|
|
dataType:"text", |
|
|
|
|
|
success:function (backdata,status,xmlHttpRequest) { |
|
|
|
|
|
console.log(backdata) |
|
|
|
|
|
}, |
|
|
|
|
|
error:function (msg) { |
|
|
|
|
|
console.log(msg) |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
//jquery方式 get请求 |
|
|
|
|
|
$.ajax({ |
|
|
|
|
|
type:"GET", |
|
|
|
|
|
url:"http://192.168.31.128:8866/pk/openup/OpenStatisticsController/todayTrafficStatistics", |
|
|
|
|
|
data:{"authCode":"712110694681677824"}, |
|
|
|
|
|
async:true, |
|
|
|
|
|
cache:true, |
|
|
|
|
|
dataType:"text", |
|
|
|
|
|
success:function (backdata,status,xmlHttpRequest) { |
|
|
|
|
|
console.log(backdata) |
|
|
|
|
|
}, |
|
|
|
|
|
error:function (msg) { |
|
|
|
|
|
console.log(msg) |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
nowTimes() { |
|
|
nowTimes() { |
|
|
this.clear(); |
|
|
this.clear(); |
|
|
let dayjs = this.dayjs() |
|
|
let dayjs = this.dayjs() |
|
@ -376,49 +412,49 @@ export default { |
|
|
["北京", this.YCData] |
|
|
["北京", this.YCData] |
|
|
].forEach((item, i) => { |
|
|
].forEach((item, i) => { |
|
|
series.push( |
|
|
series.push( |
|
|
{ |
|
|
// { |
|
|
name: item[0] + " Top3", |
|
|
// name: item[0] + " Top3", |
|
|
type: "lines", |
|
|
// type: "lines", |
|
|
zlevel: 1, |
|
|
// zlevel: 1, |
|
|
effect: { |
|
|
// effect: { |
|
|
show: true, |
|
|
// show: true, |
|
|
period: 6, |
|
|
// period: 6, |
|
|
trailLength: 0.7, |
|
|
// trailLength: 0.7, |
|
|
color: "red", //arrow箭头的颜色 |
|
|
// color: "red", //arrow箭头的颜色 |
|
|
symbolSize: 3 |
|
|
// symbolSize: 3 |
|
|
}, |
|
|
// }, |
|
|
|
|
|
// // lineStyle: { |
|
|
|
|
|
// // normal: { |
|
|
|
|
|
// // color: color[i], |
|
|
|
|
|
// // width: 0, |
|
|
|
|
|
// // curveness: 0.2 |
|
|
|
|
|
// // } |
|
|
|
|
|
// // }, |
|
|
|
|
|
// data: this.convertData(item[1]) |
|
|
|
|
|
// }, |
|
|
|
|
|
// { |
|
|
|
|
|
// name: item[0] + " Top3", |
|
|
|
|
|
// type: "lines", |
|
|
|
|
|
// zlevel: 2, |
|
|
|
|
|
// symbol: ["none", "arrow"], |
|
|
|
|
|
// symbolSize: 10, |
|
|
|
|
|
// effect: { |
|
|
|
|
|
// show: true, |
|
|
|
|
|
// period: 6, |
|
|
|
|
|
// trailLength: 0, |
|
|
|
|
|
// symbol: planePath, |
|
|
|
|
|
// symbolSize: 15 |
|
|
|
|
|
// }, |
|
|
// lineStyle: { |
|
|
// lineStyle: { |
|
|
// normal: { |
|
|
// normal: { |
|
|
// color: color[i], |
|
|
// color: color[i], |
|
|
// width: 0, |
|
|
// width: 1, |
|
|
|
|
|
// opacity: 0.6, |
|
|
// curveness: 0.2 |
|
|
// curveness: 0.2 |
|
|
// } |
|
|
// } |
|
|
// }, |
|
|
// }, |
|
|
data: this.convertData(item[1]) |
|
|
// data: this.convertData(item[1]) |
|
|
}, |
|
|
// }, |
|
|
{ |
|
|
|
|
|
name: item[0] + " Top3", |
|
|
|
|
|
type: "lines", |
|
|
|
|
|
zlevel: 2, |
|
|
|
|
|
symbol: ["none", "arrow"], |
|
|
|
|
|
symbolSize: 10, |
|
|
|
|
|
effect: { |
|
|
|
|
|
show: true, |
|
|
|
|
|
period: 6, |
|
|
|
|
|
trailLength: 0, |
|
|
|
|
|
symbol: planePath, |
|
|
|
|
|
symbolSize: 15 |
|
|
|
|
|
}, |
|
|
|
|
|
lineStyle: { |
|
|
|
|
|
normal: { |
|
|
|
|
|
color: color[i], |
|
|
|
|
|
width: 1, |
|
|
|
|
|
opacity: 0.6, |
|
|
|
|
|
curveness: 0.2 |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
data: this.convertData(item[1]) |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
{ |
|
|
name: item[0] + " Top3", |
|
|
name: item[0] + " Top3", |
|
|
type: "effectScatter", |
|
|
type: "effectScatter", |
|
@ -502,10 +538,26 @@ export default { |
|
|
|
|
|
|
|
|
myChart.setOption(option, true); |
|
|
myChart.setOption(option, true); |
|
|
|
|
|
|
|
|
|
|
|
var that = this; |
|
|
|
|
|
var dataList = echarts.getMap("china").geoJson.features; |
|
|
|
|
|
// console.log("dataList:", dataList); |
|
|
|
|
|
// 鼠标事件 |
|
|
|
|
|
myChart.on("click", function (res) { |
|
|
|
|
|
console.log("click city:", res.name); |
|
|
|
|
|
dataList.forEach((element) => { |
|
|
|
|
|
if (element.properties.name == res.name) { |
|
|
|
|
|
console.log("city code:", element.id); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
window.addEventListener("resize", () => { |
|
|
window.addEventListener("resize", () => { |
|
|
myChart.resize(); |
|
|
myChart.resize(); |
|
|
}); |
|
|
}); |
|
|
} |
|
|
}, |
|
|
|
|
|
clickGoNext() { |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
beforeDestroy() { |
|
|
beforeDestroy() { |
|
|
this.clear(); |
|
|
this.clear(); |
|
|