|
@ -74,6 +74,15 @@ function getMockData() { |
|
|
})); |
|
|
})); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const warningSourceMapping = { |
|
|
|
|
|
1: '视频AI', |
|
|
|
|
|
2: '雷达识别', |
|
|
|
|
|
3: '锥桶', |
|
|
|
|
|
4: '护栏碰撞', |
|
|
|
|
|
5: '扫码报警', |
|
|
|
|
|
6: '非机预警', |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
name: "RoadNetworkMonitoring2", |
|
|
name: "RoadNetworkMonitoring2", |
|
|
components: { |
|
|
components: { |
|
@ -145,10 +154,15 @@ export default { |
|
|
request({ |
|
|
request({ |
|
|
url: `/perceivedEvents/warning/perceivedEventsList`, |
|
|
url: `/perceivedEvents/warning/perceivedEventsList`, |
|
|
method: "post", |
|
|
method: "post", |
|
|
data: this.searchData, |
|
|
params: this.searchData, |
|
|
|
|
|
data: {} |
|
|
}).then((result) => { |
|
|
}).then((result) => { |
|
|
if (result.code != 200) return Message.error(result?.msg); |
|
|
if (result.code != 200) return Message.error(result?.msg); |
|
|
|
|
|
result.rows.forEach(it => { |
|
|
|
|
|
it.stringEventSource = warningSourceMapping[it.warningSource]; |
|
|
|
|
|
}) |
|
|
this.data = result.rows; |
|
|
this.data = result.rows; |
|
|
|
|
|
|
|
|
this.total = result.total; |
|
|
this.total = result.total; |
|
|
}); |
|
|
}); |
|
|
} else { |
|
|
} else { |
|
@ -234,15 +248,43 @@ export default { |
|
|
}, |
|
|
}, |
|
|
firstBtnClick(id) { |
|
|
firstBtnClick(id) { |
|
|
console.log("id", id); |
|
|
console.log("id", id); |
|
|
request({ |
|
|
if (this.activeName == '-1') { |
|
|
url: `/dc/system/event/${id}`, |
|
|
request({ |
|
|
method: "get", |
|
|
url: `/perceivedEvents/warning/getWarningById`, |
|
|
}).then((result) => { |
|
|
method: "post", |
|
|
if (result.code != 200) return Message.error(result?.msg); |
|
|
data: { id } |
|
|
this.detailDialogFormData = result.data; |
|
|
}).then((result) => { |
|
|
|
|
|
if (result.code != 200) return Message.error(result?.msg); |
|
|
this.eventDetailDialogVisible = true; |
|
|
data = result.data; |
|
|
}); |
|
|
const directionMapping = { |
|
|
|
|
|
1: '上行', |
|
|
|
|
|
2: '中', |
|
|
|
|
|
3: '下行' |
|
|
|
|
|
} |
|
|
|
|
|
data.stringEventSource = warningSourceMapping[data.warningSource]; |
|
|
|
|
|
data.stringDirection = directionMapping[data.direction] || data.direction; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.detailDialogFormData = data; |
|
|
|
|
|
console.log('data', this.detailDialogFormData) |
|
|
|
|
|
|
|
|
|
|
|
this.eventDetailDialogVisible = true; |
|
|
|
|
|
}); |
|
|
|
|
|
} else { |
|
|
|
|
|
request({ |
|
|
|
|
|
url: `/dc/system/event/${id}`, |
|
|
|
|
|
method: "get", |
|
|
|
|
|
}).then((result) => { |
|
|
|
|
|
if (result.code != 200) return Message.error(result?.msg); |
|
|
|
|
|
let data = result.data; |
|
|
|
|
|
data.stringDirection = directionMapping[data.direction] || data.direction; |
|
|
|
|
|
|
|
|
|
|
|
this.detailDialogFormData = data; |
|
|
|
|
|
|
|
|
|
|
|
this.eventDetailDialogVisible = true; |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
handleClose() { |
|
|
handleClose() { |
|
|
this.eventDetailDialogVisible = false; |
|
|
this.eventDetailDialogVisible = false; |
|
|