|
|
@ -57,7 +57,7 @@ import Pagination from "@screen/components/Pagination.vue"; |
|
|
|
import InputSearch from "@screen/components/InputSearch/index.vue"; |
|
|
|
import EventDetailDialog from "./EventDetailDialog/index"; |
|
|
|
import FormEvent from "./FormEvent/index"; |
|
|
|
import { tabMap, searchFormList } from "./data"; |
|
|
|
import { tabMap, gjSearchFormList, gzSearchFormList } from "./data"; |
|
|
|
import request from "@/utils/request"; |
|
|
|
import { Loading } from 'element-ui'; |
|
|
|
|
|
|
@ -82,6 +82,30 @@ const warningSourceMapping = { |
|
|
|
5: '扫码报警', |
|
|
|
6: '非机预警', |
|
|
|
} |
|
|
|
const directionMapping = { |
|
|
|
'1': '上行', |
|
|
|
'2': '中', |
|
|
|
'3': '下行' |
|
|
|
} |
|
|
|
const warningStateMapping = { |
|
|
|
1: '上报', |
|
|
|
2: '已完成', |
|
|
|
3: '已终止', |
|
|
|
4: '自动结束' |
|
|
|
} |
|
|
|
const warningTypeMapping = { |
|
|
|
1: '交通拥堵', |
|
|
|
2: '行人', |
|
|
|
3: '非机动车', |
|
|
|
4: '停车', |
|
|
|
5: '倒车/逆行', |
|
|
|
6: '烟火', |
|
|
|
7: '撒落物8异常天气', |
|
|
|
9: '护栏碰撞', |
|
|
|
10: '交通事故', |
|
|
|
11: '车辆故障', |
|
|
|
99: '其它', |
|
|
|
} |
|
|
|
|
|
|
|
export default { |
|
|
|
name: "RoadNetworkMonitoring2", |
|
|
@ -98,7 +122,7 @@ export default { |
|
|
|
return { |
|
|
|
data: [], |
|
|
|
total: 0, |
|
|
|
searchFormList, |
|
|
|
searchFormList: [], |
|
|
|
activeName: "-1", |
|
|
|
panels: [ |
|
|
|
{ |
|
|
@ -129,6 +153,7 @@ export default { |
|
|
|
}; |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.searchFormList = gjSearchFormList; |
|
|
|
this.getData(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
@ -136,6 +161,7 @@ export default { |
|
|
|
this.activeName = activeName; |
|
|
|
|
|
|
|
this.searchData.eventState = activeName == "-1" ? null : activeName; |
|
|
|
this.searchFormList = activeName == "-1" ? gjSearchFormList : gzSearchFormList; |
|
|
|
|
|
|
|
this.getData(activeName); |
|
|
|
}, |
|
|
@ -160,6 +186,14 @@ export default { |
|
|
|
if (result.code != 200) return Message.error(result?.msg); |
|
|
|
result.rows.forEach(it => { |
|
|
|
it.stringEventSource = warningSourceMapping[it.warningSource]; |
|
|
|
it.stringDirection = directionMapping[it.direction] || it.direction; |
|
|
|
it.startTime = it.warningTime; |
|
|
|
|
|
|
|
if (it.otherConfig) { |
|
|
|
let otherConfig = JSON.parse(it.otherConfig); |
|
|
|
it.pictures = otherConfig.pictures || []; |
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
this.data = result.rows; |
|
|
|
|
|
|
@ -255,18 +289,16 @@ export default { |
|
|
|
data: { id } |
|
|
|
}).then((result) => { |
|
|
|
if (result.code != 200) return Message.error(result?.msg); |
|
|
|
data = result.data; |
|
|
|
const directionMapping = { |
|
|
|
1: '上行', |
|
|
|
2: '中', |
|
|
|
3: '下行' |
|
|
|
} |
|
|
|
data.stringEventSource = warningSourceMapping[data.warningSource]; |
|
|
|
data.stringDirection = directionMapping[data.direction] || data.direction; |
|
|
|
let data = result.data; |
|
|
|
|
|
|
|
data.stringEventSource = warningSourceMapping[data.warningSource]; |
|
|
|
data.direction = directionMapping[data.direction] || data.direction; |
|
|
|
data.startTime = data.warningTime; |
|
|
|
data.stringEventState = warningStateMapping[data.warningState]; |
|
|
|
data.stringEventType = warningTypeMapping[data.warningType]; |
|
|
|
|
|
|
|
this.detailDialogFormData = data; |
|
|
|
console.log('data', this.detailDialogFormData) |
|
|
|
// console.log('data', this.detailDialogFormData) |
|
|
|
|
|
|
|
this.eventDetailDialogVisible = true; |
|
|
|
}); |
|
|
|