Browse Source

告警事件

wangqin
zhoule 9 months ago
parent
commit
48558ab68d
  1. 26
      ruoyi-ui/src/views/JiHeExpressway/components/RoadStateCard/index.vue
  2. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/data.js
  3. 91
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/data.js
  4. 54
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue

26
ruoyi-ui/src/views/JiHeExpressway/components/RoadStateCard/index.vue

@ -2,7 +2,8 @@
<BorderRadiusImage class='RoadStateCard' borderRadius="2px"
borderColor="linear-gradient(360deg, rgba(55, 231, 255, 0.3), rgba(55, 231, 255, 0))" borderWidth="2px">
<div class="left">
<img src="./test.png">
<!-- <img :src="cardData.pictures[0] || require(`./test.png` )"> -->
<img :src="require(`./test.png`)">
</div>
<div class="right">
<div class="info">
@ -12,11 +13,13 @@
</p>
</div>
<div class="controls">
<Button :style="{ background: firstBtnColor,width: '50%' }" @click.native="$emit('firstBtnClick', cardData.id)">{{
firstBtnText
}}</Button>
<Button v-if="cardData.state != 3" :style="{ background: lastBtnColor,width: '50%' }" @click.native="$emit('lastBtnClick', cardData.id)">{{ lastBtnText
}}</Button>
<Button :style="{ background: firstBtnColor, width: '50%' }"
@click.native="$emit('firstBtnClick', cardData.id)">{{
firstBtnText
}}</Button>
<Button v-if="cardData.state != 3" :style="{ background: lastBtnColor, width: '50%' }"
@click.native="$emit('lastBtnClick', cardData.id)">{{ lastBtnText
}}</Button>
</div>
</div>
@ -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;

2
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: {

91
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,
}
)
}),
];

54
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;
});

Loading…
Cancel
Save