Browse Source

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

wangqin
zhangzhang 10 months ago
parent
commit
04da0c1bbb
  1. 14
      ruoyi-ui/src/api/event/perceiveEvent.js
  2. 12
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/index.vue
  3. 19
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue
  4. 62
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue
  5. 18
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventSource/index.vue

14
ruoyi-ui/src/api/event/perceiveEvent.js

@ -78,13 +78,13 @@ export function geTwarningTotal(query) {
//感知事件源分析 //感知事件源分析
export function getWarningSourceGroup(query) { export function getWarningSourceGroup(query) {
return request({ return request({
// url: '/perceivedEvents/warning/warningSourceGroup', url: '/perceivedEvents/warning/warningSourceGroup',
// method: 'post', method: 'post',
url: '/business/warning/list', // url: '/business/warning/list',
method: 'get', // method: 'get',
// params: { params: {
// ...query, ...query,
// } }
}) })
} }

12
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/index.vue

@ -90,10 +90,19 @@ export default {
label: '工作模式', label: '工作模式',
key: "workMode", key: "workMode",
}, },
{
label: '上行工作状态',
key: "onWorkStatus",
},
{
label: '下行工作状态',
key: "inWorkStatus",
},
] ]
} }
}, },
async created() { async created() {
console.log(333,this.dialogData,444)
this.data = { ...this.dialogData, roadName: null } this.data = { ...this.dialogData, roadName: null }
getProduct(this.dialogData.productId) getProduct(this.dialogData.productId)
@ -107,6 +116,8 @@ export default {
this.requestURL(52) this.requestURL(52)
.then((result) => { .then((result) => {
this.data.workMode = { "00": "手动控制", "01": "自动控制", "02": "万年历" }[result.mode]; this.data.workMode = { "00": "手动控制", "01": "自动控制", "02": "万年历" }[result.mode];
this.data.onWorkStatus = result.onWorkStatus
this.data.inWorkStatus = result.inWorkStatus
}) })
.catch((err) => { .catch((err) => {
@ -123,7 +134,6 @@ export default {
request.post(`business/device/functions/${this.dialogData.iotDeviceId}/${functionId}`, options) request.post(`business/device/functions/${this.dialogData.iotDeviceId}/${functionId}`, options)
.then((result) => { .then((result) => {
if (result.code != 200) return reject(); if (result.code != 200) return reject();
resolve(result.data[0]); resolve(result.data[0]);
}) })
.catch((err) => { .catch((err) => {

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

@ -23,6 +23,7 @@ import Video from "@screen/components/Video";
import Form from '@screen/components/FormConfig'; import Form from '@screen/components/FormConfig';
import request from "@/utils/request"; import request from "@/utils/request";
import { Message } from "element-ui"; import { Message } from "element-ui";
import moment from "moment";
import { WarningTypeList, WarningSubclassList } from "@screen/utils/enum.js" import { WarningTypeList, WarningSubclassList } from "@screen/utils/enum.js"
// import { getRoadInfoByStakeMark, getProduct } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js" // import { getRoadInfoByStakeMark, getProduct } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"
@ -128,7 +129,7 @@ export default {
}, },
{ {
label: "持续时长:", label: "持续时长:",
key: "parseOtherConfig.duration", key: "duration",
type: "text", type: "text",
}, },
{ {
@ -164,6 +165,14 @@ export default {
}); });
}, },
convertSecToHHmmss(sec) {
let currentTime = moment.duration(sec, "seconds");
return moment({
h: currentTime.hours(),
m: currentTime.minutes(),
s: currentTime.seconds(),
}).format("HH:mm:ss");
},
getDetails() { getDetails() {
request({ request({
url: `/perceivedEvents/warning/getWarningById`, url: `/perceivedEvents/warning/getWarningById`,
@ -204,17 +213,17 @@ export default {
// "longitude": "116.493888", // "longitude": "116.493888",
// "latitude": "36.291145" // "latitude": "36.291145"
// }; // };
data.duration = this.convertSecToHHmmss(data.duration);
this.data = { ...data, roadName: null, lane: data.lane?.split(",") || [] }; this.data = { ...data, roadName: null, lane: data.lane?.split(",") || [] };
this.formList[4].options.options = WarningSubclassList[data.warningType] || []; this.formList[4].options.options = WarningSubclassList[data.warningType] || [];
setTimeout(() => { setTimeout(() => {
this.$refs.FormConfigRef.reset(true); this.$refs.FormConfigRef.reset(true);
}); });
}) })
.catch(() => { .catch((e) => {
Message.error("详情获取失败"); Message.error("详情获取失败"+e);
}) })
.finally(() => { .finally(() => {
this.loading = false; this.loading = false;

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

@ -74,6 +74,15 @@ function getMockData() {
})); }));
} }
const warningSourceMapping = {
1: '视频AI',
2: '雷达识别',
3: '锥桶',
4: '护栏碰撞',
5: '扫码报警',
6: '非机预警',
}
export default { export default {
name: "RoadNetworkMonitoring2", name: "RoadNetworkMonitoring2",
components: { components: {
@ -145,10 +154,15 @@ export default {
request({ request({
url: `/perceivedEvents/warning/perceivedEventsList`, url: `/perceivedEvents/warning/perceivedEventsList`,
method: "post", method: "post",
data: this.searchData, params: this.searchData,
data: {}
}).then((result) => { }).then((result) => {
if (result.code != 200) return Message.error(result?.msg); if (result.code != 200) return Message.error(result?.msg);
result.rows.forEach(it => {
it.stringEventSource = warningSourceMapping[it.warningSource];
})
this.data = result.rows; this.data = result.rows;
this.total = result.total; this.total = result.total;
}); });
} else { } else {
@ -234,15 +248,43 @@ export default {
}, },
firstBtnClick(id) { firstBtnClick(id) {
console.log("id", id); console.log("id", id);
request({ if (this.activeName == '-1') {
url: `/dc/system/event/${id}`, request({
method: "get", url: `/perceivedEvents/warning/getWarningById`,
}).then((result) => { method: "post",
if (result.code != 200) return Message.error(result?.msg); data: { id }
this.detailDialogFormData = result.data; }).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
this.eventDetailDialogVisible = true; data = result.data;
}); const directionMapping = {
1: '上行',
2: '中',
3: '下行'
}
data.stringEventSource = warningSourceMapping[data.warningSource];
data.stringDirection = directionMapping[data.direction] || data.direction;
this.detailDialogFormData = data;
console.log('data', this.detailDialogFormData)
this.eventDetailDialogVisible = true;
});
} else {
request({
url: `/dc/system/event/${id}`,
method: "get",
}).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
let data = result.data;
data.stringDirection = directionMapping[data.direction] || data.direction;
this.detailDialogFormData = data;
this.eventDetailDialogVisible = true;
});
}
}, },
handleClose() { handleClose() {
this.eventDetailDialogVisible = false; this.eventDetailDialogVisible = false;

18
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventSource/index.vue

@ -56,8 +56,8 @@ export default {
getWarningSourceGroup().then((res) => { getWarningSourceGroup().then((res) => {
if (res.code == 200) { if (res.code == 200) {
let data = res.rows; let data = res.data.warningSourceList;
let total = 0; let total = res.data.total;
if (data.length > 0) { if (data.length > 0) {
let chartData = [ let chartData = [
@ -90,24 +90,24 @@ export default {
] ]
data.forEach(it => { data.forEach(it => {
if (it.warningSource == 1) { if (it.warningSource == 1) {
chartData[0].average++; chartData[0].average += it.number;
} }
if (it.warningSource == 2) { if (it.warningSource == 2) {
chartData[1].average++; chartData[1].average += it.number;
} }
if (it.warningSource == 3) { if (it.warningSource == 3) {
chartData[2].average++; chartData[2].average += it.number;
} }
if (it.warningSource == 4) { if (it.warningSource == 4) {
chartData[3].average++; chartData[3].average += it.number;
} }
if (it.warningSource == 5) { if (it.warningSource == 5) {
chartData[4].average++; chartData[4].average += it.number;
} }
if (it.warningSource == 6) { if (it.warningSource == 6) {
chartData[5].average ++; chartData[5].average += it.number;
} }
total ++; // total ++;
// drawRoundRect(context, 231, 37 + (index * 27), 138, 20, 12, gr); // drawRoundRect(context, 231, 37 + (index * 27), 138, 20, 12, gr);
}) })
// console.log('data',chartData) // console.log('data',chartData)

Loading…
Cancel
Save