diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/RoadStateCard/index.vue b/ruoyi-ui/src/views/JiHeExpressway/components/RoadStateCard/index.vue index 9529707f..4fd613a6 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/RoadStateCard/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/RoadStateCard/index.vue @@ -2,7 +2,8 @@
- + +
@@ -12,11 +13,13 @@

- - + +
@@ -69,7 +72,7 @@ export default { label: "位置" }, { - key: "direction", + key: "stringDirection", label: "方向" }, { @@ -79,6 +82,11 @@ export default { ]) } }, + data(){ + return { + picUrl: './test.png' + } + }, emit: ['firstBtnClick', "lastBtnClick"], components: { Button, @@ -123,11 +131,13 @@ export default { flex: 1; display: flex; flex-direction: column; + >p { font-size: 14px; color: #f4f4f4; line-height: 24px; - &:first-child{ + + &:first-child { color: #37E7FF; font-size: 18px; font-weight: bold; diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/data.js b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/data.js index 3d2c9ffd..81862ba7 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/data.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/data.js @@ -82,7 +82,7 @@ export const formList = [ }, { label: "事件描述:", - key: "direction", + key: "remark", type: "input", gridColumn: 3, options: { diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/data.js b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/data.js index 7b4be9ea..0add8ac7 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/data.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/data.js @@ -23,8 +23,90 @@ export const tabMap = { text: "处置记录", }, }; +export const gjSearchFormList = [ + { + label: "事件来源:", + key: "warningSource", + type: "select", + options: { + options: [ + { + key: "1", + label: "视频AI", + }, + { + key: "2", + label: "雷达识别", + }, + { + key: "3", + label: "锥桶", + }, + { + key: "4", + label: "护栏碰撞", + }, + { + key: "5", + label: "扫码报警", + }, + { + key: "6", + label: "非机预警", + }, + ], + }, + }, + { + label: "方向:", + key: "direction", + type: "RadioGroup", + options: { + options: [ + { + key: "1", + label: "上行", + }, + { + key: "3", + label: "下行", + }, + ], + }, + }, + { + label: "时间范围:", + key: "daterange", + required: false, + type: "datePicker", + options: { + type: "daterange", + format: "yyyy-MM-dd HH:mm:ss", + valueFormat: "yyyy-MM-dd HH:mm:ss", + }, + }, + { + ...PresetFormItems.station, + label: "开始桩号:", + required: false, + }, + merge(cloneDeep(PresetFormItems.station), { + options: { + options: [ + { + key: "endStakeMark[0]", + }, + { + key: "endStakeMark[1]", + }, + ], + }, + label: "结束桩号:", + required: false, + }), +]; -export const searchFormList = [ +export const gzSearchFormList = [ PresetFormItems.eventSources, PresetFormItems.eventType, { @@ -55,8 +137,8 @@ export const searchFormList = [ type: "datePicker", options: { type: "daterange", - format: 'yyyy-MM-dd HH:mm:ss', - valueFormat: 'yyyy-MM-dd HH:mm:ss' + format: "yyyy-MM-dd HH:mm:ss", + valueFormat: "yyyy-MM-dd HH:mm:ss", }, }, { @@ -77,6 +159,5 @@ export const searchFormList = [ }, label: "结束桩号:", required: false, - } - ) + }), ]; diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue index 2181248f..9e9de4fb 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue @@ -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; });