Browse Source

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

wangqin
zhangzhang 11 months ago
parent
commit
8b412ff2ed
  1. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue
  2. 51
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/TrafficIncidents/index.vue
  3. 5
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeVectorControl/index.vue
  4. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js
  5. 52
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/dispatch/EventDetailDialog/data.js
  6. 8
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/data.js
  7. 27
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/eventPlanDialog/index.vue
  8. 14
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/index.vue
  9. 8
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/data.js
  10. 86
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue
  11. 239
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index.vue
  12. 34
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/formTable/index.vue
  13. 33
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/index.vue
  14. 7
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/qbbDialog/index.vue
  15. 42
      ruoyi-ui/src/views/JiHeExpressway/utils/enum.js

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

@ -3,7 +3,7 @@
<div class="PerceiveEvent"> <div class="PerceiveEvent">
<!-- <Video class="item-video" /> --> <!-- <Video class="item-video" /> -->
<div class="video-pic"> <div class="video-pic">
<Video style="height: 100%;flex:1" :showHeader="activeName != '-1'" :url="dialogData.formData.videoList[0]" <Video style="height: 100%;flex:1" :showHeader="false" :url="dialogData.formData.videoList[0]"
videoType="mp4" /> videoType="mp4" />
<Carousel style="flex: 1;height: 100%;" :pictures="dialogData.formData.pictures" /> <Carousel style="flex: 1;height: 100%;" :pictures="dialogData.formData.pictures" />
</div> </div>

51
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/TrafficIncidents/index.vue

@ -1,25 +1,12 @@
<template> <template>
<Dialog <Dialog v-model="obverseVisible" :title="dialogData._itemData && dialogData._itemData.title">
v-model="obverseVisible"
:title="dialogData._itemData && dialogData._itemData.title"
>
<div class="TrafficIncidents"> <div class="TrafficIncidents">
<div class="header"> <div class="header">
<Video class="video-stream" :pileNum="dialogData.stakeMark" /> <Video class="video-stream" :pileNum="dialogData.stakeMark" />
<Video <Video class="video-stream" :pileNum="dialogData.stakeMark" :rangeIndex="1" />
class="video-stream"
:pileNum="dialogData.stakeMark"
:rangeIndex="1"
/>
</div> </div>
<Descriptions <Descriptions labelWidth="72px" :list="list" :data="data" style="gap: 18px" column="7" />
labelWidth="72px"
:list="list"
:data="data"
style="gap: 18px"
column="7"
/>
</div> </div>
</Dialog> </Dialog>
</template> </template>
@ -55,11 +42,11 @@ export default {
deviceVendors: "XXX厂家", deviceVendors: "XXX厂家",
}, },
list: [ list: [
{ // {
label: "机构", // label: "",
key: "organizationName", // key: "organizationName",
gridColumn: "3", // gridColumn: "3",
}, // },
{ {
label: "高速名称", label: "高速名称",
key: "roadName", key: "roadName",
@ -82,7 +69,7 @@ export default {
gridColumn: "3", gridColumn: "3",
}, },
{ {
label: "车道列表", label: "影响车道",
key: "lang", key: "lang",
enum: "LaneOccupancy", enum: "LaneOccupancy",
gridColumn: "3", gridColumn: "3",
@ -109,11 +96,11 @@ export default {
enum: "CameraDirectionEnum", enum: "CameraDirectionEnum",
gridColumn: "3", gridColumn: "3",
}, },
{ // {
label: "完结时间", // label: "",
key: "endTime", // key: "endTime",
gridColumn: "3", // gridColumn: "3",
}, // },
{ {
label: "事件描述", label: "事件描述",
key: "description", key: "description",
@ -132,12 +119,12 @@ export default {
if (code != 200) return; if (code != 200) return;
this.data = { ...data, ...this.data }; this.data = { ...data, ...this.data };
console.log('trafficIncidents',data); console.log('trafficIncidents', data);
}) })
.catch((err) => {}); .catch((err) => { });
}, },
methods: { methods: {
handleClickTabs() {}, handleClickTabs() { },
}, },
}; };
</script> </script>
@ -158,7 +145,7 @@ export default {
display: flex; display: flex;
gap: 9px; gap: 9px;
> div.video-stream { >div.video-stream {
height: 210px; height: 210px;
} }
} }
@ -186,7 +173,7 @@ export default {
align-items: center; align-items: center;
justify-content: end; justify-content: end;
> div { >div {
font-size: 16px; font-size: 16px;
padding: 6px 12px; padding: 6px 12px;
} }

5
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeVectorControl/index.vue

@ -27,9 +27,8 @@ export default {
methods: { methods: {
handleClick(type) { handleClick(type) {
this.activeIcon = this.activeIcon === type ? null : type; this.activeIcon = this.activeIcon === type ? null : type;
if (this.activeIcon) window.showStakeText = true;
else window.showStakeText = false; // markerClusterIns.setData();
markerClusterIns.setData();
}, },
filterEnd(data) { filterEnd(data) {
this.activeIcon = null; this.activeIcon = null;

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

@ -192,8 +192,8 @@ export class MarkerCluster {
totalPages > 1 totalPages > 1
? ` ? `
<div id="paginationContainer" style="text-align:center;margin-bottom:5px;"> <div id="paginationContainer" style="text-align:center;margin-bottom:5px;">
<button style="cursor: pointer; background: #00B3CC;border-radius: 8px;border: 0px;" onclick="renderData(window.page-1)">上一页</button> <button style="padding: 0 15px;background: #00B3CC;border-radius: 48px;cursor: pointer;opacity: 1;gap: 6px;font-size: 14px;font-weight: 500;color: #FFFFFF;border: 1px solid rgba(42, 217, 253, 0.6);" onclick="renderData(window.page-1)">上一页</button>
<button style="cursor: pointer; background: #00B3CC;border-radius: 8px;border: 0px;" onclick="renderData(window.page+1)">下一页</button> <button style="padding: 0 15px;background: #00B3CC;border-radius: 48px;cursor: pointer;opacity: 1;gap: 6px;font-size: 14px;font-weight: 500;color: #FFFFFF;border: 1px solid rgba(42, 217, 253, 0.6);" onclick="renderData(window.page+1)">下一页</button>
</div>` </div>`
: "" : ""
} }

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

@ -5,8 +5,8 @@ export const formList = [
type: "input", type: "input",
options: { options: {
disabled: true, disabled: true,
placeholder: '' placeholder: "",
} },
}, },
{ {
label: "桩号:", label: "桩号:",
@ -14,8 +14,8 @@ export const formList = [
type: "input", type: "input",
options: { options: {
disabled: true, disabled: true,
placeholder: '' placeholder: "",
} },
}, },
{ {
label: "行驶方向:", label: "行驶方向:",
@ -23,8 +23,8 @@ export const formList = [
type: "input", type: "input",
options: { options: {
disabled: true, disabled: true,
placeholder: '' placeholder: "",
} },
}, },
{ {
label: "事件类型:", label: "事件类型:",
@ -32,8 +32,8 @@ export const formList = [
type: "input", type: "input",
options: { options: {
disabled: true, disabled: true,
placeholder: '' placeholder: "",
} },
}, },
{ {
label: "事件原因:", label: "事件原因:",
@ -41,8 +41,8 @@ export const formList = [
type: "input", type: "input",
options: { options: {
disabled: true, disabled: true,
placeholder: '' placeholder: "",
} },
}, },
{ {
label: "事件状态:", label: "事件状态:",
@ -50,8 +50,8 @@ export const formList = [
type: "input", type: "input",
options: { options: {
disabled: true, disabled: true,
placeholder: '' placeholder: "",
} },
}, },
{ {
label: "操作员:", label: "操作员:",
@ -59,8 +59,8 @@ export const formList = [
type: "input", type: "input",
options: { options: {
disabled: true, disabled: true,
placeholder: '' placeholder: "",
} },
}, },
{ {
label: "发生时间:", label: "发生时间:",
@ -68,18 +68,18 @@ export const formList = [
type: "input", type: "input",
options: { options: {
disabled: true, disabled: true,
placeholder: '' placeholder: "",
}
}, },
{
label: "完结时间:",
key: "endTime",
type: "input",
options: {
disabled: true,
placeholder: ''
}
}, },
// {
// label: "完结时间:",
// key: "endTime",
// type: "input",
// options: {
// disabled: true,
// placeholder: ''
// }
// },
{ {
label: "事件描述:", label: "事件描述:",
key: "direction", key: "direction",
@ -87,8 +87,8 @@ export const formList = [
gridColumn: 3, gridColumn: 3,
options: { options: {
disabled: true, disabled: true,
placeholder: '' placeholder: "",
} },
}, },
]; ];

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

@ -36,8 +36,8 @@ export const formList = [
}, },
}, },
{ {
label: "事件原因:", label: "高速名称:",
key: "eventCause", key: "roadName",
type: "input", type: "input",
options: { options: {
disabled: true, disabled: true,
@ -72,8 +72,8 @@ export const formList = [
}, },
}, },
{ {
label: "完结时间:", label: "预计结束时间:",
key: "endTime", key: "estimatedEndTime",
type: "input", type: "input",
options: { options: {
disabled: true, disabled: true,

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

@ -4,8 +4,7 @@
<ElForm :model="formData" inline :rules="rules" ref="ruleForm"> <ElForm :model="formData" inline :rules="rules" ref="ruleForm">
<div class="first"> <div class="first">
<el-radio-group v-model="planName"> <el-radio-group v-model="planName">
<el-radio-button label="名称1"></el-radio-button> <el-radio-button v-for="item in info" :key="item.id" :label="item.planName"></el-radio-button>
<el-radio-button label="名称2"></el-radio-button>
</el-radio-group> </el-radio-group>
</div> </div>
@ -68,9 +67,9 @@ export default {
}, },
props: { props: {
visible: Boolean, visible: Boolean,
detail: { info: {
type: Object, type: Array,
default: () => { } default: () => []
} }
}, },
data() { data() {
@ -95,6 +94,7 @@ export default {
qbb: '' qbb: ''
}], }],
planName: '', planName: '',
dcExecuteAction: [],
deviceData: [], deviceData: [],
eventOptions: [ eventOptions: [
{ {
@ -198,6 +198,8 @@ export default {
modelVisible: { modelVisible: {
get() { get() {
if (this.visible) { if (this.visible) {
this.planName = this.info[0]?.planName || '';
this.dcExecuteAction = this.info[0]?.dcExecuteAction || [];
} }
return this.visible; return this.visible;
}, },
@ -207,15 +209,7 @@ export default {
}, },
}, },
methods: { methods: {
initData(id = 1) { initData(data) {
request({
url: `/business/plans/list/${id}`,
method: "get",
}).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
let data = result.data;
let dcExecuteAction = result.data.dcExecuteAction;
this.planId = data.id; this.planId = data.id;
this.formData = { this.formData = {
eventCategory: data.eventCategory, eventCategory: data.eventCategory,
@ -236,11 +230,6 @@ export default {
} }
}) })
}).catch((err) => {
console.log(err)
Message.error("查询事件预案列表失败", err);
})
}, },
async loadData() { async loadData() {
if (this.deviceData.length <= 0) { if (this.deviceData.length <= 0) {

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

@ -4,10 +4,10 @@
<Form :formList="formList" :dFormData="formData" label-width="100px" /> <Form :formList="formList" :dFormData="formData" label-width="100px" />
<div class="video-pic"> <div class="video-pic">
<Video style="height: 100%; width: 380px;" :showHeader="activeName != '-1'" :url="formData.videoList[0]" <Video style="height: 100%; width: 380px;" :showHeader="activeName != '-1'"
videoType="mp4" /> :url="(formData.videoList && formData.videoList.length > 0) ? formData.videoList[0] : ''" videoType="mp4" />
<Video v-if="activeName != '-1'" style="height: 100%; width: 380px;" :url="formData.videoList[1]" <Video v-if="activeName != '-1'" style="height: 100%; width: 380px;"
videoType="mp4" /> :url="(formData.videoList && formData.videoList.length > 0) ? formData.videoList[1] : ''" videoType="mp4" />
<Carousel v-else style="flex: 1" :pictures="formData.pictures" /> <Carousel v-else style="flex: 1" :pictures="formData.pictures" />
</div> </div>
@ -18,7 +18,7 @@
</div> </div>
<!-- 确认弹窗 --> <!-- 确认弹窗 -->
<EventPlanDialog :visible="isShowDialog" @close="onCloseAddNew" /> <EventPlanDialog :visible="isShowDialog" :info="info" @close="onCloseAddNew" />
<template #footer> <template #footer>
<Button style="padding: 0 24px;" @click.native="onDelete">误报</Button> <Button style="padding: 0 24px;" @click.native="onDelete">误报</Button>
@ -73,6 +73,7 @@ export default {
return { return {
formList, formList,
isShowDialog: false, isShowDialog: false,
info: [],
timeLine1List: [{ timeLine1List: [{
time: "", time: "",
label: "", label: "",
@ -188,7 +189,6 @@ export default {
onSubmit() { onSubmit() {
this.isShowDialog = true; this.isShowDialog = true;
let url = '/business/plans/list/warning/type' let url = '/business/plans/list/warning/type'
let data = {}
if (this.activeName == '-1') { if (this.activeName == '-1') {
url = '/business/plans/list/warning/type' url = '/business/plans/list/warning/type'
} else { } else {
@ -200,7 +200,7 @@ export default {
data: this.formData data: this.formData
}).then(result => { }).then(result => {
if (result.code != 200) return Message.error(result?.msg); if (result.code != 200) return Message.error(result?.msg);
console.log('result', result) this.info = result.data;
}) })
} }

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

@ -84,10 +84,10 @@ export const gjSearchFormList = [
key: "6", key: "6",
label: "非机预警", label: "非机预警",
}, },
{ // {
key: "7", // key: "7",
label: "气象监测器", // label: "气象监测器",
}, // },
], ],
}, },
}, },

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

@ -64,19 +64,8 @@ import { tabMap, gjSearchFormList, gzSearchFormList } from "./data";
import request from "@/utils/request"; import request from "@/utils/request";
import { Message } from "element-ui"; import { Message } from "element-ui";
import { Loading } from 'element-ui'; import { Loading } from 'element-ui';
import { WarningType as warningTypeMapping, WarningSubclass as warningSubclassTypeMapping } from "@screen/utils/enum.js"
function getRandomData(min = 1, max = 15) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function getMockData() {
return Array.from({ length: getRandomData(9, 24) }).map(() => ({
time: "2023.12.22 13:00:00",
source: "视频智能识别",
location: "k100+000",
direction: "济南方向",
}));
}
const warningSourceMapping = { const warningSourceMapping = {
1: '视频AI', 1: '视频AI',
@ -85,7 +74,7 @@ const warningSourceMapping = {
4: '护栏碰撞', 4: '护栏碰撞',
5: '扫码报警', 5: '扫码报警',
6: '非机预警', 6: '非机预警',
7: '气象监测器' // 7: ''
} }
const gzDirectionMapping = { const gzDirectionMapping = {
'1': '菏泽方向', '1': '菏泽方向',
@ -98,77 +87,6 @@ const warningStateMapping = {
3: '已终止', 3: '已终止',
4: '自动结束' 4: '自动结束'
} }
const warningTypeMapping = {
1: '交通拥堵',
2: '行人',
3: '非机动车',
4: '停车',
5: '倒车/逆行',
6: '烟火',
7: '撒落物',
8: '异常天气',
9: '护栏碰撞',
10: '交通事故',
11: '车辆故障',
99: '其它',
}
const warningSubclassTypeMapping = {
1: {
"1-1": "拥堵",
"1-2": "缓行",
},
2: {
"2-1": "普通行人",
"2-2": "工作人员",
},
3: {
"3-1": "摩托车",
"3-2": "自行车",
"3-3": "三轮车",
},
4: {
"4-1": "非工程车",
"4-2": "工程车",
"4-3": "主路有车",
"4-4": "匝道有车",
"4-5": "车辆故障",
"4-6": "交通事故",
"4-7": "应急车道被占用",
"4-8": "车离开应急车道",
"4-9": "其他",
},
5: {
"5-1": "倒车/逆行",
},
6: {
"6-1": "烟火",
},
7: {
"7-1": "撒落物",
},
8: {
"8-1": "雨",
"8-2": "冰雹",
"8-3": "风",
"8-4": "雾",
"8-5": "高温",
"8-6": "积水",
"8-7": "路面湿滑",
"8-8": "路面结冰",
"8-9": "道路能见度低",
"8-10": "道路团雾",
},
9: {
"9-1": "只碰撞不倾斜",
"9-2": "只倾斜无碰撞",
"9-3": "碰撞后倾斜",
},
10: {},
11: {},
99: {
"99-1": "其他",
},
}
export default { export default {
name: "RoadNetworkMonitoring2", name: "RoadNetworkMonitoring2",

239
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index.vue

@ -27,25 +27,6 @@
:value="item.value"> :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
<!-- <el-select v-if="formData.eventCategory == 1 && formData.eventType == 6"
v-model="formData.triggerMechanism" placeholder="请选择触发类型">
<el-option-group label="主线">
<el-option label="主线封闭" value="1"></el-option>
<el-option label="主线限行" value="2"></el-option>
</el-option-group>
<el-option-group label="收费站">
<el-option label="收费站封闭" value="3"></el-option>
<el-option label="收费站限行" value="4"></el-option>
</el-option-group>
<el-option-group label="匝道立交">
<el-option label="匝道立交封闭" value="5"></el-option>
<el-option label="匝道立交限行" value="6"></el-option>
</el-option-group>
<el-option-group label="服务区">
<el-option label="服务区封闭" value="7"></el-option>
<el-option label="服务区限行" value="8"></el-option>
</el-option-group>
</el-select> -->
</el-form-item> </el-form-item>
</div> </div>
@ -355,7 +336,105 @@ const optionsMap = {
7: [], 7: [],
} }
}; };
const typeMap = {
1: [{
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: '其他事件'
}],
2: [{
value: 1,
label: '异常天气'
},
{
value: 2,
label: '拥堵'
},
{
value: 3,
label: '非机动车'
},
{
value: 4,
label: '行人'
},
{
value: 5,
label: '烟火'
},
{
value: 6,
label: '抛洒物'
},
{
value: 7,
label: '逆行'
},
]
}
const gzztMap = {
"01": '常亮',
"02": '流水',
"03": '闪烁',
"04": '关闭',
}
const gzmsMap = {
"SETMD0": "激光关闭",
"SETMD1": "常亮模式",
"SETMD2": "间隔100ms闪烁模式",
"SETMD3": "间隔200ms闪烁模式",
"SETMD4": "间隔500ms闪烁模式",
"SETMD5": "2次闪烁模式",
"SETMD6": "SOS模式",
"SETMD7": "自定义模式1",
"SETMD8": "自定义模式2",
"SETMD9": "自定义模式3",
}
const controlModelMap = {
"00": '手动模式',
"01": '自动模式',
"02": '万年历',
}
export default { export default {
name: 'addAndEditDialog', name: 'addAndEditDialog',
components: { components: {
@ -389,7 +468,7 @@ export default {
formData: { formData: {
eventCategory: 1, eventCategory: 1,
eventType: 1, eventType: 1,
triggerMechanism: '1-1' triggerMechanism: ''
}, },
secondFormData: [{ secondFormData: [{
deviceType: 1, deviceType: 1,
@ -490,6 +569,8 @@ export default {
if (Object.keys(this.detail).length > 0) { if (Object.keys(this.detail).length > 0) {
this.title = '修改预案'; this.title = '修改预案';
this.dialogType = 2; this.dialogType = 2;
this.eventOptions = typeMap[this.detail.eventCategory];
this.mechanismOptions = optionsMap[this.detail.eventCategory || 1][this.detail.eventType];
this.initData(this.detail.id); this.initData(this.detail.id);
} else { } else {
this.title = '新增预案'; this.title = '新增预案';
@ -497,7 +578,7 @@ export default {
this.formData = { this.formData = {
eventCategory: 1, eventCategory: 1,
eventType: 1, eventType: 1,
triggerMechanism: '1-1' triggerMechanism: ''
} }
this.secondFormData = [{ this.secondFormData = [{
deviceType: 1, deviceType: 1,
@ -538,16 +619,29 @@ export default {
this.secondFormData = []; this.secondFormData = [];
this.thirdFormData = []; this.thirdFormData = [];
dcExecuteAction.forEach(it => { dcExecuteAction.forEach(it => {
let action = {};
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) { if (it.deviceList) {
it.deviceList = it.deviceList.split(','); action.deviceList = it.deviceList.split(',').map(str => Number(str));
} }
if (it.actionType == 1) { if (it.actionType == 1) {
this.secondFormData.push(it); this.secondFormData.push(action);
} else if (it.actionType == 2) { } else if (it.actionType == 2) {
this.thirdFormData.push(it); this.thirdFormData.push(action);
} }
}) })
console.log('secondFormData', this.secondFormData)
}).catch((err) => { }).catch((err) => {
console.log(err) console.log(err)
Message.error("查询事件预案列表失败", err); Message.error("查询事件预案列表失败", err);
@ -561,7 +655,6 @@ export default {
method: "get", method: "get",
}) })
if (result.code != 200) return Message.error(result?.msg); if (result.code != 200) return Message.error(result?.msg);
console.log('123');
this.deviceData = result.data; this.deviceData = result.data;
// return result.data; // return result.data;
} }
@ -571,81 +664,15 @@ export default {
this.mechanismOptions = optionsMap[this.formData.eventCategory || 1][value]; this.mechanismOptions = optionsMap[this.formData.eventCategory || 1][value];
}, },
changeRadio(value = 1) { changeRadio(value = 1) {
const optionsMap = { this.formData.triggerMechanism = '';
1: [{ this.eventOptions = typeMap[value];
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: '路障清除'
}],
2: [{
value: 1,
label: '异常天气'
},
{
value: 2,
label: '拥堵'
},
{
value: 3,
label: '非机动车'
},
{
value: 4,
label: '行人'
},
{
value: 5,
label: '烟火'
},
{
value: 6,
label: '抛洒物'
},
{
value: 7,
label: '逆行'
},
]
}
this.eventOptions = optionsMap[value];
this.changeEventType(); this.changeEventType();
}, },
handleChange() { handleChange() {
}, },
formatData(it, value = 1) { formatData(it, value = 1, id = '') {
let data = { ...it, actionType: value } let data = { ...it, actionType: value, emergencyPlansId: id }
if (it.deviceList && typeof it.deviceList !== 'string' && it.deviceList.length > 0) { if (it.deviceList && typeof it.deviceList !== 'string' && it.deviceList.length > 0) {
data.deviceList = it.deviceList.join(','); data.deviceList = it.deviceList.join(',');
} else { } else {
@ -657,12 +684,16 @@ export default {
if (it.controlModel) { if (it.controlModel) {
let other = { let other = {
controlModel: it.controlModel, controlModel: it.controlModel,
controlModelName: controlModelMap[it.controlModel],
state: it.state, state: it.state,
name: gzztMap[it.state]
} }
if (it.time && it?.time[0]) { if (it.time && it?.time[0]) {
other = { other = {
controlModel: it.controlModel, controlModel: it.controlModel,
controlModelName: controlModelMap[it.controlModel],
state: it.state, state: it.state,
name: gzztMap[it.state],
startTime: it.time[0], startTime: it.time[0],
endTime: it.time[1] endTime: it.time[1]
} }
@ -672,6 +703,7 @@ export default {
if (it.gzms) { if (it.gzms) {
data.otherConfig = JSON.stringify({ data.otherConfig = JSON.stringify({
state: it.gzms, state: it.gzms,
name: gzmsMap[it.gzms],
operationDuration: it.operationDuration, operationDuration: it.operationDuration,
}) })
} }
@ -683,18 +715,21 @@ export default {
// this.submitting = false; // this.submitting = false;
let secondFormTable = this.$refs['secondFormTable'].tableData || []; let secondFormTable = this.$refs['secondFormTable'].tableData || [];
let thirdFormTable = this.$refs['thirdFormTable'].tableData || []; let thirdFormTable = this.$refs['thirdFormTable'].tableData || [];
console.log('12', thirdFormTable);
let dcArr = []; let dcArr = [];
let id = '';
if (this.dialogType == 2) id = this.planId;
secondFormTable.forEach(it => { secondFormTable.forEach(it => {
dcArr.push(this.formatData(it, 1)); dcArr.push(this.formatData(it, 1, id));
}) })
thirdFormTable.forEach(it => { thirdFormTable.forEach(it => {
dcArr.push(this.formatData(it, 2)); dcArr.push(this.formatData(it, 2, id));
}) })
console.log({ // console.log({
...this.formData, // ...this.formData,
dcExecuteAction: dcArr // dcExecuteAction: dcArr
}) // })
// return; // return;
if (this.dialogType == 1) {// if (this.dialogType == 1) {//
request({ request({

34
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/formTable/index.vue

@ -20,13 +20,13 @@
</el-option> </el-option>
</el-select> </el-select>
<el-input-number v-if="scope.row.searchRule == 2" v-model="scope.row.number" :min="0" <el-input-number v-if="scope.row.searchRule == 2 || scope.row.searchRule == 3"
:max="9999" style="width: 130px;"></el-input-number> v-model="scope.row.number" :min="0" :max="9999" style="width: 130px;"></el-input-number>
<p v-if="scope.row.searchRule == 2"></p> <p v-if="scope.row.searchRule == 2 || scope.row.searchRule == 3"></p>
<el-input-number v-if="scope.row.searchRule == 3" v-model="scope.row.number" :min="0" <el-input-number v-if="scope.row.searchRule == 4" v-model="scope.row.number" :min="0"
:max="9999" style="width: 130px;"></el-input-number> :max="9999" style="width: 130px;"></el-input-number>
<p v-if="scope.row.searchRule == 3" style="width: 56px;">公里</p> <p v-if="scope.row.searchRule == 4" style="width: 56px;">公里</p>
</div> </div>
</template> </template>
@ -41,25 +41,25 @@
:value="item.id"> :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
<el-input @click.native="clickQbb(scope.$index)" v-if="scope.row.deviceType == 1" <el-input @click.native="clickQbb(scope.$index)" v-if="scope.row.deviceType == 2"
placeholder="请选择" v-model="scope.row.qbb" readonly> placeholder="请选择" v-model="scope.row.qbb" readonly>
<i slot="suffix" class="el-input__icon el-icon-search"></i> <i slot="suffix" class="el-input__icon el-icon-search"></i>
</el-input> </el-input>
<el-select v-if="scope.row.deviceType == 2" v-model="scope.row.gzms" placeholder="工作模式"> <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" <el-option v-for="item in gzmsOptions" :key="item.value" :label="item.label"
:value="item.value"></el-option> :value="item.value"></el-option>
</el-select> </el-select>
<el-input-number v-if="scope.row.deviceType == 2" placeholder="操作时长(分钟)" <el-input-number v-if="scope.row.deviceType == 10" placeholder="操作时长(分钟)"
v-model="scope.row.operationDuration" :min="0" :max="999"></el-input-number> v-model="scope.row.operationDuration" :min="0" :max="999"></el-input-number>
<div v-if="scope.row.deviceType == 3" class="mjs"> <div v-if="scope.row.deviceType == 12" class="mjs">
<el-select v-model="scope.row.controlModel" placeholder="请选择控制模式"> <el-select v-model="scope.row.controlModel" placeholder="请选择控制模式">
<el-option label="手动模式" :value="1"></el-option> <el-option label="手动模式" value="00"></el-option>
<el-option label="自动模式" :value="2"></el-option> <el-option label="自动模式" value="01"></el-option>
<el-option label="万年历" :value="3"></el-option> <el-option label="万年历" value="02"></el-option>
</el-select> </el-select>
<el-time-picker v-if="scope.row.controlModel == 2" v-model="scope.row.time" is-range <el-time-picker v-if="scope.row.controlModel == '01'" v-model="scope.row.time" is-range
style="" range-separator="-" placeholder="选择时间" value-format="HH:mm" format="HH:mm"> style="" range-separator="-" placeholder="选择时间" value-format="HH:mm" format="HH:mm">
</el-time-picker> </el-time-picker>
<el-select v-model="scope.row.state" placeholder="工作状态"> <el-select v-model="scope.row.state" placeholder="工作状态">
@ -68,7 +68,7 @@
</el-select> </el-select>
</div> </div>
<el-input v-if="scope.row.deviceType == 4" v-model="scope.row.content" <el-input v-if="scope.row.deviceType == 5" v-model="scope.row.content"
placeholder="请输入发布内容"></el-input> placeholder="请输入发布内容"></el-input>
</div> </div>
@ -87,7 +87,7 @@
</Table> </Table>
<!-- 情报板弹窗 --> <!-- 情报板弹窗 -->
<QbbDialog :visible="isShowDialog" @close="onCloseDialog" @dialogSubmit="dialogSubmit" /> <QbbDialog :visible="isShowDialog" :info="qbbData" @close="onCloseDialog" @dialogSubmit="dialogSubmit" />
</div> </div>
</template> </template>
@ -269,6 +269,7 @@ export default {
label: "自定义模式3", label: "自定义模式3",
} }
], ],
qbbData: {},
sbOptions: [], sbOptions: [],
deviceType: 1, deviceType: 1,
index: 1 index: 1
@ -320,6 +321,7 @@ export default {
}, },
clickQbb(index) { clickQbb(index) {
this.index = index; this.index = index;
this.qbbData = this.tableData[index].dcInfoBoardTemplate;
this.isShowDialog = true; this.isShowDialog = true;
}, },
onCloseDialog() { onCloseDialog() {
@ -327,7 +329,7 @@ export default {
}, },
dialogSubmit(data) { dialogSubmit(data) {
this.tableData[this.index].qbb = data.content; this.tableData[this.index].qbb = data.content;
this.tableData[this.index].otherConfig = JSON.stringify({ dcInfoBoardTemplate: data }); this.tableData[this.index].otherConfig = JSON.stringify(data);
} }
} }
} }

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

@ -28,8 +28,8 @@
<ElTableColumn prop="strEventType" label="事件类型" width="100" align="center" /> <ElTableColumn prop="strEventType" label="事件类型" width="100" align="center" />
<ElTableColumn prop="planName" label="预案名称" width="140" align="center" /> <ElTableColumn prop="planName" label="预案名称" width="140" align="center" />
<ElTableColumn prop="triggeringCondition" label="检索条件" width="140" /> <ElTableColumn prop="triggeringCondition" label="检索条件" width="140" />
<ElTableColumn prop="deviceType" label="设备类型" width="140" /> <ElTableColumn prop="deviceType" label="设备类型" />
<ElTableColumn prop="controllableDevice" label="可控设备" width="200" /> <ElTableColumn prop="controllableDeviceName" label="可控设备"/>
<ElTableColumn prop="controlCommand" label="控制指令" /> <ElTableColumn prop="controlCommand" label="控制指令" />
<ElTableColumn label="操作" width="210" align="center"> <ElTableColumn label="操作" width="210" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
@ -65,7 +65,8 @@ import { Message } from 'element-ui'
import { searchFormList } from './data'; import { searchFormList } from './data';
const eventTypeMap = { const eventTypeMap = {
0: { 0: {},
1: {
1: '交通事故', 1: '交通事故',
2: '车辆故障', 2: '车辆故障',
3: '交通管制', 3: '交通管制',
@ -78,7 +79,7 @@ const eventTypeMap = {
10: '异常天气', 10: '异常天气',
11: '其他事件', 11: '其他事件',
}, },
1: { 2: {
1: '异常天气', 1: '异常天气',
2: '拥堵', 2: '拥堵',
3: '非机动车', 3: '非机动车',
@ -87,10 +88,25 @@ const eventTypeMap = {
6: '抛洒物', 6: '抛洒物',
7: '逆行', 7: '逆行',
}, },
2: {} 3: {}
} }
const deviceMap = {
1: '摄像机',
2: '可变信息标志',
3: '气象监测器',
4: '出口诱导灯',
5: '路段语音广播',
6: '护栏碰撞',
7: '毫米波雷达',
8: '合流区预警',
9: '智慧锥桶',
10: '激光疲劳唤醒',
11: '类交通量调查站',
12: '行车诱导',
13: '智能设备箱',
14: '光线在线监测',
}
export default { export default {
name: 'controlEventPlan', name: 'controlEventPlan',
@ -128,8 +144,9 @@ export default {
}).then((result) => { }).then((result) => {
if (result.code != 200) return Message.error(result?.msg); if (result.code != 200) return Message.error(result?.msg);
result.rows.forEach(it => { result.rows.forEach(it => {
it.strEventCategory = it.eventCategory == 0 ? '交通事件' : '感知事件'; it.strEventCategory = it.eventCategory == 1 ? '交通事件' : '感知事件';
it.strEventType = eventTypeMap[it.eventCategory || 0][it.eventType]; it.strEventType = eventTypeMap[it.eventCategory || 0][it.eventType];
// it.strDeviceType = deviceMap[it.deviceType];
}) })
this.tableData = result.rows; this.tableData = result.rows;
this.total = result.total; this.total = result.total;
@ -154,7 +171,7 @@ export default {
this.isShowDialog = true; this.isShowDialog = true;
}, },
handleSearch(data) { handleSearch(data) {
console.log(data); // console.log(data);
this.searchData = { ...this.searchData, ...data } this.searchData = { ...this.searchData, ...data }
this.initData(); this.initData();
}, },

7
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/qbbDialog/index.vue

@ -49,7 +49,7 @@ export default {
}, },
props: { props: {
visible: Boolean, visible: Boolean,
detail: { info: {
type: Object, type: Object,
default: () => { } default: () => { }
} }
@ -72,6 +72,11 @@ export default {
computed: { computed: {
modelVisible: { modelVisible: {
get() { get() {
if (this.visible) {
if (this.info && this.info.id) {
this.radio1 = Number(this.info.id);
}
}
return this.visible; return this.visible;
}, },
set(val) { set(val) {

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

@ -82,6 +82,7 @@ export const CameraControlTypeEnum = {
}, },
}; };
//交通事件类型
export const EventTopics = { export const EventTopics = {
交通事故: 1, 交通事故: 1,
车辆故障: 2, 车辆故障: 2,
@ -134,20 +135,20 @@ export const InfoWarningSource = {
}, },
}; };
// 事件主类 warningType // 感知事件主类 warningType
export const WarningType = { export const WarningType = {
1: "交通拥堵", 1: "交通拥堵",
2: "行人", 2: "行人",
3: "非机动车", 3: "非机动车",
4: "停车", 4: "停车",
5: "倒车/逆行", 5: "违规驾驶",
6: "烟火", 6: "路障",
7: "撒落物", 7: "道路施工",
8: "异常天气", 8: "异常天气",
9: "护栏碰撞", 9: "护栏碰撞",
10: "交通事故", 10: "交通事故",
11: "车辆故障", 11: "车辆故障",
99: "其他", 99: "其他事件",
}; };
export const WarningTypeList = Object.keys(WarningType).map((key) => { export const WarningTypeList = Object.keys(WarningType).map((key) => {
@ -157,7 +158,7 @@ export const WarningTypeList = Object.keys(WarningType).map((key) => {
}; };
}); });
// 事件主类的子类(上方) warningSubclass // 感知事件主类的子类(上方) warningSubclass
export const WarningSubclass = { export const WarningSubclass = {
1: { 1: {
"1-1": "拥堵", "1-1": "拥堵",
@ -177,20 +178,29 @@ export const WarningSubclass = {
"4-2": "工程车", "4-2": "工程车",
"4-3": "主路有车", "4-3": "主路有车",
"4-4": "匝道有车", "4-4": "匝道有车",
"4-5": "车辆故障", // "4-5": "车辆故障",
"4-6": "交通事故", // "4-6": "交通事故",
"4-7": "应急车道被占用", "4-7": "应急车道被占用",
"4-8": "车离开应急车道", "4-8": "车离开应急车道",
"4-9": "其他", "4-9": "其他",
}, },
5: { 5: {
"5-1": "倒车/逆行", "5-1": "倒车/逆行",
"5-2": "压线",
"5-3": "掉头",
"5-4": "超速",
"5-5": "低速",
"5-6": "违规变道",
"5-7": "未保持安全距离",
}, },
6: { 6: {
"6-1": "烟火", "6-1": "烟雾",
"6-2": "火灾",
"6-3": "障碍物",
"6-4": "抛洒物",
}, },
7: { 7: {
"7-1": "撒落物", "7-1": "道路施工",
}, },
8: { 8: {
"8-1": "雨", "8-1": "雨",
@ -209,8 +219,18 @@ export const WarningSubclass = {
"9-2": "只倾斜无碰撞", "9-2": "只倾斜无碰撞",
"9-3": "碰撞后倾斜", "9-3": "碰撞后倾斜",
}, },
10: {
"10-1": "未知",
"10-2": "单车事故",
"10-3": "多车事故",
},
11: {
"11-1": "车辆抛锚",
"11-2": "车辆炸胎(有备胎)",
"11-3": "车辆炸胎(无备胎)",
},
99: { 99: {
"99-1": "其他", "99-1": "其他事件",
}, },
}; };

Loading…
Cancel
Save