Browse Source

Merge branch 'develop' of http://39.106.31.193:9211/mengff/jihe-hs into develop

wangqin
zhangzhang 7 months ago
parent
commit
db20711abf
  1. 104
      ruoyi-ui/src/views/JiHeExpressway/components/HeaderMenu/WarningList.vue
  2. 1
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue
  3. 36
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/dispatch/EventDetailDialog/Carousel/index.vue
  4. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/dispatch/EventDetailDialog/index.vue
  5. 111
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/index.vue
  6. 47
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue
  7. 23
      ruoyi-ui/src/views/JiHeExpressway/utils/enum.js

104
ruoyi-ui/src/views/JiHeExpressway/components/HeaderMenu/WarningList.vue

@ -6,12 +6,12 @@
</el-tabs>
<div>
<Table :data="tableData" :show-header="false">
<Table :data="tableData" :show-header="false" @cell-click="onCellClick">
<ElTableColumn prop="remark" width="280">
<template slot-scope="scope">
<div class="leftColumn">
<div class="device-icon"
:style="{ backgroundImage: `url(${require(`@screen/images/event/${activeTab == 'first' ? (WarningType[scope.row.warningType] || '交通拥堵') : '交通拥堵'}.svg`)})` }" />
:style="{ backgroundImage: `url(${require(`@screen/images/event/${activeTab == 'first' ? ('交通拥堵') : '交通拥堵'}.svg`)})` }" />
<p>{{ activeTab == 'first' ? WarningType[scope.row.warningType] : scope.row.stringEventType }}</p>
</div>
<P> {{ scope.row.remark }}</P>
@ -27,20 +27,36 @@
layout="total, sizes, prev, pager, next" :total="total">
</Pagination>
</div>
<!-- "详情"弹出框 -->
<EventDetailDialog :visible="eventDetailDialogVisible" :formData="detailDialogFormData" :activeName="activeName"
@update:value="handleDialogClose" @queryData="reData" />
</div>
</template>
<script>
import request from "@/utils/request";
import EventDetailDialog from "@screen/pages/control/event/event/EventDetailDialog/index";
import Table from '@screen/components/Table.vue';
import Pagination from '@screen/components/Pagination.vue';
import { WarningType } from "@screen/utils/enum.js";
import { Message } from "element-ui";
import { WarningType as warningTypeMapping, DirectionTypes as gzDirectionMapping, warningSourceMapping, warningStateMapping } from "@screen/utils/enum.js"
export default {
components: {
Table,
Pagination,
EventDetailDialog
},
data() {
return {
activeTab: "first",
WarningType,
eventDetailDialogVisible: false,
detailDialogFormData: {},
activeName: '-1',
tableData: [],
total: 10,
searchData: {
@ -49,10 +65,6 @@ export default {
},
};
},
components: {
Table,
Pagination
},
computed: {
},
mounted() {
@ -62,6 +74,21 @@ export default {
onChangeTab(tab, event) {
console.log(tab, event);
this.getMainData();
},
onCellClick(row, column, cell, event) {
// console.log('55', row, column, cell, event)
if (this.activeTab == 'first') {
this.activeName = '-1'
} else {
this.activeName = '0'
}
this.firstBtnClick(row.id);
},
handleDialogClose() {
this.eventDetailDialogVisible = false;
},
reData() {
},
getMainData() {
if (this.activeTab == 'first') {
@ -70,7 +97,6 @@ export default {
method: "POST",
data: {
warningState: 1,
pageNum: 1, pageSize: 10
}
})
.then((result) => {
@ -95,6 +121,70 @@ export default {
})
}
},
firstBtnClick(id) {////
console.log("id", id);
if (this.activeName == '-1') {
request({
url: `/perceivedEvents/warning/getWarningById`,//
method: "post",
data: { id }
}).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
let data = result.data;
data.stringEventSource = data?.warningSource ? warningSourceMapping[data.warningSource] : '';
data.nickName = data.userName;
data.direction = gzDirectionMapping[data.direction] || data.direction;
data.startTime = data.warningTime;
data.stringEventState = warningStateMapping[data.warningState];
data.stringEventType = warningTypeMapping[data.warningType];
data.videoList = [];
if (data.otherConfig) {
let otherConfig = JSON.parse(data.otherConfig);
data.waterFilmThickness = otherConfig.waterFilmThickness;
data.windSpeed = otherConfig.windSpeed;
data.visibility = otherConfig.visibility;
data.pictures = otherConfig.pictures || [];
data.videoList = otherConfig.videoList || [];
// data.videoList = ['https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/xgplayer_doc_video/mp4/xgplayer-demo-480p.mp4',
// 'https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/xgplayer_doc_video/mp4/xgplayer-demo-480p.mp4']
}
data.videoType = "mp4";
data.component = "Video";
this.detailDialogFormData = data;
// console.log('data', this.detailDialogFormData)
this.eventDetailDialogVisible = true;
});
} else {
request({
url: `/dc/system/event/${id}`,//
method: "get",
}).then(async (result) => {
if (result.code != 200) return Message.error(result?.msg);
let data = result.data;
data.stringDirection = gzDirectionMapping[data.direction] || data.direction;
data.startTime = data?.occurrenceTime || '';
data.videoList = [];
data.component = "VideoMulti";
// const { downCamera, upCamera } = ((await getNearCameraNew(data.stakeMark))?.data || {});//
// data.downCamId = downCamera?.camId;
// data.upCamId = upCamera?.camId;
data.videoType = "flv";
this.detailDialogFormData = data;
this.eventDetailDialogVisible = true;
});
}
},
onSizeChange(pageSize) {
this.searchData.pageSize = pageSize;
this.getMainData();

1
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue

@ -366,6 +366,7 @@ export default {
height: 190px;
gap: 15px;
justify-content: space-around;
max-width: 470px;
}
.item-video {

36
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/dispatch/EventDetailDialog/Carousel/index.vue

@ -25,24 +25,24 @@ export default {
data() {
return {
carouselItems: [
{
"imageURL": "shareWith/message-active.svg"
},
{
"imageURL": "shareWith/message.svg"
},
{
"imageURL": "shareWith/website-active.svg"
},
{
"imageURL": "shareWith/website.svg"
},
{
"imageURL": "shareWith/weChat-active.svg"
},
{
"imageURL": "shareWith/weChat-active.svg"
}
// {
// "imageURL": "shareWith/message-active.svg"
// },
// {
// "imageURL": "shareWith/message.svg"
// },
// {
// "imageURL": "shareWith/website-active.svg"
// },
// {
// "imageURL": "shareWith/website.svg"
// },
// {
// "imageURL": "shareWith/weChat-active.svg"
// },
// {
// "imageURL": "shareWith/weChat-active.svg"
// }
],
settings: {
infinite: true,

2
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/dispatch/EventDetailDialog/index.vue

@ -1,5 +1,5 @@
<template>
<Dialog v-model="modelVisible" title="事件详情" width="885px">
<Dialog v-model="modelVisible" title="事件详情" width="885px" top="7%">
<div class="EventDetail">
<Form :formList="formList" :dFormData="formData" label-width="100px" />

111
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/index.vue

@ -72,38 +72,20 @@
</div>
<!-- 确认弹窗 -->
<EventPlanDialog
:visible="isShowDialog"
:info="info"
:eventFormData="formData"
:activeName="activeName"
@reInitData="
() => {
this.$emit('update:value', false);
this.$emit('queryData', true);
}
"
@close="onCloseAddNew"
/>
<EventPlanDialog :visible="isShowDialog" :info="info" :eventFormData="formData" :activeName="activeName"
@reInitData="() => {
this.$emit('update:value', false);
this.$emit('queryData', true);
}
" @close="onCloseAddNew" />
<template #footer>
<Button
v-if="activeName == '-1' || activeName == '0'"
style="padding: 0 24px"
@click.native="onDelete"
>误报</Button
>
<Button
:style="{ backgroundColor: '#C9C9C9', padding: '0 24px' }"
@click.native="modelVisible = false"
>取消</Button
>
<Button
v-if="activeName == '-1' || activeName == '0'"
style="padding: 0 24px"
@click.native="onSubmit"
>确认</Button
>
<Button v-if="activeName == '-1' || activeName == '0'" style="padding: 0 24px"
@click.native="onDelete">误报</Button>
<Button :style="{ backgroundColor: '#C9C9C9', padding: '0 24px' }"
@click.native="modelVisible = false">取消</Button>
<Button v-if="activeName == '-1' || activeName == '0'" style="padding: 0 24px"
@click.native="onSubmit">确认</Button>
</template>
</Dialog>
</template>
@ -146,7 +128,7 @@ export default {
activeName: String,
formData: {
type: Object,
default: () => {},
default: () => { },
},
},
data() {
@ -200,7 +182,7 @@ export default {
method: "get",
params: { eventId: this.formData.id },
}).then((rows) => {
console.log('rows',rows)
console.log('rows', rows)
// if (result.code != 200) return Message.error(result?.msg);
// const rows = result.rows;
this.timeLine1List = [];
@ -296,22 +278,59 @@ export default {
}
},
onSubmit() {
return;
let url = "/business/plans/list/warning/type";
if (this.activeName == "-1") {
url = "/business/plans/list/warning/type";
// let url = "/business/plans/list/warning/type";
// if (this.activeName == "-1") {
// url = "/business/plans/list/warning/type";
// } else {
// url = "/business/plans/list/event/type";
// }
// request({
// url: url,
// method: "post",
// data: this.formData,
// }).then((result) => {
// if (result.code != 200) return Message.error(result?.msg);
// this.info = result.data;
// this.isShowDialog = true;
// });
let reData = {
id: this.formData.id,
stakeMark: this.formData.stakeMark,
direction: this.formData.direction == '济南方向' ? 3 : 1,
warningType: this.formData.warningType,
warningSource: this.formData.warningSource,
deptId: this.formData.deptId,
warningTime: this.formData.warningTime,
warningLevel: this.formData.warningLevel,
warningSubclass: this.formData.warningSubclass,
warningTitle: this.formData.warningTitle,
lane: this.formData.lane,
remark: this.formData.remark,
}
if (this.activeName == '-1') {
request({
url: '/business/warning/updateWarningConvert',
method: "post",
data: reData,
}).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
else Message.success("成功!");
this.modelVisible = false;
this.$emit("queryData", true);
});
} else {
url = "/business/plans/list/event/type";
let eventId = this.formData.id;
this.modelVisible = false;
setTimeout(() => {
this.$router.push(`/control/event/commandDispatch?eventId=${eventId}`);
// this.$router.push(`/control/event/commandDispatch`);
})
}
request({
url: url,
method: "post",
data: this.formData,
}).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
this.info = result.data;
this.isShowDialog = true;
});
},
reInitData() {
console.log("reInitData");

47
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue

@ -33,7 +33,7 @@
<!-- 内容 -->
<div class="body" v-loading>
<RoadStateCard v-for="(item, index) in data" :key="index" v-bind="getStateCardBind(item)"
@firstBtnClick="firstBtnClick" />
@firstBtnClick="firstBtnClick" @lastBtnClick="onLastBtnClick" />
</div>
<!-- 分页 -->
@ -64,29 +64,29 @@ import { tabMap, gjSearchFormList, gzSearchFormList } from "./data";
import request from "@/utils/request";
import { Message } from "element-ui";
import { Loading } from 'element-ui';
import { WarningType as warningTypeMapping, WarningSubclass as warningSubclassTypeMapping } from "@screen/utils/enum.js"
import { WarningType as warningTypeMapping, WarningSubclass as warningSubclassTypeMapping, DirectionTypes as gzDirectionMapping, warningSourceMapping, warningStateMapping } from "@screen/utils/enum.js"
import { getNearCameraNew } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"
const warningSourceMapping = {
1: '视频AI',
2: '雷达识别',
3: '锥桶',
4: '护栏碰撞',
5: '扫码报警',
6: '非机预警',
// 7: ''
}
const gzDirectionMapping = {
'1': '菏泽方向',
'2': '双向',
'3': '济南方向'
}
const warningStateMapping = {
1: '上报',
2: '已完成',
3: '已终止',
4: '自动结束'
}
// const warningSourceMapping = {
// 1: 'AI',
// 2: '',
// 3: '',
// 4: '',
// 5: '',
// 6: '',
// // 7: ''
// }
// const gzDirectionMapping = {
// '1': '',
// '2': '',
// '3': ''
// }
// const warningStateMapping = {
// 1: '',
// 2: '',
// 3: '',
// 4: ''
// }
export default {
name: "RoadNetworkMonitoring2",
@ -339,6 +339,9 @@ export default {
}
},
onLastBtnClick(id) {
this.$router.push(`/control/event/commandDispatch?eventId=${id}`);
},
handleClose() {
this.eventDetailDialogVisible = false;
},

23
ruoyi-ui/src/views/JiHeExpressway/utils/enum.js

@ -162,11 +162,28 @@ export const InfoWarningSource = {
6: {
text: "非机预警",
},
7: {
text: "气象监测器",
},
// 7: {
// text: "气象监测器",
// },
};
export const warningSourceMapping = {
1: '视频AI',
2: '雷达识别',
3: '锥桶',
4: '护栏碰撞',
5: '扫码报警',
6: '非机预警',
// 7: '气象监测器'
}
export const warningStateMapping = {
1: '上报',
2: '已完成',
3: '已终止',
4: '自动结束'
}
// 感知事件主类 warningType
export const WarningType = {
1: "交通拥堵",

Loading…
Cancel
Save