|
|
@ -147,6 +147,7 @@ export default { |
|
|
|
}, |
|
|
|
searchQuery() { |
|
|
|
let startTime = ""; |
|
|
|
let qType = this.type == 'date' ? 'day' : this.type; |
|
|
|
if (this.type == "quarter") { |
|
|
|
let year = moment().year(); |
|
|
|
if (this.quarter == 1) { |
|
|
@ -166,7 +167,7 @@ export default { |
|
|
|
|
|
|
|
//感知事件趋势 |
|
|
|
getWarningTrend({ |
|
|
|
"type": this.type, |
|
|
|
"type": qType, |
|
|
|
"sectionId": this.selectId, |
|
|
|
"createTime": startTime, |
|
|
|
"direction": this.direction, |
|
|
@ -174,6 +175,7 @@ export default { |
|
|
|
if (res.code == 200) { |
|
|
|
let data = res.data; |
|
|
|
chart1.series[0].data = []; |
|
|
|
chart1.xAxis.data = []; |
|
|
|
if (data.length > 0) { |
|
|
|
const maxObject = data.reduce((prev, current) => (current.number > prev.number ? current : prev)); |
|
|
|
let xData = []; |
|
|
@ -233,7 +235,7 @@ export default { |
|
|
|
|
|
|
|
//类型占比 |
|
|
|
getWarningSectionType({ |
|
|
|
"type": this.type, |
|
|
|
"type": qType, |
|
|
|
"sectionId": this.selectId, |
|
|
|
"createTime": startTime, |
|
|
|
"direction": this.direction, |
|
|
@ -324,14 +326,15 @@ export default { |
|
|
|
}) |
|
|
|
//路段范围内桩号分布 |
|
|
|
getSectionMarkNumber({ |
|
|
|
"type": this.type, |
|
|
|
"type": qType, |
|
|
|
"sectionId": this.selectId, |
|
|
|
"createTime": startTime, |
|
|
|
"direction": this.direction, |
|
|
|
}).then(res => { |
|
|
|
chart3.series[0].data = []; |
|
|
|
chart3.series[1].data = []; |
|
|
|
if (res.code == 200) { |
|
|
|
chart3.xAxis.data = []; |
|
|
|
if (res.code == 200 && res.data.length > 0) { |
|
|
|
let data = res.data; |
|
|
|
if (this.type != "quarter") { |
|
|
|
const maxObject = data.filter(it => it.sectionNumber > 0).reduce((prev, current) => (current.sectionNumber > prev.sectionNumber ? current : prev)); |
|
|
|