Browse Source

告警事件

wangqin
zhoule 1 year ago
parent
commit
48558ab68d
  1. 20
      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

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

@ -2,7 +2,8 @@
<BorderRadiusImage class='RoadStateCard' borderRadius="2px" <BorderRadiusImage class='RoadStateCard' borderRadius="2px"
borderColor="linear-gradient(360deg, rgba(55, 231, 255, 0.3), rgba(55, 231, 255, 0))" borderWidth="2px"> borderColor="linear-gradient(360deg, rgba(55, 231, 255, 0.3), rgba(55, 231, 255, 0))" borderWidth="2px">
<div class="left"> <div class="left">
<img src="./test.png"> <!-- <img :src="cardData.pictures[0] || require(`./test.png` )"> -->
<img :src="require(`./test.png`)">
</div> </div>
<div class="right"> <div class="right">
<div class="info"> <div class="info">
@ -12,10 +13,12 @@
</p> </p>
</div> </div>
<div class="controls"> <div class="controls">
<Button :style="{ background: firstBtnColor,width: '50%' }" @click.native="$emit('firstBtnClick', cardData.id)">{{ <Button :style="{ background: firstBtnColor, width: '50%' }"
@click.native="$emit('firstBtnClick', cardData.id)">{{
firstBtnText firstBtnText
}}</Button> }}</Button>
<Button v-if="cardData.state != 3" :style="{ background: lastBtnColor,width: '50%' }" @click.native="$emit('lastBtnClick', cardData.id)">{{ lastBtnText <Button v-if="cardData.state != 3" :style="{ background: lastBtnColor, width: '50%' }"
@click.native="$emit('lastBtnClick', cardData.id)">{{ lastBtnText
}}</Button> }}</Button>
</div> </div>
</div> </div>
@ -69,7 +72,7 @@ export default {
label: "位置" label: "位置"
}, },
{ {
key: "direction", key: "stringDirection",
label: "方向" label: "方向"
}, },
{ {
@ -79,6 +82,11 @@ export default {
]) ])
} }
}, },
data(){
return {
picUrl: './test.png'
}
},
emit: ['firstBtnClick', "lastBtnClick"], emit: ['firstBtnClick', "lastBtnClick"],
components: { components: {
Button, Button,
@ -123,11 +131,13 @@ export default {
flex: 1; flex: 1;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
>p { >p {
font-size: 14px; font-size: 14px;
color: #f4f4f4; color: #f4f4f4;
line-height: 24px; line-height: 24px;
&:first-child{
&:first-child {
color: #37E7FF; color: #37E7FF;
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;

2
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/data.js

@ -82,7 +82,7 @@ export const formList = [
}, },
{ {
label: "事件描述:", label: "事件描述:",
key: "direction", key: "remark",
type: "input", type: "input",
gridColumn: 3, gridColumn: 3,
options: { options: {

91
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/data.js

@ -23,8 +23,90 @@ export const tabMap = {
text: "处置记录", 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.eventSources,
PresetFormItems.eventType, PresetFormItems.eventType,
{ {
@ -55,8 +137,8 @@ export const searchFormList = [
type: "datePicker", type: "datePicker",
options: { options: {
type: "daterange", type: "daterange",
format: 'yyyy-MM-dd HH:mm:ss', format: "yyyy-MM-dd HH:mm:ss",
valueFormat: 'yyyy-MM-dd HH:mm:ss' valueFormat: "yyyy-MM-dd HH:mm:ss",
}, },
}, },
{ {
@ -77,6 +159,5 @@ export const searchFormList = [
}, },
label: "结束桩号:", label: "结束桩号:",
required: false, 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 InputSearch from "@screen/components/InputSearch/index.vue";
import EventDetailDialog from "./EventDetailDialog/index"; import EventDetailDialog from "./EventDetailDialog/index";
import FormEvent from "./FormEvent/index"; import FormEvent from "./FormEvent/index";
import { tabMap, searchFormList } from "./data"; import { tabMap, gjSearchFormList, gzSearchFormList } from "./data";
import request from "@/utils/request"; import request from "@/utils/request";
import { Loading } from 'element-ui'; import { Loading } from 'element-ui';
@ -82,6 +82,30 @@ const warningSourceMapping = {
5: '扫码报警', 5: '扫码报警',
6: '非机预警', 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 { export default {
name: "RoadNetworkMonitoring2", name: "RoadNetworkMonitoring2",
@ -98,7 +122,7 @@ export default {
return { return {
data: [], data: [],
total: 0, total: 0,
searchFormList, searchFormList: [],
activeName: "-1", activeName: "-1",
panels: [ panels: [
{ {
@ -129,6 +153,7 @@ export default {
}; };
}, },
created() { created() {
this.searchFormList = gjSearchFormList;
this.getData(); this.getData();
}, },
methods: { methods: {
@ -136,6 +161,7 @@ export default {
this.activeName = activeName; this.activeName = activeName;
this.searchData.eventState = activeName == "-1" ? null : activeName; this.searchData.eventState = activeName == "-1" ? null : activeName;
this.searchFormList = activeName == "-1" ? gjSearchFormList : gzSearchFormList;
this.getData(activeName); this.getData(activeName);
}, },
@ -160,6 +186,14 @@ export default {
if (result.code != 200) return Message.error(result?.msg); if (result.code != 200) return Message.error(result?.msg);
result.rows.forEach(it => { result.rows.forEach(it => {
it.stringEventSource = warningSourceMapping[it.warningSource]; 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; this.data = result.rows;
@ -255,18 +289,16 @@ export default {
data: { id } data: { id }
}).then((result) => { }).then((result) => {
if (result.code != 200) return Message.error(result?.msg); if (result.code != 200) return Message.error(result?.msg);
data = result.data; let data = result.data;
const directionMapping = {
1: '上行',
2: '中',
3: '下行'
}
data.stringEventSource = warningSourceMapping[data.warningSource];
data.stringDirection = directionMapping[data.direction] || data.direction;
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; this.detailDialogFormData = data;
console.log('data', this.detailDialogFormData) // console.log('data', this.detailDialogFormData)
this.eventDetailDialogVisible = true; this.eventDetailDialogVisible = true;
}); });

Loading…
Cancel
Save