Browse Source

修改部分需求2024-05-18

wangqin
王钦 9 months ago
parent
commit
0afd9781a7
  1. 12
      ruoyi-ui/src/common/menuData.js
  2. 8
      ruoyi-ui/src/views/JiHeExpressway/components/RoadStateCard/data.js
  3. 32
      ruoyi-ui/src/views/JiHeExpressway/components/RoadStateCard/images/confirmed22.svg
  4. 31
      ruoyi-ui/src/views/JiHeExpressway/components/RoadStateCard/images/processed24.svg
  5. 33
      ruoyi-ui/src/views/JiHeExpressway/components/RoadStateCard/images/processing21.svg
  6. 32
      ruoyi-ui/src/views/JiHeExpressway/components/RoadStateCard/images/toBeConfirmed23.svg
  7. 345
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue
  8. 26
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFrameControl/index.vue
  9. 10
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js
  10. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DeviceControl/components/ScopeTable.vue
  11. 10
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DeviceControl/index.vue
  12. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/data.js
  13. 124
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/index.vue
  14. 28
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/analysis/data.js
  15. 22
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/analysis/images/refresh.svg
  16. 34
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/analysis/index.vue
  17. 36
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/EventDetailDialog/Carousel/images/arrow.svg
  18. 126
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/EventDetailDialog/Carousel/index.vue
  19. 177
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/EventDetailDialog/data.js
  20. 521
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/EventDetailDialog/eventPlanDialog/index.vue
  21. 336
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/EventDetailDialog/formTable/index.vue
  22. 406
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/EventDetailDialog/index.vue
  23. 381
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/EventDetailDialog/qbbDialog/index.vue
  24. 1228
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/FormEvent/PresetFormItems.js
  25. 2537
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/FormEvent/data.js
  26. 258
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/FormEvent/index.vue
  27. 226
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/data.js
  28. 14
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/images/export.svg
  29. 9
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/images/insert.svg
  30. 22
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/images/refresh.svg
  31. 321
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/index.vue

12
ruoyi-ui/src/common/menuData.js

@ -37,6 +37,12 @@ export default [
name: "perceptionTrafficSituation",
component: "perception/trafficSituation/index.vue",
},
{
title: "感知事件分析",
path: "/perception/eventAnalysis",
name: "perceptionEventAnalysis",
component: "perception/eventAnalysis/index.vue",
},
],
},
{
@ -177,6 +183,12 @@ export default [
path: "/maintain/smart/manage",
component: "maintenanceOperations/smart/manage/index.vue",
},
{
title: "设备数据分析",
name: "deviceDataAnalysis",
path: "/maintain/smart/analysis",
component: "maintenanceOperations/smart/analysis/index.vue",
},
],
},
{

8
ruoyi-ui/src/views/JiHeExpressway/components/RoadStateCard/data.js

@ -10,4 +10,12 @@ export const statusMap = {
4: "processing",
// 待确认
5: "toBeConfirmed",
// 上报
21: "processing21",
// 已完成
22: "confirmed22",
// 已终止
23: "toBeConfirmed23",
// 自动结束
24: "processed24",
};

32
ruoyi-ui/src/views/JiHeExpressway/components/RoadStateCard/images/confirmed22.svg

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 27.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 70 67" style="enable-background:new 0 0 70 67;" xml:space="preserve">
<style type="text/css">
.st0{fill:url(#Rectangle_3543_00000027573242941979377840000008498132700452433310_);}
.st1{fill:url(#Rectangle_3545_00000108306831714505799710000016481210161124509350_);}
.st2{fill:#FFFFFF;}
.st3{font-family:'SimHei';}
.st4{font-size:12px;}
</style>
<g id="Group_1142814579">
<linearGradient id="Rectangle_3543_00000061472896844591682200000006038025238129988743_" gradientUnits="userSpaceOnUse" x1="11.787" y1="77.9443" x2="79.1132" y2="9.5398" gradientTransform="matrix(1 0 0 -1 0 67.8898)">
<stop offset="0" style="stop-color:#01E3AD"/>
<stop offset="1" style="stop-color:#01E3C8;stop-opacity:0"/>
</linearGradient>
<path id="Rectangle_3543" style="fill:url(#Rectangle_3543_00000061472896844591682200000006038025238129988743_);" d="M4.8-0.4
c-0.8-0.8-0.8-2,0-2.8l13.6-13.4c0.8-0.8,2.1-0.8,2.8,0l64.8,65.3c0.8,0.8,0.8,2,0,2.8L72.5,64.9c-0.8,0.8-2.1,0.8-2.8,0L4.8-0.4z"
/>
<linearGradient id="Rectangle_3545_00000114777316930785617910000013239311134280107166_" gradientUnits="userSpaceOnUse" x1="3.2789" y1="70.8921" x2="69.4573" y2="4.1666" gradientTransform="matrix(1 0 0 -1 0 67.8898)">
<stop offset="0" style="stop-color:#FFFFFF"/>
<stop offset="1.000000e-04" style="stop-color:#FFFFFF;stop-opacity:0"/>
<stop offset="0.4554" style="stop-color:#FFFFFF"/>
<stop offset="1" style="stop-color:#FFFFFF;stop-opacity:0"/>
</linearGradient>
<path id="Rectangle_3545" style="fill:url(#Rectangle_3545_00000114777316930785617910000013239311134280107166_);" d="M0.9-4.4
c-0.3-0.3-0.3-0.7,0-1c0.3-0.3,0.7-0.3,1,0l69.6,70.2c0.3,0.3,0.3,0.7,0,1c-0.3,0.3-0.7,0.3-1,0L0.9-4.4z"/>
</g>
<text transform="matrix(0.6974 0.7166 -0.7166 0.6974 28.0888 11.4371)" class="st2 st3 st4">已完成</text>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

31
ruoyi-ui/src/views/JiHeExpressway/components/RoadStateCard/images/processed24.svg

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 27.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 69 67" style="enable-background:new 0 0 69 67;" xml:space="preserve">
<style type="text/css">
.st0{fill:url(#Rectangle_3543_00000135670463380124271900000010923522838896704945_);}
.st1{fill:url(#Rectangle_3545_00000149381956171071755920000000984320330230580101_);}
.st2{fill:#FFFFFF;}
.st3{font-family:'SimHei';}
.st4{font-size:12px;}
</style>
<g id="Group_1142814576">
<linearGradient id="Rectangle_3543_00000078740831148408449340000013198996239226044321_" gradientUnits="userSpaceOnUse" x1="9.9588" y1="77.9443" x2="77.2851" y2="9.5397" gradientTransform="matrix(1 0 0 -1 0 67.8898)">
<stop offset="0" style="stop-color:#8B8B8B"/>
<stop offset="1" style="stop-color:#8B8B8B;stop-opacity:0"/>
</linearGradient>
<path id="Rectangle_3543" style="fill:url(#Rectangle_3543_00000078740831148408449340000013198996239226044321_);" d="M3-0.4
c-0.8-0.8-0.8-2,0-2.8l13.6-13.4c0.8-0.8,2.1-0.8,2.8,0l64.8,65.3c0.8,0.8,0.8,2,0,2.8L70.6,64.9c-0.8,0.8-2.1,0.8-2.8,0L3-0.4z"/>
<linearGradient id="Rectangle_3545_00000147204908212795541760000007381703714348779156_" gradientUnits="userSpaceOnUse" x1="3.5468" y1="68.7865" x2="67.689" y2="4.099" gradientTransform="matrix(1 0 0 -1 0 67.8898)">
<stop offset="0" style="stop-color:#FFFFFF"/>
<stop offset="1.000000e-04" style="stop-color:#FFFFFF;stop-opacity:0"/>
<stop offset="0.4554" style="stop-color:#FFFFFF"/>
<stop offset="1" style="stop-color:#FFFFFF;stop-opacity:0"/>
</linearGradient>
<path id="Rectangle_3545" style="fill:url(#Rectangle_3545_00000147204908212795541760000007381703714348779156_);" d="M1.3-2.2
C1-2.4,1-2.9,1.3-3.2c0.3-0.3,0.7-0.3,1,0l67.5,68c0.3,0.3,0.3,0.7,0,1c-0.3,0.3-0.7,0.3-1,0L1.3-2.2z"/>
</g>
<text transform="matrix(0.6947 0.7193 -0.7193 0.6947 22.8984 7.1791)" class="st2 st3 st4">自动结束</text>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

33
ruoyi-ui/src/views/JiHeExpressway/components/RoadStateCard/images/processing21.svg

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 27.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 68 67" style="enable-background:new 0 0 68 67;" xml:space="preserve">
<style type="text/css">
.st0{fill:url(#Rectangle_3543_00000053538272738649842960000009181435203724315524_);}
.st1{fill:url(#Rectangle_3545_00000042731925473050420680000005354543093107188619_);}
.st2{fill:#FFFFFF;}
.st3{font-family:'SimHei';}
.st4{font-size:12px;}
.st5{letter-spacing:1;}
</style>
<g id="Group_1142814575">
<linearGradient id="Rectangle_3543_00000014623357134123876150000007078429270906634410_" gradientUnits="userSpaceOnUse" x1="9.7959" y1="77.9317" x2="77.1225" y2="9.5524" gradientTransform="matrix(1 0 0 -1 0 67.8898)">
<stop offset="0" style="stop-color:#00B3CC"/>
<stop offset="1" style="stop-color:#00B3CC;stop-opacity:0"/>
</linearGradient>
<path id="Rectangle_3543" style="fill:url(#Rectangle_3543_00000014623357134123876150000007078429270906634410_);" d="M2.9-0.4
c-0.8-0.8-0.8-2,0-2.8l13.6-13.4c0.8-0.8,2.1-0.8,2.8,0l64.8,65.3c0.8,0.8,0.8,2,0,2.8L70.5,64.9c-0.8,0.8-2.1,0.8-2.8,0L2.9-0.4z"
/>
<linearGradient id="Rectangle_3545_00000053537988499499213120000008969392740421215395_" gradientUnits="userSpaceOnUse" x1="2.8341" y1="69.3302" x2="67.5137" y2="4.1291" gradientTransform="matrix(1 0 0 -1 0 67.8898)">
<stop offset="0" style="stop-color:#FFFFFF"/>
<stop offset="1.000000e-04" style="stop-color:#FFFFFF;stop-opacity:0"/>
<stop offset="0.4554" style="stop-color:#FFFFFF"/>
<stop offset="1" style="stop-color:#FFFFFF;stop-opacity:0"/>
</linearGradient>
<path id="Rectangle_3545" style="fill:url(#Rectangle_3545_00000053537988499499213120000008969392740421215395_);" d="M0.5-2.8
c-0.3-0.3-0.3-0.7,0-1c0.3-0.3,0.7-0.3,1,0l68,68.5c0.3,0.3,0.3,0.7,0,1c-0.3,0.3-0.7,0.3-1,0L0.5-2.8z"/>
</g>
<text transform="matrix(0.703 0.7112 -0.7112 0.703 28.8203 14.2373)" class="st2 st3 st4 st5">上报</text>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

32
ruoyi-ui/src/views/JiHeExpressway/components/RoadStateCard/images/toBeConfirmed23.svg

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 27.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 71 67" style="enable-background:new 0 0 71 67;" xml:space="preserve">
<style type="text/css">
.st0{fill:url(#Rectangle_3543_00000051376741410994204160000013762924089411596164_);}
.st1{fill:url(#Rectangle_3545_00000044885868572866352330000017989187333113817249_);}
.st2{fill:#FFFFFF;}
.st3{font-family:'SimHei';}
.st4{font-size:12px;}
</style>
<g id="Group_1142814578">
<linearGradient id="Rectangle_3543_00000100377943266825359860000014707726126855785879_" gradientUnits="userSpaceOnUse" x1="12.8443" y1="77.9443" x2="80.1706" y2="9.5397" gradientTransform="matrix(1 0 0 -1 0 67.8898)">
<stop offset="0" style="stop-color:#CB7A00"/>
<stop offset="1" style="stop-color:#CB7A00;stop-opacity:0"/>
</linearGradient>
<path id="Rectangle_3543" style="fill:url(#Rectangle_3543_00000100377943266825359860000014707726126855785879_);" d="M5.9-0.4
c-0.8-0.8-0.8-2,0-2.8l13.6-13.4c0.8-0.8,2.1-0.8,2.8,0l64.8,65.3c0.8,0.8,0.8,2,0,2.8L73.5,64.9c-0.8,0.8-2.1,0.8-2.8,0L5.9-0.4z"
/>
<linearGradient id="Rectangle_3545_00000006680004188661637840000018048924972681788824_" gradientUnits="userSpaceOnUse" x1="3.5846" y1="71.6466" x2="70.493" y2="4.1908" gradientTransform="matrix(1 0 0 -1 0 67.8898)">
<stop offset="0" style="stop-color:#FFFFFF"/>
<stop offset="1.000000e-04" style="stop-color:#FFFFFF;stop-opacity:0"/>
<stop offset="0.4554" style="stop-color:#FFFFFF"/>
<stop offset="1" style="stop-color:#FFFFFF;stop-opacity:0"/>
</linearGradient>
<path id="Rectangle_3545" style="fill:url(#Rectangle_3545_00000006680004188661637840000018048924972681788824_);" d="M1.2-5.1
c-0.3-0.3-0.3-0.7,0-1c0.3-0.3,0.7-0.3,1,0l70.4,70.9c0.3,0.3,0.3,0.7,0,1c-0.3,0.3-0.7,0.3-1,0L1.2-5.1z"/>
</g>
<text transform="matrix(0.6909 0.7229 -0.7229 0.6909 30.053 12.0698)" class="st2 st3 st4">已终止</text>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

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

@ -13,7 +13,7 @@
</div>
<template #footer>
<Button @click.native="onDelete">误报</Button>
<Button @click.native="onDelete" :loading="loading">误报</Button>
<Button style="background-color: rgba(0, 179, 204, 0.3)" @click.native="obverseVisible = false">取消</Button>
<Button @click.native="updateEvent" :loading="btnLoading">确定</Button>
</template>
@ -43,7 +43,91 @@ import { markerClusterIns } from "@screen/pages/Home/components/RoadAndEvents/ut
import { eventMap } from "@screen/pages/Home/components/RoadAndEvents/utils/buttonEvent";
let vehicleTypeList = [];
const _formList = [{
label: "报警时间:",
key: "warningTime",
type: "text",
},
{
label: "事件地点:",
key: "stakeMark",
type: "text",
},
{
label: "路段方向:",
key: "direction",
type: "text",
isAlone: true,
},
{
label: "事件来源:",
key: "warningSource",
type: "text",
enum: "InfoWarningSource",
},
{
label: "事件类型:",
key: "warningType",
type: "select",
options: {
disabled: true,
options: WarningTypeList,
},
ons: {
change: (value, { data }) => {
this.formList[5].options.options =
WarningSubclassList[value] || [];
data.warningSubclass = null;
},
},
},
{
label: "细分类型:",
key: "warningSubclass",
type: "select",
options: {
options: [],
},
},
// {
// label: ":",
// key: "vehicleType",
// type: "select",
// options: {
// options: vehicleTypeList
// },
// },
{
label: "事件描述:",
key: "remark",
options: {
type: "textarea",
maxlength: 100,
autosize: { minRows: 3, maxRows: 3 },
showWordLimit: true,
},
},
{
label: "影响车道:",
key: "lane",
type: "CheckboxGroup",
options: {
// activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: LaneOccupancyList,
gap: "12px",
},
},
{
label: "持续时长:",
key: "duration",
type: "text",
},
// {
// label: ":",
// key: "weather",
// type: "text",
// },
]
function getDuration(warningTime) {
const currentTime = moment();
const specifiedTime = moment(warningTime);
@ -94,92 +178,8 @@ export default {
// deviceVendors: "XXX",
// time: "2023/01/02 09:09:09"
},
formList: [
{
label: "报警时间:",
key: "warningTime",
type: "text",
},
{
label: "事件地点:",
key: "stakeMark",
type: "text",
},
{
label: "路段方向:",
key: "direction",
type: "text",
isAlone: true,
},
{
label: "事件来源:",
key: "warningSource",
type: "text",
enum: "InfoWarningSource",
},
{
label: "事件类型:",
key: "warningType",
type: "select",
options: {
disabled: true,
options: WarningTypeList,
},
ons: {
change: (value, { data }) => {
this.formList[5].options.options =
WarningSubclassList[value] || [];
data.warningSubclass = null;
},
},
},
{
label: "细分类型:",
key: "warningSubclass",
type: "select",
options: {
options: [],
},
},
// {
// label: ":",
// key: "vehicleType",
// type: "select",
// options: {
// options: vehicleTypeList
// },
// },
{
label: "事件描述:",
key: "remark",
options: {
type: "textarea",
maxlength: 100,
autosize: { minRows: 6, maxRows: 6 },
showWordLimit: true,
},
},
{
label: "影响车道:",
key: "lane",
type: "CheckboxGroup",
options: {
// activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: LaneOccupancyList,
gap: "12px",
},
},
{
label: "持续时长:",
key: "duration",
type: "text",
},
// {
// label: ":",
// key: "weather",
// type: "text",
// },
],
formList: [],
loading:false,
};
},
async created() {
@ -196,42 +196,116 @@ export default {
this.dialogData.pictures = otherConfig.pictures
}
console.log(1122, this.dialogData, 3344);
this.formList = [..._formList]
},
beforeDestroy() {
clearInterval(this.interval);
},
methods: {
onDelete() {
const id = this.dialogData.id;
id &&
this.$confirm("确定误报吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
request({
url: `/business/warning/delete`,
method: "post",
data: { id },
}).then((result) => {
if (result.code == 200) Message.success("成功!");
else Message.error(result?.msg);
const item = { title: "感知事件" };
eventMap[`事件专题/${item.title}_close`]?.call(
this,
item,
(item) => {
return item?.extData?.id == id;
const self = this;
if(this.formList.length === _formList.length ){
this.formList.splice(6,0,{
label: "解除类型:",
key: "relieveType",
type: "RadioGroup",
isAlone: true,
required: true,
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: "1",
label: "误报解除",
},
{
key: "2",
label: "已结束",
},
"special"
);
//
this.$root.$emit('refresh-event');
// markerClusterIns.setData();
{
key: "3",
label: "无需处理",
},
{
key: "4",
label: "其它",
}
],
},
})
this.formList.splice(7,0,{
label: "解除原因:", //
key: "relieveReason", //
isAlone: true, //
type: "input", //(el-input el-) input
options: { //elementformItem
type: "textarea",
autosize: true,
maxlength: 200,
autosize: { minRows: 3, maxRows: 3 },
showWordLimit: true,
}
})
} else {
this.$refs.FormConfigRef.validate()
.then((result) => {
this.loading = true;
request({
url: `/business/warning/falseAlarm`,
method: "post",
data: {
id: this.dialogData.id,
relieveType: result.relieveType,
relieveReason: result.relieveReason
},
}).then((result) => {
if (result.code == 200) Message.success("成功!");
else Message.error(result?.msg);
this.obverseVisible = false;
this.loading = false;
setTimeout(() => {
self.$root.$emit('delete-event');
//
self.$root.$emit('refresh-event');
}, 500);
});
})
.catch((err) => {
});
});
}
// 2024-05-18
// const id = this.dialogData.id;
// id &&
// this.$confirm("", "", {
// confirmButtonText: "",
// cancelButtonText: "",
// type: "warning",
// }).then(() => {
// request({
// url: `/business/warning/delete`,
// method: "post",
// data: { id },
// }).then((result) => {
// if (result.code == 200) Message.success("");
// else Message.error(result?.msg);
// const item = { title: "" };
// eventMap[`/${item.title}_close`]?.call(
// this,
// item,
// (item) => {
// return item?.extData?.id == id;
// },
// "special"
// );
// //
// this.$root.$emit('refresh-event');
// // markerClusterIns.setData();
// });
// });
},
getVehicleTypeList(fn) {
if (vehicleTypeList.length) {
@ -275,35 +349,6 @@ export default {
.then(({ data, code }) => {
if (code != 200) return Message.error("详情获取失败");
// data = {
// "searchValue": null,
// "createBy": null,
// "createTime": "2024-07-23 14:18:58",
// "updateBy": null,
// "updateTime": "2024-02-01 15:55:34",
// "remark": "111",
// "params": {},
// "id": "1",
// "stakeMark": "k103+900",
// "direction": "1",
// "deptId": null,
// "warningState": 1,
// "warningTime": null,
// "userId": null,
// "warningSource": 1,
// "warningLevel": null,
// "warningType": 1,
// "warningSubclass": null,
// "warningTitle": null,
// "otherConfig": null,
// "lane": null,
// "sectionName": null,
// "number": 0,
// "type": null,
// "sectionId": null,
// "longitude": "116.493888",
// "latitude": "36.291145"
// };
data.duration = this.convertSecToHHmmss(data.duration);
this.data = {
...data,
@ -334,16 +379,6 @@ export default {
},
updateEvent() {
this.btnLoading = true;
// console.log({
// id: this.dialogData.id,
// warningType: this.data.warningType,
// warningSubclass: this.data.warningSubclass,
// remark: this.data.remark,
// vehicleType: this.data.vehicleType,
// lane: this.data.lane
// })
request({
url: `/perceivedEvents/warning/updateWarning`,
method: "post",

26
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFrameControl/index.vue

@ -21,7 +21,8 @@
<span class="close" @click="() => { this.activeIcon = null; }">
<i class="el-icon-close" />
</span>
<div v-if="tabAction === '1'" style="width:70vw; min-height: 500px;">
<!-- 批量管控 -->
<div v-if="tabAction === '1'" style="width:800px; min-height: 320px;">
<Form v-model="data" labelWidth="90px" column="2" class="form" ref="FormConfigRef" :formList="formList" />
<component ref="ControlComponent" :is="componentMap[DeviceTopics[data.deviceType]]" :isMultiControl="true"
:visible="true" :selectItems="data.childType" @update:activeIcon="(val) => { this.activeIcon = val }"
@ -33,7 +34,8 @@
<Button style="background-color: rgba(0, 179, 204, 0.3)" @click.native="cancelClick"> 取消 </Button>
</div>
</div>
<div v-if="tabAction === '2'" style="width:70vw; height: 500px; overflow-y:auto" class="cardPanel">
<!-- 定时管控 -->
<div v-if="tabAction === '2'" style="width:800px; height: 320px; overflow-y:auto" class="cardPanel">
<Empty v-if="!data2.length" class="no-data" style="position: absolute">暂无数据</Empty>
<template v-else>
<div class="cardBox" v-for="(item, index) in data2" :key="index">
@ -55,20 +57,21 @@
</div>
</template>
</div>
<div v-if="tabAction === '3'" style="width:70vw;height: 500px;display: flex;flex-direction: column; justify-content: center;align-items: flex-start;" >
<!-- 管控记录 -->
<div v-if="tabAction === '3'" style="width:800px;height: 320px;display: flex;flex-direction: column; justify-content: center;align-items: flex-start;" >
<Form v-model="dataRecord" style="width:100%;" labelWidth="90px" column="2" class="form" ref="FormRecordRef" :formList="formRecord" />
<Table :data="tableData" height="500px" style="margin: 20px;width:95%">
<ElTableColumn label="管控时间" prop="operTime" width="300"/>
<ElTableColumn label="管控时间" prop="operTime" width="200"/>
<ElTableColumn label="设备名称" prop="dcDeviceName"/>
<ElTableColumn label="管控方式" prop="operType" width="200"/>
<ElTableColumn label="操作人" prop="operName" width="200"/>
<ElTableColumn label="执行结果" prop="remark" width="150" >
<ElTableColumn label="管控方式" prop="operType" width="100"/>
<ElTableColumn label="操作人" prop="operName" width="100"/>
<ElTableColumn label="执行结果" prop="remark" width="80" >
<template slot-scope="scope">
<el-popover
placement="top-start"
width="400"
width="120"
trigger="hover"
:content="scope.row.jsonResult">
:content="scope.row.remark||'暂无结果'">
<el-button slot="reference" class="btnResult">查看</el-button>
</el-popover>
</template>
@ -76,7 +79,7 @@
</Table>
<!-- 分页 -->
<div class="footer" style="margin-top:-20px;margin-bottom: 30px">
<div class="footer">
<ElPagination @current-change="bindRecord" @size-change="onSizeChange" width="'100%'" :page-sizes="[10, 20, 30, 40, 50]"
:page-size="searchData.pageSize" :current-page.sync="searchData.pageNum" layout="total, sizes, prev, pager, next"
:total="tableTotal" class="Pagination">
@ -482,6 +485,7 @@ export default {
})
.then((result) => {
if (result.code != 200) return;
console.log('########',result)
result.rows.forEach(e => {
e.operTime = moment(e.operTime).format('YYYY-MM-DD HH:mm:ss')
e.operType = _.find(this.Enum_ControlType,{key:e.operType}).label
@ -515,6 +519,7 @@ div.el-popper.global-input-search-popover {
// margin-top: 6vh;
.body {
width: 800px;
.title {
background: linear-gradient(90deg,
#237e9b 0%,
@ -523,7 +528,6 @@ div.el-popper.global-input-search-popover {
position: absolute;
top: 0;
left: 0;
width: 100%;
}
.close {

10
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js

@ -57,19 +57,16 @@ export class MarkerCluster {
if (!Array.isArray(data)) data = [data];
this.data.push(...data);
if (
!this.markerCluster ||
this.markerCluster.getMap() !== Vue.prototype.mapIns
)
){
await this.setMarkerCluster();
const map = this.getMap();
}
console.log(
"%c [ data ]-227-「map.js」",
"font-size:15px; background:#641f14; color:#a86358;",
data
"font-size:15px; background:#641f14; color:#a86358;"
);
this.markerCluster.addData(data);
console.log(
@ -78,6 +75,7 @@ export class MarkerCluster {
this.markerCluster
);
const map = this.getMap();
map.setZoom(10);
setTimeout(() => {

6
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DeviceControl/components/ScopeTable.vue

@ -29,7 +29,7 @@
style="width: 75px;"></el-input-number>
<span v-if="tableInfo.searchRule == 4" style="width: 56px;">公里</span>
</el-col>
<el-col :span="4" v-if="tableInfo.deviceType == '2'">
<el-col :span="4" v-if="tableInfo.isDefault === true && (tableInfo.deviceType == '2' || tableInfo.deviceType == 5)">
<div class="firstBtns">
<ButtonGradient class="title-button" @click.native="$emit('onConfirm', index)">
<i class="el-icon-check"></i>
@ -64,7 +64,7 @@
</div>
</el-col>
</el-row>
<!-- 设备列表 -->
<el-row v-if="tableInfo.searchRule == 1">
<!-- 设备列表 -->
<el-select v-model="tableInfo.devList" placeholder="请选择设备" multiple collapse-tags>
@ -129,7 +129,7 @@
<el-input v-model="tableInfo.zx_content" placeholder="请输入发布内容"></el-input>
</el-col>
</el-row>
<el-row v-if="tableInfo.deviceType == 2 && tableInfo.executeConfig && tableInfo.executeConfig.contentList">
<el-row v-if="(tableInfo.deviceType == 2 || tableInfo.deviceType == 5) && tableInfo.executeConfig && tableInfo.executeConfig.contentList">
<el-col :span="24">
<div class="keep-ratio" origin="top" v-for="(itm,idx) of tableInfo.executeConfig.contentList">
<div class="contentLabel" >{{ itm.deviceName }}</div>

10
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DeviceControl/index.vue

@ -147,6 +147,7 @@ export default {
data: param,
}).then(result=>{
if (result.code != 200) return Message.error(result?.msg);
console.log(param,result,'===============')
let data = result.data;
this.tableData[index].executeConfig = JSON.parse(data.executeConfig)
this.tableData[index].recoverConfig = JSON.parse(data.recoverConfig)
@ -179,6 +180,12 @@ export default {
}
let zxData = {},
hfData = {};
if(item.executeConfig){
zxData['executeConfig'] = item.executeConfig
}
if(item.recoverConfig){
zxData['recoverConfig'] = item.recoverConfig
}
Object.keys(item).forEach((key) => {
if (/^zx_/.test(key)) {
let keyName = key.substring(3);
@ -209,12 +216,13 @@ export default {
id: this.detailData.id,
eventType: this.detailData.eventType,
stakeMark: this.detailData.stakeMark,
subclass: this.detailData.subclass,
direction: this.detailData.direction == "菏泽方向" ? "1" : "3",
},
};
console.log("reqData", reqData);
// return;
return;
request({
url: "/business/plans/event/confirm",
method: "post",

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

@ -1,4 +1,4 @@
export const formList = [
export const _formList = [
{
label: "事件源:",
key: "stringEventSource",

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

@ -3,7 +3,7 @@
<div class="EventDetail" :style="{
height: activeName == '-1' || activeName == '0' ? '380px' : '698px',
}">
<Form :formList="formList" :dFormData="formData" label-width="100px" />
<Form ref="FormConfigRef" :formList="formList" :dFormData="formData" label-width="100px" />
<div class="video-pic" :style="{
height: formData.component === 'VideoMulti' ? '242px' : undefined,
@ -53,7 +53,7 @@ import Dialog from "@screen/components/Dialog/index";
import TimeLine1 from "@screen/components/TimeLine/TimeLine1/index";
import TimeLine2 from "@screen/components/TimeLine/TimeLine2/index";
import Form from "@screen/components/FormConfig";
import { formList } from "./data";
import { _formList } from "./data";
// import { timeLine2List } from "@screen/pages/control/event/commandDispatch/Cards/DisposalProcess/data.js"
import Video from "@screen/components/Video";
import VideoMulti from "@screen/components/VideoMulti";
@ -98,7 +98,7 @@ export default {
},
data() {
return {
formList,
formList:[..._formList],
isShowDialog: false,
info: [],
timeLine1List: [
@ -128,6 +128,8 @@ export default {
return this.visible;
},
set(val) {
console.log(111)
this.formList = [..._formList]
this.$emit("update:value", val);
},
},
@ -208,32 +210,59 @@ export default {
this.isShowDialog = false;
},
onDelete() {
if (this.formData.id) {
this.$confirm("确定误报吗1?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
// this.modelVisible = false;
// this.$emit('queryData', true);
// return;
if (this.activeName == "-1") {
if(this.formList[this.formList.length-1].key !== 'relieveReason' ){
this.formList.push({
label: "解除类型:",
key: "relieveType",
type: "RadioGroup",
isAlone: true,
required: true,
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: "1",
label: "误报解除",
},
{
key: "2",
label: "事件已结束",
},
{
key: "3",
label: "无需处理事件",
},
{
key: "4",
label: "其它",
}
],
},
})
this.formList.push({
label: "解除原因:", //
key: "relieveReason", //
isAlone: true, //
type: "input", //(el-input el-) input
options: { //elementformItem
type: "textarea",
autosize: true,
maxlength: 200,
autosize: { minRows: 3, maxRows: 3 },
showWordLimit: true,
}
})
} else {
this.$refs.FormConfigRef.validate()
.then((result) => {
request({
url: `/business/warning/delete`,
url: `/business/warning/falseAlarm`,
method: "post",
data: { id: this.formData.id },
}).then((result) => {
if (result.code == 200) Message.success("成功!");
else Message.error(result?.msg);
this.modelVisible = false;
this.$emit("queryData", true);
//
this.$root.$emit('delete-event');
});
} else {
request({
url: `dc/system/event/${this.formData.id}`,
method: "delete",
data: {
id: this.formData.id,
relieveType: result.relieveType,
relieveReason: result.relieveReason
},
}).then((result) => {
if (result.code == 200) Message.success("成功!");
else Message.error(result?.msg);
@ -242,9 +271,46 @@ export default {
//
this.$root.$emit('delete-event');
});
}
});
})
.catch((err) => {
});
}
// 2024-05-18
// if (this.formData.id) {
// this.$confirm("", "", {
// confirmButtonText: "",
// cancelButtonText: "",
// type: "warning",
// }).then(() => {
// if (this.activeName == "-1") {
// request({
// url: `/business/warning/delete`,
// method: "post",
// data: { id: this.formData.id },
// }).then((result) => {
// if (result.code == 200) Message.success("");
// else Message.error(result?.msg);
// this.modelVisible = false;
// this.$emit("queryData", true);
// //
// this.$root.$emit('delete-event');
// });
// } else {
// request({
// url: `dc/system/event/${this.formData.id}`,
// method: "delete",
// }).then((result) => {
// if (result.code == 200) Message.success("");
// else Message.error(result?.msg);
// this.modelVisible = false;
// this.$emit("queryData", true);
// //
// this.$root.$emit('delete-event');
// });
// }
// });
// }
},
onSubmit() {
// let url = "/business/plans/list/warning/type";

28
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/analysis/data.js

@ -0,0 +1,28 @@
// import * as PresetFormItems from "@screen/pages/control/event/event/FormEvent/PresetFormItems.js";
import * as PresetFormItems from "@screen/common/PresetFormItems.js";
// import { merge, cloneDeep } from "lodash";
import {directionOptions} from '@screen/utils/enum.js';
export const searchFormList = [
{
label: "设备名称:",
key: "deviceName",
type: "input",
default: ""
},
{
label: "物联编号:",
key: "iotDeviceId",
type: "input",
default: ""
}, {
label: "设备方向:",
key: "direction",
type: "select",
options: {
options: directionOptions,
},
},
];

22
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/analysis/images/refresh.svg

@ -0,0 +1,22 @@
<svg width="16" height="14" viewBox="0 0 16 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Group 1142814398">
<g id="Group 1142814396">
<path id="Rectangle 1304" d="M1.0437 2.41495L4.5636 2.01738L4.91112 6.00562" stroke="white" stroke-linecap="round"/>
<g id="Ellipse 835">
<mask id="path-2-inside-1_290_77" fill="white">
<path d="M4.29579 2.52494C4.09359 2.27296 3.71712 2.25216 3.51748 2.50144C2.86315 3.31847 2.39514 4.30903 2.15904 5.38649C1.87758 6.67096 1.93836 8.02122 2.3337 9.26652C2.72904 10.5118 3.44118 11.5962 4.38007 12.3826C5.16561 13.0406 6.08036 13.4652 7.0411 13.6229C7.35243 13.674 7.61901 13.4293 7.63212 13.1145C7.64523 12.7997 7.39954 12.5346 7.08935 12.4765C6.32757 12.3339 5.60349 11.9884 4.97813 11.4646C4.19938 10.8124 3.6087 9.91289 3.28078 8.87998C2.95287 7.84706 2.90245 6.72709 3.13591 5.66169C3.33404 4.75752 3.72906 3.92712 4.28182 3.24492C4.4503 3.03698 4.46523 2.7361 4.29579 2.52494Z"/>
</mask>
<path d="M4.29579 2.52494C4.09359 2.27296 3.71712 2.25216 3.51748 2.50144C2.86315 3.31847 2.39514 4.30903 2.15904 5.38649C1.87758 6.67096 1.93836 8.02122 2.3337 9.26652C2.72904 10.5118 3.44118 11.5962 4.38007 12.3826C5.16561 13.0406 6.08036 13.4652 7.0411 13.6229C7.35243 13.674 7.61901 13.4293 7.63212 13.1145C7.64523 12.7997 7.39954 12.5346 7.08935 12.4765C6.32757 12.3339 5.60349 11.9884 4.97813 11.4646C4.19938 10.8124 3.6087 9.91289 3.28078 8.87998C2.95287 7.84706 2.90245 6.72709 3.13591 5.66169C3.33404 4.75752 3.72906 3.92712 4.28182 3.24492C4.4503 3.03698 4.46523 2.7361 4.29579 2.52494Z" stroke="white" stroke-width="2" mask="url(#path-2-inside-1_290_77)"/>
</g>
</g>
<g id="Group 1142814397">
<path id="Rectangle 1304_2" d="M15.0437 11.585L11.5238 11.9826L11.1763 7.99438" stroke="white" stroke-linecap="round"/>
<g id="Ellipse 835_2">
<mask id="path-4-inside-2_290_77" fill="white">
<path d="M11.7916 11.4751C11.9938 11.727 12.3703 11.7478 12.5699 11.4986C13.2242 10.6815 13.6923 9.69097 13.9284 8.61351C14.2098 7.32904 14.149 5.97878 13.7537 4.73348C13.3584 3.48817 12.6462 2.40376 11.7073 1.61737C10.9218 0.95942 10.007 0.534814 9.0463 0.377109C8.73497 0.326006 8.46839 0.570722 8.45528 0.885536C8.44218 1.20035 8.68786 1.46544 8.99805 1.5235C9.75983 1.6661 10.4839 2.01159 11.1093 2.53538C11.888 3.18765 12.4787 4.08711 12.8066 5.12002C13.1345 6.15294 13.1849 7.27291 12.9515 8.33831C12.7534 9.24248 12.3583 10.0729 11.8056 10.7551C11.6371 10.963 11.6222 11.2639 11.7916 11.4751Z"/>
</mask>
<path d="M11.7916 11.4751C11.9938 11.727 12.3703 11.7478 12.5699 11.4986C13.2242 10.6815 13.6923 9.69097 13.9284 8.61351C14.2098 7.32904 14.149 5.97878 13.7537 4.73348C13.3584 3.48817 12.6462 2.40376 11.7073 1.61737C10.9218 0.95942 10.007 0.534814 9.0463 0.377109C8.73497 0.326006 8.46839 0.570722 8.45528 0.885536C8.44218 1.20035 8.68786 1.46544 8.99805 1.5235C9.75983 1.6661 10.4839 2.01159 11.1093 2.53538C11.888 3.18765 12.4787 4.08711 12.8066 5.12002C13.1345 6.15294 13.1849 7.27291 12.9515 8.33831C12.7534 9.24248 12.3583 10.0729 11.8056 10.7551C11.6371 10.963 11.6222 11.2639 11.7916 11.4751Z" stroke="white" stroke-width="2" mask="url(#path-4-inside-2_290_77)"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

34
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/analysis/index.vue

@ -0,0 +1,34 @@
<template>
<div class='board_record'>
TODO
</div>
</template>
<script>
import request from "@/utils/request";
export default {
name: 'boardRecord',
components: {
},
data() {
return {
}
},
created() {
},
mounted(){
},
methods: {
}
}
</script>
<style lang='scss' scoped>
.board_record {
}
</style>

36
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/EventDetailDialog/Carousel/images/arrow.svg

@ -0,0 +1,36 @@
<svg width="13" height="15" viewBox="0 0 13 15" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Group 1142814550">
<g id="Group 1142814473">
<g id="Polygon 87">
<path d="M6.16667 1.3635L12 7.49987L6.16667 13.6362" stroke="white" stroke-linecap="round"/>
<path d="M6.16667 1.3635L12 7.49987L6.16667 13.6362" stroke="url(#paint0_linear_308_1272)" stroke-linecap="round"/>
</g>
<path id="Polygon 88" d="M5 -3.57639e-07L12 7.5L5 15L5 -3.57639e-07Z" fill="url(#paint1_linear_308_1272)"/>
</g>
<g id="Group 1142814478">
<g id="Polygon 87_2">
<path d="M1.16667 1.3635L7 7.49987L1.16667 13.6362" stroke="white" stroke-linecap="round"/>
<path d="M1.16667 1.3635L7 7.49987L1.16667 13.6362" stroke="url(#paint2_linear_308_1272)" stroke-linecap="round"/>
</g>
<path id="Polygon 88_2" d="M1.0378e-06 -3.57639e-07L7 7.5L4.76837e-07 15L1.0378e-06 -3.57639e-07Z" fill="url(#paint3_linear_308_1272)"/>
</g>
</g>
<defs>
<linearGradient id="paint0_linear_308_1272" x1="10.8868" y1="7.72029" x2="6.30026" y2="7.72029" gradientUnits="userSpaceOnUse">
<stop stop-color="#39D5BF"/>
<stop offset="1" stop-color="#1FAED6"/>
</linearGradient>
<linearGradient id="paint1_linear_308_1272" x1="12" y1="7.5" x2="5" y2="7.5" gradientUnits="userSpaceOnUse">
<stop stop-color="#3AD6C0"/>
<stop offset="1" stop-color="#20AFD7" stop-opacity="0"/>
</linearGradient>
<linearGradient id="paint2_linear_308_1272" x1="5.88677" y1="7.72029" x2="1.30026" y2="7.72029" gradientUnits="userSpaceOnUse">
<stop stop-color="#39D5BF"/>
<stop offset="1" stop-color="#1FAED6"/>
</linearGradient>
<linearGradient id="paint3_linear_308_1272" x1="7" y1="7.5" x2="7.57319e-07" y2="7.5" gradientUnits="userSpaceOnUse">
<stop stop-color="#3AD6C0"/>
<stop offset="1" stop-color="#20AFD7" stop-opacity="0"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

126
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/EventDetailDialog/Carousel/index.vue

@ -0,0 +1,126 @@
<template>
<div class="Carousel">
<img src="./images/arrow.svg" @click="prevSlide" class="arrow" />
<VueSlickCarousel v-if="pictures.length > 0" v-bind="settings" ref="CarouselRef" class="vueSlickCarousel">
<div v-for="(item, index) in pictures" :key="index" class="item">
<!-- <img :src="require(`@screen/images/${item}`)" style="height: 100%"> -->
<!-- <img :src="item" style="height: 100%"> -->
<el-image style="height: 100%" :src="item" :preview-src-list="pictures">
</el-image>
</div>
</VueSlickCarousel>
<VueSlickCarousel v-if="videos.length > 0" v-bind="videoSettings" ref="CarouselRef" class="vueSlickCarousel">
<div v-for="(item, index) in videos " :key="index" class="item">
<Video style="height: 100%;" :showHeader="false" :url="item || ''" videoType="mp4" />
</div>
</VueSlickCarousel>
<img src="./images/arrow.svg" @click="nextSlide" class="arrow" />
</div>
</template>
<script>
import VueSlickCarousel from 'vue-slick-carousel'
import 'vue-slick-carousel/dist/vue-slick-carousel.css'
// optional style for arrows & dots
import 'vue-slick-carousel/dist/vue-slick-carousel-theme.css'
import Video from "@screen/components/Video";
export default {
name: "Carousel",
components: { VueSlickCarousel, Video },
props: {
pictures: {
type: Array,
default: () => [
// "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
// "https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg",
// "require('@screen/images/shareWith/message-active.svg')",
// "require('@screen/images/shareWith/message.svg')",
// "require('@screen/images/shareWith/website-active.svg')",
// "require('@screen/images/shareWith/website.svg')",
// "require('@screen/images/shareWith/weChat-active.svg')",
// "require('@screen/images/shareWith/weChat-active.svg')"
]
},
videos: {
type: Array,
default: () => []
},
},
data() {
return {
carouselItems: [],
settings: {
infinite: true,
arrows: false,
speed: 600,
slidesToShow: 1,
slidesToScroll: 1,
autoplay: true,
autoplaySpeed: 1800,
},
videoSettings: {
infinite: true,
arrows: false,
speed: 600,
slidesToShow: 1,
slidesToScroll: 1,
autoplay: false,
autoplaySpeed: 1800,
}
}
},
methods: {
prevSlide() {
this.$refs.CarouselRef.prev()
},
nextSlide() {
// console.log('pics',this.pictures)
this.$refs.CarouselRef.next()
},
},
}
</script>
<style lang="scss" scoped>
.Carousel {
width: 100%;
overflow: hidden;
display: flex;
gap: 9px;
.vueSlickCarousel {
flex: 1;
overflow: hidden;
::v-deep {
.slick-list {
height: 100%;
div {
height: 100%;
}
}
}
.item {
img {
height: 100%;
}
}
}
.arrow {
cursor: pointer;
width: 15px;
&:first-child {
transform: rotate(-180deg)
}
}
}
</style>

177
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/EventDetailDialog/data.js

@ -0,0 +1,177 @@
export const _formList = [
{
label: "事件源:",
key: "stringEventSource",
type: "input",
options: {
disabled: true,
placeholder: "",
},
},
{
label: "桩号:",
key: "stakeMark",
type: "input",
options: {
disabled: true,
placeholder: "",
},
},
{
label: "行驶方向:",
key: "direction",
type: "input",
options: {
disabled: true,
placeholder: "",
},
},
{
label: "事件类型:",
key: "stringEventType",
type: "input",
options: {
disabled: true,
placeholder: "",
},
},
{
label: "高速名称:",
key: "roadName",
type: "input",
options: {
disabled: true,
placeholder: "",
},
},
{
label: "事件状态:",
key: "stringEventState",
type: "input",
options: {
disabled: true,
placeholder: "",
},
},
{
label: "操作员:",
key: "nickName",
type: "input",
options: {
disabled: true,
placeholder: "",
},
},
{
label: "发生时间:",
key: "startTime",
type: "input",
options: {
disabled: true,
placeholder: "",
},
},
{
label: "预计结束时间:",
key: "estimatedEndTime",
type: "input",
options: {
disabled: true,
placeholder: "",
},
},
{
label: "水膜厚度(mm):",
key: "waterFilmThickness",
type: "input",
options: {
disabled: true,
placeholder: "",
},
visible: (data) => {
if (data?.waterFilmThickness) {
return true;
}
return false;
},
},
{
label: "风速:",
key: "windSpeed",
type: "input",
options: {
disabled: true,
placeholder: "",
},
visible: (data) => {
if (data?.windSpeed) {
return true;
}
return false;
},
},
{
label: "能见度(m):",
key: "visibility",
type: "input",
options: {
disabled: true,
placeholder: "",
},
visible: (data) => {
if (data?.visibility) {
return true;
}
return false;
},
},
{
label: "事件描述:",
key: "remark",
type: "input",
isAlone: true,
gridColumn: 3,
options: {
disabled: true,
placeholder: "",
},
},
];
export const timeLine1List = [
{
time: "16.36",
label: "接警记录",
isActive: false,
},
{
time: "16.36",
label: "指令下达",
isActive: false,
},
{
time: "16.36",
label: "清障到达",
isActive: false,
},
{
time: "",
label: "安全防护",
isActive: false,
},
{
time: "",
label: "开始清障",
isActive: false,
},
{
time: "",
label: "清障结束",
isActive: false,
},
{
time: "",
label: "恢复畅通",
isActive: false,
},
];

521
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/EventDetailDialog/eventPlanDialog/index.vue

@ -0,0 +1,521 @@
<template>
<Dialog v-model="modelVisible" :title="title" width="880px">
<div class="EventAddPlanDialog">
<div class="first">
<el-radio-group v-model="planName" @input="changeRadio">
<el-radio-button
v-for="item in info"
:key="item.id"
:label="item.planName"
></el-radio-button>
</el-radio-group>
</div>
<div class="second">
<el-row>
<el-col :span="2">
<div class="text">联动设备:</div>
</el-col>
<el-col :span="22">
<FormTable
ref="secondFormTable"
:tableData="secondFormData"
:type="1"
></FormTable>
</el-col>
</el-row>
</div>
<div class="third">
<el-row>
<el-col :span="2">
<div class="text">恢复操作:</div>
</el-col>
<el-col :span="22">
<FormTable
ref="thirdFormTable"
:tableData="thirdFormData"
:type="2"
></FormTable>
</el-col>
</el-row>
</div>
</div>
<template #footer>
<!-- <Button v-if="isDisBtn" style="padding:0 24px; pointer-events: none; background-color: #C9C9C9;"
@click.native="handleRestore" :loading="submitting">强制恢复</Button> -->
<Button
style="padding: 0 24px"
@click.native="handleSubmit(2)"
:loading="submitting"
>强制恢复</Button
>
<Button
style="padding: 0 24px"
@click.native="handleSubmit(1)"
:loading="submitting"
>确认</Button
>
<Button
style="background: #c9c9c9; padding: 0 24px"
@click.native="(modelVisible = false), (submitting = false)"
>取消</Button
>
</template>
</Dialog>
</template>
<script>
import Dialog from "@screen/components/Dialog/index";
import FormTable from "../formTable/index.vue";
import Button from "@screen/components/Buttons/Button.vue";
import request from "@/utils/request";
import { Message } from "element-ui";
import { throttle } from "lodash";
export default {
name: "eventPlanDialog",
components: {
Dialog,
Button,
FormTable,
},
model: {
prop: "visible",
event: "close",
},
provide() {
return {
loadData: throttle(this.loadData, 1000),
getAutomatic: this.getTemplateAutomatic,
getOriginal: this.getBoardOriginal,
};
},
props: {
visible: Boolean,
activeName: String,
info: {
type: Array,
default: () => [],
},
eventFormData: {
type: Object,
default: () => {},
},
},
data() {
return {
title: "事件确认",
isDisBtn: true,
dialogType: 1,
planId: 0,
planInfo: {},
submitting: false,
secondFormData: [
{
deviceType: 1,
searchRule: 1,
qbb: "",
},
],
thirdFormData: [
{
deviceType: 1,
searchRule: 1,
qbb: "",
},
],
planName: "",
automaticInfo: {},
dcExecuteAction: [],
deviceData: [],
automaticData: {},
boardOriginalData: {},
eventOptions: [
{
value: 1,
label: "异常天气",
},
{
value: 2,
label: "交通事故",
},
{
value: 3,
label: "非法上路",
},
{
value: 4,
label: "车辆故障",
},
{
value: 5,
label: "交通拥堵",
},
{
value: 6,
label: "交通管制",
},
{
value: 7,
label: "服务区异常",
},
{
value: 8,
label: "施工建设",
},
{
value: 9,
label: "路障清除",
},
],
mechanismOptions: [
{
value: 1,
label: "雨",
},
{
value: 2,
label: "雪",
},
{
value: 3,
label: "雾",
},
{
value: 4,
label: "大风",
},
{
value: 5,
label: "低温寒潮",
},
{
value: 6,
label: "路面积雪",
},
{
value: 7,
label: "路面结冰",
},
{
value: 8,
label: "路面积水",
},
{
value: 9,
label: "其他",
},
],
conditionOptions: [
// {
// value: 1,
// label: '(>)'
// },
{
value: 1,
label: "小于(<)",
},
],
};
},
mounted() {},
computed: {
modelVisible: {
get() {
if (this.visible) {
if (this.info.length > 0) {
this.planName = this.info[0]?.planName || "";
this.planInfo = this.info[0];
this.initData(this.info[0]);
}
}
return this.visible;
},
set(val) {
this.$emit("close", val);
},
},
},
methods: {
initData(data) {
console.log("data", data);
if (!data) return;
// this.planId = data.id;
let dcExecuteAction = data.dcExecuteAction;
let secondFormData = [];
let thirdFormData = [];
dcExecuteAction.forEach((it) => {
let action = { ...it };
if (it.otherConfig) {
let config = JSON.parse(it.otherConfig);
let qbb = "";
if (config.id) {
qbb = config.content;
config = { dcInfoBoardTemplate: config };
}
// if (config.state) {
// config.gzms = config.state
// }
action = { ...it, ...config, qbb: qbb };
}
if (it.deviceList) {
action.deviceList = it.deviceList
.split(",")
.map((str) => Number(str));
}
if (it.actionType == 1) {
secondFormData.push(action);
} else if (it.actionType == 2) {
thirdFormData.push({
...action,
qbb: "默认恢复该情报板上次常态化信息",
});
}
});
this.secondFormData = secondFormData;
this.thirdFormData = thirdFormData;
},
async loadData() {
if (this.deviceData.length <= 0) {
let result = await request({
url: `business/device/query?deviceType=2`,
method: "get",
});
if (result.code != 200) return Message.error(result?.msg);
// console.log('123');
this.deviceData = result.data;
// return result.data;
}
return this.deviceData;
},
async getTemplateAutomatic() {
let url = "";
let data = {};
let otherConfig = {};
let plan = this.info.find((it) => it.planName == this.planName);
console.log("plan", plan);
let action = plan.dcExecuteAction.find(
(it) => it.actionType == 1 && it.deviceType == 2
);
if (action) {
otherConfig = JSON.parse(action.otherConfig);
if (this.activeName == "-1") {
//
url = "/business/plans/warning/confirm";
data = {
dcInfoBoardTemplate: otherConfig,
dcWarning: this.eventFormData,
};
} else {
//
url = "/business/plans/event/automatic";
data = {
dcInfoBoardTemplate: otherConfig,
dcEvent: this.eventFormData,
};
}
const result = await request({
url: url,
method: "post",
data: data,
});
if (result.code != 200) return Message.error(result?.msg);
this.automaticData = result.data;
} else {
console.log("没有情报板,不调用接口");
this.automaticData = {};
}
return this.automaticData;
},
async getBoardOriginal() {
let url = "";
let data = {};
let plan = this.info.find((it) => it.planName == this.planName);
console.log("plan1", plan);
let action = plan.dcExecuteAction.find(
(it) => it.actionType == 1 && it.deviceType == 2
);
if (action) {
if (this.activeName == "-1") {
//
url = "/business/plans/warning/board/confirm";
data = {
dcEmergencyPlans: {
...plan,
executeAction: action,
},
dcWarning: this.eventFormData,
};
} else {
//
url = "/business/plans/event/board/confirm";
data = {
dcEmergencyPlans: {
...plan,
executeAction: action,
},
dcEvent: this.eventFormData,
};
}
const result = await request({
url: url,
method: "post",
data: data,
});
if (result.code != 200) return Message.error(result?.msg);
this.boardOriginalData = result.data;
} else {
console.log("没有情报板,不调用接口");
this.boardOriginalData = {};
}
return this.boardOriginalData;
},
changeRadio(value) {
let plan = this.info.find((it) => it.planName == value);
this.planInfo = plan;
this.initData(plan);
},
formatData(it, value = 1) {
let data = { ...it, actionType: value, emergencyPlansId: id };
if (
it.deviceList &&
typeof it.deviceList !== "string" &&
it.deviceList.length > 0
) {
data.deviceList = it.deviceList.join(",");
} else {
data.deviceList = "";
}
if (it.content) {
data.otherConfig = JSON.stringify({ content: it.content });
}
if (it.controlModel) {
let other = {
controlModel: it.controlModel,
controlModelName: inducerModeDic[it.controlModel],
state: it.state,
name: inducerWorkTypeDic[it.state],
};
if (it.time && it?.time[0]) {
other = {
controlModel: it.controlModel,
controlModelName: inducerModeDic[it.controlModel],
state: it.state,
name: inducerWorkTypeDic[it.state],
startTime: it.time[0],
endTime: it.time[1],
};
}
data.otherConfig = JSON.stringify(other);
}
if (it.gzms) {
data.otherConfig = JSON.stringify({
state: it.gzms,
name: gzmsMap[it.gzms],
operationDuration: it.operationDuration,
});
}
return data;
},
handleSubmit(value = 1) {
// this.submitting = false;
let plan = { ...this.planInfo };
let actions = plan.dcExecuteAction.filter((it) => it.actionType == value);
plan.dcExecuteAction = actions;
let reqData = {
operationType: value, //1- 2-
dcEmergencyPlans: plan,
dcEvent: this.eventFormData,
};
let url = "";
if (this.activeName == "-1") {
//
url = "/business/plans/warning/confirm";
reqData = { ...reqData, dcWarning: { ...reqData.dcEvent } };
} else {
//
url = "/business/plans/event/confirm";
}
console.log("reqData", reqData);
// return;
request({
url: url,
method: "post",
data: reqData,
})
.then((result) => {
if (result.code != 200) return Message.error(result?.msg);
Message.success("提交成功");
this.$emit("close", false);
setTimeout(() => {
this.$emit("reInitData", true);
}, 100);
})
.catch(() => {
Message.error("提交失败");
})
.finally(() => {
this.submitting = false;
});
},
handleRestore() {},
},
};
</script>
<style lang="scss" scoped>
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.24s;
}
.fade-enter,
.fade-leave-to {
opacity: 0;
}
.EventAddPlanDialog {
gap: 9px;
width: 1280px;
height: 310px;
display: flex;
flex-direction: column;
.first,
.second,
.third {
padding: 5px 10px 8px;
background-color: #296887;
margin-bottom: 15px;
.text {
margin-top: 12px;
}
}
.form {
flex: 1;
overflow-y: auto;
}
.footer {
display: flex;
justify-content: end;
gap: 15px;
}
// .disabledBtn {
// height: 24px;
// border-radius: 48px;
// background: #C9C9C9;
// padding: 0 24px;
// color: white !important;
// display: flex;
// align-items: center;
// justify-content: center;
// }
}
</style>

336
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/EventDetailDialog/formTable/index.vue

@ -0,0 +1,336 @@
<template>
<div class="EventDetail">
<Table :data="tableData" :show-header="false">
<ElTableColumn prop="deviceType" width="160">
<template slot-scope="scope">
<el-select v-model="scope.row.deviceType" placeholder="请选择设备类型" @change="changeDeviceType">
<el-option v-for="item in deviceOptions" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</template>
</ElTableColumn>
<ElTableColumn prop="searchRule" width="230">
<template slot-scope="scope">
<div class="plhx">
<el-select v-model="scope.row.searchRule" placeholder="检索规则条件">
<el-option v-for="item in zyOptions" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-input-number v-if="scope.row.searchRule == 2 || scope.row.searchRule == 3"
v-model="scope.row.number" :min="0" :max="9999" style="width: 130px;"></el-input-number>
<p v-if="scope.row.searchRule == 2 || scope.row.searchRule == 3"></p>
<el-input-number v-if="scope.row.searchRule == 4" v-model="scope.row.number" :min="0"
:max="9999" style="width: 130px;"></el-input-number>
<p v-if="scope.row.searchRule == 4" style="width: 56px;">公里</p>
</div>
</template>
</ElTableColumn>
<ElTableColumn prop="deviceList" width="400">
<template slot-scope="scope">
<div class="mjs">
<el-select v-if="scope.row.searchRule == 1" v-model="scope.row.deviceList" placeholder="请选择设备"
multiple collapse-tags>
<el-option v-for="item in sbOptions" :key="item.id" :label="item.deviceName"
:value="item.id">
</el-option>
</el-select>
<!-- 情报板 -->
<el-input @click.native="clickQbb(scope.$index)" v-if="scope.row.deviceType == 2"
placeholder="请选择" v-model="scope.row.qbb" readonly>
<i slot="suffix" class="el-input__icon el-icon-search"></i>
</el-input>
<el-select v-if="scope.row.deviceType == 10" v-model="scope.row.gzms" placeholder="工作模式">
<el-option v-for="item in gzmsOptions" :key="item.value" :label="item.label"
:value="item.value"></el-option>
</el-select>
<el-input-number v-if="scope.row.deviceType == 10" placeholder="时长(分钟)"
v-model="scope.row.operationDuration" :min="0" :max="999"></el-input-number>
<el-select v-if="scope.row.deviceType == 12" v-model="scope.row.controlModel"
placeholder="请选择模式">
<el-option label="手动模式" value="00"></el-option>
<el-option label="自动模式" value="01"></el-option>
<el-option label="万年历" value="02"></el-option>
</el-select>
<el-time-picker v-if="scope.row.controlModel == '01' && scope.row.deviceType == 12"
v-model="scope.row.time" is-range style="" range-separator="-" placeholder="选择时间"
value-format="HH:mm" format="HH:mm">
</el-time-picker>
<el-select v-if="scope.row.deviceType == 12" v-model="scope.row.state" placeholder="工作状态">
<el-option v-for="item in gzztOptions" :key="item.value" :label="item.label"
:value="item.value"></el-option>
</el-select>
<el-input v-if="scope.row.deviceType == 5" v-model="scope.row.content"
placeholder="请输入发布内容"></el-input>
</div>
</template>
</ElTableColumn>
<ElTableColumn label="操作" width="100">
<template slot-scope="scope">
<ElButton class="elButton" icon="el-icon-plus" plain size="mini"
@click.native="onAdd(scope.row.id)" />
<ElButton class="elButton" icon="el-icon-delete" plain size="mini"
@click.native="onDel(scope.$index)" />
</template>
</ElTableColumn>
</Table>
<!-- 情报板弹窗 -->
<QbbDialog :visible="isShowDialog" :info="qbbData" :type="type" @close="onCloseDialog"
@dialogSubmit="dialogSubmit" />
</div>
</template>
<script>
import Table from '@screen/components/Table.vue';
import Button from '@screen/components/Buttons/Button.vue';
import request from "@/utils/request";
import QbbDialog from "../qbbDialog/index.vue";
import { Message } from 'element-ui'
import { planDeviceOptions } from "@screen/utils/enum.js";
export default {
name: 'formTable',
components: {
Button,
Table,
QbbDialog
},
// model: {
// prop: 'visible',
// event: 'update:value'
// },
inject: ['loadData'],
props: {
eventType: Number,
type: Number,
tableData: {
type: Array,
default: () => [{
deviceType: 1,
searchRule: 1,
qbb: ''
}]
}
},
data() {
return {
// tableData: [
// {
// deviceType: 1,
// searchRule: 1,
// qbb: ''
// }
// ],
isShowDialog: false,
deviceOptions: planDeviceOptions,
zyOptions: [
{
value: 1,
label: '指定设备资源'
},
{
value: 2,
label: '事发上游最近'
},
{
value: 3,
label: '事发下游最近'
},
{
value: 4,
label: '最近公里数'
},
],
gzztOptions: [
{
value: "01",
label: "常亮"
},
{
value: "02",
label: "流水"
},
{
value: "03",
label: "闪烁"
},
{
value: "04",
label: "关闭",
}
],
gzmsOptions: [
{
value: "SETMD0",
label: "激光关闭"
},
{
value: "SETMD1",
label: "常亮模式"
},
{
value: "SETMD2",
label: "间隔100ms闪烁模式"
},
{
value: "SETMD3",
label: "间隔200ms闪烁模式",
},
{
value: "SETMD4",
label: "间隔500ms闪烁模式",
},
{
value: "SETMD5",
label: "2次闪烁模式"
},
{
value: "SETMD6",
label: "SOS模式"
},
{
value: "SETMD7",
label: "自定义模式1",
},
{
value: "SETMD8",
label: "自定义模式2",
},
{
value: "SETMD9",
label: "自定义模式3",
}
],
qbbData: {},
sbOptions: [],
deviceType: 1,
index: 1
}
},
async created() {
let loadData = await this.loadData(1);
// console.log('aa',loadData)
this.sbOptions = loadData;
},
methods: {
initData() {
// request({
// url: `business/device/query?deviceType=2`,
// method: "get",
// }).then((result) => {
// if (result.code != 200) return Message.error(result?.msg);
// this.sbOptions = result.data;
// }).catch(() => {
// Message.error("");
// })
},
async changeDeviceType(value) {
this.deviceType = value;
console.log('value', value)
this.sbOptions = await this.loadData(value);
},
onAdd(id) {
this.tableData.push({
deviceType: 1,
searchRule: 1,
qbb: ''
})
},
onDel(index) {
if (this.tableData.length <= 1) {
return Message.warning('最后一项不可删除!');
}
this.tableData.splice(index, 1)
},
clickQbb(index) {
this.index = index;
// this.qbbData = this.tableData[index].dcInfoBoardTemplate;
console.log('this.type', this.type)
this.isShowDialog = true;
},
onCloseDialog() {
this.isShowDialog = false;
},
dialogSubmit(data) {
this.tableData[this.index].qbb = data.content;
this.tableData[this.index].otherConfig = JSON.stringify(data);
}
}
}
</script>
<style lang="scss" scoped>
.EventDetail {
display: flex;
gap: 9px;
width: 100%;
// height: 768px;
min-height: 50px;
margin-top: 5px;
flex-direction: column;
::v-deep {
.el-table .el-table__cell {
padding: 0 5px;
}
}
.mjs {
display: flex;
>div {
margin-right: 10px;
}
}
.ms {
width: 160px;
}
.plhx {
display: flex;
}
::v-deep {
.el-tag.el-tag--info {
max-width: 100px;
}
.el-range-editor--medium .el-range__icon,
.el-range-editor--medium .el-range__close-icon {
display: none;
}
}
}
.elButton {
background: #2ba8c3;
border-radius: 2px 2px 2px 2px;
color: #FFFFFF;
}
.elButton:hover,
.elButton:focus {
background: #2ba8c3;
border-radius: 2px 2px 2px 2px;
border-color: #FFFFFF;
color: #FFFFFF;
}
</style>

406
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/EventDetailDialog/index.vue

@ -0,0 +1,406 @@
<template>
<Dialog v-model="modelVisible" title="事件详情" width="890px" top="11%">
<div class="EventDetail" :style="{
height: activeName == '-1' || activeName == '0' ? '380px' : '698px',
}">
<Form ref="FormConfigRef" :formList="formList" :dFormData="formData" label-width="100px" />
<div class="video-pic" :style="{
height: formData.component === 'VideoMulti' ? '242px' : undefined,
}">
<component :is="formData.component" v-if="activeName != '-1'" style="height: 100%; width: 380px"
:showHeader="false" :url="formData.videoList && formData.videoList.length > 0
? formData.videoList[0]
: ''
" :camId="formData.upCamId" :pileNum="formData.stakeMark" rangeIndex="upCamera" :videoType="formData.videoType" />
<component :is="formData.component" v-if="activeName != '-1'" style="height: 100%; width: 380px"
:showHeader="false" :url="formData.videoList && formData.videoList.length > 0
? formData.videoList[1]
: ''
" :camId="formData.downCamId" :pileNum="formData.stakeMark" rangeIndex="downCamera"
:videoType="formData.videoType" />
<Carousel v-if="activeName == '-1'" style="flex: 1" :videos="formData.videoList" :pictures="[]" />
<Carousel v-if="activeName == '-1'" style="flex: 1" :pictures="formData.pictures" :videos="[]" />
</div>
<!-- <div>{{ formData.videoList[0] }}</div> -->
<TimeLine1 v-if="activeName == '1' || activeName == '2'" :data="timeLine1List" />
<TimeLine2 v-if="activeName == '1' || activeName == '2'" :data="timeLine2List" style="flex: 1" />
</div>
<!-- 确认弹窗 -->
<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>
</template>
</Dialog>
</template>
<script>
import Dialog from "@screen/components/Dialog/index";
import TimeLine1 from "@screen/components/TimeLine/TimeLine1/index";
import TimeLine2 from "@screen/components/TimeLine/TimeLine2/index";
import Form from "@screen/components/FormConfig";
import { _formList } from "./data";
// import { timeLine2List } from "@screen/pages/control/event/commandDispatch/Cards/DisposalProcess/data.js"
import Video from "@screen/components/Video";
import VideoMulti from "@screen/components/VideoMulti";
import Carousel from "./Carousel/index.vue";
import EventPlanDialog from "./eventPlanDialog/index.vue";
import Button from "@screen/components/Buttons/Button.vue";
import request from "@/utils/request";
import { Message } from "element-ui";
var moment = require("moment");
import {
getProcessNode,
getProcessList,
postProcess,
postCompleteEvent,
postNoSkipClear,
} from "@/api/commandDispatch";
export default {
name: "EventDetail",
components: {
Dialog,
Form,
TimeLine1,
TimeLine2,
Video,
VideoMulti,
Carousel,
Button,
EventPlanDialog,
},
model: {
prop: "visible",
event: "update:value",
},
props: {
visible: Boolean,
activeName: String,
formData: {
type: Object,
default: () => { },
},
},
data() {
return {
formList:[..._formList],
isShowDialog: false,
info: [],
timeLine1List: [
{
time: "",
label: "",
isActive: false,
},
],
timeLine2List: [
{
time: "",
name: "",
desc: "",
posts: "",
direction: "left",
},
],
};
},
computed: {
modelVisible: {
get() {
if (this.visible) {
this.getProcess();
}
return this.visible;
},
set(val) {
console.log(111)
this.formList = [..._formList]
this.$emit("update:value", val);
},
},
},
methods: {
getProcess() {
if (this.activeName == "-1" || this.activeName == "0") {
this.timeLine1List = [];
this.timeLine2List = [];
return;
}
let directionFlg = true;
getProcessList(this.formData.id).then((rows) => {
console.log('rows', rows)
// if (result.code != 200) return Message.error(result?.msg);
// const rows = result.rows;
this.timeLine1List = [];
this.timeLine2List = [];
this.formData?.processConfigList.forEach((it) => {
const process = rows.find((row) => it.nodeNode == row.processId && row.processType === 1);
if (process) {
this.timeLine1List.push({
time: moment(process.operationTime || new Date()).format("HH:mm"),
label: it.processNode,
isActive: true,
});
directionFlg = !directionFlg;
} else {
this.timeLine1List.push({
time: "",
label: it.processNode,
isActive: false,
});
}
});
rows.forEach(item =>{
this.timeLine2List.push({
time: moment(item.operationTime || new Date()).format(
"yyyy-MM-DD HH:mm:ss"
),
name: item.operatorName,
desc: item.context,
source: item.source,
posts: "",
direction: item.source == 1 ? "right" : "left",
});
})
});
},
getProcessNode() {
return request({
url:
`/dc/system/event/getProcessNode/${this.formData.id}`,
method: "GET",
})
.then((result) => {
if (result.code != 200) return [];
// this.timeLine1List = result.data.map((item) => {
// return {
// time: item.operationTime,
// label: item.processNode,
// isActive: item.status == 1 ? true : false,
// };
// });
// this.options = result.data.filter((item) => {
// item.status == 0;
// return item;
// });
})
.catch((err) => []);
},
onCloseAddNew() {
this.isShowDialog = false;
},
onDelete() {
if(this.formList[this.formList.length-1].key !== 'relieveReason' ){
this.formList.push({
label: "解除类型:",
key: "relieveType",
type: "RadioGroup",
isAlone: true,
required: true,
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: "1",
label: "误报解除",
},
{
key: "2",
label: "事件已结束",
},
{
key: "3",
label: "无需处理事件",
},
{
key: "4",
label: "其它",
}
],
},
})
this.formList.push({
label: "解除原因:", //
key: "relieveReason", //
isAlone: true, //
type: "input", //(el-input el-) input
options: { //elementformItem
type: "textarea",
autosize: true,
maxlength: 200,
autosize: { minRows: 3, maxRows: 3 },
showWordLimit: true,
}
})
} else {
this.$refs.FormConfigRef.validate()
.then((result) => {
request({
url: `/business/warning/falseAlarm`,
method: "post",
data: {
id: this.formData.id,
relieveType: result.relieveType,
relieveReason: result.relieveReason
},
}).then((result) => {
if (result.code == 200) Message.success("成功!");
else Message.error(result?.msg);
this.modelVisible = false;
this.$emit("queryData", true);
//
this.$root.$emit('delete-event');
});
})
.catch((err) => {
});
}
// 2024-05-18
// if (this.formData.id) {
// this.$confirm("", "", {
// confirmButtonText: "",
// cancelButtonText: "",
// type: "warning",
// }).then(() => {
// if (this.activeName == "-1") {
// request({
// url: `/business/warning/delete`,
// method: "post",
// data: { id: this.formData.id },
// }).then((result) => {
// if (result.code == 200) Message.success("");
// else Message.error(result?.msg);
// this.modelVisible = false;
// this.$emit("queryData", true);
// //
// this.$root.$emit('delete-event');
// });
// } else {
// request({
// url: `dc/system/event/${this.formData.id}`,
// method: "delete",
// }).then((result) => {
// if (result.code == 200) Message.success("");
// else Message.error(result?.msg);
// this.modelVisible = false;
// this.$emit("queryData", true);
// //
// this.$root.$emit('delete-event');
// });
// }
// });
// }
},
onSubmit() {
// 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 if (this.activeName == '0') {
request({
url: `/dc/system/event/dcEventState/${this.formData.id}/1`,
method: "put",
data: reData,
}).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
else Message.success("成功!");
this.modelVisible = false;
this.$emit("queryData", true);
});
} else {
let eventId = this.formData.id;
this.modelVisible = false;
setTimeout(() => {
this.$router.push(`/control/event/commandDispatch?eventId=${eventId}`);
// this.$router.push(`/control/event/commandDispatch`);
})
}
},
reInitData() {
console.log("reInitData");
this.$emit("update:value", false);
this.$emit("queryData", true);
},
},
};
</script>
<style lang="scss" scoped>
.EventDetail {
display: flex;
gap: 9px;
width: 836px;
// height: 768px;
flex-direction: column;
.video-pic {
display: flex;
height: 190px;
gap: 15px;
justify-content: space-around;
}
}
</style>

381
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/EventDetailDialog/qbbDialog/index.vue

@ -0,0 +1,381 @@
<template>
<div>
<Dialog v-model="modelVisible" title="情报板确认">
<div v-if="type == 1" class="EventAddPlanDialog">
<h4>预案内容</h4>
<dev class="listBox disPid">
<div class="tplItem">
<BoardTplPreview class="boardPreview" boardWH="1400*200" :tpl="automaticData"></BoardTplPreview>
<div class="infoBtnBox infoBtnBoxSm">
<p class="btn">
<el-radio v-model="radio1" :label="1" @input="changeRadio(automaticData)" />
</p>
<!-- <p @click="____onEditTemplate(automaticData)" class="btn btnEdit" /> -->
</div>
</div>
</dev>
<h4>自动生成</h4>
<dev class="listBox disPid">
<div class="tplItem">
<BoardTplPreview class="boardPreview" boardWH="1400*200" :tpl="automaticData"></BoardTplPreview>
<div class="infoBtnBox infoBtnBoxSm">
<p class="btn">
<el-radio v-model="radio1" :label="2" @input="changeRadio(automaticData)" />
</p>
<!-- <p @click="____onEditTemplate(automaticData)" class="btn btnEdit" /> -->
</div>
</div>
</dev>
<h4>情报板模版</h4>
<vuescroll :ops="scrollOptions" class="listBox">
<div v-for="(item) in templateAvailable" :key="item.dictValue">
<h5>{{ item.dictLabel }}</h5>
<div v-for="(itm, indx) in item.list" :key="indx" class="tplItem">
<BoardTplPreview class="boardPreview" boardWH="1400*200" :tpl="itm"></BoardTplPreview>
<div class="infoBtnBox infoBtnBoxSm">
<!-- <p class="btn">
<el-radio v-model="radio1" :label="itm.id" @input="changeRadio(itm)" />
</p> -->
<p @click="____onEditTemplate(itm)" class="btn btnEdit" />
</div>
</div>
</div>
</vuescroll>
</div>
<div v-if="type == 2" class="EventAddPlanDialog">
<div v-for="(item, index) in Object.keys(originalData)" :key="index">
<h4>{{ item }}</h4>
<dev class="listBox disPid">
<div v-for="(it, idx) in originalData[item]" :key="idx" class="tplItem">
<BoardTplPreview class="boardPreview" boardWH="1400*200" :tpl="it"></BoardTplPreview>
</div>
</dev>
</div>
</div>
<template #footer v-if="type == 1">
<Button style="background: #C9C9C9;padding:0 24px;"
@click.native="modelVisible = false, submitting = false">取消</Button>
<Button style="padding:0 24px;" @click.native="handleSubmit" :loading="submitting">确认</Button>
</template>
</Dialog>
<BoardInfoEditor @afterSubmit="____onEditSubmit" :mode="editDialog.mode" :type="editDialog.type"
:visible.sync="editDialog.visible" :screenSize="selectedSize" :tpl="editDialog.tpl"></BoardInfoEditor>
</div>
</template>
<script>
import vuescroll from "vuescroll";
import scrollOptions from "@/common/scrollbar.js";
import BoardTplPreview from "@screen/components/infoBoard/BoardTplPreview.vue";
import BoardInfoEditor from "@screen/components/infoBoard/BoardInfoEditor";
import Dialog from "@screen/components/Dialog/index";
import Button from '@screen/components/Buttons/Button.vue';
import { getTemplateList } from "@/api/board/template";
export default {
name: 'qbbDialog',
components: {
Dialog,
Button,
vuescroll,
BoardTplPreview,
BoardInfoEditor
},
model: {
prop: 'visible',
event: 'close'
},
inject: ['getAutomatic', 'getOriginal'],
props: {
visible: Boolean,
type: {
type: Number,
default: 1
},
info: {
type: Object,
default: () => { }
}
},
data() {
return {
submitting: false,
selectedSize: "",
scrollOptions,
templateAvailable: null,
tplCategory: [],
templateAll: [],
radio1: '',
itmData: {},
automaticData: {},
originalData: {},
editDialog: {
mode: "",
type: "",
visible: false,
tpl: {},
},
}
},
mounted() {
if (this.type == 1) {
this.initData();
} else if (this.type == 2) {
this.getBoardOriginal();
}
},
computed: {
modelVisible: {
get() {
// if (this.visible2) {
// if (this.info && this.info.id) {
// this.radio1 = Number(this.info.id);
// }
// console.log('123', this.getTemplateAutomatic());
// }
return this.visible;
},
set(val) {
this.$emit('close', val)
}
},
},
methods: {
initData() {
if (this.tplCategory.length && this.templateAll.length) {
this.____setAvailableTemplate();
} else {
Promise.all([
this.____getTemplateCategory(),
this.____getAllTemplate(),
]).then((res) => {
this.____setAvailableTemplate();
});
this.getTemplateAutomatic();
}
},
//
____getTemplateCategory() {
return this.getDicts("iot_template_category").then((res) => {
this.tplCategory = res.data;
});
},
//
____getAllTemplate() {
return getTemplateList().then((res) => {
this.templateAll = res.data;
});
},
//
____setAvailableTemplate() {
this.templateAvailable = [];
this.tplCategory.forEach((item, index) => {
let arr = this.templateAll["" + index];
if (arr.length > 0) {
let temp = [];
arr.forEach((tpl) => {
if (tpl.screenSize) {
temp.push(tpl);
}
});
if (temp.length > 0) {
this.templateAvailable.push({
...item,
list: temp,
});
}
}
});
},
____onEditTemplate(tpl) {
this.editDialog = {
visible: true,
mode: "edit",
type: "template",
tpl,
};
},
//
____onEditSubmit(para) {
this.editDialog.tpl = {};
this.editDialog.visible = false;
if (para.type == "device") {
if (para.mode == "edit") {
this.selectedBdMsg[this.boardItemEdtingIndex] = para.data;
} else {
this.selectedBdMsg.push(_.cloneDeep(para.data));
}
} else if (para.mode == "toDevice") {
this.selectedBdMsg.push(_.cloneDeep(para.data));
} else {
this.____refreshPageData(para);
}
},
____refreshPageData(para) {
if (para.type == "template") {
this.____getAllTemplate().then((res) => {
this.____setAvailableTemplate();
});
} else {
}
},
async getTemplateAutomatic() {
let data = await this.getAutomatic();
console.log('dataaaa', data);
this.automaticData = data;
},
async getBoardOriginal() {
let data = await this.getOriginal();
console.log('datbbbbb', data);
this.originalData = data;
},
changeRadio(data) {
this.itmData = data;
},
handleSubmit() {
this.modelVisible = false;
this.$emit('dialogSubmit', this.itmData);
}
}
}
</script>
<style lang="scss" scoped>
.listBox {
padding: 20px;
.tplItem {
margin-right: 14px;
display: flex;
align-items: stretch;
padding-bottom: 10px;
.boardPreview {
border: 1px solid rgba(61, 232, 255, 0.5);
// width: 560px;
// height:80px;
flex: 1;
}
.infoBtnBox {
&.infoBtnBoxSm {
width: 60px;
}
width: 110px;
height: 80px;
display: flex;
margin-left: 10px;
/* // border: solid 1px #05afe3; */
border: 1px solid rgba(61, 232, 255, 0.5);
display: flex;
justify-content: space-around;
align-items: center;
.btn {
background-repeat: no-repeat;
background-size: 100% 100%;
width: 15px;
height: 30px;
&.btnApply {
background-image: url(~@/assets/jihe/images/button/toLeft.svg);
}
&.btnEdit {
background-image: url(~@/assets/jihe/images/button/edit.svg);
}
&.btnDelete {
background-image: url(~@/assets/jihe/images/button/delete.svg);
}
}
i {
font-size: 24px;
color: #666;
padding-left: 4px;
cursor: pointer;
caret-color: rgba(0, 0, 0, 0);
user-select: none;
}
i:hover {
color: #05afe3;
}
.disabledClass {
pointer-events: none;
cursor: auto !important;
color: #ccc;
}
}
}
.controlBox {
margin-top: 10px;
margin-bottom: 10px;
display: flex;
justify-content: center;
}
.el-collapse {
max-height: 100% !important;
overflow: auto;
border-bottom: none;
border-top: none;
padding: 0 0.5vw;
}
}
.disPid {
padding: 0 20px !important;
}
.fade-enter-active,
.fade-leave-active {
transition: opacity .24s;
}
.fade-enter,
.fade-leave-to {
opacity: 0;
}
.EventAddPlanDialog {
gap: 9px;
width: 650px;
height: 700px;
display: flex;
flex-direction: column;
h4 {
margin: 0 0 5px 0;
}
::v-deep {
.el-radio__label {
display: none;
}
}
.form {
flex: 1;
overflow-y: auto;
}
.footer {
display: flex;
justify-content: end;
gap: 15px;
}
}
</style>

1228
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/FormEvent/PresetFormItems.js

File diff suppressed because it is too large

2537
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/FormEvent/data.js

File diff suppressed because it is too large

258
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/FormEvent/index.vue

@ -0,0 +1,258 @@
<template>
<Dialog v-model="modelVisible" title="交通事故录入" width="1100px" top="14%">
<div class="EventDetailDialog">
<ElTabs v-model="activeName" @tab-click="handleChange">
<ElTabPane v-for="(item, index) in tabConfigList" :key="index" :label="item.label" :name="item.key" />
</ElTabs>
<Transition name="fade">
<Form class="form" ref="FormConfigRef" :formList="formConfig.list" v-bind="getFormOptions" labelWidth="120px" />
</Transition>
</div>
<template #footer>
<Button style="background: #c9c9c9; padding: 0 24px"
@click.native="(modelVisible = false), (submitting = false)">取消</Button>
<Button style="padding: 0 24px" @click.native="handleSubmit" :loading="submitting">保存</Button>
</template>
</Dialog>
</template>
<script>
import Dialog from "@screen/components/Dialog/index";
import Form from "@screen/components/FormConfig";
import Button from "@screen/components/Buttons/Button.vue";
import request from "@/utils/request";
import { Message } from "element-ui";
import { tabConfigList } from "./data.js";
export default {
name: "EventDetailDialog",
components: {
Dialog,
Form,
Button,
},
model: {
prop: "visible",
event: "close",
},
props: {
visible: Boolean,
},
data() {
return {
activeName: "TrafficAccident",
submitting: false,
formConfig: {},
tabConfigList,
index: 1,
roads: [],
direction: [],
lwss: [],
};
},
created() {
// this.formConfig = tabConfigList[0].formConfig;
this.initData().then(() => {
this.handleChange({ index: 0 });
});
},
computed: {
modelVisible: {
get() {
return this.visible;
},
set(val) {
this.$emit("close", val);
},
},
getFormOptions() {
return {
column: 3,
...this.formConfig.formOptions,
};
},
},
methods: {
initData() {
return Promise.all([
//
request({
url: `/business/road/query`,
method: "get",
})
.then((result) => {
if (result.code != 200) return Message.error(result?.msg);
result.data.forEach((it) => {
this.roads.push({ key: it.id, label: it.roadName });
});
})
.catch((err) => {
Message.error("查询失败4", err);
}),
//
request({
url: `/system/dict/data/type/iot_event_direction`,
method: "get",
})
.then((result) => {
if (result.code != 200) return Message.error(result?.msg);
result.data.forEach((it) => {
this.direction.push({ key: it.dictValue, label: it.dictLabel });
});
})
.catch((err) => {
Message.error("查询失败5", err);
}),
// 1 2 3 4 5 6
request({
url: `/business/facility/query`,
method: "get",
})
.then((result) => {
if (result.code != 200) return Message.error(result?.msg);
result.data.forEach((it) =>
this.lwss.push({
key: it.id,
label: it.facilityName,
type: it.facilityType,
})
);
})
.catch((err) => {
console.log("err", err);
Message.error("查询失败6", err);
}),
]);
},
handleChange({ index }) {
// console.log('index',index)
this.index = index;
let formConfig = tabConfigList[index].formConfig;
console.log("formConfig", formConfig);
formConfig.list.forEach((it) => {
if (it.key == "direction") {
it.options.options = this.direction;
}
if (it.key == "roadId") {
it.options.options = this.roads;
}
if (index == 7 && it.key == "dcEventServiceArea.facilityId") {
it.options.options = this.lwss.filter((ss) => ss.type == 6);
}
// if (index == 0 || index == 1 || index == 7) {
// if (it.key === 'dcEventAccident.facilityId' || it.key === 'dcEventVehicleAccident.facilityId' || it.key === 'dcEventServiceArea.facilityId') {
// it.options.options = this.lwss.filter(ss => ss.type == 6);
// }
// }
});
this.formConfig = formConfig;
},
handleSubmit() {
// return
this.$refs.FormConfigRef.validate().then((formData) => {
this.submitting = true;
if (this.index == 0 || this.index == 1) {
formData.lang = formData.lang.join(",");
} else {
formData.lang = "";
}
if (this.index == 2 && formData.dcEventTrafficControl.facilityId instanceof Array) {
let ids = formData.dcEventTrafficControl.facilityId;
formData.dcEventTrafficControl.facilityIds = ids
formData.dcEventTrafficControl.facilityId = ''
}
if (formData.endStakeMark && formData.endStakeMark[0] != null) {
let endStakeMark = formData.endStakeMark;
let strMark = endStakeMark && endStakeMark.length > 0 ? "K" + endStakeMark[0] + "+" + endStakeMark[1] : "";
if (this.index == 3) {
formData.dcEventTrafficCongestion.endStakeMark = strMark;
}
if (this.index == 6) {
formData.dcEventConstruction.endStakeMark = strMark;
}
if (this.index == 9) {
formData.dcEventAbnormalWeather.endStakeMark = strMark;
}
formData.endStakeMark = "";
} else {
formData.endStakeMark = "";
}
let stakeMark = formData.stakeMark;
// console.log('formData', {
// ...formData,
// eventType: Number(this.index) + 1,
// stakeMark: (stakeMark && stakeMark[0] != null) ? ((stakeMark && stakeMark.length > 0) ? ('K' + stakeMark[0] + '+' + stakeMark[1]) : '') : '',
// })
// this.modelVisible = false;
// this.submitting = false;
// this.$emit('queryData',true)
// return;
request({
url: `/dc/system/event`,
method: "post",
data: {
...formData,
eventType: Number(this.index) + 1,
eventState: 0,
stakeMark:
stakeMark && stakeMark[0] != null
? stakeMark && stakeMark.length > 0
? "K" + stakeMark[0] + "+" + stakeMark[1]
: ""
: "",
},
})
.then((result) => {
if (result.code != 200) return Message.error(result?.msg);
Message.success("提交成功");
this.modelVisible = false;
})
.catch(() => {
Message.error("提交失败");
})
.finally(() => {
this.submitting = false;
this.$emit("queryData", true);
});
});
},
},
};
</script>
<style lang="scss" scoped>
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.24s;
}
.fade-enter,
.fade-leave-to {
opacity: 0;
}
.EventDetailDialog {
gap: 9px;
width: 1050px;
// height: 810px;
display: flex;
flex-direction: column;
.form {
flex: 1;
overflow-y: auto;
}
.footer {
display: flex;
justify-content: end;
gap: 15px;
}
}
</style>

226
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/data.js

@ -0,0 +1,226 @@
import * as PresetFormItems from "@screen/pages/control/event/event/FormEvent/PresetFormItems.js";
import { merge, cloneDeep } from "lodash";
const station = {
label: "桩号:",
key: "stakeMark",
required: true,
type: "MultipleLabelItem",
options: {
options: [
{
prefix: {
text: "K",
style: {
color: "#3DE8FF",
},
},
key: "stakeMark[0]",
},
{
prefix: {
text: "+",
style: {
color: "#3DE8FF",
},
},
key: "stakeMark[1]",
},
],
},
};
export const tabMap = {
"1": {
state: 21,
textColor: "#007FF4",
text: "上报",
},
"2": {
state: 22,
textColor: "#007FF4",
text: "已完成",
},
"3": {
state: 23,
textColor: "#007FF4",
text: "已终止",
},
"4": {
state: 24,
textColor: "#007FF4",
text: "自动结束",
},
};
export const searchFormList = [
{
label: "事件状态:",
key: "warningState",
type: "select",
options: {
clearable: true,
options: [
{
value: 1,
label: "上报",
},
{
value: 2,
label: "已完成",
},
{
value: 3,
label: "已终止",
},
{
value: 4,
label: "自动结束",
}
],
},
},
{
label: "事件来源:",
key: "warningSource",
type: "select",
options: {
clearable: true,
options: [
{
key: "1",
label: "视频AI",
},
{
key: "2",
label: "雷达识别",
},
{
key: "3",
label: "锥桶",
},
{
key: "4",
label: "护栏碰撞",
},
{
key: "5",
label: "扫码报警",
},
// {
// key: "6",
// label: "非机预警",
// },
{
key: "7",
label: "气象监测器",
},
],
},
},
{
label: "方向:",
key: "direction",
type: "RadioGroup",
options: {
options: [
{
key: "1",
label: "菏泽方向",
},
{
key: "3",
label: "济南方向",
},
],
},
},
{
label: "事件主类:",
key: "warningType",
type: "select",
options: {
clearable: true,
options: [
{
value: 1,
label: "交通拥堵",
},
{
value: 2,
label: "行人",
},
{
value: 3,
label: "非机动车",
},
{
value: 4,
label: "停车",
},
{
value: 5,
label: "违规驾驶",
},
{
value: 6,
label: "路障",
},
{
value: 7,
label: "道路施工",
},
{
value: 8,
label: "异常天气",
},
{
value: 9,
label: "护栏碰撞",
},
{
value: 10,
label: "交通事故",
},
{
value: 11,
label: "车辆故障",
},
{
value: 99,
label: "其他事件",
},
],
},
},
{
label: "时间范围:",
key: "daterange",
required: false,
type: "datePicker",
options: {
style: "width: auto",
type: "datetimerange",
format: "yyyy-MM-dd HH:mm:ss",
valueFormat: "yyyy-MM-dd HH:mm:ss",
},
},
{
...station,
label: "开始桩号:",
required: false,
},
merge(cloneDeep(station), {
options: {
options: [
{
key: "endStakeMark[0]",
},
{
key: "endStakeMark[1]",
},
],
},
label: "结束桩号:",
required: false,
}),
];

14
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/images/export.svg

@ -0,0 +1,14 @@
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Frame 10065" clip-path="url(#clip0_308_1276)">
<g id="Group 1142814551">
<path id="Rectangle 1282" d="M1 7V11C1 12.1046 1.89543 13 3 13H11C12.1046 13 13 12.1046 13 11V7" stroke="white" stroke-linecap="round"/>
<path id="Rectangle 1304" d="M4.27282 4.05153L7.04691 1.00002L9.81656 4.05155" stroke="white" stroke-linecap="round"/>
<path id="Line 513" d="M7 9L7 2" stroke="white" stroke-linecap="round"/>
</g>
</g>
<defs>
<clipPath id="clip0_308_1276">
<rect width="14" height="14" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 624 B

9
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/images/insert.svg

@ -0,0 +1,9 @@
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Group 1142814395">
<g id="Group 1142814394">
<circle id="Ellipse 835" cx="7" cy="7" r="6.5" stroke="white"/>
</g>
<path id="Line 514" d="M7 3.5L7 10.5" stroke="white" stroke-linecap="round"/>
<path id="Line 515" d="M10.5 7L3.5 7" stroke="white" stroke-linecap="round"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 385 B

22
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/images/refresh.svg

@ -0,0 +1,22 @@
<svg width="16" height="14" viewBox="0 0 16 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Group 1142814398">
<g id="Group 1142814396">
<path id="Rectangle 1304" d="M1.0437 2.41495L4.5636 2.01738L4.91112 6.00562" stroke="white" stroke-linecap="round"/>
<g id="Ellipse 835">
<mask id="path-2-inside-1_290_77" fill="white">
<path d="M4.29579 2.52494C4.09359 2.27296 3.71712 2.25216 3.51748 2.50144C2.86315 3.31847 2.39514 4.30903 2.15904 5.38649C1.87758 6.67096 1.93836 8.02122 2.3337 9.26652C2.72904 10.5118 3.44118 11.5962 4.38007 12.3826C5.16561 13.0406 6.08036 13.4652 7.0411 13.6229C7.35243 13.674 7.61901 13.4293 7.63212 13.1145C7.64523 12.7997 7.39954 12.5346 7.08935 12.4765C6.32757 12.3339 5.60349 11.9884 4.97813 11.4646C4.19938 10.8124 3.6087 9.91289 3.28078 8.87998C2.95287 7.84706 2.90245 6.72709 3.13591 5.66169C3.33404 4.75752 3.72906 3.92712 4.28182 3.24492C4.4503 3.03698 4.46523 2.7361 4.29579 2.52494Z"/>
</mask>
<path d="M4.29579 2.52494C4.09359 2.27296 3.71712 2.25216 3.51748 2.50144C2.86315 3.31847 2.39514 4.30903 2.15904 5.38649C1.87758 6.67096 1.93836 8.02122 2.3337 9.26652C2.72904 10.5118 3.44118 11.5962 4.38007 12.3826C5.16561 13.0406 6.08036 13.4652 7.0411 13.6229C7.35243 13.674 7.61901 13.4293 7.63212 13.1145C7.64523 12.7997 7.39954 12.5346 7.08935 12.4765C6.32757 12.3339 5.60349 11.9884 4.97813 11.4646C4.19938 10.8124 3.6087 9.91289 3.28078 8.87998C2.95287 7.84706 2.90245 6.72709 3.13591 5.66169C3.33404 4.75752 3.72906 3.92712 4.28182 3.24492C4.4503 3.03698 4.46523 2.7361 4.29579 2.52494Z" stroke="white" stroke-width="2" mask="url(#path-2-inside-1_290_77)"/>
</g>
</g>
<g id="Group 1142814397">
<path id="Rectangle 1304_2" d="M15.0437 11.585L11.5238 11.9826L11.1763 7.99438" stroke="white" stroke-linecap="round"/>
<g id="Ellipse 835_2">
<mask id="path-4-inside-2_290_77" fill="white">
<path d="M11.7916 11.4751C11.9938 11.727 12.3703 11.7478 12.5699 11.4986C13.2242 10.6815 13.6923 9.69097 13.9284 8.61351C14.2098 7.32904 14.149 5.97878 13.7537 4.73348C13.3584 3.48817 12.6462 2.40376 11.7073 1.61737C10.9218 0.95942 10.007 0.534814 9.0463 0.377109C8.73497 0.326006 8.46839 0.570722 8.45528 0.885536C8.44218 1.20035 8.68786 1.46544 8.99805 1.5235C9.75983 1.6661 10.4839 2.01159 11.1093 2.53538C11.888 3.18765 12.4787 4.08711 12.8066 5.12002C13.1345 6.15294 13.1849 7.27291 12.9515 8.33831C12.7534 9.24248 12.3583 10.0729 11.8056 10.7551C11.6371 10.963 11.6222 11.2639 11.7916 11.4751Z"/>
</mask>
<path d="M11.7916 11.4751C11.9938 11.727 12.3703 11.7478 12.5699 11.4986C13.2242 10.6815 13.6923 9.69097 13.9284 8.61351C14.2098 7.32904 14.149 5.97878 13.7537 4.73348C13.3584 3.48817 12.6462 2.40376 11.7073 1.61737C10.9218 0.95942 10.007 0.534814 9.0463 0.377109C8.73497 0.326006 8.46839 0.570722 8.45528 0.885536C8.44218 1.20035 8.68786 1.46544 8.99805 1.5235C9.75983 1.6661 10.4839 2.01159 11.1093 2.53538C11.888 3.18765 12.4787 4.08711 12.8066 5.12002C13.1345 6.15294 13.1849 7.27291 12.9515 8.33831C12.7534 9.24248 12.3583 10.0729 11.8056 10.7551C11.6371 10.963 11.6222 11.2639 11.7916 11.4751Z" stroke="white" stroke-width="2" mask="url(#path-4-inside-2_290_77)"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

321
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventAnalysis/index.vue

@ -0,0 +1,321 @@
<template>
<div class="RoadNetworkMonitoring2">
<!-- 搜索栏 -->
<div class="filter">
<div>
<ButtonGradient @click="onExport">
<template #prefix>
<img src="./images/export.svg" />
</template>
导出
</ButtonGradient>
<ButtonGradient @click="onRefresh">
<template #prefix>
<img src="./images/refresh.svg" />
</template>
刷新
</ButtonGradient>
</div>
<InputSearch ref="searchComp" style="width: 402px" :formList="searchFormList" @handleSearch="handleSearch" />
</div>
<!-- 内容 -->
<div class="body" v-loading>
<RoadStateCard v-for="(item, index) in data" :key="index" v-bind="getStateCardBind(item)"
@firstBtnClick="firstBtnClick" @lastBtnClick="onLastBtnClick" />
</div>
<!-- 分页 -->
<div class="footer">
<Pagination @current-change="getData" @size-change="onSizeChange" width="'100%'"
:page-sizes="[12, 16, 20, 30, 50]" :page-size="searchData.pageSize" :current-page.sync="searchData.pageNum"
layout="total, sizes, prev, pager, next" :total="total">
</Pagination>
</div>
<!-- "详情"弹出框 -->
<!-- <EventDetailDialog :visible="eventDetailDialogVisible" :formData="detailDialogFormData" :activeName="activeName"
@update:value="handleClose" @queryData="queryData" />
-->
</div>
</template>
<script>
import ButtonGradient from "@screen/components/Buttons/ButtonGradient.vue";
import Tabs from "@screen/components/Tabs/index.vue";
import RoadStateCard from "@screen/components/RoadStateCard/index.vue";
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 request from "@/utils/request";
import { Message } from "element-ui";
import { Loading } from 'element-ui';
import { WarningType as warningTypeMapping, WarningSubclass as warningSubclassTypeMapping, DirectionTypes as gzDirectionMapping, warningSourceMapping, warningStateMapping } from "@screen/utils/enum.js"
export default {
name: "RoadNetworkMonitoring2",
components: {
ButtonGradient,
Tabs,
Pagination,
RoadStateCard,
InputSearch,
EventDetailDialog,
FormEvent,
},
data() {
return {
data: [],
total: 0,
searchFormList,
activeName: "-1",
eventDetailDialogVisible: false,
isShowAddNew: false,
searchData: {
pageSize: 12,
pageNum: 1
},
detailDialogFormData: {},
};
},
created() {
this.getData();
},
methods: {
getStateCardBind(item) {
const { state, textColor, text } = tabMap[item.warningState];
return {
cardData: { ...item, state },
lastBtnColor: textColor,
lastBtnText: text,
isShowLeft: this.activeName == '-1'
};
},
queryData(flag) {
this.getData()
},
getData() { //
request({
url: `/perceivedEvents/warning/perceivedEventsList`,//
method: "post",
params: { pageNum: this.searchData.pageNum, pageSize: this.searchData.pageSize },
data: { ...this.searchData }
}).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
result.rows.forEach(it => {
it.stringEventSource = it?.warningSource ? warningSourceMapping[it?.warningSource] : '';
it.stringDirection = gzDirectionMapping[it.direction] || it.direction;
let strSub = '';
if (it.warningSubclass && warningSubclassTypeMapping[it.warningType][it.warningSubclass] || '') {
strSub = `(${warningSubclassTypeMapping[it.warningType][it.warningSubclass] || ''})`
}
it.stringEventType = warningTypeMapping[it.warningType] + strSub;
it.startTime = it.warningTime;
if (it.otherConfig) {
let otherConfig = JSON.parse(it.otherConfig);
it.pictures = otherConfig.pictures || [];
}
})
this.data = result.rows;
this.total = result.total;
});
},
onRefresh() {
this.searchData.pageNum = 1;
this.$refs.searchComp.handleResetForm();
},
onSizeChange(pageSize) {
this.searchData.pageSize = pageSize;
this.getData();
},
onExport() {
let url = '';
if (this.activeName == '-1') {
url = '/business/warning/export'
} else {
url = '/dc/system/event/export?eventState=' + this.searchData.eventState;
}
let loadingInstance = Loading.service({
fullscreen: true,
background: "#00000052",
text: "文件正在下载...",
});
// request.post(url, {}, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, responseType: 'blob' })
request({
url: url,//
method: "post",
data: { ...this.searchData, warningState: 1 },
responseType: 'blob'
})
.then((res) => {
console.log(res);
const url = window.URL.createObjectURL(new Blob([res]));
let link = document.createElement("a");
link.style.display = "none";
link.href = url;
link.setAttribute("download", "事件信息列表.xlsx");
document.body.appendChild(link);
link.click();
URL.revokeObjectURL(link.href); // URL
document.body.removeChild(link);
link = null;
loadingInstance.close();
})
.catch((err) => {
Message.error(err);
loadingInstance.close();
});
},
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;
});
}
},
onLastBtnClick(id) {
this.$router.push(`/control/event/commandDispatch?eventId=${id}`);
},
handleClose() {
this.eventDetailDialogVisible = false;
},
handleSearch(data) {
let daterange = data.daterange;
let dStakeMark = data.stakeMark;
let dendStakeMark = data.endStakeMark;
let stakeMark = dStakeMark[0] ? `K${dStakeMark[0]}+${dStakeMark[1]}` : '';
let endStakeMark = '';
if (dendStakeMark) {
endStakeMark = dendStakeMark[0] ? `K${dendStakeMark[0]}+${dendStakeMark[1]}` : '';
}
this.searchData = {
...this.searchData,
warningState: data.warningState,
warningType: data.warningType,
warningSource: data?.warningSource || '',
direction: data.direction,
startTime: daterange && daterange.length > 0 ? daterange[0] : "",
endTime: this.activeName != "-1" && daterange && daterange.length > 0 ? daterange[1] : "",
completeTime: this.activeName == "-1" && daterange && daterange.length > 0 ? daterange[1] : "",
startStakeMark: stakeMark,
endStakeMark: endStakeMark,
};
console.log(this.searchData)
// this.getData();
}
},
};
</script>
<style lang="scss" scoped>
.RoadNetworkMonitoring2 {
padding: 0px 21px 21px 21px;
height: 100%;
display: flex;
flex-direction: column;
z-index: 6;
width: 100%;
height: 100%;
.filter {
height: 60px;
display: flex;
justify-content: space-between;
align-items: center;
>div {
display: flex;
gap: 6px;
}
}
.body {
flex: 1;
overflow: auto;
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-gap: 24px;
// grid-row-gap: 9px;
// grid-column-gap: 9px;
grid-auto-rows: min-content;
}
.footer {
margin-top: 15px;
height: 36px;
display: flex;
align-items: center;
justify-content: center;
}
}
</style>
Loading…
Cancel
Save